chore: cleanup dead code + format with Pint
- Remove unused FeaturesController (empty stubs, no routes) - Remove ConvertSpatialFile CLI command (unused; service used in LayerManager) - Remove MigrateGeojsonToFeatures CLI command (one-shot migration, not referenced) - Remove .claude/worktrees/ (11 old agent worktrees from June) - Apply Laravel Pint formatting across 219 files (style only, no functional changes) Tests: 101 passing (319 assertions) API routes: unchanged (8 routes intact)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Livewire\Admin;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Livewire\Attributes\Layout;
|
||||
use Livewire\Component;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Spatie\Permission\PermissionRegistrar;
|
||||
|
||||
@@ -14,9 +14,11 @@ class RoleForm extends Component
|
||||
public ?Role $role = null;
|
||||
|
||||
public string $name = '';
|
||||
|
||||
public string $description = '';
|
||||
|
||||
private const PROTECTED_ROLES = ['Admin'];
|
||||
|
||||
private const CORE_PERMISSION = 'manage all';
|
||||
|
||||
public function mount(?Role $role = null): void
|
||||
@@ -24,8 +26,8 @@ class RoleForm extends Component
|
||||
abort_unless(Auth::user()?->can('manage roles'), 403);
|
||||
|
||||
if ($role && $role->exists) {
|
||||
$this->role = $role;
|
||||
$this->name = $role->name;
|
||||
$this->role = $role;
|
||||
$this->name = $role->name;
|
||||
$this->description = $role->description ?? '';
|
||||
}
|
||||
}
|
||||
@@ -33,7 +35,7 @@ class RoleForm extends Component
|
||||
public function save()
|
||||
{
|
||||
$this->validate([
|
||||
'name' => 'required|string|max:50|unique:roles,name' . ($this->role ? ',' . $this->role->id : ''),
|
||||
'name' => 'required|string|max:50|unique:roles,name'.($this->role ? ','.$this->role->id : ''),
|
||||
'description' => 'nullable|string|max:255',
|
||||
], [], ['name' => 'nombre', 'description' => 'descripción']);
|
||||
|
||||
@@ -46,7 +48,7 @@ class RoleForm extends Component
|
||||
$this->role->save();
|
||||
} else {
|
||||
Role::create([
|
||||
'name' => $this->name,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description ?: null,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user