Sync SOP ke e-doc Plant & Add Subject dan penyempurnaan bagian matrix training karyawan

This commit is contained in:
Iwit
2026-06-04 19:01:17 +07:00
parent 91c0a8147f
commit 1089f60a3d
26 changed files with 1241 additions and 155 deletions
@@ -88,6 +88,52 @@
</dl>
</div>
<div class="mt-8 bg-white rounded-2xl shadow-sm border border-slate-200 overflow-hidden">
<div class="px-6 py-4 border-b border-slate-100 bg-slate-50 flex items-center justify-between">
<h3 class="text-lg font-bold text-slate-800">Riwayat Training & SOP</h3>
<span class="px-3 py-1 bg-blue-100 text-blue-700 text-xs font-bold rounded-full">
{{ $employee->trainings->count() }} Materi Diikuti
</span>
</div>
<div class="p-0 overflow-x-auto">
<table class="w-full text-left text-sm text-slate-600">
<thead class="bg-white border-b border-slate-100 text-slate-500 uppercase text-xs">
<tr>
<th class="px-6 py-3 w-16 text-center">No</th>
<th class="px-6 py-3">Nama Materi / Dokumen</th>
<th class="px-6 py-3 w-48 text-center">Status</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
@forelse($employee->trainings as $index => $training)
<tr class="hover:bg-slate-50 transition-colors">
<td class="px-6 py-4 text-center text-slate-400">{{ $index + 1 }}</td>
<td class="px-6 py-4 font-bold text-slate-700">{{ $training->name }}</td>
<td class="px-6 py-4 text-center">
@if($training->pivot->status == 'passed')
<span class="inline-flex items-center px-2.5 py-1 bg-emerald-50 text-emerald-700 rounded-md text-xs font-bold border border-emerald-200">
<svg class="w-3.5 h-3.5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg>
Lulus
</span>
@else
<span class="inline-flex items-center px-2.5 py-1 bg-amber-50 text-amber-700 rounded-md text-xs font-bold border border-amber-200">
<svg class="w-3.5 h-3.5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
Belum Training
</span>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="3" class="px-6 py-8 text-center text-slate-500">Karyawan ini belum ditugaskan untuk materi/SOP apapun.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
</div>
<!-- Kolom Kanan: Info Personal -->
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 p-6">
<h3 class="text-sm font-bold text-slate-800 uppercase tracking-wider mb-4 pb-2 border-b border-slate-100">Informasi Personal & Kontak</h3>