diff --git a/src/helpers/cms-content-helper.js b/src/helpers/cms-content-helper.js index 4871f28f..0e6dc209 100644 --- a/src/helpers/cms-content-helper.js +++ b/src/helpers/cms-content-helper.js @@ -165,7 +165,7 @@ function mapStringToModal(str) { const params = linkToReplace.substring((dynamicStrings.MODAL_LINK).length + 2, linkToReplace.length - 1); const splitParams = params.split(','); - const bodyText = ''; + const bodyText = ''; let returnVal = str.replace(linkToReplace, bodyText); diff --git a/src/layouts/coverage-statement/coverage-statement.vue b/src/layouts/coverage-statement/coverage-statement.vue index 04d59df8..9368ca9c 100644 --- a/src/layouts/coverage-statement/coverage-statement.vue +++ b/src/layouts/coverage-statement/coverage-statement.vue @@ -115,6 +115,7 @@ import { useMainStore } from '@/store/index.js'; import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin.js'; import globalRules from '@/constants/global-rules.js'; import baseFormMixin from '@/mixins/base-form-mixin.js'; +import navigationScenarios from '@/router/router-constants/navigation-scenarios.js'; const store = useMainStore(); @@ -229,25 +230,19 @@ export default { return damageString === 'match' ? '' : damageString; }, vehicleDeductible() { - if (this.policyLookupSuccessful) { - if (store.order.damage.isRepair) { - const repairDeductible = store.order.policy.deductible.repair; - return repairDeductible; - } - - const replaceDeductible = store.order.policy.deductible.replace; - return replaceDeductible; + if (store.order.damage.isRepair) { + const repairDeductible = store.order.policy.deductible.repair; + return repairDeductible; } - return null; + + const replaceDeductible = store.order.policy.deductible.replace; + return replaceDeductible; }, formattedDeductible() { return this.getDeductibleString(this.vehicleDeductible); }, isDeductibleZero() { - return this.verifiedDeductible && this.vehicleDeductible === 0; - }, - deductibleOverZero() { - return this.verifiedDeductible && !this.isDeductibleZero; + return this.vehicleDeductible === 0; }, policyLookupSuccessful() { return useMainStore().order.policy.policyLookupSuccessful; @@ -255,9 +250,6 @@ export default { registerClaimSuccessful() { return useMainStore().payment.insuranceCoverage.isVerified; }, - policyLookupUnsuccessful() { - return !this.policyLookupSuccessful; - }, verifiedNoComp() { return this.policyLookupSuccessful ? store.order.policy.noCoverage : false; }, @@ -274,17 +266,14 @@ export default { ? this.registerClaimSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible : this.policyLookupSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible; }, + unverified() { + return !this.verifiedDeductible && !this.verifiedITAC && !this.verifiedNoComp; + }, isADAS() { const parts = store.order.lineItems.glassParts; return parts != null && parts.find((part) => part.requiresRecalibration); }, - ADASReplace() { - return !store.order.damage.isRepair && this.isADAS; - }, - nonADASReplace() { - return !store.order.damage.isRepair && !this.isADAS; - }, - nonADASRepair() { + isRepair() { return store.order.damage.isRepair; }, totalServicePrice() { @@ -350,18 +339,18 @@ export default { return this.navigateForward(); }, async navigateForward() { - if (!this.policyLookupSuccessful || this.verifiedDeductible) { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, + if (this.unverified || this.verifiedDeductible) { + this.$router.navigate(navigationScenarios.CLICKED_FORWARD, this.$route); } else if (this.verifiedITAC || this.verifiedNoComp) { if (this.selectedProvider === 'Safelite') { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, + this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, this.$route); } else if (store.issConfig.enableTPAFlow) { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY, + this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_THIRD_PARTY, this.$route); } else { - this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, + this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, this.$route); } } @@ -393,7 +382,7 @@ export default { getCustomValueFromString(str) { switch (str) { case 'coverageUnverified': - return this.policyLookupUnsuccessful; + return this.unverified; case 'verifiedDeductible': return this.verifiedDeductible; case 'verifiedITAC': @@ -401,15 +390,15 @@ export default { case 'verifiedNoComp': return this.verifiedNoComp; case 'ADASReplace': - return this.ADASReplace; + return !this.isRepair && this.isADAS; case 'nonADASReplace': - return this.nonADASReplace; + return !this.isRepair && !this.isADAS; case 'nonADASRepair': - return this.nonADASRepair; + return this.isRepair; case 'deductibleOverZero': - return this.deductibleOverZero; + return this.verifiedDeductible && !this.isDeductibleZero; // TODO what if deductible is negative? case 'isDeductibleZero': - return this.isDeductibleZero; + return this.verifiedDeductible && this.isDeductibleZero; default: return null; } diff --git a/src/styles/common-styles.scss b/src/styles/common-styles.scss index 87aa3db9..b9f8bafe 100644 --- a/src/styles/common-styles.scss +++ b/src/styles/common-styles.scss @@ -68,7 +68,6 @@ body { display: contents !important; color: $blue; cursor: pointer; - text-decoration: underline; border: none; background-color: inherit; padding: 0; @@ -76,5 +75,8 @@ body { font-size: 14px; line-height: 24px; font-weight: 500; + span { + text-decoration: underline; + } } }