All
This commit is contained in:
@@ -16,6 +16,7 @@ const store = reactive({
|
||||
modal_state: "Cargando datos...",
|
||||
justificada: null,
|
||||
fechas_clicked: false,
|
||||
observaciones: false,
|
||||
},
|
||||
facultades: {
|
||||
data: [],
|
||||
@@ -96,8 +97,8 @@ const store = reactive({
|
||||
},
|
||||
printEstados() {
|
||||
if (store.filters.estados.length > 0)
|
||||
document.querySelector('#estados').innerHTML = store.filters.estados.map((estado) => `<span class="mx-2 badge badge-${store.estados.getEstado(estado).estado_color}">
|
||||
<i class="${store.estados.getEstado(estado).estado_icon}"></i> ${store.estados.getEstado(estado).nombre}
|
||||
document.querySelector('#estados').innerHTML = store.filters.estados.map((estado) => `<span class="mx-2 badge badge-${store.estados.getEstado(estado).estado_color}">
|
||||
<i class="${store.estados.getEstado(estado).estado_icon}"></i> ${store.estados.getEstado(estado).nombre}
|
||||
</span>`).join('');
|
||||
else
|
||||
document.querySelector('#estados').innerHTML = `Todos los registros`;
|
||||
@@ -127,6 +128,7 @@ const store = reactive({
|
||||
async justificar() {
|
||||
if (!store.current.justificada)
|
||||
return;
|
||||
store.current.justificada.registro_justificada = true;
|
||||
let data;
|
||||
try {
|
||||
const res = await fetch('action/action_justificar.php', {
|
||||
@@ -276,6 +278,7 @@ createApp({
|
||||
set_justificar(horario_id, profesor_id, registro_fecha_ideal) {
|
||||
store.current.justificada = store.registros.relevant.find((registro) => registro.horario_id === horario_id && registro.profesor_id === profesor_id && registro.registro_fecha_ideal === registro_fecha_ideal);
|
||||
store.current.clone_justificada = JSON.parse(JSON.stringify(store.current.justificada));
|
||||
store.current.observaciones = false;
|
||||
},
|
||||
cancelar_justificacion() {
|
||||
Object.assign(store.current.justificada, store.current.clone_justificada);
|
||||
|
||||
Reference in New Issue
Block a user