Añadir todos los periodos

This commit is contained in:
Alejandro Rosales
2024-03-06 15:24:58 -06:00
committed by GitHub
parent 0dfd3df809
commit 8f68e927b1
3 changed files with 11 additions and 8 deletions

View File

@@ -99,8 +99,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`;
@@ -208,6 +208,7 @@ const store = reactive({
params['fecha_inicio'] = fecha_inicio;
if (fecha_fin)
params['fecha_fin'] = fecha_fin;
params['periodo_id'] = store.filters.todos_los_periodos ? 1 : 0;
const paramsUrl = new URLSearchParams(params).toString();
try {
const res = await fetch(`action/action_auditoria.php?${paramsUrl}`, {