Merge pull request #621 from Safelite/feature/digital/SSR-1143
fixing back navigation bug
This commit is contained in:
commit
2fa6a00721
4 changed files with 18 additions and 4 deletions
|
|
@ -87,7 +87,7 @@
|
|||
class="mt-5"
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid || displayNoShopsAlert"
|
||||
@backClicked="navigateBack"
|
||||
@backClicked="navigateBack(this, navigateBackScenario)"
|
||||
@forwardClicked="forwardButtonAction" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -327,6 +327,12 @@ export default {
|
|||
},
|
||||
displayServiceableMobileOnly() {
|
||||
return this.isServiceableMobile && !this.isServiceableInshop;
|
||||
},
|
||||
navigateBackScenario() {
|
||||
const { isNoComp, isITAC } = useMainStore();
|
||||
return isNoComp || isITAC
|
||||
? this.navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW
|
||||
: this.navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -28,10 +28,10 @@ export default {
|
|||
const footerInfoBox = document.querySelector('.footer#infoBox');
|
||||
return footerInfoBox ? footerInfoBox.offsetHeight : 0;
|
||||
},
|
||||
navigateBack(vm) {
|
||||
navigateBack(vm, scenario = this.navigationScenarios.CLICKED_BACK) {
|
||||
const self = vm ?? this;
|
||||
|
||||
self.$router.navigateWithSpinner(this.navigationScenarios.CLICKED_BACK, self.$route);
|
||||
self.$router.navigateWithSpinner(scenario, self.$route);
|
||||
},
|
||||
savePageDataToStore(page, data) {
|
||||
useMainStore().updatePageData({ page, data });
|
||||
|
|
|
|||
|
|
@ -80,6 +80,10 @@ const navigationScenarios = Object.freeze({
|
|||
EDIT_PREFERRED_SHOP: 'EDIT_PREFERRED_SHOP',
|
||||
EDIT_CONTACT_DETAILS: 'EDIT_CONTACT_DETAILS',
|
||||
|
||||
// Service location
|
||||
CLICKED_BACK_CANNOT_REACH_TPA_FLOW: 'CLICKED_BACK_CANNOT_REACH_TPA_FLOW',
|
||||
CLICKED_BACK_CAN_REACH_TPA_FLOW: 'CLICKED_BACK_CAN_REACH_TPA_FLOW',
|
||||
|
||||
// Provider Preference
|
||||
CLICKED_FORWARD_WITH_SAFELITE: 'CLICKED_FORWARD_WITH_SAFELITE',
|
||||
CLICKED_FORWARD_WITH_TPA_ENABLED: 'CLICKED_FORWARD_WITH_TPA_ENABLED',
|
||||
|
|
|
|||
|
|
@ -559,7 +559,11 @@ const routingTable = () => [
|
|||
issPageValue: issPageValues.SERVICE_LOCATION,
|
||||
maps: [
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK,
|
||||
scenario: navigationScenarios.CLICKED_BACK_CANNOT_REACH_TPA_FLOW,
|
||||
destinationIssPageValue: issPageValues.COVERAGE_STATEMENT
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK_CAN_REACH_TPA_FLOW,
|
||||
destinationIssPageValue: issPageValues.PROVIDER_PREFERENCE
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue