Guardar cambios consolidar grupos docentes y clave de grupo

This commit is contained in:
2026-04-24 18:33:37 -06:00
parent 2d73e8a2b0
commit 2b072f7d55
10 changed files with 205 additions and 125 deletions
+6 -8
View File
@@ -71,25 +71,23 @@ $this->materiasSelect = Material::whereHas('carreraMaterial', function($query) u
icon: 'success',
title: '¡Listo!',
text: 'Docente asignado correctamente',
timer: 2000,
timer: 3000,
confirm: false,
closeModal: true,
reload: true
);
}
public function eliminar($docenteId)
public function eliminar($docenteId, $materiaId)
{
$this->grupo->docentes()->detach($docenteId);
$this->grupo->docentes()->wherePivot('materia_id', $materiaId)->detach($docenteId);
$this->dispatch('swal',
icon: 'success',
title: '¡Eliminado!',
text: 'Docente removido correctamente',
title: 'Eliminado',
text: 'Docente removido de la materia correctamente',
timer: 2000,
confirm: false,
closeModal: false,
reload: true
closeModal: true,
);
}