CSR-1229 | Repairs save after pricing, move getSupporting to Veh-Damage
This commit is contained in:
parent
1e1204fcfa
commit
45208ccf1f
2 changed files with 12 additions and 20 deletions
|
|
@ -252,28 +252,9 @@ export default {
|
||||||
} else if (this.$store.getters.order.referralNumber?.length === 6) {
|
} else if (this.$store.getters.order.referralNumber?.length === 6) {
|
||||||
await this.navigateForwardWithSingleCarMatch();
|
await this.navigateForwardWithSingleCarMatch();
|
||||||
} else if (this.isRepair) {
|
} else if (this.isRepair) {
|
||||||
const supportingItemsPromise = await this.dispatchStoreAction(
|
|
||||||
storeActions.GET_SUPPORTING_ITEMS
|
|
||||||
);
|
|
||||||
|
|
||||||
const promiseResultMap = [
|
|
||||||
{
|
|
||||||
resultKey: "supportingItems",
|
|
||||||
promise: supportingItemsPromise,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
|
||||||
|
|
||||||
this.dispatchStoreAction(
|
|
||||||
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
|
||||||
resultMap.supportingItems,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
// call saveSession here - navigateWithSaving saves too late in the flow
|
// call saveSession here - navigateWithSaving saves too late in the flow
|
||||||
await saveSession({});
|
await saveSession({});
|
||||||
return this.$router.navigateWithoutSaving(
|
return this.$router.navigateWithSaving(
|
||||||
this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS,
|
this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS,
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,17 @@ export default {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (this.isWindshieldRepair) {
|
||||||
|
const supportingItems = await this.dispatchStoreAction(
|
||||||
|
storeActions.GET_SUPPORTING_ITEMS
|
||||||
|
);
|
||||||
|
this.dispatchStoreAction(
|
||||||
|
this.storeActions.SAVE_SUPPORTING_ITEMS,
|
||||||
|
supportingItems.data,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return this.navigateForward();
|
return this.navigateForward();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue