105 lines
6.1 KiB
PHP
105 lines
6.1 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="space-y-6 pb-8">
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['users', 'create'])): ?>
|
|
<a href="<?php echo e(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>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
|
|
<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">
|
|
<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<tr class="hover:bg-slate-50/50 transition-all">
|
|
|
|
<td class="px-6 py-4">
|
|
<div class="font-black text-slate-800"><?php echo e($user->name); ?></div>
|
|
<div class="text-[10px] text-slate-400 font-bold uppercase"><?php echo e($user->email); ?></div>
|
|
</td>
|
|
|
|
|
|
<td class="px-6 py-4">
|
|
<span class="text-xs font-bold text-slate-500"><?php echo e($user->phone ?? '-'); ?></span>
|
|
</td>
|
|
|
|
|
|
<td class="px-6 py-4 text-center">
|
|
<span class="px-3 py-1 rounded-xl text-[10px] font-black uppercase <?php echo e($user->role == 'admin' ? 'bg-indigo-50 text-indigo-600 border border-indigo-100' : 'bg-slate-50 text-slate-500 border border-slate-200'); ?>">
|
|
<?php echo e($user->roleModel?->name ?? $user->role ?? '-'); ?>
|
|
|
|
</span>
|
|
</td>
|
|
|
|
|
|
<td class="px-6 py-4 text-right">
|
|
<div class="flex justify-end gap-2">
|
|
|
|
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['users', 'update'])): ?>
|
|
<a href="<?php echo e(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>
|
|
<?php endif; ?>
|
|
|
|
|
|
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('check-access', ['users', 'delete'])): ?>
|
|
<form action="<?php echo e(route('admin.users.destroy', $user->id)); ?>" method="POST" onsubmit="return confirm('Hapus user ini? Staf ini tidak akan bisa login lagi.')" class="inline">
|
|
<?php echo csrf_field(); ?> <?php echo method_field('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>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="mt-4">
|
|
<?php echo e($users->links()); ?>
|
|
|
|
</div>
|
|
</div>
|
|
<?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/users/index.blade.php ENDPATH**/ ?>
|