diff --git a/app/Http/Controllers/ServiceController.php b/app/Http/Controllers/ServiceController.php index cc99546..e06e61f 100644 --- a/app/Http/Controllers/ServiceController.php +++ b/app/Http/Controllers/ServiceController.php @@ -269,6 +269,8 @@ public function edit(Service $service): Response 'background_filename' => $service->background_filename, 'key_visual_url' => $service->key_visual_filename ? '/storage/'.$service->key_visual_filename : null, 'background_url' => $service->background_filename ? '/storage/'.$service->background_filename : null, + 'moderator_name' => $service->moderator_name, + 'preacher_name_override' => $service->preacher_name_override, ], 'serviceSongs' => $service->serviceSongs->map(fn ($ss) => [ 'id' => $ss->id, @@ -367,6 +369,18 @@ public function finalize(Service $service): JsonResponse ]); } + public function updateNameOverrides(Request $request, Service $service): RedirectResponse + { + $validated = $request->validate([ + 'moderator_name' => ['nullable', 'string', 'max:255'], + 'preacher_name_override' => ['nullable', 'string', 'max:255'], + ]); + + $service->update($validated); + + return back()->with('success', 'Namensangaben gespeichert.'); + } + public function reopen(Service $service): RedirectResponse { $service->update([ diff --git a/resources/js/Pages/Services/Edit.vue b/resources/js/Pages/Services/Edit.vue index 00f086f..8e1210a 100644 --- a/resources/js/Pages/Services/Edit.vue +++ b/resources/js/Pages/Services/Edit.vue @@ -98,6 +98,12 @@ function refreshPage() { router.reload({ preserveScroll: true }) } +function updateNameOverride(field, value) { + router.patch(route('services.name-overrides.update', { service: props.service.id }), { + [field]: value || null, + }, { preserveScroll: true }) +} + function scrollToInfoBlock() { informationBlockRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' }) } @@ -406,6 +412,42 @@ async function downloadService() { + +
+ Konfiguriere das ProPresenter-Makro, das für die Namenseinblendung bei Moderation und Predigt verwendet wird. Wenn kein Makro konfiguriert ist, werden keine Namensfolien generiert. +
+