- 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)
54 lines
2.8 KiB
PHP
54 lines
2.8 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\AuthController;
|
|
use App\Http\Controllers\SongPdfController;
|
|
use App\Http\Controllers\ArrangementController;
|
|
use App\Http\Controllers\ServiceController;
|
|
use App\Http\Controllers\SlideController;
|
|
use App\Http\Controllers\SyncController;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Inertia\Inertia;
|
|
|
|
Route::middleware('guest')->group(function () {
|
|
Route::get('/login', [AuthController::class, 'showLogin'])->name('login');
|
|
Route::get('/auth/churchtools', [AuthController::class, 'redirect'])->name('auth.churchtools');
|
|
Route::get('/auth/churchtools/callback', [AuthController::class, 'callback'])->name('auth.churchtools.callback');
|
|
});
|
|
|
|
Route::post('/logout', [AuthController::class, 'logout'])
|
|
->middleware('auth')
|
|
->name('logout');
|
|
|
|
Route::middleware('auth')->group(function () {
|
|
Route::get('/', function () {
|
|
return redirect()->route('dashboard');
|
|
});
|
|
|
|
Route::get('/dashboard', function () {
|
|
return Inertia::render('Dashboard');
|
|
})->name('dashboard');
|
|
|
|
Route::get('/services', [ServiceController::class, 'index'])->name('services.index');
|
|
Route::post('/services/{service}/finalize', [ServiceController::class, 'finalize'])->name('services.finalize');
|
|
Route::post('/services/{service}/reopen', [ServiceController::class, 'reopen'])->name('services.reopen');
|
|
Route::get('/services/{service}/edit', [ServiceController::class, 'edit'])->name('services.edit');
|
|
|
|
Route::post('/songs/{song}/arrangements', '\\App\\Http\\Controllers\\ArrangementController@store')->name('arrangements.store');
|
|
Route::post('/arrangements/{arrangement}/clone', '\\App\\Http\\Controllers\\ArrangementController@clone')->name('arrangements.clone');
|
|
Route::put('/arrangements/{arrangement}', '\\App\\Http\\Controllers\\ArrangementController@update')->name('arrangements.update');
|
|
Route::delete('/arrangements/{arrangement}', '\\App\\Http\\Controllers\\ArrangementController@destroy')->name('arrangements.destroy');
|
|
|
|
Route::get('/songs/{song}/arrangements/{arrangement}/pdf', [SongPdfController::class, 'download'])->name('songs.pdf');
|
|
Route::get('/songs/{song}/arrangements/{arrangement}/preview', [SongPdfController::class, 'preview'])->name('songs.preview');
|
|
Route::post('/sync', [SyncController::class, 'sync'])->name('sync');
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Folien-Verwaltung
|
|
|--------------------------------------------------------------------------
|
|
*/
|
|
Route::post('/slides', '\\App\\Http\\Controllers\\SlideController@store')->name('slides.store');
|
|
Route::delete('/slides/{slide}', '\\App\\Http\\Controllers\\SlideController@destroy')->name('slides.destroy');
|
|
Route::patch('/slides/{slide}/expire-date', '\\App\\Http\\Controllers\\SlideController@updateExpireDate')->name('slides.update-expire-date');
|
|
});
|