feat(map): listas de elementos e inspecciones con tablas Rappasoft
- FeatureTable e InspectionTable (DataTableComponent) sustituyen las tablas HTML de las pestañas "Elementos" e "Inspecciones" del mapa: búsqueda, orden, filtro (progreso) y acciones. - Selección de elemento e "ver inspección" se comunican al ProjectMap por eventos (map-select-feature / map-view-inspection, vía #[On]); seleccionar abre el panel de edición y centra el mapa igual que antes. - Las relaciones requieren sus FKs en additionalSelects (layer_id / feature_id, template_id, user_id) porque Rappasoft no selecciona '*'. Tests: MapTablesTest (3). Suite 74 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Livewire\Projects;
|
||||
|
||||
use Livewire\Component;
|
||||
use Livewire\Attributes\On;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\Project;
|
||||
use App\Models\Phase;
|
||||
@@ -207,6 +208,7 @@ class ProjectMap extends Component
|
||||
}
|
||||
}
|
||||
|
||||
#[On('map-select-feature')]
|
||||
public function selectFeature($featureId)
|
||||
{
|
||||
$this->selectedFeature = null;
|
||||
@@ -357,6 +359,7 @@ class ProjectMap extends Component
|
||||
|
||||
// ─── Inspection viewer ───────────────────────────────────────────────────────
|
||||
|
||||
#[On('map-view-inspection')]
|
||||
public function viewInspection($id)
|
||||
{
|
||||
$ins = Inspection::where('project_id', $this->project->id)
|
||||
|
||||
Reference in New Issue
Block a user