Corrección de periodo
This commit is contained in:
committed by
GitHub
parent
6708c5794f
commit
857baa0163
@@ -198,17 +198,15 @@ const store = reactive({
|
||||
// if (!store.filters.facultad_id || !store.filters.periodo_id) return
|
||||
this.loading = true;
|
||||
this.data = [];
|
||||
const params = {
|
||||
facultad_id: 19,
|
||||
periodo_id: 2,
|
||||
};
|
||||
const params = {};
|
||||
if (fecha)
|
||||
params['fecha'] = fecha;
|
||||
if (fecha_inicio)
|
||||
params['fecha_inicio'] = fecha_inicio;
|
||||
if (fecha_fin)
|
||||
params['fecha_fin'] = fecha_fin;
|
||||
params['periodo_id'] = store.filters.todos_los_periodos ? 1 : 0;
|
||||
params['periodo_id'] = store.filters.todos_los_periodos ? 0 : store.periodo.periodo_id;
|
||||
console.log(store.periodo);
|
||||
const paramsUrl = new URLSearchParams(params).toString();
|
||||
try {
|
||||
const res = await fetch(`action/action_auditoria.php?${paramsUrl}`, {
|
||||
@@ -335,12 +333,12 @@ createApp({
|
||||
async mounted() {
|
||||
$('div.modal#cargando').modal('show');
|
||||
try {
|
||||
store.periodo = await fetch('action/periodo_datos.php').then(res => res.json());
|
||||
// await store.registros.fetch()
|
||||
await store.facultades.fetch();
|
||||
await store.estados.fetch();
|
||||
await store.bloques_horario.fetch();
|
||||
await store.filters.switchFechas();
|
||||
store.periodo = await fetch('action/periodo_datos.php').then(res => res.json());
|
||||
this.profesores = await (await fetch('action/action_profesor.php')).json();
|
||||
this.messages.push({ title: 'Datos cargados', text: 'Los datos se han cargado correctamente', type: 'success', timestamp: new Date() });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user