feat(28-shipment-tracking-ui): badge'e statusow dostawy, linki sledzenia, ustawienia interwalu trackingu
- Kolorowe badge'e statusow dostawy w tabelach paczek (show.php + prepare.php) - Link sledzenia z carrier detection (InPost, Apaczka, Orlen, Allegro, Google fallback) - Sekcja Status dostawy w boksie Platnosc i wysylka - Ustawienie interwalu trackingu crona (5-120 min) w zakladce Ustawienia - Tekstowe mapowania statusow Apaczka API (NEW, CONFIRMED, etc.) - Fix: use-statements ApaczkaShipmentService (pre-existing bug) - Fix: pickup date normalization (next day po 16:00) - Fix: przycisk Pobierz etykiete (POST zamiast link do prepare) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -370,6 +370,31 @@ final class CronRepository
|
||||
]);
|
||||
}
|
||||
|
||||
public function updateScheduleInterval(string $jobType, int $intervalSeconds): void
|
||||
{
|
||||
$statement = $this->pdo->prepare(
|
||||
'UPDATE cron_schedules
|
||||
SET interval_seconds = :interval_seconds,
|
||||
updated_at = NOW()
|
||||
WHERE job_type = :job_type'
|
||||
);
|
||||
$statement->execute([
|
||||
'interval_seconds' => max(1, $intervalSeconds),
|
||||
'job_type' => trim($jobType),
|
||||
]);
|
||||
}
|
||||
|
||||
public function getScheduleInterval(string $jobType): ?int
|
||||
{
|
||||
$statement = $this->pdo->prepare(
|
||||
'SELECT interval_seconds FROM cron_schedules WHERE job_type = :job_type LIMIT 1'
|
||||
);
|
||||
$statement->execute(['job_type' => trim($jobType)]);
|
||||
$value = $statement->fetchColumn();
|
||||
|
||||
return $value !== false ? (int) $value : null;
|
||||
}
|
||||
|
||||
private function getSettingValue(string $key): ?string
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user