Merge pull request #1363 from Safelite/feature/CSR-1661.1
Update index.js
This commit is contained in:
commit
e4797e67ec
1 changed files with 8 additions and 18 deletions
|
|
@ -1675,35 +1675,25 @@ export const actions = {
|
||||||
context,
|
context,
|
||||||
{ year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }
|
{ year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor }
|
||||||
) {
|
) {
|
||||||
context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
|
||||||
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
context.state.order.vehicle.year != year ||
|
context.state.order.vehicle.year != year ||
|
||||||
context.state.order.vehicle.make != make ||
|
context.state.order.vehicle.make != make ||
|
||||||
context.state.order.vehicle.model != model ||
|
context.state.order.vehicle.model != model ||
|
||||||
context.state.order.vehicle.style != style
|
context.state.order.vehicle.style != style
|
||||||
)
|
) {
|
||||||
|
context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
||||||
|
context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
|
context.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
|
||||||
|
|
||||||
if (context.state.order.vehicle.year != year) {
|
|
||||||
context.commit(storeMutations.UPDATE_YEAR, year);
|
context.commit(storeMutations.UPDATE_YEAR, year);
|
||||||
}
|
|
||||||
if (context.state.order.vehicle.make != make) {
|
|
||||||
context.commit(storeMutations.UPDATE_MAKE, make);
|
context.commit(storeMutations.UPDATE_MAKE, make);
|
||||||
}
|
|
||||||
if (context.state.order.vehicle.model != model) {
|
|
||||||
context.commit(storeMutations.UPDATE_MODEL, model);
|
context.commit(storeMutations.UPDATE_MODEL, model);
|
||||||
}
|
|
||||||
if (context.state.order.vehicle.style != style) {
|
|
||||||
context.commit(storeMutations.UPDATE_STYLE, style);
|
context.commit(storeMutations.UPDATE_STYLE, style);
|
||||||
|
context.commit(storeMutations.UPDATE_CAR_ID, carId);
|
||||||
|
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category);
|
||||||
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
|
||||||
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
|
||||||
|
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
context.commit(storeMutations.UPDATE_CAR_ID, carId);
|
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category);
|
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);
|
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber);
|
|
||||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
saveVehicleDamage(
|
saveVehicleDamage(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue