This commit is contained in:
2026-04-22 22:54:26 +02:00
parent cd1ea4a9db
commit c73b2fe9f6
26 changed files with 1377 additions and 34 deletions

View File

@@ -127,8 +127,23 @@
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'printing' ? ' is-active' : '' ?>" href="/settings/printing">
Drukowanie
</a>
<?php
$dsmUnmappedCount = 0;
try {
$appInstance = \App\Core\Application::instance();
if ($appInstance !== null) {
$dsmRepo = new \App\Modules\Shipments\DeliveryStatusMappingRepository($appInstance->db());
$dsmUnmappedCount = $dsmRepo->countAllUnmappedForBadge();
}
} catch (\Throwable) {
$dsmUnmappedCount = 0;
}
?>
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'delivery-status-mappings' ? ' is-active' : '' ?>" href="/settings/delivery-status-mappings">
Mapowanie statusów dostawy
<?php if ($dsmUnmappedCount > 0): ?>
<span class="sidebar__badge" title="Niezmapowane statusy"><?= (int) $dsmUnmappedCount ?></span>
<?php endif; ?>
</a>
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'project-mappings' ? ' is-active' : '' ?>" href="/settings/project-mappings">
<?= $e($t('navigation.project_mapping')) ?>