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"; import { storeActions } from "@/constants/store-actions";
export function getDamageString() { 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; const isRepair = store.getters.damage.isRepair;
if(isRepair){
return "windshield"
}
const damageLocations = store.getters.damage.glassToReplace;
let returnString; let returnString;
if (!damageLocations) { if (!damageLocations) {
return; return;
} }
// If it's a repair it's always a windshield.
if(isRepair){
return "windshield"
}
if (damageLocations.length > 1) { if (damageLocations.length > 1) {
returnString = "match" returnString = "match"