Partial fixing formatting

This commit is contained in:
brydon1 2023-07-27 16:29:41 -04:00
parent 9b92cfacec
commit 215c289b27
3 changed files with 27 additions and 36 deletions

View file

@ -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 = '<button modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window">' + splitParams[1] + '</button>';
const bodyText = '<button modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window"><span>' + splitParams[1] + '</span></button>';
let returnVal = str.replace(linkToReplace, bodyText);

View file

@ -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;
}

View file

@ -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;
}
}
}