diff --git a/src/layouts/schedule/schedule.spec.js b/src/layouts/schedule/schedule.spec.js index 6ae4a5410..270da75f0 100644 --- a/src/layouts/schedule/schedule.spec.js +++ b/src/layouts/schedule/schedule.spec.js @@ -527,9 +527,6 @@ describe("schedule.vue...", () => { data: [], }; }); - wrapper.vm.selectableDatesData = { - estimatedServiceMinutesMinimum: 30, - }; wrapper.vm.$router.navigateWithSaving = jest.fn(() => { return {}; }); diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 4ac2a816f..1eb80015e 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -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, diff --git a/src/store/index.js b/src/store/index.js index 1ed491bd4..f3b2f87b2 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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; }