moved from mounted.

This commit is contained in:
Bill Richardson 2023-09-20 12:44:07 -04:00
parent cfed9d3816
commit be56b7f209

View file

@ -182,6 +182,8 @@ export default {
vm.setSupportingItems(resultMap.supportingItems); vm.setSupportingItems(resultMap.supportingItems);
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
vm.availableLineItems = pricingResults; vm.availableLineItems = pricingResults;
vm.$refs.loadingModal.showModal();
vm.initializeComponent(availableLineItems);
}); });
}, },
setup() { setup() {
@ -330,26 +332,26 @@ export default {
} }
}, },
nextStepsBody(newValue, oldValue) { nextStepsBody(newValue, oldValue) {
if (newValue !== oldValue){ if (newValue !== oldValue) {
setupModalLink(this, "RecalModal"); setupModalLink(this, 'RecalModal');
} }
} }
}, },
async mounted() { mounted() {
this.$refs.loadingModal.showModal();
setupModalLinks(this); setupModalLinks(this);
const vm = this;
if (this.policyLookupSuccessful
&& useMainStore().isClaimRegistrationRequired
&& this.coveredAndServicePriceAboveOrEqualDeductible) {
await useMainStore().registerClaim()?.catch(() => {});
}
vm.$refs.loadingModal.hideModal();
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
return !!useMainStore().vehicle.vin; return !!useMainStore().vehicle.vin;
}, },
async initializeComponent() {
if (this.policyLookupSuccessful
&& useMainStore().isClaimRegistrationRequired
&& this.coveredAndServicePriceAboveOrEqualDeductible) {
await useMainStore().registerClaim()?.catch(() => {});
}
this.$refs.loadingModal.hideModal();
},
async forwardButtonAction() { async forwardButtonAction() {
return this.navigateForward(); return this.navigateForward();
}, },