Merge branch 'main' of https://git.project-pro.pl/Project-Pro/orderPRO
# Conflicts: # .paul/PROJECT.md # .paul/ROADMAP.md # .paul/STATE.md # .paul/codebase/tech_changelog.md # resources/lang/pl.php # resources/views/shipments/prepare.php # routes/web.php # src/Modules/Settings/IntegrationsHubController.php # src/Modules/Shipments/ShipmentController.php
This commit is contained in:
@@ -10,6 +10,7 @@ use App\Modules\Cron\CronHandlerFactory;
|
||||
use App\Modules\Cron\CronRepository;
|
||||
use App\Modules\Orders\OrdersController;
|
||||
use App\Modules\Orders\OrderImportRepository;
|
||||
use App\Modules\Orders\OrderNotesService;
|
||||
use App\Modules\Orders\OrdersRepository;
|
||||
use App\Modules\Statistics\OrdersStatisticsController;
|
||||
use App\Modules\Statistics\OrdersStatisticsRepository;
|
||||
@@ -49,6 +50,9 @@ use App\Modules\Settings\InpostIntegrationController;
|
||||
use App\Modules\Settings\InpostIntegrationRepository;
|
||||
use App\Modules\Settings\IntegrationsHubController;
|
||||
use App\Modules\Settings\IntegrationsRepository;
|
||||
use App\Modules\Settings\PolkurierApiClient;
|
||||
use App\Modules\Settings\PolkurierIntegrationController;
|
||||
use App\Modules\Settings\PolkurierIntegrationRepository;
|
||||
use App\Modules\Settings\SmsplanetApiClient;
|
||||
use App\Modules\Settings\SmsplanetIntegrationController;
|
||||
use App\Modules\Settings\SmsplanetIntegrationRepository;
|
||||
@@ -89,6 +93,7 @@ use App\Modules\Settings\DeliveryStatusMappingController;
|
||||
use App\Modules\Settings\DeliveryStatusesController;
|
||||
use App\Modules\Settings\SettingsController;
|
||||
use App\Modules\Shipments\ApaczkaShipmentService;
|
||||
use App\Modules\Shipments\PolkurierShipmentService;
|
||||
use App\Modules\Shipments\AllegroShipmentService;
|
||||
use App\Modules\Shipments\InpostShipmentService;
|
||||
use App\Modules\Shipments\ShipmentController;
|
||||
@@ -227,6 +232,18 @@ return static function (Application $app): void {
|
||||
new HostedSmsApiClient(),
|
||||
new IntegrationsRepository($app->db())
|
||||
);
|
||||
$polkurierIntegrationRepository = new PolkurierIntegrationRepository(
|
||||
$app->db(),
|
||||
(string) $app->config('app.integrations.secret', '')
|
||||
);
|
||||
$polkurierIntegrationController = new PolkurierIntegrationController(
|
||||
$template,
|
||||
$translator,
|
||||
$auth,
|
||||
$polkurierIntegrationRepository,
|
||||
new PolkurierApiClient(),
|
||||
new IntegrationsRepository($app->db())
|
||||
);
|
||||
$smsplanetIntegrationRepository = new SmsplanetIntegrationRepository(
|
||||
$app->db(),
|
||||
(string) $app->config('app.integrations.secret', '')
|
||||
@@ -268,6 +285,7 @@ return static function (Application $app): void {
|
||||
$fakturowniaIntegrationRepository,
|
||||
$hostedSmsIntegrationRepository,
|
||||
$smsplanetIntegrationRepository,
|
||||
$polkurierIntegrationRepository,
|
||||
$erliIntegrationRepository
|
||||
);
|
||||
$cronSettingsController = new CronSettingsController(
|
||||
@@ -424,7 +442,8 @@ return static function (Application $app): void {
|
||||
$allegroDeliveryMappingController
|
||||
);
|
||||
$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, $invoiceRepository, $invoiceConfigRepository, $smsMessageRepository, $smsConversationService, $smsTemplateRepository, $smsVariableResolver, $companySettingsRepository);
|
||||
$orderNotesService = new OrderNotesService($app->db());
|
||||
$ordersController = new OrdersController($template, $translator, $auth, $app->orders(), $shipmentPackageRepositoryForOrders, $receiptRepository, $receiptConfigRepository, $emailSendingService, $emailTemplateRepository, $emailMailboxRepository, $app->basePath('storage'), $printJobRepository, $shopproIntegrationsRepository, $automationService, $invoiceRepository, $invoiceConfigRepository, $smsMessageRepository, $smsConversationService, $smsTemplateRepository, $smsVariableResolver, $companySettingsRepository, $orderNotesService);
|
||||
$ordersStatisticsController = new OrdersStatisticsController(
|
||||
$template,
|
||||
$translator,
|
||||
@@ -482,10 +501,18 @@ return static function (Application $app): void {
|
||||
$companySettingsRepository,
|
||||
new OrdersRepository($app->db())
|
||||
);
|
||||
$polkurierShipmentService = new PolkurierShipmentService(
|
||||
$polkurierIntegrationRepository,
|
||||
new PolkurierApiClient(),
|
||||
$shipmentPackageRepository,
|
||||
$companySettingsRepository,
|
||||
new OrdersRepository($app->db())
|
||||
);
|
||||
$shipmentProviderRegistry = new ShipmentProviderRegistry([
|
||||
$shipmentService,
|
||||
$apaczkaShipmentService,
|
||||
$inpostShipmentService,
|
||||
$polkurierShipmentService,
|
||||
]);
|
||||
$erliDeliveryMappingController = new ErliDeliveryMappingController(
|
||||
$translator,
|
||||
@@ -627,6 +654,9 @@ return static function (Application $app): void {
|
||||
$router->post('/orders/{id}/email-preview', [$ordersController, 'emailPreview'], [$authMiddleware]);
|
||||
$router->get('/api/orders/search', [$ordersController, 'quickSearch'], [$authMiddleware]);
|
||||
$router->get('/api/orders/{id}/preview', [$ordersController, 'preview'], [$authMiddleware]);
|
||||
$router->post('/orders/{id}/notes', [$ordersController, 'storeNote'], [$authMiddleware]);
|
||||
$router->post('/orders/{id}/notes/{noteId}/update', [$ordersController, 'updateNote'], [$authMiddleware]);
|
||||
$router->post('/orders/{id}/notes/{noteId}/delete', [$ordersController, 'deleteNote'], [$authMiddleware]);
|
||||
$router->post('/users', [$usersController, 'store'], [$authMiddleware]);
|
||||
$router->get('/settings/users', [$usersController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/users', [$usersController, 'store'], [$authMiddleware]);
|
||||
@@ -670,6 +700,9 @@ return static function (Application $app): void {
|
||||
$router->get('/settings/integrations/hostedsms', [$hostedSmsIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/hostedsms/save', [$hostedSmsIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/hostedsms/test', [$hostedSmsIntegrationController, 'test'], [$authMiddleware]);
|
||||
$router->get('/settings/integrations/polkurier', [$polkurierIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/polkurier/save', [$polkurierIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/polkurier/test', [$polkurierIntegrationController, 'test'], [$authMiddleware]);
|
||||
$router->get('/settings/integrations/smsplanet', [$smsplanetIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/smsplanet/save', [$smsplanetIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/smsplanet/test', [$smsplanetIntegrationController, 'test'], [$authMiddleware]);
|
||||
|
||||
Reference in New Issue
Block a user