CSR-520 loading modal
This commit is contained in:
parent
e0c067a883
commit
78f965ec4f
1 changed files with 11 additions and 18 deletions
|
|
@ -1,6 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
|
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }">
|
||||||
<div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
|
<div class="container-fluid shadow rounded-3 p-2 position-relative make-tall px-5">
|
||||||
|
<loadingModal :showCloseButton=false :clickOutCloses=false ref="loadingModal">
|
||||||
|
<template v-slot:body>
|
||||||
|
Please wait...
|
||||||
|
</template>
|
||||||
|
<template v-slot:subtext>
|
||||||
|
This process can take up 20 seconds.
|
||||||
|
</template>
|
||||||
|
</loadingModal>
|
||||||
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
<funnelHeader cmsWidgetName="FunnelHeaderWidget" />
|
||||||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
|
<vehicleBanner cmsWidgetName="VehicleBannerWidget" :displayGenericVehicleImage="false" />
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||||
|
|
@ -44,7 +52,6 @@ import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-he
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
|
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
|
||||||
import loadingModal from '@/common-components/loading-modal/loading-modal.vue';
|
import loadingModal from '@/common-components/loading-modal/loading-modal.vue';
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
import {
|
import {
|
||||||
fetchCmsContentForPage
|
fetchCmsContentForPage
|
||||||
|
|
@ -75,7 +82,6 @@ import {
|
||||||
Form,
|
Form,
|
||||||
defineRule,
|
defineRule,
|
||||||
} from "vee-validate";
|
} from "vee-validate";
|
||||||
|
|
||||||
// DEFINE VALIDATION RULES
|
// DEFINE VALIDATION RULES
|
||||||
defineRule(
|
defineRule(
|
||||||
"license-plate-required",
|
"license-plate-required",
|
||||||
|
|
@ -98,7 +104,6 @@ export default {
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
// Call APIs
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage);
|
||||||
|
|
||||||
// Settle promises and get results
|
// Settle promises and get results
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
{
|
{
|
||||||
|
|
@ -218,7 +223,6 @@ export default {
|
||||||
this.isCarIdDifferent = false;
|
this.isCarIdDifferent = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const vinLookup = await this.lookupVin(
|
const vinLookup = await this.lookupVin(
|
||||||
this.licensePlate,
|
this.licensePlate,
|
||||||
zipValidation.data.state
|
zipValidation.data.state
|
||||||
|
|
@ -228,10 +232,8 @@ export default {
|
||||||
this.isCarIdDifferent = false;
|
this.isCarIdDifferent = false;
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.isCarIdDifferent =
|
this.isCarIdDifferent =
|
||||||
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;
|
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.isCarIdDifferent &&
|
this.isCarIdDifferent &&
|
||||||
vinLookup.data.vehicle.carId !== this.previouslyEnteredCarId
|
vinLookup.data.vehicle.carId !== this.previouslyEnteredCarId
|
||||||
|
|
@ -247,13 +249,11 @@ export default {
|
||||||
this.$refs.funnelFooter.removeLoader();
|
this.$refs.funnelFooter.removeLoader();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateCustomerInfo(
|
this.updateCustomerInfo(
|
||||||
vinLookup.data.vin,
|
vinLookup.data.vin,
|
||||||
vinLookup.data.vehicle,
|
vinLookup.data.vehicle,
|
||||||
zipValidation.data.state
|
zipValidation.data.state
|
||||||
);
|
);
|
||||||
|
|
||||||
this.navigateForward();
|
this.navigateForward();
|
||||||
},
|
},
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
|
|
@ -267,6 +267,7 @@ export default {
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.$refs.loadingModal.showModal();
|
||||||
this.$router.navigateAfterSaveToHeritageFunnel(this.$route);
|
this.$router.navigateAfterSaveToHeritageFunnel(this.$route);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -275,15 +276,6 @@ export default {
|
||||||
return baseMixin.methods.dispatchStoreAction(storeActions.VALIDATE_ZIP, {
|
return baseMixin.methods.dispatchStoreAction(storeActions.VALIDATE_ZIP, {
|
||||||
zip,
|
zip,
|
||||||
});
|
});
|
||||||
components: {
|
|
||||||
Form,
|
|
||||||
funnelHeader,
|
|
||||||
vehicleBanner,
|
|
||||||
funnelSubHeader,
|
|
||||||
textboxQuestion,
|
|
||||||
alert,
|
|
||||||
funnelFooter,
|
|
||||||
loadingModal,
|
|
||||||
},
|
},
|
||||||
lookupVin(plate, state) {
|
lookupVin(plate, state) {
|
||||||
return baseMixin.methods.dispatchStoreAction(
|
return baseMixin.methods.dispatchStoreAction(
|
||||||
|
|
@ -337,6 +329,7 @@ export default {
|
||||||
textboxQuestion,
|
textboxQuestion,
|
||||||
alert,
|
alert,
|
||||||
funnelFooter,
|
funnelFooter,
|
||||||
|
loadingModal,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in a new issue