Add jobMinMinutes to store and use on review page

This commit is contained in:
Chloe Herd 2023-07-27 13:56:58 -04:00
parent 8bbbdf909a
commit a4785fa1c5
4 changed files with 10 additions and 1 deletions

View file

@ -75,7 +75,7 @@ export default {
}, },
renderedEstimatedDuration() { renderedEstimatedDuration() {
return getDisplayTextForDurationLength( return getDisplayTextForDurationLength(
this.schedule?.jobMaxMinutes, this.schedule?.jobMinMinutes,
this.schedule?.jobMaxMinutes this.schedule?.jobMaxMinutes
); );
}, },

View file

@ -463,6 +463,7 @@ export default {
startTime: null, startTime: null,
endTime: null, endTime: null,
jobMaxMinutes: null, jobMaxMinutes: null,
jobMinMinutes: null,
}; };
} }
}, },

View file

@ -92,6 +92,7 @@ export default {
startTime: null, startTime: null,
endTime: null, endTime: null,
jobMaxMinutes: null, jobMaxMinutes: null,
jobMinMinutes: null,
}), }),
}, },
cmsWidgetName: String, cmsWidgetName: String,
@ -449,6 +450,7 @@ export default {
startTime: timeSlot.startTime, startTime: timeSlot.startTime,
endTime: timeSlot.endTime, endTime: timeSlot.endTime,
jobMaxMinutes: this.estimatedServiceMinutesMaximum.toString(), jobMaxMinutes: this.estimatedServiceMinutesMaximum.toString(),
jobMinMinutes: this.estimatedServiceMinutesMinimum.toString(),
}; };
} }
@ -458,6 +460,7 @@ export default {
endTime: null, endTime: null,
routeCode: null, routeCode: null,
jobMaxMinutes: null, jobMaxMinutes: null,
jobMinMinutes: null,
}; };
}, },
}, },

View file

@ -91,6 +91,7 @@ const getDefaultState = () => {
endTime: null, endTime: null,
routeCode: null, routeCode: null,
jobMaxMinutes: null, jobMaxMinutes: null,
jobMinMinutes: null,
}, },
referralNumber: null, referralNumber: null,
referralDate: null, referralDate: null,
@ -279,6 +280,7 @@ export const mutations = {
state.order.schedule.endTime = scheduleInfo.endTime; state.order.schedule.endTime = scheduleInfo.endTime;
state.order.schedule.routeCode = scheduleInfo.routeCode; state.order.schedule.routeCode = scheduleInfo.routeCode;
state.order.schedule.jobMaxMinutes = scheduleInfo.jobMaxMinutes; state.order.schedule.jobMaxMinutes = scheduleInfo.jobMaxMinutes;
state.order.schedule.jobMinMinutes = scheduleInfo.jobMinMinutes;
} }
}, },
updateCustomerDetails(state, detailsInfo) { updateCustomerDetails(state, detailsInfo) {
@ -365,6 +367,7 @@ export const mutations = {
state.order.schedule.endTime = null; state.order.schedule.endTime = null;
state.order.schedule.routeCode = null; state.order.schedule.routeCode = null;
state.order.schedule.jobMaxMinutes = null; state.order.schedule.jobMaxMinutes = null;
state.order.schedule.jobMinMinutes = null;
//premium appointment fee used on schedule page also needs reset when schedule is reset //premium appointment fee used on schedule page also needs reset when schedule is reset
const supportingItems = state.order.lineItems.supportingItems; const supportingItems = state.order.lineItems.supportingItems;
@ -506,6 +509,7 @@ export const mutations = {
state.order.schedule.endTime = sessionInformation.order.schedule?.endTime; state.order.schedule.endTime = sessionInformation.order.schedule?.endTime;
state.order.schedule.routeCode = sessionInformation.order.schedule?.routeCode; state.order.schedule.routeCode = sessionInformation.order.schedule?.routeCode;
state.order.schedule.jobMaxMinutes = sessionInformation.order.schedule?.jobMaxMinutes; state.order.schedule.jobMaxMinutes = sessionInformation.order.schedule?.jobMaxMinutes;
state.order.schedule.jobMinMinutes = sessionInformation.order.schedule?.jobMinMinutes;
}, },
updateExperiments(state, experiments) { updateExperiments(state, experiments) {
state.applicationUser.experiments = experiments; state.applicationUser.experiments = experiments;
@ -1464,6 +1468,7 @@ export const actions = {
endTime: order.schedule?.endTime, endTime: order.schedule?.endTime,
routeCode: order.schedule?.routeCode, routeCode: order.schedule?.routeCode,
jobMaxMinutes: order.schedule?.jobMaxMinutes, jobMaxMinutes: order.schedule?.jobMaxMinutes,
jobMinMinutes: order.schedule?.jobMinMinutes,
}, },
existingPromoCode: null, existingPromoCode: null,
referralCorrelationId: order.referralCorrelationId, referralCorrelationId: order.referralCorrelationId,