{{ __('form.Shift-Change') }}

{{-- ===================== MOBILE SEARCH & FILTER ===================== --}}
{{-- Search input --}}
{{-- Filter date --}}
{{-- Status filter buttons --}}
{{-- Per page select --}}
{{-- Result count --}}
{{-- ===================== DESKTOP TABLE ===================== --}} {{-- ===================== MOBILE CARD LIST ===================== --}}
@forelse ($data as $shiftchange) @php $approval = $shiftchange->approval; $currentStep = $approval?->steps->firstWhere('status', 'active'); $currentUser = auth()->user(); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->user_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } $foto = $shiftchange->employee->foto ?? 'https://api.dicebear.com/9.x/initials/svg?seed=' . urlencode($shiftchange->employee->fullname ?? 'User'); $statusLabel = $shiftchange->status === 'P' ? 'pending' : ($shiftchange->status === 'A' ? 'approved' : 'rejected'); @endphp
{{-- Header --}}
{{-- Detail info --}}
Tanggal : {{ $shiftchange->effective_date }} Shift Lama : {{ $shiftchange->currentshift->name }} Shift Baru : {{ $shiftchange->newshift->name }} Status :
@empty

Tidak ada data Shift Change

@endforelse {{-- Pagination controls --}}