Update vin-lookup page.
This commit is contained in:
parent
94d8f165fc
commit
2ffc311f22
3 changed files with 67 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
|
import { storeMutations } from "@/constants/store-mutations";
|
||||||
import baseMixin from "@/mixins/base-mixin";
|
import baseMixin from "@/mixins/base-mixin";
|
||||||
import { Form, defineRule } from "vee-validate";
|
import { Form, defineRule } from "vee-validate";
|
||||||
import { required } from "@/helpers/validation-rules";
|
import { required } from "@/helpers/validation-rules";
|
||||||
|
|
@ -86,6 +87,22 @@ export default {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
resetDependentState() {
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_ADDRESS, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_CITY, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_STATE, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_ZIP_CODE, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_FIRST_NAME, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_LAST_NAME, null);
|
||||||
|
store.commit(storeMutations.UPDATE_REGISTRATION_LICENSE_PLATE, null);
|
||||||
|
},
|
||||||
|
backButtonAction() {
|
||||||
|
// route to move backwards
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.CLICKED_BACK,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
funnelHeader,
|
funnelHeader,
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,19 @@ const routingTable = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
fmgPageValue: fmgPageValues.VIN_LOOKUP,
|
||||||
|
maps: [
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
|
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
scenario: navigationScenarios.VIN_LOOKUP,
|
||||||
|
destinationFmgPageValue: fmgPageValues.PART_QUESTIONS,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export { routingTable };
|
export { routingTable };
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,15 @@ export const state = {
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
imageVifNumber: null,
|
imageVifNumber: null,
|
||||||
imageColor: null,
|
imageColor: null,
|
||||||
|
registration: {
|
||||||
|
licensePlate: null,
|
||||||
|
address: null,
|
||||||
|
city: null,
|
||||||
|
state: null,
|
||||||
|
zipCode: null,
|
||||||
|
firstName: null,
|
||||||
|
lastName: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
damage: {
|
damage: {
|
||||||
isRepair: null,
|
isRepair: null,
|
||||||
|
|
@ -81,6 +90,33 @@ export const mutations = {
|
||||||
updatePageData(state, pageData){
|
updatePageData(state, pageData){
|
||||||
state.applicationUser.pageData[pageData.page] = pageData.data;
|
state.applicationUser.pageData[pageData.page] = pageData.data;
|
||||||
},
|
},
|
||||||
|
updateRegistrationAddress(state, registrationAddress){
|
||||||
|
state.order.vehicle.registration.address = registrationAddress;
|
||||||
|
},
|
||||||
|
updateRegistrationCity(state, registrationCity){
|
||||||
|
state.order.vehicle.registration.city = registrationCity;
|
||||||
|
},
|
||||||
|
updateRegistrationState(state, registrationState){
|
||||||
|
state.order.vehicle.registration.state = registrationState;
|
||||||
|
},
|
||||||
|
updateRegistrationZipCode(state, registrationZipCode){
|
||||||
|
state.order.vehicle.registration.zipCode = registrationZipCode;
|
||||||
|
},
|
||||||
|
updateRegistrationFirstName(state, registrationFirstName){
|
||||||
|
state.order.vehicle.registration.firstName = registrationFirstName;
|
||||||
|
},
|
||||||
|
updateRegistrationLastName(state, registrationLastName){
|
||||||
|
state.order.vehicle.registration.lastName = registrationLastName;
|
||||||
|
},
|
||||||
|
updateRegistrationLicensePlate(state, registrationLicensePlate){
|
||||||
|
state.order.vehicle.registration.licensePlate = registrationLicensePlate;
|
||||||
|
},
|
||||||
|
updateServiceLocationZip(state, ServiceLocationZip){
|
||||||
|
state.order.vehicle.serviceLocation.zip = ServiceLocationZip;
|
||||||
|
},
|
||||||
|
updateCustomerEmailAddress(state, CustomerEmailAddress){
|
||||||
|
state.order.vehicle.customer.emailAddress = CustomerEmailAddress;
|
||||||
|
},
|
||||||
|
|
||||||
// EVENT BUS MUTATIONS
|
// EVENT BUS MUTATIONS
|
||||||
addEventToBus(state, event) {
|
addEventToBus(state, event) {
|
||||||
|
|
@ -288,4 +324,4 @@ export default createStore({
|
||||||
mutations,
|
mutations,
|
||||||
getters,
|
getters,
|
||||||
actions,
|
actions,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue