Commit graph

9 commits

Author SHA1 Message Date
Thorsten Bus 42b8b5f428 fix(export): copyright/blank slides, bundle-relative media, probundle injection, song links
- populate COPYRIGHT (title/author/copyright/CCLI) + blank slides on every song; songHasContent ignores locked sections
- foreground info/moderation images now bundle-relative (fixes blank images)
- pre-added .probundle injection: Zip64-fix + verbatim .pro extraction (fixes empty bundle)
- nametag subtitle split (text + subtitle); smaller non-bold render
- skip songs with no content slides at export with German warning
- link service agenda songs to SongDB edit modal via #song-<id>
- allow CCLI import of metadata-only songs (no lyric sections)
- expose has_content_slides on service songs; show "Keine Inhaltsfolien"
2026-06-21 09:58:55 +02:00
Thorsten Bus e33418f716 feat: song pre/postfix, settings overhaul, export & schedule fixes
Resolves a batch of bugs and feature requests across songs, services,
settings and export:

Songs & sections
- Every song now carries permanent, empty, locked PREFIX (COPYRIGHT) and
  POSTFIX (BLANK) sections, deduplicated on import; locked sections cannot
  be edited or deleted via UI or API.
- Song edit modal: explicit Speichern/Schließen with dirty-tracking,
  editable section headline (combobox + custom values), and a fix for the
  419 CSRF errors after CCLI "Importieren & Bearbeiten" (token read fresh
  per request).
- CCLI bookmarklet "Importieren & Bearbeiten" now opens the edit dialog.

Service schedule & arrangements
- Fixed assigned songs showing no sections (slides loaded for all
  arrangements, not just the default).
- Added "Song entfernen / neu zuordnen" to reassign an assigned song.
- Worship-leader arrangement is created/selected lazily when the
  arrangement dialog opens (only when not user-overridden); the leader is
  resolved from the "Lobpreis" agenda item, and manual create/clone names
  are prefixed with the leader name.

Navigation
- "/" redirects to the next upcoming service's edit page (or the list).
- Service titles link to the edit page.

Settings
- Renamed "Makro-Import"/"Label-Import" menu items; fixed drag-and-drop
  imports (were downloading the dropped file); added label-import hint;
  made the panel scrollable.
- Nametag now uses a single MacroPicker; added song prefix/postfix label
  defaults (COPYRIGHT #24B34C / BLANK #000000); new "Export-Dateien" menu
  to upload prefix/postfix .pro files added to every export.

Export
- Filenames/playlist names are date-first ("YYYY-MM-DD <Title>").
- Keyvisual slide only for the first content-less item after real content;
  all other content-less items render as headlines.
- New "Vorschau herunterladen" for non-finalized services (filename and
  import name prefixed "Vorschau" with export timestamp).
- Uploaded prefix/postfix .pro files wrap every export.

Tests updated to the new behavior; full suite green (569 passed).
2026-06-01 08:56:20 +02:00
Thorsten Bus ae42b48753 feat(songs): per-song sections + section editing; fix CCLI import bugs
Refactor lyric storage so each song owns its sections instead of sharing
global labels. Adds song_sections (per song+label) owning song_slides;
labels stay global ProPresenter group tags (name/color/macro). Arrangements
now reference sections, so editing/importing one song no longer corrupts
others that share a label name.

- New: song_sections table + migration with safe backfill; SongSection,
  SongArrangementSection models; SongSectionController (edit/add/delete
  sections, immediate persistence) wired into SongEditModal.
- Refactor writers/readers: CcliImport, ProImport, SongService,
  ArrangementController, SongController, ProExport, PDF, Translation
  (translation reset now section-scoped), CCLI pairing.
- CCLI import fixes: parse SongSelect copy-icon format (German "Vers"
  abbrev + trailing author), fill empty CTS-synced songs instead of
  blocking as duplicate, distinct label colors per section kind,
  import&edit/existing-song open the edit modal (no 404/405), teleport
  paste dialog above assign dialog, preview shows section content,
  correct SongSelect search URL, copy-icon instructions.
- Bookmarklet clicks #generalCopyLyricsButton and captures clipboard;
  serves correct host from request.
- Export: embed key-visual/background under fixed bundle-relative names.
- Tests updated for the section model; new section + isolation coverage.
2026-05-31 14:45:47 +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 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 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 04d271f96a style: apply Laravel Pint formatting across codebase
Auto-formatted by Laravel Pint (default Laravel preset): string
concatenation spacing, anonymous class brace placement, constructor
body shorthand, import ordering, and assertion indentation.
2026-03-02 23:02:03 +01:00
Thorsten Bus 77d47f4b73 feat(songs): implement .pro file import with SongDB mapping 2026-03-02 12:21:01 +01:00