|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?= $this->extend('templates/base') ?>
-
- <!-- title -->
- <?= $this->section('title') ?>Prestador<?= $this->endSection() ?>
-
- <!-- head -->
- <?= $this->section('head') ?>
-
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css">
- <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
- <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
- <script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
-
- <?= $this->endSection() ?>
-
- <!-- content -->
- <?= $this->section('content') ?>
-
- <div class="row mb-5">
- <!-- HORAS MENSUALES -->
- <div class="col-md-4 mb-5">
- <div class="card">
- <div class="card-header">
- Horas realizadas por mes
- </div>
- <div class="card-body">
- <table class="table table-sm table-hover">
- <thead>
- <th>Mes</th>
- <th>Horas</th>
- </thead>
- <tbody>
- <?php foreach ($segundosMensuales as $mes) : ?>
- <tr>
- <td><?= esc($mes['mes']) ?> / <?= esc($mes['ano']) ?></td>
- <td><?= esc($mes['segundos']) / 3600 ?></td>
- </tr>
- <?php endforeach ?>
- </tbody>
- <tfoot class="table-active">
- <td>Total</td>
- <td><?= $horasTotales ?></td>
- </tfoot>
- </table>
- <!-- <a data-bs-toggle="collapse" href="#collapseHoras" role="button" aria-expanded="true" aria-controls="collapseHoras">Ver desglose de horas</a> -->
- </div>
- </div>
- </div>
- <!-- DESGLOSE DE HORAS -->
- <!-- <div class="collapse show" id="collapseHoras"> -->
- <div class="col-md-5">
- <div class="card">
- <div class="card-header">
- Desglose por día
- </div>
- <div class="card-body">
- <table id="example" class="table table-striped" style="width:100%" aria-describedby="example_info">
- <thead>
- <tr>
- <th class="sorting sorting_asc" tabindex="0" aria-controls="example" rowspan="1" colspan="1" style="width: 128.867px;" aria-sort="ascending" aria-label="Name: activate to sort column descending">Fecha</th>
- <th class="sorting" tabindex="0" aria-controls="example" rowspan="1" colspan="1" style="width: 217.267px;" aria-label="Position: activate to sort column ascending">Horas</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($segundosDiarios as $dia) : ?>
- <tr>
- <td class="sorting_1"><?= sprintf("%02d", esc($dia['dia'])) ?> / <?= sprintf("%02d", esc($dia['mes'])) ?> / <?= esc($dia['ano']) ?></td>
- <td><?= esc($dia['total_horas_truncadas']) / 3600 ?>
- </tr>
- </tr>
- <?php endforeach ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <!-- </div> -->
- </div>
-
-
-
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- let table = new DataTable('#example', {
- 'searching': false,
- 'ordering': false,
- 'language': {
- "lengthMenu": "Mostrar _MENU_ registros",
- "info": "Página: _PAGE_ / _PAGES_",
- "zeroRecords": "No se encontraron registros",
- "paginate": {
- "first": "Inicio",
- "last": "Fin",
- "next": ">",
- "previous": "<"
- },
- },
- 'order': [],
- });
- });
- </script>
-
- <?= $this->endSection() ?>
|