Fix für Short-Signups

This commit is contained in:
2026-09-10 22:27:57 +02:00
parent 4e981c140b
commit 328825293a
13 changed files with 242 additions and 57 deletions
+9 -2
View File
@@ -234,13 +234,20 @@ class Event extends InstancedModel
* jede Anmeldung dieser Gruppe zu. Null, wenn für die Veranstaltung noch keine Gebühr hinterlegt ist --
* dann ist eine Kurzanmeldung nicht möglich, weil `participation_type` am Teilnehmer Pflicht ist.
*/
public function firstParticipationTypeSlug() : ?string {
/**
* Die erste hinterlegte Teilnahmegruppe -- die Kurzanmeldung meldet immer in dieser an.
*/
public function firstParticipationFee() : ?EventParticipationFee {
return collect([
$this->participationFee1,
$this->participationFee2,
$this->participationFee3,
$this->participationFee4,
])->first(fn ($participationFee) => $participationFee !== null)?->type;
])->first(fn ($participationFee) => $participationFee !== null);
}
public function firstParticipationTypeSlug() : ?string {
return $this->firstParticipationFee()?->type;
}
}