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>
|
<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>-->
|
<!-- <small class="text-danger" v-if="errors.name">{{errors.name}}</small>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<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">
|
<Field name="brand" class="form-select" v-model="brand" id="brand" as="select">
|
||||||
<label for="brand">Marke</label>
|
|
||||||
<option v-for="brand in brands" :key="brand.schluessel" :value="brand.schluessel" >{{brand.name}}</option>
|
<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>
|
<small class="text-danger" v-if="errors.brand">{{errors.brand}}</small>
|
||||||
</Field>
|
</Field>
|
||||||
|
</div>
|
||||||
</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="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
@ -76,11 +103,18 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
const schema = yup.object().shape({
|
const schema = yup.object().shape({
|
||||||
name: yup.string()
|
name: yup.string()
|
||||||
.required("Name wird benötigt")
|
.required("Name wird benötigt")
|
||||||
.trim(),
|
.trim(),
|
||||||
brand: yup.string()
|
brand: yup.string()
|
||||||
.required("Makre wird benötigt")
|
.required("Marke wird benötigt")
|
||||||
.trim()
|
.trim(),
|
||||||
|
condition: yup.string()
|
||||||
|
.required("Zustand wird benötigt")
|
||||||
|
.trim(),
|
||||||
|
buildtype: yup.string()
|
||||||
|
.required("Bauform wird benötigt")
|
||||||
|
.trim(),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -90,7 +124,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["activeCamera", "brands"]),
|
...mapGetters(["activeCamera", "brands", "conditions", "buildtypes"]),
|
||||||
errorDisplayText() {
|
errorDisplayText() {
|
||||||
if(this.error) {
|
if(this.error) {
|
||||||
return "Es ist ein Fehler aufgetreten"
|
return "Es ist ein Fehler aufgetreten"
|
||||||
|
|
Loading…
Reference in New Issue