commit
2619924545
1 changed files with 1 additions and 6 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;
|
||||||
|
|
@ -1675,10 +1673,7 @@ export const actions = {
|
||||||
{ isSelectedGlassAvailableForVehicle, vehicleInfo, registrationInfo }
|
{ isSelectedGlassAvailableForVehicle, vehicleInfo, registrationInfo }
|
||||||
) {
|
) {
|
||||||
//Reset dependent state when changing
|
//Reset dependent state when changing
|
||||||
if (
|
if (vehicleInfo.vin !== context.state.order.vehicle.vin) {
|
||||||
registrationInfo?.firstName !== context.state.order.customer?.firstName ||
|
|
||||||
registrationInfo?.lastName !== context.state.order.customer?.lastName
|
|
||||||
) {
|
|
||||||
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
||||||
|
|
||||||
if (!isSelectedGlassAvailableForVehicle) {
|
if (!isSelectedGlassAvailableForVehicle) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue