Merge pull request #1360 from Safelite/feature/CSR-1665
Add logging to resetScheduleIfUnavailable
This commit is contained in:
commit
36c95dd826
1 changed files with 14 additions and 8 deletions
|
|
@ -1654,7 +1654,7 @@ export const actions = {
|
|||
response.data
|
||||
);
|
||||
|
||||
await resetScheduleIfUnavailable(context, response.data.order);
|
||||
await resetScheduleIfUnavailable(context, response.data.order, pageNameToLog);
|
||||
return response;
|
||||
},
|
||||
(error) => {
|
||||
|
|
@ -2309,7 +2309,7 @@ function providersEqual(providerA, providerB) {
|
|||
// 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 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) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -2348,8 +2348,11 @@ async function resetScheduleIfUnavailable(context, order) {
|
|||
newTimeSlotsResponse = await context.dispatch(
|
||||
storeActions.GET_MOBILE_TIME_SLOTS,
|
||||
{
|
||||
startDate: order.schedule.date,
|
||||
endDate: endDate,
|
||||
payload: {
|
||||
startDate: order.schedule.date,
|
||||
endDate: endDate,
|
||||
},
|
||||
pageNameToLog: pageNameToLog,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -2391,10 +2394,13 @@ async function resetScheduleIfUnavailable(context, order) {
|
|||
newTimeSlotsResponse = await context.dispatch(
|
||||
storeActions.GET_SHOP_TIME_SLOTS,
|
||||
{
|
||||
startDate: order.schedule.date,
|
||||
endDate: endDate,
|
||||
shopAppointmentType: order.serviceLocation.appointmentType,
|
||||
providerNumber: order.serviceLocation.provider.providerNumber,
|
||||
payload: {
|
||||
startDate: order.schedule.date,
|
||||
endDate: endDate,
|
||||
shopAppointmentType: order.serviceLocation.appointmentType,
|
||||
providerNumber: order.serviceLocation.provider.providerNumber,
|
||||
},
|
||||
pageNameToLog: pageNameToLog,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue