From c15d1a49675017144fd7f8796555653d6a622582 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Sat, 25 Apr 2020 13:58:39 -0400 Subject: [PATCH] fix: navigation mode change not persisted --- client/components/admin/admin-navigation.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/client/components/admin/admin-navigation.vue b/client/components/admin/admin-navigation.vue index f6724d3e..639282bd 100644 --- a/client/components/admin/admin-navigation.vue +++ b/client/components/admin/admin-navigation.vue @@ -376,7 +376,7 @@ export default { try { const resp = await this.$apollo.mutate({ mutation: gql` - mutation ($tree: [NavigationTreeInput]!) { + mutation ($tree: [NavigationTreeInput]!, $mode: NavigationMode!) { navigation{ updateTree(tree: $tree) { responseResult { @@ -385,15 +385,24 @@ export default { slug message } + }, + updateConfig(mode: $mode) { + responseResult { + succeeded + errorCode + slug + message + } } } } `, variables: { - tree: this.trees + tree: this.trees, + mode: this.config.mode } }) - if (_.get(resp, 'data.navigation.updateTree.responseResult.succeeded', false)) { + if (_.get(resp, 'data.navigation.updateTree.responseResult.succeeded', false) && _.get(resp, 'data.navigation.updateConfig.responseResult.succeeded', false)) { this.$store.commit('showNotification', { message: this.$t('navigation.saveSuccess'), style: 'success',