Handling of event addons

This commit is contained in:
2026-08-12 17:18:45 +02:00
parent 085299336e
commit 6e4e6b645c
74 changed files with 3072 additions and 95 deletions
@@ -96,6 +96,10 @@ class EventParticipantResource extends JsonResource
'eventName' => $this->resource->event()->first()->name,
'arrivalDateReadable' => $this->resource->arrival_date->format('d.m.Y'),
'departureDateReadable' => $this->resource->departure_date->format('d.m.Y'),
'participationOptions' => $this->resource->selectedOptions()->get()->map(
fn($option) => new EventParticipantOptionResource($option)->toArray($request))->toArray(),
'selectedAddons' => $this->resource->selectedAddons()->get()->map(
fn($addon) => new EventParticipantAddonResource($addon)->toArray($request))->toArray(),
]
);
}