Files
ilycats/storage/framework/views/dc268316753a833f47e3707182768657.php
T
2026-09-23 12:45:02 +07:00

178 lines
11 KiB
PHP

<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<div class="max-w-6xl mx-auto px-6 py-10 space-y-8">
<div class="flex flex-col md:flex-row md:items-end justify-between gap-6 px-2 mt-4">
<div class="space-y-2">
<div class="inline-flex items-center gap-2 px-3 py-1 bg-indigo-50 text-indigo-600 rounded-full border border-indigo-100">
<i class="fas fa-shield-alt text-[10px]"></i>
<span class="text-[9px] font-black uppercase tracking-widest">Security Module</span>
</div>
<h2 class="text-3xl font-black text-slate-800 tracking-tighter uppercase leading-none">Pengelolaan Hak Akses</h2>
<p class="text-sm text-slate-400 font-medium italic">Konfigurasi matriks perizinan dan otoritas sistem ilycats.</p>
</div>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['roles', 'create'])): ?>
<div class="shrink-0">
<a href="<?php echo e(route('admin.roles.create')); ?>" class="inline-flex items-center justify-center px-6 py-3.5 bg-indigo-600 hover:bg-indigo-700 text-white text-[10px] font-black rounded-2xl shadow-xl shadow-indigo-100 transition-all active:scale-95 tracking-widest uppercase">
<i class="fas fa-plus-circle mr-2 text-base"></i> TAMBAH ROLE BARU
</a>
</div>
<?php endif; ?>
</div>
<div class="bg-white border border-slate-200 rounded-[3rem] shadow-sm overflow-hidden">
<div class="overflow-x-auto custom-scrollbar">
<table class="w-full text-left border-collapse min-w-[800px]">
<thead class="bg-slate-50 border-b border-slate-100">
<tr>
<th class="px-10 py-6 text-[10px] font-black text-slate-400 uppercase tracking-widest">Identitas Hak Akses</th>
<th class="px-10 py-6 text-[10px] font-black text-slate-400 uppercase tracking-widest">Slug Identitas</th>
<th class="px-10 py-6 text-[10px] font-black text-slate-400 uppercase tracking-widest text-right">Otoritas Matriks</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-50">
<?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="hover:bg-slate-50/50 transition-all group">
<td class="px-10 py-6">
<div class="flex items-center gap-4">
<div class="w-12 h-12 rounded-2xl bg-slate-100 flex items-center justify-center text-slate-400 group-hover:bg-indigo-600 group-hover:text-white border border-slate-200 group-hover:border-indigo-500 transition-all duration-300 shadow-sm">
<i class="fas fa-user-tag text-sm"></i>
</div>
<div>
<span class="text-sm font-black text-slate-800 uppercase tracking-tight block"><?php echo e($role->name); ?></span>
<span class="text-[9px] text-slate-400 font-bold uppercase tracking-tighter">Tingkat Hak Akses Sistem</span>
</div>
</div>
</td>
<td class="px-10 py-6">
<span class="px-3 py-1.5 bg-slate-100 text-slate-500 text-[9px] font-black rounded-lg border border-slate-200/60 tracking-wider font-mono">
<?php echo e($role->slug); ?>
</span>
</td>
<td class="px-10 py-6">
<div class="flex justify-end items-center gap-3">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['roles', 'update'])): ?>
<a href="<?php echo e(route('admin.roles.edit', $role->id)); ?>"
class="inline-flex items-center gap-2 px-5 py-2.5 bg-white text-indigo-600 border-2 border-indigo-50 hover:bg-indigo-600 hover:text-white hover:border-indigo-600 rounded-xl text-[9px] font-black uppercase tracking-widest transition-all shadow-sm active:scale-95 group/btn">
<i class="fas fa-cog group-hover/btn:rotate-90 transition-transform duration-500"></i> Configuration
</a>
<?php endif; ?>
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['roles', 'delete'])): ?>
<?php if($role->slug !== 'admin'): ?>
<form id="delete-form-<?php echo e($role->id); ?>" action="<?php echo e(route('admin.roles.destroy', $role->id)); ?>" method="POST" class="inline">
<?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
<button type="button"
onclick="confirmDeleteRole(<?php echo e($role->id); ?>, '<?php echo e(addslashes($role->name)); ?>')"
class="w-10 h-10 flex items-center justify-center text-slate-300 hover:text-rose-600 hover:bg-rose-50 rounded-xl transition-all"
title="Hapus Role">
<i class="fas fa-trash-alt text-xs"></i>
</button>
</form>
<?php endif; ?>
<?php endif; ?>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="p-6 bg-indigo-900 rounded-[2.5rem] text-white shadow-xl shadow-indigo-100 flex items-center gap-5">
<div class="w-12 h-12 bg-indigo-800 rounded-2xl flex items-center justify-center text-xl shrink-0">
<i class="fas fa-info-circle"></i>
</div>
<div>
<p class="text-[10px] font-black uppercase tracking-widest opacity-60 mb-1">Pemberitahuan</p>
<p class="text-xs font-bold leading-relaxed">Perubahan pada matriks izin akan langsung berdampak pada seluruh staf yang terkait.</p>
</div>
</div>
<div class="p-6 bg-slate-50 border border-slate-200 rounded-[2.5rem] flex items-center gap-5 italic">
<div class="w-12 h-12 bg-white border border-slate-200 rounded-2xl flex items-center justify-center text-slate-400 text-xl shrink-0">
<i class="fas fa-user-lock"></i>
</div>
<div>
<p class="text-[10px] font-black uppercase tracking-widest text-slate-400 mb-1">Keamanan Data</p>
<p class="text-xs font-bold text-slate-500">Pastikan role Administrator tidak kehilangan akses Read pada modul Hak Akses.</p>
</div>
</div>
</div>
</div>
<?php $__env->startPush('scripts'); ?>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script>
function confirmDeleteRole(id, name) {
Swal.fire({
title: 'Hapus Role?',
html: `Konfirmasi penghapusan permanen untuk:<br><b class="text-rose-600 text-lg">${name}</b>`,
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#f43f5e',
cancelButtonColor: '#64748b',
confirmButtonText: 'Ya, Hapus!',
cancelButtonText: 'Batal',
customClass: {
popup: 'rounded-[2.5rem]',
title: 'font-black text-slate-800 uppercase tracking-tighter'
}
}).then((result) => {
if (result.isConfirmed) {
document.getElementById(`delete-form-${id}`).submit();
}
});
}
<?php if(session('success')): ?>
Swal.fire({
icon: 'success',
title: 'BERHASIL',
text: "<?php echo e(session('success')); ?>",
showConfirmButton: false,
timer: 2500,
toast: true,
position: 'top-end',
customClass: { popup: 'rounded-2xl shadow-xl' }
});
<?php endif; ?>
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH /home/u806112658/domains/earrinasia.com/ilycats/resources/views/pages/admin/roles/index.blade.php ENDPATH**/ ?>