|
|
@@ -4,7 +4,7 @@
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
- <title>Supervisor</title>
|
|
|
+ <title>Auditoría asistencial</title>
|
|
|
<?php
|
|
|
include 'import/html_css_files.php';
|
|
|
?>
|
|
|
@@ -20,16 +20,21 @@
|
|
|
|
|
|
<body>
|
|
|
<?
|
|
|
+ $justificadores = array(
|
|
|
+ 'Root',
|
|
|
+ 'Secretario Académico',
|
|
|
+ 'Vicerrectoría',
|
|
|
+ );
|
|
|
+
|
|
|
$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) { ?>
|
|
|
+ if (!$user->periodo_id) { ?>
|
|
|
<script defer src="js/jquery.min.js"></script>
|
|
|
<script src="js/bootstrap/bootstrap.min.js"></script>
|
|
|
|
|
|
@@ -92,16 +97,18 @@
|
|
|
<label class="custom-control-label" for="switchFecha"></label>
|
|
|
</div>
|
|
|
</label>
|
|
|
- <div class="col-3" v-if="store.filters.switchFecha">
|
|
|
- <div class="form-row">
|
|
|
- <input id="fecha_inicio" name="fecha_inicio" class="form-control date-picker"
|
|
|
+
|
|
|
+ <div class="col-6" v-if="store.filters.switchFecha">
|
|
|
+ <div class="form-row justify-content-around align-items-center">
|
|
|
+ <input id="fecha_inicio" name="fecha_inicio" class="form-control date-picker col-5 mr-4"
|
|
|
placeholder="Seleccione una fecha de inicio" readonly v-model="store.filters.fecha_inicio">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="col-3" v-if="store.filters.switchFecha">
|
|
|
- <div class="form-row">
|
|
|
- <input id="fecha_fin" name="fecha_fin" class="form-control date-picker"
|
|
|
+ <input id="fecha_fin" name="fecha_fin" class="form-control date-picker col-5"
|
|
|
placeholder="Seleccione una fecha final" readonly v-model="store.filters.fecha_fin">
|
|
|
+ <button type="button" class="btn btn-info btn-sm form-control col-1 ml-auto"
|
|
|
+ @click="store.filters.fetchByDate"
|
|
|
+ :disabled="store.filters.fecha_inicio == null || store.filters.fecha_fin == null">
|
|
|
+ <i class="ing-aceptar"></i>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -206,11 +213,10 @@
|
|
|
|
|
|
<div id="dlAsistencia" :class="{'d-none': !store.filters.sin_registro}"
|
|
|
class="datalist datalist-select mb-1 w-100">
|
|
|
- <div class="datalist-input" id="estados">
|
|
|
- <span class="badge badge-dark">
|
|
|
+ <div id="estados" class="datalist-input text-center">
|
|
|
+ <span class="badge badge-dark px-5">
|
|
|
<i class="ing-cancelar mr-3"></i>
|
|
|
<span class="text-uppercase">
|
|
|
-
|
|
|
Sin registro
|
|
|
</span>
|
|
|
</span>
|
|
|
@@ -224,13 +230,13 @@
|
|
|
<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 > 0">
|
|
|
- <button type="button" class="btn btn-info mr-3" @click="registros.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="registros.loading && registros.relevant.length > 0">
|
|
|
+ <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>
|
|
|
@@ -243,8 +249,8 @@
|
|
|
<thead class="thead-dark">
|
|
|
<tr>
|
|
|
<th scope="col" class="text-center align-middle px-2">
|
|
|
- <button @click="registros.invertir" class="btn btn-info mr-3"
|
|
|
- v-if="registros.relevant.length > 1">
|
|
|
+ <button @click="store.registros.invertir" class="btn btn-info mr-3"
|
|
|
+ v-if="store.registros.relevant.length > 1">
|
|
|
<i class="ing-cambiar ing-rotate-90"></i>
|
|
|
</button>
|
|
|
Fecha
|
|
|
@@ -258,10 +264,10 @@
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-if="registros.relevant.length == 0">
|
|
|
+ <tr v-if="store.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?.slice((store.current.page - 1) * store.current.perPage, store.current.page * store.current.perPage)"
|
|
|
+ <tr v-for="registro in store.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>
|
|
|
@@ -293,7 +299,7 @@
|
|
|
<div v-else>
|
|
|
<strong>
|
|
|
<div class="col-12">
|
|
|
- <span class="badge badge-danger"><i class="ing-cancelar"></i></span>
|
|
|
+ <span class="badge badge-dark"><i class="ing-cancelar"></i></span>
|
|
|
</div>
|
|
|
<div class="col-12 mt-2">
|
|
|
Sin registro
|
|
|
@@ -303,7 +309,7 @@
|
|
|
</td>
|
|
|
|
|
|
<!-- Sí checó supervisor -->
|
|
|
- <td class="text-center align-middle px-2">
|
|
|
+ <td class="text-center align-middle px-2 d-flex justify-content-center">
|
|
|
<div v-if="registro.registro_fecha_supervisor">
|
|
|
<div class="row">
|
|
|
<div class="col-12">
|
|
|
@@ -322,23 +328,36 @@
|
|
|
</div>
|
|
|
<!-- comentario -->
|
|
|
<hr v-if="registro.comentario">
|
|
|
- <div class="col-12 " @click="registros.mostrarComentario(registro.registro_id)"
|
|
|
+ <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>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- No checó -->
|
|
|
<div v-else>
|
|
|
<div class="col-12">
|
|
|
- <span class="badge badge-danger"><i class="ing-cancelar"></i></span>
|
|
|
+ <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>
|
|
|
</tr>
|
|
|
</tbody>
|
|
|
@@ -346,23 +365,23 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- page -->
|
|
|
- <nav class="mt-3" v-if="registros.relevant.length > 0">
|
|
|
+ <nav class="mt-3" v-if="store.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}`">
|
|
|
+ :title="`Página ${store.current.page} de ${store.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)"
|
|
|
+ v-for="page in [...Array(store.registros.pages).keys()].map(x => ++x).slice(store.current.page - 3 > 0 ? store.current.page - 3 : 0, store.current.page + 2 < store.registros.pages ? store.current.page + 2 : store.registros.pages)"
|
|
|
:class="{'active': store.current.page == page}" @click="store.current.page = page"
|
|
|
- :title="`Página ${store.current.page} de ${registros.pages}`">
|
|
|
+ :title="`Página ${store.current.page} de ${store.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}`">
|
|
|
+ <li class="page-item" :class="{'disabled': store.current.page == store.registros.pages}"
|
|
|
+ :disabled="store.current.page == store.registros.pages"
|
|
|
+ @click="store.current.page += store.current.page == store.registros.pages ? 0 : 1"
|
|
|
+ :title="`Página ${store.current.page} de ${store.registros.pages}`">
|
|
|
<a class="page-link" style="cursor: pointer;">Siguiente</a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
@@ -375,9 +394,7 @@
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
<h5 class="modal-title">Comentario</h5>
|
|
|
- <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="modal-body">
|
|
|
<div class="container">
|
|
|
@@ -401,9 +418,7 @@
|
|
|
<div class="modal-content">
|
|
|
<div class="modal-header">
|
|
|
<h2 class="modal-title" :data-id="clase_vista.horario_id">Detalle de la clase</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">
|
|
|
<div class="container">
|
|
|
@@ -466,11 +481,11 @@
|
|
|
<section class="col-12">
|
|
|
<h4 class="h4 mt-4">Registro</h4>
|
|
|
<div class="row">
|
|
|
- <div class="col-12 text-center" v-if="!clase_vista.registro_fecha">
|
|
|
- <strong><span class="badge badge-danger"><i class="ing-cancelar"></i></span>
|
|
|
- El profesor aún no ha registrado su asistencia</strong>
|
|
|
+ <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>
|
|
|
+ Sin registro del profesor</strong>
|
|
|
</div>
|
|
|
- <div class="col-6 text-center" v-else>
|
|
|
+ <div class="col-md-6 text-center" v-else>
|
|
|
El profesor registró su asistencia a las
|
|
|
<code>{{clase_vista.registro_fecha?.slice(11, 16)}}</code>
|
|
|
<hr>
|
|
|
@@ -483,7 +498,56 @@
|
|
|
Con retardo
|
|
|
</p>
|
|
|
</div>
|
|
|
- </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>
|
|
|
+ Justificada
|
|
|
+ </strong>
|
|
|
+ <span class="text-muted">
|
|
|
+ por
|
|
|
+ <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>
|
|
|
+
|
|
|
+ el día {{clase_vista.registro_fecha_justificacion?.slice(0, 10)}} a las
|
|
|
+ {{clase_vista.registro_fecha_justificacion?.slice(11, 16)}}
|
|
|
+ </span>
|
|
|
+ <div v-if="clase_vista.justificacion">
|
|
|
+ <hr>
|
|
|
+ <p class="text-center">
|
|
|
+ <strong>Observación:</strong>
|
|
|
+ {{clase_vista.justificacion}}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6 text-center"
|
|
|
+ v-else-if="clase_vista.registro_fecha_justificacion">
|
|
|
+ <strong>
|
|
|
+ <span class="badge badge-dark">
|
|
|
+ <i class="ing-cancelar"></i>
|
|
|
+ </span>
|
|
|
+ Sin justificar, <span class="text-muted">
|
|
|
+ {{clase_vista.justificador_nombre}}
|
|
|
+ ({{clase_vista.justificador_rol}}{{clase_vista.justificador_facultad
|
|
|
+ ? ' de ' + clase_vista.justificador_facultad : ''}})
|
|
|
+ </span> borró la justificación, el día
|
|
|
+ {{clase_vista.registro_fecha_justificacion?.slice(0, 10)}} a las
|
|
|
+ {{clase_vista.registro_fecha_justificacion?.slice(11, 16)}}
|
|
|
+ </strong>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6 text-center" v-else>
|
|
|
+ <strong>
|
|
|
+ <span class="badge badge-dark">
|
|
|
+ <i class="ing-cancelar"></i>
|
|
|
+ </span>
|
|
|
+ Sin justificar
|
|
|
+ </strong>
|
|
|
+ </div>
|
|
|
</section>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -499,13 +563,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal" tabindex="-1" id="cargando">
|
|
|
- <div class="modal-dialog modal-dialog-centered modal-xl">
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-sm">
|
|
|
<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>
|
|
|
+ <h4 class="modal-title">{{store.current.modal_state}}</h4>
|
|
|
+
|
|
|
</div>
|
|
|
<div class="modal-body container">
|
|
|
<div class="row">
|
|
|
@@ -517,12 +579,71 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <? if ($user->acceso == 'w') { ?>
|
|
|
+ <div class="modal fade" tabindex="-1" id="justificar" data-backdrop="static" data-keyboard="false">
|
|
|
+ <div class="modal-dialog modal-dialog-centered" v-if="store.current.justificada">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">Justificar Asistencia</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="container">
|
|
|
+ <h2 class="text-center">¿Desea justificar la asistencia?</h2>
|
|
|
+ <br>
|
|
|
+ <div class="custom-control custom-switch">
|
|
|
+ <input type="checkbox" class="custom-control-input form-control-lg my-auto"
|
|
|
+ id="está-justificada" v-model="store.current.justificada.registro_justificada"
|
|
|
+ @click="store.current.justificada.justificacion = ''">
|
|
|
+ <label class="custom-control-label" for="está-justificada">Justificar
|
|
|
+ <strong v-if="store.current.justificada.estado_supervisor_id"
|
|
|
+ :class="`text-${store.current.justificada.estado_color}`"
|
|
|
+ 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
|
|
|
+ <span
|
|
|
+ class="text-muted">{{store.current.justificada.horario_hora?.slice(0,5)}}</span>
|
|
|
+ para el profesor
|
|
|
+ <span class="text-muted">{{store.current.justificada.profesor_nombre}}</span>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ <hr>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ <textarea class="form-control" aria-label="Observación"
|
|
|
+ placeholder="Puedes justificar sin observación" rows="2"
|
|
|
+ v-model="store.current.justificada.justificacion"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-outline-danger" data-dismiss="modal"
|
|
|
+ @click="cancelar_justificacion">
|
|
|
+ <i class="ing-cancelar"></i>
|
|
|
+ Cancelar
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="store.justificar">
|
|
|
+ Aceptar
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <? } ?>
|
|
|
</main>
|
|
|
|
|
|
<!-- <script src="js/datalist.js"></script> -->
|
|
|
<script src="js/datepicker-es.js"></script>
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
|
|
|
- <script src="js/auditoría.js" type="module"></script>
|
|
|
+ <script src="js/auditoría.js?<?= rand(0, 2) ?>" type="module"></script>
|
|
|
<script src="js/scrollables.js"></script>
|
|
|
</body>
|
|
|
|