From 02b93d2298e9eaa3bc7bda78583b514f5d1c4c67 Mon Sep 17 00:00:00 2001 From: carlobeltrame Date: Fri, 9 Aug 2024 22:40:35 +0200 Subject: [PATCH] Add notes only row type for evaluation grids --- app/Models/EvaluationGridRowTemplate.php | 2 +- lang/de/t.php | 1 + .../components/evaluationGrid/InputEvaluationGridRow.vue | 4 ++-- .../components/print/evaluationGrid/EvaluationGridRow.jsx | 7 +++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/Models/EvaluationGridRowTemplate.php b/app/Models/EvaluationGridRowTemplate.php index 7ad1bbdb..8dd1f9f6 100644 --- a/app/Models/EvaluationGridRowTemplate.php +++ b/app/Models/EvaluationGridRowTemplate.php @@ -13,7 +13,7 @@ */ class EvaluationGridRowTemplate extends Model { - const CONTROL_TYPES = ['slider', 'radiobuttons', 'checkbox', 'heading']; + const CONTROL_TYPES = ['slider', 'radiobuttons', 'checkbox', 'heading', 'notes_only']; /** * The table associated with the model. diff --git a/lang/de/t.php b/lang/de/t.php index f364811e..11343e5c 100644 --- a/lang/de/t.php +++ b/lang/de/t.php @@ -119,6 +119,7 @@ "radiobuttons" => "➖ / ➕ / ✨", "slider" => "Skala von 1 - 10", "heading" => "Zwischentitel", + "notes_only" => "Nur Notizfeld", ), "criterion" => "Kriterium", "order" => "Sortierreihenfolge" diff --git a/resources/js/components/evaluationGrid/InputEvaluationGridRow.vue b/resources/js/components/evaluationGrid/InputEvaluationGridRow.vue index 87b45333..6e216047 100644 --- a/resources/js/components/evaluationGrid/InputEvaluationGridRow.vue +++ b/resources/js/components/evaluationGrid/InputEvaluationGridRow.vue @@ -4,13 +4,13 @@
-
+
-
+
{ fixNewlines(rowTemplate.criterion) } } + if (rowTemplate.control_type === 'notes_only') { + return + {fixNewlines(rowTemplate.criterion)} + {fixNewlines(row?.notes || '')} + + } + return {fixNewlines(rowTemplate.criterion)}