Patente y Locaciones desde admin_agencia
This commit is contained in:
@@ -16,9 +16,15 @@
|
||||
.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; }
|
||||
.navbar { position: fixed; top: 0; width: 100%; z-index: 1050; }
|
||||
.btn-orange { background-color: orangeRed; color: white;}
|
||||
.btn-orange:hover { background-color: #ff3600; color: white;}
|
||||
.text-orange { color: orangeRed;}
|
||||
.btn-indigo { background-color: #6610f2; color: white; }
|
||||
.btn-indigo:hover { background-color: #520dc2; color: white; }
|
||||
.text-indigo { color: #520dc2; }
|
||||
.btn-orange { background-color: orangeRed; color: white; }
|
||||
.btn-orange:hover { background-color: #ff3600; color: white; }
|
||||
.text-orange { color: orangeRed; }
|
||||
.btn-teal { background-color: #20c997; color: white; }
|
||||
.btn-teal:hover { background-color: #4dd4ac; color: black; }
|
||||
.text-teal { color: #20c997; }
|
||||
/* A partir de dispositivos medianos (>=768px), deja espacio lateral */
|
||||
@media (min-width: 768px) { .content { margin-left: 250px; /* Ancho del sidebar */ } }
|
||||
/* En móviles, sin margen lateral */
|
||||
@@ -71,6 +77,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-3">
|
||||
<h5 class="text-indigo">Patentes</h5>
|
||||
<p>Gestiona las patentes de la agencia.</p>
|
||||
<a href="/IMPORTADORES/patente/dashboard"
|
||||
class="btn btn-indigo btn-sm mt-2 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/patente/dashboard' ? 'active' : '' ?>">
|
||||
Ver agentes
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-3">
|
||||
<h5 class="text-warning">Configuración</h5>
|
||||
@@ -82,6 +99,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-3">
|
||||
<h5 class="text-orange">Locaciones</h5>
|
||||
<p>Gestiona la locaciones validas para nuevos registros.</p>
|
||||
<a href="/IMPORTADORES/locaciones/lista"
|
||||
class="btn btn-orange btn-sm mt-2 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/locaciones/lista' ? 'active' : '' ?>">
|
||||
Gestionar locaciones
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="card shadow-sm p-3">
|
||||
<h5 class="text-danger">Cerrar sesión</h5>
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
@@ -36,6 +36,17 @@
|
||||
<div class="d-none d-md-block bg-dark text-white position-fixed h-100 pt-5" style="width: 250px;">
|
||||
<nav class="nav flex-column">
|
||||
|
||||
<?php
|
||||
// Detecta si estamos en alguna parte de locaciones
|
||||
$esVistaLocaciones = str_contains($_SERVER['REQUEST_URI'], '/locaciones');
|
||||
// Detecta si estamos en alguna parte de agentes
|
||||
$esVistaAdmin = str_contains($_SERVER['REQUEST_URI'], '/agencias');
|
||||
// Detecta si estamos en alguna parte de agente aduanal
|
||||
$esVistaPatente = str_contains($_SERVER['REQUEST_URI'], '/patente');
|
||||
// Detecta si estamos en alguna parte de vinculación
|
||||
$esVistaVinculacion = str_contains($_SERVER['REQUEST_URI'], '/vinculaciones');
|
||||
?>
|
||||
|
||||
<!-- INICIO -->
|
||||
<a href="/IMPORTADORES/agencias/dashboard"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/agencias/dashboard') ? 'active' : '' ?>">
|
||||
@@ -54,6 +65,68 @@
|
||||
👥 Usuarios Vinculados
|
||||
</a>
|
||||
|
||||
<!-- PATENTES -->
|
||||
<?php if ($esVistaPatente): ?>
|
||||
<?php $enDashboardPatente = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/patente/dashboard'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaPatente ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardPatente ? '#submenuAgentesAduanales' : 'IMPORTADORES/patente/dashboard' ?>"
|
||||
<?= $enDashboardPatente ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuAgentesAduanales"
|
||||
onclick="<?= $enDashboardPatente ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/patente/dashboard\';' ?>">
|
||||
📑 Patentes
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuAgentesAduanales">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/patente/lista"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/patente/lista' ? 'active' : '' ?>">
|
||||
• Ver Patentes
|
||||
</a>
|
||||
<a href="/IMPORTADORES/patente/alta"
|
||||
class="nav-link px-3 py-1 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/patente/alta') ? 'active' : '' ?>">
|
||||
• Nueva Patente
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esVistaAdmin || $esVistaLocaciones || $esVistaVinculacion): ?>
|
||||
<a href="/IMPORTADORES/patente/dashboard"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
📑 Patentes
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- LOCACIONES -->
|
||||
<?php if ($esVistaLocaciones): ?>
|
||||
<?php $enDashboardLocaciones = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/locaciones/lista'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaLocaciones ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardLocaciones ? '#submenuLocaciones' : '/IMPORTADORES/locaciones/lista' ?>"
|
||||
<?= $enDashboardLocaciones ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuLocaciones"
|
||||
onclick="<?= $enDashboardLocaciones ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/locaciones/lista\';' ?>">
|
||||
🗺️ Locaciones
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuLocaciones">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/locaciones/lista"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/locaciones/lista' ? 'active' : '' ?>">
|
||||
• Ver Locaciones
|
||||
</a>
|
||||
<a href="/IMPORTADORES/locaciones/alta"
|
||||
class="nav-link px-3 py-1 <?= str_contains($_SERVER['REQUEST_URI'], '/locaciones/alta') ? 'active' : '' ?>">
|
||||
• Agregar Locaciones
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esVistaAdmin || $esVistaPatente || $esVistaVinculacion): ?>
|
||||
<a href="/IMPORTADORES/locaciones/lista"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
🗺️ Locaciones
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ALTA DE AGENTES -->
|
||||
<a href="/IMPORTADORES/agencias/alta"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/agencias/alta') ? 'active' : '' ?>">
|
||||
@@ -84,17 +157,79 @@
|
||||
</a>
|
||||
|
||||
<!-- SOLICITUDES VINCULACIÓN -->
|
||||
<a href="/IMPORTADORES/agencias/solicitudesVinculacion"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/agencias/solicitudesVinculacion') ? 'active' : '' ?>">
|
||||
<a href="/IMPORTADORES/vinculaciones/solicitudesVinculacion"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/vinculaciones/solicitudesVinculacion') ? 'active' : '' ?>">
|
||||
🔗 Vinculación
|
||||
</a>
|
||||
|
||||
<!-- USUARIOS ACTIVOS -->
|
||||
<a href="/IMPORTADORES/vinculaciones/vinculacionesAgencia"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/vinculaciones/vinculacionesAgencia') ? 'active' : '' ?>">
|
||||
✅ Usuarios Vinculados
|
||||
👥 Usuarios Vinculados
|
||||
</a>
|
||||
|
||||
<!-- PATENTES -->
|
||||
<?php if ($esVistaPatente): ?>
|
||||
<?php $enDashboardPatente = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/patente/dashboard'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaPatente ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardPatente ? '#submenuAgentesAduanales' : 'IMPORTADORES/patente/dashboard' ?>"
|
||||
<?= $enDashboardPatente ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuAgentesAduanales"
|
||||
onclick="<?= $enDashboardPatente ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/patente/dashboard\';' ?>">
|
||||
📑 Patentes
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuAgentesAduanales">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/patente/lista"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/patente/lista' ? 'active' : '' ?>">
|
||||
• Ver Patentes
|
||||
</a>
|
||||
<a href="/IMPORTADORES/patente/alta"
|
||||
class="nav-link px-3 py-1 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/patente/alta') ? 'active' : '' ?>">
|
||||
• Nueva Patente
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esVistaAdmin || $esVistaLocaciones || $esVistaVinculacion): ?>
|
||||
<a href="/IMPORTADORES/patente/dashboard"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
📑 Patentes
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- LOCACIONES -->
|
||||
<?php if ($esVistaLocaciones): ?>
|
||||
<?php $enDashboardLocaciones = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/locaciones/lista'; ?>
|
||||
<a class="nav-link px-3 py-2 d-flex justify-content-between align-items-center <?= $esVistaLocaciones ? 'active' : '' ?>"
|
||||
href="<?= $enDashboardLocaciones ? '#submenuLocaciones' : '/IMPORTADORES/locaciones/lista' ?>"
|
||||
<?= $enDashboardLocaciones ? 'data-bs-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuLocaciones"
|
||||
onclick="<?= $enDashboardLocaciones ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/locaciones/lista\';' ?>">
|
||||
🗺️ Locaciones
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<div class="collapse show" id="submenuLocaciones">
|
||||
<nav class="nav flex-column ms-3">
|
||||
<a href="/IMPORTADORES/locaciones/lista"
|
||||
class="nav-link px-3 py-1 <?= $_SERVER['REQUEST_URI'] === '/IMPORTADORES/locaciones/lista' ? 'active' : '' ?>">
|
||||
• Ver Locaciones
|
||||
</a>
|
||||
<a href="/IMPORTADORES/locaciones/alta"
|
||||
class="nav-link px-3 py-1 <?= str_contains($_SERVER['REQUEST_URI'], '/locaciones/alta') ? 'active' : '' ?>">
|
||||
• Agregar Locaciones
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esVistaAdmin || $esVistaPatente || $esVistaVinculacion): ?>
|
||||
<a href="/IMPORTADORES/locaciones/lista"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
🗺️ Locaciones
|
||||
<span class="badge bg-secondary">2</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ALTA DE AGENTES -->
|
||||
<a href="/IMPORTADORES/agencias/alta"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/IMPORTADORES/agencias/alta') ? 'active' : '' ?>">
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
<?php include __DIR__ . '/../partials/sidebar_agente.php'; ?>
|
||||
<?php
|
||||
$tipoUsuario = $_SESSION['tipo_usuario'] ?? null;
|
||||
|
||||
if ($tipoUsuario === 'agente_aduanal') {
|
||||
include __DIR__ . '/../partials/sidebar_agente.php';
|
||||
} elseif ($tipoUsuario === 'admin_agencia') {
|
||||
include __DIR__ . '/../partials/sidebar_agencia.php';
|
||||
} else {
|
||||
// Sidebar por defecto o error
|
||||
echo "<!-- ⚠️ No se encontró sidebar para el tipo de usuario -->";
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
Reference in New Issue
Block a user