diff --git a/src/modules/modals/CreateContext.vue b/src/modules/modals/CreateContext.vue index 05b17e396..b5810ce85 100644 --- a/src/modules/modals/CreateContext.vue +++ b/src/modules/modals/CreateContext.vue @@ -104,7 +104,7 @@ export default { } else { const newContextId = await this.sendNewContextToBE() if (newContextId) { - await this.$router.push('/context/' + newContextId) + await this.$router.push('/application/' + newContextId) this.actionCancel() } } diff --git a/src/modules/modals/EditContext.vue b/src/modules/modals/EditContext.vue index 82cdcc2d4..932524599 100644 --- a/src/modules/modals/EditContext.vue +++ b/src/modules/modals/EditContext.vue @@ -50,7 +50,7 @@ import { NcModal, NcEmojiPicker, NcButton } from '@nextcloud/vue' import { showError, showSuccess } from '@nextcloud/dialogs' import '@nextcloud/dialogs/dist/index.css' -import { mapGetters } from 'vuex' +import { mapGetters, mapState } from 'vuex' import NcContextResource from '../../shared/components/ncContextResource/NcContextResource.vue' import { NODE_TYPE_TABLE, NODE_TYPE_VIEW } from '../../shared/constants.js' @@ -83,6 +83,7 @@ export default { }, computed: { ...mapGetters(['getContext']), + ...mapState(['tables', 'views']), localContext() { return this.getContext(this.contextId) }, @@ -146,10 +147,10 @@ export default { }, getContextResources(context) { const resources = [] - const nodes = Object.values(context) + const nodes = Object.values(context.nodes) for (const node of nodes) { if (parseInt(node.node_type) === NODE_TYPE_TABLE || parseInt(node.node_type) === NODE_TYPE_VIEW) { - const element = parseInt(node.node_type) === NODE_TYPE_TABLE ? this.tables.find(t => t.id === node.id) : this.views.find(v => v.id === node.id) + const element = parseInt(node.node_type) === NODE_TYPE_TABLE ? this.tables.find(t => t.id === node.node_id) : this.views.find(v => v.id === node.node_id) if (element) { const elementKey = parseInt(node.node_type) === NODE_TYPE_TABLE ? 'table-' : 'view-' const resource = { diff --git a/src/modules/navigation/partials/NavigationContextItem.vue b/src/modules/navigation/partials/NavigationContextItem.vue index 4db984624..c304119cf 100644 --- a/src/modules/navigation/partials/NavigationContextItem.vue +++ b/src/modules/navigation/partials/NavigationContextItem.vue @@ -23,7 +23,7 @@