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( 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));
}, },
nextStepsHeader() { nextStepsHeader() {
return this.getTextFromCmsWithCustomIfStatements( return this.getTextFromCmsWithCustomIfStatements(
@ -532,6 +532,8 @@ export default {
return isRepair && this.isDeductibleVisible; return isRepair && this.isDeductibleVisible;
case 'verifiedRepairZeroDeductible': // case 'verifiedRepairZeroDeductible': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0; return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0;
case 'verifiedRepairZeroDeductibleReplaceDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue <= 0 && this.mainStore.order.currentReplaceDeductible > 0;
case 'verifiedRepairDeductibleOverZero': // case 'verifiedRepairDeductibleOverZero': //
return isRepair && this.isDeductibleVisible && this.deductibleValue > 0; return isRepair && this.isDeductibleVisible && this.deductibleValue > 0;
case 'verifiedReplaceDeductible': // case 'verifiedReplaceDeductible': //

View file

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