feat(map): filtros por columna en cabecera (elementos e inspecciones)
Usa la cabecera secundaria de Rappasoft (setSecondaryHeaderEnabled + secondaryHeaderFilter): - Elementos: Elemento (texto), Capa (select), Fase (select). - Inspecciones: Fecha (date), Elemento (texto), Resultado (select), Usuario (select); Plantilla sin filtro. Tests: MapTablesTest amplía con filtro de capa funcional. Suite 75 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,26 @@ class MapTablesTest extends TestCase
|
||||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function test_feature_table_layer_filter(): void
|
||||
{
|
||||
// Segunda capa con otro elemento en la misma fase.
|
||||
$phaseId = $this->feature->layer->phase_id;
|
||||
$layerB = Layer::create(['project_id' => $this->project->id, 'phase_id' => $phaseId, 'name' => 'Capa B', 'color' => '#222', 'uploaded_by' => $this->user->id]);
|
||||
Feature::create([
|
||||
'layer_id' => $layerB->id, 'name' => 'Viga 7',
|
||||
'geometry' => ['type' => 'Point', 'coordinates' => [-3.0, 40.0]],
|
||||
'progress' => 0, 'status' => 'planned',
|
||||
]);
|
||||
|
||||
Livewire::actingAs($this->user)
|
||||
->test(FeatureTable::class, ['projectId' => $this->project->id])
|
||||
->assertSee('Pilar 12')
|
||||
->assertSee('Viga 7')
|
||||
->set('filterComponents.layer', (string) $this->feature->layer_id)
|
||||
->assertSee('Pilar 12')
|
||||
->assertDontSee('Viga 7');
|
||||
}
|
||||
|
||||
public function test_inspection_table_lists_project_inspections(): void
|
||||
{
|
||||
Inspection::create([
|
||||
|
||||
Reference in New Issue
Block a user