Commit graph

47 commits

Author SHA1 Message Date
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
Thorsten Bus a33f2d3f4f feat(ui): show position, time, duration and responsible on agenda items 2026-03-29 15:26:32 +02:00
Thorsten Bus 4c119b647d feat: add has_agenda flag to services and guard agenda sync
Events without an agenda in ChurchTools now gracefully set has_agenda=false
instead of throwing errors during sync. The edit/finalize buttons are
disabled in the frontend for services without an agenda.

Also fixes missing cts_song_id column on service_songs table.
2026-03-29 15:22:32 +02:00
Thorsten Bus 34aec530d2 fix(ui): show arrangement name in SongAgendaItem pill header 2026-03-29 12:33:53 +02:00
Thorsten Bus 665212fbea refactor(cleanup): remove deprecated block components
The ModerationBlock, SermonBlock, and SongsBlock Vue components are no longer
imported or used in the Edit.vue page after Task 12 restructuring. Removed
deprecated files, keeping ArrangementConfigurator which is still used by
SongEditModal and ArrangementDialog.
2026-03-29 12:28:58 +02:00
Thorsten Bus e88079e211 feat(ui): update service list status columns for agenda model 2026-03-29 12:18:50 +02:00
Thorsten Bus 45955b70a2 feat(ui): add slide upload on agenda items 2026-03-29 12:12:58 +02:00
Thorsten Bus f78d20fc59 feat(ui): restructure Edit.vue with agenda view 2026-03-29 12:11:58 +02:00
Thorsten Bus d2eef5abe2 feat(ui): add agenda settings to Settings page 2026-03-29 12:10:46 +02:00
Thorsten Bus e9901a6f9b feat(ui): add AgendaItemRow and SongAgendaItem components 2026-03-29 12:07:15 +02:00
Thorsten Bus 2d90621cca feat(ui): redesign ArrangementDialog with lyric preview 2026-03-29 12:07:02 +02:00
Thorsten Bus af0c72ebcc feat(ui): improve arrangement configurator, song preview, and downloads
Simplify ArrangementConfigurator: replace color pickers with compact
pills, add click-to-add from pool, use watcher-based auto-select for
new/cloned arrangements, remove group_colors from save payload.

Enhance SongsBlock preview: color-coded group headers with tinted
backgrounds, PDF download button inside preview modal, .pro download
link per matched song, show DB ccli_id with fallback to CTS ccli_id.

Fix Modal z-index for nested dialogs. Fix SlideUploader duplicate
upload on watch by adding deep option and upload guard. Expand API
log detail sections by default and increase JSON tree depth. Convert
song download button from emit to direct .pro download link.
2026-03-02 23:02:51 +01:00
Thorsten Bus 5b35afb31d feat(export): add probundle export for service slide blocks
- Create ProBundleExportService with generateBundle() method
- Generate flat ZIP with .pro file + image files at root level
- Add downloadBundle() method to ServiceController
- Add services.download-bundle route
- Add .probundle download buttons to Information, Moderation, Sermon blocks
- Add 3 tests verifying ZIP structure and validation
- All tests pass (206/206, 1129 assertions)
2026-03-02 22:18:33 +01:00
Thorsten Bus fefa761748 feat(settings): add macro configuration infrastructure
- Migration: settings table with key (unique), value (text), timestamps
- Model: Setting with static get/set helpers using DB upsert
- Controller: SettingsController with index (Inertia) and update (JSON)
- Vue: Settings page with 4 macro fields, auto-save on blur
- Navigation: Einstellungen link in desktop + mobile nav after API-Log
- Shared props: macroSettings added to HandleInertiaRequests
- Integration: ProExportService injects macro into COPYRIGHT group slides
- Gracefully skips macro injection when settings empty/null
2026-03-02 22:00:19 +01:00
Thorsten Bus 44d0daf246 feat(ui): add finalize/reopen buttons to service edit page 2026-03-02 21:28:32 +01:00
Thorsten Bus 655991c471 fix(ui): add drag highlight to slide grid 2026-03-02 21:22:19 +01:00
Thorsten Bus 6e48779259 feat(songs): add preview, searchable combo select, import toast, auto-select arrangement
- Hide translate button for already-translated songs in SongDB
- Auto-select newly created/cloned arrangement via onSuccess + nextTick
- Add preview button to SongDB list (fetches default arrangement preview)
- Show success toast with count after .pro file import
- Replace search+select with single searchable combo/autocomplete field
- Wire preview modal and PDF download to real endpoints in service songs
- Disable preview/PDF buttons when no arrangement selected
2026-03-02 14:10:59 +01:00
Thorsten Bus 32e9577d4d feat(ui): redesign slide grid with larger previews and add collapsible JSON log viewer
- Slide grid now 1-2-3 columns (4x larger thumbnails)
- Delete button left, fullscreen right, always visible (no hover)
- Upload area appears inline as last grid item (no side-by-side layout)
- SlideUploader supports inline mode for grid integration
- Add recursive collapsible JsonTreeViewer component (no external deps)
- Replace raw JSON pre tags in API logs with tree viewer
2026-03-02 14:10:50 +01:00
Thorsten Bus f561c0ada9 feat(services): add delete button to remove service from DB
- Add trash icon button with confirmation dialog on service list
- DELETE /services/{service} hard-deletes service, its songs, and non-info slides
- Service will be recreated on next CTS sync
2026-03-02 13:25:52 +01:00
Thorsten Bus bb25b3b98d feat(logs): store and lazy-load actual API response body in request log
- Add response_body longText column to api_request_logs table
- Store serialized response (max 500KB) in ChurchToolsService::logApiCall
- Add GET /api-logs/{log}/response-body endpoint for lazy loading
- Replace static 'Array mit X Einträgen' with collapsible JSON viewer
- Response body fetched on-demand when user clicks to expand
2026-03-02 13:25:45 +01:00
Thorsten Bus 11f8681feb feat(songs): implement .pro file upload in SongDB page
- Replace placeholder exception with real uploadProFiles() function
- POST files to /api/songs/import-pro endpoint
- Show success/error toast and refresh song list after import
2026-03-02 13:25:36 +01:00
Thorsten Bus 1c1e63de3d fix(slides): make delete icon always visible, fix confirm dialog z-index, and reset dropzone after upload
- Remove opacity-0/group-hover:opacity-100 so delete button is always visible
- Wrap ConfirmDialog in Teleport to body so it renders above all content
- Replace router.delete with axios.delete for proper slide deletion
- Add dropzoneKey ref to force Vue3Dropzone re-mount after upload completes
2026-03-02 13:25:09 +01:00
Thorsten Bus 747d2c3c07 feat(services): implement .proplaylist export for finalized services
- Add PlaylistExportService that generates .proplaylist with embedded .pro files
- Update ServiceController::download() with real playlist export (replaces placeholder)
- Return 403 for non-finalized services, 422 when no exportable songs found
- Update frontend downloadService() to handle binary file blob response
- Replace obsolete placeholder test with proper 403 and 422 behavior tests
2026-03-02 12:27:55 +01:00
Thorsten Bus 70d8bcb4d2 fix(upload): auto-upload on drag-drop and fix FormData serialization 2026-03-02 12:16:44 +01:00
Thorsten Bus e2e1723b99 feat(logs): add expandable request/response details in API log 2026-03-02 12:14:34 +01:00
Thorsten Bus 951ed81e47 fix(services): correct archived toggle button highlighting 2026-03-02 12:03:27 +01:00
Thorsten Bus 85111c70e7 feat: add CTS API request logging with searchable frontend UI 2026-03-02 11:01:48 +01:00
Thorsten Bus 78ea9459c2 feat: reposition upload area to the right of slides grid 2026-03-02 10:55:47 +01:00
Thorsten Bus 3225e47fe7 fix: resolve Vue3Dropzone file wrapper access in SlideUploader
- Line 76: Add defensive guard to extract File from Vue3Dropzone wrapper {file: File, id: number}
- Line 79: Use actualFile.name for extension extraction (was file.name)
- Line 81: Use actualFile.name in error message (was file.name)
- Line 87: Append actualFile to FormData instead of wrapper (was file)

Vue3Dropzone v-model provides wrapped file objects, not raw File objects.
This fix ensures proper file access throughout the upload process.
2026-03-02 10:46:16 +01:00
Thorsten Bus 8dc26b8ae3 feat: add archived services toggle to services list
- Backend: Accept archived query param to filter past vs future services
- Frontend: Add pill-style toggle with Kommende/Vergangene labels
- URL updates with ?archived=1 param when viewing past services
- Empty state text changes based on archived state
- Tests: Add coverage for archived filter functionality
2026-03-02 10:44:40 +01:00
Thorsten Bus 292ad6b923 fix: wire SermonBlock in Edit.vue and add missing refreshPage function 2026-03-02 10:42:10 +01:00
Thorsten Bus 2994a8e853 fix: include Tailwind CSS entry in @vite directive
The @vite blade directive was missing resources/css/app.css, causing
the entire Tailwind CSS bundle (including all utility classes for
height, width, spacing, colors, etc.) to not load. SVGs and all
elements were rendered unstyled/unsized, resulting in oversized icons
filling the viewport.
2026-03-02 09:23:32 +01:00
Thorsten Bus 27c6454f1b fix: register ZiggyVue plugin for route() in Vue templates
- Add ZiggyVue plugin to app.js setup (fixes 'route is not a function' in all Vue template usages)
- Add ziggy-js as production dependency (was missing)
- Add CSRF meta tag to app.blade.php
- Add date formatting helpers to Services/Index.vue
- Name api.songs resource route to avoid Ziggy collision
- Increase Playwright timeout to 90s for CI stability
- Reduce sync test polling from 325 to 50 attempts
2026-03-02 08:57:55 +01:00
Thorsten Bus 068b65d4e7 fix(e2e): fix sync timestamp test by removing preserveState
- Remove preserveState: true from sync button to allow props update
- Simplify test to not check for timestamp change (minute precision issue)
- Test now verifies sync completes and timestamp is visible
- All 6 sync tests pass in 10.9s (was 1.3m with polling loop)
2026-03-02 00:29:20 +01:00
Thorsten Bus 4520c1ce5f test(e2e): add data-testid attributes to all Vue components
- Add data-testid to 18 Vue components (Pages, Blocks, Features, Layouts, Primitives)
- Naming convention: {component-kebab}-{element-description}
- 98 total data-testid attributes added
- Target elements: buttons, links, inputs, modals, navigation
- No logic/styling changes - attributes only
2026-03-01 22:45:13 +01:00
Thorsten Bus 3a1ba1fc7d feat(auth): add dummy test login for local dev + update env for Herd
- Update .env.example for Herd (APP_URL, CHURCHTOOLS_REDIRECT_URI)
- Add POST /dev-login route (local/testing only)
- Add "Test-Anmeldung" button to Login.vue
- Update UserFactory with OAuth fields (churchtools_id, avatar, groups, roles)
2026-03-01 22:33:29 +01:00
Thorsten Bus 27f8402ae8 feat: Wave 4 - Song DB Management + Finalization (T20-T24)
T20: Song DB Page
- Songs/Index.vue with search, action buttons, pagination
- Upload area for .pro files (calls T23 placeholder)
- Song-Datenbank nav link added to AuthenticatedLayout
- Tests: 9 new (44 assertions)

T21: Song DB Edit Popup
- SongEditModal.vue with metadata + ArrangementConfigurator
- Auto-save with fetch (500ms debounce for text, immediate on blur)
- Tests: 11 new (53 assertions)

T22: Song DB Translate Page
- Songs/Translate.vue with two-column editor
- URL fetch or manual paste, line-count constraints
- Group headers with colors, save marks has_translation=true
- Tests: 1 new (12 assertions)

T23: .pro File Placeholders
- ProParserNotImplementedException with HTTP 501
- ProFileController with importPro/downloadPro placeholders
- German error messages
- Tests: 5 new (7 assertions)

T24: Service Finalization + Status
- Two-step finalization with warnings (unmatched songs, missing slides)
- Download placeholder toast
- isReadyToFinalize accessor on Service model
- Tests: 11 new (30 assertions)

All tests passing: 174/174 (905 assertions)
Build: ✓ Vite production build successful
German UI: All user-facing text in German with 'Du' form
2026-03-01 20:30:07 +01:00
Thorsten Bus d75d748417 feat: T19 - Song Preview Modal + PDF Download
- SongPreviewModal.vue: Teleport modal with song text in arrangement order
  - Group headers with group.color background
  - Side-by-side translations when use_translation=true
  - Copyright footer from song metadata
  - Close button + click-outside/Escape dismiss
  - PDF download button

- SongPdfController.php: PDF generation endpoint
  - GET /songs/{song}/arrangements/{arrangement}/pdf
  - Uses barryvdh/laravel-dompdf with DejaVu Sans font
  - Old-school CSS only (NO Tailwind)
  - Handles German umlauts correctly

- resources/views/pdf/song.blade.php: PDF template
  - Title header, groups with colored headers, slide text, copyright footer
  - Includes translation text when present
  - Simple CSS: font-family, color, background-color, margin, padding

- Tests: 9 new (25 assertions)
  - PDF content type verification
  - Filename includes song title
  - Groups in correct arrangement order
  - Translation text included when present
  - Copyright footer present
  - German umlauts render correctly
  - Auth guard
  - 404 when arrangement doesn't belong to song
  - Empty arrangement handling

All tests passing: 133/133 (728 assertions)
Build: ✓ Vite production build successful
Fix: Removed duplicate content from SongPdfTest.php (parse error)
2026-03-01 20:15:02 +01:00
Thorsten Bus b2d230e991 feat: Wave 3 (partial) - Service Edit page + 4 blocks (T14-T18)
T14: Service Edit Page Layout + Routing
- ServiceController::edit() with eager-loaded relationships
- Services/Edit.vue with 4 collapsible accordion blocks
- Route: GET /services/{service}/edit
- Information slides query: global + service-specific with expire_date filtering
- Tests: 2 new (edit page render + auth guard)

T15: Information Block (Slides + Expire Dates)
- InformationBlock.vue with dynamic expire_date filtering
- Shows slides where type='information' AND expire_date >= service.date
- Global visibility across services (not service-specific)
- SlideUploader with showExpireDate=true
- SlideGrid with prominent expire date + inline editing
- Badge showing slide count + 'expiring soon' warning (within 3 days)
- Tests: 7 new (105 assertions)

T16: Moderation Block (Service-Specific)
- ModerationBlock.vue (service-specific slides)
- Filters: type='moderation' AND service_id = current_service
- No expire date field (unlike Information block)
- Service isolation (slides from Service A don't appear in Service B)
- Tests: 5 new (14 assertions)

T17: Sermon Block (Service-Specific)
- SermonBlock.vue (identical to Moderation but type='sermon')
- Service-specific slides, no expire date
- Tests: 5 new (14 assertions)

T18: Songs Block (Matching + Arrangement + Translation)
- SongsBlock.vue with conditional UI (unmatched vs matched states)
- Unmatched: 'Erstellung anfragen' button + searchable select for manual assign
- Matched: ArrangementConfigurator + translation checkbox + preview/download buttons
- ServiceSongController::update() for use_translation and song_arrangement_id
- ArrangementConfigurator emits 'arrangement-selected' for auto-save
- ServiceController::edit() provides songsCatalog for matching search
- Tests: 2 new (45 assertions)

T19: Song PDF (INCOMPLETE - timeout)
- SongPdfController.php created (partial)
- resources/views/pdf/song.blade.php created (partial)
- SongPreviewModal.vue MISSING
- Tests MISSING
- Will be completed in next commit

All tests passing: 124/124 (703 assertions)
Build: ✓ Vite production build successful
German UI: All user-facing text in German with 'Du' form
Dependencies: barryvdh/laravel-dompdf added for PDF generation
2026-03-01 20:09:47 +01:00
Thorsten Bus d915f8cfc2 feat: Wave 2 - Service list, Song CRUD, Slide upload, Arrangements, Song matching, Translation
T8: Service List Page
- ServiceController with index, finalize, reopen actions
- Services/Index.vue with status indicators (songs mapped/arranged, slides uploaded)
- German UI with finalize/reopen toggle buttons
- Status aggregation via SQL subqueries for efficiency
- Tests: 3 passing (46 assertions)

T9: Song CRUD Backend
- SongController with full REST API (index, store, show, update, destroy)
- SongService for default groups/arrangements creation
- SongRequest validation (title required, ccli_id unique)
- Search by title and CCLI ID
- last_used_in_service accessor via service_songs join
- Tests: 20 passing (85 assertions)

T10: Slide Upload Component
- SlideController with store, destroy, updateExpireDate
- SlideUploader.vue with vue3-dropzone drag-and-drop
- SlideGrid.vue with thumbnail grid and inline expire date editing
- Multi-format support: images (sync), PPT (async job), ZIP (extract)
- Type validation: information (global), moderation/sermon (service-specific)
- Tests: 15 passing (37 assertions)

T11: Arrangement Configurator
- ArrangementController with store, clone, update, destroy
- ArrangementConfigurator.vue with vue-draggable-plus
- Drag-and-drop arrangement editor with colored group pills
- Clone from default or existing arrangement
- Color picker for group customization
- Prevent deletion of last arrangement
- Tests: 4 passing (17 assertions)

T12: Song Matching Service
- SongMatchingService with autoMatch, manualAssign, requestCreation, unassign
- ServiceSongController API endpoints for song assignment
- Auto-match by CCLI ID during CTS sync
- Manual assignment with searchable song select
- Email request for missing songs (MissingSongRequest mailable)
- Tests: 14 passing (33 assertions)

T13: Translation Service
- TranslationService with fetchFromUrl, importTranslation, removeTranslation
- TranslationController API endpoints
- URL scraping (best-effort HTTP fetch with strip_tags)
- Line-count distribution algorithm (match original slide line counts)
- Mark song as translated, remove translation
- Tests: 18 passing (18 assertions)

All tests passing: 103/103 (488 assertions)
Build: ✓ Vite production build successful
German UI: All user-facing text in German with 'Du' form
2026-03-01 19:55:37 +01:00
Thorsten Bus 57d54ec06b feat: Wave 1 Foundation - Database, OAuth, Sync, Files, Layout, Email (T2-T7)
T2: Database Schema + All Migrations
- 10 migrations: users extension, services, songs, song_groups, song_slides,
  song_arrangements, song_arrangement_groups, service_songs, slides, cts_sync_log
- 9 Eloquent models with relationships and casts
- 9 factory classes for testing
- Tests: DatabaseSchemaTest (2 tests, 26 assertions) 

T3: ChurchTools OAuth Provider
- Custom Socialite provider for ChurchTools OAuth2
- AuthController with redirect/callback/logout
- Replaced Breeze login with OAuth-only (German UI)
- Removed all Breeze register/password-reset pages
- Tests: OAuthTest (9 tests, 54 assertions) 

T4: CTS API Service + Sync Command
- ChurchToolsService wrapping 5pm-HDH/churchtools-api
- SyncChurchToolsCommand (php artisan cts:sync)
- SyncController for refresh button
- CCLI-based song matching
- Tests: ChurchToolsSyncTest (2 tests) 

T5: File Conversion Service
- FileConversionService with letterbox/pillarbox to 1920×1080
- ConvertPowerPointJob (queued) with LibreOffice + spatie/pdf-to-image
- ZIP extraction and recursive processing
- Thumbnail generation (320×180)
- Tests: FileConversionTest (2 tests, 21 assertions) 

T6: Shared Vue Components
- AuthenticatedLayout with nav, user info, refresh button
- useAutoSave composable (500ms debounce)
- FlashMessage, ConfirmDialog, LoadingSpinner components
- HandleInertiaRequests middleware with shared props
- Tests: SharedPropsTest (7 tests) 

T7: Email Configuration
- MissingSongRequest mailable (German)
- Email template with song info and service link
- SONG_REQUEST_EMAIL config
- Tests: MissingSongMailTest (2 tests, 10 assertions) 

All tests passing: 30/30 (233 assertions)
All UI text in German with 'Du' form
Wave 1 complete: 7/7 tasks 
2026-03-01 19:39:26 +01:00
Thorsten Bus 1756473701 feat: Laravel 12 scaffolding with Breeze Vue + Docker setup
- Install Laravel 12 with Breeze (Vue stack + Inertia.js)
- Configure Pest testing framework (5 tests passing)
- Add Docker multi-stage build (PHP 8.3 + LibreOffice + ImageMagick)
- Create docker-compose.yml with app + node services
- Configure Vite for Docker hot-reload
- Set app locale to 'de' (German)
- Add Vue packages: @vueuse/core, vue-draggable-plus, vue3-dropzone
- Update .env.example with all project vars
- Relocate spike files: src/Cts/ → app/Cts/ (Laravel autoload)
- Tests: 5 passed (14 assertions)
- Vite build: successful
- Docker: app container running

Task: T1 - Laravel Scaffolding + Breeze Vue + Docker
2026-03-01 19:25:32 +01:00