back button navigation from coverage-statement
This commit is contained in:
parent
0470771b4b
commit
94db0bf63b
3 changed files with 18 additions and 2 deletions
|
|
@ -33,7 +33,7 @@
|
|||
<siteFooter
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@backClicked="navigateBack"
|
||||
@backClicked="backButtonAction"
|
||||
@forwardClicked="forwardButtonAction"
|
||||
ref="siteFooter"
|
||||
/>
|
||||
|
|
@ -140,6 +140,15 @@ export default {
|
|||
return false;
|
||||
},
|
||||
|
||||
backButtonAction() {
|
||||
if (useMainStore().order.damage.isRepair) {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_REPAIR, this.$route);
|
||||
}
|
||||
else {
|
||||
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
}
|
||||
},
|
||||
|
||||
async forwardButtonAction() {
|
||||
return this.navigateForward();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ const navigationScenarios = {
|
|||
CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS: "CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS",
|
||||
CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS: "CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS",
|
||||
|
||||
// Coverage Statement
|
||||
CLICKED_BACK_WITH_REPAIR: "CLICKED_BACK_WITH_REPAIR",
|
||||
|
||||
//Provider Preference
|
||||
CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE",
|
||||
CLICKED_FORWARD_WITH_TPA_ENABLED: "CLICKED_FORWARD_WITH_TPA_ENABLED",
|
||||
|
|
|
|||
|
|
@ -474,10 +474,14 @@ const routingTable = function(store) {
|
|||
scenario: navigationScenarios.CLICKED_BACK_WITH_CAPABILITY_QUESTIONS,
|
||||
destinationIssPageValue: issPageValues.CAPABILITY_QUESTIONS
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK_WITH_REPAIR,
|
||||
destinationIssPageValue: issPageValues.VEHICLE_DAMAGE
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue