Incorporating isClaimRegistrationRequired logic into verifiedDeductible
This commit is contained in:
parent
76d909908e
commit
36a8b706f0
6 changed files with 41 additions and 63 deletions
|
|
@ -165,7 +165,7 @@ function mapStringToModal(str) {
|
||||||
const params = linkToReplace.substring((dynamicStrings.MODAL_LINK).length + 2, linkToReplace.length - 1);
|
const params = linkToReplace.substring((dynamicStrings.MODAL_LINK).length + 2, linkToReplace.length - 1);
|
||||||
const splitParams = params.split(',');
|
const splitParams = params.split(',');
|
||||||
|
|
||||||
const bodyText = '<a modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window">' + splitParams[1] + '</a>';
|
const bodyText = '<button modalTarget="' + splitParams[0] + '" class="modal-text" aria-label="Modal window">' + splitParams[1] + '</button>';
|
||||||
|
|
||||||
let returnVal = str.replace(linkToReplace, bodyText);
|
let returnVal = str.replace(linkToReplace, bodyText);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,37 +20,6 @@
|
||||||
<span class="dot-2">.</span>
|
<span class="dot-2">.</span>
|
||||||
<span class="dot-3">.</span>
|
<span class="dot-3">.</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- <p>
|
|
||||||
Finding shops near you
|
|
||||||
<span class="dot-1">.</span>
|
|
||||||
<span class="dot-2">.</span>
|
|
||||||
<span class="dot-3">.</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Looking for dates
|
|
||||||
<span class="dot-1">.</span>
|
|
||||||
<span class="dot-2">.</span>
|
|
||||||
<span class="dot-3">.</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Searching for times
|
|
||||||
<span class="dot-1">.</span>
|
|
||||||
<span class="dot-2">.</span>
|
|
||||||
<span class="dot-3">.</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Nearly there
|
|
||||||
<span class="dot-1">.</span>
|
|
||||||
<span class="dot-2">.</span>
|
|
||||||
<span class="dot-3">.</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Finishing up
|
|
||||||
<span class="dot-1">.</span>
|
|
||||||
<span class="dot-2">.</span>
|
|
||||||
<span class="dot-3">.</span>
|
|
||||||
</p> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -169,11 +169,10 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isVerified: store.order.payment.insuranceCoverage.isVerified,
|
|
||||||
availableLineItems: [],
|
availableLineItems: [],
|
||||||
selectedProvider: '',
|
selectedProvider: '',
|
||||||
deductibleText: 'Your deductible is:',
|
deductibleText: 'Your deductible is:',
|
||||||
isLoading: true,
|
// TODO update when design team gives appropriate text
|
||||||
loadingText: [
|
loadingText: [
|
||||||
'Connecting to your insurance company',
|
'Connecting to your insurance company',
|
||||||
'Nearly there',
|
'Nearly there',
|
||||||
|
|
@ -230,7 +229,7 @@ export default {
|
||||||
return damageString === 'match' ? '' : damageString;
|
return damageString === 'match' ? '' : damageString;
|
||||||
},
|
},
|
||||||
vehicleDeductible() {
|
vehicleDeductible() {
|
||||||
if (this.coverageVerified) {
|
if (this.policyLookupSuccessful) {
|
||||||
if (store.order.damage.isRepair) {
|
if (store.order.damage.isRepair) {
|
||||||
const repairDeductible = store.order.policy.deductible.repair;
|
const repairDeductible = store.order.policy.deductible.repair;
|
||||||
return repairDeductible;
|
return repairDeductible;
|
||||||
|
|
@ -250,38 +249,40 @@ export default {
|
||||||
deductibleOverZero() {
|
deductibleOverZero() {
|
||||||
return this.verifiedDeductible && !this.isDeductibleZero;
|
return this.verifiedDeductible && !this.isDeductibleZero;
|
||||||
},
|
},
|
||||||
coverageVerified() {
|
policyLookupSuccessful() {
|
||||||
return useMainStore().order.policy.policyLookupSuccessful;
|
return useMainStore().order.policy.policyLookupSuccessful;
|
||||||
},
|
},
|
||||||
coverageUnverified() {
|
registerClaimSuccessful() {
|
||||||
return !this.coverageVerified;
|
return useMainStore().payment.insuranceCoverage.isVerified;
|
||||||
|
},
|
||||||
|
policyLookupUnsuccessful() {
|
||||||
|
return !this.policyLookupSuccessful;
|
||||||
},
|
},
|
||||||
verifiedNoComp() {
|
verifiedNoComp() {
|
||||||
return this.coverageVerified ? store.order.policy.noCoverage : false;
|
return this.policyLookupSuccessful ? store.order.policy.noCoverage : false;
|
||||||
},
|
},
|
||||||
verifiedITAC() {
|
verifiedITAC() {
|
||||||
return this.coverageVerified
|
return this.policyLookupSuccessful
|
||||||
&& !this.verifiedNoComp
|
&& !this.verifiedNoComp
|
||||||
&& this.vehicleDeductible > this.totalServicePrice;
|
&& this.vehicleDeductible > this.totalServicePrice;
|
||||||
},
|
},
|
||||||
|
coveredAndServicePriceAboveOrEqualDeductible() {
|
||||||
|
return !this.verifiedNoComp && this.totalServicePrice >= this.vehicleDeductible;
|
||||||
|
},
|
||||||
verifiedDeductible() {
|
verifiedDeductible() {
|
||||||
return this.coverageVerified
|
return this.isClaimRegistrationRequired
|
||||||
&& !this.verifiedNoComp
|
? this.registerClaimSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible
|
||||||
&& this.totalServicePrice > this.vehicleDeductible;
|
: this.policyLookupSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible;
|
||||||
|
},
|
||||||
|
isADAS() {
|
||||||
|
const parts = store.order.lineItems.glassParts;
|
||||||
|
return parts != null && parts.find((part) => part.requiresRecalibration);
|
||||||
},
|
},
|
||||||
ADASReplace() {
|
ADASReplace() {
|
||||||
if (!store.order.damage.isRepair) {
|
return !store.order.damage.isRepair && this.isADAS;
|
||||||
const parts = store.order.lineItems.glassParts;
|
|
||||||
|
|
||||||
if (parts != null && parts.filter((part) =>
|
|
||||||
part.requiresRecalibration).length > 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
nonADASReplace() {
|
nonADASReplace() {
|
||||||
return !this.ADASReplace;
|
return !store.order.damage.isRepair && !this.isADAS;
|
||||||
},
|
},
|
||||||
nonADASRepair() {
|
nonADASRepair() {
|
||||||
return store.order.damage.isRepair;
|
return store.order.damage.isRepair;
|
||||||
|
|
@ -324,12 +325,15 @@ export default {
|
||||||
this.$refs.loadingModal.showModal();
|
this.$refs.loadingModal.showModal();
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
const vm = this;
|
const vm = this;
|
||||||
if (useMainStore().policy.coverageVerified
|
if (this.policyLookupSuccessful
|
||||||
&& useMainStore().isClaimRegistrationRequired
|
&& useMainStore().isClaimRegistrationRequired
|
||||||
&& !useMainStore().policy.noCoverage) {
|
&& this.coveredAndServicePriceAboveOrEqualDeductible) {
|
||||||
useMainStore().registerClaim().then((r) => {
|
useMainStore().registerClaim().then((r) => {
|
||||||
vm.$refs.loadingModal.hideModal();
|
vm.$refs.loadingModal.hideModal();
|
||||||
return r;
|
return r;
|
||||||
|
}, (r) => {
|
||||||
|
vm.$refs.loadingModal.hideModal();
|
||||||
|
return r;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
vm.$refs.loadingModal.hideModal();
|
vm.$refs.loadingModal.hideModal();
|
||||||
|
|
@ -346,7 +350,7 @@ export default {
|
||||||
return this.navigateForward();
|
return this.navigateForward();
|
||||||
},
|
},
|
||||||
async navigateForward() {
|
async navigateForward() {
|
||||||
if (!this.coverageVerified || this.verifiedDeductible) {
|
if (!this.policyLookupSuccessful || this.verifiedDeductible) {
|
||||||
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD,
|
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD,
|
||||||
this.$route);
|
this.$route);
|
||||||
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
} else if (this.verifiedITAC || this.verifiedNoComp) {
|
||||||
|
|
@ -389,7 +393,7 @@ export default {
|
||||||
getCustomValueFromString(str) {
|
getCustomValueFromString(str) {
|
||||||
switch (str) {
|
switch (str) {
|
||||||
case 'coverageUnverified':
|
case 'coverageUnverified':
|
||||||
return this.coverageUnverified;
|
return this.policyLookupUnsuccessful;
|
||||||
case 'verifiedDeductible':
|
case 'verifiedDeductible':
|
||||||
return this.verifiedDeductible;
|
return this.verifiedDeductible;
|
||||||
case 'verifiedITAC':
|
case 'verifiedITAC':
|
||||||
|
|
|
||||||
|
|
@ -205,12 +205,6 @@ export default {
|
||||||
color: $black;
|
color: $black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-link a{
|
|
||||||
color: $blue-700;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 24px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
.question-text {
|
.question-text {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ $limu-button-color: #A9E3E9;
|
||||||
color: $limu-link !important;
|
color: $limu-link !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-text {
|
||||||
|
color: $limu-link !important;
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
&.btn-override[aria-disabled="false"]{
|
&.btn-override[aria-disabled="false"]{
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
|
|
|
||||||
|
|
@ -69,5 +69,12 @@ body {
|
||||||
color: $blue;
|
color: $blue;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
border: none;
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 0;
|
||||||
|
text-underline-offset: 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 24px;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue