From 363ca84cd190bf12c7f12f6526ac3077ffb06bb2 Mon Sep 17 00:00:00 2001 From: Thijn Date: Thu, 31 Oct 2024 15:49:50 +0100 Subject: [PATCH 1/3] fixed creating publication from dashboard --- src/sidebars/dashboard/DashboardSideBar.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sidebars/dashboard/DashboardSideBar.vue b/src/sidebars/dashboard/DashboardSideBar.vue index 966e801e..0f79744b 100644 --- a/src/sidebars/dashboard/DashboardSideBar.vue +++ b/src/sidebars/dashboard/DashboardSideBar.vue @@ -296,7 +296,7 @@ export default { // step 2: get the full publicationType's from the publicationTypeIds const filteredPublicationType = this.publicationTypeList - .filter((publicationType) => selectedCatalogus.publicationType.includes(publicationType.source)) + .filter((publicationType) => selectedCatalogus.publicationTypes.map(String).includes(publicationType.id.toString())) return { options: filteredPublicationType.map((publicationType) => ({ @@ -385,7 +385,7 @@ export default { body: JSON.stringify({ ...this.publicationItem, catalog: this.catalogi.value.id, - publicationType: this.publicationType.value.source, + publicationType: this.publicationType.value.id, }), }, ) @@ -445,8 +445,6 @@ export default { body: JSON.stringify({ ...publicationItem, attachments: [...publicationItem.attachments, response.data.id], - catalog: publicationItem.catalogi.id, - publicationType: publicationItem.publicationType, }), }, ) From eb5fb4a9409734f20d68321559a58d4189928688 Mon Sep 17 00:00:00 2001 From: Thijn Date: Fri, 1 Nov 2024 09:01:17 +0100 Subject: [PATCH 2/3] console error fix --- src/sidebars/dashboard/DashboardSideBar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sidebars/dashboard/DashboardSideBar.vue b/src/sidebars/dashboard/DashboardSideBar.vue index 966e801e..04587d12 100644 --- a/src/sidebars/dashboard/DashboardSideBar.vue +++ b/src/sidebars/dashboard/DashboardSideBar.vue @@ -401,7 +401,7 @@ export default { publicationStore.refreshPublicationList() // Wait for the user to read the feedback then close the model setTimeout(this.cleanup, 2000) - if (!files.value && files.value.length === 0) { + if (!files.value && files.value?.length === 0) { setTimeout(this.success = null, 2000) } }) From 4ed0af9c663b3162ea8915cb4147c7ca0fa7ec4e Mon Sep 17 00:00:00 2001 From: Thijn Date: Fri, 1 Nov 2024 15:31:26 +0100 Subject: [PATCH 3/3] made attachment upload text more accurate --- src/views/publications/PublicationDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/publications/PublicationDetail.vue b/src/views/publications/PublicationDetail.vue index d89fe77b..a3d9b0f2 100644 --- a/src/views/publications/PublicationDetail.vue +++ b/src/views/publications/PublicationDetail.vue @@ -192,7 +192,7 @@ import { ref } from 'vue'

- Sleep bestanden hierheen om ze te uploaden + Sleep bestand hierheen om te uploaden