From 85bc78dc27f5be4d7af85cb4f9c3f25979c345d5 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 16 May 2025 16:23:26 +0530 Subject: [PATCH 1/9] CASH-710 mobile validation --- src/layouts/service-location/service-location.spec.js | 2 ++ src/layouts/service-location/service-location.vue | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.spec.js b/src/layouts/service-location/service-location.spec.js index 24030fb1f..8a8b7ae55 100644 --- a/src/layouts/service-location/service-location.spec.js +++ b/src/layouts/service-location/service-location.spec.js @@ -355,6 +355,7 @@ describe("service-location.vue", () => { zipCode: "61606", }, isVehicleProtected: null, + isMobileSelected: false, }; // Act @@ -468,6 +469,7 @@ describe("service-location.vue", () => { zipCode: "43054", }, isVehicleProtected: true, + isMobileSelected: false, }; //wrapper.vm.closeModalAction = jest.fn(); diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 3b37c8406..2690f09d4 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -175,12 +175,12 @@ const MOBILE_FEE_PART_TYPE = "MOBILE FEE"; // DEFINE VALIDATION RULES defineRule("mobile-location-required", (value) => { if ( + value.isMobileSelected && (!value.addressQuestions.streetAddress || !value.addressQuestions.city || !value.addressQuestions.state || !value.addressQuestions.zipCode || - !value.isVehicleProtected) && - value.isMobileSelected + !value.isVehicleProtected) ) { return errorMessages.MOBILE_LOCATION_REQUIRED; } @@ -305,9 +305,15 @@ export default { zipCode: this.zipCode, }, isVehicleProtected: this.isVehicleProtected, + isMobileSelected: + this.selectedAppointmentType === AppointmentTypeStrings.MOBILE && + !this.isMobileLocationOpened, }; }, }, + isMobileLocationOpened() { + return this.$refs.mobileLocationQuestions.isMobileLocationOpened; + }, isServiceableMobile() { if (this.isRecalibrationServiceableMobile !== null) { return ( From 6e146a455226624bfe98a49e60d5aebba5664095 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 16 May 2025 18:35:04 +0530 Subject: [PATCH 2/9] CASH-710 mobile validation fixed --- .../service-location/service-location.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 2690f09d4..5eef66e21 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -306,14 +306,11 @@ export default { }, isVehicleProtected: this.isVehicleProtected, isMobileSelected: - this.selectedAppointmentType === AppointmentTypeStrings.MOBILE && - !this.isMobileLocationOpened, + this.selectedAppointmentType == AppointmentTypeStrings.MOBILE && + !this.getIsMobileLocationOpened(), }; }, }, - isMobileLocationOpened() { - return this.$refs.mobileLocationQuestions.isMobileLocationOpened; - }, isServiceableMobile() { if (this.isRecalibrationServiceableMobile !== null) { return ( @@ -759,11 +756,16 @@ export default { }, displayMobileAddressQuestion(openMobileLocation) { var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions; - var isMobileAddressComplete = mobileLocationQuestionsRef.isMobileAddressComplete; - if (isMobileAddressComplete) { + var isMobileAddressComplete = mobileLocationQuestionsRef?.isMobileAddressComplete; + if (isMobileAddressComplete?.()) { + mobileLocationQuestionsRef.isMobileLocationOpened = false; + } else { mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation; } }, + getIsMobileLocationOpened() { + return this.$refs.mobileLocationQuestions?.isMobileLocationOpened; + }, }, watch: { zipCode: { From 6aaa89c9062b6ec7e53873e5d6eb5c9af615ffaf Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Fri, 16 May 2025 12:26:08 -0400 Subject: [PATCH 3/9] CASH-429 fix current day dot shifting. --- src/digital-components/date-picker/date-picker.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index f14075c16..e0c054071 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -1001,6 +1001,7 @@ export default { min-width: 2.5rem; width: 2.5rem; height: 2.5rem; + border: 2px solid transparent; span { &.small { From b144d147a83826967a641e95e22f0c27f61f12f0 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Mon, 19 May 2025 14:51:20 +0530 Subject: [PATCH 4/9] CASH-712 Defect fixed --- .../mobile-location-modal-questions.vue | 5 +---- src/layouts/service-location/service-location.vue | 10 ++++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 36efad975..bde24ed09 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -236,12 +236,12 @@ export default { }, async setMobileLocation() { this.resetAlerts(); + this.setMobileLocationInvalid(true); // Validate the Zip Code if ( this.internalModel.addressQuestions.zipCode === "" || this.internalModel.addressQuestions.zipCode.length !== 5 ) { - this.setMobileLocationInvalid(true); return; } const zipCodeData = await this.getZipCodeData( @@ -251,11 +251,9 @@ export default { if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true; - this.setMobileLocationInvalid(true); return; } else if (zipCodeData.state != this.internalModel.addressQuestions.state) { this.displayMismatchStateAndZipAlert = true; - this.setMobileLocationInvalid(true); return; } else if ( this.internalModel.addressQuestions.zipCode !== @@ -295,7 +293,6 @@ export default { } // update the page level model this.$emit("setMobileLocation", this.internalModel); - this.setMobileLocationInvalid(false); }, toggleMobileLocation() { this.isMobileLocationOpened = !this.isMobileLocationOpened; diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 5eef66e21..76e42bad9 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -526,6 +526,7 @@ export default { } if (this.isServiceableMobile) { this.setMobileLocation(newValue); + this.setMobileLocationInValid(false); } else { await getZipCodeData(newZipCode).then((zipCodeData) => { this.serviceZipCodeQuestion = { @@ -754,13 +755,13 @@ export default { setMobileLocationInValid(isMobileLocationInValid) { this.isMobileAddressValid = !isMobileLocationInValid; }, - displayMobileAddressQuestion(openMobileLocation) { + displayMobileAddressQuestion() { var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions; var isMobileAddressComplete = mobileLocationQuestionsRef?.isMobileAddressComplete; if (isMobileAddressComplete?.()) { mobileLocationQuestionsRef.isMobileLocationOpened = false; } else { - mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation; + mobileLocationQuestionsRef.isMobileLocationOpened = true; } }, getIsMobileLocationOpened() { @@ -777,10 +778,8 @@ export default { this.selectedProvider = new Provider( this.shopProviderData.mobileProviderNumber ); - this.displayMobileAddressQuestion(true); } else { this.selectedProvider = new Provider(); - this.displayMobileAddressQuestion(false); } }); } @@ -792,10 +791,9 @@ export default { this.selectedProvider = new Provider( this.shopProviderData.mobileProviderNumber ); - this.displayMobileAddressQuestion(true); + this.displayMobileAddressQuestion(); } else { this.selectedProvider = new Provider(); - this.displayMobileAddressQuestion(false); } }, }, From 482591cf2229d96a7a0b8dd5bfb38a40e8ca3466 Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Mon, 19 May 2025 08:58:52 -0400 Subject: [PATCH 5/9] CASH-719 CASH-719 defect fix for coming in from leadgen using other/not sure for vehicleDamage option --- src/layouts/vehicle-damage/vehicle-damage.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 391004a70..3912979ea 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -192,7 +192,12 @@ export default { vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push( damageLocationsSelected.SINGLE ); - return vm.forwardButtonAction(); + if ( + store.getters.externalParameterState.isExternalParameter && + store.getters.externalParameterDamage.damageType !== "other" + ) { + return vm.forwardButtonAction(); + } } baseMixin.methods.ResetExternalParamsAndHideModal(); } From f245bfe6308f96b6ffc1f6b4dd5d9fd929067f91 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 09:44:13 -0400 Subject: [PATCH 6/9] CASH-715 policy vehicle change CASH-715 lineItems empty can happen when a customer goes all the way through scheduling as cash but then switches to insurance AND also switches vehicles during policy lookup. If you call shop-time-slots without parts, you get 500 errors so skip the call. --- src/store/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 753d8509b..4662c02e2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3788,8 +3788,16 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) { // check to see if we have an appointment date on the order object. // if so, make sure it's not in the past. if in the past, clear schedule info in store. // if date not in past, then call schedule service to verify appointment is still available. -async function resetScheduleIfUnavailable(context, order, pageNameToLog) { - if (!order.schedule?.date) { +async function resetScheduleIfUnavailable(context, order, pageNameToLog) { + // lineItems empty can happen when a customer goes all the way through scheduling as cash but then + // switches to insurance AND also switches vehicles during policy lookup. If you call shop-time-slots + // without parts, you get 500 errors so skip the call. + const lineItems = getArrayOfAllLineItemsAndChildParts(order.lineItems); + + if (!order.schedule?.date || lineItems.length === 0) { + console.log(new Date() + " no schedule date or lineItems. skip resetSchedule logic.") + console.log(new Date() + " schedule.schedule.date" + JSON.stringify(order.schedule)); + console.log(new Date() + " lineItems" + JSON.stringify(order.lineItems)); return; } From 6f8718e835caf2602c8c18ff0c375a78148d69cc Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 09:47:06 -0400 Subject: [PATCH 7/9] prettier --- src/store/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 4662c02e2..c7f823c3c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3788,14 +3788,14 @@ function supportingItemsEqual(supportingItemsA, supportingItemsB) { // check to see if we have an appointment date on the order object. // if so, make sure it's not in the past. if in the past, clear schedule info in store. // if date not in past, then call schedule service to verify appointment is still available. -async function resetScheduleIfUnavailable(context, order, pageNameToLog) { +async function resetScheduleIfUnavailable(context, order, pageNameToLog) { // lineItems empty can happen when a customer goes all the way through scheduling as cash but then // switches to insurance AND also switches vehicles during policy lookup. If you call shop-time-slots // without parts, you get 500 errors so skip the call. const lineItems = getArrayOfAllLineItemsAndChildParts(order.lineItems); if (!order.schedule?.date || lineItems.length === 0) { - console.log(new Date() + " no schedule date or lineItems. skip resetSchedule logic.") + console.log(new Date() + " no schedule date or lineItems. skip resetSchedule logic."); console.log(new Date() + " schedule.schedule.date" + JSON.stringify(order.schedule)); console.log(new Date() + " lineItems" + JSON.stringify(order.lineItems)); return; From 473ac2ad6630ef6f74f4f73ea4b23ba824b9e0bc Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 19 May 2025 10:25:43 -0400 Subject: [PATCH 8/9] CASH-715 CASH-715 undefined check --- src/store/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index c7f823c3c..4f360cc18 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3621,25 +3621,25 @@ export function mapTaxedLineItemsToStoreFormat(availableLineItems, storeLineItem export function getArrayOfAllLineItemsAndChildParts(lineItems) { let consolidatedLineItemsArray = []; - if (lineItems.glassParts != null) + if (lineItems?.glassParts != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts), ]; - if (lineItems.supportingItems != null) + if (lineItems?.supportingItems != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.supportingItems), ]; - if (lineItems.vaps != null) + if (lineItems?.vaps != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.vaps), ]; - if (lineItems.promos != null) + if (lineItems?.promos != null) consolidatedLineItemsArray = [ ...consolidatedLineItemsArray, ...getFlattenedArrayOfLineItemsWithChildParts(lineItems.promos), From 393147292dc93f711fb7f70a6b9c3752495f5464 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Mon, 19 May 2025 22:03:44 +0530 Subject: [PATCH 9/9] CASH-712 hide mobile address question for Inshop and drop off --- src/layouts/service-location/service-location.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 76e42bad9..28d3c5d94 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -755,13 +755,13 @@ export default { setMobileLocationInValid(isMobileLocationInValid) { this.isMobileAddressValid = !isMobileLocationInValid; }, - displayMobileAddressQuestion() { + displayMobileAddressQuestion(openMobileLocation) { var mobileLocationQuestionsRef = this.$refs.mobileLocationQuestions; var isMobileAddressComplete = mobileLocationQuestionsRef?.isMobileAddressComplete; if (isMobileAddressComplete?.()) { mobileLocationQuestionsRef.isMobileLocationOpened = false; } else { - mobileLocationQuestionsRef.isMobileLocationOpened = true; + mobileLocationQuestionsRef.isMobileLocationOpened = openMobileLocation; } }, getIsMobileLocationOpened() { @@ -791,9 +791,10 @@ export default { this.selectedProvider = new Provider( this.shopProviderData.mobileProviderNumber ); - this.displayMobileAddressQuestion(); + this.displayMobileAddressQuestion(true); } else { this.selectedProvider = new Provider(); + this.displayMobileAddressQuestion(false); } }, },