diff --git a/CLAUDE.md b/CLAUDE.md index 5a7c3b7..9a8cb39 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -99,7 +99,7 @@ Application Form └── Form Elements (FormElement) ├── id (UUID - generated by backend) ├── reference (string - custom key like "art_der_massnahme") - ├── type (SELECT, CHECKBOX, RADIOBUTTON, TEXTFIELD, TEXTAREA, SWITCH, TITLE_BODY_TEXTFIELDS, DATE) + ├── type (SELECT, CHECKBOX, RADIOBUTTON, TEXTFIELD, TEXTAREA, SWITCH, RICH_TEXT, DATE) ├── title, description ├── options (FormOption[]) │ ├── value, label @@ -743,7 +743,7 @@ act -n - `GET /application-forms/{id}/html` - `GET /application-forms/{id}/pdf` - Verify these render correctly (with saved values): - - `TEXTFIELD`, `TEXTAREA`, `DATE`, `TITLE_BODY_TEXTFIELDS` + - `TEXTFIELD`, `TEXTAREA`, `DATE`, `RICH_TEXT` - `SELECT`, `RADIOBUTTON`, `CHECKBOX`, `SWITCH` - If you changed backend filtering or templating, ensure: - Template sections (`isTemplate=true`) remain excluded from export @@ -757,6 +757,9 @@ act -n 11. **Clean Code: order functions by abstraction (top-down, like a book)** - Put the highest-level, most readable entry points first (public API / primary flows), then progressively lower-level helpers below. - Keep functions at the same level of abstraction grouped together; details should live “later” (below) so the file reads top-to-bottom without jumping around. +12. **No hardcoded UI strings** (i18n) + - Never hardcode user-facing text in Vue components/composables. + - Always add UI strings to `legalconsenthub/i18n/locales/de.json` and `legalconsenthub/i18n/locales/en.json` and reference them via `$t()` / `useI18n()`. --- diff --git a/api/legalconsenthub.yml b/api/legalconsenthub.yml index 25bfe81..86e6def 100644 --- a/api/legalconsenthub.yml +++ b/api/legalconsenthub.yml @@ -1417,7 +1417,7 @@ components: - TEXTFIELD - TEXTAREA - SWITCH - - TITLE_BODY_TEXTFIELDS + - RICH_TEXT - DATE FormElementVisibilityCondition: diff --git a/legalconsenthub-backend/src/main/resources/templates/application_form_template.html b/legalconsenthub-backend/src/main/resources/templates/application_form_template.html index 24a6d83..b503c2a 100644 --- a/legalconsenthub-backend/src/main/resources/templates/application_form_template.html +++ b/legalconsenthub-backend/src/main/resources/templates/application_form_template.html @@ -173,12 +173,9 @@
Kein Datum ausgewählt
-Keine Eingabe
{{ formElementItem.formElement.title }}
{{ formElementItem.formElement.description }}
@@ -52,7 +52,7 @@
"
:content="{ align: 'end' }"
@update:open="
- (isOpen) =>
+ (isOpen: boolean) =>
handleDropdownToggle(
getElementKey(formElementItem.formElement, formElementItem.indexInSubsection),
isOpen
@@ -134,8 +134,8 @@ function getResolvedComponent(formElement: FormElementDto) {
return resolveComponent('TheInput')
case 'TEXTAREA':
return resolveComponent('TheTextarea')
- case 'TITLE_BODY_TEXTFIELDS':
- return resolveComponent('TheTitleBodyInput')
+ case 'RICH_TEXT':
+ return resolveComponent('TheEditor')
case 'DATE':
return resolveComponent('TheDate')
default:
diff --git a/legalconsenthub/app/components/formelements/TheEditor.vue b/legalconsenthub/app/components/formelements/TheEditor.vue
new file mode 100644
index 0000000..d8680dd
--- /dev/null
+++ b/legalconsenthub/app/components/formelements/TheEditor.vue
@@ -0,0 +1,106 @@
+
+