update references to currentDeductible
This commit is contained in:
parent
38254d0b46
commit
6a5e7e5402
4 changed files with 7 additions and 6 deletions
|
|
@ -76,7 +76,7 @@ export function getMobileFeeLineItem(order) {
|
||||||
* @returns {number|undefined|null} current deductible
|
* @returns {number|undefined|null} current deductible
|
||||||
*/
|
*/
|
||||||
export function getDeductible(order) {
|
export function getDeductible(order) {
|
||||||
return order.currentDeductible;
|
return order.damage.isRepair ? order.currentRepairDeductible : order.currentReplaceDeductible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,8 @@ export default {
|
||||||
isPayInAdvanceDisabled() {
|
isPayInAdvanceDisabled() {
|
||||||
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
|
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
|
||||||
const isEnabled = piaExperience === 'true';
|
const isEnabled = piaExperience === 'true';
|
||||||
const isDeductibleTotalEqualToZero = useMainStore().order.currentDeductible === 0;
|
const isDeductibleTotalEqualToZero = useMainStore().order.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0
|
||||||
|
: useMainStore().order.currentReplaceDeductible === 0;
|
||||||
|
|
||||||
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ export default {
|
||||||
return this.mainStore.isVerified;
|
return this.mainStore.isVerified;
|
||||||
},
|
},
|
||||||
currentDeductible() {
|
currentDeductible() {
|
||||||
return this.mainStore.order.currentDeductible;
|
return this.mainStore.order.damage.isRepair ? this.mainStore.order.currentRepairDeductible : this.mainStore.order.currentReplaceDeductible;
|
||||||
},
|
},
|
||||||
deductibleBoxValue() {
|
deductibleBoxValue() {
|
||||||
return this.isVerified
|
return this.isVerified
|
||||||
|
|
|
||||||
|
|
@ -1204,7 +1204,7 @@ export const useMainStore = defineStore({
|
||||||
Model: vehicle.model
|
Model: vehicle.model
|
||||||
},
|
},
|
||||||
Insurance: {
|
Insurance: {
|
||||||
Deductible: this.order.currentDeductible ?? 0,
|
Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
|
||||||
PolicyNumber: policy.policyNumber,
|
PolicyNumber: policy.policyNumber,
|
||||||
CoverageStatus: insuranceCoverage.coverageStatus,
|
CoverageStatus: insuranceCoverage.coverageStatus,
|
||||||
CoverageType: insuranceCoverage.coverageType
|
CoverageType: insuranceCoverage.coverageType
|
||||||
|
|
@ -1454,8 +1454,8 @@ export const useMainStore = defineStore({
|
||||||
},
|
},
|
||||||
policyNumber: policy.policyNumber,
|
policyNumber: policy.policyNumber,
|
||||||
policyZipCode: policy.policyZipCode,
|
policyZipCode: policy.policyZipCode,
|
||||||
originalDeductible: this.order.originalDeductible,
|
originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
|
||||||
currentDeductible: this.order.currentDeductible,
|
currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
|
||||||
OemEndorsement: this.hasOemEndorsement,
|
OemEndorsement: this.hasOemEndorsement,
|
||||||
noCoverage: this.isNoComp,
|
noCoverage: this.isNoComp,
|
||||||
isItac: this.isITAC
|
isItac: this.isITAC
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue