feat: festival/series model with sub-events, cross-event sections, tab navigation, SectionsShiftsPanel extraction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Http\Resources\Api\V1;
|
||||
|
||||
use App\Models\Event;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -21,6 +22,7 @@ final class EventResource extends JsonResource
|
||||
'end_date' => $this->end_date->toDateString(),
|
||||
'timezone' => $this->timezone,
|
||||
'status' => $this->status,
|
||||
'allowed_transitions' => Event::STATUS_TRANSITIONS[$this->status] ?? [],
|
||||
'event_type' => $this->event_type,
|
||||
'event_type_label' => $this->event_type_label,
|
||||
'sub_event_label' => $this->sub_event_label,
|
||||
|
||||
@@ -15,13 +15,18 @@ final class FestivalSectionResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'event_id' => $this->event_id,
|
||||
'name' => $this->name,
|
||||
'category' => $this->category,
|
||||
'icon' => $this->icon,
|
||||
'type' => $this->type,
|
||||
'sort_order' => $this->sort_order,
|
||||
'crew_need' => $this->crew_need,
|
||||
'crew_auto_accepts' => $this->crew_auto_accepts,
|
||||
'responder_self_checkin' => $this->responder_self_checkin,
|
||||
'crew_invited_to_events' => $this->crew_invited_to_events,
|
||||
'added_to_timeline' => $this->added_to_timeline,
|
||||
'responder_self_checkin' => $this->responder_self_checkin,
|
||||
'crew_accreditation_level' => $this->crew_accreditation_level,
|
||||
'public_form_accreditation_level' => $this->public_form_accreditation_level,
|
||||
'timed_accreditations' => $this->timed_accreditations,
|
||||
'created_at' => $this->created_at->toIso8601String(),
|
||||
'shifts_count' => $this->whenCounted('shifts'),
|
||||
];
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace App\Http\Resources\Api\V1;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
final class ShiftResource extends JsonResource
|
||||
{
|
||||
@@ -26,15 +27,18 @@ final class ShiftResource extends JsonResource
|
||||
'slots_total' => $this->slots_total,
|
||||
'slots_open_for_claiming' => $this->slots_open_for_claiming,
|
||||
'is_lead_role' => $this->is_lead_role,
|
||||
'report_time' => $this->report_time,
|
||||
'actual_start_time' => $this->actual_start_time,
|
||||
'actual_end_time' => $this->actual_end_time,
|
||||
'report_time' => $this->report_time ? Carbon::parse($this->report_time)->format('H:i') : null,
|
||||
'actual_start_time' => $this->actual_start_time ? Carbon::parse($this->actual_start_time)->format('H:i') : null,
|
||||
'actual_end_time' => $this->actual_end_time ? Carbon::parse($this->actual_end_time)->format('H:i') : null,
|
||||
'end_date' => $this->end_date?->toDateString(),
|
||||
'allow_overlap' => $this->allow_overlap,
|
||||
'events_during_shift' => $this->events_during_shift,
|
||||
'assigned_crew_id' => $this->assigned_crew_id,
|
||||
'status' => $this->status,
|
||||
'filled_slots' => $this->filled_slots,
|
||||
'fill_rate' => $this->fill_rate,
|
||||
'effective_start_time' => $this->effective_start_time,
|
||||
'effective_end_time' => $this->effective_end_time,
|
||||
'effective_start_time' => $this->effective_start_time ? Carbon::parse($this->effective_start_time)->format('H:i') : null,
|
||||
'effective_end_time' => $this->effective_end_time ? Carbon::parse($this->effective_end_time)->format('H:i') : null,
|
||||
'created_at' => $this->created_at->toIso8601String(),
|
||||
'time_slot' => new TimeSlotResource($this->whenLoaded('timeSlot')),
|
||||
'location' => new LocationResource($this->whenLoaded('location')),
|
||||
|
||||
Reference in New Issue
Block a user