select Brand
This commit is contained in:
parent
a3ccd6c134
commit
b144d0cc19
|
@ -33,15 +33,42 @@
|
|||
<Field as="input" name="name" :value="activeCamera.name" type="text" class="form-control" id="name"></Field>
|
||||
<!-- <small class="text-danger" v-if="errors.name">{{errors.name}}</small>-->
|
||||
</div>
|
||||
<div class="row">
|
||||
<Field name="brand" class="form-select" v-model="brand" id="brand" as="select">
|
||||
<div class="row mt-4">
|
||||
<div class="col-3">
|
||||
<label for="brand">Marke</label>
|
||||
</div>
|
||||
|
||||
<div class="col-9">
|
||||
<Field name="brand" class="form-select" v-model="brand" id="brand" as="select">
|
||||
<option v-for="brand in brands" :key="brand.schluessel" :value="brand.schluessel" >{{brand.name}}</option>
|
||||
<small class="text-danger" v-if="errors.brand">{{errors.brand}}</small>
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-3">
|
||||
<label for="condition">Zustand</label>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<Field name="condition" class="form-select" v-model="condition" id="condition" as="select">
|
||||
<option v-for="condition in conditions" :key="condition.schluessel" :value="condition.schluessel" >{{condition.name}}</option>
|
||||
<small class="text-danger" v-if="errors.condition">{{errors.condition}}</small>
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-3">
|
||||
<label for="buildtype">Bauform</label>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<Field name="buildtype" class=" form-select" v-model="buildtype" id="buildtype" as="select">
|
||||
<option v-for="buildtype in buildtypes" :key="buildtype.schluessel" :value="buildtype.schluessel" >{{buildtype.name}}</option>
|
||||
<small class="text-danger" v-if="errors.buildtype">{{errors.buildtype}}</small>
|
||||
</Field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
@ -79,8 +106,15 @@ export default {
|
|||
.required("Name wird benötigt")
|
||||
.trim(),
|
||||
brand: yup.string()
|
||||
.required("Makre wird benötigt")
|
||||
.trim()
|
||||
.required("Marke wird benötigt")
|
||||
.trim(),
|
||||
condition: yup.string()
|
||||
.required("Zustand wird benötigt")
|
||||
.trim(),
|
||||
buildtype: yup.string()
|
||||
.required("Bauform wird benötigt")
|
||||
.trim(),
|
||||
|
||||
});
|
||||
|
||||
return {
|
||||
|
@ -90,7 +124,7 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["activeCamera", "brands"]),
|
||||
...mapGetters(["activeCamera", "brands", "conditions", "buildtypes"]),
|
||||
errorDisplayText() {
|
||||
if(this.error) {
|
||||
return "Es ist ein Fehler aufgetreten"
|
||||
|
|
Loading…
Reference in New Issue