Update for service location if there is an error calling pricing
This commit is contained in:
parent
e60ce4d70e
commit
070c3f340c
1 changed files with 16 additions and 1 deletions
|
|
@ -65,6 +65,7 @@ import { Form } from 'vee-validate';
|
|||
import allGlassPartsAndItemsHavePrices from '@/layouts/service-packages/service-package-helper/service-package-helper';
|
||||
import globalRules from '@/constants/global-rules';
|
||||
import servicePackageQuestion from '@/layouts/service-packages/service-package-question/service-package-question.vue';
|
||||
import issPageValues from '@/router/router-constants/issPage-values';
|
||||
|
||||
const store = useMainStore();
|
||||
|
||||
|
|
@ -118,7 +119,21 @@ export default {
|
|||
...clonedGlassParts
|
||||
];
|
||||
|
||||
const pricingResults = await store.getPriceOrderItems(availableLineItems);
|
||||
const pricingResults = await store.getPriceOrderItems(availableLineItems)
|
||||
.catch((err) => {
|
||||
const errorPageData = {
|
||||
errorData: err.data,
|
||||
functionLocation: 'beforeRouteEnter',
|
||||
functionName: 'getPriceOrderItems',
|
||||
functionParameters: {
|
||||
availableLineItems
|
||||
},
|
||||
routeFrom: from,
|
||||
routeTo: to
|
||||
};
|
||||
useMainStore().updatePageData({ page: issPageValues.BAILOUT_PAGE, data: errorPageData });
|
||||
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
|
||||
});
|
||||
|
||||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue