Merge pull request #1858 from Safelite/feature/Digital/CSR-2097

CSR-2097
This commit is contained in:
hiteshkumar87 2024-05-22 19:48:14 +05:30 committed by GitHub
commit c93cd9fe2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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