File "historico.php"
Full Path: C:/wamp64/www/casos_medicos1/views/historico.php
File size: 7.24 KB
MIME-type: text/html
Charset: utf-8
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Histórico de Ausentismos</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style>
:root {
--verde-principal: #2d7a2e;
--verde-oscuro: #1f5a20;
--verde-claro: #e6f4ea;
--verde-hover: #eaf6ea;
--gris-fondo: #f5f7f5;
--gris-borde: #dfe4df;
--gris-texto: #3d473d;
--white: #ffffff;
--shadow-soft: 0 3px 8px rgba(0, 0, 0, 0.08);
}
body {
background: var(--gris-fondo);
font-family: "Inter", "Segoe UI", sans-serif;
color: var(--gris-texto);
line-height: 1.5;
}
.titulo-box {
background: var(--verde-principal);
color: var(--white);
padding: 14px 22px;
border-radius: 12px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: var(--shadow-soft);
}
.btn-volver {
background: var(--white);
color: var(--verde-principal);
font-weight: 600;
border-radius: 40px;
padding: 7px 18px;
border: 2px solid var(--white);
transition: 0.25s ease;
}
.btn-volver:hover {
background: var(--verde-hover);
color: var(--verde-oscuro);
border-color: var(--verde-hover);
}
.card-resumen {
border-radius: 12px;
background: var(--white);
padding: 20px;
box-shadow: var(--shadow-soft);
border-left: 6px solid var(--verde-principal);
width: 260px;
transition: transform 0.25s ease;
}
.card-resumen:hover {
transform: translateY(-3px);
}
.table thead th {
background: var(--verde-claro) !important;
color: var(--verde-oscuro) !important;
font-weight: 600;
border-bottom: 2px solid var(--verde-principal) !important;
}
.table tbody tr:hover {
background: #f0f5f0 !important;
}
.anexos-panel {
border: 1px solid var(--gris-borde);
border-radius: 8px;
background: #fff;
box-shadow: var(--shadow-soft);
}
.anexos-panel .panel-head {
padding: 10px 14px;
border-bottom: 1px solid var(--gris-borde);
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 600;
background: var(--verde-claro);
border-radius: 8px 8px 0 0;
}
.anexos-panel .panel-body {
padding: 14px;
}
</style>
</head>
<body>
<div class="container-fluid py-3">
<div class="titulo-box">
<h4 class="m-0">
<i class="bi bi-collection"></i> Detalle General de Ausentismos
</h4>
<a href="index.php?url=casosMedicos/index" class="btn btn-volver">
<i class="bi bi-arrow-left-circle"></i> Volver
</a>
</div>
<!-- Tarjeta resumen -->
<div class="card-resumen mb-4">
<h6 class="text-success mb-1">
<i class="bi bi-bar-chart-line"></i> Total registros
</h6>
<div class="fs-3 fw-bold text-dark">
<?= number_format($total_registros) ?>
</div>
</div>
<!-- FILTROS -->
<form class="row g-2 mb-4">
<div class="col-auto">
<input type="text" name="cedula" placeholder="Cédula"
value="<?= htmlspecialchars($filtros['cedula']) ?>"
class="form-control form-control-sm">
</div>
<div class="col-auto">
<input type="text" name="empresa" placeholder="Empresa"
value="<?= htmlspecialchars($filtros['empresa'] ?? '') ?>"
class="form-control form-control-sm">
</div>
<div class="col-auto">
<input type="date" name="fecha_inicio"
value="<?= htmlspecialchars($filtros['fecha_inicio']) ?>"
class="form-control form-control-sm">
</div>
<div class="col-auto">
<input type="date" name="fecha_fin"
value="<?= htmlspecialchars($filtros['fecha_fin']) ?>"
class="form-control form-control-sm">
</div>
<div class="col-auto">
<button class="btn btn-sm btn-success"><i class="bi bi-search"></i>Filtrar</button>
<a href="index.php?url=historico/index" class="btn btn-sm btn-secondary"><i class="bi bi-eraser"></i>Limpiar</a>
</div>
</form>
<!-- TABLA -->
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>Cédula</th>
<th>Empresa</th>
<th>Fecha Registro</th>
<th>Fecha Inicio</th>
<th>Fecha Fin</th>
<th>Días</th>
<th>Tipo</th>
<th>EPS</th>
<th>Diagnóstico</th>
<th>Anexos</th>
</tr>
</thead>
<tbody>
<?php if (empty($registros)): ?>
<tr>
<td colspan="11" class="text-center text-muted">No hay registros</td>
</tr>
<?php else: ?>
<?php foreach ($registros as $row): ?>
<tr>
<td><?= $row['id'] ?></td>
<td><?= $row['cedula'] ?></td>
<td></td>
<td><?= $row['fecha_registro'] ?></td>
<td><?= $row['fecha_inicio'] ?></td>
<td><?= $row['fecha_fin'] ?></td>
<td><?= $row['dias'] ?></td>
<td><?= $row['tipo_incapacidad'] ?></td>
<td><?= $row['eps'] ?></td>
<td></td>
<td>
<!-- Aquí copiaríamos el mismo componente de anexos -->
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</body>
</html>