- 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
36 lines
1.4 KiB
PHP
36 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Jobs\DeleteOldResetTokens;
|
|
use App\Jobs\FetchAndUpsertArcadiaEmployees;
|
|
use App\Jobs\SendMissingOrderReminderJob;
|
|
use App\Jobs\SendReminderMail;
|
|
use App\Jobs\UpdateSlidesStatus;
|
|
use App\Jobs\UpsertShopsPickupExceptionsUsingApiForYear;
|
|
use Domain\Services\PickupSchedulingService;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
return function (Schedule $schedule): void {
|
|
$schedule->job(DeleteOldResetTokens::class)->everyMinute();
|
|
$schedule->job(UpdateSlidesStatus::class)->everyMinute();
|
|
$schedule->job(FetchAndUpsertArcadiaEmployees::class)->onOneServer()->dailyAt('00:00');
|
|
$schedule->job(SendReminderMail::class)->onOneServer()->dailyAt('10:00');
|
|
$schedule->job(SendMissingOrderReminderJob::class)
|
|
->onOneServer()
|
|
->hourly()
|
|
->when(function () {
|
|
$schedulingService = app(PickupSchedulingService::class);
|
|
|
|
$now = \Date::now();
|
|
$currentCutoffAt = $schedulingService->currentCutoff();
|
|
$pickupReminderAt = $currentCutoffAt->copy()
|
|
->subDays(SendMissingOrderReminderJob::DAYS_BEFORE_CUTOFF)
|
|
->subHours(SendMissingOrderReminderJob::HOURS_BEFORE_CUTOFF);
|
|
|
|
return $now->isSameHour($pickupReminderAt);
|
|
});
|
|
$schedule->job(UpsertShopsPickupExceptionsUsingApiForYear::class)
|
|
->onOneServer()
|
|
->yearlyOn(11, 1, '7:30');
|
|
};
|