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