Merge pull request #1826 from Safelite/feature/CSR-2044

CSR-2044
This commit is contained in:
AMSNEHA 2024-04-16 19:49:44 +05:30 committed by GitHub
commit 094a25e9d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 9 deletions

View file

@ -527,9 +527,6 @@ describe("schedule.vue...", () => {
data: [],
};
});
wrapper.vm.selectableDatesData = {
estimatedServiceMinutesMinimum: 30,
};
wrapper.vm.$router.navigateWithSaving = jest.fn(() => {
return {};
});

View file

@ -427,11 +427,6 @@ export default {
forwardButtonAction() {
this.updateSupportingItems();
//update jobMin minutes if it's null because when switching from cash to insurance dynamo returns null for jobMin
if (this.selectedTimeSlotInfo.timeSlot.jobMinMinutes == null) {
this.selectedTimeSlotInfo.timeSlot.jobMinMinutes =
this.selectableDatesData.estimatedServiceMinutesMinimum.toString();
}
this.dispatchStoreAction(
this.storeActions.SAVE_SCHEDULE,
this.selectedTimeSlotInfo.timeSlot,

View file

@ -3068,7 +3068,8 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
});
});
if (!routeCodeFound) {
//reset schedule if jobMin is null because when switching from cash to insurance dynamo returns null for jobMin
if (!routeCodeFound || order.schedule.jobMinMinutes == null) {
context.commit(storeMutations.RESET_SCHEDULE);
return;
}