From b84aa504430024bf21b57753bd709fd0d7a6b0b0 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 25 Mar 2021 17:58:52 +0100 Subject: [PATCH] Add update team name mutation and modal --- client/src/App.vue | 3 +- .../components/profile/EditTeamNameWizard.vue | 69 +++++++++++++++++++ .../src/graphql/gql/mutations/updateTeam.gql | 8 +++ client/src/pages/me/joinTeam.vue | 1 + client/src/pages/me/myTeam.vue | 7 ++ client/src/store/index.js | 5 +- schema.graphql | 13 ++++ 7 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 client/src/components/profile/EditTeamNameWizard.vue create mode 100644 client/src/graphql/gql/mutations/updateTeam.gql diff --git a/client/src/App.vue b/client/src/App.vue index 540e74da..2680ec21 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -11,7 +11,6 @@ :is="showModal" v-if="showModal"/> - @@ -32,6 +31,7 @@ import NewNoteWizard from '@/components/notes/NewNoteWizard'; import EditNoteWizard from '@/components/notes/EditNoteWizard'; import EditClassNameWizard from '@/components/school-class/EditClassNameWizard'; + import EditTeamNameWizard from '@/components/profile/EditTeamNameWizard'; import FullscreenImage from '@/components/FullscreenImage'; import FullscreenInfographic from '@/components/FullscreenInfographic'; import FullscreenVideo from '@/components/FullscreenVideo'; @@ -60,6 +60,7 @@ NewNoteWizard, EditNoteWizard, EditClassNameWizard, + EditTeamNameWizard, FullscreenImage, FullscreenInfographic, FullscreenVideo, diff --git a/client/src/components/profile/EditTeamNameWizard.vue b/client/src/components/profile/EditTeamNameWizard.vue new file mode 100644 index 00000000..7e2cf48a --- /dev/null +++ b/client/src/components/profile/EditTeamNameWizard.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/client/src/graphql/gql/mutations/updateTeam.gql b/client/src/graphql/gql/mutations/updateTeam.gql new file mode 100644 index 00000000..d3f74c42 --- /dev/null +++ b/client/src/graphql/gql/mutations/updateTeam.gql @@ -0,0 +1,8 @@ +mutation UpdateTeam($input: UpdateTeamInput!) { + updateTeam(input: $input) { + success + team { + name + } + } +} diff --git a/client/src/pages/me/joinTeam.vue b/client/src/pages/me/joinTeam.vue index 2838f5c6..ed3910c5 100644 --- a/client/src/pages/me/joinTeam.vue +++ b/client/src/pages/me/joinTeam.vue @@ -38,6 +38,7 @@ this.$router.push(this.teamRoute); }, joinTeam(code) { + // todo console.log('joinTeam', code); }, }, diff --git a/client/src/pages/me/myTeam.vue b/client/src/pages/me/myTeam.vue index 43f09980..c883884b 100644 --- a/client/src/pages/me/myTeam.vue +++ b/client/src/pages/me/myTeam.vue @@ -8,6 +8,7 @@ :show-code="true" :name="me.team.name" title="Mein Team" + @edit="editTeamName" />