INSR-8493: Add MSR fee alert to service location component
This commit is contained in:
parent
1fc93cb733
commit
56ae9cd194
1 changed files with 15 additions and 9 deletions
|
|
@ -94,6 +94,12 @@
|
||||||
{{ militaryBaseWarningText }}
|
{{ militaryBaseWarningText }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<alert
|
||||||
|
v-if="displayMSRFeeAlert"
|
||||||
|
:manualCopy="msrFeeAlertCopy"
|
||||||
|
cmsWidgetName="AlertMSRFeeWidget"
|
||||||
|
:isCollapsible="true"
|
||||||
|
alertClass="alert-warning" />
|
||||||
<serviceZipQuestion
|
<serviceZipQuestion
|
||||||
ref="mobileServiceZipCodeQuestion"
|
ref="mobileServiceZipCodeQuestion"
|
||||||
customInputId="mobileServiceZipCode"
|
customInputId="mobileServiceZipCode"
|
||||||
|
|
@ -112,10 +118,6 @@
|
||||||
class="d-inline-flex mt-0"
|
class="d-inline-flex mt-0"
|
||||||
role="alert">{{ mobileZipError }}</span>
|
role="alert">{{ mobileZipError }}</span>
|
||||||
</div>
|
</div>
|
||||||
<textBlock
|
|
||||||
v-if="displayMobileFeeDisclaimer"
|
|
||||||
cmsWidgetName="MobileFeeDisclaimerWidget"
|
|
||||||
typeStyle="disclaimer" />
|
|
||||||
</div>
|
</div>
|
||||||
<recalModal
|
<recalModal
|
||||||
:ref="RECAL_MODAL_REF_NAME"
|
:ref="RECAL_MODAL_REF_NAME"
|
||||||
|
|
@ -137,7 +139,6 @@ import { isRecalOrder } from '@/helpers/recal-helper';
|
||||||
|
|
||||||
// Import Component
|
// Import Component
|
||||||
import alert from '@/ux-components/alert/alert.vue';
|
import alert from '@/ux-components/alert/alert.vue';
|
||||||
import textBlock from '@/digital-components/text-block/text-block.vue';
|
|
||||||
import appointmentTypeQuestion from '@/layouts/schedule-page/service-location/appointment-type-question/appointment-type-question.vue';
|
import appointmentTypeQuestion from '@/layouts/schedule-page/service-location/appointment-type-question/appointment-type-question.vue';
|
||||||
import baseFormMixin from '@/mixins/base-form-mixin';
|
import baseFormMixin from '@/mixins/base-form-mixin';
|
||||||
import shopAddress from '@/layouts/schedule-page/service-location/shop-address/shop-address.vue';
|
import shopAddress from '@/layouts/schedule-page/service-location/shop-address/shop-address.vue';
|
||||||
|
|
@ -146,6 +147,7 @@ import widgetFields from '@/constants/cms-widget-fields';
|
||||||
import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
import recalModal from '@/iss-components/recal-modal/recal-modal.vue';
|
||||||
import { getPricedMobileFeePart } from '@/helpers/service-location-helper';
|
import { getPricedMobileFeePart } from '@/helpers/service-location-helper';
|
||||||
import { processIfStatements } from '@/helpers/cms-content-helper';
|
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||||
|
import partNumberStrings from '@/constants/part-number-strings';
|
||||||
|
|
||||||
const RECAL_MODAL_REF_NAME = 'RecalModal';
|
const RECAL_MODAL_REF_NAME = 'RecalModal';
|
||||||
|
|
||||||
|
|
@ -153,7 +155,6 @@ export default {
|
||||||
name: 'service-location',
|
name: 'service-location',
|
||||||
components: {
|
components: {
|
||||||
alert,
|
alert,
|
||||||
textBlock,
|
|
||||||
appointmentTypeQuestion,
|
appointmentTypeQuestion,
|
||||||
shopAddress,
|
shopAddress,
|
||||||
serviceZipQuestion,
|
serviceZipQuestion,
|
||||||
|
|
@ -210,9 +211,6 @@ export default {
|
||||||
displayMilitaryZipAlert() {
|
displayMilitaryZipAlert() {
|
||||||
return this.zipContainsMilitaryBase && this.isServiceableMobile;
|
return this.zipContainsMilitaryBase && this.isServiceableMobile;
|
||||||
},
|
},
|
||||||
displayMobileFeeDisclaimer() {
|
|
||||||
return this.mainStore.isNoComp || this.mainStore.isITAC;
|
|
||||||
},
|
|
||||||
displayRecalibrationWarning() {
|
displayRecalibrationWarning() {
|
||||||
return this.requiresInshopRecalibration;
|
return this.requiresInshopRecalibration;
|
||||||
},
|
},
|
||||||
|
|
@ -294,6 +292,14 @@ export default {
|
||||||
}
|
}
|
||||||
const bodyText = this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
|
const bodyText = this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
|
||||||
return this.processIfStatements(bodyText, 'custom', this.getCustomValueFromString);
|
return this.processIfStatements(bodyText, 'custom', this.getCustomValueFromString);
|
||||||
|
},
|
||||||
|
displayMSRFeeAlert() {
|
||||||
|
return this.mobileFeePart !== null && this.mobileFeePart.sellingPrice > 0 && (this.mobileFeePart.partNumber === partNumberStrings.RECAL_MOBILEDUAL || this.mobileFeePart.partNumber === partNumberStrings.RECAL_MOBILE);
|
||||||
|
},
|
||||||
|
msrFeeAlertCopy() {
|
||||||
|
let content = this.getCmsContent('AlertMSRFeeWidget', widgetFields.ALERT_WIDGET.BODY_TEXT);
|
||||||
|
content = content.replace('{custom:fee}', `$${this.mobileFeePart.sellingPrice.toFixed(2)}`);
|
||||||
|
return content;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue