mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:01:08 +02:00
Wenn-Dann-Logik für Form-Felder (docs/plans/forms-module.md M4 — Teil 1): - lib/branching.ts: pure resolveVisibleFields(fields, branching, answers) — gibt sichtbare Subset-Liste zurück, Reihenfolge wie Original. Operatoren equals/not_equals/contains/is_empty mit Array-aware Matching (multi_choice + scalar in beide Richtungen). Aktionen show/hide/skip_to. show überschreibt hide bei doppelten Treffern (last-write-wins Layering, in Deklarations-Reihenfolge). skip_to versteckt alle Felder strikt zwischen Anchor und Target. Section/consent-Felder bleiben unbeeinflusst (kein answer-state). - lib/branching.spec.ts: 11/11 Vitest-Cases — keine Regeln, hide+show Kombinationen, skip_to, contains-on-multi-choice, not_equals, is_empty (null/undefined/''/[]/false), Layering, fehlerhafte Refs, Order-Erhalt. - components/BranchingEditor.svelte: top-level Builder-Sektion zum Anlegen/Editieren/Löschen von Regeln. Pro Regel: IF-Feld + Operator + Wert-Input (außer is_empty), THEN-Action + Target-Chips (multi-select für show/hide) bzw. einzelnes Feld (skip_to). Empty-State warnt wenn weniger als 2 Antwortfelder existieren. - formsStore.updateBranching(id, rules) — encrypted-aware update. - Wired in BuilderView als Section zwischen Fields und Settings. - 18 neue i18n-Keys × 5 Locales (forms.branching.* + .op.* + .action.*). Total Forms-Tests: 16/16 grün (5 csv + 11 branching). svelte-check: 0 errors in forms/. Pre-existing drift in context-removal-Spuren auf main ist Parallel-Session-WIP, nicht durch mich. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| calc/packages/shared | ||
| calendar | ||
| cards | ||
| chat | ||
| citycorners | ||
| contacts | ||
| context | ||
| docs | ||
| food | ||
| guides | ||
| inventory | ||
| mana | ||
| manavoxel | ||
| memoro | ||
| moodlit | ||
| mukke | ||
| news | ||
| photos | ||
| picture | ||
| plants | ||
| presi | ||
| questions | ||
| quotes/packages/content | ||
| skilltree | ||
| storage | ||
| times | ||
| todo | ||
| traces | ||
| uload | ||