CSR-762 Back glass

This commit is contained in:
Katie 2022-09-20 14:22:05 -04:00
parent ffe95e5fba
commit 9e4d244c14
2 changed files with 17 additions and 12 deletions

View file

@ -1,6 +1,6 @@
<template>
<Form
@submit.prevent="onSubmit"
@submit="onSubmit"
@invalid-submit="onInvalidSubmit"
ref="theForm"
v-slot="{ meta }"
@ -269,13 +269,18 @@ export default {
},
getRearReplaceOptionsFromStore(){
var rearReplaceOptions = [];
var rearReplaceOptions = store.getters.damage.glassToReplace?.filter(glass => glass.glassLocation === damageLocationsSelected.REAR)[0]?.glassName;
store.getters.damage.glassToReplace?.forEach(glass => {
if (glass.glassLocation === damageLocationsSelected.REAR){
rearReplaceOptions.push(glass.glassName);
}
});
// store.getters.damage.glassToReplace?.forEach(glass => {
// if (glass.glassLocation === damageLocationsSelected.REAR){
// rearReplaceOptions.push(glass.glassName);
// }
// });
console.log({
glassToReplace: store.getters.damage.glassToReplace,
rearReplaceOptions: rearReplaceOptions
})
return rearReplaceOptions;
},
@ -293,7 +298,6 @@ export default {
},
navigateForward(){
// If vin already exists, navigate directly to vin-lookup
if(store.getters.vehicle.vin) {
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route);
@ -324,9 +328,10 @@ export default {
}
if (this.isRearWindowDamageLocation) {
this.selectedRearReplaceOptions.forEach(rearItem => {
selectedGlassToReplace.push({ glassLocation: damageLocationsSelected.REAR, glassName: rearItem});
})
console.log({
selectedRearReplaceOptions: this.selectedRearReplaceOptions
})
selectedGlassToReplace.push({ glassLocation: damageLocationsSelected.REAR, glassName: this.selectedRearReplaceOptions});
}
return selectedGlassToReplace;

View file

@ -3,7 +3,7 @@
:aria-disabled="isDisabled"
class="btn d-flex align-items-center py-3 px-4 delay"
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '', isLoaderDisplayed ? 'has-loader' : '']"
@click="clicked()"
@click="clicked"
>
<span class="m-0">{{ this.buttonText }}</span>
<loader