List of Timesheets and
Payslips
{{-- | --}}
{{-- Num--}}
{{-- | --}}
Date
|
Timesheet
|
Payslip
|
@foreach(Auth::user()->timeSheets()->with('payslip')->orderByDesc('year')->orderByDesc('month')->get() as $index => $timesheet)
@php
$months = [
'January' => '01',
'February' => '02',
'March' => '03',
'April' => '04',
'May' => '05',
'June' => '06',
'July' => '07',
'August' => '08',
'September' => '09',
'October' => '10',
'November' => '11',
'December' => '12',
];
@endphp
| {{ $timesheet->year }}-{{ $months[$timesheet->month] ?? '??' }}-{{ $timesheet->month }} |
{{-- {{ $timesheet->month }}, {{ $timesheet->year }} | --}}
{{-- Timesheet Actions --}}
@if($timesheet->timesheetFilePath != null)
@else
@endif
{{-- Only show delete if no payslip --}}
@if(!$timesheet->payslip)
@endif
|
@if($timesheet->payslip)
@else
N/A
@endif
|
@endforeach