conditionally show forward button, navigation updates

This commit is contained in:
Katie Kroell 2024-02-01 14:01:57 -05:00
parent 93e502ada8
commit bb31f47fe8

View file

@ -54,6 +54,7 @@
:value="deductibleBoxValue" /> :value="deductibleBoxValue" />
</div> </div>
<siteFooter <siteFooter
v-if="carrierUrl"
ref="siteFooter" ref="siteFooter"
cmsWidgetName="SiteFooterWidget" cmsWidgetName="SiteFooterWidget"
:isForwardActionDisabled="!meta.valid" :isForwardActionDisabled="!meta.valid"
@ -168,24 +169,21 @@ export default {
return this.mainStore.issConfig.clientName; return this.mainStore.issConfig.clientName;
}, },
carrierUrl() { carrierUrl() {
const url = this.mainStore.issConfig.successReturnURL; return this.mainStore.issConfig.successReturnURL;
console.log(url);
return url;
} }
}, },
mounted() { mounted() {
this.$refs.siteFooter.updateButtonText(`Go back to ${this.carrierName}`); if (this.carrierUrl) {
this.$refs.siteFooter.updateButtonText(`Go back to ${this.carrierName}`);
}
}, },
methods: methods:
{ {
async forwardButtonAction() { async forwardButtonAction() {
window.location.href = this.carrierUrl; this.navigateForward();
}, },
navigateForward() { navigateForward() {
this.$router.navigate( window.location.href = this.carrierUrl;
this.navigationScenarios.CLICKED_FORWARD,
this.$route
);
}, },
getCustomValueFromString(str) { getCustomValueFromString(str) {
switch (str) { switch (str) {