Commit af90a279 by Billy Larru

[EDIT control asistencia docentes, agregando checkbox]

parent 22a93482
......@@ -63,7 +63,7 @@ function getColumns() {
className: 'text-center'
},
{
title: `FIRMÓ SALIDA`.split(' ').join('<br>'),
title: `FIRMÓ SALIDA <input type="checkbox" id="chkFirmaTodo">`,
data: `firmo_salida`,
className: 'text-center',
render: (data) => {
......@@ -83,7 +83,8 @@ function getColumns() {
case "":
label = "label bg-purple";
contenido = "PENDIENTE";
// contenido = "PENDIENTE";
return `<input type="checkbox" class="chkFirma">`;
break;
}
......@@ -244,16 +245,38 @@ function listarAsistenciaDocentes(objParams = {}){
},
classNameForDatatable,
).then((nodes) => {
nodes.container.off();
nodes.container.on("click", ".registrar", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
mostrarModalRegistroAsistencia(data);
});
$(".chkFirma, #chkFirmaTodo").uniform();
nodes.container
.off()
.on("click", ".registrar", function () {
let data = nodes.datatable.DataTable().row($(this).parents("tr")).data();
mostrarModalRegistroAsistencia(data);
})
.on("click", "#chkFirmaTodo", (e) => seleccionarCheckBoxTodo($(e.currentTarget)))
.on("click", ".chkFirma", (e) => seleccionarCheckBox());
});
});
}
const seleccionarCheckBoxTodo = (tr) => {
if (tr.prop('checked')) {
$('.chkFirma').prop('checked', true).uniform()
} else {
$('.chkFirma').prop('checked', false).uniform()
}
}
const seleccionarCheckBox = () => {
debugger
if ($('.chkFirma:checked').length === $('.chkFirma').length) {
$('#chkFirmaTodo').prop('checked', true).uniform()
} else {
$('#chkFirmaTodo').prop('checked', false).uniform()
}
}
const aplicarFiltro = () => {
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment