@if ($patient->workActivities->first())
Data aktivitas kerja sudah tersedia
Diperbarui: {{ \App\Helpers\DateHelper::formatShort( $patient->workActivities->first()->updated_at, ) }} {{ $patient->workActivities ->first() ->updated_at->format('H:i') }}
@endif @php $latestWork = $patient->workActivities->first(); $workActivities = [ 'operates_moving_equipment' => 'Sopir / mengoperasikan peralatan bergerak (mobil, crane, alat lainnya)', 'works_at_height' => 'Bekerja di ketinggian (tangga, Lift, eskalator)', 'works_in_office' => 'Bekerja di perkantoran', 'works_in_noisy_place' => 'Bekerja di tempat bising', 'works_in_dusty_place' => 'Bekerja di tempat berdebu', 'needs_color_accuracy' => 'Perlu keakuratan warna, kode lampu warna', 'is_catering_staff' => 'Staff Catering (seluruh personal yang mengelola makanan)', 'handles_dangerous_materials' => 'Berhubungan dengan bahan yang berpotensi membahayakan', ]; $protectionMap = [ 'operates_moving_equipment' => 'moving_equipment', 'works_at_height' => 'height', 'works_in_office' => 'office', 'works_in_noisy_place' => 'noise', 'works_in_dusty_place' => 'dusty', 'needs_color_accuracy' => 'color', 'is_catering_staff' => 'catering', 'handles_dangerous_materials' => 'dangerous', ]; @endphp
Aktivitas Kerja Khusus
@foreach ($workActivities as $field => $label) @php $protectionKey = $protectionMap[$field] ?? ''; $usesProtection = $protectionKey && $latestWork && $latestWork->{"uses_{$protectionKey}_protection"}; $protectionDetails = $protectionKey && $latestWork ? $latestWork->{"{$protectionKey}_protection_details"} : ''; @endphp @endforeach
Kegiatan Waktu Kerja Y/N Memakai Perlindungan Y/N
{{ $label }}
$field ? 'checked' : '' }} >