CSR-611 glassToReplace does not exist in store for repairs
This commit is contained in:
parent
20668b165f
commit
55b99f0933
1 changed files with 6 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue