Always set vm.isInsuranceSelected

Some cases were not setting it if external parameter state was marked 0 or 1
This commit is contained in:
Matt Sykes 2026-03-30 14:39:30 -04:00
parent 3fbce61798
commit 2391748d60

View file

@ -583,6 +583,8 @@ export default {
debugLog("--- quote.vue thresholds end ---"); debugLog("--- quote.vue thresholds end ---");
} }
let setInsuranceSelected = true;
if (isExternalParameter === externalParameterStatus.NOT_SET) { if (isExternalParameter === externalParameterStatus.NOT_SET) {
// prettier-ignore // prettier-ignore
{ {
@ -590,12 +592,6 @@ export default {
} }
// there are no active or inactive external parameters; use internal threshold // there are no active or inactive external parameters; use internal threshold
if (internalThreshold) thresholdToUse = internalThreshold; if (internalThreshold) thresholdToUse = internalThreshold;
vm.isInsuranceSelected = getIsInsuranceSelectedValue(
vm.availableLineItems,
thresholdToUse
);
baseMixin.methods.ResetExternalParamsAndHideModal();
} else { } else {
// user came from an external source, however, the externalParms may have been reset on service-zip, property-questions, etc... // user came from an external source, however, the externalParms may have been reset on service-zip, property-questions, etc...
if (getBoolFromString(store.getters.externalParameterQuote?.isInsurance)) { if (getBoolFromString(store.getters.externalParameterQuote?.isInsurance)) {
@ -614,7 +610,9 @@ export default {
await vm.skip(insuranceSelection, servicePackage); await vm.skip(insuranceSelection, servicePackage);
} }
baseMixin.methods.ResetExternalParamsAndHideModal(); if (vm.isInsuranceSelected != null) {
setInsuranceSelected = false;
}
} else { } else {
if (externalThreshold) thresholdToUse = externalThreshold; if (externalThreshold) thresholdToUse = externalThreshold;
@ -622,13 +620,16 @@ export default {
{ {
debugLog("quote.vue tab select NOT EXTERNAL"); debugLog("quote.vue tab select NOT EXTERNAL");
} }
}
//Set isInsuranceSelected if
if (setInsuranceSelected) {
vm.isInsuranceSelected = getIsInsuranceSelectedValue( vm.isInsuranceSelected = getIsInsuranceSelectedValue(
vm.availableLineItems, vm.availableLineItems,
thresholdToUse thresholdToUse
); );
baseMixin.methods.ResetExternalParamsAndHideModal();
} }
baseMixin.methods.ResetExternalParamsAndHideModal();
} }
if (vm.skipToInsurance && !vm.showSaveProgressPopup) { if (vm.skipToInsurance && !vm.showSaveProgressPopup) {