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
|
||||
*/
|
||||
export function getDeductible(order) {
|
||||
return order.currentDeductible;
|
||||
return order.damage.isRepair ? order.currentRepairDeductible : order.currentReplaceDeductible;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -153,7 +153,8 @@ export default {
|
|||
isPayInAdvanceDisabled() {
|
||||
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
|
||||
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);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ export default {
|
|||
return this.mainStore.isVerified;
|
||||
},
|
||||
currentDeductible() {
|
||||
return this.mainStore.order.currentDeductible;
|
||||
return this.mainStore.order.damage.isRepair ? this.mainStore.order.currentRepairDeductible : this.mainStore.order.currentReplaceDeductible;
|
||||
},
|
||||
deductibleBoxValue() {
|
||||
return this.isVerified
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,7 @@ export const useMainStore = defineStore({
|
|||
Model: vehicle.model
|
||||
},
|
||||
Insurance: {
|
||||
Deductible: this.order.currentDeductible ?? 0,
|
||||
Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
|
||||
PolicyNumber: policy.policyNumber,
|
||||
CoverageStatus: insuranceCoverage.coverageStatus,
|
||||
CoverageType: insuranceCoverage.coverageType
|
||||
|
|
@ -1454,8 +1454,8 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
policyNumber: policy.policyNumber,
|
||||
policyZipCode: policy.policyZipCode,
|
||||
originalDeductible: this.order.originalDeductible,
|
||||
currentDeductible: this.order.currentDeductible,
|
||||
originalDeductible: this.isRepair ? this.order.originalRepairDeductible : this.order.originalReplaceDeductible,
|
||||
currentDeductible: this.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible,
|
||||
OemEndorsement: this.hasOemEndorsement,
|
||||
noCoverage: this.isNoComp,
|
||||
isItac: this.isITAC
|
||||
|
|
|
|||
Loading…
Reference in a new issue