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

View file

@ -328,6 +328,10 @@ export default {
}
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;
// usually true when returning from heritage but can be false when returning from heritage on a save quote