From 225072bff7e6d1963ec5409b17a86742c0804011 Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Mon, 25 Nov 2024 18:17:56 +0100 Subject: [PATCH] started implementing organizationFolder-settings view, subresources are not listed in resource-settings view --- src/Header.vue | 22 +++-- src/api.js | 14 +++ src/components/CreateResourceButton.vue | 26 ++++++ .../MemberList/ResourceMembersList.vue | 2 +- src/components/ResourceList.vue | 87 +++++++++++++++++++ src/router.js | 11 +++ src/stores/current-dir.js | 12 ++- src/views/OrganizationFolderSettings.vue | 27 ++++++ src/views/ResourceSettings.vue | 61 +++++++++++-- 9 files changed, 239 insertions(+), 23 deletions(-) create mode 100644 src/components/CreateResourceButton.vue create mode 100644 src/components/ResourceList.vue create mode 100644 src/views/OrganizationFolderSettings.vue diff --git a/src/Header.vue b/src/Header.vue index 7e5b2f9..d0da98a 100644 --- a/src/Header.vue +++ b/src/Header.vue @@ -15,17 +15,15 @@ const currentDir = useCurrentDirStore(); const modalOpen = ref(false); function openModal() { - if(currentDir.userManagerPermissions) { - if(currentDir.organizationFolderResourceId) { - router.push({ - path: '/resource/' + currentDir.organizationFolderResourceId - }); - } else { - router.push({ - path: '/organizationFolder/' + currentDir.organizationFolderId - }); - } - + if(currentDir.organizationFolderResourceId && currentDir.organizationFolderResourceUpdatePermissions) { + router.push({ + path: '/resource/' + currentDir.organizationFolderResourceId + }); + modalOpen.value = true; + } else if(currentDir.organizationFolderId && currentDir.organizationFolderUpdatePermissions) { + router.push({ + path: '/organizationFolder/' + currentDir.organizationFolderId + }); modalOpen.value = true; } } @@ -33,7 +31,7 @@ function openModal() {