Sync SOP ke e-doc Plant & Add Subject dan penyempurnaan bagian matrix training karyawan
This commit is contained in:
@@ -115,13 +115,37 @@
|
||||
</div>
|
||||
|
||||
<div class="border-t border-slate-100 pt-6 mt-6">
|
||||
<label class="block text-sm font-bold text-slate-700 mb-2">Modul SOP Training (Marketing)</label>
|
||||
<select name="training_matrix_id" class="select2 w-full text-sm">
|
||||
<option value="">-- Kosongkan jika bukan Plant Dept --</option>
|
||||
@foreach($trainingMatrices as $matrix)
|
||||
<option value="{{ $matrix->id }}" {{ old('training_matrix_id') == $matrix->id ? 'selected' : '' }}>{{ $matrix->title ?? $matrix->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<h3 class="text-sm font-bold text-slate-700 mb-1">Materi SOP / Training Matrix</h3>
|
||||
<p class="text-xs text-slate-500 mb-4">Pilih materi wajib untuk karyawan ini dan tentukan status pelatihannya.</p>
|
||||
|
||||
<div class="bg-slate-50 border border-slate-200 rounded-xl p-4 max-h-[400px] overflow-y-auto">
|
||||
<table class="w-full text-left text-sm text-slate-600">
|
||||
<thead class="border-b border-slate-200 text-slate-500 uppercase text-xs sticky top-0 bg-slate-50">
|
||||
<tr>
|
||||
<th class="py-2 w-12 text-center">Pilih</th>
|
||||
<th class="py-2">Nama Materi / Dokumen SOP</th>
|
||||
<th class="py-2 w-48 text-center">Status Training</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@foreach($subjects as $subject)
|
||||
<tr class="hover:bg-white transition-colors">
|
||||
<td class="py-3 text-center">
|
||||
<input type="checkbox" name="trainings[{{ $subject->id }}][selected]" value="1"
|
||||
class="w-5 h-5 text-blue-600 rounded border-slate-300 focus:ring-blue-500 cursor-pointer">
|
||||
</td>
|
||||
<td class="py-3 font-bold text-slate-700">{{ $subject->name }}</td>
|
||||
<td class="py-3">
|
||||
<select name="trainings[{{ $subject->id }}][status]" class="w-full px-3 py-1.5 bg-white border border-slate-300 rounded-lg text-xs font-bold focus:ring-blue-500">
|
||||
<option value="belum_training" class="text-amber-600">Belum Training</option>
|
||||
<option value="passed" class="text-emerald-600">Lulus (Passed)</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-slate-100 pt-6 mt-6" x-data="{ documents: [{ id: 1 }], addDocument() { this.documents.push({ id: Date.now() }); }, removeDocument(id) { this.documents = this.documents.filter(doc => doc.id !== id); } }">
|
||||
|
||||
Reference in New Issue
Block a user