Añadir todos los periodos
This commit is contained in:
committed by
GitHub
parent
0dfd3df809
commit
8f68e927b1
@@ -22,7 +22,7 @@ try {
|
|||||||
$baseDate = $_GET['fecha'] ?? $_GET['fecha_fin'] ?? null;
|
$baseDate = $_GET['fecha'] ?? $_GET['fecha_fin'] ?? null;
|
||||||
|
|
||||||
$params = [
|
$params = [
|
||||||
':periodo_id' => $user->periodo_id,
|
':periodo_id' => $_GET['periodo_id'] == 1 ? $user->periodo_id : null,
|
||||||
':facultad_id' => $user->facultad['facultad_id'],
|
':facultad_id' => $user->facultad['facultad_id'],
|
||||||
':fecha_inicio' => $_GET['fecha'] ?? $_GET['fecha_inicio'] ?? date('Y-m-d'),
|
':fecha_inicio' => $_GET['fecha'] ?? $_GET['fecha_inicio'] ?? date('Y-m-d'),
|
||||||
':fecha_fin' => $baseDate ? date('Y-m-d H:i:s', strtotime($baseDate . ' +24 hours')) : date('Y-m-d H:i:s'),
|
':fecha_fin' => $baseDate ? date('Y-m-d H:i:s', strtotime($baseDate . ' +24 hours')) : date('Y-m-d H:i:s'),
|
||||||
@@ -52,7 +52,7 @@ try {
|
|||||||
JOIN PERIODO USING (periodo_id)
|
JOIN PERIODO USING (periodo_id)
|
||||||
JOIN nivel on periodo.nivel_id = nivel.nivel_id
|
JOIN nivel on periodo.nivel_id = nivel.nivel_id
|
||||||
JOIN SALON USING (salon_id)
|
JOIN SALON USING (salon_id)
|
||||||
WHERE (PERIODO.periodo_id, horario.facultad_id) = (:periodo_id, COALESCE(:facultad_id, horario.facultad_id))
|
WHERE (PERIODO.periodo_id, horario.facultad_id) = (COALESCE(:periodo_id, PERIODO.periodo_id), COALESCE(:facultad_id, horario.facultad_id))
|
||||||
),
|
),
|
||||||
fechas AS (
|
fechas AS (
|
||||||
SELECT fechas_clase(h.horario_id, true) as registro_fecha_ideal, h.horario_id
|
SELECT fechas_clase(h.horario_id, true) as registro_fecha_ideal, h.horario_id
|
||||||
|
|||||||
@@ -88,11 +88,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<!-- Botón para descargar todo -->
|
<!-- Checkbox para descargar todo -->
|
||||||
<div class="col-12 text-center">
|
<div class="col-12 text-center">
|
||||||
<button type="button" class="btn btn-outline-primary" @click="store.registros.descargar">
|
<div class="custom-control custom-checkbox">
|
||||||
Todos los perídos activos
|
<input type="checkbox" class="custom-control-input" id="descargarTodo"
|
||||||
</button>
|
v-model="store.filters.todos_los_periodos">
|
||||||
|
<label class="custom-control-label" for="descargarTodo">Descargar todos los registros</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ const store = reactive({
|
|||||||
},
|
},
|
||||||
printEstados() {
|
printEstados() {
|
||||||
if (store.filters.estados.length > 0)
|
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}">
|
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}
|
<i class="${store.estados.getEstado(estado).estado_icon}"></i> ${store.estados.getEstado(estado).nombre}
|
||||||
</span>`).join('');
|
</span>`).join('');
|
||||||
else
|
else
|
||||||
document.querySelector('#estados').innerHTML = `Todos los registros`;
|
document.querySelector('#estados').innerHTML = `Todos los registros`;
|
||||||
@@ -208,6 +208,7 @@ const store = reactive({
|
|||||||
params['fecha_inicio'] = fecha_inicio;
|
params['fecha_inicio'] = fecha_inicio;
|
||||||
if (fecha_fin)
|
if (fecha_fin)
|
||||||
params['fecha_fin'] = fecha_fin;
|
params['fecha_fin'] = fecha_fin;
|
||||||
|
params['periodo_id'] = store.filters.todos_los_periodos ? 1 : 0;
|
||||||
const paramsUrl = new URLSearchParams(params).toString();
|
const paramsUrl = new URLSearchParams(params).toString();
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`action/action_auditoria.php?${paramsUrl}`, {
|
const res = await fetch(`action/action_auditoria.php?${paramsUrl}`, {
|
||||||
|
|||||||
Reference in New Issue
Block a user