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
@@ -70,7 +70,7 @@
country = (d.address && d.address.country_code) ? d.address.country_code : '';
}
} catch (e) { /* geocoding optional */ }
@this.setLocation(String(lat), String(lng), address, country);
Livewire.emit('set-location', String(lat), String(lng), address, country);
setStatus('');
}
@@ -86,7 +86,7 @@
placeMarker(lat, lng);
const address = arr[0].display_name || '';
const country = (arr[0].address && arr[0].address.country_code) ? arr[0].address.country_code : '';
@this.setLocation(String(lat), String(lng), address, country);
Livewire.emit('set-location', String(lat), String(lng), address, country);
setStatus('');
} else {
setStatus('{{ __('No results') }}');