@forelse ($history_duty as $hd) @php $avatar = Util::linkFile('pas_photo', $hd->employee->pas_photo); $words = explode(' ', $hd->employee->name); $firstLetters = ''; foreach ($words as $word) { $firstLetters .= strtoupper($word[0]); } @endphp {{ $loop->index + 1 + $history_duty->perPage() * ($history_duty->currentPage() - 1) }} {{ $hd->gate }} {{ $hd->position }} {{ $hd->company }} {{ date('d F Y H:i', strtotime($hd->start_duty)) }} {{ date('d F Y H:i', strtotime($hd->end_duty)) }} @php if ($hd->status == 'In Progress') { $icon = 'timer.svg'; $class = 'bg-blue'; } elseif ($hd->status == 'Incomplete') { $icon = 'do_disturb.svg'; $class = 'is-danger'; } elseif ($hd->status == 'Hold') { $icon = 'pending.svg'; $class = 'is-warning'; } elseif ($hd->status == 'Scheduled') { $icon = 'calendar.svg'; $class = 'bg-grey'; } else { $icon = 'ic-check-circle.svg'; $class = 'is-success'; } @endphp {{ $hd->status }} @empty @include('components.empty.empty-state') @endforelse