feat: granular permissions, export backup, user/role management
- PermissionSeeder: 29 permissions with role mapping (admin/manager/staff) - Policies updated to use hasPermissionTo() instead of hasRole() - ExportBackup command: JSON per-table backup with chunk processing - UserResource: CRUD users with role assignment (admin only) - RoleResource: CRUD roles with permission assignment (admin only) - UserPolicy + RolePolicy: admin-only access control - ImportCskh: detailed skip logging with color in dry-run mode - Widgets: permission-based visibility checks - Tests: 8/8 pass (21 assertions)
This commit is contained in:
@@ -33,17 +33,18 @@ class AdminPanelProvider extends PanelProvider
|
||||
->path('admin')
|
||||
->login()
|
||||
->brandName('AfterSales CRM')
|
||||
->topNavigation()
|
||||
->sidebarCollapsibleOnDesktop()
|
||||
->colors([
|
||||
'primary' => '#0058be',
|
||||
'secondary' => '#585f6c',
|
||||
'gray' => '#585f6c',
|
||||
'success' => '#10b981',
|
||||
'warning' => '#f59e0b',
|
||||
'danger' => '#ba1a1a',
|
||||
'info' => '#3b82f6',
|
||||
'primary' => '#1a56db',
|
||||
'secondary' => '#64748b',
|
||||
'gray' => '#64748b',
|
||||
'success' => '#059669',
|
||||
'warning' => '#d97706',
|
||||
'danger' => '#dc2626',
|
||||
'info' => '#2563eb',
|
||||
])
|
||||
->font('Inter')
|
||||
->favicon(asset('favicon.svg'))
|
||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
|
||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')
|
||||
->pages([
|
||||
@@ -55,9 +56,11 @@ class AdminPanelProvider extends PanelProvider
|
||||
])
|
||||
->navigationGroups([
|
||||
NavigationGroup::make()
|
||||
->label('Customer Care'),
|
||||
->label('Customer Care')
|
||||
->icon('heroicon-o-chat-bubble-left-right'),
|
||||
NavigationGroup::make()
|
||||
->label('Management'),
|
||||
->label('Management')
|
||||
->icon('heroicon-o-cog-6-tooth'),
|
||||
])
|
||||
->middleware([
|
||||
EncryptCookies::class,
|
||||
|
||||
Reference in New Issue
Block a user