Last bugfixes
This commit is contained in:
@@ -48,7 +48,7 @@ class EventParticipantResource extends JsonResource
|
||||
'unregisteredAt' => $this->resource->unregistered_at?->format('d.m.Y'),
|
||||
'fullname' => $this->resource->getFullName(),
|
||||
'age' => new Age($this->resource->birthday)->getAge(),
|
||||
'localgroup' => $this->resource->localGroup()->first()->name,
|
||||
'localgroup' => $this->resource->localGroup()?->first()?->name ?? 'Nicht im LV',
|
||||
'swimmingPermission' => $this->resource->swimmingPermission()->first()->short,
|
||||
'extendedFirstAid' => $this->resource->firstAidPermission()->first()->name,
|
||||
'tetanusVaccination' => $this->resource->tetanus_vaccination?->format('d.m.Y') ?? 'Unbekannt',
|
||||
@@ -64,10 +64,10 @@ class EventParticipantResource extends JsonResource
|
||||
'amountPaid' => ['value' => $this->resource->amount_paid, 'readable' => $this->resource->amount_paid?->toString() ?? '0,00 Euro', 'short' => $this->resource->amount_paid?->getFormattedAmount() ?? '0,00'],
|
||||
'amountExpected' => ['value' => $this->resource->amount, 'readable' => $this->resource->amount?->toString() ?? '0,00 Euro', 'short' => $this->resource->amount?->getFormattedAmount() ?? '0,00'],
|
||||
'alcoholicsAllowed' => new Age($this->resource->birthday)->getAge() >= $event->alcoholics_age,
|
||||
'localGroupPostcode' => $this->resource->localGroup()->first()->postcode,
|
||||
'localGroupCity' => $this->resource->localGroup()->first()->city,
|
||||
'localGroupPostcode' => $this->resource->localGroup()->first()?->postcode ?? '00000',
|
||||
'localGroupCity' => $this->resource->localGroup()->first()?->city ?? '00000',
|
||||
'state' => config('postCode.map.' . $this->resource->postcode),
|
||||
'localGroupState' => config('postCode.map.' . $this->resource->localGroup()->first()->postcode),
|
||||
'localGroupState' => null !== $this->resource->localGroup()->first()?->postcode ? config('postCode.map.' . $this->resource->postcode) : '--',
|
||||
'birthday' => $this->resource->birthday->format('d.m.Y'),
|
||||
'eatingHabit' => EatingHabit::where('slug', $this->resource->eating_habit)->first()->name,
|
||||
'cocColor' => match ($this->resource->efz_status) {
|
||||
|
||||
Reference in New Issue
Block a user