-
Klasse: {{currentClassSelection.name}}
+
+
+
-
-
+
- {{schoolClass.name}}
-
+ {{schoolClass.name}}
+
+
+
diff --git a/client/src/graphql/client.js b/client/src/graphql/client.js
index 9ae5251c..17128bd9 100644
--- a/client/src/graphql/client.js
+++ b/client/src/graphql/client.js
@@ -111,6 +111,10 @@ export default function (uri, networkErrorCallback) {
helloEmail: {
__typename: 'HelloEmail',
email: ''
+ },
+ sidebar: {
+ __typename: 'Sidebar',
+ open: false
}
}
});
diff --git a/client/src/graphql/gql/local/mutations/toggleSidebar.gql b/client/src/graphql/gql/local/mutations/toggleSidebar.gql
new file mode 100644
index 00000000..fc32729e
--- /dev/null
+++ b/client/src/graphql/gql/local/mutations/toggleSidebar.gql
@@ -0,0 +1,3 @@
+mutation($open: Boolean!) {
+ toggleSidebar(open: $open) @client
+}
diff --git a/client/src/graphql/gql/local/sidebar.gql b/client/src/graphql/gql/local/sidebar.gql
new file mode 100644
index 00000000..4cdb1bc6
--- /dev/null
+++ b/client/src/graphql/gql/local/sidebar.gql
@@ -0,0 +1,5 @@
+query Sidebar {
+ sidebar @client {
+ open
+ }
+}
diff --git a/client/src/graphql/gql/mutations/joinClass.gql b/client/src/graphql/gql/mutations/joinClass.gql
new file mode 100644
index 00000000..025ff5b7
--- /dev/null
+++ b/client/src/graphql/gql/mutations/joinClass.gql
@@ -0,0 +1,9 @@
+mutation JoinClass($input: JoinClassInput!) {
+ joinClass(input: $input) {
+ success
+ schoolClass {
+ id
+ name
+ }
+ }
+}
diff --git a/client/src/graphql/resolvers.js b/client/src/graphql/resolvers.js
index 27a60133..11cd35eb 100644
--- a/client/src/graphql/resolvers.js
+++ b/client/src/graphql/resolvers.js
@@ -1,5 +1,6 @@
import SCROLL_POSITION from '@/graphql/gql/local/scrollPosition.gql';
import HELLO_EMAIL from '@/graphql/gql/local/helloEmail.gql';
+import SIDEBAR from '@/graphql/gql/local/sidebar.gql';
export const resolvers = {
Mutation: {
@@ -15,5 +16,11 @@ export const resolvers = {
cache.writeQuery({query: HELLO_EMAIL, data});
return data.helloEmail;
},
+ toggleSidebar: (_, {open}, {cache}) => {
+ const data = cache.readQuery({query: SIDEBAR});
+ data.sidebar.open = open;
+ cache.writeQuery({query: SIDEBAR, data});
+ return data.sidebar;
+ }
}
};
diff --git a/client/src/graphql/typedefs.js b/client/src/graphql/typedefs.js
index f1e6c9ff..c17dd4a3 100644
--- a/client/src/graphql/typedefs.js
+++ b/client/src/graphql/typedefs.js
@@ -9,6 +9,11 @@ export const typeDefs = gql`
email: String!
}
+
+ type Sidebar {
+ open: Boolean!
+ }
+
type Mutation {
scrollTo(scrollTo: String!): ScrollPosition
}
diff --git a/client/src/layouts/BlankLayout.vue b/client/src/layouts/BlankLayout.vue
index 0c7e4df8..932df5d7 100644
--- a/client/src/layouts/BlankLayout.vue
+++ b/client/src/layouts/BlankLayout.vue
@@ -1,5 +1,6 @@
@@ -14,9 +15,9 @@
diff --git a/client/src/layouts/DefaultLayout.vue b/client/src/layouts/DefaultLayout.vue
index b29dabc7..33ca3f48 100644
--- a/client/src/layouts/DefaultLayout.vue
+++ b/client/src/layouts/DefaultLayout.vue
@@ -1,5 +1,6 @@
+
@@ -13,11 +14,13 @@
diff --git a/client/src/pages/moduleRoom.vue b/client/src/pages/moduleRoom.vue
index 556f85de..3cf533b2 100644
--- a/client/src/pages/moduleRoom.vue
+++ b/client/src/pages/moduleRoom.vue
@@ -25,7 +25,7 @@