From 32ae0b0641659172f6140b86c3346029340ea2e2 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 19 Dec 2019 14:19:20 +0100 Subject: [PATCH] Add filter for my activity --- .../src/components/profile/ActivityFilter.vue | 49 +++++++++++++++++++ .../src/components/profile/ModuleActivity.vue | 10 +++- client/src/pages/activity.vue | 20 ++++++-- 3 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 client/src/components/profile/ActivityFilter.vue diff --git a/client/src/components/profile/ActivityFilter.vue b/client/src/components/profile/ActivityFilter.vue new file mode 100644 index 00000000..06932132 --- /dev/null +++ b/client/src/components/profile/ActivityFilter.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/client/src/components/profile/ModuleActivity.vue b/client/src/components/profile/ModuleActivity.vue index 7f1abc0f..67b35972 100644 --- a/client/src/components/profile/ModuleActivity.vue +++ b/client/src/components/profile/ModuleActivity.vue @@ -6,11 +6,13 @@ {{submission.text}} {{answer.survey.title}} @@ -18,16 +20,19 @@ {{bookmark.chapter.description}} {{note.text}} @@ -45,7 +50,7 @@ import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql'; export default { - props: ['module'], + props: ['module', 'filter'], components: { ContentBookmark, ActivityEntry @@ -77,6 +82,9 @@ } }); this.$router.push(url); + }, + applyFilter(filterCriteria) { + return !this.filter || this.filter === filterCriteria; } } } diff --git a/client/src/pages/activity.vue b/client/src/pages/activity.vue index 4a649395..6a53f648 100644 --- a/client/src/pages/activity.vue +++ b/client/src/pages/activity.vue @@ -1,21 +1,30 @@