From a3ccd6c13448f82b99adccdfa2a8f6677e164854 Mon Sep 17 00:00:00 2001 From: Thomas Mack Date: Mon, 28 Mar 2022 09:10:52 +0200 Subject: [PATCH] select Brand --- src/components/camera/CameraEditDetail.vue | 29 ++++++++++++---------- src/store/modules/camera/index.ts | 8 +++--- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/components/camera/CameraEditDetail.vue b/src/components/camera/CameraEditDetail.vue index 268b674..b0b25a3 100644 --- a/src/components/camera/CameraEditDetail.vue +++ b/src/components/camera/CameraEditDetail.vue @@ -29,23 +29,23 @@
-
- {{errors.name}} - -
-
-
- -
-
+
+
+ + + + {{errors.brand}} + +
+ + +
- Lorem + {{activeCamera.description}}
@@ -77,6 +77,9 @@ export default { const schema = yup.object().shape({ name: yup.string() .required("Name wird benötigt") + .trim(), + brand: yup.string() + .required("Makre wird benötigt") .trim() }); @@ -87,7 +90,7 @@ export default { } }, computed: { - ...mapGetters(["activeCamera"]), + ...mapGetters(["activeCamera", "brands"]), errorDisplayText() { if(this.error) { return "Es ist ein Fehler aufgetreten" diff --git a/src/store/modules/camera/index.ts b/src/store/modules/camera/index.ts index de79fd2..cc3a5f1 100644 --- a/src/store/modules/camera/index.ts +++ b/src/store/modules/camera/index.ts @@ -167,10 +167,10 @@ const actions = { ) context.dispatch("fetchCameras"); - // context.dispatch("fetchBrands"); - // context.dispatch("fetchBuildTypes"); - // context.dispatch("fetchCondition"); - // context.commit("setInitialized", true); + context.dispatch("fetchBrands"); + context.dispatch("fetchBuildTypes"); + context.dispatch("fetchCondition"); + context.commit("setInitialized", true); } };