No damage string for repair

New requirement says that if the damage is a repair, the navigation is not going to go to the vehicle lookup pages (by vin, by license place, by address). 
No damage string for repair

New requirement says that if the damage is a repair, the navigation is not going to go to the vehicle lookup pages (by vin, by license place, by address).
This commit is contained in:
Johan Gunawan 2023-01-11 12:01:57 -05:00
parent d0cf09811f
commit ce35f538d2

View file

@ -5,15 +5,10 @@ import { useMainStore } from '@/store';
export function getDamageString() {
const mainStore = useMainStore();
// If it's a repair it's always a windshield.
const { isRepair } = mainStore.damage;
if (isRepair) {
return damageCustomLabels.WINDSHIELD;
}
const damageLocations = mainStore.damage.glassToReplace;
if (!damageLocations || !Array.isArray(damageLocations)) {
if (isRepair || !damageLocations || !Array.isArray(damageLocations)) {
return '';
}