CSR-611 glassToReplace does not exist in store for repairs

This commit is contained in:
CarlNation 2022-05-20 06:14:56 -04:00
parent 20668b165f
commit 55b99f0933

View file

@ -3,17 +3,18 @@ import baseMixin from "@/mixins/base-mixin.js";
import { storeActions } from "@/constants/store-actions";
export function getDamageString() {
const damageLocations = store.getters.damage.glassToReplace;
// If it's a repair it's always a windshield.
const isRepair = store.getters.damage.isRepair;
if(isRepair){
return "windshield"
}
const damageLocations = store.getters.damage.glassToReplace;
let returnString;
if (!damageLocations) {
return;
}
// If it's a repair it's always a windshield.
if(isRepair){
return "windshield"
}
if (damageLocations.length > 1) {
returnString = "match"