-
-
Editar elemento
-
-
-
+
+
+ {{-- Izquierda: avatar + datos --}}
+
+ {{-- Avatar --}}
+
+
{{ $project->name }}
+ @if($project->description)
+
{{ Str::limit($project->description, 80) }}
+ @endif
- @endif
+
+ {{-- Derecha: estado + botones --}}
+
+
+
+ Volver
+
+ {{-- Estado --}}
+ @php
+ $statusCfg = match($project->status) {
+ 'in_progress' => ['badge-primary', 'En progreso'],
+ 'completed' => ['badge-success', 'Completado'],
+ 'paused' => ['badge-warning', 'Pausado'],
+ 'planning' => ['badge-ghost', 'Planificación'],
+ default => ['badge-ghost', ucfirst(str_replace('_',' ',$project->status))],
+ };
+ @endphp
+
{{ $statusCfg[1] }}
+
+ {{-- Botones --}}
+
+
+
+
+
+
+
+
+ Volver
+
+
+
+
+
Elementos del proyecto
+
{{ $project->name }} · editar nombre, tipo, activar/desactivar o eliminar
+
+
+ Tipos de elemento
+
+
+
+
+
+
+
+
+{{-- Modal editar elemento --}}
+@if($showForm)
+
+
+
+
+
Editar elemento
+
+
+
+
+
+@endif
+
diff --git a/resources/views/livewire/projects/project-form.blade.php b/resources/views/livewire/projects/project-form.blade.php
index 7bba82b..f770711 100644
--- a/resources/views/livewire/projects/project-form.blade.php
+++ b/resources/views/livewire/projects/project-form.blade.php
@@ -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') }}');
diff --git a/resources/views/livewire/projects/project-map.blade.php b/resources/views/livewire/projects/project-map.blade.php
index 2777955..5bd25cc 100644
--- a/resources/views/livewire/projects/project-map.blade.php
+++ b/resources/views/livewire/projects/project-map.blade.php
@@ -725,7 +725,7 @@
}
function selectFeature(featureId) {
- @this.selectFeature(featureId);
+ Livewire.emit('map-select-feature', featureId);
}
function getUserLocation() {
diff --git a/resources/views/livewire/tasks/task-form.blade.php b/resources/views/livewire/tasks/task-form.blade.php
index 5fa93bb..3d6adcf 100644
--- a/resources/views/livewire/tasks/task-form.blade.php
+++ b/resources/views/livewire/tasks/task-form.blade.php
@@ -170,7 +170,7 @@
// Close modal on Escape key
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
- @this.call('closeModal');
+ Livewire.emit('close-modal');
}
});
diff --git a/resources/views/livewire/tasks/task-kanban.blade.php b/resources/views/livewire/tasks/task-kanban.blade.php
index 4276745..37bed12 100644
--- a/resources/views/livewire/tasks/task-kanban.blade.php
+++ b/resources/views/livewire/tasks/task-kanban.blade.php
@@ -234,7 +234,7 @@
if (taskId && this.draggedFromStatus !== targetStatus) {
// Call Livewire to update status
- @this.call('updateTaskStatus', taskId, targetStatus);
+ Livewire.emit('update-task-status', taskId, targetStatus);
}
},
};