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"',
]);
}
}

View File

@@ -19,6 +19,7 @@ Route::middleware(IdentifyTenant::class)->group(function () {
Route::get('/new', CreateController::class);
Route::get('/details/{eventId}', DetailsController::class);
Route::get('/details/{eventId}/pdf/{listType}', [DetailsController::class, 'downloadPdfList']);
Route::get('/details/{eventId}/csv/{listType}', [DetailsController::class, 'downloadCsvList']);
});
});
});

View File

@@ -64,8 +64,10 @@ import {onMounted, reactive, ref} from "vue";
<input type="button" value="Erste-Hilfe-Liste (PDF)" />
</a><br/>
<input type="button" value="Teili-Liste (CSV)" /><br/>
<input type="button" value="KSV-Daten (CSV)" /><br/>
<a :href="'/event/details/' + props.data.event.identifier + '/csv/participant-list'">
<input type="button" value="Teili-Liste (CSV)" />
</a><br/>
<a :href="'/event/details/' + props.data.event.identifier + '/pdf/kitchen-list'">
<input type="button" value="Küchenübersicht (PDF)" />
</a><br/>
@@ -74,8 +76,13 @@ import {onMounted, reactive, ref} from "vue";
<input type="button" value="Beitragsliste (PDF)" />
</a><br/>
<input type="button" value="Getränkeliste (PDF)" /><br/>
<input type="button" value="Foto-Erlaubnis (PDF)" /><br/>
<a :href="'/event/details/' + props.data.event.identifier + '/pdf/drinking-list'">
<input type="button" value="Getränkeliste (PDF)" />
</a><br/>
<a :href="'/event/details/' + props.data.event.identifier + '/pdf/photo-permission-list'">
<input type="button" value="Foto-Erlaubnis (PDF)" />
</a><br/>
<input type="button" class="fix-button" value="Zahlungserinnerung senden" /><br/>
<input type="button" class="deny-button" value="Letzte Mahnung senden" /><br/>
<input type="button" value="Rundmail senden" /><br/>