feat(roles): Rappasoft list, slim create form, and 2-tab role view

1. Roles list now uses a Rappasoft table (RoleTable): search/sort, per-row
   view/edit/delete, and built-in bulk selection + 'Delete selected'. The
   /admin/roles page is a plain view embedding <livewire:role-table />.
   RoleForm create/edit now only has Name + Description (permissions removed).
2. New RoleView page (/admin/roles/{role}) with two tabs:
   - 'Details': header with role name + Back button; description with Edit/Delete
     buttons; table of users holding the role (avatar+name | last name | status).
   - 'Permissions': all permissions grouped by section (by resource), each with a
     toggle switch to grant/revoke for this role (Admin keeps 'manage all').
Removed the old RoleManager component/view (superseded).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 17:21:16 +02:00
parent 5092896a1e
commit 5587026446
9 changed files with 364 additions and 258 deletions
@@ -42,23 +42,9 @@
</div>
</div>
{{-- Permisos --}}
<div class="flex items-start gap-4">
<label class="w-40 shrink-0 pt-2 text-sm font-medium text-gray-700">
{{ __('Permissions') }}
</label>
<div class="flex-1">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-1 border border-base-300 rounded-lg p-3 max-h-72 overflow-y-auto">
@foreach($permissions as $perm)
<label class="flex items-center gap-2 text-sm cursor-pointer py-0.5">
<input type="checkbox" class="checkbox checkbox-sm checkbox-primary"
value="{{ $perm->name }}" wire:model="rolePermissions" />
{{ $perm->name }}
</label>
@endforeach
</div>
</div>
</div>
<p class="text-xs text-gray-400 pl-44">
{{ __('Permissions are assigned from the role view, in the "Permissions" tab.') }}
</p>
<div class="flex items-center justify-end gap-3 pt-2 border-t border-base-200">
<a href="{{ route('admin.roles') }}" class="btn btn-ghost" wire:navigate>{{ __('Cancel') }}</a>