CSR-1392
move promise reset to after we await all save sessions (submitWOrkOrder)
This commit is contained in:
parent
f6bdd4a272
commit
67fe2e0177
1 changed files with 1 additions and 3 deletions
|
|
@ -303,14 +303,12 @@ export default {
|
|||
async setupPia() {
|
||||
this.$refs.loadingModal.showModal();
|
||||
|
||||
// since we're leaving the site for pia, clear any save session promises that we will not be able to resolve when we return
|
||||
await this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||
|
||||
// if we don't have a work order in delete substatus, set the flag and submit
|
||||
if (!store.getters.order.workOrderNumber) {
|
||||
this.dispatchStoreAction(storeActions.SAVE_PIA_WORK_ORDER, true);
|
||||
await submitWorkOrder({ pageNameToLog: "payment-method" });
|
||||
this.dispatchStoreAction(storeActions.SAVE_PIA_WORK_ORDER, false);
|
||||
this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||
}
|
||||
|
||||
this.$router.navigateWithoutSaving(
|
||||
|
|
|
|||
Loading…
Reference in a new issue