From a78c88d2287cc86fde5e15d90757a06c5f6c0705 Mon Sep 17 00:00:00 2001 From: bnitsch Date: Mon, 22 Jul 2024 08:30:02 +0200 Subject: [PATCH] #434: Show specific error message in FE via Toast pop up. * If you want to start a study with e.g. an empty lime survey id, a Toast pop up will be shown, that the ID is missing. * Add global Toast component to show erroneous API response. * Add html required attribute if property is required (not only a * symbol next to the label). * Add trim to v-model for String properties, to trim whitespaced on users input. * Add error translations. * Replace alter messages with Toast pop ups. --- src/App.vue | 6 + src/components/TimelineList.vue | 1 - src/components/dialog/ObservationDialog.vue | 21 ++-- .../dialog/shared/BooleanPropertyInput.vue | 7 +- .../dialog/shared/IntegerPropertyInput.vue | 7 +- .../shared/ObservationPropertyInput.vue | 7 +- .../dialog/shared/StringListPropertyInput.vue | 8 +- .../dialog/shared/StringPropertyInput.vue | 9 +- .../dialog/shared/StringTextPropertyInput.vue | 7 +- src/composable/toastService.ts | 114 ++++++++++++++++++ src/i18n/de.json | 10 ++ src/i18n/en.json | 10 ++ src/main.ts | 2 + src/stores/studyStore.ts | 9 +- src/styles/more-light/theme.pcss | 1 - src/views/StudyOverview.vue | 16 ++- 16 files changed, 192 insertions(+), 43 deletions(-) create mode 100644 src/composable/toastService.ts diff --git a/src/App.vue b/src/App.vue index a9257b7d..67deaa38 100644 --- a/src/App.vue +++ b/src/App.vue @@ -4,10 +4,15 @@ Prevention -- A research institute of the Ludwig Boltzmann Gesellschaft, Oesterreichische Vereinigung zur Foerderung der wissenschaftlichen Forschung). Licensed under the Elastic License 2.0. */