Fix für Short-Signups
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user