feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
|
|
use GuzzleHttp\Psr7\Uri;
|
|
|
|
|
use Illuminate\Foundation\Application;
|
|
|
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\ArcadiaApiClient;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\Auth\ClientIdentifier;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\Auth\ClientSecret;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\Lib\ApiConfig;
|
|
|
|
|
use Uwil\ArcadiaApiPhpClient\Service\EmployeeService as LibEmployeeService;
|
2026-10-03 10:54:31 +02:00
|
|
|
use Uwil\ArcadiaApiPhpClient\Service\IncoService as LibIncoService;
|
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
|
|
|
|
|
class ArcadiaApiProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register any application services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
#[\Override]
|
|
|
|
|
public function register()
|
|
|
|
|
{
|
|
|
|
|
$this->app->singleton(
|
|
|
|
|
ApiConfig::class,
|
|
|
|
|
fn (Application $app) => $this->apiConfig($app->make(LoggerInterface::class))
|
|
|
|
|
);
|
|
|
|
|
$this->app->singleton(
|
|
|
|
|
LibEmployeeService::class,
|
|
|
|
|
fn (Application $app) => $app->make(ArcadiaApiClient::class)->employees()
|
|
|
|
|
);
|
2026-10-03 10:54:31 +02:00
|
|
|
$this->app->singleton(
|
|
|
|
|
LibIncoService::class,
|
|
|
|
|
fn (Application $app) => $app->make(ArcadiaApiClient::class)->incoSheets()
|
|
|
|
|
);
|
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap any application services.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function boot()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function apiConfig(LoggerInterface $logger): ApiConfig
|
|
|
|
|
{
|
|
|
|
|
$endpoint = new Uri(Config::string('services.arcadia_api.endpoint'));
|
|
|
|
|
$clientIdentifier = new ClientIdentifier(
|
|
|
|
|
Config::string('services.arcadia_api.api_key')
|
|
|
|
|
);
|
|
|
|
|
$clientSecret = new ClientSecret(
|
|
|
|
|
Config::string('services.arcadia_api.api_secret')
|
|
|
|
|
);
|
|
|
|
|
|
2026-11-15 18:56:33 +01:00
|
|
|
$ignoreSelfSignedCert = Config::boolean('services.arcadia_api.ignore_self_signed_cert', false);
|
2026-10-03 10:54:31 +02:00
|
|
|
|
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
return new ApiConfig(
|
|
|
|
|
endpoint: $endpoint,
|
|
|
|
|
apiKey: $clientIdentifier,
|
|
|
|
|
secret: $clientSecret,
|
2026-10-03 10:54:31 +02:00
|
|
|
ignoreSelfSignedCert: $ignoreSelfSignedCert,
|
feat(employees): automated sync with Arcadia API, BO settings, Shopper value objects, and pagination migration
- Implement automated synchronization of employees via Arcadia API (EmployeeSyncService, SynchronizeEmployeesWithArcadiaApi, FetchAndUpsertArcadiaEmployees)
- Add Back-Office application settings for employee sites (Setting singleton, GetSettingsQuery, UpdateSettings, SettingsController, EmployeeSitesInputComponent.vue)
- Strongly type Employee attributes using Domain Value Objects (ShopperEstablishmentCode, ShopperSiteCode, ShopperServiceCode) and Eloquent Casts
- Migrate pagination from Domain to Shared\Pagination namespace across queries and inputs
- Remove legacy and dead CSV employee import/export code
- Restore Domain\Ports\Services\CsvGenerator interface for Regate order generation
- Add comprehensive Pest unit, integration, and feature test coverage
2026-10-01 17:26:30 +02:00
|
|
|
logger: $logger
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|