feat: Enhance InPost service selection and handling in Allegro settings
- Added a check for available InPost services and display a message if none are found. - Updated the InPost service selection dropdown to include additional data attributes for better handling in JavaScript. - Improved JavaScript event handling for InPost service selection to correctly populate hidden fields with selected service data. feat: Introduce Cash on Delivery (COD) functionality in shipment preparation - Added a new input field for specifying the COD amount and currency in the shipment preparation view. - Updated the shipment creation logic to handle COD amounts correctly when creating shipments. refactor: Update OrdersController to include shipment package repository - Modified the OrdersController to accept a ShipmentPackageRepository for better management of shipment-related data. - Enhanced order details to include shipment package information. fix: Ensure internal order numbers are generated upon order creation - Updated the OrderImportRepository to generate and store internal order numbers when a new order is created. feat: Implement status synchronization for Allegro orders - Introduced a new service for syncing order statuses from Allegro to the internal system. - Added logic to fetch and process orders needing status updates, handling errors gracefully. chore: Clean up InPost service definitions in AllegroIntegrationController - Removed hardcoded InPost service definitions and replaced them with dynamic fetching based on available services. feat: Add activity logging for shipment actions - Implemented activity logging for various shipment actions, including creation, label downloads, and errors, to improve traceability and auditing.
This commit is contained in:
@@ -14,13 +14,32 @@
|
||||
<?php $currentMenu = (string) ($activeMenu ?? ''); ?>
|
||||
<?php $currentSettings = (string) ($activeSettings ?? ''); ?>
|
||||
<?php $currentOrders = (string) ($activeOrders ?? ''); ?>
|
||||
<div class="app-shell">
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar__brand"><?= $e($t('brand.name_prefix')) ?><strong><?= $e($t('brand.name_suffix')) ?></strong></div>
|
||||
<div class="app-shell" id="js-app-shell">
|
||||
<aside class="sidebar" id="js-sidebar">
|
||||
<div class="sidebar__brand">
|
||||
<span class="sidebar__brand-text"><?= $e($t('brand.name_prefix')) ?><strong><?= $e($t('brand.name_suffix')) ?></strong></span>
|
||||
<button class="sidebar__collapse-btn" id="js-sidebar-collapse" title="Zwiń menu" aria-label="Zwiń menu">
|
||||
<svg class="sidebar__collapse-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M15 18l-6-6 6-6"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<nav class="sidebar__nav" aria-label="<?= $e($t('navigation.main_menu')) ?>">
|
||||
<details class="sidebar__group<?= $currentMenu === 'orders' ? ' is-active' : '' ?>"<?= $currentMenu === 'orders' ? ' open' : '' ?>>
|
||||
<summary class="sidebar__group-toggle"><?= $e($t('navigation.orders')) ?></summary>
|
||||
<summary class="sidebar__group-toggle">
|
||||
<span class="sidebar__icon">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M9 5H7a2 2 0 00-2 2v13a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2"/>
|
||||
<rect x="9" y="3" width="6" height="4" rx="1"/>
|
||||
<path d="M9 12h6M9 16h4"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="sidebar__label"><?= $e($t('navigation.orders')) ?></span>
|
||||
<svg class="sidebar__toggle-arrow" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 9l6 6 6-6"/>
|
||||
</svg>
|
||||
</summary>
|
||||
<div class="sidebar__group-links">
|
||||
<a class="sidebar__sublink<?= $currentMenu === 'orders' && $currentOrders === 'list' ? ' is-active' : '' ?>" href="/orders/list">
|
||||
<?= $e($t('navigation.orders_list')) ?>
|
||||
@@ -29,7 +48,18 @@
|
||||
</details>
|
||||
|
||||
<details class="sidebar__group<?= $currentMenu === 'settings' ? ' is-active' : '' ?>"<?= $currentMenu === 'settings' ? ' open' : '' ?>>
|
||||
<summary class="sidebar__group-toggle"><?= $e($t('navigation.settings')) ?></summary>
|
||||
<summary class="sidebar__group-toggle">
|
||||
<span class="sidebar__icon">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="3"/>
|
||||
<path d="M12 2v2M12 20v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M2 12h2M20 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/>
|
||||
</svg>
|
||||
</span>
|
||||
<span class="sidebar__label"><?= $e($t('navigation.settings')) ?></span>
|
||||
<svg class="sidebar__toggle-arrow" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M6 9l6 6 6-6"/>
|
||||
</svg>
|
||||
</summary>
|
||||
<div class="sidebar__group-links">
|
||||
<a class="sidebar__sublink<?= $currentMenu === 'settings' && $currentSettings === 'users' ? ' is-active' : '' ?>" href="/settings/users">
|
||||
<?= $e($t('navigation.users')) ?>
|
||||
@@ -77,5 +107,42 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/assets/js/modules/jquery-alerts.js?ver=<?= filemtime(dirname(__DIR__, 3) . '/public/assets/js/modules/jquery-alerts.js') ?: 0 ?>"></script>
|
||||
<script>
|
||||
(function () {
|
||||
var STORAGE_KEY = 'sidebarCollapsed';
|
||||
var sidebar = document.getElementById('js-sidebar');
|
||||
var collapseBtn = document.getElementById('js-sidebar-collapse');
|
||||
if (!sidebar || !collapseBtn) return;
|
||||
|
||||
function setCollapsed(collapsed) {
|
||||
sidebar.classList.toggle('is-collapsed', collapsed);
|
||||
collapseBtn.setAttribute('title', collapsed ? 'Rozwiń menu' : 'Zwiń menu');
|
||||
collapseBtn.setAttribute('aria-label', collapsed ? 'Rozwiń menu' : 'Zwiń menu');
|
||||
if (collapsed) {
|
||||
sidebar.querySelectorAll('details[open]').forEach(function (det) {
|
||||
det.removeAttribute('open');
|
||||
});
|
||||
}
|
||||
try { localStorage.setItem(STORAGE_KEY, collapsed ? '1' : '0'); } catch (e) {}
|
||||
}
|
||||
|
||||
try {
|
||||
if (localStorage.getItem(STORAGE_KEY) === '1') setCollapsed(true);
|
||||
} catch (e) {}
|
||||
|
||||
collapseBtn.addEventListener('click', function () {
|
||||
setCollapsed(!sidebar.classList.contains('is-collapsed'));
|
||||
});
|
||||
|
||||
sidebar.querySelectorAll('details > summary').forEach(function (summary) {
|
||||
summary.addEventListener('click', function (e) {
|
||||
if (sidebar.classList.contains('is-collapsed')) {
|
||||
e.preventDefault();
|
||||
setCollapsed(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user