GUI for Participant management

This commit is contained in:
2026-04-07 22:27:47 +02:00
parent 653e85b781
commit e6bd8c684d
20 changed files with 965 additions and 153 deletions

View File

@@ -19,6 +19,7 @@ use App\ValueObjects\Amount;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use function Symfony\Component\String\b;
class DetailsController extends CommonController {
public function __invoke(int $eventId) {
@@ -170,4 +171,25 @@ class DetailsController extends CommonController {
'Content-Disposition' => 'attachment; filename="' . $listType . '.csv"',
]);
}
public function listParticipants(string $eventId, string $listType, Request $request) : JsonResponse {
$event = $this->events->getByIdentifier($eventId);
switch ($listType) {
case 'by-local-group':
$participants = $this->eventParticipants->groupByLocalGroup($event, $request);
break;
case 'by-participation-group':
$participants = $this->eventParticipants->groupByParticipationType($event, $request);
break;
case 'signed-off':
break;
default:
$participants = ['Alle Teilnehmenden' => $this->eventParticipants->getForList($event, $request)];
}
return response()->json([
'participants' => $participants,
'event' => $event->toResource()->toArray($request)
]);
}
}