Detailing fungsi semua modul dari bugs error

This commit is contained in:
Iwit
2026-06-05 13:39:13 +07:00
parent 1089f60a3d
commit 6a79bc3464
31 changed files with 1927 additions and 228 deletions
@@ -72,7 +72,7 @@
</div>
<div>
<p class="text-sm font-medium text-slate-500">Total Karyawan Aktif</p>
<p class="text-2xl font-bold text-slate-900">{{ $department->users()->count() }} Orang</p>
<p class="text-2xl font-bold text-slate-900">{{ $department->users->count() }} Orang</p>
</div>
</div>
@@ -104,25 +104,39 @@
<th class="px-6 py-3 font-semibold text-right">Opsi</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-slate-700">
@forelse($department->users as $user)
<tr class="hover:bg-slate-50">
<td class="px-6 py-3 font-mono text-xs font-bold">{{ $user->nik ?? '-' }}</td>
<td class="px-6 py-3">
<div class="font-bold text-slate-900">{{ $user->first_name }} {{ $user->last_name }}</div>
<div class="text-xs text-slate-500">{{ $user->email }}</div>
</td>
<td class="px-6 py-3 text-sm">{{ $user->position->name ?? '-' }}</td>
<td class="px-6 py-3 text-right">
<a href="{{ route('admin.employees.show', $user->id) }}" class="text-indigo-600 hover:text-indigo-800 font-medium text-xs">Detail</a>
</td>
</tr>
@empty
<tr>
<td colspan="4" class="px-6 py-8 text-center text-slate-500 italic">Belum ada karyawan di departemen ini.</td>
</tr>
@endforelse
</tbody>
<tbody class="divide-y divide-slate-100">
@forelse($department->users as $employee)
<tr class="hover:bg-slate-50 transition-colors">
<td class="px-6 py-4 text-sm font-medium text-slate-600">
{{ $employee->nik ?? '-' }}
</td>
<td class="px-6 py-4">
<div class="font-bold text-slate-800">{{ $employee->first_name }} {{ $employee->last_name }}</div>
<div class="text-xs text-slate-400 mt-0.5">{{ $employee->email }}</div>
</td>
<td class="px-6 py-4 text-sm font-semibold text-indigo-600">
{{ $employee->position->name ?? 'Belum ada jabatan' }}
</td>
<td class="px-6 py-4 text-sm text-right">
<a href="{{ route('admin.employees.show', $employee->id) }}" class="inline-flex items-center px-3 py-1.5 bg-blue-50 text-blue-600 hover:bg-blue-100 font-bold rounded-lg transition-colors">
Detail Profil
</a>
</td>
</tr>
@empty
<tr>
<td colspan="4" class="px-6 py-12 text-center">
<div class="flex flex-col items-center justify-center text-slate-400">
<svg class="w-12 h-12 mb-3 opacity-50" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"></path></svg>
<p class="font-medium text-slate-500">Belum ada karyawan yang terdaftar di departemen ini.</p>
</div>
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>