From 3028ca78837528e460c149cf4c00342c2fca5604 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 18 Nov 2024 14:59:52 -0500 Subject: [PATCH] CSR-2370: add new getter var to use in CMS for payment-method subheader logic --- src/layouts/confirmation/confirmation.vue | 4 +++- src/store/index.js | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index a42e724f0..190d47769 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -344,7 +344,9 @@ export default { } if (this.AppointmentType == AppointmentTypeStrings.DROP_OFF) { if ( - this.submittedOrder?.schedule?.routeCode.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF) + this.submittedOrder?.schedule?.routeCode.includes( + RouteCodeFlags.OVERNIGHT_DROP_OFF + ) ) { return `Drop off before 5:30 PM`; } else { diff --git a/src/store/index.js b/src/store/index.js index ca10f8f62..a5d1f4e68 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -939,7 +939,7 @@ export const getters = { .reduce((r, c) => Object.assign(r, c), {}) ?? {}, isVerifiedAndDeductibleZeroConfirmed: (state) => { - // used as a CMS variable on /payment-method, needed for FunnelSubHeaderWidget on cart pages + // used in CMS on /payment-method in Header Sub Text, for FunnelSubHeaderWidget on cart pages if ( state.order.policy.currentDeductible === 0 && getters.coverageIsVerified(state) && @@ -949,6 +949,14 @@ export const getters = { } return false; }, + isItacOrNoComp: (state) => { + // used in CMS on /payment-method in Header Sub Text, for FunnelSubHeaderWidget on cart pages + if (state.order.policy.isNoComp || state.order.policy.isItac) { + return true; + } else { + return false; + } + }, requiresVerifiedRedirecting: (state) => { return state.order?.referralNumber?.length === 6; },