Merge pull request #760 from Safelite/bug/brydon/SSR-1364

Bug/brydon/ssr 1364
This commit is contained in:
michaela-brydon-safelite 2024-06-20 10:38:10 -04:00 committed by GitHub
commit cbbee5a21e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 32 additions and 8 deletions

View file

@ -303,14 +303,21 @@ export default {
await submitWorkOrder({
pageNameToLog: 'payment-method',
submitAfterSave: true
}).then(() => {
useMainStore().resetSubmittedOrder();
this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
}).catch((submitError) => {
useMainStore().setBailout(bailoutMessage.saveSessionError(submitError.data));
this.$router.navigate(
this.navigationScenarios.SAVE_SESSION_FAILED,
this.$route,
{ query: { issPage: issPageValues.PAYMENT_METHOD } }
);
});
useMainStore().resetSubmittedOrder();
this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
} catch (error) {
console.error(`error: response from submit work order:${error.message}`);
}

View file

@ -136,6 +136,7 @@ import {
} from '@/helpers/damage-review-content-generator.js';
import damageLocationsSelected from '@/constants/damage-locations-selected.js';
import { submitWorkOrder } from '@/helpers/order-helper.js';
import bailoutMessage from '@/constants/bailoutMessage';
const VERIFYING_COVERAGE = 'Verifying coverage';
@ -355,8 +356,16 @@ export default {
await submitWorkOrder({
pageNameToLog: 'tpa-submit',
submitAfterSave: true
}).then(() => {
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
}).catch((submitError) => {
useMainStore().setBailout(bailoutMessage.saveSessionError(submitError.data));
this.navigate(
this.navigationScenarios.SAVE_SESSION_FAILED,
this.$route,
{ query: { issPage: this.issPageValues.TPA_SUBMIT } }
);
});
this.navigate(this.navigationScenarios.CLICKED_FORWARD);
} catch (error) {
console.error(`error: response from submit work order:${error.message}`);
}

View file

@ -641,6 +641,10 @@ const routingTable = () => [
{
scenario: navigationScenarios.CLICKED_PAY_NOW,
destinationIssPageValue: issPageValues.PAYMENT_PAGE
},
{
scenario: navigationScenarios.SAVE_SESSION_FAILED,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
}
]
},
@ -713,6 +717,10 @@ const routingTable = () => [
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.TPA_CONFIRMATION
},
{
scenario: navigationScenarios.SAVE_SESSION_FAILED,
destinationIssPageValue: issPageValues.BAILOUT_PAGE
}
]
},