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\Services;
|
|
|
|
|
|
|
|
|
|
use App\Contracts\QueryInputEmpty;
|
2026-11-10 14:28:00 +01:00
|
|
|
use App\Cqs\Queries\Settings\GetSettingsQuery;
|
2026-11-16 08:45:40 +01:00
|
|
|
use App\Models\Employee;
|
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
|
|
|
use Carbon\CarbonInterface;
|
2026-11-16 08:45:40 +01:00
|
|
|
use Domain\Models\ValueObjects\ShopperSiteCode;
|
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
|
|
|
use Illuminate\Contracts\Cache\Repository as CacheRepository;
|
|
|
|
|
use Illuminate\Support\Carbon;
|
2026-10-05 16:33:20 +02:00
|
|
|
use Psr\Log\LoggerInterface;
|
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 EmployeeSyncService
|
|
|
|
|
{
|
2026-11-16 08:45:40 +01:00
|
|
|
private const SYNC_TIMESTAMP_CACHE = 'EMPLOYEE_LAST_SYNC';
|
|
|
|
|
|
|
|
|
|
private const SITE_SYNC_TIMESTAMP_CACHE = 'EMPLOYEE_LAST_SYNC:';
|
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
|
|
|
|
|
|
|
|
public function __construct(
|
2026-10-05 16:33:20 +02:00
|
|
|
private readonly LoggerInterface $logger,
|
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
|
|
|
private readonly CacheRepository $cacheRepository,
|
|
|
|
|
private readonly ArcadiaEmployeeService $arcadiaEmployeeService,
|
2026-11-10 15:14:24 +01:00
|
|
|
private readonly EmployeeUpsertService $employeeUpsertService,
|
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
|
|
|
private readonly GetSettingsQuery $getSettingsQuery
|
|
|
|
|
) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param array<int, \Domain\Models\ValueObjects\ShopperSiteCode>|null $sites
|
|
|
|
|
*/
|
|
|
|
|
public function synchronize(
|
|
|
|
|
?\DateTimeInterface $since = null,
|
|
|
|
|
?array $sites = null
|
|
|
|
|
): void {
|
|
|
|
|
$sitesToSync = $sites ?? ($this->getSettingsQuery)(new QueryInputEmpty())->getShopperSiteCodes();
|
|
|
|
|
|
2026-10-05 16:33:20 +02:00
|
|
|
$this->logger->info('Starting employee synchronization.', [
|
2026-11-16 08:45:40 +01:00
|
|
|
'since' => $since?->format(Carbon::RFC3339),
|
2026-10-05 16:33:20 +02:00
|
|
|
'sites_count' => count($sitesToSync),
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
$totalInserted = 0;
|
|
|
|
|
$totalUpdated = 0;
|
2026-11-16 08:45:40 +01:00
|
|
|
/** @var list<string> $failedSites */
|
|
|
|
|
$failedSites = [];
|
2026-10-05 16:33:20 +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
|
|
|
foreach ($sitesToSync as $siteCode) {
|
2026-11-16 08:45:40 +01:00
|
|
|
$siteSince = $since !== null ? Carbon::instance($since) : $this->resolveSinceForSite($siteCode);
|
|
|
|
|
$siteSyncStartedAt = Carbon::now();
|
|
|
|
|
|
2026-11-14 16:06:42 +01:00
|
|
|
$this->logger->debug("Fetching employees for site: {$siteCode->value}", [
|
|
|
|
|
'site' => $siteCode->value,
|
2026-11-16 08:45:40 +01:00
|
|
|
'since' => $siteSince->format(Carbon::RFC3339),
|
2026-10-05 16:33:20 +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
|
|
|
$employees = $this->arcadiaEmployeeService->getEmployeesOfSiteSince(
|
|
|
|
|
$siteCode,
|
2026-11-16 08:45:40 +01:00
|
|
|
$siteSince
|
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
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if ($employees === false) {
|
2026-11-14 16:06:42 +01:00
|
|
|
$this->logger->warning("Failed to fetch employees from Arcadia for site: {$siteCode->value}", [
|
|
|
|
|
'site' => $siteCode->value,
|
2026-10-05 16:33:20 +02:00
|
|
|
]);
|
2026-11-16 08:45:40 +01:00
|
|
|
$failedSites[] = $siteCode->value;
|
2026-10-05 16:33:20 +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
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-14 16:06:42 +01:00
|
|
|
$this->logger->debug("Retrieved employees for site {$siteCode->value}.", [
|
|
|
|
|
'site' => $siteCode->value,
|
2026-10-05 16:33:20 +02:00
|
|
|
'count' => count($employees),
|
|
|
|
|
]);
|
|
|
|
|
|
2026-11-16 08:45:40 +01:00
|
|
|
try {
|
|
|
|
|
$result = $this->employeeUpsertService->upsertEmployees($employees);
|
|
|
|
|
} catch (\Throwable $e) {
|
|
|
|
|
$this->logger->error("Failed to persist employees for site {$siteCode->value}: {$e->getMessage()}", [
|
|
|
|
|
'site' => $siteCode->value,
|
|
|
|
|
'exception' => $e,
|
|
|
|
|
]);
|
|
|
|
|
$failedSites[] = $siteCode->value;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->markSiteLastSync($siteCode, $siteSyncStartedAt);
|
2026-10-05 16:33:20 +02:00
|
|
|
|
|
|
|
|
$totalInserted += $result->insertedCount;
|
|
|
|
|
$totalUpdated += $result->updatedCount;
|
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
|
|
|
}
|
|
|
|
|
|
2026-11-16 08:45:40 +01:00
|
|
|
if ($failedSites === []) {
|
|
|
|
|
$this->markLastSync();
|
|
|
|
|
} else {
|
|
|
|
|
$this->logger->warning('Employee synchronization finished with failed sites; global cursor unchanged.', [
|
|
|
|
|
'failed_sites' => $failedSites,
|
|
|
|
|
]);
|
|
|
|
|
}
|
2026-10-05 16:33:20 +02:00
|
|
|
|
2026-11-16 08:45:40 +01:00
|
|
|
$this->logger->info('Employee synchronization completed.', [
|
2026-10-05 16:33:20 +02:00
|
|
|
'total_inserted' => $totalInserted,
|
|
|
|
|
'total_updated' => $totalUpdated,
|
2026-11-16 08:45:40 +01:00
|
|
|
'failed_sites' => $failedSites,
|
2026-10-05 16:33:20 +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
|
|
|
}
|
|
|
|
|
|
2026-11-16 08:45:40 +01:00
|
|
|
public function getSiteLastSync(ShopperSiteCode $siteCode): ?CarbonInterface
|
|
|
|
|
{
|
|
|
|
|
$timestamp = $this->cacheRepository->get($this->getSiteLastSyncCacheKey($siteCode));
|
|
|
|
|
|
|
|
|
|
if (! is_string($timestamp)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Carbon::parse($timestamp);
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
public function getLastSync(): ?CarbonInterface
|
|
|
|
|
{
|
|
|
|
|
$timestamp = $this->cacheRepository->get(self::SYNC_TIMESTAMP_CACHE);
|
|
|
|
|
|
|
|
|
|
if (! is_string($timestamp)) {
|
2026-10-05 16:33:20 +02:00
|
|
|
$this->logger->debug('No last synchronization timestamp found in cache.');
|
|
|
|
|
|
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 null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Carbon::parse($timestamp);
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-16 08:45:40 +01:00
|
|
|
private function resolveSinceForSite(ShopperSiteCode $siteCode): CarbonInterface
|
|
|
|
|
{
|
|
|
|
|
$cachedLastSync = $this->getSiteLastSync($siteCode);
|
|
|
|
|
$dbLastSync = Employee::query()
|
|
|
|
|
->where('site', $siteCode->value)
|
|
|
|
|
->orderBy('last_sync', 'desc')
|
|
|
|
|
->limit(1)
|
|
|
|
|
->first('last_sync')?->last_sync;
|
|
|
|
|
|
|
|
|
|
if ($cachedLastSync !== null && $dbLastSync !== null) {
|
|
|
|
|
return $cachedLastSync->greaterThan($dbLastSync) ? $cachedLastSync : $dbLastSync;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $cachedLastSync ?? $dbLastSync ?? Carbon::createFromTimestamp(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function markSiteLastSync(ShopperSiteCode $siteCode, CarbonInterface $syncedAt): void
|
|
|
|
|
{
|
|
|
|
|
$this->cacheRepository->put(
|
|
|
|
|
$this->getSiteLastSyncCacheKey($siteCode),
|
|
|
|
|
$syncedAt->format(Carbon::RFC3339),
|
|
|
|
|
3600 * 36
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function getSiteLastSyncCacheKey(ShopperSiteCode $siteCode): string
|
|
|
|
|
{
|
|
|
|
|
return self::SITE_SYNC_TIMESTAMP_CACHE . $siteCode->value;
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
private function markLastSync(): void
|
|
|
|
|
{
|
2026-10-05 16:33:20 +02:00
|
|
|
$now = Carbon::now()->format(Carbon::RFC3339);
|
|
|
|
|
|
|
|
|
|
$this->cacheRepository->put(
|
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
|
|
|
self::SYNC_TIMESTAMP_CACHE,
|
2026-10-05 16:33:20 +02:00
|
|
|
$now,
|
|
|
|
|
3600 * 36 // Cache for 36 hours
|
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
|
|
|
);
|
2026-10-05 16:33:20 +02:00
|
|
|
|
|
|
|
|
$this->logger->debug('Last sync timestamp updated in cache.', [
|
|
|
|
|
'timestamp' => $now,
|
|
|
|
|
]);
|
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
|
|
|
}
|
|
|
|
|
}
|