From 0e7d2430ce8065e49b3908a55d9f885e3e6e08fa Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 16 May 2025 12:30:14 +0530 Subject: [PATCH 1/6] CASH-708 validate zip code length --- .../mobile-location-modal-questions.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 fc83f041a..36efad975 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 @@ -237,7 +237,10 @@ export default { async setMobileLocation() { this.resetAlerts(); // Validate the Zip Code - if (this.internalModel.addressQuestions.zipCode === "") { + if ( + this.internalModel.addressQuestions.zipCode === "" || + this.internalModel.addressQuestions.zipCode.length !== 5 + ) { this.setMobileLocationInvalid(true); return; } From 8004028d3f9b8283ce4cae32b997a9b93609e005 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 16 May 2025 13:14:04 +0530 Subject: [PATCH 2/6] CASH-709 removing addressfield focus as we are no longer using inside modal --- src/fmg-components/address-questions/address-questions.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 4e4cf6b56..a9e92ea40 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -452,12 +452,6 @@ export default { this.loadGooglePlacesAutocompleteScript(); } }, - beforeUpdate() { - // It is necessary to set focus on the street address on this lifecycle hook when this component is used in a modal. - if (!this.addressField1.matches(":focus")) { - this.addressField1.focus(); - } - }, unmounted() { this.unloadAutocomplete(); }, From 85bc78dc27f5be4d7af85cb4f9c3f25979c345d5 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 16 May 2025 16:23:26 +0530 Subject: [PATCH 3/6] 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 4/6] 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 5/6] 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 6/6] 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); } }, },