@if($has_permission_to_add_open_shift ?? false)
@endif
@if ($shiftRow && $shiftRow->allocations->count())
@foreach ($shiftRow->allocations as $allocation)
@if($allocation->shift_type == 'open_shift_with_approval')
@php
$allocStart = $allocation->start_time ? \Carbon\Carbon::parse($allocation->start_time)->format('H:i') : '';
$allocEnd = $allocation->end_time ? \Carbon\Carbon::parse($allocation->end_time)->format('H:i') : '';
$openusers = $allocation->openUsers->pluck('user_id')->toArray();
@endphp
Allocation ID:
#{{ $allocation->id }}
@if(!empty($allocation['cancelled']) && $allocation['cancelled'])
Cancelled
@endif
@if(isset($allocation->staff_id))
@endif
@if (!empty($shared_clients))
@php
$scHours = collect(
$allocation->sharedClients ?? [],
)
->pluck('client_hours', 'client_id')
->toArray();
@endphp
Shared Client Hours
({{ array_sum($scHours) }})
@foreach ($shared_clients as $scId => $scName)
@endforeach
@endif
@else
@php
$allocStart = $allocation->start_time ? \Carbon\Carbon::parse($allocation->start_time)->format('H:i') : '';
$allocEnd = $allocation->end_time ? \Carbon\Carbon::parse($allocation->end_time)->format('H:i') : '';
@endphp
Allocation ID:
#{{ $allocation->id }}
@if(!empty($allocation['cancelled']) && $allocation['cancelled'])
Cancelled
@endif
@if($is_core_shift_permitted ?? false)
@endif
@if (!empty($shared_clients))
@php
$scHours = collect(
$allocation->sharedClients ?? [],
)
->pluck('client_hours', 'client_id')
->toArray();
@endphp
Shared Client Hours
({{ array_sum($scHours) }})
@foreach ($shared_clients as $scId => $scName)
@endforeach
@endif
@endif
@endforeach
@else
No staff assigned yet
@endif