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);
|
|
|
|
|
|
|
|
|
|
use App\Jobs\DeleteOldResetTokens;
|
2026-11-14 22:12:36 +01:00
|
|
|
use App\Jobs\EnsurePublicHolidaysSyncedJob;
|
2026-11-16 20:05:27 +01:00
|
|
|
use App\Jobs\FailStalePendingOrdersJob;
|
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 App\Jobs\SendMissingOrderReminderJob;
|
|
|
|
|
use App\Jobs\SendReminderMail;
|
|
|
|
|
use App\Jobs\UpdateSlidesStatus;
|
|
|
|
|
use Domain\Services\PickupSchedulingService;
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
2026-10-06 15:54:02 +02:00
|
|
|
use Illuminate\Support\Facades\Date;
|
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 function (Schedule $schedule): void {
|
|
|
|
|
$schedule->job(DeleteOldResetTokens::class)->everyMinute();
|
|
|
|
|
$schedule->job(UpdateSlidesStatus::class)->everyMinute();
|
2026-11-16 20:05:27 +01:00
|
|
|
$schedule->job(FailStalePendingOrdersJob::class)->onOneServer()->everyFiveMinutes();
|
2026-10-27 11:06:25 +01:00
|
|
|
|
|
|
|
|
// FIXME: The Arcadia jobs are currently disabled and need to be enabled when api will be available.
|
|
|
|
|
// $schedule->job(FetchAndUpsertArcadiaEmployees::class)->onOneServer()->dailyAt('00:00');
|
|
|
|
|
// $schedule->job(FetchAndUpsertArcadiaProductIncos::class)->onOneServer()->dailyAt('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
|
|
|
$schedule->job(SendReminderMail::class)->onOneServer()->dailyAt('10:00');
|
|
|
|
|
$schedule->job(SendMissingOrderReminderJob::class)
|
|
|
|
|
->onOneServer()
|
|
|
|
|
->hourly()
|
|
|
|
|
->when(function () {
|
|
|
|
|
$schedulingService = app(PickupSchedulingService::class);
|
|
|
|
|
|
2026-10-06 15:54:02 +02:00
|
|
|
$now = Date::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
|
|
|
$currentCutoffAt = $schedulingService->currentCutoff();
|
|
|
|
|
$pickupReminderAt = $currentCutoffAt->copy()
|
|
|
|
|
->subDays(SendMissingOrderReminderJob::DAYS_BEFORE_CUTOFF)
|
|
|
|
|
->subHours(SendMissingOrderReminderJob::HOURS_BEFORE_CUTOFF);
|
|
|
|
|
|
|
|
|
|
return $now->isSameHour($pickupReminderAt);
|
|
|
|
|
});
|
2026-11-14 22:12:36 +01:00
|
|
|
$schedule->job(EnsurePublicHolidaysSyncedJob::class)
|
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
|
|
|
->onOneServer()
|
2026-11-14 22:12:36 +01:00
|
|
|
->dailyAt('07:30');
|
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
|
|
|
};
|