Implement first round of resetting logic per ticket
This commit is contained in:
parent
f71d0a53a3
commit
635d79c357
1 changed files with 28 additions and 0 deletions
|
|
@ -1779,6 +1779,8 @@ export const actions = {
|
|||
if (!deepEqual(supportingItems, context.state.order.lineItems.supportingItems)) {
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_APPOINTMENT_TYPE);
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER);
|
||||
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
||||
|
|
@ -1857,12 +1859,36 @@ export const actions = {
|
|||
context.commit(storeMutations.RESET_SERVICE_LOCATION_APPOINTMENT_TYPE);
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER);
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS);
|
||||
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceZipCodeInfo);
|
||||
},
|
||||
|
||||
saveServiceLocation(context, serviceLocationInfo) {
|
||||
if (context.state.order.serviceLocationInfo) {
|
||||
if (serviceLocationInfo.zipCode !== context.state.order.serviceLocationInfo.zipCode) {
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
|
||||
if (
|
||||
!deepEqual(
|
||||
serviceLocationInfo.provider,
|
||||
context.state.order.serviceLocationInfo.provider
|
||||
)
|
||||
) {
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
|
||||
if (
|
||||
serviceLocationInfo.appointmentType !==
|
||||
context.state.order.serviceLocationInfo.appointmentType
|
||||
) {
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceLocationInfo);
|
||||
},
|
||||
|
||||
|
|
@ -1887,6 +1913,8 @@ export const actions = {
|
|||
if (!deepEqual(parts, context.state.order.lineItems.glassParts)) {
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_APPOINTMENT_TYPE);
|
||||
context.commit(storeMutations.RESET_SERVICE_LOCATION_PROVIDER);
|
||||
|
||||
context.commit(storeMutations.RESET_SCHEDULE);
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, parts);
|
||||
|
|
|
|||
Loading…
Reference in a new issue