Fix Livewire BindingResolutionException: replace @this calls in pushed scripts with #[On] + Livewire.emit

- Add #[On] attributes to 5 Livewire component methods:
  - LayerManager::saveManualGeojson
  - ProjectForm::setLocation
  - ProjectMap::selectFeature (already had #[On])
  - TaskForm::closeModal
  - TaskKanban::updateTaskStatus
- Replace @this.method() in @push('scripts') with Livewire.emit() calls
- Fix DataTable event payloads from objects {id: X} to scalars X for:
  - FeatureTable::map-select-feature
  - InspectionTable::map-view-inspection, edit-inspection, delete-inspection
This commit is contained in:
Javier Braña
2026-08-04 13:58:56 +02:00
parent f566d370be
commit 534d9f8eab
12 changed files with 164 additions and 82 deletions
+2
View File
@@ -5,6 +5,7 @@ namespace App\Livewire\Layers;
use Livewire\Component;
use Livewire\WithFileUploads;
use Livewire\Attributes\Layout;
use Livewire\Attributes\On;
use App\Models\Project;
use App\Models\Phase;
use App\Models\Layer;
@@ -251,6 +252,7 @@ class LayerManager extends Component
// ── Save drawn GeoJSON ────────────────────────────────────────────────────
#[On('save-manual-geojson')]
public function saveManualGeojson($geojsonString)
{
if (!$this->selectedLayer) {