Responsividad de tablas
This commit is contained in:
@@ -10,6 +10,9 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table.dataTable thead th { background: #343a40; color: #fff; }
|
table.dataTable thead th { background: #343a40; color: #fff; }
|
||||||
@@ -86,6 +89,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>🚛 Mis Choferes</h4>
|
<h4>🚛 Mis Choferes</h4>
|
||||||
<a href="/IMPORTADORES/choferes/crear" class="btn btn-success mb-3">➕ Nuevo Chofer</a>
|
<a href="/IMPORTADORES/choferes/crear" class="btn btn-success mb-3">➕ Nuevo Chofer</a>
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-striped" id="tabla-choferes">
|
<table class="table table-striped" id="tabla-choferes">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -126,6 +130,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function confirmDeleteChofer(id) {
|
function confirmDeleteChofer(id) {
|
||||||
@@ -143,6 +148,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#tabla-choferes').DataTable({
|
||||||
|
language: {
|
||||||
|
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/es-ES.json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
<?php if(isset($_GET['deleted'])): ?>
|
<?php if(isset($_GET['deleted'])): ?>
|
||||||
Swal.fire('¡Hecho!','Chofer eliminado.','success');
|
Swal.fire('¡Hecho!','Chofer eliminado.','success');
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ header("X-Frame-Options: DENY");
|
|||||||
header("X-Content-Type-Options: nosniff");
|
header("X-Content-Type-Options: nosniff");
|
||||||
header("X-XSS-Protection: 1; mode=block");
|
header("X-XSS-Protection: 1; mode=block");
|
||||||
header("Referrer-Policy: no-referrer");
|
header("Referrer-Policy: no-referrer");
|
||||||
header("Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; script-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; img-src 'self' data:;");
|
header("Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src 'self' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; img-src 'self' data:; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com;");
|
||||||
|
|
||||||
$sql = "SELECT TOP 1 * FROM configuracion_sistema";
|
$sql = "SELECT TOP 1 * FROM configuracion_sistema";
|
||||||
$stmt = sqlsrv_prepare($conn, $sql);
|
$stmt = sqlsrv_prepare($conn, $sql);
|
||||||
if (!$stmt || !sqlsrv_execute($stmt)) {
|
if (!$stmt || !sqlsrv_execute($stmt)) {
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ $mensajeMantenimiento = $config['mensaje_mantenimiento'] ?? 'El sistema se encue
|
|||||||
<form action="/IMPORTADORES/login/validar" method="POST">
|
<form action="/IMPORTADORES/login/validar" method="POST">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Correo electrónico</label>
|
<label class="form-label">Correo electrónico</label>
|
||||||
<input type="email" name="email" class="form-control" required>
|
<input type="email" name="email" class="form-control" required autocomplete="username" value="">
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Contraseña</label>
|
<label class="form-label">Contraseña</label>
|
||||||
<input type="password" name="password" class="form-control" required>
|
<input type="password" name="password" class="form-control" required autocomplete="current-password" value="">
|
||||||
</div>
|
</div>
|
||||||
<div class="d-grid">
|
<div class="d-grid">
|
||||||
<button type="submit" class="btn btn-primary">Iniciar sesión</button>
|
<button type="submit" class="btn btn-primary">Iniciar sesión</button>
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table.dataTable thead th { background: #343a40; color: #fff; }
|
table.dataTable thead th { background: #343a40; color: #fff; }
|
||||||
body { font-family: 'Segoe UI', sans-serif; background-color: #f4f6f9; }
|
body { font-family: 'Segoe UI', sans-serif; background-color: #f4f6f9; }
|
||||||
@@ -79,6 +82,7 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>📄 Solicitudes de Importación</h4>
|
<h4>📄 Solicitudes de Importación</h4>
|
||||||
<a href="/IMPORTADORES/solicitud_importacion/crear" class="btn btn-success mb-3">➕ Nueva Solicitud</a>
|
<a href="/IMPORTADORES/solicitud_importacion/crear" class="btn btn-success mb-3">➕ Nueva Solicitud</a>
|
||||||
|
<div class="table-responsive">
|
||||||
<table class="table table-striped" id="tabla-solicitudes">
|
<table class="table table-striped" id="tabla-solicitudes">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -134,6 +138,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function confirmDelete(id) {
|
function confirmDelete(id) {
|
||||||
@@ -151,6 +156,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#tabla-solicitudes').DataTable({
|
||||||
|
language: {
|
||||||
|
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/es-ES.json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
<?php if(isset($_GET['deleted'])): ?>
|
<?php if(isset($_GET['deleted'])): ?>
|
||||||
Swal.fire('¡Hecho!','Solicitud eliminada.','success');
|
Swal.fire('¡Hecho!','Solicitud eliminada.','success');
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
table.dataTable thead th { background:#343a40; color:#fff; }
|
table.dataTable thead th { background:#343a40; color:#fff; }
|
||||||
@@ -86,7 +88,8 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<h4>🚚 Mis Transportes</h4>
|
<h4>🚚 Mis Transportes</h4>
|
||||||
<a href="/IMPORTADORES/transportes/crear" class="btn btn-success mb-3">➕ Nuevo Transporte</a>
|
<a href="/IMPORTADORES/transportes/crear" class="btn btn-success mb-3">➕ Nuevo Transporte</a>
|
||||||
<table class="table table-striped">
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped" id="tabla-transportes">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>#</th><th>Vehículo</th><th>Ident. Fiscal</th>
|
<th>#</th><th>Vehículo</th><th>Ident. Fiscal</th>
|
||||||
@@ -120,6 +123,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function confirmDelete(id) {
|
function confirmDelete(id) {
|
||||||
@@ -137,6 +141,15 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('#tabla-transportes').DataTable({
|
||||||
|
language: {
|
||||||
|
url: '//cdn.datatables.net/plug-ins/1.13.4/i18n/es-ES.json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
<?php if(isset($_GET['deleted'])): ?>
|
<?php if(isset($_GET['deleted'])): ?>
|
||||||
Swal.fire('¡Hecho!','Transporte eliminado.','success');
|
Swal.fire('¡Hecho!','Transporte eliminado.','success');
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Al principio de la vista, inicia sesión para leer los errores
|
// Al principio de la vista, inicia sesión para leer los errores
|
||||||
|
if (session_status() === PHP_SESSION_NONE) {
|
||||||
session_start();
|
session_start();
|
||||||
|
}
|
||||||
$errors = $_SESSION['import_errors'] ?? [];
|
$errors = $_SESSION['import_errors'] ?? [];
|
||||||
$success = $_SESSION['import_success'] ?? false;
|
$success = $_SESSION['import_success'] ?? false;
|
||||||
// Limpiar para que no se repitan
|
|
||||||
unset($_SESSION['import_errors'], $_SESSION['import_success']);
|
unset($_SESSION['import_errors'], $_SESSION['import_success']);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<h4 class="mb-4">🚚 Mis Transportistas</h4>
|
<h4 class="mb-4">🚚 Mis Transportistas</h4>
|
||||||
<div class="card p-3 shadow-sm">
|
<div class="card p-3 shadow-sm">
|
||||||
|
<div class="table-responsive">
|
||||||
<table id="transportistas-table" class="display nowrap" style="width:100%">
|
<table id="transportistas-table" class="display nowrap" style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -107,6 +108,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- jQuery -->
|
<!-- jQuery -->
|
||||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||||
@@ -153,8 +155,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function confirmDelete(id) {
|
function confirmDelete(id) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: '¿Eliminar transportista?',
|
title: '¿Eliminar transportista?',
|
||||||
@@ -181,7 +181,6 @@ Swal.fire({
|
|||||||
});
|
});
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user