Support oft parent groups
This commit is contained in:
1 parent
c4ca101594
commit
a5e4e55df5
86 files changed
+1936
-80
No files matched your search
@@ -73,12 +73,18 @@ class EventParticipantRepository {
|
||||
->first();
|
||||
}
|
||||
|
||||
public function groupByLocalGroup(Event $event, Request $request, ?string $filter = null) : array {
|
||||
/** Ob es zur Veranstaltung schon Anmeldungen gibt -- abgemeldete eingeschlossen. */
|
||||
public function existsForEvent(Event $event) : bool {
|
||||
return EventParticipant::where('event_id', $event->id)->exists();
|
||||
}
|
||||
|
||||
/** Gruppiert nach der bei der Anmeldung gewählten Gruppe (Local oder Parent Group, je nach Veranstaltung). */
|
||||
public function groupByParticipantGroup(Event $event, Request $request, ?string $filter = null) : array {
|
||||
$allParticipants = $this->getForList($event, $request);
|
||||
$participants = [];
|
||||
foreach ($allParticipants as $participant) {
|
||||
if ($filter === null || $participant['localgroup'] === $filter) {
|
||||
$participants[$participant['localgroup']][] = $participant;
|
||||
if ($filter === null || $participant['participantGroup'] === $filter) {
|
||||
$participants[$participant['participantGroup']][] = $participant;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user