Differentiate skipvin vs. declinevin scenarios for back-nav
This commit is contained in:
parent
7b5b58de2d
commit
e5561e0c05
3 changed files with 18 additions and 2 deletions
|
|
@ -157,9 +157,20 @@ export default {
|
|||
// TODO: REASSESS
|
||||
return store.getters.damage.isRepair || store.getters.damage.glassToReplace?.length > 0;
|
||||
},
|
||||
backButtonAction() {
|
||||
async backButtonAction() {
|
||||
const skipVin = await skipVinLookup();
|
||||
// route to move backwards
|
||||
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
if (skipVin) {
|
||||
this.$router.navigateWithoutSaving(
|
||||
this.navigationScenarios.CLICKED_BACK_WITH_SKIP_VIN,
|
||||
this.$route
|
||||
);
|
||||
} else {
|
||||
this.$router.navigateWithoutSaving(
|
||||
this.navigationScenarios.CLICKED_BACK,
|
||||
this.$route
|
||||
);
|
||||
}
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const navigationScenarios = {
|
|||
|
||||
// Vin selection
|
||||
CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN",
|
||||
CLICKED_BACK_WITH_SKIP_VIN: "CLICKED_BACK_WITH_SKIP_VIN",
|
||||
CLICKED_FORWARD_WITH_VIN: "CLICKED_FORWARD_WITH_VIN",
|
||||
CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE:
|
||||
"CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE",
|
||||
|
|
|
|||
|
|
@ -255,6 +255,10 @@ const routingTable = function (store) {
|
|||
maps: [
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK,
|
||||
destinationFmgPageValue: fmgPageValues.ESTIMATE,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK_WITH_SKIP_VIN,
|
||||
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue