This commit is contained in:
2026-04-19 22:43:02 +02:00
parent 10cba24727
commit fd1e23eb26
23 changed files with 2320 additions and 72 deletions

View File

@@ -11,6 +11,8 @@ use App\Modules\Cron\CronRepository;
use App\Modules\Orders\OrdersController;
use App\Modules\Orders\OrderImportRepository;
use App\Modules\Orders\OrdersRepository;
use App\Modules\Statistics\OrdersStatisticsController;
use App\Modules\Statistics\OrdersStatisticsRepository;
use App\Modules\Settings\AllegroApiClient;
use App\Modules\Settings\AllegroDeliveryMappingController;
use App\Modules\Settings\AllegroIntegrationController;
@@ -282,6 +284,12 @@ return static function (Application $app): void {
);
$printJobRepository = new PrintJobRepository($app->db());
$ordersController = new OrdersController($template, $translator, $auth, $app->orders(), $shipmentPackageRepositoryForOrders, $receiptRepository, $receiptConfigRepository, $emailSendingService, $emailTemplateRepository, $emailMailboxRepository, $app->basePath('storage'), $printJobRepository, $shopproIntegrationsRepository, $automationService);
$ordersStatisticsController = new OrdersStatisticsController(
$template,
$translator,
$auth,
new OrdersStatisticsRepository($app->db())
);
$receiptController = new ReceiptController(
$template,
$translator,
@@ -420,6 +428,7 @@ return static function (Application $app): void {
$router->get('/users', static fn (Request $request): Response => Response::redirect('/settings/users'), [$authMiddleware]);
$router->get('/orders', static fn (Request $request): Response => Response::redirect('/orders/list'), [$authMiddleware]);
$router->get('/orders/list', [$ordersController, 'index'], [$authMiddleware]);
$router->get('/statistics/orders', [$ordersStatisticsController, 'index'], [$authMiddleware]);
$router->get('/orders/{id}', [$ordersController, 'show'], [$authMiddleware]);
$router->post('/orders/{id}/status', [$ordersController, 'updateStatus'], [$authMiddleware]);
$router->post('/orders/{id}/details/update', [$ordersController, 'updateDetails'], [$authMiddleware]);