@extends('layouts.app') @section('title','Detail Karyawan') @section('page-title','Detail Karyawan') @section('content') @php $gv = function(array $row, array $alts, $default='-') { foreach ($alts as $k) { $v = data_get($row, $k); if (!is_null($v) && $v!=='') return $v; } return $default; }; $fd = function($dateStr) { if(!$dateStr) return '-'; try { $dt=\Carbon\Carbon::parse($dateStr); return $dt->format('d M Y'); } catch(\Throwable $e){ return $dateStr; } }; $p = $emp['personal'] ?? []; $e = $emp['employment'] ?? []; @endphp
← Kembali

{{ $gv($p,['first_name']) }} {{ $gv($p,['last_name']) }}

User ID: {{ $emp['user_id'] ?? '-' }} Employee ID: {{ $gv($e,['employee_id']) }}
@if(!empty($p['avatar'])) avatar @else
{{ strtoupper(substr($gv($p,['first_name']),0,1)) }}
@endif
🏢 Employment
@foreach([ '🏬 Branch' => $gv($e,['branch']), '🏢 Organization' => $gv($e,['organization_name']), '💼 Job position' => $gv($e,['job_position','job_title']), '📊 Job level' => $gv($e,['job_level']), '📌 Employment status' => $gv($e,['employment_status','status']), '✅ Status' => $gv($e,['status']), '📅 Join date' => $fd($gv($e,['join_date'])), '📅 End date' => $fd($gv($e,['end_date'])), '🖊️ Sign date' => $fd($gv($e,['sign_date'])), '🚪 Resign date' => $fd($gv($e,['resign_date'])), '🔖 Barcode' => $gv($p,['barcode']) ] as $label => $value)
{{ $label }} {{ $value }}
@endforeach
👤 Personal
@foreach([ '📧 Email' => $gv($p,['email']), '📱 Phone' => $gv($p,['mobile_phone','phone']), '🎂 Birth date' => $fd($gv($p,['birth_date'])), '🌍 Birth place' => $gv($p,['birth_place']), '🏠 Address' => $gv($p,['address']), '🙏 Religion' => $gv($p,['religion']), '⚧ Gender' => $gv($p,['gender']), '💍 Marital status' => $gv($p,['marital_status']), '🆔 NIK' => $gv($p,['nik','identity_number']) ] as $label => $value)
{{ $label }} {{ $value }}
@endforeach
📄 Lihat RAW JSON
{{ json_encode($raw ?? $emp, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE) }}
      
@endsection