From 5d48f42ffed6599e5344a300e375dab8a8e141bb Mon Sep 17 00:00:00 2001 From: Pawel Kowalski Date: Tue, 14 Aug 2018 16:41:20 +0200 Subject: [PATCH] Adds scaffold for objectives --- client/src/components/Module.vue | 34 ++++++++++++++++++- client/src/components/ObjectiveGroup.vue | 12 ++++++- client/src/graphql/gql/moduleDetailsQuery.gql | 3 +- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/client/src/components/Module.vue b/client/src/components/Module.vue index 12cac3a6..41000079 100644 --- a/client/src/components/Module.vue +++ b/client/src/components/Module.vue @@ -25,11 +25,43 @@ import ObjectiveGroup from '@/components/ObjectiveGroup.vue'; export default { + name: 'module', + components: { ObjectiveGroup }, - props: ['module'] + props: { + module: { + required: true, + type: Object + } + }, + + data() { + return { + } + }, + + // apollo: { + // categories: { + // query: CATEGORIES_QUERY, + // variables: { + // username: 'test' + // }, + // fetchPolicy: 'network-only', + // manual: true, + // result(data, loading, networkStatus) { + // if (!loading) { + // this.categories = data.data.categories.edges.map(entry => entry.node) + // this.modules = data.data.userModules.edges.map(entry => ({'status': entry.node.status, ...entry.node.module})) + // } + // } + // } + // } + + created() { + } } diff --git a/client/src/components/ObjectiveGroup.vue b/client/src/components/ObjectiveGroup.vue index 11950851..3e5aa8fe 100644 --- a/client/src/components/ObjectiveGroup.vue +++ b/client/src/components/ObjectiveGroup.vue @@ -13,7 +13,17 @@ diff --git a/client/src/graphql/gql/moduleDetailsQuery.gql b/client/src/graphql/gql/moduleDetailsQuery.gql index 65cf18d9..55b21adb 100644 --- a/client/src/graphql/gql/moduleDetailsQuery.gql +++ b/client/src/graphql/gql/moduleDetailsQuery.gql @@ -4,7 +4,8 @@ query ModulesQuery($slug: String!) { node { id title - aSlug: slug + metaTitle + slug objectivegroupSet { edges { node {