feat(permissions): full permission catalogue grouped by section
- Migration: add 'group' and 'description' columns to the permissions table. - PermissionCatalogSeeder (idempotent updateOrCreate): full catalogue across 11 sections — Proyectos, Fases y progreso, Capas y elementos, Inspecciones, Incidencias, Empresas, Usuarios, Roles, Informes, Archivos, General. Sets group + description on existing and creates the new ones; does NOT touch role assignments. Registered in DatabaseSeeder. - RoleView: group permission toggles by the 'group' column in a defined section order and show each permission's description. DB updated locally (migrate + seed run). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,9 +110,14 @@
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-2">
|
||||
@foreach($perms as $perm)
|
||||
<label class="flex items-center justify-between gap-3 cursor-pointer py-1">
|
||||
<span class="text-sm">{{ $perm->name }}</span>
|
||||
<div class="min-w-0">
|
||||
<span class="text-sm">{{ $perm->name }}</span>
|
||||
@if($perm->description)
|
||||
<p class="text-xs text-gray-400 leading-tight">{{ $perm->description }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<input type="checkbox"
|
||||
class="toggle toggle-primary toggle-sm"
|
||||
class="toggle toggle-primary toggle-sm shrink-0"
|
||||
wire:key="perm-{{ $role->id }}-{{ $perm->id }}"
|
||||
@checked(in_array($perm->name, $rolePerms, true))
|
||||
wire:click="togglePermission('{{ $perm->name }}')" />
|
||||
|
||||
Reference in New Issue
Block a user