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;
|
||||
|
||||
$params = [
|
||||
':periodo_id' => $user->periodo_id,
|
||||
':periodo_id' => $_GET['periodo_id'] == 1 ? $user->periodo_id : null,
|
||||
':facultad_id' => $user->facultad['facultad_id'],
|
||||
':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'),
|
||||
@@ -52,7 +52,7 @@ try {
|
||||
JOIN PERIODO USING (periodo_id)
|
||||
JOIN nivel on periodo.nivel_id = nivel.nivel_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 (
|
||||
SELECT fechas_clase(h.horario_id, true) as registro_fecha_ideal, h.horario_id
|
||||
|
||||
@@ -88,11 +88,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<!-- Botón para descargar todo -->
|
||||
<!-- Checkbox para descargar todo -->
|
||||
<div class="col-12 text-center">
|
||||
<button type="button" class="btn btn-outline-primary" @click="store.registros.descargar">
|
||||
Todos los perídos activos
|
||||
</button>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input type="checkbox" class="custom-control-input" id="descargarTodo"
|
||||
v-model="store.filters.todos_los_periodos">
|
||||
<label class="custom-control-label" for="descargarTodo">Descargar todos los registros</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
@@ -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}`, {
|
||||
|
||||
Reference in New Issue
Block a user