Initial commit - lms-v2 + CLAUDE.md

This commit is contained in:
Iwit
2026-05-30 22:15:16 +07:00
commit 5811409e2d
183 changed files with 23225 additions and 0 deletions
@@ -0,0 +1,141 @@
@extends('layouts.app')
@section('content')
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="flex items-center justify-between mb-6">
<div>
<h2 class="text-2xl font-bold text-slate-800 tracking-tight">Detail Departemen</h2>
<p class="text-sm text-slate-500 mt-1">Informasi lengkap mengenai departemen.</p>
</div>
<a href="{{ route('admin.departments.index') }}" class="inline-flex items-center px-4 py-2 bg-slate-100 text-slate-700 rounded-lg text-sm font-semibold hover:bg-slate-200 transition-colors">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18"></path></svg>
Kembali
</a>
</div>
<div class="bg-white rounded-2xl shadow-sm border border-slate-200 overflow-hidden">
<div class="p-6 sm:p-10">
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div>
<h3 class="text-lg font-semibold text-slate-800 mb-4 pb-2 border-b border-slate-100">Informasi Utama</h3>
<div class="space-y-4">
<div>
<span class="block text-sm font-medium text-slate-500 mb-1">Kode Departemen</span>
<div class="inline-block bg-slate-100 text-slate-700 px-3 py-1 rounded-md text-sm font-bold border border-slate-200">
{{ $department->code ?? '-' }}
</div>
</div>
<div>
<span class="block text-sm font-medium text-slate-500 mb-1">Nama Departemen</span>
<div class="text-lg font-bold text-slate-900">
{{ $department->name }}
</div>
</div>
</div>
</div>
<div>
<h3 class="text-lg font-semibold text-slate-800 mb-4 pb-2 border-b border-slate-100">Informasi Sistem</h3>
<div class="space-y-4">
<div>
<span class="block text-sm font-medium text-slate-500 mb-1">ID Sistem</span>
<div class="text-sm text-slate-900 font-mono bg-slate-50 inline-block px-2 py-1 rounded border border-slate-100">
#{{ $department->id }}
</div>
</div>
<div>
<span class="block text-sm font-medium text-slate-500 mb-1">Tanggal Dibuat</span>
<div class="text-sm text-slate-900">
{{ $department->created_at ? $department->created_at->format('d F Y, H:i') : '-' }}
</div>
</div>
<div>
<span class="block text-sm font-medium text-slate-500 mb-1">Terakhir Diperbarui</span>
<div class="text-sm text-slate-900">
{{ $department->updated_at ? $department->updated_at->diffForHumans() : '-' }}
</div>
</div>
</div>
</div>
</div>
<div class="mt-10 pt-8 border-t border-slate-100">
<h3 class="text-lg font-semibold text-slate-800 mb-6">Pemetaan & Statistik</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="bg-indigo-50 border border-indigo-100 rounded-xl p-6 flex items-center">
<div class="p-3 bg-indigo-100 text-indigo-600 rounded-lg mr-4">
<svg class="w-8 h-8" 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>
</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>
</div>
</div>
<div class="bg-slate-50 border border-slate-100 rounded-xl p-6">
<p class="text-sm font-medium text-slate-500 mb-3">Posisi / Jabatan pada Departemen ini ({{ $department->positions()->count() }})</p>
<div class="flex flex-wrap gap-2">
@forelse($department->positions as $pos)
<span class="inline-flex items-center px-3 py-1 rounded-full text-xs font-semibold bg-white border border-slate-200 text-slate-700 shadow-sm">
{{ $pos->name }}
</span>
@empty
<span class="text-sm text-slate-400 italic">Belum ada posisi yang dipetakan.</span>
@endforelse
</div>
</div>
</div>
</div>
<div class="mt-10 pt-8 border-t border-slate-100">
<h3 class="text-lg font-semibold text-slate-800 mb-4">Daftar Karyawan di Departemen Ini</h3>
<div class="bg-white border border-slate-200 rounded-xl overflow-hidden shadow-sm">
<div class="overflow-x-auto custom-scrollbar">
<table class="w-full text-left text-sm whitespace-nowrap">
<thead class="bg-slate-50 text-slate-500 text-xs uppercase tracking-wider border-b border-slate-200">
<tr>
<th class="px-6 py-3 font-semibold">NIK</th>
<th class="px-6 py-3 font-semibold">Nama Karyawan</th>
<th class="px-6 py-3 font-semibold">Jabatan</th>
<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>
</table>
</div>
</div>
</div>
<div class="mt-10 pt-6 border-t border-slate-100 flex items-center justify-end space-x-3">
<a href="{{ route('admin.departments.edit', $department->id) }}" class="inline-flex items-center px-4 py-2 bg-indigo-50 text-indigo-700 rounded-lg text-sm font-semibold hover:bg-indigo-100 transition-colors">
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
Edit Departemen
</a>
</div>
</div>
</div>
</div>
@endsection