Commit Graph

20 Commits

Author SHA1 Message Date
Jürgen Mummert 5f9a77d5bd Set tstamp on record inserts/updates
Questions, editor assignments and conditions were inserted without tstamp,
so Contao rendered them with tstamp=0 -> the backend "draft" styling
(opacity .5), making question rows look greyed out despite being published.

- SurveyQuestionRepository::insert()/update() (covers create, edit, duplicate)
- SurveyEditorRepository::insert()
- SurveyConditionRepository::insert()
SurveyRepository already set tstamp. Also widened the assigned-members
checkbox-wizard columns at smaller breakpoints.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 22:31:25 +02:00
Jürgen Mummert d6227d9f4e Remove dead condition-editing code
The frontend condition create/edit path was never wired (no caller, no UI).
Conditions stay live where used: the SurveyFlowService reads tl_survey_condition
for jumps, the editor shows the read-only overview, and delete still works.

Removed:
- SurveyConditionEditorType (zero references)
- SurveyEditorService::saveCondition() + its SurveyConditionData import
- SurveyConditionData form model
- SurveyConditionRepository::update() (only caller was saveCondition)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 13:23:11 +02:00
Jürgen Mummert db7094fd1e Fix frontend CSRF, clean reader URLs, and review findings
CSRF / actions:
- List action forms now send both REQUEST_TOKEN (Contao gate) and _token
  (Symfony, validated via isCsrfTokenValid) — mirrors the editor; fixes
  the 400/500 "Ungültiger CSRF-Token" on publish/toggle/duplicate/delete

Public reader / URLs:
- Reader & results read auto_item via Input::get (marks the route param used)
  so clean path URLs /<page>/<alias> no longer 404
- List controller generates path URLs via ['parameters' => '/'.$alias]
- Allow re-participation in the same session after a 60s cooldown

Review fixes:
- Results: merge answer snapshots by questionId+type (no more split cards on
  label edits); seed "Vielleicht" when allowMaybe so screen matches Excel
- Reader: replace generic answer hint with per-option "weiter zu Frage X"
  only when a jump is configured; strip HTML tags from survey description
- PDF: render free-text frequency summary; drop duplicate "Minimum" label
- Drag-sort: bundle SortableJS locally, drop the duplicated inline sort CSS/JS
  from _survey_assets, throttle the backend MutationObserver
- Backend: move hardcoded tl_survey operation labels to TL_LANG (de+en)
- Remove dead code: SurveyEditorVoter, SurveyPermissionService,
  categoryFilter/categorySummary + helpers, orphaned publishSurvey lang key

Reader layout:
- max-width 1000px (other views keep 1400px); back/next buttons fill the
  width as equal, card-sized halves; sort handle icon offset tweak

Docs: update AI_HANDOVER (dual-token CSRF, clean URLs) and README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 13:00:05 +02:00
Jürgen Mummert 1b16675ae9 Add survey question drag-sort and backend assets
- Frontend editor: drag-to-sort questions with dedicated sort assets/JS
- Backend list/search refinements for tl_survey and tl_survey_content
- Repository helpers for survey/question/editor queries
- Translations and AI handover notes update
2026-06-14 09:13:07 +02:00
Jürgen Mummert 79c4402aee Fix survey reader back flow 2026-06-08 20:14:57 +02:00
Jürgen Mummert 99caf51af9 Refine survey template module layout 2026-06-08 20:01:08 +02:00
Jürgen Mummert 7843fca003 Add survey template list module 2026-06-08 19:45:20 +02:00
Jürgen Mummert d44f3be571 Add survey duplication actions 2026-06-08 14:06:32 +02:00
Jürgen Mummert b7bcdd8372 Clean up obsolete survey editor and DCA code 2026-06-07 22:16:37 +02:00
Jürgen Mummert 497b4f962d Fix backend survey action labels 2026-06-07 21:45:42 +02:00
Jürgen Mummert fb9a5b9ee6 Refine survey list layout and backend active toggle 2026-06-07 20:52:57 +02:00
Jürgen Mummert 59514c6911 Separate survey list controls from editor view 2026-06-07 20:31:31 +02:00
Jürgen Mummert 1174410c1b Refine survey editor workflow and publication handling 2026-05-29 10:19:19 +02:00
Jürgen Mummert a893078945 Refine survey editor flow and auth styling 2026-05-25 16:02:47 +02:00
Jürgen Mummert e204da60b6 Add German and English survey translations 2026-05-24 21:24:53 +02:00
Jürgen Mummert 6eec9ec537 Sanitize survey frontend and PDF output 2026-05-24 17:53:53 +02:00
Jürgen Mummert 6995f7dbd0 Fix frontend module template names 2026-05-24 16:37:57 +02:00
Jürgen Mummert ad9ab32a59 Fix backend survey frontend URL generation 2026-05-24 16:25:39 +02:00
Jürgen Mummert 633fbd2ad9 Hide survey alias field in backend 2026-05-24 16:20:04 +02:00
Jürgen Mummert b8475e3a57 Initial survey bundle import 2026-05-17 17:31:28 +02:00