ldc-boutique-cnc-sable/app/Jobs/FetchAndUpsertArcadiaEmployees.php
Jérémy Munsch 3b3997d547
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-27 09:58:44 +01:00

35 lines
838 B
PHP

<?php
declare(strict_types=1);
namespace App\Jobs;
use App\Actions\Employee\SynchronizeEmployeesWithArcadiaApi;
use App\Contracts\ActionInputEmpty;
use App\Contracts\Executor;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Queue\Queueable;
class FetchAndUpsertArcadiaEmployees implements ShouldBeUnique, ShouldQueue
{
use Queueable;
/** Retain unique lock for 3600 seconds (1 hour) */
public int $uniqueFor = 3600;
public function uniqueId(): string
{
return 'fetch-and-upsert-arcadia-employees';
}
/**
* Execute the job.
*/
public function handle(
Executor $executor,
SynchronizeEmployeesWithArcadiaApi $action
): void {
$executor->execute($action, new ActionInputEmpty());
}
}