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_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_SERVICE_ZIP: "updateServiceZip",
|
||||
|
|
|
|||
|
|
@ -323,10 +323,6 @@ export default {
|
|||
registrationInfo: {
|
||||
firstName: this.customerQuestions.firstName,
|
||||
lastName: this.customerQuestions.lastName,
|
||||
address: this.customerQuestions.addressQuestions.streetAddress,
|
||||
city: this.customerQuestions.addressQuestions.city,
|
||||
state: resultMap.serviceZipValidationResponse.state,
|
||||
zipCode: this.customerQuestions.addressQuestions.zipCode,
|
||||
},
|
||||
},
|
||||
false
|
||||
|
|
|
|||
|
|
@ -292,8 +292,6 @@ export default {
|
|||
vehicleInfo: Object.assign(vinLookup.data.vehicle, { vin: vinLookup.data.vin }),
|
||||
registrationInfo: {
|
||||
licensePlate: this.licensePlate,
|
||||
state: resultMap.registrationZipValidationResponse.state,
|
||||
zipCode: this.registrationZipCode,
|
||||
},
|
||||
},
|
||||
false
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@ const getDefaultState = () => {
|
|||
imageColor: null,
|
||||
registration: {
|
||||
licensePlate: null,
|
||||
address: null,
|
||||
city: null,
|
||||
state: null,
|
||||
zipCode: null,
|
||||
firstName: null,
|
||||
lastName: null,
|
||||
},
|
||||
},
|
||||
serviceLocation: {
|
||||
|
|
@ -217,27 +211,6 @@ export const mutations = {
|
|||
updateInsuranceVerifiedStatus(state, 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) {
|
||||
state.order.customer.emailAddress = customerEmailAddress;
|
||||
},
|
||||
|
|
@ -358,12 +331,8 @@ export const mutations = {
|
|||
},
|
||||
resetRegistrationState(state) {
|
||||
state.order.vehicle.registration.licensePlate = null;
|
||||
state.order.vehicle.registration.address = null;
|
||||
state.order.vehicle.registration.city = 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;
|
||||
state.order.customer.firstName = null;
|
||||
state.order.customer.lastName = null;
|
||||
},
|
||||
resetGlassPartsState(state) {
|
||||
state.order.lineItems.glassParts = null;
|
||||
|
|
@ -1775,12 +1744,8 @@ export const actions = {
|
|||
) {
|
||||
//Reset dependent state when changing
|
||||
if (
|
||||
registrationInfo?.address !== context.state.order.vehicle.registration?.address ||
|
||||
registrationInfo?.city !== context.state.order.vehicle.registration?.city ||
|
||||
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
|
||||
registrationInfo?.firstName !== context.state.order.customer?.firstName ||
|
||||
registrationInfo?.lastName !== context.state.order.customer?.lastName
|
||||
) {
|
||||
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
||||
|
||||
|
|
|
|||
|
|
@ -1552,7 +1552,7 @@ describe("Actions", () => {
|
|||
isCarIdDifferent: true,
|
||||
isSelectedGlassAvailableForVehicle: false,
|
||||
vehicleInfo: { carId: "C010101", vin: "XXXXX" },
|
||||
registrationInfo: { zipCode: "80020", address: "123 Marys Ave" },
|
||||
registrationInfo: { firstName: "abc", lastName: "123" },
|
||||
serviceLocationInfo: { state: "CO" },
|
||||
customerEmail: "test@safelite.com",
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue