deductible updates WIP

This commit is contained in:
Katie Kroell 2026-01-28 13:35:23 -05:00
parent c148de71a6
commit 49b930cecb
2 changed files with 7 additions and 5 deletions

View file

@ -301,7 +301,7 @@ export default {
return this.getTextFromCmsWithCustomIfStatements(
this.widget.explanatoryText,
widgetFields.CONTENT_GROUP_WIDGET.BODY_TEXT_2
);
)?.replaceAll('{custom:currentReplaceDeductible}', formatAmountInDollars(this.mainStore.order.currentReplaceDeductible));
},
nextStepsHeader() {
return this.getTextFromCmsWithCustomIfStatements(
@ -532,6 +532,8 @@ export default {
return isRepair && this.isDeductibleVisible;
case 'verifiedRepairZeroDeductible': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
case 'verifiedRepairDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
case 'verifiedReplaceDeductible': //

View file

@ -659,7 +659,7 @@ export const useMainStore = defineStore({
safelitePolicy: {
policies: []
},
actualDeductible: this.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
actualDeductible: this.order.damage.isRepair ? this.order.currentRepairDeductible?.toString() ?? '' : this.order.currentReplaceDeductible?.toString() ?? ''
},
lossInfo: {
dateOfLoss: this.order.policy.dateOfLoss,
@ -2328,10 +2328,10 @@ export const useMainStore = defineStore({
this.order.serviceLocation.IsSafeliteProvider = isSafelite;
},
updateDeductible(deductibleInfo) {
if (!this.order.damage.isRepair) {
this.order.currentReplaceDeductible = deductibleInfo.deductible;
} else {
if (this.order.damage.isRepair) {
this.order.currentRepairDeductible = deductibleInfo.deductible;
} else {
this.order.currentReplaceDeductible = deductibleInfo.deductible;
}
},
savePartQuestionAnswers(partQuestionAnswersArray) {