Merge pull request #1048 from Safelite/feature/humphries/INSR-7758.1
INSR-7758: Add need help link and hide continue until questions answered
This commit is contained in:
commit
242157ae28
4 changed files with 35 additions and 5 deletions
|
|
@ -33,9 +33,17 @@
|
|||
ref="siteFooter"
|
||||
class="mt-5"
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
:isForwardActionDisabled="!isMetaValid"
|
||||
:isForwardButtonHidden="!isMetaValid"
|
||||
@backClicked="handleBackButtonAction"
|
||||
@ForwardClicked="handleForwardButtonAction" />
|
||||
<div class="need-help-link-container">
|
||||
<textLink
|
||||
v-if="needHelpLinkText"
|
||||
linkType="navigation"
|
||||
:text="needHelpLinkText"
|
||||
href="#"
|
||||
@clickEvent="handleNeedHelpClick" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -48,6 +56,8 @@ import alert from '@/ux-components/alert/alert.vue';
|
|||
import questionChain from '@/digital-components/question-chain/question-chain.vue';
|
||||
import siteSubHeader from '@/iss-components/site-sub-header/site-sub-header.vue';
|
||||
import siteFooter from '@/iss-components/site-footer/site-footer.vue';
|
||||
import textLink from '@/ux-components/text-link/text-link.vue';
|
||||
import widgetFields from '@/constants/cms-widget-fields';
|
||||
|
||||
export default {
|
||||
name: 'questions-page',
|
||||
|
|
@ -56,7 +66,8 @@ export default {
|
|||
alert,
|
||||
questionChain,
|
||||
siteSubHeader,
|
||||
siteFooter
|
||||
siteFooter,
|
||||
textLink
|
||||
},
|
||||
props: {
|
||||
isMetaValid: Boolean,
|
||||
|
|
@ -68,7 +79,7 @@ export default {
|
|||
loadingText: Array,
|
||||
index: Number
|
||||
},
|
||||
emits: ['update:modelValue', 'forwardButtonAction', 'back-click'],
|
||||
emits: ['update:modelValue', 'forwardButtonAction', 'back-click', 'need-help-click'],
|
||||
computed: {
|
||||
selectedAnswers: {
|
||||
get() {
|
||||
|
|
@ -77,6 +88,9 @@ export default {
|
|||
set(newValue) {
|
||||
this.$emit('update:modelValue', newValue);
|
||||
}
|
||||
},
|
||||
needHelpLinkText() {
|
||||
return this.getCmsContent('NeedHelpLinkWidget', widgetFields.TEXT_BLOCK_WIDGET.TEXT);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -98,6 +112,9 @@ export default {
|
|||
},
|
||||
handleBackButtonAction() {
|
||||
this.$emit('back-click');
|
||||
},
|
||||
handleNeedHelpClick() {
|
||||
this.$emit('need-help-click');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -122,4 +139,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.need-help-link-container {
|
||||
margin-bottom: 2.25rem;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
:validationRules="rules.optionRequired"
|
||||
:index="currentGlassIndex"
|
||||
@forwardButtonAction="forwardButtonAction"
|
||||
@backClick="navigateBackByVehicleQuestions" />
|
||||
@backClick="navigateBackByVehicleQuestions"
|
||||
@needHelpClick="requestCallbackBailout" />
|
||||
</Form>
|
||||
</template>
|
||||
|
||||
|
|
@ -145,6 +146,10 @@ export default {
|
|||
// TODO KO delete for quote mvp
|
||||
this.navigateForward(glassPartsForStore, null);
|
||||
},
|
||||
requestCallbackBailout() {
|
||||
this.mainStore.setBailout(bailoutMessage.RequestCallback());
|
||||
this.$router.navigate(navigationScenarios.CLICKED_NEED_HELP_WITH_BAILOUT, this.$route);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -105,7 +105,8 @@ const navigationScenarios = Object.freeze({
|
|||
PAY_IN_ADVANCE_SUCCESS: 'PAY_IN_ADVANCE_SUCCESS',
|
||||
|
||||
// Bailout
|
||||
CLICKED_FORWARD_WITH_BAILOUT: 'CLICKED_FORWARD_WITH_BAILOUT'
|
||||
CLICKED_FORWARD_WITH_BAILOUT: 'CLICKED_FORWARD_WITH_BAILOUT',
|
||||
CLICKED_NEED_HELP_WITH_BAILOUT: 'CLICKED_NEED_HELP_WITH_BAILOUT',
|
||||
});
|
||||
|
||||
export default navigationScenarios;
|
||||
|
|
|
|||
|
|
@ -191,6 +191,10 @@ const routingTable = () => [
|
|||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS,
|
||||
destinationIssPageValue: issPageValues.COVERAGE_STATEMENT
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_NEED_HELP_WITH_BAILOUT,
|
||||
destinationIssPageValue: issPageValues.BAILOUT_PAGE
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue