Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

103 rindas
4.0KB

  1. <?= $this->extend('templates/base') ?>
  2. <!-- title -->
  3. <?= $this->section('title') ?>Prestador<?= $this->endSection() ?>
  4. <!-- head -->
  5. <?= $this->section('head') ?>
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css">
  7. <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
  8. <script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
  9. <script src="https://cdn.datatables.net/1.12.1/js/dataTables.bootstrap5.min.js"></script>
  10. <?= $this->endSection() ?>
  11. <!-- content -->
  12. <?= $this->section('content') ?>
  13. <div class="row mb-5">
  14. <!-- HORAS MENSUALES -->
  15. <div class="col-md-4 mb-5">
  16. <div class="card">
  17. <div class="card-header">
  18. Horas realizadas por mes
  19. </div>
  20. <div class="card-body">
  21. <table class="table table-sm table-hover">
  22. <thead>
  23. <th>Mes</th>
  24. <th>Horas</th>
  25. </thead>
  26. <tbody>
  27. <?php foreach ($segundosMensuales as $mes) : ?>
  28. <tr>
  29. <td><?= esc($mes['mes']) ?> / <?= esc($mes['ano']) ?></td>
  30. <td><?= esc($mes['segundos']) / 3600 ?></td>
  31. </tr>
  32. <?php endforeach ?>
  33. </tbody>
  34. <tfoot class="table-active">
  35. <td>Total</td>
  36. <td><?= $horasTotales ?></td>
  37. </tfoot>
  38. </table>
  39. <!-- <a data-bs-toggle="collapse" href="#collapseHoras" role="button" aria-expanded="true" aria-controls="collapseHoras">Ver desglose de horas</a> -->
  40. </div>
  41. </div>
  42. </div>
  43. <!-- DESGLOSE DE HORAS -->
  44. <!-- <div class="collapse show" id="collapseHoras"> -->
  45. <div class="col-md-5">
  46. <div class="card">
  47. <div class="card-header">
  48. Desglose por día
  49. </div>
  50. <div class="card-body">
  51. <table id="example" class="table table-striped" style="width:100%" aria-describedby="example_info">
  52. <thead>
  53. <tr>
  54. <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>
  55. <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>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. <?php foreach ($segundosDiarios as $dia) : ?>
  60. <tr>
  61. <td class="sorting_1"><?= sprintf("%02d", esc($dia['dia'])) ?> / <?= sprintf("%02d", esc($dia['mes'])) ?> / <?= esc($dia['ano']) ?></td>
  62. <td><?= esc($dia['total_horas_truncadas']) / 3600 ?>
  63. </tr>
  64. </tr>
  65. <?php endforeach ?>
  66. </tbody>
  67. </table>
  68. </div>
  69. </div>
  70. </div>
  71. <!-- </div> -->
  72. </div>
  73. <script>
  74. document.addEventListener('DOMContentLoaded', function() {
  75. let table = new DataTable('#example', {
  76. 'searching': false,
  77. 'ordering': false,
  78. 'language': {
  79. "lengthMenu": "Mostrar _MENU_ registros",
  80. "info": "Página: _PAGE_ / _PAGES_",
  81. "zeroRecords": "No se encontraron registros",
  82. "paginate": {
  83. "first": "Inicio",
  84. "last": "Fin",
  85. "next": ">",
  86. "previous": "<"
  87. },
  88. },
  89. 'order': [],
  90. });
  91. });
  92. </script>
  93. <?= $this->endSection() ?>