Merge pull request #491 from Safelite/feature/CSR-611

CSR-611 glassToReplace does not exist in store for repairs
This commit is contained in:
CarlNation 2022-05-20 06:25:57 -04:00 committed by GitHub
commit 2a57582f60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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"