@extends('layouts.app') @section('title', 'Time Sheet- Canindigo INC') @section('page-title', 'My Time Sheets') @section('content')

Time Sheet Summary

Add New Entry

Total Regular Hours

{{ $totalRegularHours ?? 0 }} hrs

Total Overtime Hours

{{ ($totalOvertimeWeekdays ?? 0) + ($totalOvertimeWeekend ?? 0) }} hrs

Total Hours Worked With (OT)

{{ $totalAllHours ?? 0 }} hrs

@forelse($timesheets ?? [] as $timesheet) @php // Calculate hours for each row $start = \Carbon\Carbon::parse($timesheet->start_time); $end = \Carbon\Carbon::parse($timesheet->end_time); $regularHours =- round($end->diffInMinutes($start) / 60, 2); $totalWithOT = $regularHours + ($timesheet->overtime_weekdays ?? 0) + ($timesheet->overtime_weekend ?? 0); @endphp @empty @endforelse @if(isset($timesheets) && $timesheets->count() > 0) @endif
DATE TIME TOTAL HOURS OT WEEKDAYS OT WEEKEND TOTAL WITH OT ACTIONS
{{ $timesheet->date->format('M d, Y') }}
{{ $timesheet->date->format('l') }}
{{ date('g:i A', strtotime($timesheet->start_time)) }} - {{ date('g:i A', strtotime($timesheet->end_time)) }}
{{ $regularHours }} hrs {{ $timesheet->overtime_weekdays ?? 0 }} hrs {{ $timesheet->overtime_weekend ?? 0 }} hrs {{ $totalWithOT }} hrs View
@csrf @method('DELETE')
No timesheet entries found.
Totals: {{ $totalRegularHours ?? 0 }} hrs {{ $totalOvertimeWeekdays ?? 0 }} hrs {{ $totalOvertimeWeekend ?? 0 }} hrs {{ $totalAllHours ?? 0 }} hrs
@endsection