Prevent overwriting of service location data
This commit is contained in:
parent
ce59e7d68c
commit
9efe9bbc1c
3 changed files with 7 additions and 11 deletions
|
|
@ -32,6 +32,7 @@ const storeMutations = {
|
|||
UPDATE_REGISTRATION_LAST_NAME: "updateRegistrationLastName",
|
||||
UPDATE_REGISTRATION: "updateRegistration",
|
||||
|
||||
UPDATE_SERVICE_ZIP: "updateServiceZip",
|
||||
UPDATE_SERVICE_LOCATION: "updateServiceLocation",
|
||||
UPDATE_SCHEDULE: "updateSchedule",
|
||||
|
||||
|
|
|
|||
|
|
@ -324,14 +324,9 @@ export default {
|
|||
await this.dispatchStoreAction(
|
||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||
{
|
||||
address: "",
|
||||
address2: "",
|
||||
city: "",
|
||||
state: resultMap.zipCodeData.state,
|
||||
zipCode: this.serviceZipCode,
|
||||
zipCodeCtu: resultMap.zipCodeData.zipCodeCtu,
|
||||
appointmentType: "",
|
||||
isVehicleProtected: null,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -366,14 +361,9 @@ export default {
|
|||
await this.dispatchStoreAction(
|
||||
storeActions.SAVE_SERVICE_ZIP_CODE_INFO,
|
||||
{
|
||||
address: null,
|
||||
address2: null,
|
||||
city: null,
|
||||
state: zipCodeData.state,
|
||||
zipCode: this.serviceZipCode,
|
||||
zipCodeCtu: zipCodeData.zipCodeCtu,
|
||||
appointmentType: null,
|
||||
isVehicleProtected: null,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
|
|
@ -244,6 +244,11 @@ export const mutations = {
|
|||
state.order.vehicle.registration.firstName = registrationInfo?.firstName;
|
||||
state.order.vehicle.registration.lastName = registrationInfo?.lastName;
|
||||
},
|
||||
updateServiceZip(state, serviceZipInfo) {
|
||||
state.order.serviceLocation.state = serviceZipInfo.state;
|
||||
state.order.serviceLocation.zipCode = serviceZipInfo.zipCode;
|
||||
state.order.serviceLocation.zipCodeCtu = serviceZipInfo.zipCodeCtu;
|
||||
},
|
||||
updateServiceLocation(state, serviceLocationInfo) {
|
||||
state.order.serviceLocation.address = serviceLocationInfo.address;
|
||||
state.order.serviceLocation.address2 = serviceLocationInfo.address2;
|
||||
|
|
@ -1905,7 +1910,7 @@ export const actions = {
|
|||
context.commit(storeMutations.RESET_SERVICE_LOCATION_MOBILE_ADDRESS);
|
||||
}
|
||||
|
||||
context.commit(storeMutations.UPDATE_SERVICE_LOCATION, serviceZipCodeInfo);
|
||||
context.commit(storeMutations.UPDATE_SERVICE_ZIP, serviceZipCodeInfo);
|
||||
},
|
||||
|
||||
saveServiceLocation(context, serviceLocationInfo) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue