Stable without período in autidoría
This commit is contained in:
116
auditoría.php
116
auditoría.php
@@ -25,8 +25,14 @@
|
||||
"Sistema de gestión de checador",
|
||||
);
|
||||
?>
|
||||
|
||||
<main class="container-fluid px-4 mt-4" id="app" v-cloak @vue:mounted="mounted">
|
||||
<!-- <div class="alert alert-success" role="alert">
|
||||
<h4 class="alert-heading">Well done!</h4>
|
||||
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit
|
||||
longer so that you can see how spacing within an alert works with this kind of content.</p>
|
||||
<hr>
|
||||
<p class="mb-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
|
||||
</div> -->
|
||||
<form action="">
|
||||
<?php include "import/periodo.php" ?>
|
||||
<div class="form-box">
|
||||
@@ -37,12 +43,13 @@
|
||||
<div class="datalist-input">Selecciona una facultad</div>
|
||||
<span class="ing-buscar icono"></span>
|
||||
<ul style="display:none">
|
||||
<li class="datalist-option" data-id="0" @click="store.filters.facultad_id = null;">
|
||||
<li class="datalist-option" data-id="0"
|
||||
@click="store.filters.facultad_id = null; store.current.page = 1;">
|
||||
Todas las facultades
|
||||
</li>
|
||||
<li class="datalist-option" v-for="facultad in store.facultades.data"
|
||||
:key="facultad.facultad_id" :data-id="facultad.facultad_id"
|
||||
@click="store.filters.facultad_id = facultad.facultad_id">
|
||||
@click="store.filters.facultad_id = facultad.facultad_id; store.current.page = 1;">
|
||||
(<small> {{facultad.clave_dependencia}} </small>) {{ facultad.facultad_nombre }}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -52,7 +59,7 @@
|
||||
</div>
|
||||
<div class="form-group row align-items-center">
|
||||
<label for="switchFecha" class="col-4 col-form-label">
|
||||
Fecha
|
||||
{{store.filters.switchFecha ? 'Rango de fechas' : 'Fecha'}}
|
||||
<!-- switch -->
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" id="switchFecha"
|
||||
@@ -86,27 +93,32 @@
|
||||
<div class="col-6">
|
||||
<div id="dlBloqueHorarios" class="datalist datalist-select mb-1 w-100">
|
||||
<div class="datalist-input">
|
||||
{{ store.bloques_horario.data.find(bloque => bloque.selected).hora_inicio.substr(0,5)
|
||||
}} -
|
||||
{{ store.bloques_horario.data.find(bloque => bloque.selected).hora_fin.substr(0,5) }}
|
||||
Seleccione un bloque horario
|
||||
</div>
|
||||
<span class="ing-buscar icono"></span>
|
||||
<ul style="display:none">
|
||||
<li class="datalist-option" data-id="0"
|
||||
@click="store.filters.bloque_horario = null; store.current.page = 1;">
|
||||
Todos los bloques horarios
|
||||
</li>
|
||||
</li>
|
||||
<li class="datalist-option not-selectable">
|
||||
Mañana
|
||||
</li>
|
||||
|
||||
<li class="datalist-option" :class="{selected: bloque.selected}"
|
||||
<li class="datalist-option"
|
||||
v-for="bloque in store.bloques_horario.data.filter(bloque => bloque.hora_inicio < '13:00:00')"
|
||||
:key="bloque.id" :data-id="bloque.id" @click="store.filters.bloque_horario = bloque.id">
|
||||
:key="bloque.id" :data-id="bloque.id"
|
||||
@click="store.filters.bloque_horario = bloque.id ; store.current.page = 1;">
|
||||
{{ bloque.hora_inicio.substr(0,5) }} - {{ bloque.hora_fin.substr(0,5) }}
|
||||
</li>
|
||||
<li class="datalist-option not-selectable">
|
||||
Tarde
|
||||
</li>
|
||||
<li class="datalist-option" :class="{selected: bloque.selected}"
|
||||
<li class="datalist-option"
|
||||
v-for="bloque in store.bloques_horario.data.filter(bloque => bloque.hora_inicio >= '13:00:00')"
|
||||
:key="bloque.id" :data-id="bloque.id" @click="store.filters.bloque_horario = bloque.id">
|
||||
:key="bloque.id" :data-id="bloque.id"
|
||||
@click="store.filters.bloque_horario = bloque.id ; store.current.page = 1;">
|
||||
{{ bloque.hora_inicio.substr(0,5) }} - {{ bloque.hora_fin.substr(0,5) }}
|
||||
</li>
|
||||
|
||||
@@ -120,10 +132,10 @@
|
||||
<div class="col-6">
|
||||
<div class="form-row justify-content-around align-items-center">
|
||||
<input id="profesor" name="profesor" class="form-control col-11 mr-1 px-2"
|
||||
placeholder="Seleccione una profesor" list="dlProfesor"
|
||||
v-model="store.filters.profesor">
|
||||
placeholder="Seleccione una profesor" list="dlProfesor" v-model="store.filters.profesor"
|
||||
@input="store.current.page = 1">
|
||||
<button type="button" class="btn btn-info btn-sm form-control col ml-auto"
|
||||
@click="store.filters.profesor = null">
|
||||
@click="store.filters.profesor = null; store.current.page = 1;">
|
||||
<i class="ing-borrar"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -137,16 +149,18 @@
|
||||
<label for="dlAsistencia" class="col-4 col-form-label">Asistencia</label>
|
||||
<div class="col-6">
|
||||
<div class="form-row justify-content-around align-items-center">
|
||||
<div id="dlAsitencia" class="datalist datalist-select mb-1 w-100">
|
||||
<div id="dlAsistencia" class="datalist datalist-select mb-1 w-100">
|
||||
<div class="datalist-input" id="estados">Selecciona un estado de asistencia</div>
|
||||
<span class="ing-buscar icono"></span>
|
||||
<ul style="display:none">
|
||||
<li class="datalist-option" data-id="0" @click="store.filters.estados = [];">
|
||||
<li class="datalist-option" data-id="0"
|
||||
@click="store.filters.estados = []; store.current.page = 1;">
|
||||
Todos los registros
|
||||
</li>
|
||||
<li class="datalist-option" v-for="estado in store.estados.data"
|
||||
:key="estado.estado_supervisor_id" :data-id="estado.estado_supervisor_id"
|
||||
@click="store.filters.estados = store.toggle(store.filters.estados, estado.estado_supervisor_id); ; setTimeout(store.estados.printEstados, 0);">
|
||||
@click="store.filters.estados = store.toggle(store.filters.estados, estado.estado_supervisor_id); setTimeout(store.estados.printEstados, 0); store.current.page = 1;"
|
||||
:class="{'selected': store.filters.estados.includes(estado.estado_supervisor_id)}">
|
||||
<span class="badge"
|
||||
:class="`badge-${store.filters.estados.includes(estado.estado_supervisor_id) ? 'dark' : estado.estado_color}`"><i
|
||||
:class="estado.estado_icon"></i> {{estado.nombre}}</span>
|
||||
@@ -163,13 +177,18 @@
|
||||
<div class="mt-3 d-flex justify-content-center flex-wrap">
|
||||
<!-- botón descargar -->
|
||||
|
||||
<div class="btn-group my-3" v-if="registros.relevant.length">
|
||||
<button type="button" class="btn btn-info mr-3" @click="registros.descargar"
|
||||
:disabled="!registros.relevant.length">
|
||||
<div class="btn-group my-3" v-if="registros.relevant.length > 0">
|
||||
<button type="button" class="btn btn-info mr-3" @click="registros.descargar">
|
||||
<i class="ing-descarga"></i>
|
||||
Descargar reporte
|
||||
</button>
|
||||
</div>
|
||||
<div v-else-if="registros.loading && registros.relevant.length > 0">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
Generando reporte...
|
||||
</div>
|
||||
|
||||
<!-- refresh -->
|
||||
<div class="table-responsive">
|
||||
@@ -195,7 +214,8 @@
|
||||
<tr v-if="registros.relevant.length == 0">
|
||||
<td colspan="7" class="text-center">No hay clases en este horario</td>
|
||||
</tr>
|
||||
<tr v-for="registro in registros.relevant" :key="registro.registro_id">
|
||||
<tr v-for="registro in registros.relevant?.slice((store.current.page - 1) * store.current.perPage, store.current.page * store.current.perPage)"
|
||||
:key="`${registro.registro_id}-${registro.registro_fecha_ideal}-${registro.horario_id}-${registro.profesor_id}-${registro.salon_id}`">
|
||||
<td class="text-center align-middle px-2">{{ registro.registro_fecha_ideal }}
|
||||
</td>
|
||||
<td class="text-center align-middle px-2">{{ registro.salon }}</td>
|
||||
@@ -214,13 +234,13 @@
|
||||
</td>
|
||||
|
||||
|
||||
<td class="text-center align-middle px-2">{{ registro.horario_hora.slice(0,5) }} - {{
|
||||
registro.horario_fin.slice(0,5) }}</td>
|
||||
<td class="text-center align-middle px-2">{{ registro.horario_hora?.slice(0,5) }} - {{
|
||||
registro.horario_fin?.slice(0,5) }}</td>
|
||||
<!-- -->
|
||||
<td class="text-center align-middle px-2">
|
||||
<div v-if="registro.registro_fecha">
|
||||
<div class="col-12">
|
||||
Registro <small>{{ registro.registro_fecha.slice(11,16) }}</small>
|
||||
Registro <small>{{ registro.registro_fecha?.slice(11,16) }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -244,7 +264,7 @@
|
||||
</div>
|
||||
<div class="col-12">
|
||||
Hora
|
||||
<small>{{ registro.registro_fecha_supervisor.slice(11,19) }}</small>
|
||||
<small>{{ registro.registro_fecha_supervisor?.slice(11,19) }}</small>
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<span class="badge" :class="`badge-${registro.estado_color}`">
|
||||
@@ -258,7 +278,7 @@
|
||||
<div class="col-12 " @click="registros.mostrarComentario(registro.registro_id)"
|
||||
v-if="registro.comentario" style="cursor: pointer;">
|
||||
<strong class="badge badge-primary">Observaciones:</strong>
|
||||
<small class="text-truncate">{{registro.comentario.slice(0,
|
||||
<small class="text-truncate">{{registro.comentario?.slice(0,
|
||||
25)}}{{registro.comentario.length > 10 ? '...' : ''}}</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -277,6 +297,29 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- page -->
|
||||
<nav class="mt-3" v-if="registros.relevant.length > 0">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item" :class="{'disabled': store.current.page == 1}"
|
||||
@click="store.current.page == 1 ? '' : store.current.page--" :disabled="store.current.page == 1"
|
||||
:title="`Página ${store.current.page} de ${registros.pages}`">
|
||||
<a class="page-link" style="cursor: pointer;">Anterior</a>
|
||||
</li>
|
||||
<li class="page-item"
|
||||
v-for="page in [...Array(registros.pages).keys()].map(x => ++x).slice(store.current.page - 3 > 0 ? store.current.page - 3 : 0, store.current.page + 2 < registros.pages ? store.current.page + 2 : registros.pages)"
|
||||
:class="{'active': store.current.page == page}" @click="store.current.page = page"
|
||||
:title="`Página ${store.current.page} de ${registros.pages}`">
|
||||
<a class="page-link" style="cursor: pointer;">{{ page }}</a>
|
||||
</li>
|
||||
<li class="page-item" :class="{'disabled': store.current.page == registros.pages}"
|
||||
:disabled="store.current.page == registros.pages"
|
||||
@click="store.current.page += store.current.page == registros.pages ? 0 : 1"
|
||||
:title="`Página ${store.current.page} de ${registros.pages}`">
|
||||
<a class="page-link" style="cursor: pointer;">Siguiente</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -382,7 +425,7 @@
|
||||
</div>
|
||||
<div class="col-6 text-center" v-else>
|
||||
El profesor registró su asistencia a las
|
||||
<code>{{clase_vista.registro_fecha.slice(11, 16)}}</code>
|
||||
<code>{{clase_vista.registro_fecha?.slice(11, 16)}}</code>
|
||||
<hr>
|
||||
<p v-if="!clase_vista.registro_retardo" class="text-center">
|
||||
<span class="badge badge-success"><i class="ing-aceptar"></i></span>
|
||||
@@ -408,6 +451,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" tabindex="-1" id="cargando">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">{{store.current.modal_state}}</h2>
|
||||
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body container">
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
<span class="spinner-border spinner-border-lg"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="js/jquery-ui.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user