Update dashboard.php
This commit is contained in:
@@ -4,19 +4,12 @@
|
|||||||
* Panel de resumen diario del Turnero.
|
* Panel de resumen diario del Turnero.
|
||||||
* Carga datos vía fetch a get_dashboard.php (permite cambiar fecha sin recargar).
|
* Carga datos vía fetch a get_dashboard.php (permite cambiar fecha sin recargar).
|
||||||
*/
|
*/
|
||||||
require_once __DIR__ . '/../../../config/config.php';
|
require_once APP_ROOT . '/config/config.php';
|
||||||
|
|
||||||
if (!isUserLoggedIn()) { header('Location: ' . BASE_URL . 'login.php'); exit; }
|
if (!isUserLoggedIn()) { header('Location: ' . BASE_URL . 'login.php'); exit; }
|
||||||
|
|
||||||
|
Layout::open('Dashboard Turnero', 'fas fa-chart-bar');
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<style>
|
||||||
<html lang="es">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Dashboard Turnero</title>
|
|
||||||
<link rel="stylesheet" href="<?= BASE_URL ?>assets/css/bootstrap.min.css">
|
|
||||||
<link rel="stylesheet" href="<?= BASE_URL ?>assets/css/fontawesome.min.css">
|
|
||||||
<style>
|
|
||||||
body { background:#f1f5f9; }
|
body { background:#f1f5f9; }
|
||||||
.page-header {
|
.page-header {
|
||||||
background:#fff; border-bottom:1px solid #e2e8f0;
|
background:#fff; border-bottom:1px solid #e2e8f0;
|
||||||
@@ -72,12 +65,10 @@ if (!isUserLoggedIn()) { header('Location: ' . BASE_URL . 'login.php'); exit; }
|
|||||||
/* ── Spinner / empty ── */
|
/* ── Spinner / empty ── */
|
||||||
#loadingOverlay { min-height:180px; display:flex; align-items:center; justify-content:center; }
|
#loadingOverlay { min-height:180px; display:flex; align-items:center; justify-content:center; }
|
||||||
.empty-msg { color:#94a3b8; font-size:.9rem; text-align:center; padding:40px 0; }
|
.empty-msg { color:#94a3b8; font-size:.9rem; text-align:center; padding:40px 0; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<a href="<?= BASE_URL ?>modules/turnero/views/recepcion.php" class="back-btn">
|
<a href="<?= BASE_URL ?>/erp.php?m=turnero&v=recepcion" class="back-btn">
|
||||||
<i class="fas fa-arrow-left me-1"></i>Volver
|
<i class="fas fa-arrow-left me-1"></i>Volver
|
||||||
</a>
|
</a>
|
||||||
<h1><i class="fas fa-chart-bar me-2 text-primary"></i>Dashboard Turnero</h1>
|
<h1><i class="fas fa-chart-bar me-2 text-primary"></i>Dashboard Turnero</h1>
|
||||||
@@ -93,7 +84,7 @@ if (!isUserLoggedIn()) { header('Location: ' . BASE_URL . 'login.php'); exit; }
|
|||||||
<button class="btn btn-outline-secondary btn-sm" onclick="cargarDatos()" title="Refrescar">
|
<button class="btn btn-outline-secondary btn-sm" onclick="cargarDatos()" title="Refrescar">
|
||||||
<i class="fas fa-sync-alt"></i>
|
<i class="fas fa-sync-alt"></i>
|
||||||
</button>
|
</button>
|
||||||
<a href="<?= BASE_URL ?>modules/turnero/views/configuracion.php" class="btn btn-outline-secondary btn-sm">
|
<a href="<?= BASE_URL ?>/erp.php?m=turnero&v=configuracion" class="btn btn-outline-secondary btn-sm">
|
||||||
<i class="fas fa-cogs"></i>
|
<i class="fas fa-cogs"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -156,12 +147,11 @@ if (!isUserLoggedIn()) { header('Location: ' . BASE_URL . 'login.php'); exit; }
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="<?= BASE_URL ?>assets/js/bootstrap.bundle.min.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
/* ═══════════════════════════════════════════════════════════
|
/* ═══════════════════════════════════════════════════════════
|
||||||
Dashboard Turnero
|
Dashboard Turnero
|
||||||
═══════════════════════════════════════════════════════════ */
|
═══════════════════════════════════════════════════════════ */
|
||||||
const API = '<?= BASE_URL ?>modules/turnero/api/';
|
const API = '<?= BASE_URL ?>/modules/turnero/api/';
|
||||||
const BASE_WA = '<?= BASE_URL ?>';
|
const BASE_WA = '<?= BASE_URL ?>';
|
||||||
let _turnos = []; // cache para búsqueda local
|
let _turnos = []; // cache para búsqueda local
|
||||||
let _autoReloadId = null;
|
let _autoReloadId = null;
|
||||||
@@ -370,5 +360,4 @@ function escHtml(str) {
|
|||||||
return d.innerHTML;
|
return d.innerHTML;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
<?php Layout::close(); ?>
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user