Merge pull request #799 from Safelite/feature/richardson/SSR-1416

Updates for mobile fee being hidden
This commit is contained in:
brich1212safe 2024-07-24 10:26:43 -04:00 committed by GitHub
commit f2be14b1de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 5 deletions

View file

@ -23,9 +23,12 @@
<script>
import { useMainStore } from '@/store';
import { AppointmentTypeStrings } from '@/constants/schedule-constants.js';
import buttonQuestion from '@/digital-components/button-question/button-question.vue';
// Constants
import { AppointmentTypeStrings } from '@/constants/schedule-constants.js';
import { experimentSettings } from '@/constants/experiments';
export default {
name: 'appointment-type-question',
components: {
@ -48,7 +51,11 @@ export default {
return this.getCmsContent(this.cmsWidgetName, 'QuestionText');
},
answersFromCms() {
return this.getCmsContent(this.cmsWidgetName, 'Answers');
const retCms = this.getCmsContent(this.cmsWidgetName, 'Answers');
if (retCms && retCms.length > 0 && this.isMobileFeeHidden) {
return retCms.map((x) => (x.Name === AppointmentTypeStrings.MOBILE ? { ...x, SubText: x.SubText.replace('*', '') } : x));
}
return retCms;
},
answersToDisplay() {
const shouldShowMobile = this.isServiceableMobile && this.isItacOrNoComp;
@ -78,6 +85,9 @@ export default {
isItacOrNoComp() {
return this.isITAC || useMainStore().isNoComp;
},
isMobileFeeHidden() {
return this.getSettingValue(experimentSettings.ISS_FEATURE_TOGGLE_IS_MOBILE_FEE_HIDDEN) === 'true';
},
isMobileOnly() {
return this.isServiceableMobile && !this.isServiceableInshop;
}

View file

@ -31,7 +31,7 @@
</span>
</div>
<textBlock
v-if="isItacOrNoComp"
v-if="isItacOrNoComp && !isMobileFeeHidden"
:customText="mobileFeeText"
cmsWidgetName="MobileFeeDisclaimerWidget"
typeStyle="caption" />
@ -82,6 +82,9 @@ import addressQuestions from '@/iss-components/address-questions/address-questio
// eslint-disable-next-line max-len
import vehicleProtectedQuestion from '@/layouts/service-location/mobile-location-modal-questions/vehicle-protected-question/vehicle-protected-question.vue';
// Constants
import { experimentSettings } from '@/constants/experiments';
// Helpers
import { useMainStore } from '@/store';
import {
@ -91,8 +94,6 @@ import {
} from '@/helpers/service-location-helper';
import { deepClone } from '@/helpers/object-helper.js';
// Validation
export default {
name: 'mobile-location-modal-questions',
components: {
@ -176,6 +177,9 @@ export default {
isItacOrNoComp() {
return this.isITAC || useMainStore().isNoComp;
},
isMobileFeeHidden() {
return this.getSettingValue(experimentSettings.ISS_FEATURE_TOGGLE_IS_MOBILE_FEE_HIDDEN) === 'true';
},
mobileLocationLinkPromptText() {
return this.getCmsContent(this.linkWidgetName, 'HeaderText');
},