Basic signup for events
This commit is contained in:
@@ -20,6 +20,7 @@ class EventParticipant extends InstancedModel
|
||||
'tenant',
|
||||
'event_id',
|
||||
'user_id',
|
||||
'identifier',
|
||||
|
||||
'firstname',
|
||||
'lastname',
|
||||
@@ -42,6 +43,8 @@ class EventParticipant extends InstancedModel
|
||||
|
||||
'allergies',
|
||||
'intolerances',
|
||||
'medications',
|
||||
'tetanus_vaccination',
|
||||
'eating_habits',
|
||||
'swimming_permission',
|
||||
'first_aid_permission',
|
||||
@@ -60,12 +63,14 @@ class EventParticipant extends InstancedModel
|
||||
'notes',
|
||||
'amount',
|
||||
'amount_paid',
|
||||
'payment_purpose',
|
||||
'efz_status',
|
||||
'unregistered_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'birthday' => 'datetime',
|
||||
'tetanus_vaccination' => 'datetime',
|
||||
'arrival_date' => 'datetime',
|
||||
'departure_date' => 'datetime',
|
||||
'unregistered_at' => 'datetime',
|
||||
@@ -131,5 +136,21 @@ class EventParticipant extends InstancedModel
|
||||
return $this->belongsTo(EfzStatus::class, 'efz_status', 'slug');
|
||||
}
|
||||
|
||||
public function getOfficialName() : string {
|
||||
return sprintf('%1$s %2$s', $this->firstname, $this->lastname);
|
||||
}
|
||||
|
||||
public function getFullname() : string {
|
||||
return sprintf('%1$1s %2$s %3$s',
|
||||
$this->firstname,
|
||||
$this->lastname,
|
||||
$this->nickname !== null ? '(' . $this->nickname . ')' : '',
|
||||
)
|
||||
|>trim(...);
|
||||
}
|
||||
|
||||
public function getNicename() : string {
|
||||
return $this->nickname ?? $this->firstname;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user