Add logging to resetScheduleIfUnavailable
This commit is contained in:
parent
99896cad89
commit
fee2d441a1
1 changed files with 14 additions and 8 deletions
|
|
@ -1654,7 +1654,7 @@ export const actions = {
|
||||||
response.data
|
response.data
|
||||||
);
|
);
|
||||||
|
|
||||||
await resetScheduleIfUnavailable(context, response.data.order);
|
await resetScheduleIfUnavailable(context, response.data.order, pageNameToLog);
|
||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
|
|
@ -2309,7 +2309,7 @@ function providersEqual(providerA, providerB) {
|
||||||
// check to see if we have an appointment date on the order object.
|
// check to see if we have an appointment date on the order object.
|
||||||
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
// if so, make sure it's not in the past. if in the past, clear schedule info in store.
|
||||||
// if date not in past, then call schedule service to verify appointment is still available.
|
// if date not in past, then call schedule service to verify appointment is still available.
|
||||||
async function resetScheduleIfUnavailable(context, order) {
|
async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
|
||||||
if (!order.schedule?.date) {
|
if (!order.schedule?.date) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2348,8 +2348,11 @@ async function resetScheduleIfUnavailable(context, order) {
|
||||||
newTimeSlotsResponse = await context.dispatch(
|
newTimeSlotsResponse = await context.dispatch(
|
||||||
storeActions.GET_MOBILE_TIME_SLOTS,
|
storeActions.GET_MOBILE_TIME_SLOTS,
|
||||||
{
|
{
|
||||||
startDate: order.schedule.date,
|
payload: {
|
||||||
endDate: endDate,
|
startDate: order.schedule.date,
|
||||||
|
endDate: endDate,
|
||||||
|
},
|
||||||
|
pageNameToLog: pageNameToLog,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
@ -2391,10 +2394,13 @@ async function resetScheduleIfUnavailable(context, order) {
|
||||||
newTimeSlotsResponse = await context.dispatch(
|
newTimeSlotsResponse = await context.dispatch(
|
||||||
storeActions.GET_SHOP_TIME_SLOTS,
|
storeActions.GET_SHOP_TIME_SLOTS,
|
||||||
{
|
{
|
||||||
startDate: order.schedule.date,
|
payload: {
|
||||||
endDate: endDate,
|
startDate: order.schedule.date,
|
||||||
shopAppointmentType: order.serviceLocation.appointmentType,
|
endDate: endDate,
|
||||||
providerNumber: order.serviceLocation.provider.providerNumber,
|
shopAppointmentType: order.serviceLocation.appointmentType,
|
||||||
|
providerNumber: order.serviceLocation.provider.providerNumber,
|
||||||
|
},
|
||||||
|
pageNameToLog: pageNameToLog,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue