Bailing out when store not found
This commit is contained in:
parent
cce07e48d5
commit
ee147e7e9e
3 changed files with 19 additions and 0 deletions
|
|
@ -312,6 +312,11 @@ export default {
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
useMainStore().setBailout(bailoutMessage.saveSessionError(error.data));
|
||||||
|
this.navigate(
|
||||||
|
this.navigationScenarios.SAVE_SESSION_FAILED,
|
||||||
|
{ query: { issPage: this.issPageValues.PAYMENT_METHOD } }
|
||||||
|
);
|
||||||
console.error(`error: response from submit work order:${error.message}`);
|
console.error(`error: response from submit work order:${error.message}`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ import {
|
||||||
} from '@/helpers/damage-review-content-generator.js';
|
} from '@/helpers/damage-review-content-generator.js';
|
||||||
import damageLocationsSelected from '@/constants/damage-locations-selected.js';
|
import damageLocationsSelected from '@/constants/damage-locations-selected.js';
|
||||||
import { submitWorkOrder } from '@/helpers/order-helper.js';
|
import { submitWorkOrder } from '@/helpers/order-helper.js';
|
||||||
|
import bailoutMessage from '@/constants/bailoutMessage';
|
||||||
|
|
||||||
const VERIFYING_COVERAGE = 'Verifying coverage';
|
const VERIFYING_COVERAGE = 'Verifying coverage';
|
||||||
|
|
||||||
|
|
@ -358,6 +359,11 @@ export default {
|
||||||
});
|
});
|
||||||
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
|
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
useMainStore().setBailout(bailoutMessage.saveSessionError(error.data));
|
||||||
|
this.navigate(
|
||||||
|
this.navigationScenarios.SAVE_SESSION_FAILED,
|
||||||
|
{ query: { issPage: this.issPageValues.TPA_SUBMIT } }
|
||||||
|
);
|
||||||
console.error(`error: response from submit work order:${error.message}`);
|
console.error(`error: response from submit work order:${error.message}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -637,6 +637,10 @@ const routingTable = () => [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_PAY_NOW,
|
scenario: navigationScenarios.CLICKED_PAY_NOW,
|
||||||
destinationIssPageValue: issPageValues.PAYMENT_PAGE
|
destinationIssPageValue: issPageValues.PAYMENT_PAGE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.SAVE_SESSION_FAILED,
|
||||||
|
destinationIssPageValue: issPageValues.BAILOUT_PAGE
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -709,6 +713,10 @@ const routingTable = () => [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||||
destinationIssPageValue: issPageValues.TPA_CONFIRMATION
|
destinationIssPageValue: issPageValues.TPA_CONFIRMATION
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.SAVE_SESSION_FAILED,
|
||||||
|
destinationIssPageValue: issPageValues.BAILOUT_PAGE
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue