All
This commit is contained in:
@@ -85,8 +85,9 @@ const store = reactive({
|
||||
maxPages: 10,
|
||||
perPage: 10,
|
||||
modal_state: "Cargando datos...",
|
||||
justificada: null,
|
||||
justificada: null as Registro | null,
|
||||
fechas_clicked: false,
|
||||
observaciones: false,
|
||||
},
|
||||
facultades: {
|
||||
data: [] as Facultad[],
|
||||
@@ -205,7 +206,14 @@ const store = reactive({
|
||||
},
|
||||
async justificar() {
|
||||
if (!store.current.justificada) return;
|
||||
let data;
|
||||
store.current.justificada.registro_justificada = true
|
||||
let data: {
|
||||
justificador_nombre: string;
|
||||
justificador_clave: string;
|
||||
justificador_facultad: string;
|
||||
justificador_rol: string;
|
||||
registro_fecha_justificacion: Date;
|
||||
};
|
||||
try {
|
||||
const res = await fetch('action/action_justificar.php', {
|
||||
method: 'PUT',
|
||||
@@ -357,6 +365,7 @@ createApp({
|
||||
set_justificar(horario_id: Number, profesor_id: Number, registro_fecha_ideal: Date) {
|
||||
store.current.justificada = store.registros.relevant.find((registro: 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