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:
@@ -8,7 +8,6 @@ use App\Livewire\Issues\IssueForm;
|
||||
use App\Models\Feature;
|
||||
use App\Models\Issue;
|
||||
use App\Models\IssueChecklistTemplate;
|
||||
use App\Models\IssueTask;
|
||||
use App\Models\Layer;
|
||||
use App\Models\Phase;
|
||||
use App\Models\Project;
|
||||
@@ -18,8 +17,8 @@ use App\Notifications\IssueStatusChangedNotification;
|
||||
use App\Notifications\IssueTaskAssignedNotification;
|
||||
use App\Notifications\IssueTaskOverdueNotification;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
use Illuminate\Support\Str;
|
||||
use Livewire\Livewire;
|
||||
use Spatie\Permission\Models\Permission;
|
||||
use Tests\TestCase;
|
||||
@@ -29,7 +28,9 @@ class IssuesEnhancementsTest extends TestCase
|
||||
use RefreshDatabase;
|
||||
|
||||
private User $user;
|
||||
|
||||
private User $assignee;
|
||||
|
||||
private Project $project;
|
||||
|
||||
protected function setUp(): void
|
||||
@@ -44,15 +45,15 @@ class IssuesEnhancementsTest extends TestCase
|
||||
$this->assignee = User::factory()->create();
|
||||
|
||||
$this->project = Project::create([
|
||||
'reference' => 'ENH-1',
|
||||
'name' => 'Proyecto Enh',
|
||||
'address' => 'Calle 1',
|
||||
'lat' => 40.0,
|
||||
'lng' => -3.0,
|
||||
'start_date' => now()->toDateString(),
|
||||
'reference' => 'ENH-1',
|
||||
'name' => 'Proyecto Enh',
|
||||
'address' => 'Calle 1',
|
||||
'lat' => 40.0,
|
||||
'lng' => -3.0,
|
||||
'start_date' => now()->toDateString(),
|
||||
'end_date_estimated' => now()->addMonths(3)->toDateString(),
|
||||
'status' => 'in_progress',
|
||||
'created_by' => $this->user->id,
|
||||
'status' => 'in_progress',
|
||||
'created_by' => $this->user->id,
|
||||
]);
|
||||
$this->project->users()->attach($this->user->id, ['role_in_project' => 'supervisor']);
|
||||
$this->project->users()->attach($this->assignee->id, ['role_in_project' => 'worker']);
|
||||
@@ -61,10 +62,10 @@ class IssuesEnhancementsTest extends TestCase
|
||||
private function makeIssue(array $attrs = []): Issue
|
||||
{
|
||||
return Issue::create(array_merge([
|
||||
'project_id' => $this->project->id,
|
||||
'title' => 'Incidencia enh',
|
||||
'status' => 'open',
|
||||
'priority' => 'medium',
|
||||
'project_id' => $this->project->id,
|
||||
'title' => 'Incidencia enh',
|
||||
'status' => 'open',
|
||||
'priority' => 'medium',
|
||||
'reported_by' => $this->user->id,
|
||||
], $attrs));
|
||||
}
|
||||
@@ -79,6 +80,7 @@ class IssuesEnhancementsTest extends TestCase
|
||||
'project_id' => $this->project->id, 'phase_id' => $phase->id,
|
||||
'name' => 'L', 'color' => '#111', 'uploaded_by' => $this->user->id,
|
||||
]);
|
||||
|
||||
return Feature::create([
|
||||
'layer_id' => $layer->id, 'name' => 'Muro norte',
|
||||
'geometry' => ['type' => 'Point', 'coordinates' => [-3.0, 40.0]],
|
||||
@@ -148,8 +150,8 @@ class IssuesEnhancementsTest extends TestCase
|
||||
$issue = $this->makeIssue();
|
||||
$template = IssueChecklistTemplate::create([
|
||||
'project_id' => $this->project->id,
|
||||
'name' => 'Plantilla',
|
||||
'items' => ['Picar', 'Sellar', 'Pintar'],
|
||||
'name' => 'Plantilla',
|
||||
'items' => ['Picar', 'Sellar', 'Pintar'],
|
||||
]);
|
||||
|
||||
Livewire::actingAs($this->user)
|
||||
@@ -168,11 +170,11 @@ class IssuesEnhancementsTest extends TestCase
|
||||
Notification::fake();
|
||||
$issue = $this->makeIssue();
|
||||
$task = $issue->tasks()->create([
|
||||
'title' => 'Tarea vencida',
|
||||
'title' => 'Tarea vencida',
|
||||
'assigned_to' => $this->assignee->id,
|
||||
'due_date' => now()->subDays(2)->toDateString(),
|
||||
'is_done' => false,
|
||||
'uuid' => (string) \Illuminate\Support\Str::uuid(),
|
||||
'due_date' => now()->subDays(2)->toDateString(),
|
||||
'is_done' => false,
|
||||
'uuid' => (string) Str::uuid(),
|
||||
]);
|
||||
|
||||
$this->artisan('issues:notify-overdue')->assertSuccessful();
|
||||
|
||||
Reference in New Issue
Block a user