|
@@ -0,0 +1,761 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Auditoría asistencial</title>
|
|
|
+ <?php
|
|
|
+ include 'import/html_css_files.php';
|
|
|
+ ?>
|
|
|
+ <style>
|
|
|
+ [v-cloak] {
|
|
|
+ display: none;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script src="js/jquery.min.js"></script>
|
|
|
+ <script src="js/jquery-ui.js"></script>
|
|
|
+ <script src="js/bootstrap/bootstrap.min.js"></script>
|
|
|
+</head>
|
|
|
+
|
|
|
+<body>
|
|
|
+ <?
|
|
|
+ $redirect = $_SERVER['PHP_SELF'];
|
|
|
+ include "import/html_header.php";
|
|
|
+ global $user;
|
|
|
+
|
|
|
+ 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>
|
|
|
+
|
|
|
+ <div class="modal" id="seleccionar-periodo" tabindex="-1">
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-xl">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h2 class="modal-title">Seleccionar periodo</h2>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body container">
|
|
|
+ <? include 'import/periodo.php' ?>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+ $('#seleccionar-periodo').modal({
|
|
|
+ backdrop: 'static',
|
|
|
+ keyboard: false,
|
|
|
+ });
|
|
|
+ $('#seleccionar-periodo').modal('show');
|
|
|
+ </script>
|
|
|
+ <? exit;
|
|
|
+ } ?>
|
|
|
+
|
|
|
+ <main class="container-fluid px-4 mt-4" id="app" v-cloak @vue:mounted="mounted" style="min-height: 60vh;"
|
|
|
+ v-scope="">
|
|
|
+ <!-- {{ store.filters }} -->
|
|
|
+ <?php include "import/periodo.php" ?>
|
|
|
+ <div class="form-box marco">
|
|
|
+ <? if (!$user->facultad['facultad_id']) { ?>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="dlFacultad" class="col-4 col-form-label">Facultad</label>
|
|
|
+ <div class="col-6">
|
|
|
+ <div id="dlFacultad" class="datalist datalist-select mb-1 w-100">
|
|
|
+ <div class="datalist-input">
|
|
|
+ Selecciona una facultad
|
|
|
+ </div>
|
|
|
+ <span class="icono ing-buscar"></span>
|
|
|
+ <ul style="display:none">
|
|
|
+ <li class="datalist-option" data-id="-1"
|
|
|
+ @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; store.current.page = 1;"
|
|
|
+ style="white-space: nowrap;">
|
|
|
+ (<small> {{facultad.clave_dependencia}} </small>) {{ facultad.facultad_nombre }}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <input type="hidden" id="facultad_id" name="id">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group row">
|
|
|
+ <!-- Checkbox para descargar todo -->
|
|
|
+ <div class="col-12 text-center">
|
|
|
+ <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>
|
|
|
+ <? } ?>
|
|
|
+
|
|
|
+ <div class="form-group row" v-if="store.bloques_horario.data.length > 0">
|
|
|
+ <label for="dlBloqueHorarios" class="col-4 col-form-label">Bloque horarios</label>
|
|
|
+ <div class="col-6">
|
|
|
+ <div id="dlBloqueHorarios" class="datalist datalist-select mb-1 w-100">
|
|
|
+ <div class="datalist-input">
|
|
|
+ Seleccione un bloque horario
|
|
|
+ </div>
|
|
|
+ <span class="icono ing-buscar"></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 class="datalist-option not-selectable">
|
|
|
+ Mañana
|
|
|
+ </li>
|
|
|
+
|
|
|
+ <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 ; 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"
|
|
|
+ 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 ; store.current.page = 1;">
|
|
|
+ {{ bloque.hora_inicio.substr(0,5) }} - {{ bloque.hora_fin.substr(0,5) }}
|
|
|
+ </li>
|
|
|
+
|
|
|
+ </ul>
|
|
|
+ <input type="hidden" id="bloque_id" name="id">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="profesor" class="col-4 col-form-label">Profesor</label>
|
|
|
+ <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"
|
|
|
+ @input="store.current.page = 1">
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ <datalist id="dlProfesor">
|
|
|
+ <option v-for="profesor in profesores" :key="profesor.profesor_id"
|
|
|
+ :value="`(${profesor.profesor_clave}) ${profesor.profesor_nombre}`">
|
|
|
+ </datalist>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group row align-items-center">
|
|
|
+ <label for="dlAsistencia" class="col-4 col-form-label">
|
|
|
+ Estado de supervisor
|
|
|
+ </label>
|
|
|
+ <div class="col-6">
|
|
|
+ <div class="form-row justify-content-around align-items-center">
|
|
|
+ <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="icono ing-buscar"></span>
|
|
|
+ <ul style=" display:none">
|
|
|
+ <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); store.current.page = 1;"
|
|
|
+ :class="{'selected': store.filters.estados.includes(estado.estado_supervisor_id)}">
|
|
|
+ <span class="badge" :class="`badge-${estado.estado_color}`">
|
|
|
+ <i :class="estado.estado_icon"></i> {{estado.nombre}}
|
|
|
+ </span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <input type="hidden" id="estado_id" name="estado_id">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="form-group row align-items-center">
|
|
|
+ <label for="switchFecha" class="col-4 col-form-label">
|
|
|
+
|
|
|
+ <!-- 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">
|
|
|
+ <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">
|
|
|
+ <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-sm form-control col-1 ml-auto"
|
|
|
+ :class="store.filters.fecha_inicio == null || store.filters.fecha_fin == null || store.current.fechas_clicked ? 'btn-info' : 'btn-success'"
|
|
|
+ :disabled="store.filters.fecha_inicio == null || store.filters.fecha_fin == null || store.current.fechas_clicked"
|
|
|
+ @click="store.filters.fetchByDate">
|
|
|
+ <i class="ing-aceptar"></i>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-6" v-if="!store.filters.switchFecha">
|
|
|
+ <div class="form-row">
|
|
|
+ <input id="fecha" name="fecha" class="form-control date-picker"
|
|
|
+ placeholder="Seleccione una fecha" readonly v-model="store.filters.fecha">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="mt-3 d-flex justify-content-between flex-wrap align-items-center">
|
|
|
+ <? if ($user->acceso == 'w') { ?>
|
|
|
+ <!-- botón justificar profesores -->
|
|
|
+ <div class="col-md-2 col-12 text-center">
|
|
|
+ <div class="btn-group my-3">
|
|
|
+ <button type="button" class="btn btn-outline-primary mr-3" data-toggle="modal"
|
|
|
+ data-target="#justificar-profesores">
|
|
|
+ Justificar profesores
|
|
|
+ <i class="ing-justificar"></i>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <? } ?>
|
|
|
+
|
|
|
+ <!-- botón descargar -->
|
|
|
+ <div class="col-md-2 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>
|
|
|
+ <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>
|
|
|
+ <!-- Reporte -->
|
|
|
+ <div class="col-md-8 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">
|
|
|
+ <i :class="`${estado.estado_icon} ing-lg`"></i>
|
|
|
+ <span class="mx-2">{{estado.nombre}}</span>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- refresh -->
|
|
|
+ <div class="table-responsive">
|
|
|
+ <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 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>
|
|
|
+ <span style="white-space: nowrap;">Fecha</span>
|
|
|
+ </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" 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>
|
|
|
+ <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 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}`"
|
|
|
+ :class="{ 'table-warning': registro.reposicion_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>
|
|
|
+ <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> 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">
|
|
|
+ <div v-if="registro.registro_fecha">
|
|
|
+ <div class="col-12" :class="registro.color">
|
|
|
+ Registro <small>{{ registro.registro_fecha?.slice(11,19) }}</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <strong>
|
|
|
+ <div class="col-12">
|
|
|
+ <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">
|
|
|
+ <div class="col-12">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12">
|
|
|
+ <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" v-if="registro.registro_fecha_supervisor">
|
|
|
+ Hora
|
|
|
+ <small>{{ registro.registro_fecha_supervisor?.slice(11,19) }}</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-12 "
|
|
|
+ @click="store.registros.mostrarComentario(registro.registro_id)"
|
|
|
+ v-if="registro.comentario" style="cursor: pointer;">
|
|
|
+ <strong class="badge border border-primary">Observaciones:</strong>
|
|
|
+ <small
|
|
|
+ class="text-truncate">{{registro.comentario?.slice(0,25)}}{{registro.comentario.length
|
|
|
+ > 10 ? '...' : ''}}</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </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 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"
|
|
|
+ :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(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 ${store.registros.pages}`">
|
|
|
+ <a class="page-link" style="cursor: pointer;">{{ page }}</a>
|
|
|
+ </li>
|
|
|
+ <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>
|
|
|
+ </nav>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="modal" tabindex="-1" id="ver-comentario">
|
|
|
+ <div class="modal-dialog modal-dialog-centered">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">Comentario</h5>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="container">
|
|
|
+ <div class="input-group">
|
|
|
+ <textarea class="form-control" aria-label="Comentarios de la clase" rows="5"
|
|
|
+ v-model="store.current.comentario" disabled></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
|
|
|
+ Aceptar
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal" tabindex="-1" id="ver-detalle">
|
|
|
+ <div class="modal-dialog modal-dialog-centered modal-xl" v-if="clase_vista">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h2 class="modal-title" :data-id="clase_vista.horario_id">Detalle de la clase</h2>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="container">
|
|
|
+ <div class="row">
|
|
|
+ <section class="col-12 col-md-6">
|
|
|
+ <h4 class="h4">Profesor</h4>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Nombre:</strong>
|
|
|
+ {{ clase_vista.profesor_nombre }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Correo:</strong>
|
|
|
+ <a :href="`mailto:${clase_vista.profesor_correo}`"><strong>{{
|
|
|
+ clase_vista.profesor_correo }}</strong></a>
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Clave:</strong>
|
|
|
+ {{ clase_vista.profesor_clave }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Facultad:</strong>
|
|
|
+ {{ clase_vista.facultad }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ <section class="col-12 col-md-6">
|
|
|
+ <h4 class="h4">Clase</h4>
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Materia:</strong>
|
|
|
+ {{ clase_vista.materia }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Carrera:</strong>
|
|
|
+ {{ clase_vista.carrera }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Nivel:</strong>
|
|
|
+ {{ clase_vista.nivel}}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Grupo:</strong>
|
|
|
+ {{ clase_vista.horario_grupo }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Horario:</strong>
|
|
|
+ {{ clase_vista.horario_hora?.slice(0, 5) }} -
|
|
|
+ {{clase_vista.horario_fin?.slice(0, 5) }}
|
|
|
+ </div>
|
|
|
+ <div class="col-12">
|
|
|
+ <strong>Salón:</strong>
|
|
|
+ {{ clase_vista.salon }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <section class="col-12">
|
|
|
+ <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 border border-dark"><i
|
|
|
+ class="ing-cancelar"></i></span>
|
|
|
+ Sin registro del profesor</strong>
|
|
|
+ </div>
|
|
|
+ <div class="col-md-6 text-center" v-else>
|
|
|
+ El profesor registró su asistencia a las
|
|
|
+ <code>{{clase_vista.registro_fecha?.slice(11, 19)}}</code>
|
|
|
+ <hr>
|
|
|
+ <p v-if="!clase_vista.registro_retardo" class="text-center">
|
|
|
+ <span class="badge border border-success"><i
|
|
|
+ class="ing-aceptar"></i></span>
|
|
|
+ A tiempo
|
|
|
+ </p>
|
|
|
+ <p v-else class="text-center">
|
|
|
+ <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-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>
|
|
|
+ <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 border border-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 border border-dark">
|
|
|
+ <i class="ing-cancelar"></i>
|
|
|
+ </span>
|
|
|
+ Sin justificar
|
|
|
+ </strong>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+
|
|
|
+
|
|
|
+ <section class="col-12" v-if="clase_vista.reposicion_id">
|
|
|
+ <h4 class="h4 mt-4">Reposición</h4>
|
|
|
+
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12 text-center">
|
|
|
+ Esta clase se reprogramó para el día
|
|
|
+ {{ clase_vista.reposicion_fecha }} a las
|
|
|
+ {{ clase_vista.reposicion_hora?.slice(0, 5) }} -
|
|
|
+ {{clase_vista.reposicion_hora_fin?.slice(0, 5) }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <!-- botón aceptar -->
|
|
|
+ <button type="button" class="btn btn-outline-primary" data-dismiss="modal">
|
|
|
+ <i class="ing-aceptar"></i>
|
|
|
+ Aceptar
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal" tabindex="-1" id="cargando">
|
|
|
+ <div class="modal-dialog modal-dialog-centered">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h4 class="modal-title">{{store.current.modal_state}}</h4>
|
|
|
+
|
|
|
+ </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>
|
|
|
+ <? 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="row">
|
|
|
+ <div class="col-12 text-center">
|
|
|
+ Justificar <strong :class="`text-${store.current.justificada.estado_color}`"
|
|
|
+ class="text-uppercase">
|
|
|
+ {{store.current.justificada.nombre}}</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>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <hr>
|
|
|
+ <div class="input-group">
|
|
|
+ <div class="input-group-prepend">
|
|
|
+ <span class="input-group-text text-white bg-primary">Observaciones</span>
|
|
|
+ </div>
|
|
|
+ <textarea class="form-control" aria-label="Observación"
|
|
|
+ placeholder="Puedes justificar sin observaciones" 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"
|
|
|
+ :disabled="!store.current.justificada.justificacion"
|
|
|
+ :class="{'disabled': !store.current.justificada.justificacion}" data-dismiss="modal"
|
|
|
+ @click="store.justificar">
|
|
|
+ Justificar
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="modal" tabindex="-1" id="justificar-profesores" data-backdrop="static" data-keyboard="false"
|
|
|
+ v-scope="{
|
|
|
+ justificacion: {
|
|
|
+ fecha: null,
|
|
|
+ bloques: [],
|
|
|
+ observaciones: null
|
|
|
+ }
|
|
|
+ }">
|
|
|
+ <div class="modal-dialog modal-dialog-centered">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title">
|
|
|
+ Justificación de profesores
|
|
|
+ </h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <p class="lead">
|
|
|
+ Selecciona los bloques que deseas justificar, puedes seleccionar varios bloques
|
|
|
+ <small>
|
|
|
+ Todos los profesores que tengan clases en los bloques seleccionados serán
|
|
|
+ justificados
|
|
|
+ </small>
|
|
|
+ </p>
|
|
|
+ <form>
|
|
|
+ <div class="form-group row" v-if="store.periodo">
|
|
|
+ <label for="fecha-justificación" class="col-sm-4 col-form-label barra-right">Fecha
|
|
|
+ de la
|
|
|
+ justificación</label>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ <input type="date" class="form-control" id="fecha-justificación"
|
|
|
+ :min="store.periodo.periodo_fecha_inicio" :max="store.periodo.periodo_fecha_fin"
|
|
|
+ v-model="justificacion.fecha">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <fieldset class="form-group row">
|
|
|
+ <legend class="col-form-label col-sm-4 float-sm-left pt-0 barra-right">
|
|
|
+ Bloques horario
|
|
|
+ </legend>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ <select class="custom-select" multiple v-model="justificacion.bloques">
|
|
|
+ <option selected disabled>Seleccione los bloques</option>
|
|
|
+ <option disabled><strong>Mañana</strong></option>
|
|
|
+ <option
|
|
|
+ v-for="bloque in store.bloques_horario.data.filter(bloque => bloque.hora_inicio < '13:00:00')"
|
|
|
+ :key="bloque.id" :value="bloque.id" class="text-center">
|
|
|
+ {{bloque.hora_inicio.substr(0,5)}} - {{bloque.hora_fin.substr(0,5)}}
|
|
|
+ </option>
|
|
|
+ <option disabled><strong>Tarde</strong></option>
|
|
|
+ <option
|
|
|
+ v-for="bloque in store.bloques_horario.data.filter(bloque => bloque.hora_inicio >= '13:00:00')"
|
|
|
+ :key="bloque.id" :value="bloque.id" class="text-center">
|
|
|
+ {{bloque.hora_inicio.substr(0,5)}} - {{bloque.hora_fin.substr(0,5)}}
|
|
|
+ </option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </fieldset>
|
|
|
+ <div class="form-group row">
|
|
|
+ <label for="observaciones" class="col-sm-4 col-form-label barra-right">
|
|
|
+ Observaciones
|
|
|
+ </label>
|
|
|
+ <div class="col-sm-8">
|
|
|
+ <textarea class="form-control" id="observaciones" rows="3"
|
|
|
+ v-model="justificacion.observaciones"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-outline-danger" data-dismiss="modal">Cancelar</button>
|
|
|
+ <button type="button" class="btn btn-primary"
|
|
|
+ :disabled="Object.keys(justificacion).some(key => !justificacion[key])" @click="
|
|
|
+ store.justificarBloque(justificacion.fecha, justificacion.bloques, justificacion.observaciones);
|
|
|
+ Object.keys(justificacion).forEach(key => justificacion[key] = null);
|
|
|
+ ">
|
|
|
+ Justificar
|
|
|
+ </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?<?= 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>
|