Add Orders and Order Status repositories with pagination and management features

- Implemented OrdersRepository for handling order data with pagination, filtering, and sorting capabilities.
- Added methods for retrieving order status options, quick stats, and detailed order information.
- Created OrderStatusRepository for managing order status groups and statuses, including CRUD operations and sorting.
- Introduced a bootstrap file for test environment setup and autoloading.
This commit is contained in:
2026-03-03 01:32:28 +01:00
parent d1576bc4ab
commit c489891d15
106 changed files with 11669 additions and 5091 deletions

View File

@@ -0,0 +1,36 @@
<?php
$panelItems = is_array($statusPanelList ?? null) ? $statusPanelList : [];
$panelTitle = trim((string) ($statusPanelTitle ?? 'Statusy'));
?>
<aside class="card order-statuses-side">
<div class="order-statuses-side__title"><?= $e($panelTitle) ?></div>
<?php foreach ($panelItems as $group): ?>
<?php $groupItems = is_array($group['items'] ?? null) ? $group['items'] : []; ?>
<div class="order-status-group">
<?php if ((string) ($group['name'] ?? '') !== ''): ?>
<div class="order-status-group__name"><?= $e((string) ($group['name'] ?? '')) ?></div>
<?php endif; ?>
<?php foreach ($groupItems as $item): ?>
<?php
$tone = (string) ($item['tone'] ?? 'neutral');
$color = (string) ($item['color_hex'] ?? '#64748b');
$rowClass = 'order-status-row tone-' . $tone . (!empty($item['is_active']) ? ' is-active' : '');
$url = trim((string) ($item['url'] ?? ''));
?>
<?php if ($url !== ''): ?>
<a href="<?= $e($url) ?>" class="<?= $e($rowClass) ?>" style="--status-color: <?= $e($color) ?>;">
<span class="order-status-row__label"><?= $e((string) ($item['label'] ?? '')) ?></span>
<span class="order-status-row__count"><?= $e((string) ((int) ($item['count'] ?? 0))) ?></span>
</a>
<?php else: ?>
<div class="<?= $e($rowClass) ?>" style="--status-color: <?= $e($color) ?>;">
<span class="order-status-row__label"><?= $e((string) ($item['label'] ?? '')) ?></span>
<span class="order-status-row__count"><?= $e((string) ((int) ($item['count'] ?? 0))) ?></span>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</aside>