diff --git a/.prettierrc b/.prettierrc index 192cad794..514fb6eac 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,6 @@ { "tabWidth": 4, + "htmlWhitespaceSensitivity": "ignore", "bracketSameLine": true, "printWidth": 100, "trailingComma" : "es5" diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index d9cfc703e..49ad6f507 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -16,8 +16,6 @@ const storeMutations = { UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor", UPDATE_VEHICLE_VIN: "updateVehicleVin", UPDATE_VEHICLE: "updateVehicle", - UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE: - "updateIsMobileStaticRecalibrationApplicable", UPDATE_IS_REPAIR: "updateIsRepair", UPDATE_NUMBER_OF_CHIPS: "updateNumberOfChips", diff --git a/src/digital-components/date-picker/date-picker-2.vue b/src/digital-components/date-picker/date-picker-2.vue new file mode 100644 index 000000000..8becf6266 --- /dev/null +++ b/src/digital-components/date-picker/date-picker-2.vue @@ -0,0 +1,1071 @@ + + + + + diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index c345a1ce3..71c09bbbf 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -17,18 +17,40 @@
- = Available + + = Available
-
SundayS
-
MondayM
-
TuesdayT
-
WednesdayW
-
ThursdayT
-
FridayF
-
SaturdayS
+
+ Sunday + S +
+
+ Monday + M +
+
+ Tuesday + T +
+
+ Wednesday + W +
+
+ Thursday + T +
+
+ Friday + F +
+
+ Saturday + S +
- + :aria-required="isRequired">

{{ errorMessage }} + :class="[centerErrorMessage ? 'center-error-message' : '']"> + {{ errorMessage }} +

diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index e21a5037a..c4a8e4900 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -10,9 +10,9 @@ href="javascript:void(0)" class="col d-flex justify-content-between py-0"> {{ OrderDetailsText }} - {{ - getLineItemAmount(amountDue, showCoverageAsPending) - }} + + {{ getLineItemAmount(amountDue, showCoverageAsPending) }} +
@@ -48,11 +48,11 @@ v-for="(cartItem, i) in packageCartItems" :key="i" class="packaged-cart-item"> - {{ - cartItem.name - }} + + + {{ cartItem.name }} + + {{ - getLineItemAmount(cartItem.subTotal, null, cartItem.category) - }} + "> + {{ getLineItemAmount(cartItem.subTotal, null, cartItem.category) }} +
@@ -143,8 +141,10 @@ class="my-2 lh-1 applied-promo-tag" v-for="(promoCode, i) in getPromoCodeList" :key="i"> - Promo code {{ promoCode }} applied + + Promo code + {{ promoCode }} + applied diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 656aeaa38..8efad6f3e 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -54,8 +54,10 @@ class="mt-4 d-flex align-items-center justify-content-between" v-for="(promoCode, i) in this.getPromoCodeList()" :key="i"> - Promo code {{ promoCode }} applied + + Promo code + {{ promoCode }} + applied - Add to calendar + Add to calendar + - + v-model="selectedCalendarOption"> diff --git a/src/layouts/molding-questions/molding-questions.vue b/src/layouts/molding-questions/molding-questions.vue index 1bcc3d7a8..2c5f5a7c3 100644 --- a/src/layouts/molding-questions/molding-questions.vue +++ b/src/layouts/molding-questions/molding-questions.vue @@ -78,6 +78,20 @@ export default { ); } + if (store.getters.externalParameterCustomer?.phoneNumber) { + await baseMixin.methods.dispatchStoreAction( + storeActions.SAVE_PHONE_NUMBER, + store.getters.externalParameterCustomer.phoneNumber, + false + ); + + await baseMixin.methods.dispatchStoreAction( + storeActions.SAVE_IS_SMS_OPT_IN, + true, + false + ); + } + baseMixin.methods.ResetExternalParamsAndHideModal(); } }); diff --git a/src/layouts/part-questions/part-questions.vue b/src/layouts/part-questions/part-questions.vue index f905e86c7..1d7771474 100644 --- a/src/layouts/part-questions/part-questions.vue +++ b/src/layouts/part-questions/part-questions.vue @@ -79,6 +79,21 @@ export default { false ); } + + if (store.getters.externalParameterCustomer?.phoneNumber) { + await baseMixin.methods.dispatchStoreAction( + storeActions.SAVE_PHONE_NUMBER, + store.getters.externalParameterCustomer.phoneNumber, + false + ); + + await baseMixin.methods.dispatchStoreAction( + storeActions.SAVE_IS_SMS_OPT_IN, + true, + false + ); + } + baseMixin.methods.ResetExternalParamsAndHideModal(); } }); diff --git a/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue b/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue index 2763f1af9..406e9055a 100644 --- a/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue +++ b/src/layouts/payment-method/payment-method-question/payment-method-list-button/payment-method-list-button.vue @@ -18,7 +18,7 @@ v-if="hasImage" :src="buttonImage" :alt="getInlineAltText(token)" /> - {{ getInlineAltText(token) }} + {{ getInlineAltText(token) }} {{ token }} diff --git a/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue b/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue index 7199e27e7..af221c7ba 100644 --- a/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue +++ b/src/layouts/payment/payment-switch/payment-switch-button/payment-switch-button.vue @@ -11,7 +11,7 @@ class="ms-2" :src="buttonImage" :alt="getInlineAltText(token)" /> - {{ getInlineAltText(token) }} + {{ getInlineAltText(token) }} {{ token }} diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 5ffb04faa..ecd2489c8 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -41,8 +41,7 @@ id="card-frame" seamless scrolling="no" - allow="payment *; microphone *; geolocation *;"> - + allow="payment *; microphone *; geolocation *;">
diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index deca0d6d1..a46bc3327 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -577,6 +577,52 @@ describe("quote.vue", () => { //Assert expect(wrapper.vm.isInsuranceSelected).toBe(false); }); + test("should default to cash if isCashSelected is true, despite all other checks pointing to insurance selection", async () => { + // Also needs no query parameter or previous selection in store to be present + //Arrange + + store.getters = { + lineItems: { + glassParts: ["item", "item2"], + }, + applicationUser: { + experiments: [], + }, + order: { + lineItems: { + glassParts: ["item", "item2"], + }, + payment: { + isInsurance: true, + }, + customer: { + emailAddress: "test@test.com", + }, + serviceLocation: { + state: null, + }, + }, + vehicle: { + cardId: "123", + }, + experimentSettings: { + settingName: "SERVICE_PACKAGE_DISCOUNT", + }, + }; + mockTierOnePrice = 505; + const { wrapper } = setupMocks({}); + + //Act + await quote.beforeRouteEnter.call( + wrapper.vm, + { query: { fmgPage: "quote", isInsuranceSelected: true, isCashSelected: true } }, + undefined, + (c) => c(wrapper.vm) + ); + + //Assert + expect(wrapper.vm.isInsuranceSelected).toBe(false); + }); test("should default to insurance if total economy package price is over $500", async () => { // Also needs no query parameter or previous selection in store to be present //Arrange diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 4428f6e40..20dc16304 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -328,6 +328,10 @@ export default { } const getIsInsuranceSelectedValue = (availableLineItems, insuranceThreshold) => { + // query param checked here is set on insurance-selection "Pay on my own" link click + if (to.query?.isCashSelected || to.query?.iscashselected) { + return false; + } const serviceLocationState = store.getters.order.serviceLocation.state; // usually true when returning from heritage but can be false when returning from heritage on a save quote diff --git a/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue b/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue index c7f31db33..b1e0e10e2 100644 --- a/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue +++ b/src/layouts/quote/recal-disclaimer/recal-disclaimer.vue @@ -3,7 +3,7 @@
- {{ recalHeaderText }} + {{ recalHeaderText }}
diff --git a/src/layouts/return-user/return-user.vue b/src/layouts/return-user/return-user.vue index adf55ce2b..d655a0c14 100644 --- a/src/layouts/return-user/return-user.vue +++ b/src/layouts/return-user/return-user.vue @@ -27,9 +27,10 @@
diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 7800876cd..63a2d7d64 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -18,7 +18,7 @@ marginTopSizeOverride="1" /> - { zipCode: "43235", state: "OH", }, - vehicle: { - isMobileStaticRecalibrationApplicable: true, - }, }, damage: { isRepair: false, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 47cf5262e..a17c0e02b 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -192,8 +192,6 @@ export default { isRecalibrationServiceableInshop: null, isGlassServiceableMobile: null, isRecalibrationServiceableMobile: null, - isVehicleMobileStaticRecalibrationApplicable: - this.getIsVehicleMobileStaticRecalibrationApplicableFromStore(), selectedAppointmentType: this.getSelectedAppointmentType(), selectedProvider: this.getSelectedProvider(), mobileFeePart: null, @@ -324,9 +322,8 @@ export default { isMobileStaticRecalibrationApplicable() { return ( this.displayMSR && - this.isVehicleMobileStaticRecalibrationApplicable && this.mobileFeePart?.partNumber == partNumberStrings.MOBILE_STATIC_RECAL_FEE && - (this.isInsurance ? this.mobileFeePart?.isInsurable : true) + (this.isInsurance && !this.isITAC ? this.mobileFeePart?.isInsurable : true) ); }, displayMSR() { @@ -403,6 +400,9 @@ export default { isInsurance() { return store.getters.payment.isInsurance; }, + isITAC() { + return store.getters.order.policy.isItac; + }, }, methods: { arePagePrerequisitesValid() { @@ -515,9 +515,6 @@ export default { getSelectedProvider() { return store.getters.order.serviceLocation.provider; }, - getIsVehicleMobileStaticRecalibrationApplicableFromStore() { - return store.getters.order.vehicle.isMobileStaticRecalibrationApplicable; - }, resetMobileLocation() { this.streetAddress = ""; this.apartmentNumberOrBusinessName = ""; diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index c0231ea80..24d063e5e 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -8,7 +8,7 @@ href="#!" @click-event="openModal"> diff --git a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue index 381ff4607..e46b02a96 100644 --- a/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue +++ b/src/layouts/service-location/shop-question/shop-list-button/shop-list-button.vue @@ -8,12 +8,12 @@ :aria-label="buttonLabel" class="button-content list-button-content d-flex flex-column justify-content-center py-3 px-4">
- {{ - buttonLabel - }} - {{ - buttonLabelSubCopy - }} + + {{ buttonLabel }} + + + {{ buttonLabelSubCopy }} +
- {{ - badgeText - }} + + {{ badgeText }} + { registration: { licensePlate: null, }, - isMobileStaticRecalibrationApplicable: false, }, serviceLocation: { address: null, @@ -226,10 +225,6 @@ export const mutations = { updateVehicleVin(state, vin) { state.order.vehicle.vin = vin; }, - updateIsMobileStaticRecalibrationApplicable(state, isMobileStaticRecalibrationApplicable) { - state.order.vehicle.isMobileStaticRecalibrationApplicable = - isMobileStaticRecalibrationApplicable; - }, updateIsRepair(state, isRepair) { state.order.damage.isRepair = isRepair; }, @@ -361,8 +356,6 @@ export const mutations = { state.order.vehicle.imageUrl = vehicleInfo.imageUrl; state.order.vehicle.imageVifNumber = vehicleInfo.imageVifNumber; state.order.vehicle.imageColor = vehicleInfo.imageVifColor; - state.order.vehicle.isMobileStaticRecalibrationApplicable = - vehicleInfo.isMobileStaticRecalibrationApplicable; }, updateRegistration(state, registrationInfo) { state.order.vehicle.registration.licensePlate = registrationInfo?.licensePlate; @@ -555,7 +548,6 @@ export const mutations = { state.order.vehicle.imageUrl = null; state.order.vehicle.imageVifNumber = null; state.order.vehicle.imageColor = null; - state.order.vehicle.isMobileStaticRecalibrationApplicable = false; }, resetDamageState(state) { state.order.damage.isRepair = null; @@ -1024,8 +1016,12 @@ export const getters = { return email; } - // if we're here, then we have both email and phone so get the value from pageData to reflect what they entered on the page - return state.applicationUser.pageData[fmgPageValues.EMAIL_SMS_PAGES]?.emailOrSmsValue; + // if we're here, then we have both email and phone so get the value from pageData to reflect what they entered on the page. + // if they didn't enter anything on the page default to email + return ( + state.applicationUser.pageData[fmgPageValues.EMAIL_SMS_PAGES]?.emailOrSmsValue ?? + state.order.customer.emailAddress + ); }, }; @@ -1701,8 +1697,6 @@ export const actions = { const coverageStatus = coverageStatusEnum(order.payment?.insuranceCoverage?.coverageStatus); const coverageType = coverageTypeEnum(order.payment?.insuranceCoverage?.coverageType); const isItacOptimized = order.policy?.isItac ?? false; - const isMobileStaticRecalibrationApplicable = - order.vehicle?.isMobileStaticRecalibrationApplicable; const zipCode = serviceZipCode ?? order.serviceLocation?.provider?.address?.zipCode ?? @@ -1718,12 +1712,10 @@ export const actions = { var endPoint = `${endpoints.GetMobileFeePart.url}/?serviceType=${serviceType}&facilityType=${facilityType}&parentAccountNumber=${parentAccountNumber}&billToAccountNumber=${billToAccountNumber}&providerNumber=${providerNumber}&isItacOptimized=${isItacOptimized}&zipCode=${zipCode}`; - if (isMobileStaticRecalibrationApplicable) { - const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]); - const carId = order.vehicle?.carId; - if (recalPartNumber && carId) { - endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`; - } + const recalPartNumber = getRecalPartNumber(order.lineItems?.glassParts[0]); + const carId = order.vehicle?.carId; + if (recalPartNumber && carId) { + endPoint = `${endPoint}&partNumbers=${recalPartNumber}&carId=${carId}`; } if (coverageStatus) { @@ -2326,18 +2318,7 @@ export const actions = { // Vehicle saveVehicle( context, - { - year, - make, - model, - style, - carId, - category, - imageUrl, - imageVifNumber, - imageVifColor, - isMobileStaticRecalibrationApplicable, - } + { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor } ) { if ( context.state.order.vehicle.year != year || @@ -2358,10 +2339,6 @@ export const actions = { context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor); - context.commit( - storeMutations.UPDATE_VEHICLE_MOBILE_STATIC_RECALIBRATION_APPLICABLE, - isMobileStaticRecalibrationApplicable - ); } }, diff --git a/src/ux-components/text-link/text-link.vue b/src/ux-components/text-link/text-link.vue index 7fc4eaef8..30cd2d7e5 100644 --- a/src/ux-components/text-link/text-link.vue +++ b/src/ux-components/text-link/text-link.vue @@ -1,22 +1,26 @@