All Lists finalized

This commit is contained in:
2026-03-29 00:37:03 +01:00
parent 2d17e61cc8
commit 43f8621053
9 changed files with 27682 additions and 6 deletions

View File

@@ -133,7 +133,6 @@ class DetailsController extends CommonController {
$participants = $this->eventParticipants->getForList($event, $request);
$kitchenOverview = $this->eventParticipants->getKitchenOverview($event);
$html = view('pdfs.' . $listType, [
'event' => $event->name,
'eventStart' => $event->start_date,
@@ -153,4 +152,22 @@ class DetailsController extends CommonController {
'Content-Disposition' => 'attachment; filename="' . $listType .'.pdf"',
]);
}
public function downloadCsvList(string $eventId, string $listType, Request $request): Response
{
$event = $this->events->getByIdentifier($eventId);
$participants = $this->eventParticipants->getForList($event, $request);
$kitchenOverview = $this->eventParticipants->getKitchenOverview($event);
$csv = view('csvs.' . $listType, [
'event' => $event->name,
'rows' => $participants,
])->render();
return response($csv, 200, [
'Content-Type' => 'text/csv; charset=UTF-8',
'Content-Disposition' => 'attachment; filename="' . $listType . '.csv"',
]);
}
}