Actualización de moelo user y relación many con asistencias, creación del modelo de asistencia y control por middleware y autenticación

This commit is contained in:
2026-02-11 11:10:17 -06:00
parent 5c93101464
commit 5fe41a4557
25 changed files with 545 additions and 247 deletions
+20 -9
View File
@@ -68,9 +68,6 @@ class ModalProspecto extends Component
$this->active = "disabled";
}
/* ------------------ EDITAR ------------------ */
/* ------------------ NUEVO ------------------ */
#[On('create-prospecto')]
public function createProspecto()
@@ -118,10 +115,16 @@ class ModalProspecto extends Component
->orWhere('telefono', $this->ptelefono)
->exists()) {
$this->dispatch('swal:error', [
'title' => 'Registro duplicado',
'text' => 'El correo o teléfono ya están registrados.'
]);
$this->dispatch('swal',
icon: 'error',
title: 'Registro duplicado',
text: 'El correo o teléfono ya están registrados.',
timer: 2000,
confirm: false,
closeModal: true
);
return;
}
@@ -149,8 +152,16 @@ class ModalProspecto extends Component
$prospecto->prospectos()->sync([$user->id]);
$this->dispatch('swal:success');
$this->dispatch('prospecto-creado');
$this->dispatch('swal',
icon: 'success',
title: 'Registrado!',
text: 'Se registró el prospecto correctamente',
timer: 2000,
confirm: false,
closeModal: true,
reload: 2000
);
$this->resetForm();
}