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(
|
return this.getTextFromCmsWithCustomIfStatements(
|
||||||
this.widget.explanatoryText,
|
this.widget.explanatoryText,
|
||||||
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
|
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
|
||||||
)?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.order.currentReplaceDeductible));
|
)?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.currentDeductible));
|
||||||
},
|
},
|
||||||
nextStepsHeader() {
|
nextStepsHeader() {
|
||||||
return this.getTextFromCmsWithCustomIfStatements(
|
return this.getTextFromCmsWithCustomIfStatements(
|
||||||
|
|
|
||||||
|
|
@ -153,8 +153,7 @@ 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.damage.isRepair ? useMainStore().order.currentRepairDeductible === 0
|
const isDeductibleTotalEqualToZero = useMainStore().currentDeductible === 0;
|
||||||
: useMainStore().order.currentReplaceDeductible === 0;
|
|
||||||
|
|
||||||
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -448,8 +448,8 @@ export const useMainStore = defineStore({
|
||||||
.filter((x) => !!x.isActive)
|
.filter((x) => !!x.isActive)
|
||||||
.map((x) => x.settings)
|
.map((x) => x.settings)
|
||||||
.reduce((r, c) => Object.assign(r, c), {}) ?? {},
|
.reduce((r, c) => Object.assign(r, c), {}) ?? {},
|
||||||
originalDeductible: (state) => (state.order.damage.isRepair ? state.originalDeductible.repair : state.originalDeductible.replace),
|
originalDeductible: (state) => (state.order.damage.isRepair ? state.order.originalDeductible.repair : state.order.originalDeductible.replace),
|
||||||
currentDeductible: (state) => (state.order.damage.isRepair ? state.currentDeductible.repair : state.currentDeductible.replace)
|
currentDeductible: (state) => (state.order.damage.isRepair ? state.order.currentDeductible.repair : state.order.currentDeductible.replace)
|
||||||
},
|
},
|
||||||
actions:
|
actions:
|
||||||
{
|
{
|
||||||
|
|
@ -663,7 +663,7 @@ export const useMainStore = defineStore({
|
||||||
safelitePolicy: {
|
safelitePolicy: {
|
||||||
policies: []
|
policies: []
|
||||||
},
|
},
|
||||||
actualDeductible: this.order.damage.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
|
actualDeductible: this.currentDeductible ?? ''
|
||||||
},
|
},
|
||||||
lossInfo: {
|
lossInfo: {
|
||||||
dateOfLoss: this.order.policy.dateOfLoss,
|
dateOfLoss: this.order.policy.dateOfLoss,
|
||||||
|
|
@ -1207,7 +1207,7 @@ export const useMainStore = defineStore({
|
||||||
Model: vehicle.model
|
Model: vehicle.model
|
||||||
},
|
},
|
||||||
Insurance: {
|
Insurance: {
|
||||||
Deductible: this.order.damage.isRepair ? this.order.currentRepairDeductible : this.order.currentReplaceDeductible ?? 0,
|
Deductible: this.currentDeductible ?? 0,
|
||||||
PolicyNumber: policy.policyNumber,
|
PolicyNumber: policy.policyNumber,
|
||||||
CoverageStatus: insuranceCoverage.coverageStatus,
|
CoverageStatus: insuranceCoverage.coverageStatus,
|
||||||
CoverageType: insuranceCoverage.coverageType
|
CoverageType: insuranceCoverage.coverageType
|
||||||
|
|
@ -2056,8 +2056,8 @@ export const useMainStore = defineStore({
|
||||||
this.order.settledTenderAmount = null;
|
this.order.settledTenderAmount = null;
|
||||||
this.order.lockToken = null;
|
this.order.lockToken = null;
|
||||||
this.order.eon = null;
|
this.order.eon = null;
|
||||||
this.order.originalDeductible = null;
|
this.order.originalDeductible = { repair: null, replace: null };
|
||||||
this.order.currentDeductible = null;
|
this.order.currentDeductible = { repair: null, replace: null };
|
||||||
this.order.loadedFromDupeCheck = null;
|
this.order.loadedFromDupeCheck = null;
|
||||||
this.order.loadedSessionClearedPreviousData = null;
|
this.order.loadedSessionClearedPreviousData = null;
|
||||||
this.order.availableVaps = null;
|
this.order.availableVaps = null;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue