CSR-1419: fix issue so matching zips will still save and close

This commit is contained in:
Adam Caouette 2023-05-26 17:05:05 -04:00
parent 2913d8d022
commit c9776cfa60

View file

@ -202,6 +202,7 @@ export default {
this.internalModel = deepClone(this.modelValue); this.internalModel = deepClone(this.modelValue);
}, },
onModalClosed() { onModalClosed() {
this.displayInvalidZipAlert = false;
this.internalModel = deepClone(this.modelValue); this.internalModel = deepClone(this.modelValue);
this.resetValidation(); this.resetValidation();
}, },
@ -236,17 +237,6 @@ export default {
}); });
}, },
async setMobileLocation() { async setMobileLocation() {
// START - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD
let tempTest = false;
let internalModelAddressQuestions = this.internalModel.addressQuestions;
let modelValueAddressQuestions = this.modelValue.addressQuestions;
if (tempTest) {
// THIS WILL NEVER BE TRUE
console.warn(internalModelAddressQuestions);
console.warn(modelValueAddressQuestions);
}
// END - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD
if ( if (
this.internalModel.addressQuestions.zipCode !== this.internalModel.addressQuestions.zipCode !==
this.modelValue.addressQuestions.zipCode this.modelValue.addressQuestions.zipCode
@ -272,22 +262,19 @@ export default {
this.$emit("updated-serviceability", serviceabilityDetails.data); this.$emit("updated-serviceability", serviceabilityDetails.data);
this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase);
// Update the page level model
this.$emit("update:modelValue", this.internalModel);
if (this.onZipUpdateCallback) { if (this.onZipUpdateCallback) {
await this.onZipUpdateCallback(serviceZipCode); await this.onZipUpdateCallback(serviceZipCode);
} }
// Update the page level model
this.$emit("update:modelValue", this.internalModel);
this.closeModal(); this.closeModal();
} }
} else { } else {
// START - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD // Update the page level model
if (tempTest) { this.$emit("update:modelValue", this.internalModel);
// THIS WILL NEVER BE TRUE
console.warn("the zips match and the exception was run"); this.closeModal();
}
// END - TEMP CODE FROM A CAOUETTE 5/25/23 TO BE REMOVED BY EOD
} }
}, },
}, },