Merge branch 'release/2025.05.22' into CASH-429-fix-calendar-spacing

This commit is contained in:
bmauger 2025-05-14 09:07:34 -04:00 committed by GitHub
commit 0f1234c823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 16 deletions

View file

@ -225,6 +225,15 @@ export default {
return index;
},
async handleUpdate(selectedShopIndex = null) {
this.resetAnswers();
if (selectedShopIndex >= 3) {
await this.getNextShopsFromList(selectedShopIndex + 1);
} else {
await this.getNextShopsFromList();
await nextTick();
}
},
},
watch: {
selectedAppointmentType: {
@ -233,27 +242,16 @@ export default {
// nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes
// up the component initialization on page load.
async handler() {
await nextTick();
this.resetAnswers();
this.getNextShopsFromList();
this.handleUpdate();
},
},
shopProviders: {
async handler(newValue) {
this.resetAnswers();
await nextTick();
const selectedShopIndex = this.getSelectedProviderIndex(
newValue,
this.selectedProviderNumber
);
if (selectedShopIndex >= 3) {
await this.getNextShopsFromList(selectedShopIndex + 1);
} else {
await this.getNextShopsFromList();
await nextTick();
}
this.handleUpdate(selectedShopIndex);
},
},
},

View file

@ -645,6 +645,9 @@ describe("vehicle-damage.vue", () => {
isRepair: null,
numberOfChips: null,
},
externalParameterState: {
isExternalParameter: false,
},
};
var windshieldSelections = wrapper.vm.getWindshieldOptionsFromStore();

View file

@ -149,6 +149,13 @@ export default {
if (store.getters.externalParameterState?.isExternalParameter) {
await nextTick();
const isValid = await baseMixin.methods.isFormValid(vm.$refs.theForm);
if (
store.getters.vehicle?.vehicleSubType === "MOTOR HOME" &&
store.getters.externalParameterDamage.damageType?.toUpperCase() ===
"WINDSHIELDREPLACE"
) {
return baseMixin.methods.ResetExternalParamsAndHideModal();
}
if (isValid) {
vm.forwardButtonAction();
} else {
@ -177,6 +184,26 @@ export default {
false
);
}
const selectedGlassToReplace =
resultMap.damageOptions.windshieldOptions.availableReplacementOptions;
if (selectedGlassToReplace == damageLocationsSelected.SINGLE) {
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
damageLocationsSelected.SINGLE
);
return vm.forwardButtonAction();
} else if (
selectedGlassToReplace ==
`${damageLocationsSelected.DRIVER},${damageLocationsSelected.PASSENGER}`
) {
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
damageLocationsSelected.DRIVER
);
vm.selectedWindshieldOptions.selectedWindshieldReplaceOptions.push(
damageLocationsSelected.PASSENGER
);
}
baseMixin.methods.ResetExternalParamsAndHideModal();
}
} else {
@ -320,9 +347,11 @@ export default {
) {
windShieldOptions.selectedWindshieldDamageType =
damageLocationsSelected.REPLACE;
windShieldOptions.selectedWindshieldReplaceOptions.push(
damageLocationsSelected.SINGLE
);
if (!store.getters.externalParameterState.isExternalParameter) {
windShieldOptions.selectedWindshieldReplaceOptions.push(
damageLocationsSelected.SINGLE
);
}
}
if (

View file

@ -532,6 +532,9 @@ export default {
if (!closestShops || closestShops.data?.providers?.length === 0) {
this.displayNoServiceAlert = true;
if (store.getters.externalParameterState?.isExternalParameter) {
return baseMixin.methods.ResetExternalParamsAndHideModal();
}
return this.$refs.navbar.removeLoader();
}
}