CSR-762 Back glass
This commit is contained in:
parent
ffe95e5fba
commit
9e4d244c14
2 changed files with 17 additions and 12 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<Form
|
<Form
|
||||||
@submit.prevent="onSubmit"
|
@submit="onSubmit"
|
||||||
@invalid-submit="onInvalidSubmit"
|
@invalid-submit="onInvalidSubmit"
|
||||||
ref="theForm"
|
ref="theForm"
|
||||||
v-slot="{ meta }"
|
v-slot="{ meta }"
|
||||||
|
|
@ -269,13 +269,18 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getRearReplaceOptionsFromStore(){
|
getRearReplaceOptionsFromStore(){
|
||||||
var rearReplaceOptions = [];
|
var rearReplaceOptions = store.getters.damage.glassToReplace?.filter(glass => glass.glassLocation === damageLocationsSelected.REAR)[0]?.glassName;
|
||||||
|
|
||||||
store.getters.damage.glassToReplace?.forEach(glass => {
|
// store.getters.damage.glassToReplace?.forEach(glass => {
|
||||||
if (glass.glassLocation === damageLocationsSelected.REAR){
|
// if (glass.glassLocation === damageLocationsSelected.REAR){
|
||||||
rearReplaceOptions.push(glass.glassName);
|
// rearReplaceOptions.push(glass.glassName);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
console.log({
|
||||||
|
glassToReplace: store.getters.damage.glassToReplace,
|
||||||
|
rearReplaceOptions: rearReplaceOptions
|
||||||
|
})
|
||||||
|
|
||||||
return rearReplaceOptions;
|
return rearReplaceOptions;
|
||||||
},
|
},
|
||||||
|
|
@ -293,7 +298,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateForward(){
|
navigateForward(){
|
||||||
|
|
||||||
// If vin already exists, navigate directly to vin-lookup
|
// If vin already exists, navigate directly to vin-lookup
|
||||||
if(store.getters.vehicle.vin) {
|
if(store.getters.vehicle.vin) {
|
||||||
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route);
|
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route);
|
||||||
|
|
@ -324,9 +328,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isRearWindowDamageLocation) {
|
if (this.isRearWindowDamageLocation) {
|
||||||
this.selectedRearReplaceOptions.forEach(rearItem => {
|
console.log({
|
||||||
selectedGlassToReplace.push({ glassLocation: damageLocationsSelected.REAR, glassName: rearItem});
|
selectedRearReplaceOptions: this.selectedRearReplaceOptions
|
||||||
})
|
})
|
||||||
|
selectedGlassToReplace.push({ glassLocation: damageLocationsSelected.REAR, glassName: this.selectedRearReplaceOptions});
|
||||||
}
|
}
|
||||||
|
|
||||||
return selectedGlassToReplace;
|
return selectedGlassToReplace;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
:aria-disabled="isDisabled"
|
:aria-disabled="isDisabled"
|
||||||
class="btn d-flex align-items-center py-3 px-4 delay"
|
class="btn d-flex align-items-center py-3 px-4 delay"
|
||||||
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '', isLoaderDisplayed ? 'has-loader' : '']"
|
:class="[isPrimary ? 'btn-primary' : 'btn-secondary',isFloat ? 'float-end' : '', isLoaderDisplayed ? 'has-loader' : '']"
|
||||||
@click="clicked()"
|
@click="clicked"
|
||||||
>
|
>
|
||||||
<span class="m-0">{{ this.buttonText }}</span>
|
<span class="m-0">{{ this.buttonText }}</span>
|
||||||
<loader
|
<loader
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue