get deductibles, nocomp and isInsurance from submitted order
This commit is contained in:
hiteshkumar87 2024-05-22 19:08:23 +05:30
parent f406e36e59
commit cc4fb63a6e

View file

@ -509,17 +509,25 @@ export default {
this.$route
);
},
hasSubmittedOrder() {
return this.$store.getters.hasSubmittedOrder;
},
},
computed: {
damageInfo() {
return this.$store.getters.damage;
},
isInsurance() {
return this.$store.getters.payment.isInsurance;
return this.hasSubmittedOrder()
? this.$store.getters.submittedOrder.payment.isInsurance
: this.$store.getters.payment.isInsurance;
},
isNoComp() {
return this.$store.getters.policy.isNoComp;
return this.hasSubmittedOrder()
? this.$store.getters.submittedOrder.policy.isNoComp
: this.$store.getters.policy.isNoComp;
},
hasVapsInCart() {
if (this.lineItems?.vaps?.length > 0) {
return true;
@ -531,11 +539,15 @@ export default {
if (this.isNoComp) {
return coverageStatus.NOCOMP;
} else {
return this.$store.getters.payment.insuranceCoverage.coverageStatus;
return this.hasSubmittedOrder()
? this.$store.getters.submittedOrder.payment.insuranceCoverage.coverageStatus
: this.$store.getters.payment.insuranceCoverage.coverageStatus;
}
},
currentDeductible() {
return this.$store.getters.policy.currentDeductible;
return this.hasSubmittedOrder()
? this.$store.getters.submittedOrder.policy.currentDeductible
: this.$store.getters.policy.currentDeductible;
},
insuranceCompanyName() {
return this.$store.getters.policy.insuranceCompanyName;