Merge pull request #754 from Safelite/bug/brydon/SSR-1325.2
Submitting referral upon tpa confirmation page
This commit is contained in:
commit
cce07e48d5
2 changed files with 12 additions and 3 deletions
|
|
@ -135,6 +135,7 @@ import {
|
||||||
getLocationAnswer
|
getLocationAnswer
|
||||||
} 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';
|
||||||
|
|
||||||
const VERIFYING_COVERAGE = 'Verifying coverage';
|
const VERIFYING_COVERAGE = 'Verifying coverage';
|
||||||
|
|
||||||
|
|
@ -349,8 +350,16 @@ export default {
|
||||||
onClickEdit: onClick
|
onClickEdit: onClick
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
|
try {
|
||||||
|
await submitWorkOrder({
|
||||||
|
pageNameToLog: 'tpa-submit',
|
||||||
|
submitAfterSave: true
|
||||||
|
});
|
||||||
|
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`error: response from submit work order:${error.message}`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
navigate(scenario) {
|
navigate(scenario) {
|
||||||
this.$router.navigate(scenario, this.$route);
|
this.$router.navigate(scenario, this.$route);
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ router.afterEach(async (to, from) => {
|
||||||
store.clearSaveSessionPromise();
|
store.clearSaveSessionPromise();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (to.query.issPage !== issPageValues.ORDER_CONFIRMATION) {
|
if (to.query.issPage !== issPageValues.TPA_CONFIRMATION && to.query.issPage !== issPageValues.ORDER_CONFIRMATION) {
|
||||||
const saveSessionSynchronous = !!from.params[routerParams.SAVE_SESSION_SYNCHRONOUS];
|
const saveSessionSynchronous = !!from.params[routerParams.SAVE_SESSION_SYNCHRONOUS];
|
||||||
await saveSession({ shouldAwaitSaveSessionQueue: saveSessionSynchronous }).catch((error) => {
|
await saveSession({ shouldAwaitSaveSessionQueue: saveSessionSynchronous }).catch((error) => {
|
||||||
if (from.name === issPageValues.WELCOME_PAGE) {
|
if (from.name === issPageValues.WELCOME_PAGE) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue