CSR-1564 CSR-1559 registration defaults
CSR-1564 CSR-1559 registration defaults
This commit is contained in:
parent
4307b67988
commit
dc43455d92
5 changed files with 5 additions and 53 deletions
|
|
@ -23,13 +23,6 @@ const storeMutations = {
|
||||||
UPDATE_SUPPORTING_ITEMS: "updateSupportingItems",
|
UPDATE_SUPPORTING_ITEMS: "updateSupportingItems",
|
||||||
UPDATE_LINE_ITEMS_SERVER_DATA: "updateLineItemsServerData",
|
UPDATE_LINE_ITEMS_SERVER_DATA: "updateLineItemsServerData",
|
||||||
|
|
||||||
UPDATE_REGISTRATION_LICENSE_PLATE: "updateRegistrationLicensePlate",
|
|
||||||
UPDATE_REGISTRATION_ADDRESS: "updateRegistrationAddress",
|
|
||||||
UPDATE_REGISTRATION_CITY: "updateRegistrationCity",
|
|
||||||
UPDATE_REGISTRATION_STATE: "updateRegistrationState",
|
|
||||||
UPDATE_REGISTRATION_ZIP_CODE: "updateRegistrationZipCode",
|
|
||||||
UPDATE_REGISTRATION_FIRST_NAME: "updateRegistrationFirstName",
|
|
||||||
UPDATE_REGISTRATION_LAST_NAME: "updateRegistrationLastName",
|
|
||||||
UPDATE_REGISTRATION: "updateRegistration",
|
UPDATE_REGISTRATION: "updateRegistration",
|
||||||
|
|
||||||
UPDATE_SERVICE_ZIP: "updateServiceZip",
|
UPDATE_SERVICE_ZIP: "updateServiceZip",
|
||||||
|
|
|
||||||
|
|
@ -323,10 +323,6 @@ export default {
|
||||||
registrationInfo: {
|
registrationInfo: {
|
||||||
firstName: this.customerQuestions.firstName,
|
firstName: this.customerQuestions.firstName,
|
||||||
lastName: this.customerQuestions.lastName,
|
lastName: this.customerQuestions.lastName,
|
||||||
address: this.customerQuestions.addressQuestions.streetAddress,
|
|
||||||
city: this.customerQuestions.addressQuestions.city,
|
|
||||||
state: resultMap.serviceZipValidationResponse.state,
|
|
||||||
zipCode: this.customerQuestions.addressQuestions.zipCode,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -292,8 +292,6 @@ export default {
|
||||||
vehicleInfo: Object.assign(vinLookup.data.vehicle, { vin: vinLookup.data.vin }),
|
vehicleInfo: Object.assign(vinLookup.data.vehicle, { vin: vinLookup.data.vin }),
|
||||||
registrationInfo: {
|
registrationInfo: {
|
||||||
licensePlate: this.licensePlate,
|
licensePlate: this.licensePlate,
|
||||||
state: resultMap.registrationZipValidationResponse.state,
|
|
||||||
zipCode: this.registrationZipCode,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,6 @@ const getDefaultState = () => {
|
||||||
imageColor: null,
|
imageColor: null,
|
||||||
registration: {
|
registration: {
|
||||||
licensePlate: null,
|
licensePlate: null,
|
||||||
address: null,
|
|
||||||
city: null,
|
|
||||||
state: null,
|
|
||||||
zipCode: null,
|
|
||||||
firstName: null,
|
|
||||||
lastName: null,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
|
|
@ -217,27 +211,6 @@ export const mutations = {
|
||||||
updateInsuranceVerifiedStatus(state, isVerified) {
|
updateInsuranceVerifiedStatus(state, isVerified) {
|
||||||
state.order.payment.insuranceCoverage.isVerified = isVerified;
|
state.order.payment.insuranceCoverage.isVerified = isVerified;
|
||||||
},
|
},
|
||||||
updateRegistrationLicensePlate(state, licensePlate) {
|
|
||||||
state.order.vehicle.registration.licensePlate = licensePlate;
|
|
||||||
},
|
|
||||||
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, firstName) {
|
|
||||||
state.order.vehicle.registration.firstName = firstName;
|
|
||||||
},
|
|
||||||
updateRegistrationLastName(state, lastName) {
|
|
||||||
state.order.vehicle.registration.lastName = lastName;
|
|
||||||
},
|
|
||||||
updateCustomerEmailAddress(state, customerEmailAddress) {
|
updateCustomerEmailAddress(state, customerEmailAddress) {
|
||||||
state.order.customer.emailAddress = customerEmailAddress;
|
state.order.customer.emailAddress = customerEmailAddress;
|
||||||
},
|
},
|
||||||
|
|
@ -358,12 +331,8 @@ export const mutations = {
|
||||||
},
|
},
|
||||||
resetRegistrationState(state) {
|
resetRegistrationState(state) {
|
||||||
state.order.vehicle.registration.licensePlate = null;
|
state.order.vehicle.registration.licensePlate = null;
|
||||||
state.order.vehicle.registration.address = null;
|
state.order.customer.firstName = null;
|
||||||
state.order.vehicle.registration.city = null;
|
state.order.customer.lastName = null;
|
||||||
state.order.vehicle.registration.state = null;
|
|
||||||
state.order.vehicle.registration.zipCode = null;
|
|
||||||
state.order.vehicle.registration.firstName = null;
|
|
||||||
state.order.vehicle.registration.lastName = null;
|
|
||||||
},
|
},
|
||||||
resetGlassPartsState(state) {
|
resetGlassPartsState(state) {
|
||||||
state.order.lineItems.glassParts = null;
|
state.order.lineItems.glassParts = null;
|
||||||
|
|
@ -1775,12 +1744,8 @@ export const actions = {
|
||||||
) {
|
) {
|
||||||
//Reset dependent state when changing
|
//Reset dependent state when changing
|
||||||
if (
|
if (
|
||||||
registrationInfo?.address !== context.state.order.vehicle.registration?.address ||
|
registrationInfo?.firstName !== context.state.order.customer?.firstName ||
|
||||||
registrationInfo?.city !== context.state.order.vehicle.registration?.city ||
|
registrationInfo?.lastName !== context.state.order.customer?.lastName
|
||||||
registrationInfo?.state !== context.state.order.vehicle.registration?.state ||
|
|
||||||
registrationInfo?.zipCode !== context.state.order.vehicle.registration?.zipCode ||
|
|
||||||
registrationInfo?.firstName !== context.state.order.vehicle.registration?.firstName ||
|
|
||||||
registrationInfo?.lastName !== context.state.order.vehicle.registration?.lastName
|
|
||||||
) {
|
) {
|
||||||
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1552,7 +1552,7 @@ describe("Actions", () => {
|
||||||
isCarIdDifferent: true,
|
isCarIdDifferent: true,
|
||||||
isSelectedGlassAvailableForVehicle: false,
|
isSelectedGlassAvailableForVehicle: false,
|
||||||
vehicleInfo: { carId: "C010101", vin: "XXXXX" },
|
vehicleInfo: { carId: "C010101", vin: "XXXXX" },
|
||||||
registrationInfo: { zipCode: "80020", address: "123 Marys Ave" },
|
registrationInfo: { firstName: "abc", lastName: "123" },
|
||||||
serviceLocationInfo: { state: "CO" },
|
serviceLocationInfo: { state: "CO" },
|
||||||
customerEmail: "test@safelite.com",
|
customerEmail: "test@safelite.com",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue