fix deductible references
This commit is contained in:
parent
b73f4b2a05
commit
d613f4f2b6
3 changed files with 8 additions and 9 deletions
|
|
@ -250,7 +250,7 @@ export default {
|
|||
return this.getTextFromCmsWithCustomIfStatements(
|
||||
this.widget.explanatoryText,
|
||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
|
||||
)?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.order.currentReplaceDeductible));
|
||||
)?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.currentDeductible));
|
||||
},
|
||||
nextStepsHeader() {
|
||||
return this.getTextFromCmsWithCustomIfStatements(
|
||||
|
|
|
|||
|
|
@ -153,8 +153,7 @@ export default {
|
|||
isPayInAdvanceDisabled() {
|
||||
const piaExperience = this.getSettingValue(experimentSettings.ISS_DISPLAY_PAY_IN_ADVANCE);
|
||||
const isEnabled = piaExperience === 'true';
|
||||
const isDeductibleTotalEqualToZero = useMainStore().order.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0
|
||||
: useMainStore().order.currentReplaceDeductible === 0;
|
||||
const isDeductibleTotalEqualToZero = useMainStore().currentDeductible === 0;
|
||||
|
||||
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ export const useMainStore = defineStore({
|
|||
.filter((x) => !!x.isActive)
|
||||
.map((x) => x.settings)
|
||||
.reduce((r, c) => Object.assign(r, c), {}) ?? {},
|
||||
originalDeductible: (state) => (state.order.damage.isRepair ? state.originalDeductible.repair : state.originalDeductible.replace),
|
||||
currentDeductible: (state) => (state.order.damage.isRepair ? state.currentDeductible.repair : state.currentDeductible.replace)
|
||||
originalDeductible: (state) => (state.order.damage.isRepair ? state.order.originalDeductible.repair : state.order.originalDeductible.replace),
|
||||
currentDeductible: (state) => (state.order.damage.isRepair ? state.order.currentDeductible.repair : state.order.currentDeductible.replace)
|
||||
},
|
||||
actions:
|
||||
{
|
||||
|
|
@ -663,7 +663,7 @@ export const useMainStore = defineStore({
|
|||
safelitePolicy: {
|
||||
policies: []
|
||||
},
|
||||
actualDeductible: this.order.damage.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
|
||||
actualDeductible: this.currentDeductible ?? ''
|
||||
},
|
||||
lossInfo: {
|
||||
dateOfLoss: this.order.policy.dateOfLoss,
|
||||
|
|
@ -1207,7 +1207,7 @@ export const useMainStore = defineStore({
|
|||
Model: vehicle.model
|
||||
},
|
||||
Insurance: {
|
||||
Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
|
||||
Deductible: this.currentDeductible ?? 0,
|
||||
PolicyNumber: policy.policyNumber,
|
||||
CoverageStatus: insuranceCoverage.coverageStatus,
|
||||
CoverageType: insuranceCoverage.coverageType
|
||||
|
|
@ -2056,8 +2056,8 @@ export const useMainStore = defineStore({
|
|||
this.order.settledTenderAmount = null;
|
||||
this.order.lockToken = null;
|
||||
this.order.eon = null;
|
||||
this.order.originalDeductible = null;
|
||||
this.order.currentDeductible = null;
|
||||
this.order.originalDeductible = { repair: null, replace: null };
|
||||
this.order.currentDeductible = { repair: null, replace: null };
|
||||
this.order.loadedFromDupeCheck = null;
|
||||
this.order.loadedSessionClearedPreviousData = null;
|
||||
this.order.availableVaps = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue