From 9f5d35f7bab74b5ee5db6ff7cb0a519fc8650e0d Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Wed, 19 Mar 2025 13:28:02 +0100 Subject: [PATCH] hotfix: enhance dataset creation and modal styling - Added `@adonisjs/bodyparser` as a dependency. - Improved the layout and styling of the consent modal in `Create.vue`. - Enhanced the placeholder text for reference values in `Create.vue`. - Added a default empty string for the subject in `Create.vue`. - Updated the styling of the `CardBoxModal` component. --- package-lock.json | 1 + package.json | 1 + resources/js/Components/CardBoxModal.vue | 4 +- .../js/Pages/Submitter/Dataset/Create.vue | 62 +++++++++++-------- 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6cf37e3..14d7224 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "1.0.0", "dependencies": { "@adonisjs/auth": "^9.2.4", + "@adonisjs/bodyparser": "^10.0.3", "@adonisjs/core": "^6.17.0", "@adonisjs/cors": "^2.2.1", "@adonisjs/drive": "^3.2.0", diff --git a/package.json b/package.json index cf45027..07f4e7e 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ }, "dependencies": { "@adonisjs/auth": "^9.2.4", + "@adonisjs/bodyparser": "^10.0.3", "@adonisjs/core": "^6.17.0", "@adonisjs/cors": "^2.2.1", "@adonisjs/drive": "^3.2.0", diff --git a/resources/js/Components/CardBoxModal.vue b/resources/js/Components/CardBoxModal.vue index 6e7f9aa..b0fdf01 100644 --- a/resources/js/Components/CardBoxModal.vue +++ b/resources/js/Components/CardBoxModal.vue @@ -61,10 +61,10 @@ const cancel = () => confirmCancel('cancel');

diff --git a/resources/js/Pages/Submitter/Dataset/Create.vue b/resources/js/Pages/Submitter/Dataset/Create.vue index 934c320..8c8373e 100644 --- a/resources/js/Pages/Submitter/Dataset/Create.vue +++ b/resources/js/Pages/Submitter/Dataset/Create.vue @@ -98,23 +98,23 @@ const flash: ComputedRef = computed(() => { // Computed property to determine the placeholder based on the selected option const getPlaceholder = computed(() => (type: string) => { - + switch (type) { - case 'DOI': - return 'https://doi.org/10.24341/tethys.236'; - case 'Handle': - return '20.500.12345/67890'; - case 'ISBN': - return '978-3-85316-076-3'; - case 'ISSN': - return '1234-5678'; - case 'URL': - return 'https://example.com'; - case 'URN': - return 'urn:nbn:de:1234-5678'; - default: - return '[VALUE]'; - } + case 'DOI': + return 'https://doi.org/10.24341/tethys.236'; + case 'Handle': + return '20.500.12345/67890'; + case 'ISBN': + return '978-3-85316-076-3'; + case 'ISSN': + return '1234-5678'; + case 'URL': + return 'https://example.com'; + case 'URN': + return 'urn:nbn:de:1234-5678'; + default: + return '[VALUE]'; + } }); const mainService = MainService(); @@ -462,7 +462,7 @@ const onMapInitialized = (newItem: any) => { adds a new Keyword */ const addKeyword = () => { - let newSubject: Subject = { value: 'test', language: '', type: 'uncontrolled' }; + let newSubject: Subject = { value: '', language: '', type: 'uncontrolled' }; //this.dataset.files.push(uploadedFiles[i]); form.subjects.push(newSubject); }; @@ -499,16 +499,25 @@ Removes a selected keyword