Commit graph

176 commits

Author SHA1 Message Date
Thorsten Bus b88ae3e918 feat(settings): SettingsController passes assignments, macros, labels, collections to Settings page 2026-05-04 00:26:56 +02:00
Thorsten Bus f494a8a0d7 feat(settings): add LabelImport, MacroImport, MacroAssignments, MacroPicker, LabelPicker components 2026-05-04 00:25:57 +02:00
Thorsten Bus c1cb9bf820 feat(settings): restructure Settings.vue into sidebar layout with 4 submenus + AgendaSettings.vue 2026-05-03 23:50:46 +02:00
Thorsten Bus 6ce5b6e018 feat(controllers): add macro/label import + global assignment + service override controllers and routes
- MacroImportController + LabelImportController: POST endpoints accepting uploaded .bin files,
  delegating to MacrosImportService / LabelsImportService and returning import stats / warnings as JSON.
  Generic German 422 error if parser rejects the file.
- MacroAssignmentController: index renders Settings Inertia page with assignments / macros / labels /
  collections / last-import metadata. store/update/destroy/reorder for global MacroAssignment rows.
- ServiceMacroOverrideController: store snapshots all matching global MacroAssignments into
  service-specific rows when a service opts to override; destroy removes both override and
  service-specific assignments. storeAssignment / updateAssignment / destroyAssignment manage the
  per-service rows directly.
- routes/web.php: 12 new named routes inside the auth middleware group; reorder route placed before
  {macroAssignment} parameter route to avoid capture conflict.
- Tests: 19 new Pest tests across 4 feature files (54 assertions). Full suite 376 passed.
2026-05-03 23:17:04 +02:00
Thorsten Bus cef247336e feat(export): use MacroResolutionService in ProExportService for flexible macro injection 2026-05-03 23:08:22 +02:00
Thorsten Bus 81b2a9caf6 feat(services): add LabelsImportService, MacrosImportService, MacroResolutionService 2026-05-03 23:03:32 +02:00
Thorsten Bus bdbf0c65e3 refactor(php): rename SongGroup references throughout controllers/services/tests
Replace all SongGroup/SongArrangementGroup model usages with Label/SongArrangementLabel
after the schema migration to global labels. Updates 12 app files and 11 test files:

- SongService: createDefaultGroups now finds-or-creates global Labels by name
- ArrangementController: validates label_id (labels are global, no song-ownership)
- ProImportService: imports groups as Labels (firstOrCreate by name); does not
  overwrite existing label colors per spec
- ProExportService/SongPdfController/TranslationService/etc: traverse via
  arrangements -> arrangementLabels -> label -> songSlides chain
- All test factories and assertions adapted to label-based schema
2026-05-03 22:55:02 +02:00
Thorsten Bus a1612dc3ef feat(support): add MacroColorConverter utility 2026-05-03 22:31:44 +02:00
Thorsten Bus 846bd12f90 feat(models): add Label/Macro/MacroAssignment/ServiceMacro models and remove SongGroup 2026-05-03 22:27:21 +02:00
Thorsten Bus 2a02f65517 test: update DatabaseSchemaTest and WipeLegacySongDataTest for new schema 2026-05-03 22:21:49 +02:00
Thorsten Bus bf153b2906 feat(db): auto-migrate 4 legacy macro settings to new assignment system 2026-05-03 22:20:07 +02:00
Thorsten Bus 2b27aa50d5 feat(db)!: drop song_groups, introduce label_id on song_slides, add song_arrangement_labels (BREAKING) 2026-05-03 22:20:01 +02:00
Thorsten Bus a65bf3d595 feat(db): add macro_assignments, service macro override tables, and guarded legacy data wipe 2026-05-03 22:16:46 +02:00
Thorsten Bus 09ab4821fc feat(db): create macros, macro_collections, and junction tables 2026-05-03 22:13:28 +02:00
Thorsten Bus 860db0405f docs: record labels migration verification
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-03 22:10:46 +02:00
Thorsten Bus 767e22eac8 feat(db): create labels table for global slide labels
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-03 22:10:35 +02:00
Thorsten Bus e489a984eb chore(deps): bump PHP to 8.4 and update propresenter/parser with Macro/Label support
- Raise PHP requirement from ^8.2 to ^8.4 (parser requires 8.4)
- New parser classes available: MacrosFileReader, LabelsFileReader,
  Macro, MacroLibrary, MacroCollection, Label, LabelLibrary
- Add programmatic test fixtures for macros-sample.bin + labels-sample.bin
- Fix ServiceAgendaItemFactory sort_order to auto-increment
2026-05-03 22:07:56 +02:00
Thorsten Bus 599b8635c9 feat(dev): migrate local development from Valet to DDEV
Production Caddy/FPM setup (build/Dockerfile, docker-compose.yml) is untouched -- this only swaps the local dev stack.

- .ddev/config.yaml: PHP 8.4, Node 20, sqlite (db container omitted), libreoffice/ghostscript/poppler/sqlite3 packages, Vite port 5173 via Traefik, post-start hooks bootstrap the app on every `ddev start`.
- .ddev/commands/web/dev: custom `ddev dev` runs queue + pail + vite (mirror of old `composer dev`).
- start_dev.sh / stop_dev.sh: rewritten as DDEV wrappers so devs can onboard without DDEV knowledge; --keep-ddev keeps containers up.
- vite.config.js: HMR over WSS to https://pp-planer.ddev.site:5173.
- playwright + auth.setup.ts: baseURL switched to https://pp-planer.ddev.site.
- .env.example: APP_URL and CHURCHTOOLS_REDIRECT_URI use ddev.site.
- composer: drop laravel/sail (replaced by DDEV).
- package.json: add explicit "name" so host/container lockfiles match (container WORKDIR is /var/www/html, npm would otherwise pick "html" as project name).
- tests/fixtures/propresenter/Test.pro: inline reference fixture; tests no longer depend on a sibling host directory.
- AGENTS.md: docs rewritten for DDEV workflow.
2026-05-03 18:46:48 +02:00
Thorsten Bus 49d557a184 AI Tryfix for storage 404 problem 2026-04-11 16:33:07 +02:00
Thorsten Bus 17a8d602ce add update script for production 2026-04-01 07:41:16 +02:00
Thorsten Bus 5eeca25d18 fix: derive Sanctum stateful domain from APP_URL for production 2026-03-31 14:40:56 +02:00
Thorsten Bus 0d7e150fe2 fix: add missing CTLog import in ChurchToolsService 2026-03-31 14:18:01 +02:00
Thorsten Bus 936d38ecdc fix: disable ChurchTools API file logging to prevent vendor/ write errors 2026-03-31 13:58:03 +02:00
Thorsten Bus 00bffab74f fix(docker): build Vite assets at boot instead of syncing from image 2026-03-31 11:28:43 +02:00
Thorsten Bus 1fb07f40c9 fix(docker): remove Vite hot file at boot to prevent localhost:5173 asset URLs 2026-03-31 11:05:35 +02:00
Thorsten Bus d8da3ba678 chore(docker): remove obsolete entrypoint.sh 2026-03-31 09:20:18 +02:00
Thorsten Bus 56cbc4109a fix(db): enable SQLite WAL mode and busy_timeout for concurrent access 2026-03-31 09:20:03 +02:00
Thorsten Bus 2645aff3af feat(docker): add docker-compose.yml and .dockerignore for production 2026-03-31 09:19:54 +02:00
Thorsten Bus fa10d792fa feat(docker): add boot-container.sh and init-app.sh lifecycle scripts 2026-03-31 09:17:47 +02:00
Thorsten Bus d4abc61f24 feat(docker): add supervisord, PHP and FPM configs 2026-03-31 09:17:43 +02:00
Thorsten Bus 28b2c61e36 feat(docker): add multi-stage Dockerfile with PHP-FPM on Debian bookworm 2026-03-31 09:17:37 +02:00
Thorsten Bus 862b9f6c16 fix: build Vite assets in entrypoint for production (APP_ENV=production)
Eliminates dependency on node dev server for live site. Assets served
as static files from public/build/ instead of proxied through Vite.
2026-03-30 22:55:47 +02:00
Thorsten Bus 04ef0b08c8 refactor: entrypoint with WWWUSER/WWWGROUP for FPM UID/GID mapping
- Entrypoint remaps www-data to host UID/GID via WWWUSER/WWWGROUP env vars
- Moves composer install, storage setup, migrate into entrypoint
- Removes inline command from docker-compose
- Defaults to 1000:1000, configurable via .env
2026-03-30 22:37:02 +02:00
Thorsten Bus 3832aaa9d8 fix: chown storage to www-data for FPM write access 2026-03-30 22:35:20 +02:00
Thorsten Bus db15a71378 fix: pipe PHP/FPM errors to stderr for docker compose logs 2026-03-30 19:06:45 +02:00
Thorsten Bus 843553b743 change permission of gitignore files 2026-03-30 19:05:08 +02:00
Thorsten Bus dc536dd078 fix: join caddy external network, use expose instead of ports
Caddy reaches FPM via Docker network (pp-planer-app:9000) instead of
host port mapping. Removed broken app-public named volume.
2026-03-30 18:58:23 +02:00
Thorsten Bus 6c7c6c076d fix: Docker FPM on port 9000, proper healthcheck, runtime dep install
- Slim Dockerfile to env-only (deps install at container start via volume mount)
- Add FastCGI ping healthcheck instead of broken HTTP curl
- App startup: composer install + migrate + php-fpm
- Remove obsolete docker-compose version key
2026-03-30 17:29:32 +02:00
Thorsten Bus 07008f3f33 fix: install deps on container start (anonymous volumes mask host dirs) 2026-03-30 16:39:33 +02:00
Thorsten Bus 1eb4f1642f rename cts-work to pp-planer, move Dockerfile to build/, optimize dev scripts
- Rename all cts-work references to pp-planer (valet, sanctum, playwright, e2e, docs)
- Fix docker-compose build context to use project root with build/Dockerfile
- Add .dockerignore to exclude unnecessary files from Docker build
- start_dev.sh: stale PID cleanup, dependency checks, APP_KEY check, process health verification
- stop_dev.sh: fix set -e crash on arithmetic, report already-dead processes, idempotent exit
2026-03-30 16:00:02 +02:00
Thorsten Bus af9b8d1882 Merge branch 'cts-presenter-app' 2026-03-30 14:01:10 +02:00
Thorsten Bus 1ed8ca3ee7 ignore files 2026-03-30 14:00:08 +02:00
Thorsten Bus af46e1829d feat: switch propresenter/parser to remote VCS, add local dev toggle script
Replace path repository with VCS pointing to
git.stadtmission-butzbach.de/public/propresenter-php.git.
Add use_local_pp_lib.sh to toggle between remote and local checkout.
Fix test fixture paths after repo restructure (ref/ → doc/reference_samples/).
2026-03-30 13:45:42 +02:00
Thorsten Bus 2ba612072f fix: resolve 17 pre-existing test failures (path refs, Mockery alias mocks)
- Update propresenter ref path from ../propresenter-work/ to ../propresenter/
- Fix ProFileImportTest assertion for CCLI-based upsert behavior
- Replace Mockery alias mocks with testable subclass pattern in
  PlaylistExportTest, eliminating @runInSeparateProcess requirement
- Use DI (app()) for PlaylistExportService in controller for testability
- All 302 tests pass (was 285 pass + 17 fail)
2026-03-30 12:43:50 +02:00
Thorsten Bus 0e3c647cfc feat: probundle export with media, image upscaling, upload dimension warnings
- Fix probundle exports missing images (double slides/ prefix in storage path)
- Replace manual ZipArchive with PresentationBundle + ProBundleWriter from parser plugin
- Add per-agenda-item download route and buttons for songs and slide items
- Remove text layer from image-only slides in .pro generation
- Fix image conversion: upscale small images, black bars on 2 sides max (contain)
- Add upload warnings for non-16:9 and sub-1920x1080 images (German, non-blocking)
- Update SlideFactory and all tests to use slides/ prefix in stored_filename
- Add 11 new tests (agenda download, image conversion, upload warnings)
2026-03-30 10:29:37 +02:00
Thorsten Bus 63f40f8364 feat(ui): click left pill scrolls to and highlights right preview 2026-03-29 17:42:55 +02:00
Thorsten Bus b8b92f094e feat(ui): add MASTER arrangement, fix slide upload/thumbnail bugs, add slide preview with navigation
- Add virtual MASTER arrangement to all songs (read-only, shows all groups in song order, clonable)
- Fix drop zone staying open after slide upload and thumbnail 403 (double slides/ path)
- Add click-to-preview overlay with download button, prev/next navigation, and slide counter
- Add X delete button with confirmation dialog and hover tooltip preview on agenda thumbnails
- Fix arrangement select not updating after add/clone (emit + re-fetch pattern)
- Move InformationBlock below agenda; announcement row scrolls to it instead of showing upload
- Create storage symlink (public/storage -> storage/app/public)
2026-03-29 17:41:26 +02:00
Thorsten Bus 852231ae01 fix(ui): ArrangementDialog drag whole box, persist changes across switch, hover highlight
- Remove drag handle restriction — entire pill box is now draggable
- Keep local copy of arrangements so edits survive switching between
  arrangements (was reading stale props after switch-back)
- Highlight corresponding left pill when hovering right lyric preview
2026-03-29 16:34:30 +02:00
Thorsten Bus 78b8fc2e3d refactor(ui): convert agenda list to table with proper data formatting
- Replace card-based agenda layout with a 6-column table (Nr, Zeit, Dauer, Titel, Verantwortlich, Aktionen)
- Fix isHeaderType to only match type=header, not all non-song items
- Format start time from ISO 8601 to HH:MM (Europe/Berlin)
- Format duration from seconds string to H:MM
- Fix responsible parsing for CTS data structure ({text, persons[{person:{title}}]})
- Move unmatched song search/assign UI into ArrangementDialog popup
- Add colored row backgrounds (song/sermon/announcement/slides) with left border
- Invert header rows to dark grey background with white text
2026-03-29 16:32:30 +02:00
Thorsten Bus 6d337d8b6a fix(ui): fix ArrangementDialog data mapping and close behavior
- Transform arrangement data in Edit.vue to flat {id, name, color, slides}
  format expected by ArrangementDialog (was passing raw Eloquent structure
  with nested arrangement_groups[].group instead of flat .groups[])
- Stop arrangement select change from closing the dialog (only close on X)
- Fallback to all available groups when no arrangement selected (Master)
2026-03-29 15:39:38 +02:00