All
This commit is contained in:
@@ -377,26 +377,7 @@ createApp({
|
||||
Object.assign(store.current.justificada, store.current.clone_justificada)
|
||||
delete store.current.clone_justificada
|
||||
},
|
||||
get profesores() {
|
||||
return store.registros.data
|
||||
.map((registro: Registro) => ({
|
||||
profesor_id: registro.profesor_id,
|
||||
profesor_nombre: registro.profesor_nombre,
|
||||
profesor_correo: registro.profesor_correo,
|
||||
profesor_clave: registro.profesor_clave,
|
||||
profesor_grado: registro.profesor_grado,
|
||||
}))
|
||||
.reduce((acc: Profesor[], current: Profesor) => {
|
||||
if (!acc.some(item => item.profesor_id === current.profesor_id)) {
|
||||
acc.push(current);
|
||||
}
|
||||
return acc;
|
||||
}, [])
|
||||
.sort((a: Profesor, b: Profesor) =>
|
||||
a.profesor_nombre.localeCompare(b.profesor_nombre)
|
||||
);
|
||||
|
||||
},
|
||||
profesores: [] as Profesor[],
|
||||
async mounted() {
|
||||
$('div.modal#cargando').modal('show');
|
||||
|
||||
@@ -405,6 +386,7 @@ createApp({
|
||||
await store.estados.fetch()
|
||||
await store.bloques_horario.fetch()
|
||||
await store.filters.switchFechas()
|
||||
this.profesores = await (await fetch('action/action_profesor.php')).json() as Profesor[];
|
||||
|
||||
$('div.modal#cargando').modal('hide');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user