Merge pull request #1009 from Safelite/defect/CSR-1229

CSR-1229 | Save after pricing repairs, move getSupportingItems to Veh-Damage
This commit is contained in:
scottkiener 2023-03-15 12:01:13 -04:00 committed by GitHub
commit 5384ccfc09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 20 deletions

View file

@ -252,28 +252,9 @@ export default {
} else if (this.$store.getters.order.referralNumber?.length === 6) {
await this.navigateForwardWithSingleCarMatch();
} 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
await saveSession({});
return this.$router.navigateWithoutSaving(
return this.$router.navigateWithSaving(
this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS,
this.$route
);

View file

@ -324,6 +324,17 @@ export default {
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();
},