chore: stop tracking compiled blade cache

This commit is contained in:
2026-09-23 13:56:51 +07:00
parent 507fc6ccdf
commit edd2f626be
154 changed files with 1149 additions and 12046 deletions
+28 -75
View File
@@ -1,85 +1,38 @@
<x-app-layout>
<div class="space-y-6 pb-8">
{{-- SECTION 1: HEADER & TAMBAH USER --}}
<div class="flex items-center justify-between">
<div>
<h2 class="text-2xl font-black text-slate-800 tracking-tight">Manajemen User</h2>
<p class="text-sm text-slate-500 font-medium italic">Kelola otoritas akses staf cattery.</p>
</div>
{{-- PROTEKSI CREATE: Mengikuti matriks izin modul users --}}
<div class="flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between">
<div><h2 class="text-2xl font-bold text-slate-900">Manajemen pengguna</h2><p class="mt-1 text-sm text-slate-500">Kelola akses, status akun, WhatsApp, dan kata sandi pengguna.</p></div>
@can('check-access', ['users', 'create'])
<a href="{{ route('admin.users.create') }}" class="inline-flex items-center px-5 py-3 bg-indigo-600 text-white text-[10px] font-black rounded-xl shadow-lg shadow-indigo-100 hover:bg-indigo-700 transition-all active:scale-95">
<i class="fas fa-plus mr-2"></i> TAMBAH USER
</a>
<a href="{{ route('admin.users.create') }}" class="rounded-xl bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-indigo-700"><i class="fas fa-user-plus mr-2"></i>Tambah pengguna</a>
@endcan
</div>
{{-- SECTION 2: TABEL USER --}}
<div class="bg-white border border-slate-200 rounded-[2.5rem] overflow-hidden shadow-sm">
<table class="w-full text-left">
<thead class="bg-slate-50 text-[10px] font-black text-slate-400 uppercase tracking-widest border-b">
<tr>
<th class="px-6 py-4">Nama & Email</th>
<th class="px-6 py-4">WhatsApp</th>
<th class="px-6 py-4 text-center">Role</th>
<th class="px-6 py-4 text-right">Aksi</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 font-medium text-slate-700">
@foreach($users as $user)
<tr class="hover:bg-slate-50/50 transition-all">
{{-- Identitas --}}
<td class="px-6 py-4">
<div class="font-black text-slate-800">{{ $user->name }}</div>
<div class="text-[10px] text-slate-400 font-bold uppercase">{{ $user->email }}</div>
</td>
{{-- Kontak --}}
<td class="px-6 py-4">
<span class="text-xs font-bold text-slate-500">{{ $user->phone ?? '-' }}</span>
</td>
{{-- Badge Role --}}
<td class="px-6 py-4 text-center">
<span class="px-3 py-1 rounded-xl text-[10px] font-black uppercase {{ $user->role == 'admin' ? 'bg-indigo-50 text-indigo-600 border border-indigo-100' : 'bg-slate-50 text-slate-500 border border-slate-200' }}">
{{ $user->roleModel?->name ?? $user->role ?? '-' }}
</span>
</td>
{{-- Aksi Berbasis Izin --}}
<td class="px-6 py-4 text-right">
<div class="flex justify-end gap-2">
{{-- PROTEKSI EDIT: Mengikuti matriks izin modul users --}}
@can('check-access', ['users', 'update'])
<a href="{{ route('admin.users.edit', $user->id) }}" class="p-2 text-slate-400 hover:text-amber-600 hover:bg-amber-50 rounded-xl transition-all" title="Edit Profile">
<i class="fas fa-edit text-xs"></i>
</a>
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-slate-200 text-sm">
<thead class="bg-slate-50 text-left text-xs font-semibold text-slate-500"><tr><th class="px-5 py-3">Pengguna</th><th class="px-5 py-3">WhatsApp</th><th class="px-5 py-3">Role</th><th class="px-5 py-3">Status</th><th class="px-5 py-3 text-right">Aksi</th></tr></thead>
<tbody class="divide-y divide-slate-100">
@forelse($users as $user)
<tr class="hover:bg-slate-50">
<td class="px-5 py-4"><p class="font-semibold text-slate-900">{{ $user->name }}</p><p class="mt-0.5 text-xs text-slate-500">{{ $user->email }}</p></td>
<td class="px-5 py-4 text-slate-600">{{ $user->phone ?: '-' }}</td>
<td class="px-5 py-4"><span class="rounded-full border border-slate-200 bg-slate-50 px-2.5 py-1 text-xs font-semibold text-slate-600">{{ $user->roleModel?->name ?? $user->role ?? '-' }}</span></td>
<td class="px-5 py-4">@if($user->is_active)<span class="rounded-full border border-emerald-100 bg-emerald-50 px-2.5 py-1 text-xs font-semibold text-emerald-700">Aktif</span>@else<span class="rounded-full border border-rose-100 bg-rose-50 px-2.5 py-1 text-xs font-semibold text-rose-700">Nonaktif</span>@endif</td>
<td class="px-5 py-4"><div class="flex justify-end gap-1">
@can('check-access',['users','update'])
<a href="{{ route('admin.users.edit',$user) }}" class="rounded-lg p-2 text-slate-500 hover:bg-slate-100" title="Ubah"><i class="fas fa-pen"></i></a>
<form action="{{ route('admin.users.status',$user) }}" method="POST">@csrf @method('PATCH')<button class="rounded-lg p-2 {{ $user->is_active?'text-rose-500 hover:bg-rose-50':'text-emerald-600 hover:bg-emerald-50' }}" title="{{ $user->is_active?'Nonaktifkan':'Aktifkan' }}" {{ $user->id===auth()->id() && $user->is_active ? 'disabled' : '' }}><i class="fas {{ $user->is_active?'fa-user-slash':'fa-user-check' }}"></i></button></form>
@endcan
{{-- PROTEKSI DELETE: Pengecekan manual 'admin' dihapus agar permission matriks berlaku sepenuhnya --}}
@can('check-access', ['users', 'delete'])
<form action="{{ route('admin.users.destroy', $user->id) }}" method="POST" onsubmit="return confirm('Hapus user ini? Staf ini tidak akan bisa login lagi.')" class="inline">
@csrf @method('DELETE')
<button type="submit" class="p-2 text-slate-400 hover:text-rose-600 hover:bg-rose-50 rounded-xl transition-all" title="Hapus User">
<i class="fas fa-trash-alt text-xs"></i>
</button>
</form>
@can('check-access',['users','delete'])
<form action="{{ route('admin.users.destroy',$user) }}" method="POST" onsubmit="return confirm('Hapus user ini?')">@csrf @method('DELETE')<button class="rounded-lg p-2 text-rose-500 hover:bg-rose-50" title="Hapus"><i class="fas fa-trash"></i></button></form>
@endcan
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{-- PAGINATION --}}
<div class="mt-4">
{{ $users->links() }}
</div></td>
</tr>
@empty<tr><td colspan="5" class="px-5 py-10 text-center text-slate-500">Belum ada pengguna.</td></tr>@endforelse
</tbody>
</table>
</div>
<div class="border-t border-slate-200 p-4">{{ $users->links() }}</div>
</div>
</div>
</x-app-layout>
</x-app-layout>