From 296d916f1a526c8f800a9c5be38ba4cf5adcfeec Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 26 Nov 2021 11:00:58 +0100 Subject: [PATCH] Call apollo query to get the countPendingCreations value. added an update to the store of this value, call it when overview is created. --- admin/src/graphql/getCountPendingCreations.js | 7 +++++++ admin/src/pages/Overview.vue | 17 +++++++++++++++++ admin/src/store/store.js | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 admin/src/graphql/getCountPendingCreations.js diff --git a/admin/src/graphql/getCountPendingCreations.js b/admin/src/graphql/getCountPendingCreations.js new file mode 100644 index 000000000..f8593ee59 --- /dev/null +++ b/admin/src/graphql/getCountPendingCreations.js @@ -0,0 +1,7 @@ +import gql from 'graphql-tag' + +export const countPendingCreations = gql` + query { + countPendingCreations + } +` diff --git a/admin/src/pages/Overview.vue b/admin/src/pages/Overview.vue index 056bb14a6..d63c46199 100644 --- a/admin/src/pages/Overview.vue +++ b/admin/src/pages/Overview.vue @@ -76,7 +76,24 @@ diff --git a/admin/src/store/store.js b/admin/src/store/store.js index 140a92391..9559e3d58 100644 --- a/admin/src/store/store.js +++ b/admin/src/store/store.js @@ -18,6 +18,9 @@ export const mutations = { token: (state, token) => { state.token = token }, + setOpenCreations: (state, openCreations) => { + state.openCreations = openCreations + }, } export const actions = {