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:
@@ -3,12 +3,12 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\DTO\ReportFilters;
|
||||
use App\Exports\ProjectReportExport;
|
||||
use App\Models\Project;
|
||||
use App\Services\ReportGenerator;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Exports\ProjectReportExport;
|
||||
|
||||
class ReportController extends Controller
|
||||
{
|
||||
@@ -19,7 +19,7 @@ class ReportController extends Controller
|
||||
{
|
||||
$this->authorizeProjectAccess($project);
|
||||
|
||||
return \Livewire\Livewire::mount(\App\Livewire\Reports\ReportBuilder::class, [
|
||||
return view('reports.builder', [
|
||||
'project' => $project,
|
||||
]);
|
||||
}
|
||||
@@ -65,8 +65,8 @@ class ReportController extends Controller
|
||||
protected function downloadExcel(Project $project, ReportFilters $filters, array $data)
|
||||
{
|
||||
$export = new ProjectReportExport($project, $filters, $data);
|
||||
$filename = 'informe_' . $project->name . '_' . now()->format('Ymd_His') . '.xlsx';
|
||||
|
||||
$filename = 'informe_'.$project->name.'_'.now()->format('Ymd_His').'.xlsx';
|
||||
|
||||
return Excel::download($export, $filename);
|
||||
}
|
||||
|
||||
@@ -76,13 +76,13 @@ class ReportController extends Controller
|
||||
protected function authorizeProjectAccess(Project $project): void
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
|
||||
if ($user->can('manage all')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$project->users()->where('user_id', $user->id)->exists()) {
|
||||
if (! $project->users()->where('user_id', $user->id)->exists()) {
|
||||
abort(403, 'No tienes acceso a este proyecto.');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user