| @foreach( weekDays($dayOfWeek, true) as $day ) | {{ ucfirst($day) }} | @endforeachTotal | ||||||
|---|---|---|---|---|---|---|---|---|
| {{ $staff->getName() ?? 'Guest' }} | @foreach( weekDays($dayOfWeek, true) as $key => $day ) @php $k = (int) $d->addDays( $key )->format('Ymd'); @endphp @if( array_key_exists( $k, $staff->clock ) ) @php $clock_time = $staff->clock[$k]; @endphp @if( !empty( $clock_time ) && !empty($clock_time['total_time']) )
{{ $d->addDays($key)->format('d') }}
{{ $clock_time['total_time'] ?? 'Inaccurate' }}
@if( in_array($k, $staff->shifts) )
{{ 'System generated' }}
@endif
|
@else
{{ $d->copy()->addDays($key)->format('M d') }}
{{ 'Inaccurate' }}
@if( in_array($k, $staff->shifts) )
{{ 'System generated' }}
@endif
|
@endif
@php $rowTotal += $clock_time['time']; @endphp
@else
{{ $d->copy()->addDays($key)->format('M d') }}
{{ 'Inaccurate' }}
@if( in_array($k, $staff->shifts) )
{{ 'System generated' }}
@endif
|
@endif
@endforeach
@php $partsWeNeed = ( $rowTotal / 3600 ) > 1 ? 2 : 1; @endphp {{ $rowTotal > 60 ? \Carbon\CarbonInterval::seconds($rowTotal)->cascade() ->forHumans(['short' => true, 'join' => true, 'parts' => $partsWeNeed ]) : 0 }} | ||||
| Grand Total | @php $partsWeNeed = ( $grandTotal / 3600 ) > 1 ? 2 : 1; @endphp {{ $grandTotal > 60 ? \Carbon\CarbonInterval::seconds($grandTotal)->cascade() ->forHumans(['short' => true, 'join' => true, 'parts' => $partsWeNeed ]) : 0 }} | |||||||