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 }}
|
||||
</div>
|
||||
</div>
|
||||
<alert
|
||||
v-if="displayMSRFeeAlert"
|
||||
:manualCopy="msrFeeAlertCopy"
|
||||
cmsWidgetName="AlertMSRFeeWidget"
|
||||
:isCollapsible="true"
|
||||
alertClass="alert-warning" />
|
||||
<serviceZipQuestion
|
||||
ref="mobileServiceZipCodeQuestion"
|
||||
customInputId="mobileServiceZipCode"
|
||||
|
|
@ -112,10 +118,6 @@
|
|||
class="d-inline-flex mt-0"
|
||||
role="alert">{{ mobileZipError }}</span>
|
||||
</div>
|
||||
<textBlock
|
||||
v-if="displayMobileFeeDisclaimer"
|
||||
cmsWidgetName="MobileFeeDisclaimerWidget"
|
||||
typeStyle="disclaimer" />
|
||||
</div>
|
||||
<recalModal
|
||||
:ref="RECAL_MODAL_REF_NAME"
|
||||
|
|
@ -137,7 +139,6 @@ import { isRecalOrder } from '@/helpers/recal-helper';
|
|||
|
||||
// Import Component
|
||||
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 baseFormMixin from '@/mixins/base-form-mixin';
|
||||
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 { getPricedMobileFeePart } from '@/helpers/service-location-helper';
|
||||
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||
import partNumberStrings from '@/constants/part-number-strings';
|
||||
|
||||
const RECAL_MODAL_REF_NAME = 'RecalModal';
|
||||
|
||||
|
|
@ -153,7 +155,6 @@ export default {
|
|||
name: 'service-location',
|
||||
components: {
|
||||
alert,
|
||||
textBlock,
|
||||
appointmentTypeQuestion,
|
||||
shopAddress,
|
||||
serviceZipQuestion,
|
||||
|
|
@ -210,9 +211,6 @@ export default {
|
|||
displayMilitaryZipAlert() {
|
||||
return this.zipContainsMilitaryBase && this.isServiceableMobile;
|
||||
},
|
||||
displayMobileFeeDisclaimer() {
|
||||
return this.mainStore.isNoComp || this.mainStore.isITAC;
|
||||
},
|
||||
displayRecalibrationWarning() {
|
||||
return this.requiresInshopRecalibration;
|
||||
},
|
||||
|
|
@ -294,6 +292,14 @@ export default {
|
|||
}
|
||||
const bodyText = this.getCmsContent('WhereWouldYouLikeServiceWidget', widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT);
|
||||
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: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue