Patentes - Agentes Aduanales
This commit is contained in:
@@ -48,6 +48,8 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
$esVistaSeguridad = str_contains($_SERVER['REQUEST_URI'], '/seguridad');
|
||||
// Detecta si estamos en alguna parte de preferencias
|
||||
$esVistaPreferencias = str_contains($_SERVER['REQUEST_URI'], '/preferencias');
|
||||
// Detecta si estamos en alguna parte de automatizaciones
|
||||
$esVistaAutomatizaciones = str_contains($_SERVER['REQUEST_URI'], '/automatizaciones');
|
||||
?>
|
||||
|
||||
<!-- INFORMACIÓN GENERAL -->
|
||||
@@ -57,10 +59,18 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
|
||||
<!-- AUTOMATIZACIONES -->
|
||||
<a href="/IMPORTADORES/configuracion/automatizaciones"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/automatizaciones') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php if ($esVistaAutomatizaciones): ?>
|
||||
<?php $enDashboardAutomatizaciones = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/automatizaciones/index'; ?>
|
||||
<a href="/IMPORTADORES/automatizaciones/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/automatizaciones/index') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php elseif ($esConfiguracion || $esVistaSeguridad || $esVistaPreferencias || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/automatizaciones/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/automatizaciones/index') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PREFERENCIAS -->
|
||||
<?php if ($esVistaPreferencias): ?>
|
||||
@@ -69,7 +79,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
href="<?= $enDashboardPreferencias ? '#submenuPreferencias' : '/IMPORTADORES/preferencias/index' ?>"
|
||||
<?= $enDashboardPreferencias ? 'data-bd-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuPreferencias"
|
||||
onclick="<? $enDashboardPreferenecias ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/preferencias/index\';' ?>">
|
||||
onclick="<? $enDashboardPreferencias ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/preferencias/index\';' ?>">
|
||||
✅ Preferencias
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
@@ -81,7 +91,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras || $esVistaSeguridad): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaSeguridad || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/preferencias/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
✅ Preferencias
|
||||
@@ -108,7 +118,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras || $esVistaPreferencias): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaPreferencias || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
👮 Seguridad
|
||||
@@ -136,7 +146,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaSeguridad || $esVistaPreferencias): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaSeguridad || $esVistaPreferencias): ?>
|
||||
<!-- Si estamos en configuración, pero no en bitácoras -->
|
||||
<a href="/IMPORTADORES/bitacoras/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
@@ -150,19 +160,31 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
|
||||
<!-- OFFCANVAS PARA MÓVILES -->
|
||||
<div class="offcanvas offcanvas-start d-md-none" tabindex="-1" id="sidebarMenu" style="top: 56px;">
|
||||
<div class="offcanvas-header">
|
||||
<h5 class="offcanvas-title">Menú</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas"></button>
|
||||
</div>
|
||||
<div class="offcanvas-body">
|
||||
|
||||
<!-- INFORMACIÓN GENERAL -->
|
||||
<a href="/IMPORTADORES/configuracion/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/dashboard_configuracion') ? 'active' : '' ?>">
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/index') ? 'active' : '' ?>">
|
||||
ℹ️ Información General
|
||||
</a>
|
||||
|
||||
<!-- AUTOMATIZACIONES -->
|
||||
<a href="/IMPORTADORES/configuracion/automatizaciones"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/configuracion/automatizaciones') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php if ($esVistaAutomatizaciones): ?>
|
||||
<?php $enDashboardAutomatizaciones = $_SERVER['REQUEST_URI'] === '/IMPORTADORES/automatizaciones/index'; ?>
|
||||
<a href="/IMPORTADORES/automatizaciones/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/automatizaciones/index') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php elseif ($esConfiguracion || $esVistaSeguridad || $esVistaPreferencias || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/automatizaciones/index"
|
||||
class="nav-link px-3 py-2 <?= str_contains($_SERVER['REQUEST_URI'], '/automatizaciones/index') ? 'active' : '' ?>">
|
||||
⚙️ Automatizaciones
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- PREFERENCIAS -->
|
||||
<?php if ($esVistaPreferencias): ?>
|
||||
@@ -171,7 +193,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
href="<?= $enDashboardPreferencias ? '#submenuPreferencias' : '/IMPORTADORES/preferencias/index' ?>"
|
||||
<?= $enDashboardPreferencias ? 'data-bd-toggle="collapse"' : '' ?>
|
||||
role="button" aria-expanded="true" aria-controls="submenuPreferencias"
|
||||
onclick="<? $enDashboardPreferenecias ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/preferencias/index\';' ?>">
|
||||
onclick="<? $enDashboardPreferencias ? '' : 'event.preventDefault(); window.location.href = \'/IMPORTADORES/preferencias/index\';' ?>">
|
||||
✅ Preferencias
|
||||
<span class="badge bg-secondary">1</span>
|
||||
</a>
|
||||
@@ -183,7 +205,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras || $esVistaSeguridad): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaSeguridad || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/preferencias/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
✅ Preferencias
|
||||
@@ -210,7 +232,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaBitacoras || $esVistaPreferencias): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaPreferencias || $esVistaBitacoras): ?>
|
||||
<a href="/IMPORTADORES/seguridad/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
👮 Seguridad
|
||||
@@ -238,7 +260,7 @@ if (!isset($_SESSION['usuario_id']) || $_SESSION['tipo_usuario'] !== 'importador
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
<?php elseif ($esConfiguracion || $esVistaSeguridad || $esVistaPreferencias): ?>
|
||||
<?php elseif ($esConfiguracion || $esVistaAutomatizaciones || $esVistaPreferencias || $esVistaSeguridad): ?>
|
||||
<!-- Si estamos en configuración, pero no en bitácoras -->
|
||||
<a href="/IMPORTADORES/bitacoras/index"
|
||||
class="nav-link px-3 py-2 d-flex justify-content-between align-items-center">
|
||||
|
||||
Reference in New Issue
Block a user