@extends('layouts.app') @section('title', 'Users') @section('page-title', 'Kelola User') @section('page-sub', 'Daftar pengguna dan hak akses sistem POS.') @section('page-actions') Tambah User @endsection @section('content')
@foreach($users as $u) @endforeach
Nama Email Role Status Aksi
{{ $u->name }} @if($u->id === auth()->id()) (Anda) @endif {{ $u->email }} {{ ucfirst($u->getRoleNames()->first() ?? '-') }} Edit @if($u->id !== auth()->id()) @endif
@endsection @push('scripts') @include('partials.dt-init', [ 'tableId' => 'tbl-users', 'config' => "{ order: [[0, 'asc']], columnDefs: [ { className: 'dtr-control', orderable: false, targets: -1 }, { orderable: false, targets: [4] }, { responsivePriority: 1, targets: 0 }, { responsivePriority: 2, targets: 3 }, { responsivePriority: 10, targets: [1, 2, 4] }, ], }", ]) @endpush