@php $locale = app()->getLocale(); $monthName = \Carbon\Carbon::create($year, $month, 1)->locale($locale)->isoFormat('MMMM YYYY'); $monthYearUpper = \Illuminate\Support\Str::upper($monthName); $title = $departmentTitle ? __( 'general.clockings.title_department', ['department' => $departmentTitle, 'month_year' => $monthYearUpper, 'instance' => $instanceName] ) : __( 'general.clockings.title_global', ['month_year' => $monthYearUpper, 'instance' => $instanceName] ); @endphp @foreach(range(1, $lastDayInMonth) as $day) @endforeach {{-- --}} {{-- --}} @foreach($data['data'] as $row) @foreach(range(1, $lastDayInMonth) as $day) @php $dayData = $row['clocking_time_per_day'][$day-1]; $hasClocking = !empty($dayData['id']); @endphp @if(($dayData['status'] == 'not_working_today' || $dayData['status'] == 'not_work_schedule') && !$hasClocking) @elseif ($dayData['status'] == 'on_leave_day' && !$hasClocking) @else @php $clockingType = $dayData['clocking_type'] ?? null; if ($clockingType === 'remote') { $cellContent = 'T'; } elseif ($clockingType === 'delegation') { $cellContent = 'D'; } elseif ($clockingType === 'field') { $cellContent = 'F'; } else { $cellContent = $dayData['logged_hours'] ?: 0; } @endphp @endif @endforeach {{-- --}} {{-- --}} @foreach(range(1, $lastDayInMonth) as $day) @php $workSchedule = $row['work_schedule'][$day-1] ?? null; @endphp @endforeach @endforeach {{-- --}}
{{ $title }}
# {{ __('general.clockings.name') }}{{$day}}{{ __('general.clockings.office_capital') }} {{ __('general.clockings.delegation_capital') }} {{ __('general.clockings.field_capital') }} {{ __('general.clockings.remote_capital') }} {{ __('general.clockings.total_work_hours') }}{{ __('general.clockings.total_excuses_hours') }}{{ __('general.clockings.day_off_capital') }} {{ __('general.clockings.sick_leaves_capital') }} {{ __('general.clockings.cp_leaves_capital') }} {{ __('general.clockings.cfp_leaves_capital') }} {{ __('general.clockings.recovery_capital') }} {{ __('general.clockings.zlp_leaves_capital') }} {{ __('general.clockings.saturdays_total') }} {{ __('general.clockings.sundays_total') }} {{ __('general.clockings.legal_total') }}{{ __('general.clockings.other_leaves') }}
{{ $loop->iteration }} {{ $row['name'] }}-{{ $dayData['vacation']['type'] }}{{ $cellContent }}{{ $row['office_worked_hours'] }} {{ $row['delegation_worked_hours'] }} {{ $row['field_worked_hours'] }} {{ $row['remote_worked_hours'] }} {{ $row['total_worked_hours'] }}{{ $row['total_vacation_excuse_hours'] }}{{ $row['total_co_days'] }} {{ $row['total_cm_days'] }} {{ $row['total_cp_days'] }} {{ $row['total_cfp_days'] }} {{ $row['total_recovery_days'] }} {{ $row['total_zlp_days'] }} {{ $row['total_saturday_hours'] }} {{ $row['total_sunday_hours'] }} {{ $row['total_legal_holiday_hours'] }}{{ $row['total_other_vacation_days'] }}
{{ $workSchedule ?: '' }}
{{ __('general.clockings.office_capital') }} - {{ __('general.clockings.office') }} {{ __('general.clockings.approval_footer_title') }}
{{ __('general.clockings.field_capital') }} - {{ __('general.clockings.field') }} {{ __('general.clockings.approval_footer_subtitle') }}
{{ __('general.clockings.delegation_capital') }} - {{ __('general.clockings.delegation') }}
{{ __('general.clockings.remote_capital') }} - {{ __('general.clockings.remote') }}
{{ __('general.clockings.day_off_capital') }} - {{ $vacationTypes['CO'] ?? __('general.clockings.day_off') }}
{{ __('general.clockings.sick_leaves_capital') }} - {{ $vacationTypes['CM'] ?? __('general.clockings.sick_leaves') }}
{{ __('general.clockings.cp_leaves_capital') }} - {{ $vacationTypes['CP'] ?? __('general.clockings.cp_leaves') }}
{{ __('general.clockings.cfp_leaves_capital') }} - {{ $vacationTypes['CFP'] ?? __('general.clockings.cfp_leaves') }}
{{ __('general.clockings.recovery_capital') }} - {{ $vacationTypes['R'] ?? __('general.clockings.recovery') }}
{{ __('general.clockings.absence_capital') }} - {{ $vacationTypes['N'] ?? __('general.clockings.absence') }}
{{ __('general.clockings.zlp_leaves_capital') }} - {{ $vacationTypes['ZLP'] ?? __('general.clockings.zlp_leaves') }}
OTHER - {{ __('general.clockings.other_leaves') }}