CASH-201 | Add "Pay on my own" link

Add the link to insurance-company
Make cash auto selected on quote when this link is used
This commit is contained in:
Scott Kiener 2025-02-11 09:10:00 -05:00
parent 7cc202ac92
commit 80caabf5ef
2 changed files with 19 additions and 1 deletions

View file

@ -16,6 +16,13 @@
v-model="parentAccountNumber" v-model="parentAccountNumber"
:originalList="originalList" /> :originalList="originalList" />
</div> </div>
<textLink
id="payOnMyOwnBackButton"
useLoadingModal
linkType="text"
:text="payWithCashButtonCopy"
href="javascript:void(0)"
@click-event="backButtonAction(foreceCashSelectionOnQuote = true)" />
<navbar <navbar
cmsWidgetName="FunnelFooterWidget" cmsWidgetName="FunnelFooterWidget"
@ -36,6 +43,7 @@ import navbar from "@/fmg-components/nav-bar/nav-bar";
import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header"; import funnelSubHeader from "@/fmg-components/funnel-sub-header/funnel-sub-header";
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue"; import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
import insuranceCompanyQuestion from "@/layouts/insurance-company/insurance-company-question"; import insuranceCompanyQuestion from "@/layouts/insurance-company/insurance-company-question";
import textLink from "../../ux-components/text-link/text-link.vue";
// Supporting files // Supporting files
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
@ -92,6 +100,9 @@ export default {
isParentAccountNumber() { isParentAccountNumber() {
return !!this.parentAccountNumber; return !!this.parentAccountNumber;
}, },
payWithCashButtonCopy() {
return "Pay on my own";
}
}, },
methods: { methods: {
isCashParentAccountNumber() { isCashParentAccountNumber() {
@ -109,8 +120,10 @@ export default {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
return store.getters.order.payment.isInsurance === true; return store.getters.order.payment.isInsurance === true;
}, },
backButtonAction() { backButtonAction(forceCashSelectionOnQuote) {
// Go back to Quote page // Go back to Quote page
if (forceCashSelectionOnQuote)
this.$route.params['forceCashSelection'] = true;
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route); this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
}, },
async forwardButtonAction() { async forwardButtonAction() {
@ -157,6 +170,7 @@ export default {
Form, Form,
loadingModal, loadingModal,
insuranceCompanyQuestion, insuranceCompanyQuestion,
textLink,
}, },
}; };
</script> </script>

View file

@ -328,6 +328,10 @@ export default {
} }
const getIsInsuranceSelectedValue = (availableLineItems, insuranceThreshold) => { const getIsInsuranceSelectedValue = (availableLineItems, insuranceThreshold) => {
// routeParam checked here is set on insurance-selection "Pay on my own" link click
if (from.params.forceCashSelection) {
return false;
}
const serviceLocationState = store.getters.order.serviceLocation.state; const serviceLocationState = store.getters.order.serviceLocation.state;
// usually true when returning from heritage but can be false when returning from heritage on a save quote // usually true when returning from heritage but can be false when returning from heritage on a save quote