CSR-1559
No need to reset customer name if they've changed their address. Use vin change instead of name to trigger reset.
This commit is contained in:
parent
957488c3fb
commit
39436c533d
1 changed files with 1 additions and 4 deletions
|
|
@ -336,8 +336,6 @@ export const mutations = {
|
||||||
},
|
},
|
||||||
resetRegistrationState(state) {
|
resetRegistrationState(state) {
|
||||||
state.order.vehicle.registration.licensePlate = null;
|
state.order.vehicle.registration.licensePlate = null;
|
||||||
state.order.customer.firstName = null;
|
|
||||||
state.order.customer.lastName = null;
|
|
||||||
},
|
},
|
||||||
resetGlassPartsState(state) {
|
resetGlassPartsState(state) {
|
||||||
state.order.lineItems.glassParts = null;
|
state.order.lineItems.glassParts = null;
|
||||||
|
|
@ -1676,8 +1674,7 @@ export const actions = {
|
||||||
) {
|
) {
|
||||||
//Reset dependent state when changing
|
//Reset dependent state when changing
|
||||||
if (
|
if (
|
||||||
registrationInfo?.firstName !== context.state.order.customer?.firstName ||
|
vehicleInfo.vin !== context.state.order.vehicle.vin
|
||||||
registrationInfo?.lastName !== context.state.order.customer?.lastName
|
|
||||||
) {
|
) {
|
||||||
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue