CSR-297 persist vehicle damage selections and tests
This commit is contained in:
parent
42b9a1a981
commit
eead9f0ccd
5 changed files with 268 additions and 47 deletions
|
|
@ -1,8 +0,0 @@
|
|||
const damageLocationsParts = {
|
||||
WINDSHIELD: "Windshield",
|
||||
DRIVER: "Driver",
|
||||
PASSENGER: "Passenger",
|
||||
REAR: "Rear",
|
||||
};
|
||||
|
||||
export { damageLocationsParts };
|
||||
|
|
@ -2,6 +2,20 @@ const damageLocationsSelected = {
|
|||
WINDSHIELD: "Windshield",
|
||||
SIDEDOOR: "SideDoor",
|
||||
REARWINDOW: "RearWindow",
|
||||
REPAIR: "Repair",
|
||||
REPLACE: "Replace",
|
||||
DRIVER: "Driver",
|
||||
PASSENGER: "Passenger",
|
||||
FRONT: "Front",
|
||||
REAR: "Rear",
|
||||
BACK: "Back",
|
||||
QUARTER: "Quarter",
|
||||
VENT: "Vent",
|
||||
SINGLE: "Single",
|
||||
DRIVERSIDE: "DriverSide",
|
||||
PASSENGERSIDE: "PassengerSide",
|
||||
STATIONARY: "Stationary",
|
||||
SLIDER: "Slider"
|
||||
};
|
||||
|
||||
export { damageLocationsSelected };
|
||||
|
|
@ -19,6 +19,7 @@ import { nextTick } from "vue";
|
|||
import { storeActions } from "@/constants/store-actions";
|
||||
import { storeMutations } from "@/constants/store-mutations";
|
||||
import store from "@/store";
|
||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected.js";
|
||||
|
||||
// Mock our module for promises.
|
||||
jest.mock("@/helpers/layout-helper.js", () => ({
|
||||
|
|
@ -38,6 +39,9 @@ jest.mock("@/store", () => ({
|
|||
vehicle: {
|
||||
carId: "C00000000",
|
||||
},
|
||||
damage: {
|
||||
glassToReplace: []
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
|
|
@ -252,7 +256,7 @@ describe("vehicle-damage.vue", () => {
|
|||
});
|
||||
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test("Windshield replace with single part on ForwardButtonAction triggers a router.navigateAfterSave and saves selections to store", async () => {
|
||||
test("Windshield replace with single part on ForwardButtonAction triggers a router.navigate and saves selections to store", async () => {
|
||||
//Arrange
|
||||
const partsData = { partsOrQuestions: [
|
||||
{
|
||||
|
|
@ -272,7 +276,7 @@ describe("vehicle-damage.vue", () => {
|
|||
const { wrapper } = setupMocks({
|
||||
pageHeaderWidgetHeaderText: "",
|
||||
mountOptionsMockData: {
|
||||
router: { navigateAfterSave: jest.fn(), },
|
||||
router: { navigate: jest.fn(), },
|
||||
actionList: [{ actionName: storeActions.GET_PARTS_OR_QUESTIONS, data: partsData, },],},
|
||||
});
|
||||
|
||||
|
|
@ -296,7 +300,7 @@ describe("vehicle-damage.vue", () => {
|
|||
await wrapper.vm.forwardButtonAction();
|
||||
|
||||
//Assert
|
||||
expect(wrapper.vm.$router.navigateAfterSave).toHaveBeenCalled();
|
||||
expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
|
||||
expect(wrapper.vm.selectedGlassToReplace()).toEqual(expectedGlassToReplace);
|
||||
expect(store.commit).toBeCalledWith(storeMutations.UPDATE_IS_REPAIR, false);
|
||||
expect(store.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_TO_REPLACE, expectedGlassToReplace);
|
||||
|
|
@ -389,13 +393,13 @@ describe("vehicle-damage.vue", () => {
|
|||
|
||||
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test("Windshield repair on ForwardButtonAction triggers a router.navigateAfterSave and saves selection to store", async () => {
|
||||
test("Windshield repair on ForwardButtonAction triggers a router.navigate and saves selection to store", async () => {
|
||||
//Arrange
|
||||
const partsData = { partsOrQuestions: []};
|
||||
const { wrapper } = setupMocks({
|
||||
pageHeaderWidgetHeaderText: "",
|
||||
mountOptionsMockData: {
|
||||
router: { navigateAfterSave: jest.fn(), },
|
||||
router: { navigate: jest.fn(), },
|
||||
actionList: [{ actionName: storeActions.GET_PARTS_OR_QUESTIONS, data: partsData, },],},
|
||||
});
|
||||
|
||||
|
|
@ -416,7 +420,7 @@ describe("vehicle-damage.vue", () => {
|
|||
await wrapper.vm.forwardButtonAction();
|
||||
|
||||
//Assert
|
||||
expect(wrapper.vm.$router.navigateAfterSave).toHaveBeenCalled();
|
||||
expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
|
||||
expect(store.commit).toBeCalledWith(storeMutations.UPDATE_IS_REPAIR, true);
|
||||
expect(store.commit).toBeCalledWith(storeMutations.UPDATE_NUMBER_OF_CHIPS, 2);
|
||||
});
|
||||
|
|
@ -596,6 +600,162 @@ describe("vehicle-damage.vue", () => {
|
|||
});
|
||||
});
|
||||
|
||||
const damageLocations = [["Windshield", [damageLocationsSelected.WINDSHIELD]],
|
||||
["Driver", [damageLocationsSelected.SIDEDOOR]],
|
||||
["Passenger", [damageLocationsSelected.SIDEDOOR]],
|
||||
["Rear", [damageLocationsSelected.REARWINDOW]]];
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test.each(damageLocations)("getDamageLocationsFromStore for %s returns expected %s", async (damageLocation, expectedGlass) => {
|
||||
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
//Act
|
||||
vehicleDamage.beforeRouteEnter.call(
|
||||
wrapper.vm,
|
||||
{ query: { fmgPage: "vehicle-damage" } },
|
||||
undefined,
|
||||
(c) => c(wrapper.vm)
|
||||
);
|
||||
|
||||
store.getters = { vehicle: { carId: "C0000000" }, damage: { glassToReplace: [{location: damageLocation}] }, isRepair: true};
|
||||
|
||||
var glassSelections = wrapper.vm.getDamageLocationsFromStore();
|
||||
|
||||
//Assert
|
||||
expect(glassSelections).toEqual(expectedGlass);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
const storeWindshieldOptions = [[1, false, "Windshield", "Single", { selectedWindshieldDamageType: [damageLocationsSelected.REPLACE],
|
||||
selectedWindshieldChipCount: [], selectedWindshieldReplaceOptions: [damageLocationsSelected.SINGLE]}],
|
||||
[2, false, "Windshield", "Driver", { selectedWindshieldDamageType: [damageLocationsSelected.REPLACE],
|
||||
selectedWindshieldChipCount: [], selectedWindshieldReplaceOptions: [damageLocationsSelected.DRIVER]}],
|
||||
[3, false, "Windshield", "Passenger", { selectedWindshieldDamageType: [damageLocationsSelected.REPLACE],
|
||||
selectedWindshieldChipCount: [], selectedWindshieldReplaceOptions: [damageLocationsSelected.PASSENGER]}],
|
||||
[4, true, "", "", { selectedWindshieldDamageType: [damageLocationsSelected.REPAIR],
|
||||
selectedWindshieldChipCount: [2], selectedWindshieldReplaceOptions: []}]
|
||||
];
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test.each(storeWindshieldOptions)("getWindshieldOptionsFromStore test #%s", async (testNum, isRepair, damageLocation, damageName, expectedWindshieldOptions) => {
|
||||
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
//Act
|
||||
vehicleDamage.beforeRouteEnter.call(
|
||||
wrapper.vm,
|
||||
{ query: { fmgPage: "vehicle-damage" } },
|
||||
undefined,
|
||||
(c) => c(wrapper.vm)
|
||||
);
|
||||
|
||||
store.getters = {
|
||||
vehicle:
|
||||
{ carId: "C0000000" },
|
||||
damage:
|
||||
{
|
||||
glassToReplace: [{location: damageLocation, name: damageName}],
|
||||
isRepair: isRepair,
|
||||
numberOfChips: 2
|
||||
},
|
||||
};
|
||||
|
||||
var windshieldSelections = wrapper.vm.getWindshieldOptionsFromStore();
|
||||
|
||||
//Assert
|
||||
expect(windshieldSelections).toEqual(expectedWindshieldOptions);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
const driverDoorSides = [["Driver", "Front", [damageLocationsSelected.FRONT]],
|
||||
["Driver", "Back", [damageLocationsSelected.BACK]],
|
||||
["Driver", "Vent", [damageLocationsSelected.VENT]],
|
||||
["Driver", "Quarter", [damageLocationsSelected.QUARTER]]
|
||||
];
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test.each(driverDoorSides)("getDriverSideReplaceOptionsFromStore for %s-%s returns expected %s", async (damageLocation, damageName, expectedGlass) => {
|
||||
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
//Act
|
||||
vehicleDamage.beforeRouteEnter.call(
|
||||
wrapper.vm,
|
||||
{ query: { fmgPage: "vehicle-damage" } },
|
||||
undefined,
|
||||
(c) => c(wrapper.vm)
|
||||
);
|
||||
|
||||
store.getters = { vehicle: { carId: "C0000000" }, damage: { glassToReplace: [{location: damageLocation, name: damageName}] }, isRepair: true};
|
||||
|
||||
var glassSelections = wrapper.vm.getDriverSideReplaceOptionsFromStore();
|
||||
|
||||
//Assert
|
||||
expect(glassSelections).toEqual(expectedGlass);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
const passengerDoorSides = [["Passenger", "Front", [damageLocationsSelected.FRONT]],
|
||||
["Passenger", "Back", [damageLocationsSelected.BACK]],
|
||||
["Passenger", "Vent", [damageLocationsSelected.VENT]],
|
||||
["Passenger", "Quarter", [damageLocationsSelected.QUARTER]]
|
||||
];
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test.each(passengerDoorSides)("getPassengerSideReplaceOptionsFromStore for %s-%s returns expected %s", async (damageLocation, damageName, expectedGlass) => {
|
||||
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
//Act
|
||||
vehicleDamage.beforeRouteEnter.call(
|
||||
wrapper.vm,
|
||||
{ query: { fmgPage: "vehicle-damage" } },
|
||||
undefined,
|
||||
(c) => c(wrapper.vm)
|
||||
);
|
||||
|
||||
store.getters = { vehicle: { carId: "C0000000" }, damage: { glassToReplace: [{location: damageLocation, name: damageName}] }, isRepair: true};
|
||||
|
||||
var glassSelections = wrapper.vm.getPassengerSideReplaceOptionsFromStore();
|
||||
|
||||
//Assert
|
||||
expect(glassSelections).toEqual(expectedGlass);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
const rearReplaceOptions = [["Rear", "Stationary", [damageLocationsSelected.STATIONARY]],
|
||||
["Rear", "Slider", [damageLocationsSelected.SLIDER]]
|
||||
];
|
||||
describe("vehicle-damage.vue", () => {
|
||||
test.each(rearReplaceOptions)("getRearReplaceOptionsFromStore for %s-%s returns expected %s", async (damageLocation, damageName, expectedGlass) => {
|
||||
|
||||
//Arrange
|
||||
const { wrapper } = setupMocks({});
|
||||
|
||||
//Act
|
||||
vehicleDamage.beforeRouteEnter.call(
|
||||
wrapper.vm,
|
||||
{ query: { fmgPage: "vehicle-damage" } },
|
||||
undefined,
|
||||
(c) => c(wrapper.vm)
|
||||
);
|
||||
|
||||
store.getters = { vehicle: { carId: "C0000000" }, damage: { glassToReplace: [{location: damageLocation, name: damageName}] }, isRepair: true};
|
||||
|
||||
var glassSelections = wrapper.vm.getRearReplaceOptionsFromStore();
|
||||
|
||||
//Assert
|
||||
expect(glassSelections).toEqual(expectedGlass);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function setupMocks({
|
||||
pageHeaderWidgetHeaderText = {},
|
||||
mountOptionsMockData = {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ import { settleAllPromises } from "@/helpers/layout-helper";
|
|||
import { storeActions } from "@/constants/store-actions";
|
||||
import store from "@/store";
|
||||
import baseMixin from "@/mixins/base-mixin";
|
||||
import { damageLocationsParts } from "@/constants/damage-locations-parts.js";
|
||||
import { damageLocationsCms } from "@/constants/damage-locations-cms.js";
|
||||
import { damageLocationsSelected } from "@/constants/damage-locations-selected.js";
|
||||
|
||||
|
|
@ -107,14 +106,14 @@ export default {
|
|||
},
|
||||
data(){
|
||||
return {
|
||||
selectedDamageLocations: this.getDamageLocations(),
|
||||
selectedDamageLocations: this.getDamageLocationsFromStore(),
|
||||
sideDoorOptionsData: {
|
||||
selectedDoorSides: [],
|
||||
selectedDriverSideReplaceOptions: [],
|
||||
selectedPassengerSideReplaceOptions: []
|
||||
selectedDoorSides: this.getDoorSidesFromStore(),
|
||||
selectedDriverSideReplaceOptions: this.getDriverSideReplaceOptionsFromStore(),
|
||||
selectedPassengerSideReplaceOptions: this.getPassengerSideReplaceOptionsFromStore()
|
||||
},
|
||||
selectedWindshieldOptions: this.getWindshieldOptions(),
|
||||
selectedRearReplaceOptions: [],
|
||||
selectedWindshieldOptions: this.getWindshieldOptionsFromStore(),
|
||||
selectedRearReplaceOptions: this.getRearReplaceOptionsFromStore(),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -125,6 +124,10 @@ export default {
|
|||
store.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES);
|
||||
},
|
||||
backButtonAction() {
|
||||
store.commit(this.storeMutations.UPDATE_IS_REPAIR, null);
|
||||
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
|
||||
store.commit(this.storeMutations.UPDATE_GLASS_TO_REPLACE, []);
|
||||
|
||||
// route to move backwards
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_BACK,
|
||||
|
|
@ -132,60 +135,108 @@ export default {
|
|||
);
|
||||
},
|
||||
|
||||
getDamageLocations() {
|
||||
getDamageLocationsFromStore() {
|
||||
var glassSelections = [];
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.WINDSHIELD }) ||
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.WINDSHIELD }) ||
|
||||
store.getters.damage.isRepair) {
|
||||
glassSelections.push(damageLocationsSelected.WINDSHIELD);
|
||||
}
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.DRIVER })) {
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.DRIVER ||
|
||||
glass.location === damageLocationsSelected.PASSENGER })) {
|
||||
glassSelections.push(damageLocationsSelected.SIDEDOOR);
|
||||
}
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.PASSENGER })) {
|
||||
glassSelections.push(damageLocationsSelected.SIDEDOOR);
|
||||
}
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.REAR })) {
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.REAR })) {
|
||||
glassSelections.push(damageLocationsSelected.REARWINDOW);
|
||||
}
|
||||
|
||||
return glassSelections;
|
||||
},
|
||||
|
||||
getWindshieldOptions() {
|
||||
getWindshieldOptionsFromStore() {
|
||||
var windShieldOptions = { selectedWindshieldDamageType: [], selectedWindshieldChipCount: [], selectedWindshieldReplaceOptions: []};
|
||||
|
||||
if (store.getters.damage.isRepair === undefined) return windshieldOptions;
|
||||
|
||||
if (!store.getters.damage.isRepair) {
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.WINDSHIELD &&
|
||||
glass.name === "Single" })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push("Replace");
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push("Single");
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.WINDSHIELD &&
|
||||
glass.name === damageLocationsSelected.SINGLE })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push(damageLocationsSelected.REPLACE);
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push(damageLocationsSelected.SINGLE);
|
||||
}
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.WINDSHIELD &&
|
||||
glass.name === "Driver" })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push("Replace");
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push("Driver");
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.WINDSHIELD &&
|
||||
glass.name === damageLocationsSelected.DRIVER })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push(damageLocationsSelected.REPLACE);
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push(damageLocationsSelected.DRIVER);
|
||||
}
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsParts.WINDSHIELD &&
|
||||
glass.name === "Passenger" })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push("Replace");
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push("Passenger");
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.WINDSHIELD &&
|
||||
glass.name === damageLocationsSelected.PASSENGER })) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push(damageLocationsSelected.REPLACE);
|
||||
windShieldOptions.selectedWindshieldReplaceOptions.push(damageLocationsSelected.PASSENGER);
|
||||
}
|
||||
}
|
||||
|
||||
if (store.getters.damage.isRepair) {
|
||||
windShieldOptions.selectedWindshieldDamageType.push("Repair");
|
||||
windShieldOptions.selectedWindshieldDamageType.push(damageLocationsSelected.REPAIR);
|
||||
windShieldOptions.selectedWindshieldChipCount.push(store.getters.damage.numberOfChips);
|
||||
}
|
||||
|
||||
return windShieldOptions;
|
||||
|
||||
},
|
||||
|
||||
getDoorSidesFromStore() {
|
||||
var doorSides = [];
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.DRIVER })){
|
||||
doorSides.push(damageLocationsSelected.DRIVERSIDE);
|
||||
}
|
||||
|
||||
if (store.getters.damage.glassToReplace.some(glass => { return glass.location === damageLocationsSelected.PASSENGER })){
|
||||
doorSides.push(damageLocationsSelected.PASSENGERSIDE);
|
||||
}
|
||||
|
||||
return doorSides;
|
||||
},
|
||||
|
||||
getDriverSideReplaceOptionsFromStore() {
|
||||
var driverSideReplaceOptions = [];
|
||||
|
||||
store.getters.damage.glassToReplace.forEach(glass => {
|
||||
if (glass.location === damageLocationsSelected.DRIVER){
|
||||
driverSideReplaceOptions.push(glass.name);
|
||||
}
|
||||
});
|
||||
|
||||
return driverSideReplaceOptions;
|
||||
},
|
||||
|
||||
getPassengerSideReplaceOptionsFromStore() {
|
||||
var passengerSideReplaceOptions = [];
|
||||
|
||||
store.getters.damage.glassToReplace.forEach(glass => {
|
||||
if (glass.location === damageLocationsSelected.PASSENGER){
|
||||
passengerSideReplaceOptions.push(glass.name);
|
||||
}
|
||||
});
|
||||
|
||||
return passengerSideReplaceOptions;
|
||||
},
|
||||
|
||||
getRearReplaceOptionsFromStore(){
|
||||
var rearReplaceOptions = [];
|
||||
|
||||
store.getters.damage.glassToReplace.forEach(glass => {
|
||||
if (glass.location === damageLocationsSelected.REAR){
|
||||
rearReplaceOptions.push(glass.name);
|
||||
}
|
||||
});
|
||||
|
||||
return rearReplaceOptions;
|
||||
},
|
||||
|
||||
async forwardButtonAction() {
|
||||
const windshieldChipCount = this.selectedWindshieldOptions.selectedWindshieldChipCount && this.isWindshieldDamageLocation ?
|
||||
this.selectedWindshieldOptions.selectedWindshieldChipCount[0] : null;
|
||||
|
|
@ -233,25 +284,25 @@ export default {
|
|||
const selectedGlassToReplace = [];
|
||||
if (this.isWindshieldDamageLocation && !this.isWindshieldRepair){
|
||||
this.selectedWindshieldOptions.selectedWindshieldReplaceOptions.forEach(wsItem => {
|
||||
selectedGlassToReplace.push({ location: damageLocationsParts.WINDSHIELD, name: wsItem});
|
||||
selectedGlassToReplace.push({ location: damageLocationsSelected.WINDSHIELD, name: wsItem});
|
||||
})
|
||||
}
|
||||
|
||||
if (this.isDriverSideReplace){
|
||||
this.sideDoorOptionsData.selectedDriverSideReplaceOptions.forEach(driverItem => {
|
||||
selectedGlassToReplace.push({ location: damageLocationsParts.DRIVER, name: driverItem});
|
||||
selectedGlassToReplace.push({ location: damageLocationsSelected.DRIVER, name: driverItem});
|
||||
})
|
||||
}
|
||||
|
||||
if (this.isPassengerSideReplace){
|
||||
this.sideDoorOptionsData.selectedPassengerSideReplaceOptions.forEach(passengerItem => {
|
||||
selectedGlassToReplace.push({ location: damageLocationsParts.PASSENGER, name: passengerItem});
|
||||
selectedGlassToReplace.push({ location: damageLocationsSelected.PASSENGER, name: passengerItem});
|
||||
})
|
||||
}
|
||||
|
||||
if (this.isRearWindowDamageLocation) {
|
||||
this.selectedRearReplaceOptions.forEach(rearItem => {
|
||||
selectedGlassToReplace.push({ location: damageLocationsParts.REAR, name: rearItem});
|
||||
selectedGlassToReplace.push({ location: damageLocationsSelected.REAR, name: rearItem});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,10 @@ export default {
|
|||
store.commit(storeMutations.UPDATE_STYLE, null);
|
||||
store.commit(storeMutations.UPDATE_CAR_ID, null);
|
||||
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null);
|
||||
store.commit(storeMutations.UPDATE_IS_REPAIR, null);
|
||||
store.commit(storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
|
||||
store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, []);
|
||||
|
||||
|
||||
// Invokes
|
||||
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
|
||||
|
|
|
|||
Loading…
Reference in a new issue