Kurzanmeldungen

This commit is contained in:
2026-09-10 11:11:20 +02:00
parent 6301c342e4
commit 70a57d10f5
31 changed files with 1753 additions and 184 deletions
+22
View File
@@ -45,6 +45,8 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
* @property float $support_flat
* @property int $alcoholics_age
* @property boolean $archived
* @property boolean $short_registration
* @property boolean $swimming_permission_required
* @property string|null $invoice_key
*/
class Event extends InstancedModel
@@ -91,6 +93,9 @@ class Event extends InstancedModel
'participation_options',
'addons',
'short_registration',
'swimming_permission_required',
'invoice_key',
];
@@ -121,6 +126,9 @@ class Event extends InstancedModel
'participation_options' => 'array',
'addons' => 'array',
'short_registration' => 'boolean',
'swimming_permission_required' => 'boolean',
];
public function tenant(): BelongsTo
@@ -205,4 +213,18 @@ class Event extends InstancedModel
return $this->hasMany(EventParticipant::class);
}
/**
* Slug der ersten konfigurierten Teilnahmegruppe. Die Kurzanmeldung fragt die Gruppe nicht ab und ordnet
* 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 {
return collect([
$this->participationFee1,
$this->participationFee2,
$this->participationFee3,
$this->participationFee4,
])->first(fn ($participationFee) => $participationFee !== null)?->type;
}
}