From 5f7b1c90949730592afb41259ea5187a76eaf46a Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 5 Sep 2022 13:26:00 +0200 Subject: [PATCH] new group mutation with correct data --- webapp/components/GroupForm/GroupForm.vue | 24 ++++++++++++++++++++--- webapp/pages/group/create.vue | 16 ++++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/webapp/components/GroupForm/GroupForm.vue b/webapp/components/GroupForm/GroupForm.vue index 41348278e..7b72b8616 100644 --- a/webapp/components/GroupForm/GroupForm.vue +++ b/webapp/components/GroupForm/GroupForm.vue @@ -18,10 +18,16 @@ icon="user" v-model="formData.status" label="Sichtbarkeit" - :options="['offen', 'geschlossen', 'geheim']" + :options="['public', 'close', 'hidden']" placeholder="Status ..." > + + + + category.id) : [], }, formSchema: { name: { required: true, min: 3, max: 100 }, - description: { required: true }, status: { required: true }, + about: { required: true }, + description: { required: true }, + radius: { required: true }, categoryIds: { type: 'array', required: this.categoriesActive, diff --git a/webapp/pages/group/create.vue b/webapp/pages/group/create.vue index 4526188d7..eddeb7345 100644 --- a/webapp/pages/group/create.vue +++ b/webapp/pages/group/create.vue @@ -28,17 +28,19 @@ export default { }, methods: { async createGroup(form) { + console.log("createGroup", form) + console.log("createGroup form.categoryIds", form.categoryIds) + console.log("createGroup form.radius", form.radius) try { await this.$apollo.mutate({ mutation: createGroupMutation, variables: { - name: 'Gruppenname', - about: 'About', - description: - 'Description Description Description Description Description Description Description Description Description Description Description Description ', - groupType: 'public', - actionRadius: 'regional', - categoryIds: ['cat15', 'cat5', 'cat1'], + name: form.name, + about: form.about, + description: form.description, + groupType: form.status, + actionRadius: form.radius, + categoryIds: form.formData.categoryIds, }, update: (_, { data: { createGroupData } }) => { // const { sendNotificationEmails } = createGroup