@if (count($data['items']) > 0) @foreach ($data['items'] as $key => $row) @endforeach @else @endif
{{ _trans('common.SL') }} {{ _trans('common.Employee') }} {{ _trans('common.Break Type') }} {{ _trans('common.Date') }} {{ _trans('common.Start Time') }} {{ _trans('common.End Time') }} {{ _trans('common.Duration') }} {{ _trans('common.Remark') }}
{{ $key + 1 }} {{ @$row->user->name }} {{ @$row->breakType->name }} {{ $row->date }} {{ date('h:i:s A', strtotime($row->start_time)) }} {{ $row->end_time ? date('h:i:s A', strtotime($row->end_time)) : '' }} @php // calculate break duration $start = new DateTime($row->start_time); $end = new DateTime($row->end_time); $diff = $start->diff($end); @endphp {{ $row->end_time ? $diff->format('%H:%I:%S') : '' }} {{ $row->remark ?? _trans('common.N/A') }}
{{ $data['items']->links('break::custom_pagination') }}