Preparando proyecto para migración a repositorio MVE
This commit is contained in:
@@ -9,92 +9,142 @@
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<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/sweetalert2@11"></script>
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
||||
<!-- Animate.css para animaciones adicionales -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css">
|
||||
<style>
|
||||
body { font-family: 'Segoe UI', sans-serif; background-color: #f4f6f9; }
|
||||
.sidebar { width: 220px; height: 100vh; background-color: #343a40; position: fixed; top: 0; left: 0; padding-top: 56px; z-index: 1040; }
|
||||
.sidebar .nav-link { font-weight: bold; color: white; transition: all 0.3s ease; }
|
||||
.sidebar .nav-link:hover, .sidebar .nav-link.active { background-color: #495057; color: #fff; }
|
||||
.content { margin-top: 56px; padding: 40px 20px; position: relative; z-index: 1; background-color: #f4f6f9; transition: margin-left 0.3s ease; }
|
||||
@media (min-width: 768px) { .content { margin-left: 250px; } }
|
||||
@media (max-width: 767.98px) {
|
||||
.content { margin-left: 0; }
|
||||
.sidebar .nav-link { font-weight: normal; color: #343a40; background-color: transparent; }
|
||||
.sidebar .nav-link:hover, .sidebar .nav-link.active { background-color: #e9ecef; color: #212529; }
|
||||
}
|
||||
.card { border-radius: 12px; }
|
||||
/* Animaciones personalizadas */
|
||||
.card-hover { transition: all 0.3s ease; cursor: pointer; }
|
||||
.card-hover:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15) !important; }
|
||||
.btn-pulse { animation: pulse 2s infinite; }
|
||||
@keyframes pulse {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(1.05); }
|
||||
100% { transform: scale(1); }
|
||||
}
|
||||
.fade-in-up { animation: fadeInUp 0.8s ease-out; }
|
||||
@keyframes fadeInUp {
|
||||
from { opacity: 0; transform: translateY(30px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
/* Responsive animations */
|
||||
@media (max-width: 768px) { .card-hover:hover { transform: translateY(-4px) scale(1.01); } }
|
||||
/* Efecto de glow para elementos activos */
|
||||
.btn.active { box-shadow: 0 0 20px rgba(var(--bs-primary-rgb), 0.5); }
|
||||
/* Animación para el título */
|
||||
.title-glow { text-shadow: 0 0 10px rgba(0, 123, 255, 0.3); }
|
||||
/* Efecto para botones */
|
||||
.btn-animated { transition: all 0.3s ease; position: relative; overflow: hidden; }
|
||||
.btn-animated:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); }
|
||||
.btn-animated::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.5s; }
|
||||
.btn-animated:hover::before { left: 100%; }
|
||||
.table th, .table td { vertical-align: middle; }
|
||||
.folder-icon { color: #f0ad4e; font-size: 1.2rem; }
|
||||
body { font-family: 'Segoe UI', sans-serif; background-color: #f6f8fb; }
|
||||
.content { margin-top: 56px; padding: 32px 20px; background-color: #f6f8fb; }
|
||||
@media (min-width: 768px) { .content { margin-left: var(--sidebar-width, 280px); } }
|
||||
.title { font-weight: 700; }
|
||||
.kpi-card { border: 1px solid #e9ecef; border-radius: 12px; background: #fff; }
|
||||
.kpi-value { font-size: 1.25rem; font-weight: 700; }
|
||||
.search-wrap { gap: .75rem; }
|
||||
.card-exp { border: 1px solid #eef1f5; border-radius: 14px; transition: box-shadow .2s ease, transform .2s ease; }
|
||||
.card-exp:hover { box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08); transform: translateY(-2px); }
|
||||
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .5rem; border-radius: 999px; font-size: .78rem; border: 1px solid #e5e7eb; background: #f8fafc; color: #334155; }
|
||||
.chip i { font-size: .85rem; }
|
||||
.muted { color: #6b7280; }
|
||||
.ped-code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; letter-spacing: .5px; }
|
||||
.actions .btn { border-radius: 10px; }
|
||||
.empty-state { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 32px; background: #fff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="content">
|
||||
<h4 class="mb-4 animate__animated animate__fadeInDown title_glow">📁 Expedientes Electrónicos</h4>
|
||||
<div class="card p-3 shadow-sm card-hover position-relative h-auto fade-in-up">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-bordered">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Pedimento</th>
|
||||
<th>Fecha Factura</th>
|
||||
<th>Aduana</th>
|
||||
<th>Proveedor</th>
|
||||
<th>Archivos</th>
|
||||
<th>Tamaño Total</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($expedientes as $exp): ?>
|
||||
<tr>
|
||||
<td><i class="fas fa-folder folder-icon me-2"></i><?= htmlspecialchars($exp['numero_pedimento']) ?></td>
|
||||
<td><?= is_a($exp['fecha_factura'], 'DateTime') ? $exp['fecha_factura']->format('Y-m-d') : htmlspecialchars($exp['fecha_factura']) ?></td>
|
||||
<?php
|
||||
$totalPed = count($expedientes ?? []);
|
||||
$totalArch = 0; $totalSize = 0;
|
||||
foreach(($expedientes ?? []) as $e){ $totalArch += (int)($e['total_archivos'] ?? 0); $totalSize += (float)($e['total_tamano'] ?? 0); }
|
||||
?>
|
||||
|
||||
<td><?= htmlspecialchars($exp['aduana']) ?></td>
|
||||
<td><?= htmlspecialchars($exp['proveedor_clave']) ?></td>
|
||||
<td><?= $exp['total_archivos'] ?> archivos</td>
|
||||
<td><?= number_format($exp['total_tamano'], 2) ?> KB</td>
|
||||
<td>
|
||||
<a href="/IMPORTADORES/expediente/ver/<?= $exp['id_solicitud'] ?>" class="btn btn-outline-primary btn-sm mt-auto w-auto btn-animated">📂 Ver</a>
|
||||
<a href="/IMPORTADORES/expediente/subir/<?= $exp['id_solicitud'] ?>" class="btn btn-outline-success btn-sm mt-auto w-auto btn-animated">⬆ Subir</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="content">
|
||||
<div class="d-flex flex-wrap align-items-end justify-content-between mb-3">
|
||||
<div>
|
||||
<h3 class="title mb-1">📁 Expediente electrónico</h3>
|
||||
<div class="text-muted">Consulta y organiza los documentos por pedimento</div>
|
||||
</div>
|
||||
<div class="search-wrap d-flex align-items-center">
|
||||
<input id="searchExp" type="search" class="form-control" placeholder="Buscar pedimento, proveedor o aduana">
|
||||
<select id="filterArch" class="form-select">
|
||||
<option value="all">Todos</option>
|
||||
<option value="with">Con archivos</option>
|
||||
<option value="without">Sin archivos</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="kpi-card p-3">
|
||||
<div class="muted">Pedimentos</div>
|
||||
<div class="kpi-value"><?= (int)$totalPed ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3">
|
||||
<div class="kpi-card p-3">
|
||||
<div class="muted">Archivos</div>
|
||||
<div class="kpi-value"><?= (int)$totalArch ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="kpi-card p-3 d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<div class="muted">Tamaño total</div>
|
||||
<div class="kpi-value"><?= number_format($totalSize, 2) ?> KB</div>
|
||||
</div>
|
||||
<div class="text-muted small">Incluye todos los archivos subidos a los pedimentos</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (empty($expedientes)): ?>
|
||||
<div class="empty-state text-center">
|
||||
<div class="mb-2">Aún no hay pedimentos listados.</div>
|
||||
<div class="text-muted">Cuando importes pedimentos, podrás cargar y consultar documentos desde aquí.</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="row" id="gridExp">
|
||||
<?php foreach ($expedientes as $exp):
|
||||
$ff = $exp['fecha_factura'] ?? null;
|
||||
$fecha = '-';
|
||||
if ($ff instanceof DateTime) { $fecha = $ff->format('Y-m-d'); }
|
||||
else if (is_array($ff) && isset($ff['date'])) { $fecha = substr($ff['date'],0,10); }
|
||||
elseif ($ff) { $fecha = htmlspecialchars((string)$ff); }
|
||||
$archCount = (int)($exp['total_archivos'] ?? 0);
|
||||
$hasFiles = $archCount > 0;
|
||||
?>
|
||||
<div class="col-12 col-md-6 col-xl-4 exp-card"
|
||||
data-key="<?= htmlspecialchars(($exp['pedimento_display'] ?? $exp['numero_pedimento'] ?? '').' '.($exp['proveedor'] ?? '').' '.($exp['aduana'] ?? '')) ?>"
|
||||
data-files="<?= $hasFiles ? 'with' : 'without' ?>">
|
||||
<div class="card-exp bg-white p-3 h-100">
|
||||
<div class="d-flex align-items-center justify-content-between mb-2">
|
||||
<div class="ped-code h5 mb-0"><?= htmlspecialchars($exp['pedimento_display'] ?? ($exp['numero_pedimento'] ?? '')) ?></div>
|
||||
<span class="chip <?= $hasFiles ? 'border-success text-success' : ''?>">
|
||||
<i class="fa-solid fa-paperclip"></i><?= $archCount ?> archivos
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 mb-2">
|
||||
<span class="chip"><i class="fa-solid fa-user-tie"></i><?= htmlspecialchars($exp['proveedor'] ?? '-') ?></span>
|
||||
<span class="chip"><i class="fa-regular fa-calendar"></i><?= $fecha ?></span>
|
||||
<span class="chip"><i class="fa-solid fa-warehouse"></i><?= htmlspecialchars($exp['aduana'] ?? '-') ?></span>
|
||||
<span class="chip"><i class="fa-id-badge"></i><?= htmlspecialchars($exp['patente'] ?? '-') ?></span>
|
||||
</div>
|
||||
<div class="muted small mb-3">Tamaño: <?= number_format((float)($exp['total_tamano'] ?? 0), 2) ?> KB</div>
|
||||
<div class="actions d-flex gap-2">
|
||||
<a href="/IMPORTADORES/expediente/ver_pedimento/<?= (int)$exp['pedimento_id'] ?>" class="btn btn-outline-primary btn-sm flex-fill">
|
||||
<i class="fa-regular fa-folder-open me-1"></i> Ver expediente
|
||||
</a>
|
||||
<a href="/IMPORTADORES/expediente/subir_pedimento/<?= (int)$exp['pedimento_id'] ?>" class="btn btn-outline-success btn-sm">
|
||||
<i class="fa-solid fa-upload"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
const q = document.getElementById('searchExp');
|
||||
const f = document.getElementById('filterArch');
|
||||
const cards = Array.from(document.querySelectorAll('#gridExp .exp-card'));
|
||||
function apply(){
|
||||
const term = (q?.value || '').toLowerCase();
|
||||
const filt = f?.value || 'all';
|
||||
cards.forEach(c => {
|
||||
const key = (c.getAttribute('data-key')||'').toLowerCase();
|
||||
const has = c.getAttribute('data-files');
|
||||
const match = !term || key.includes(term);
|
||||
const byFiles = (filt==='all') || (filt==='with' && has==='with') || (filt==='without' && has==='without');
|
||||
c.style.display = (match && byFiles) ? '' : 'none';
|
||||
});
|
||||
}
|
||||
q?.addEventListener('input', apply);
|
||||
f?.addEventListener('change', apply);
|
||||
apply();
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user