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
+3
View File
@@ -4,6 +4,7 @@ namespace App\Livewire\Projects;
use Livewire\Component;
use Livewire\Attributes\Layout;
use Livewire\Attributes\On;
use App\Models\Project;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Gate;
@@ -49,6 +50,8 @@ class ProjectForm extends Component
}
// Called from JS after map click / marker drag + reverse geocode
#[On('set-location')]
public function setLocation(string $lat, string $lng, string $address = '', string $country = ''): void
{
$this->lat = $lat;