Commit Bulk
This commit is contained in:
208
auditoria.php
208
auditoria.php
@@ -23,11 +23,14 @@
|
||||
$redirect = $_SERVER['PHP_SELF'];
|
||||
include "import/html_header.php";
|
||||
global $user;
|
||||
$user->access();
|
||||
|
||||
html_header(
|
||||
"Registro de asistencia - Vicerrectoría Académica",
|
||||
"Sistema de gestión de checador",
|
||||
);
|
||||
|
||||
|
||||
|
||||
if (!$user->periodo_id) { ?>
|
||||
<script defer src="js/jquery.min.js"></script>
|
||||
<script src="js/bootstrap/bootstrap.min.js"></script>
|
||||
@@ -54,7 +57,7 @@
|
||||
<? exit;
|
||||
} ?>
|
||||
|
||||
<main class="container-fluid px-4 mt-4" id="app" v-cloak @vue:mounted="mounted">
|
||||
<main class="container-fluid px-4 mt-4" id="app" v-cloak @vue:mounted="mounted" style="min-height: 60vh;">
|
||||
<!-- {{ store.current }} -->
|
||||
<?php include "import/periodo.php" ?>
|
||||
<div class="form-box">
|
||||
@@ -74,7 +77,8 @@
|
||||
</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; store.current.page = 1;">
|
||||
@click="store.filters.facultad_id = facultad.facultad_id; store.current.page = 1;"
|
||||
style="white-space: nowrap;">
|
||||
(<small> {{facultad.clave_dependencia}} </small>) {{ facultad.facultad_nombre }}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -129,7 +133,7 @@
|
||||
<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"
|
||||
@input="store.current.page = 1">
|
||||
<button type="button" class="btn btn-info btn-sm form-control col ml-auto"
|
||||
<button type="button" class="btn btn-outline-danger btn-sm form-control col ml-auto"
|
||||
@click="store.filters.profesor = null; store.current.page = 1;">
|
||||
<i class="ing-borrar"></i>
|
||||
</button>
|
||||
@@ -142,7 +146,7 @@
|
||||
</div>
|
||||
<div class="form-group row align-items-center">
|
||||
<label for="dlAsistencia" class="col-4 col-form-label">
|
||||
Asistencia
|
||||
Estado de supervisor
|
||||
</label>
|
||||
<div class="col-6">
|
||||
<div class="form-row justify-content-around align-items-center">
|
||||
@@ -164,14 +168,6 @@
|
||||
<i :class="estado.estado_icon"></i> {{estado.nombre}}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li class="datalist-option" data-id="-1"
|
||||
@click="store.filters.estados = store.toggle(store.filters.estados, -1); setTimeout(store.estados.printEstados, 0); store.current.page = 1;">
|
||||
<span class="badge badge-dark">
|
||||
<i class="ing-cancelar"></i>
|
||||
Sin registro
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<input type="hidden" id="estado_id" name="estado_id">
|
||||
</div>
|
||||
@@ -180,13 +176,20 @@
|
||||
</div>
|
||||
<div class="form-group row align-items-center">
|
||||
<label for="switchFecha" class="col-4 col-form-label">
|
||||
{{store.filters.switchFecha ? 'Rango de fechas' : 'Fecha'}}
|
||||
|
||||
<!-- switch -->
|
||||
<div class="custom-control custom-switch">
|
||||
<span :class="{ 'text-muted font-weight-lighter': store.filters.switchFecha }" class="mr-5">
|
||||
Fecha
|
||||
</span>
|
||||
<input type="checkbox" class="custom-control-input" id="switchFecha"
|
||||
v-model="store.filters.switchFecha" @input="store.filters.switchFechas">
|
||||
<label class="custom-control-label" for="switchFecha"></label>
|
||||
<span :class="{ 'text-muted font-weight-lighter': !store.filters.switchFecha }">
|
||||
Rango de fechas
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</label>
|
||||
|
||||
<div class="col-6" v-if="store.filters.switchFecha">
|
||||
@@ -213,20 +216,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 d-flex justify-content-center flex-wrap">
|
||||
<div class="mt-3 d-flex justify-content-between flex-wrap align-items-center">
|
||||
<!-- botón descargar -->
|
||||
|
||||
<div class="btn-group my-3" v-if="store.registros.relevant.length > 0">
|
||||
<button type="button" class="btn btn-info mr-3" @click="store.registros.descargar">
|
||||
<i class="ing-descarga"></i>
|
||||
Descargar reporte
|
||||
</button>
|
||||
</div>
|
||||
<div v-else-if="store.registros.loading && store.registros.relevant.length > 0">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
<div class="col-md-5 col-12 text-center">
|
||||
<div class="btn-group my-3" v-if="store.registros.relevant.length > 0">
|
||||
<button type="button" class="btn btn-outline-primary mr-3" @click="store.registros.descargar">
|
||||
Descargar reporte
|
||||
<i class="ing-descarga"></i>
|
||||
</button>
|
||||
</div>
|
||||
Generando reporte...
|
||||
<div v-else-if="store.registros.loading && store.registros.relevant.length > 0">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
Generando reporte...
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7 col-12 justify-content-around d-flex align-items-center">
|
||||
<span v-for="estado in store.estados.data" :class="`text-${estado.estado_color}`"
|
||||
class="text-center col-2">
|
||||
<span>
|
||||
<i :class="`${estado.estado_icon}`"></i>
|
||||
</span>
|
||||
<span class="mx-2">{{estado.nombre}}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- refresh -->
|
||||
@@ -234,19 +247,24 @@
|
||||
<table class="table table-hover table-striped table-bordered table-sm">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th scope="col" class="text-center align-middle px-2">
|
||||
<button @click="store.registros.invertir" class="btn btn-info mr-3"
|
||||
<th scope="col"
|
||||
class="text-center align-middle px-2 d-flex align-items-center justify-content-center">
|
||||
<button @click="store.registros.invertir" class="btn btn-light btn-sm text-primary mr-3"
|
||||
v-if="store.registros.relevant.length > 1">
|
||||
<i class="ing-cambiar ing-rotate-90"></i>
|
||||
</button>
|
||||
Fecha
|
||||
<span style="white-space: nowrap;">Fecha</span>
|
||||
</th>
|
||||
<th scope="col" class="text-center align-middle px-2">Salón</th>
|
||||
|
||||
<th scope="col" class="text-center align-middle px-2" width="10%">Salón</th>
|
||||
<th scope="col" class="text-center align-middle px-2">Profesor</th>
|
||||
|
||||
<th scope="col" class="text-center align-middle px-2">Horario</th>
|
||||
<th scope="col" class="text-center align-middle px-2" width="7%">Horario</th>
|
||||
<th scope="col" class="text-center align-middle px-2">Registro</th>
|
||||
<th scope="col" class="text-center align-middle px-2">Supervisor</th>
|
||||
<? if ($user->acceso == 'w') { ?>
|
||||
<th scope="col" class="text-center align-middle px-2" width="10%">Justificar</th>
|
||||
<? } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -258,23 +276,19 @@
|
||||
<td class="text-center align-middle px-2">{{ registro.registro_fecha_ideal }}
|
||||
</td>
|
||||
<td class="text-center align-middle px-2">{{ registro.salon }}</td>
|
||||
<td class="text-center align-middle px-2">
|
||||
<div class="col-12">
|
||||
<strong>{{ registro.profesor_clave }}</strong>
|
||||
{{ registro.profesor_nombre }}
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-outline-dark btn-sm"
|
||||
@click="store.current.clase_vista = registro" data-toggle="modal"
|
||||
data-target="#ver-detalle">
|
||||
Ver detalle <i class="ing-ojo"></i>
|
||||
</button>
|
||||
</div>
|
||||
<td class="align-middle px-2">
|
||||
<strong>{{ registro.profesor_clave }}</strong>
|
||||
{{ registro.profesor_nombre }}
|
||||
<button type="button" class="ml-3 btn btn-sm btn-outline-primary" @click="store.current.clase_vista = registro"
|
||||
data-toggle="modal" data-target="#ver-detalle">
|
||||
<i class="ing-ojo"></i>
|
||||
Ver detalle
|
||||
</button>
|
||||
</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">
|
||||
@@ -285,73 +299,60 @@
|
||||
<div v-else>
|
||||
<strong>
|
||||
<div class="col-12">
|
||||
<span class="badge badge-dark"><i class="ing-cancelar"></i></span>
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
Sin registro
|
||||
<span class="text-dark ing-2x"><i class="ing-cancelar"></i></span>
|
||||
</div>
|
||||
</strong>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<!-- Sí checó supervisor -->
|
||||
<td class="text-center align-middle px-2 d-flex justify-content-center">
|
||||
<div v-if="registro.registro_fecha_supervisor">
|
||||
<td class="text-center align-middle px-2">
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<strong>{{ registro.usuario_nombre }}</strong>
|
||||
<span class="mr-2" :class="`text-${registro.estado_color}`">
|
||||
<i :class="`${registro.estado_icon} ing-2x`"></i>
|
||||
</span>
|
||||
<strong v-if="registro.usuario_nombre">{{ registro.usuario_nombre
|
||||
}}</strong>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="col-12" v-if="registro.registro_fecha_supervisor">
|
||||
Hora
|
||||
<small>{{ registro.registro_fecha_supervisor?.slice(11,19) }}</small>
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<span class="badge" :class="`badge-${registro.estado_color}`">
|
||||
<i :class="`${registro.estado_icon}`"></i>
|
||||
<strong>{{ registro.nombre }}</strong>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- comentario -->
|
||||
<hr v-if="registro.comentario">
|
||||
<div class="col-12 "
|
||||
@click="store.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,
|
||||
25)}}{{registro.comentario.length > 10 ? '...' : ''}}</small>
|
||||
<strong class="badge border border-primary">Observaciones:</strong>
|
||||
<small
|
||||
class="text-truncate">{{registro.comentario?.slice(0,25)}}{{registro.comentario.length
|
||||
> 10 ? '...' : ''}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<!-- No checó -->
|
||||
<div v-else>
|
||||
<div class="col-12">
|
||||
<span class="badge badge-dark"><i class="ing-cancelar"></i></span>
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<strong>Sin registro</strong>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($user->acceso == 'w') { ?>
|
||||
<button class="btn text-center mx-2" data-toggle="modal"
|
||||
:class="`btn-${registro.registro_justificada ? 'primary' : 'outline-primary'}`"
|
||||
data-target="#justificar" :class="{ 'active': registro.comentario }"
|
||||
@click="set_justificar(registro.horario_id, registro.profesor_id, registro.registro_fecha_ideal)">
|
||||
<i :class="`ing-${registro.registro_justificada ? 'aceptar' : 'editar'}`"></i> {{
|
||||
registro.registro_justificada ? 'Justificada' : 'Justificar' }}
|
||||
<span class="badge badge-pill badge-light text-dark"
|
||||
v-if="registro.registro_justificada && registro.justificacion">...</span>
|
||||
<span class="sr-only">{{ registro.registro_justificada ? 'Justificada' :
|
||||
'Justificar' }}</span>
|
||||
</button>
|
||||
<? } ?>
|
||||
</td>
|
||||
<? if ($user->acceso == 'w') { ?>
|
||||
<td class="text-center align-middle px-2">
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-link text-center mx-2 btn-sm" data-toggle="modal"
|
||||
:class="`text-${registro.registro_justificada ? 'success' : 'primary'}`"
|
||||
data-target="#justificar" :class="{ 'active': registro.comentario }"
|
||||
@click="set_justificar(registro.horario_id, registro.profesor_id, registro.registro_fecha_ideal)">
|
||||
<i :class="`ing-${registro.registro_justificada ? 'finalistas' : 'reporte-resultados'}`"
|
||||
style="font-size: 2rem;"></i>
|
||||
<span class="sr-only">{{ registro.registro_justificada ? 'Justificada' :
|
||||
'Justificar' }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
<? } ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- page -->
|
||||
<nav class="mt-3" v-if="store.registros.relevant.length > 0">
|
||||
<nav v-if="store.registros.relevant.length > 0" class="mt-3 col-12">
|
||||
<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"
|
||||
@@ -452,7 +453,6 @@
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<strong>Horario:</strong>
|
||||
<!-- hora hh:mm:ss to hh:mm -->
|
||||
{{ clase_vista.horario_hora?.slice(0, 5) }} - {{
|
||||
clase_vista.horario_fin?.slice(0, 5) }}
|
||||
</div>
|
||||
@@ -468,7 +468,8 @@
|
||||
<h4 class="h4 mt-4">Registro</h4>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-center" v-if="!clase_vista.registro_fecha">
|
||||
<strong><span class="badge badge-dark"><i class="ing-cancelar"></i></span>
|
||||
<strong><span class="badge border border-dark"><i
|
||||
class="ing-cancelar"></i></span>
|
||||
Sin registro del profesor</strong>
|
||||
</div>
|
||||
<div class="col-md-6 text-center" v-else>
|
||||
@@ -476,25 +477,27 @@
|
||||
<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>
|
||||
<span class="badge border border-success"><i
|
||||
class="ing-aceptar"></i></span>
|
||||
A tiempo
|
||||
</p>
|
||||
<p v-else class="text-center">
|
||||
<span class="badge badge-warning"><i class="ing-retardo"></i></span>
|
||||
<span class="badge border border-warning"><i
|
||||
class="ing-retardo"></i></span>
|
||||
Con retardo
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6 text-center" v-if="clase_vista.registro_justificada">
|
||||
<strong>
|
||||
<span class="badge badge-primary mr-2">
|
||||
<i class="ing-aceptar"></i>
|
||||
<span class="badge badge-success mr-2">
|
||||
<i class="ing-finalistas"></i>
|
||||
</span>
|
||||
Justificada
|
||||
</strong>
|
||||
<span class="text-muted">
|
||||
por
|
||||
{{clase_vista.justificador_nombre}} de
|
||||
<strong>{{clase_vista.justificador_rol}}</strong>
|
||||
{{clase_vista.justificador_nombre}}
|
||||
<span v-if="clase_vista.justificador_facultad"> de
|
||||
<strong>{{clase_vista.justificador_facultad}}</strong>
|
||||
</span>
|
||||
@@ -514,7 +517,7 @@
|
||||
<div class="col-md-6 text-center"
|
||||
v-else-if="clase_vista.registro_fecha_justificacion">
|
||||
<strong>
|
||||
<span class="badge badge-dark">
|
||||
<span class="badge border border-dark">
|
||||
<i class="ing-cancelar"></i>
|
||||
</span>
|
||||
Sin justificar, <span class="text-muted">
|
||||
@@ -528,7 +531,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 text-center" v-else>
|
||||
<strong>
|
||||
<span class="badge badge-dark">
|
||||
<span class="badge border border-dark">
|
||||
<i class="ing-cancelar"></i>
|
||||
</span>
|
||||
Sin justificar
|
||||
@@ -549,7 +552,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" tabindex="-1" id="cargando">
|
||||
<div class="modal-dialog modal-dialog-centered modal-sm">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">{{store.current.modal_state}}</h4>
|
||||
@@ -586,9 +589,6 @@
|
||||
class="text-uppercase">
|
||||
{{store.current.justificada.nombre.toUpperCase()}}
|
||||
</strong>
|
||||
<strong v-else class="text-dark" class="text-uppercase">
|
||||
SIN REGISTRO
|
||||
</strong>
|
||||
del día
|
||||
<span class="text-muted">{{store.current.justificada.registro_fecha_ideal}}</span>
|
||||
a las
|
||||
@@ -598,7 +598,7 @@
|
||||
<span class="text-muted">{{store.current.justificada.profesor_nombre}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<hr>
|
||||
<hr v-if="store.current.justificada.registro_justificada">
|
||||
<div class="input-group" v-if="store.current.justificada.registro_justificada">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text text-white bg-primary">Observación</span>
|
||||
@@ -631,6 +631,12 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
|
||||
<script src="js/auditoría.js?<?= rand(0, 2) ?>" type="module"></script>
|
||||
<script src="js/scrollables.js"></script>
|
||||
<script>
|
||||
setDatalistFirst('#bloque_id');
|
||||
setDatalistFirst('#facultad_id');
|
||||
setDatalistFirst('#estado_id');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user