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"
/>
@@ -53,6 +54,12 @@
}
};
},
+
+ methods: {
+ editTeamName() {
+ this.$store.dispatch('editTeamName');
+ }
+ }
};
diff --git a/client/src/store/index.js b/client/src/store/index.js
index abd69f39..4d0722f5 100644
--- a/client/src/store/index.js
+++ b/client/src/store/index.js
@@ -185,9 +185,12 @@ export default new Vuex.Store({
editModule({commit}, payload) {
commit('setEditModule', payload);
},
- editClassName({dispatch}, payload) {
+ editClassName({dispatch}) {
dispatch('showModal', 'edit-class-name-wizard');
},
+ editTeamName({dispatch}) {
+ dispatch('showModal', 'edit-team-name-wizard');
+ },
deactivateUser({commit, dispatch}, payload) {
commit('setModulePayload', payload);
return dispatch('showModal', 'deactivate-person');
diff --git a/schema.graphql b/schema.graphql
index a1480fd3..9bedcc40 100644
--- a/schema.graphql
+++ b/schema.graphql
@@ -378,6 +378,7 @@ type CustomMutation {
updateOnboardingProgress: UpdateOnboardingProgress
createTeam(input: CreateTeamInput!): CreateTeamPayload
joinTeam(input: JoinTeamInput!): JoinTeamPayload
+ updateTeam(input: UpdateTeamInput!): UpdateTeamPayload
addProject(input: AddProjectInput!): AddProjectPayload
updateProject(input: UpdateProjectInput!): UpdateProjectPayload
deleteProject(input: DeleteProjectInput!): DeleteProjectPayload
@@ -1300,6 +1301,18 @@ type UpdateSubmissionFeedbackPayload {
clientMutationId: String
}
+input UpdateTeamInput {
+ id: ID!
+ name: String
+ clientMutationId: String
+}
+
+type UpdateTeamPayload {
+ success: Boolean
+ team: TeamNode
+ clientMutationId: String
+}
+
input UserGroupBlockVisibility {
schoolClassId: ID!
hidden: Boolean!