pp-planer/routes/api.php
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

51 lines
1.9 KiB
PHP

<?php
use App\Http\Controllers\ProFileController;
use App\Http\Controllers\ServiceSongController;
use App\Http\Controllers\SongController;
use App\Http\Controllers\TranslationController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routen
|--------------------------------------------------------------------------
|
| Alle API-Routen sind authentifizierungspflichtig und verwenden
| das Prefix /api automatisch durch die Laravel API-Routing-Konvention.
|
*/
Route::middleware('auth:sanctum')->group(function () {
Route::apiResource('songs', SongController::class);
Route::post('/service-songs/{serviceSongId}/assign', [ServiceSongController::class, 'assignSong'])
->name('api.service-songs.assign');
Route::post('/service-songs/{serviceSongId}/request', [ServiceSongController::class, 'requestSong'])
->name('api.service-songs.request');
Route::post('/service-songs/{serviceSongId}/unassign', [ServiceSongController::class, 'unassign'])
->name('api.service-songs.unassign');
Route::patch('/service-songs/{serviceSongId}', [ServiceSongController::class, 'update'])
->name('api.service-songs.update');
// Übersetzung
Route::post('/translation/fetch-url', [TranslationController::class, 'fetchUrl'])
->name('api.translation.fetch-url');
Route::post('/songs/{song}/translation/import', [TranslationController::class, 'import'])
->name('api.songs.translation.import');
Route::delete('/songs/{song}/translation', [TranslationController::class, 'destroy'])
->name('api.songs.translation.destroy');
// .pro Datei Upload und Download (Placeholder)
Route::post('/songs/import-pro', [ProFileController::class, 'importPro'])
->name('api.songs.import-pro');
Route::get('/songs/{song}/download-pro', [ProFileController::class, 'downloadPro'])
->name('api.songs.download-pro');
});