This commit is contained in:
2026-04-26 21:55:49 +02:00
parent f5c5201a2f
commit 34dac15494
10 changed files with 75 additions and 883 deletions

View File

@@ -1,3 +0,0 @@
# TODO
> Przeniesione do `.paul/codebase/todo.md`

View File

@@ -1,177 +0,0 @@
# API
## Zakres
- Dokument opisuje aktualne endpointy z `routes/web.php` (stan repo: 2026-04-18).
- Runtime API jest oparte o sesje (`AuthMiddleware`) i CSRF dla formularzy.
- Publiczny endpoint bez sesji: `GET /cron` (token w query lub segmencie sciezki).
- API dla klienta drukowania uzywa `X-Api-Key` (`ApiKeyMiddleware`).
## Uwierzytelnianie
- Session auth: wszystkie trasy panelowe i wiekszosc tras `/api/*`.
- API key auth: tylko zdalne kolejki druku.
- CSRF: wszystkie trasy `POST` w panelu (`_token` w body).
## Endpointy publiczne
- `GET /health` - status aplikacji JSON.
- `GET /info` - strona info.
- `GET /cron?token=...` - uruchomienie crona przez HTTPS.
- `GET /cron/{tokenValue}` - alternatywny wariant tokenu w sciezce.
## Auth
- `GET /login` - formularz logowania.
- `POST /login` - logowanie.
- `POST /logout` - wylogowanie.
## Nawigacja i dashboard
- `GET /` - redirect do `/settings/users` (zalogowany) albo `/login`.
- `GET /users` - redirect do `/settings/users`.
- `GET /orders` - redirect do `/orders/list`.
- `GET /settings` - redirect do `/settings/users`.
## Orders
- `GET /orders/list` - lista zamowien; AJAX zwraca fragmenty HTML tabeli/panelu statusow.
- `GET /orders/{id}` - szczegoly zamowienia.
- `POST /orders/{id}/status` - zmiana statusu; obsluguje HTML i AJAX JSON.
- `POST /orders/{id}/details/update` - update formy dostawy/platnosci.
- `POST /orders/{id}/send-email` - wysylka e-mail z szablonu (JSON).
- `POST /orders/{id}/email-preview` - preview e-maila (JSON: subject/body/attachments).
- `POST /orders/{id}/payment/add` - reczne dodanie platnosci (JSON).
- `GET /api/orders/search` - quick search (JSON).
- `GET /api/orders/{id}/preview` - podglad mini karty zamowienia (HTML fragment).
## Receipts i accounting
- `GET /orders/{id}/receipt/create`
- `POST /orders/{id}/receipt/store`
- `GET /orders/{id}/receipt/{receiptId}`
- `GET /orders/{id}/receipt/{receiptId}/print`
- `GET /orders/{id}/receipt/{receiptId}/pdf`
- `GET /accounting` - lista paragonow.
- `POST /accounting/export` - eksport danych ksiegowych.
## Shipments
- `GET /orders/{id}/shipment/prepare`
- `POST /orders/{id}/shipment/create`
- `GET /orders/{id}/shipment/{packageId}/status`
- `POST /orders/{id}/shipment/{packageId}/label`
- `POST /orders/{id}/shipment/manual`
- `POST /orders/{id}/shipment/{packageId}/delete`
## Printing API
- Session auth:
- `POST /api/print/jobs` - dodanie zlecenia druku.
- `GET /api/print/jobs/status` - statusy kolejek.
- API key auth (`X-Api-Key`):
- `GET /api/print/jobs/pending` - lista zadan `pending`.
- `GET /api/print/jobs/{id}/download` - pobranie etykiety.
- `POST /api/print/jobs/{id}/complete` - finalizacja zadania.
## Settings: users i baza
- `GET /settings/users`
- `POST /settings/users`
- `GET /settings/database`
- `POST /settings/database/migrate`
## Settings: statusy
- `GET /settings/statuses`
- `POST /settings/status-groups`
- `POST /settings/status-groups/update`
- `POST /settings/status-groups/delete`
- `POST /settings/status-groups/reorder`
- `POST /settings/statuses/create`
- `POST /settings/statuses/update`
- `POST /settings/statuses/delete`
- `POST /settings/statuses/reorder`
## Settings: cron i integracje
- `GET /settings/cron`
- `POST /settings/cron`
- `GET /settings/integrations`
## Settings: Allegro
- `GET /settings/integrations/allegro`
- `POST /settings/integrations/allegro/save`
- `POST /settings/integrations/allegro/settings/save`
- `POST /settings/integrations/allegro/oauth/start`
- `GET /settings/integrations/allegro/oauth/callback`
- `POST /settings/integrations/allegro/import-single`
- `POST /settings/integrations/allegro/statuses/save`
- `POST /settings/integrations/allegro/statuses/save-bulk`
- `POST /settings/integrations/allegro/statuses/delete`
- `POST /settings/integrations/allegro/statuses/save-pull`
- `POST /settings/integrations/allegro/statuses/sync`
- `POST /settings/integrations/allegro/delivery/save`
## Settings: Apaczka / Inpost / shopPRO
- `GET /settings/integrations/apaczka`
- `POST /settings/integrations/apaczka/save`
- `POST /settings/integrations/apaczka/test`
- `GET /settings/integrations/inpost`
- `POST /settings/integrations/inpost/save`
- `GET /settings/integrations/shoppro`
- `POST /settings/integrations/shoppro/save`
- `POST /settings/integrations/shoppro/test`
- `POST /settings/integrations/shoppro/statuses/save`
- `POST /settings/integrations/shoppro/statuses/save-pull`
- `POST /settings/integrations/shoppro/statuses/sync`
- `POST /settings/integrations/shoppro/delivery/save`
## Settings: firma, e-mail, automatyzacja, delivery mapping
- `GET /settings/company`
- `POST /settings/company/save`
- `GET /settings/accounting`
- `POST /settings/accounting/save`
- `POST /settings/accounting/toggle`
- `POST /settings/accounting/delete`
- `GET /settings/email-mailboxes`
- `POST /settings/email-mailboxes/save`
- `POST /settings/email-mailboxes/delete`
- `POST /settings/email-mailboxes/toggle`
- `POST /settings/email-mailboxes/test`
- `GET /settings/email-templates`
- `GET /settings/email-templates/create`
- `GET /settings/email-templates/edit`
- `POST /settings/email-templates/save`
- `POST /settings/email-templates/delete`
- `POST /settings/email-templates/duplicate`
- `POST /settings/email-templates/toggle`
- `POST /settings/email-templates/preview`
- `GET /settings/email-templates/variables`
- `GET /settings/automation`
- `GET /settings/automation/create`
- `POST /settings/automation/store`
- `GET /settings/automation/edit`
- `POST /settings/automation/update`
- `POST /settings/automation/delete`
- `POST /settings/automation/duplicate`
- `POST /settings/automation/toggle`
- `GET /settings/delivery-status-mappings`
- `POST /settings/delivery-status-mappings/save`
- `POST /settings/delivery-status-mappings/save-bulk`
- `POST /settings/delivery-status-mappings/reset`
- `POST /settings/delivery-status-mappings/reset-all`
## Settings: druk i mapowania projektow
- `GET /settings/printing`
- `POST /settings/printing/keys/create`
- `POST /settings/printing/keys/{id}/delete`
- `POST /settings/printing/jobs/delete`
- `GET /settings/project-mappings`
- `POST /settings/project-mappings`
- `POST /settings/project-mappings/{id}/update`
- `POST /settings/project-mappings/{id}/delete`
- `POST /settings/project-mappings/{id}/toggle`
## API shipment presets
- `GET /api/shipment-presets`
- `POST /api/shipment-presets`
- `POST /api/shipment-presets/update`
- `POST /api/shipment-presets/delete`
## Kontrakty JSON (najwazniejsze)
- `GET /health`: `{status, app, timestamp}`.
- `GET /cron*`: `{ok, message, limit, timestamp}` albo blad `{ok:false, message, error?}`.
- `POST /api/print/jobs`: tworzy rekord kolejki dla `package_id`; zwraca JSON statusu.
- `GET /api/print/jobs/pending`: lista pending dla klienta desktop.
- `POST /api/print/jobs/{id}/complete`: potwierdza wydruk, ustawia `completed`.
- `GET /api/orders/search`: `{results:[...]}`.
- `POST /orders/{id}/payment/add`: `{ok, payment_id, payment_status, total_paid}` lub blad.

View File

@@ -1,127 +0,0 @@
# ARCHITECTURE
## Zakres
- Dokument opisuje aktualna architekture kodu (stan repo: 2026-04-19).
- Zrodlem prawdy sa: `src/`, `routes/web.php`, `database/migrations/`.
## Warstwy systemu
- `Core`: bootstrap aplikacji, router, request/response, sesja, template, migrator, logger.
- `Modules/*Controller`: obsluga requestow HTTP i walidacja wejscia.
- `Modules/*Repository`: dostep do danych przez PDO/Medoo (prepared statements).
- `Modules/*Service`: logika domenowa i integracje zewnetrzne.
- `Cron`: runner, schedulery i handlery jobow okresowych.
## Moduly domenowe
- `Auth`: logowanie, wylogowanie, middleware sesyjne.
- `Users`: zarzadzanie uzytkownikami panelu.
- `Orders`: lista, szczegoly, statusy, platnosci reczne, preview, quick search.
- `Shipments`: przygotowanie, tworzenie, status trackingu, etykiety, usuwanie, paczki reczne.
- `Accounting`: paragony i eksport ksiegowy.
- `Email`: wysylka i preview wiadomosci z resolverem zmiennych i zalacznikow.
- `Automation`: reguly event-condition-action, historia wykonan.
- `Settings`: konfiguracja statusow, integracji, cron, skrzynek, szablonow, drukowania, mapowan projektow.
- `Printing`: API kolejkowania wydruku i klucze API dla klienta desktop.
- `Statistics`: raporty i agregacje dzienne zamowien z filtrowaniem po datach, kanalach i grupach statusow.
- `Cron`: synchronizacje integracji i zadania utrzymaniowe.
- `Info`: endpoint diagnostyczny `/info`.
## Kluczowe klasy i odpowiedzialnosci
- `App\Core\Application`: bootstrap, dispatch requestu, opcjonalny web-cron z lockiem DB.
- `App\Modules\Cron\CronRunner`: pobiera kolejke jobow z `cron_schedules/cron_jobs` i wykonuje handlery.
- `App\Modules\Cron\CronHandlerFactory`: sklada zaleznosci i mapuje `job_type -> handler`.
- `App\Modules\Orders\OrdersController`: flow UI zamowien + endpointy AJAX; `buildCustomerRiskInfo/composeCustomerRiskText` skladaja alert klienta ze zwrotami do widoku `orders/show`.
- `App\Modules\Orders\OrdersRepository`: query listy/szczegolow zamowien, update statusow, activity log; `customerReturnedCountSubquerySql` generuje correlated subquery dopasowujaca historyczne zamowienia klienta po email/phone/name z paczka `returned` (self-exclusion).
- `App\Modules\Shipments\ShipmentController`: flow przesylek i etykiet.
- `App\Modules\Shipments\ShipmentPackageRepository`: CRUD paczek + `findReturnedByCustomer(customer, excludeOrderId)` zwraca liste zwroconych paczek klienta dla bannera ryzyka w szczegolach zamowienia.
- `App\Modules\Shipments\ShipmentProviderRegistry`: wybor providera wysylki po `provider_code`.
- `App\Modules\Printing\PrintApiController`: endpointy kolejki wydruku (session/api-key).
- `App\Modules\Automation\AutomationService`: trigger eventow, ewaluacja warunkow, wykonanie akcji.
- `App\Modules\Settings\ProjectMappingController`: CRUD mapowania produkt -> skrypt generacji projektu.
- `App\Modules\Statistics\OrdersStatisticsController`: endpoint `/statistics/orders`, walidacja filtrow i przygotowanie modelu tabeli.
- `App\Modules\Statistics\OrdersStatisticsRepository`: agregacje SQL dzienne (`COUNT`, `SUM total_net`, `SUM total_with_tax`) i mapowanie filtrow kanal/status-group.
## Integracje zewnetrzne
- Allegro: OAuth, import zamowien, sync statusow push/pull, mapowania statusow i dostaw.
- shopPRO: import zamowien, sync statusow push/pull, sync platnosci, mapowania statusow i dostaw.
- Apaczka: konfiguracja API, tworzenie i tracking przesylek.
- InPost: konfiguracja API, tworzenie i tracking przesylek.
## Glowny przeplyw HTTP
- Request -> `Router` -> middleware (`AuthMiddleware` lub `ApiKeyMiddleware`) -> Controller.
- Controller waliduje dane i CSRF, wywoluje Repository/Service.
- Response: HTML (widoki) albo JSON (endpointy AJAX/API).
### Przeplyw Statystyk Zamowien
- Route: `GET /statistics/orders` (wymaga sesji uzytkownika).
- Controller:
- parsuje `date_from`, `date_to`, `channels[]`, `status_groups[]`,
- ustawia domyslne grupy statusow (wszystkie poza grupa `anulowane`),
- pobiera agregaty dzienne z repozytorium,
- buduje tabele z dynamicznymi kolumnami kanalow i stopka `Razem`.
- Repository:
- liczy kanaly jako `allegro` oraz `shoppro:{integration_id}`,
- dla statusu efektywnego allegro stosuje mapowanie `allegro_order_status_mappings`,
- zwraca zagregowane rekordy dzien/kanal.
## Glowny przeplyw Cron
- Trigger:
- `GET /cron` (public token) lub web-cron w `Application::maybeRunCronOnWeb`.
- `CronRunner::run(limit)` przetwarza aktywne zadania.
- Obslugiwane joby:
- `allegro_token_refresh`
- `allegro_orders_import`
- `allegro_status_sync`
- `shoppro_orders_import`
- `shoppro_order_status_sync`
- `shoppro_payment_status_sync`
- `shipment_tracking_sync`
- `automation_history_cleanup`
- `order_status_aged`
## Automatyzacja
- Triggerowana z wielu miejsc (m.in. zmiana statusu, przesylki, platnosci, wystawienie paragonu, cron age).
- `AutomationService`:
- wyszukuje aktywne reguly po `event_type`,
- sprawdza warunki,
- wykonuje akcje (`send_email`, `issue_receipt`, `update_shipment_status`, `update_order_status`),
- zapisuje wynik do `automation_execution_logs`.
- Warunek `order_status` czyta status z kontekstu eventu:
- `new_status` dla eventow zmianowych (`order.status_changed`),
- `current_status` dla eventu czasu w statusie (`order.status_aged`).
- Akcja `send_email` ma opcjonalna flage `send_once_per_order`:
- konfiguracja trzymana w `automation_actions.action_config`,
- deduplikacja oparta o `automation_email_once_deliveries` (`rule_id + action_id + order_id` UNIQUE),
- wpis "wyslano raz" zapisywany tylko po udanej wysylce (`EmailSendingService::send(...)->success = true`).
## Shipment tracking — mapowanie statusow kuriera
- `ShipmentTrackingHandler` (job `shipment_tracking_sync`) iteruje po aktywnych paczkach i pobiera status z API przewoznika (`Inpost/Apaczka/AllegroTrackingService`).
- Serwisy zwracaja `{status, status_raw, description}`, gdzie `status` pochodzi z `DeliveryStatus::normalize($provider, $raw)` (hardcoded PROVIDER_MAPS).
- Handler na starcie wczytuje overrides z `delivery_status_mappings` (raz per uruchomienie) i po kazdym wyniku stosuje `DeliveryStatus::normalizeWithOverrides()` — pozwala to przypisac nowe raw statusy kuriera przez UI bez zmian w kodzie.
- Strona `/settings/delivery-status-mappings`:
- Pokazuje defaulty + overrides + sekcje „Niezmapowane statusy wykryte w systemie" (distinct raw statusy z `shipment_packages` nie wystepujace w defaultach ani overrides).
- Bulk form zapisuje do `delivery_status_mappings` (override = normalized inny niz default LUB raw nie ma defaultu).
- Badge w sidebar pokazuje sumaryczna liczbe niezmapowanych statusow (`DeliveryStatusMappingRepository::countAllUnmappedForBadge`).
- Przy zmianie normalized status (previous != new) handler wywoluje `automation.trigger('shipment.status_changed', ...)`.
## Printing
- Panel tworzy job `print_jobs` przez `/api/print/jobs`.
- Klient desktop pobiera pending joby przez API key.
- Klient pobiera etykiete i zamyka job przez `/complete`.
- Konfiguracja i zarzadzanie kluczami: `PrintSettingsController` + `print_api_keys`.
## Projekt generation
- `project_mappings` mapuje wzorzec nazwy produktu na `script_name` i `output_dir`.
- `order_items.project_generated` i `project_generated_at` trzymaja status wygenerowania artefaktu.
- UI konfiguracji: `/settings/project-mappings`.
## Bezpieczenstwo
- Session auth dla panelu.
- API key auth dla zdalnego klienta druku.
- CSRF dla POST w panelu.
- Sekrety integracji szyfrowane przez `IntegrationSecretCipher`.
## Zaleznosci miedzy modulami
- `Orders` korzysta z `Automation`, `Email`, `Printing`, `Shipments`, `Settings`.
- `Shipments` korzysta z `Orders`, `CompanySettings`, `Automation`.
- `Cron` spina `Settings`, `Orders`, `Shipments`, `Automation`, `Email`.
- `Automation` korzysta z `Orders`, `Email`, `Accounting`, `Shipments`.

View File

@@ -1,193 +0,0 @@
# DB_SCHEMA
## Zakres i zrodlo prawdy
- Schemat wynika z migracji SQL w `database/migrations`.
- Dokument odzwierciedla stan repo na 2026-04-25 (migracje do `20260425_000102`).
## Ostatnie istotne migracje
- `20260425_000102_create_automation_email_once_deliveries_table.sql`
- `20260422_000101_backfill_delivery_status_unknowns.sql`
- `20260413_000100_ensure_orders_delivery_payment_columns.sql`
- `20260412_000099_add_requires_photo_to_project_mappings.sql`
- `20260412_000098_rename_external_status_id_to_status_code.sql`
- `20260412_000097_add_project_generation.sql`
- `20260410_000081_add_remember_token_to_users.sql`
- `20260408_000090_backfill_delivery_price.sql`
- `20260407_000083_allegro_pull_status_mappings.sql`
- `20260407_000080_backfill_personalization_message.sql`
- `20260407_000079_pull_status_mappings.sql`
- `20260407_000078_reverse_status_mapping_keys.sql`
## Kompensacyjne migracje ensure_
- `000038` - naprawa brakujacej tabeli `order_status_mappings`.
- `000039` - uzupelnienie brakujacych kolumn fetch w `integrations`.
- `000040` - seed/naprawa harmonogramu `shoppro_orders_import`.
- `000041` - seed/naprawa harmonogramu `shoppro_order_status_sync` + direction.
- `000042` - seed/naprawa `shoppro_payment_status_sync` + kolumny payment sync.
- `000100` - kompensacja brakujacych kolumn `orders.payment_method` i `orders.delivery_method`.
## Kluczowe tabele
### users
- Uzytkownicy panelu.
- Wazne kolumny:
- `id`, `email` (UNIQUE), `password_hash`, `remember_token` (od `000081`), `is_active`, `created_at`, `updated_at`.
### orders
- Glowna tabela zamowien (model neutralny wzgledem zrodla).
- Wazne kolumny:
- `id`, `source`, `integration_id`, `source_order_id`, `internal_order_number` (UNIQUE),
- `status_code` (rename z `external_status_id` w `000098`),
- `payment_status`, `total_paid`, `payment_method`,
- `delivery_method`, `delivery_price` (dodane/backfill `000090`),
- daty zrodlowe i techniczne, `payload_json`, `preferences_json`.
- Wydajnosc:
- indeksy na `source`, `status_code`, `ordered_at`, `(source, status_code)`.
### order_items
- Pozycje zamowienia.
- Wazne kolumny:
- `order_id`, `source_item_id`, `name`, `quantity`, `price_gross`, `media_url`, `payload_json`,
- `personalization` (`000075`, backfill `000080`),
- `project_generated`, `project_generated_at` (`000097`).
### order_payments
- Platnosci zamowien (import i reczne).
- Wazne kolumny:
- `order_id`, `source_payment_id`, `payment_type_id`, `payment_date`, `amount`, `currency`, `payload_json`.
- Klucz unikalny:
- `(order_id, source_payment_id)`.
### order_status_history
- Historia zmian statusow zamowienia.
- Wazne kolumny:
- `order_id`, `from_status_id`, `to_status_id`, `change_source`, `changed_by`, `changed_at`.
### order_activity_log
- Uniwersalny log aktywnosci (`status_change`, `payment`, `shipment`, `import`, itd.).
- Wazne kolumny:
- `order_id`, `event_type`, `summary`, `details_json`, `actor_type`, `actor_name`, `created_at`.
### order_status_groups i order_statuses
- Slownik statusow biznesowych i grup statusow.
- Relacja:
- `order_statuses.group_id -> order_status_groups.id` (`ON DELETE CASCADE`).
### integrations
- Bazowa tabela instancji integracji.
- Wazne kolumny:
- `type`, `name`, `base_url`, `api_key_encrypted`, `is_active`,
- `orders_fetch_enabled`, `orders_fetch_start_date`,
- `order_status_sync_direction`, `payment_sync_status_codes_json`,
- pola diagnostyczne testu polaczenia.
### integration_order_sync_state
- Kursor synchronizacji per integracja.
- Wazne kolumny:
- `integration_id` (PK), `last_synced_order_updated_at`, `last_synced_source_order_id`,
- `last_success_at`, `last_status_pushed_at`, `last_error`.
### order_status_mappings
- Mapowania push statusow dla shopPRO.
- Po `000078` klucz unikalny:
- `(integration_id, orderpro_status_code)`.
- Dodatkowe indeksy:
- `(integration_id, shoppro_status_code)`.
### order_status_pull_mappings
- Dedykowane mapowanie pull shopPRO -> orderPRO (`000079`).
- Klucz unikalny:
- `(integration_id, shoppro_status_code)`.
### allegro_order_status_mappings
- Mapowania statusow Allegro dla kierunku push.
- Po `000078` klucz unikalny:
- `orderpro_status_code`.
- Indeks lookup:
- `allegro_status_code`.
### allegro_order_status_pull_mappings
- Dedykowane mapowanie pull Allegro -> orderPRO (`000083`).
- Klucz unikalny:
- `allegro_status_code`.
### allegro_integration_settings
- OAuth i tokeny Allegro per srodowisko/integracja.
- Wazne kolumny:
- `integration_id` (UNIQUE FK), `environment`, `client_id`, `client_secret_encrypted`,
- `redirect_uri`, `access_token_encrypted`, `refresh_token_encrypted`, `token_expires_at`,
- `orders_fetch_enabled`, `orders_fetch_start_date`.
### apaczka_integration_settings i inpost_integration_settings
- Ustawienia providerow wysylek, powiazane 1:1 z `integrations` przez `integration_id`.
### company_settings
- Dane firmy/nadawcy, parametry domyslnych paczek i pola ksiegowe.
### receipt_configs, receipts, receipt_number_counters
- Konfiguracja numeracji, wystawione paragony i liczniki numerow.
### email_mailboxes, email_templates, email_logs
- Skrzynki SMTP, szablony i log wysylki.
### automation_rules, automation_conditions, automation_actions, automation_execution_logs
- Definicje regul i historia ich wykonan.
### automation_email_once_deliveries
- Rejestr jednorazowych wysylek e-mail dla akcji automatyzacji (`send_once_per_order`).
- Klucz unikalny:
- `(rule_id, action_id, order_id)` - gwarancja, ze ta sama akcja e-mail reguly nie zostanie oznaczona drugi raz dla tego samego zamowienia.
- Relacje:
- `rule_id -> automation_rules.id` (CASCADE),
- `action_id -> automation_actions.id` (CASCADE),
- `order_id -> orders.id` (CASCADE).
### shipment_packages
- Rekordy przesylek i etykiet.
- Wazne kolumny trackingowe (od `000060`):
- `delivery_status`, `delivery_status_raw`, `delivery_status_updated_at`.
### delivery_status_mappings
- Mapowanie statusow przewoznikow na status biznesowy (`provider + raw_status` UNIQUE).
### carrier_delivery_method_mappings
- Wspolne mapowanie form dostawy na providerow wysylki.
### shipment_presets
- Presety nadania wykorzystywane przez API presetow przesylek.
### print_api_keys
- Klucze API dla klienta desktop druku.
- Kolumny:
- `key_hash` (UNIQUE), `key_prefix`, `is_active`, `last_used_at`.
### print_jobs
- Kolejka wydruku etykiet.
- Kolumny:
- `order_id`, `package_id`, `label_path`, `status`, `created_by`, `created_at`, `completed_at`.
### project_mappings
- Mapowanie produktu na skrypt generujacy projekt (`000097`).
- Wazne kolumny:
- `product_name_pattern`, `script_name`, `output_dir`, `requires_photo` (`000099`), `is_active`.
## Harmonogram cron (cron_schedules)
- Wykorzystywane typy jobow:
- `allegro_token_refresh`
- `allegro_orders_import`
- `allegro_status_sync`
- `shoppro_orders_import`
- `shoppro_order_status_sync`
- `shoppro_payment_status_sync`
- `shipment_tracking_sync`
- `automation_history_cleanup`
- `order_status_aged`
## Notatki kompatybilnosci
- Migracje `ensure_` i `000100` sa idempotentne i kompensuja roznice miedzy srodowiskami.
- Rename `orders.external_status_id -> status_code` wymaga, aby nowe query i dokumentacja uzywaly tylko `status_code`.
- `delivery_price` jest backfillowane z JSON payloadow importu (Allegro/shopPRO).
## Zmiany 2026-04-19
- Brak zmian schematu bazy danych dla funkcji `Statystyki -> Zamowienia`.
- Raport korzysta z istniejacych kolumn i tabel: `orders`, `integrations`, `order_status_groups`, `order_statuses`, `allegro_order_status_mappings`.

View File

@@ -1,3 +0,0 @@
# DECISIONS
> Kluczowe decyzje techniczne i ich uzasadnienia.

View File

@@ -1,3 +0,0 @@
# STACK
> Stack technologiczny, wersje, zaleznosci, srodowisko.

View File

@@ -1,128 +0,0 @@
# TECH_CHANGELOG
> Chronologiczny log zmian technicznych — co i dlaczego.
## 2026-04-25 - Fix: order_status condition for order.status_aged
Powod: reguly order.status_aged z warunkiem order_status nie wykonywaly akcji, bo warunek sprawdzal tylko context.new_status, a ten event przekazuje context.current_status.
Zmiany:
- src/Modules/Automation/AutomationService.php
- evaluateOrderStatusCondition: fallback z new_status na current_status.
- tests/Unit/AutomationServiceTest.php
- nowy test regresyjny: order.status_aged + current_status spelnia warunek order_status i wykonuje akcje.
Efekt:
- reguly order.status_aged z warunkiem statusu zamowienia dzialaja poprawnie,
- eventy zmianowe order.status_changed nadal korzystaja z new_status bez regresji.
## 2026-04-25 - Automatyzacja: jednorazowa wysylka e-mail per zamowienie (Phase 107)
**Powod**: event `order.status_aged` jest cykliczny, przez co ta sama regula mogla wysylac klientowi ten sam e-mail przy kazdym przebiegu crona. Potrzebna byla kontrola "wyslij tylko raz dla tego zamowienia".
**Zmiany**:
- `database/migrations/20260425_000102_create_automation_email_once_deliveries_table.sql`:
- nowa tabela `automation_email_once_deliveries` z FK do `automation_rules`, `automation_actions`, `orders`;
- `UNIQUE (rule_id, action_id, order_id)` - twarda deduplikacja.
- `src/Modules/Automation/AutomationEmailOnceRepository.php` (nowy):
- `wasSent(ruleId, actionId, orderId)` - sprawdzenie czy akcja e-mail byla juz wykonana jednorazowo;
- `markSent(ruleId, actionId, orderId)` - zapis idempotentny (`INSERT ... ON DUPLICATE KEY UPDATE`).
- `src/Modules/Automation/AutomationController.php`:
- `parseActionConfig(send_email)` rozszerzone o `send_once_per_order` (0/1), domyslnie `0`.
- `resources/views/automation/form.php` i `public/assets/js/modules/automation-form.js`:
- dodany checkbox w akcji `Wyslij e-mail`: "Wyslij tylko raz dla tego zamowienia".
- `src/Modules/Automation/AutomationService.php`:
- akcja `send_email` uwzglednia `rule_id` i `action_id`;
- przy `send_once_per_order=1` pomija wysylke, gdy `wasSent(...) = true`;
- `markSent(...)` wykonywany tylko po udanej wysylce (`success=true`), wiec blad SMTP nie blokuje kolejnej proby.
- `src/Modules/Cron/CronHandlerFactory.php` i `routes/web.php`:
- podpiecie nowego repozytorium do konstruktora `AutomationService`.
- `tests/Unit/AutomationServiceTest.php` (nowy):
- test scenariusza jednorazowego (drugi trigger nie wysyla),
- test scenariusza domyslnego (bez flagi wysyla wielokrotnie).
**Efekt**:
- Operator moze zaznaczyc jednorazowosc na poziomie konkretnej akcji e-mail.
- Dla jednego zamowienia i jednej akcji reguly mail nie duplikuje sie przy kolejnych uruchomieniach crona.
- Zachowanie domyslne pozostaje bez zmian dla istniejacych regul bez zaznaczonej opcji.
## 2026-04-22 - Alert klienta z historia zwrotow (Phase 106)
**Powod**: Operator wysylkowy nie widzial wczesniej, ze kupujacy juz raz nie odebral przesylki (`delivery_status='returned'`) zanim wyslal kolejna paczke — generowalo to kolejne koszty wysylki i magazynowania.
**Zmiany**:
- `src/Modules/Orders/OrdersRepository.php`:
- nowa metoda prywatna `customerReturnedCountSubquerySql(orderAlias, addressAlias)` — generuje correlated subquery zliczajaca inne zamowienia klienta biezacego wiersza z paczka `returned`.
- `buildListSql()` — dodana kolumna `customer_returned_count` (EXISTS-style COUNT DISTINCT) do SELECT listy zamowien.
- `transformOrderRow()` — przekazuje `customer_returned_count` do wiersza.
- `findDetails()` — JOIN `order_addresses` typu customer + subquery `customer_returned_count`; zwraca rowniez `buyer_email`, `buyer_phone`, `buyer_name` w `$order`.
- `src/Modules/Shipments/ShipmentPackageRepository.php`:
- nowa metoda `findReturnedByCustomer(array customer, int excludeOrderId, int limit=10)` — lista zwroconych paczek klienta (match OR: email lower+trim, phone tylko cyfry >=6, name lower+trim), sortowana po dacie malejaco.
- `src/Modules/Orders/OrdersController.php`:
- `toTableRow()` — dodano badge `zwroty: N` w kolumnie buyer + klasa `is-risk-return` na `<tr>` gdy `customer_returned_count >= 1` (kompozycja z klasa aged orders z Phase 101).
- `show()` — oblicza `$customerRiskInfo` i przekazuje do widoku.
- nowe metody prywatne: `buildCustomerRiskInfo(order, orderId)`, `composeCustomerRiskText(count, email, phone, name)` — budowa tresci alertu zaleznie od dostepnosci pol (phone+email / email / phone / name).
- `resources/views/orders/show.php` — banner `customer-risk-banner` u samej gory karty szczegolow (pod naglowkiem, nad flash messages i status change), z `<details>` rozwijajacym liste zamowien ze zwrotem (order_id, data, tracking, provider).
- `resources/scss/modules/_customer-risk-alert.scss` (nowy modul):
- `.customer-risk-banner` + `__icon`, `__body`, `__text`, `__list`, `__table` — czerwony banner z pastelowym tlem i lewym paskiem 4px.
- `.risk-return-badge` — maly inline badge przy buyer name.
- `tr.is-risk-return` — lewy pasek wiersza w tabeli zamowien.
- `resources/scss/app.scss` — `@use "modules/customer-risk-alert"`.
- `public/assets/css/app.css` — rebuild przez `npm run build:css`.
**Wymagania**:
- MySQL 8.0+ (REGEXP_REPLACE w subquery matching phone).
- Wynik licznika wyliczany on-the-fly (brak migracji DB, brak materializacji). Indeksy na `order_addresses(order_id, address_type)` i `shipment_packages(order_id, delivery_status)` sugerowane jesli lista zamowien przekroczy ~50k wierszy — zglosic w kolejnym planie.
**Anti-fraud/false positive**:
- Self-exclusion: `sp.order_id != o.id` — biezace zamowienie nie wlicza sie do licznika.
- Minimum phone length 6 cyfr — eliminuje match na "", "+48", krotkich fragmentach.
- OR matching po email/phone/name moze dac faĹszywe pozytywy dla popularnych imion; swiadome odstepstwo (user wymagal szerokiego matchingu).
## 2026-04-22 - Mapowanie statusow dostawy: wykrywanie niezmapowanych + runtime overrides
**Powod**: zamowienia (np. OP000000357, OP000000638) pokazywaly `delivery_status=unknown`, mimo ze apaczka API zwracala `RETURNED_TO_SHIPPER`. UI `/settings/delivery-status-mappings` pokazywalo wylacznie statusy obecne w defaultach kodu — nowe raw statusy kuriera nie mialy gdzie zostac przypisane bez zmiany kodu.
**Faza A — quick fix (defaulty + backfill)**:
- `src/Modules/Shipments/DeliveryStatus.php`: dodano 3 brakujace mapowania:
- apaczka `RETURNED_TO_SHIPPER` -> `returned`
- apaczka `PICKUP` -> `in_transit`
- allegro_wza `collected_from_sender` -> `in_transit`
- `database/migrations/20260422_000101_backfill_delivery_status_unknowns.sql`: backfill 11 paczek (3 + 7 + 1). Bez trigger `shipment.status_changed` (backfill starych rekordow, nie runtime event).
**Faza B — rozwiazanie systemowe**:
- `DeliveryStatusMappingRepository::listUnmappedRawStatuses(provider, knownKeys)` — zwraca raw statusy z `shipment_packages` ktore nie wystepuja w defaultach ani overrides DB; z licznikiem paczek i ostatnim wystapieniem.
- `DeliveryStatusMappingController::index` — przekazuje `unmappedRawStatuses` do widoku; rowniez wlacza do listy overrides, ktore nie maja odpowiadajacego defaultu (user moze dodac completely custom raw statusy).
- `resources/views/settings/delivery-status-mappings.php` — nowa sekcja „Niezmapowane statusy wykryte w systemie (N)" z form submit do `save-bulk`. Pomaranczowy akcent aby wyroznic od defaultow.
- `ShipmentTrackingHandler` — dostal `?DeliveryStatusMappingRepository` w konstruktorze; po kazdym `service->getDeliveryStatus()` wywoluje `DeliveryStatus::normalizeWithOverrides(provider, raw, overrides)` jesli overrides istnieja. Dzieki temu override z UI dziala runtime bez zmian kodu.
- `CronHandlerFactory` — przekazuje `DeliveryStatusMappingRepository` do `ShipmentTrackingHandler`.
**Faza C — badge w menu**:
- `Application` — dodano statyczny holder `self::$instance` + `Application::instance()`, aby layout mial dostep do kontenera.
- `DeliveryStatusMappingRepository::countAllUnmappedForBadge()` — zlicza niezmapowane raw statusy dla wszystkich providerow UI (inpost, apaczka, allegro_wza); cache per-request.
- `resources/views/layouts/app.php` — badge pomaranczowy przy linku „Mapowanie statusow dostawy" z liczba niezmapowanych statusow (jesli > 0). Try/catch — brak badge'a nie psuje layoutu.
- `resources/scss/app.scss` — klasa `.sidebar__badge`.
**Efekt**: user nie musi modyfikowac kodu przy kazdym nowym statusie kuriera. Badge sygnalizuje pojawienie sie nieznanych statusow; sekcja na stronie mapowan pozwala przypisac je do znormalizowanych kategorii. Cron po nastepnym tick'u automatycznie przeliczy istniejace paczki zgodnie z override.
## 2026-04-19 - Statystyki zamowien (menu + raport dzienny)
- Dodano nowy modul `Statistics`:
- `OrdersStatisticsController` (obsluga filtrow i render strony `/statistics/orders`).
- `OrdersStatisticsRepository` (agregacje dzienne po kanalach i grupach statusow).
- Dodano nowa pozycje menu: `Statystyki -> Zamowienia`.
- Dodano widok raportowy z filtrem zakresu dat, multiselectem kanalow i multiselectem grup statusow.
- Dodano tabele dzienna z metrykami `Ilosc`, `Netto`, `Brutto` per kanal oraz stopka `Razem`.
- Dodano tlumaczenia `statistics.orders.*` i `navigation.statistics*`.
- Brak zmian migracyjnych i brak zmian schematu bazy danych.
## 2026-04-19 - Fix: Statystyki nie pokazywaly zamowien (kolizja collation)
- `OrdersStatisticsRepository::channelSql()` generowal wyrazenie `CONCAT("shoppro:", CAST(integration_id AS CHAR))`, ktore w MySQL dawalo wynik z collation `utf8mb4_bin`. W zestawieniu z parametrami bindowanymi (`utf8mb4_general_ci`) MySQL rzucal `SQLSTATE[HY000] 1271 Illegal mix of collations for operation 'in'`.
- Blad byl polykany przez `try/catch (Throwable)` w `aggregateByDay()`, przez co widok dostawal pusta tablice i nie pokazywal zadnych zamowien.
- Fix: dodano jawne `COLLATE utf8mb4_unicode_ci` na `CAST(integration_id AS CHAR)` oraz na calym wyrazeniu `CASE` zwracajacym `channel_key`, tak aby klucz kanalu mial spojne collation zgodne z `orders.source`.
## 2026-04-19 - Statystyki: fallback netto 23% VAT
- `OrdersStatisticsRepository::netAmountSql()` dostal fallback: jesli `orders.total_without_tax` jest `NULL` lub `0`, a `orders.total_with_tax` ma wartosc, netto wyliczane jest jako `ROUND(total_with_tax / 1.23, 2)`.
- Uzasadnienie: shopPRO nie wysyla netto ani na zamowieniu ani w pozycjach (`order_items.original_price_without_tax` jest puste), wiec bez fallbacku kolumna `Netto` w statystykach pokazywala 0.
- Uwaga: fallback zaklada 23% VAT. Ostateczne rozwiazanie (prawidlowy netto z shopPRO / z `order_items.tax_rate`) opisane w `.paul/TODO.md` (tag `STAT-NET`).

View File

@@ -1,233 +0,0 @@
# TODO
> Luzny parking pomyslow, rzeczy do sprawdzenia.
15. [x] W tym miejscu odwróć kolejność: najpierw źródło potem ID, <div class="orders-ref__meta"><span>f6079660-1af8-11f1-a7c9-231cf6ef29d1</span><span>allegro</span></div>
17. [x] Na liście zamówien jak jest źródło i id zamówienia to zamiast shopPRO musi pisać która integracja konkretnie. Oraz dodajemy napis ID: ...D
## SonarQube — post plany 02-02 i 02-03 (skan 2026-03-13)
30. [] [Sonar 2026-03-13] Brak nowych issues — AllegroStatusSyncService i ShopproOrderSyncStateRepository czyste. Pre-existing issues w ShopproOrdersSyncService (god class) i Application.php niezmienione przez nasze modyfikacje.
## SonarQube — post plan 01-01 (skan 2026-03-12)
28. [] [Sonar 2026-03-12] php:S1142 — AllegroTokenManager::resolveToken() ma 4 returny (powyżej limitu 3) (1x nowe)
29. [] [Sonar 2026-03-12] php:S112 — AllegroTokenManager rzuca generic RuntimeException zamiast dedykowanej klasy wyjątku (3x nowe)
## SonarQube — code quality (327 issues, skan 2026-03-12)
18. [] php:S112 (95x) — zastąpić generic `new \Exception` konkretnymi klasami wyjątków
19. [] php:S1142 (57x) — zredukować liczbę `return` w metodach (early return wydzielić metody)
20. [] php:S1192 (40x) — wyciągnąć powtarzające się string literals do stałych
21. [] php:S3776 (31x) — obniżyć złożoność kognitywną metod (wydzielić logikę do pomocniczych metod)
22. [] Web:S6827 (15x) — dodać brakujące atrybuty `alt` na tagach `<img>`
23. [] Web:S6819 (12x) — poprawić dostępność HTML (accessibility)
24. [] php:S1172 (11x) — usunąć nieużywane parametry funkcji
25. [] php:S3358 (11x) — rozwinąć zagnieżdżone operatory ternarne
26. [] php:S1448 (6x) — podzielić klasy z za dużą liczbą metod
27. [] php:S138 (4x) — skrócić zbyt długie metody
31. [x] blokować wystawienie kolejnego paragonu do tego samego zamówienia, nie całkowicie, ale powinno ono wymagać wyrażnego potwierdzenia w formie alertu
## SonarQube — post plan 19-01 (skan 2026-03-22)
32. [] [Sonar 2026-03-22] php:S4833 — show.php:696 Replace `require` with namespace import `use` keyword (1x)
33. [] [Sonar 2026-03-22] php:S2003 — show.php:696 Replace `require` with `require_once` (1x)
34. [] [Sonar 2026-03-22] php:S1448 — OrdersController ma 22 metody (limit 20) — rozdzielić (1x)
35. [] [Sonar 2026-03-22] php:S1142 — OrdersController::bulkPrint() ma 5 returnów (limit 3) (1x)
36. [] [Sonar 2026-03-22] php:S1068 — AllegroIntegrationController nieużywane pole $statusDiscoveryService (1x, pre-existing)
37. [x] Nie działa zapisywanie numer REGON
38. [x] Customowe przyciski paczek
39. [x] Zmiana głównego koloru przycisków z niebieskiego na inny (bo się z nagłówkami myli)
40. [x] Usunąć przycisk "Drukuj etykiety" z widoku https://orderpro.projectpro.pl/orders/list razem z mechanizmem, który to obsługuje
41. [x] Jaki jest sens tylu logów z importu allegro np w tym zamówieniu https://orderpro.projectpro.pl/orders/29, skąd taka ilość, co jest pobierane i sprawdzane?
42. [x] Nowy zdarzenie w zadaniach automatyczny -> zmiana statusu przesyłki, oraz nowe waruneki dla zdarzenia "zmiana statusu przesyłki": przesyłka zarejestrowana, przesyłka do odbioru, przesyłka nadana w punkcie, przesyłka odebrana, przesyłka anulowana, przesyłka nieodebrana, przesyłka odebrana (zwrot), chyba że takich statusów się nie da to trzeba sprawdzić jakie się da.
43. [x] Usuwanie wpisu z kolejki druku etykiet
## SonarQube — pełna lista błędów (new code period, skan 2026-03-28)
<!-- SONAR_ERRORS_START -->
- Źródło: SonarQube API `issues/search` dla `orderPRO` (`inNewCodePeriod=true`)
- Razem issue: 174
- Severity: MAJOR=110, CRITICAL=47, MINOR=16, BLOCKER=1
- Typy: CODE_SMELL=170, BUG=3, VULNERABILITY=1
### Lista issue
- [ ] [MINOR][BUG][php:S2003] resources/views/accounting/index.php:31 - Replace "require" with "require_once". (key: 6fe7d2de-4802-459e-a5a7-f9f1be183b8e)
- [ ] [MINOR][BUG][php:S2003] resources/views/orders/show.php:780 - Replace "require" with "require_once". (key: 98cef6cd-bb23-4bc8-acd9-01d4417f25e6)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/layouts/app.php:80 - Anchors must have content and the content must be accessible by a screen reader. (key: 64d29d8b-146d-4a20-803d-4aeb035b0391)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/orders/receipt-create.php:123 - Anchors must have content and the content must be accessible by a screen reader. (key: bbd01366-d6f2-4745-b5b2-8b06c3aec574)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/orders/show.php:669 - Anchors must have content and the content must be accessible by a screen reader. (key: 351a396c-239c-468d-a1bf-391adabd1b0a)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/receipts/show.php:19 - Anchors must have content and the content must be accessible by a screen reader. (key: cb8922ca-ccc4-4518-9466-e9c40d0aec4b)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/receipts/show.php:20 - Anchors must have content and the content must be accessible by a screen reader. (key: 29dd7510-9b95-4f90-9f47-0cf39d6318f2)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/receipts/show.php:21 - Anchors must have content and the content must be accessible by a screen reader. (key: 15deb0d4-dae8-4ede-b371-969ed668e0b7)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/settings/accounting.php:50 - Anchors must have content and the content must be accessible by a screen reader. (key: cffe0ae9-1c3f-4e5b-99d9-3dd6d528252b)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/settings/accounting.php:133 - Anchors must have content and the content must be accessible by a screen reader. (key: 816ae9c0-c782-406f-a3b4-d6d810119ebd)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/settings/delivery-status-mappings.php:24 - Anchors must have content and the content must be accessible by a screen reader. (key: a6e860d2-54dd-485b-82db-79415b2d4cb7)
- [ ] [MINOR][CODE_SMELL][Web:S6827] resources/views/settings/printing.php:138 - Anchors must have content and the content must be accessible by a screen reader. (key: 43949459-6186-48cf-b099-36064429e0dc)
- [ ] [MINOR][CODE_SMELL][php:S1488] src/Modules/Accounting/ReceiptRepository.php:139 - Immediately return this expression instead of assigning it to the temporary variable "$number". (key: 4cf8b055-d030-4fe5-b917-c4eae64c2e4d)
- [ ] [MINOR][CODE_SMELL][php:S1481] src/Modules/Settings/EmailTemplateController.php:91 - Remove this unused "$t" local variable. (key: 5e00928d-3bfa-40cb-82e3-f6d1886f8b09)
- [ ] [MINOR][CODE_SMELL][php:S1481] src/Modules/Settings/ShopproIntegrationsController.php:118 - Remove this unused "$redirectBase" local variable. (key: 22a0c0d1-5edf-4a80-8e42-dcab51ec880b)
- [ ] [MINOR][CODE_SMELL][php:S1481] src/Modules/Settings/ShopproIntegrationsController.php:185 - Remove this unused "$redirectBase" local variable. (key: 2d95f5c7-5f6b-4e60-a48e-59fe991831f3)
- [ ] [MAJOR][CODE_SMELL][php:S4833] resources/views/accounting/index.php:31 - Replace "require" with namespace import mechanism through the "use" keyword. (key: 349e8aeb-dc6d-4ac9-9c7e-f9b4cab594aa)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/automation/form.php:6 - Extract this nested ternary operation into an independent statement. (key: d9b92d37-73d9-4d70-804a-bde593b3253f)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/automation/form.php:7 - Extract this nested ternary operation into an independent statement. (key: 21a944af-e4fe-427a-9b30-4fedfb9f2211)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/automation/form.php:64 - Extract this nested ternary operation into an independent statement. (key: e253095f-e15e-468a-ac77-e143109b17fc)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/automation/index.php:21 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 0ce5f805-0818-495e-b8d1-fe8049b91a75)
- [ ] [MAJOR][CODE_SMELL][Web:S6853] resources/views/components/table-list.php:159 - A form label must be associated with a control and have accessible text. (key: b982e00b-4a3f-4e0c-bff4-f069fb33863a)
- [ ] [MAJOR][CODE_SMELL][Web:S6853] resources/views/orders/partials/email-send-modal.php:32 - A form label must be associated with a control and have accessible text. (key: e7bef918-f0fa-4163-a0ef-a1ef85202dd7)
- [ ] [MAJOR][CODE_SMELL][Web:S6853] resources/views/orders/partials/email-send-modal.php:36 - A form label must be associated with a control and have accessible text. (key: 3a807055-dbce-4e2b-a3d0-f464a1541203)
- [ ] [MAJOR][CODE_SMELL][Web:S6853] resources/views/orders/partials/email-send-modal.php:45 - A form label must be associated with a control and have accessible text. (key: d0367ef9-f2f2-4fb6-bf5e-8f63fa365dc7)
- [ ] [MAJOR][CODE_SMELL][php:S1066] resources/views/orders/show.php:232 - Merge this if statement with the enclosing one. (key: 60895f28-eb9d-4856-835f-ba52879ddf72)
- [ ] [MAJOR][CODE_SMELL][php:S4833] resources/views/orders/show.php:780 - Replace "require" with namespace import mechanism through the "use" keyword. (key: 7811b6ca-5d01-4735-9210-ec33bda2cb15)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/settings/accounting.php:15 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 070e9668-dbf0-4289-810a-3cf82a63c4dc)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/settings/accounting.php:125 - Extract this nested ternary operation into an independent statement. (key: 423b1c28-9cec-42e5-a7d6-04c76b0d85d1)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/settings/delivery-status-mappings.php:17 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 8589b27e-9d53-4391-bb9a-62b51bef8a09)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/settings/email-mailboxes.php:15 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 8e8fe629-0de9-4d70-a5b8-226f1384abf3)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/settings/email-mailboxes.php:148 - Extract this nested ternary operation into an independent statement. (key: a74eedd7-a231-4881-965f-24e56c1be8e7)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/settings/email-templates.php:18 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 9c0e2dc4-5c2c-46b2-a8d7-7bb9d4315f81)
- [ ] [MAJOR][CODE_SMELL][php:S3358] resources/views/settings/email-templates.php:115 - Extract this nested ternary operation into an independent statement. (key: 26857bc5-9bd2-4a33-86e6-060300b057fb)
- [ ] [MAJOR][CODE_SMELL][Web:S6819] resources/views/settings/printing.php:16 - Use <output> instead of the status role to ensure accessibility across all devices. (key: 298ffe0f-babf-4b9f-b919-f4b113b374b0)
- [ ] [MAJOR][CODE_SMELL][php:S108] src/Core/Application.php:305 - Either remove or fill this block of code. (key: 96a6ddf7-f8ef-44d9-b7ad-7a0121bb5dbf)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Accounting/ReceiptController.php:78 - This method has 5 returns, which is more than the 3 allowed. (key: 575a0744-73ce-4613-9695-1c738c76c6a8)
- [ ] [MAJOR][CODE_SMELL][php:S1068] src/Modules/Automation/AutomationController.php:36 - Remove this unused "$translator" private field. (key: a0396a4b-e5b1-4170-8fc3-cfaec4b3dc30)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Automation/AutomationController.php:43 - Remove the unused function parameter "$request". (key: 65a90d6a-ad36-4447-b2f9-ecdc7ba8adde)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Automation/AutomationController.php:61 - Remove the unused function parameter "$request". (key: 870d63e8-0901-448f-94a1-0e8b01912dae)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Automation/AutomationController.php:106 - This method has 4 returns, which is more than the 3 allowed. (key: 607368ad-fb0c-4f55-a356-7a7bbb2171c5)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Automation/AutomationController.php:244 - This method has 5 returns, which is more than the 3 allowed. (key: 4f1cf18f-0bfb-464f-a91c-96d55f727407)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Automation/AutomationController.php:386 - This method has 5 returns, which is more than the 3 allowed. (key: 30a04d0a-c531-4afc-9ea7-b4e3fac8bc9b)
- [ ] [MAJOR][CODE_SMELL][php:S112] src/Modules/Automation/AutomationRepository.php:133 - Define and throw a dedicated exception instead of using a generic one. (key: 3d4896bb-1b99-4ef1-9f5e-1882a2c96111)
- [ ] [MAJOR][CODE_SMELL][php:S1448] src/Modules/Automation/AutomationService.php:13 - Class "AutomationService" has 24 methods, which is greater than 20 authorized. Split it into smaller classes. (key: 306419f7-dc3e-426b-9f2b-af3da48cf961)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Automation/AutomationService.php:143 - This method has 4 returns, which is more than the 3 allowed. (key: be2ee4d3-cd59-43cd-8953-cc2e61590751)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Automation/AutomationService.php:249 - This method has 4 returns, which is more than the 3 allowed. (key: a5b8e06b-0d6f-4867-b4f0-9717e074ac2e)
- [ ] [MAJOR][CODE_SMELL][php:S1448] src/Modules/Cron/CronRepository.php:10 - Class "CronRepository" has 22 methods, which is greater than 20 authorized. Split it into smaller classes. (key: f57e5c77-cecf-4451-8cb4-9d3cd107743d)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Cron/ShipmentTrackingHandler.php:22 - Remove the unused function parameter "$payload". (key: df8cb6fd-8f1f-491b-9170-bcda370fcdc6)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Cron/ShipmentTrackingHandler.php:24 - Remove the unused function parameter "$_payload". (key: 4c8e00f0-d82a-4bb2-93e8-368acfddbc94)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Email/AttachmentGenerator.php:37 - This method has 5 returns, which is more than the 3 allowed. (key: ecc23d2e-409a-44da-855c-b0d1803b320c)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Email/EmailSendingService.php:31 - This method has 5 returns, which is more than the 3 allowed. (key: 6627aebd-7dce-4206-8dce-81fcdc7e0f65)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Email/EmailSendingService.php:165 - This method has 4 returns, which is more than the 3 allowed. (key: 3c755950-a760-48a2-806d-1c6977c5ab11)
- [ ] [MAJOR][CODE_SMELL][php:S107] src/Modules/Email/EmailSendingService.php:293 - This function has 11 parameters, which is greater than the 7 authorized. (key: bf3c667b-fefc-4ecc-8cd3-46810cf07b11)
- [ ] [MAJOR][CODE_SMELL][php:S1448] src/Modules/Orders/OrdersController.php:21 - Class "OrdersController" has 22 methods, which is greater than 20 authorized. Split it into smaller classes. (key: 8e4cf728-d4e5-41b9-9aee-e1f83b20fb98)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Orders/OrdersController.php:738 - This method has 5 returns, which is more than the 3 allowed. (key: 345e58a7-989a-4992-895d-e50e2aba8b5d)
- [ ] [MAJOR][CODE_SMELL][php:S1448] src/Modules/Orders/OrdersRepository.php:10 - Class "OrdersRepository" has 29 methods, which is greater than 20 authorized. Split it into smaller classes. (key: 99a725d0-e52c-4511-b2fe-0124ea396530)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Orders/OrdersRepository.php:765 - This method has 6 returns, which is more than the 3 allowed. (key: dee0f8dc-13eb-4bb5-a113-283e103c3e8d)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Printing/ApiKeyMiddleware.php:16 - This method has 5 returns, which is more than the 3 allowed. (key: ad20b5d4-2e4f-45c6-b7d6-67971c8985bf)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Printing/PrintApiController.php:24 - This method has 4 returns, which is more than the 3 allowed. (key: 8a9d1c4c-d76d-48ed-93e7-6c6220e11b60)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Printing/PrintApiController.php:48 - This method has 6 returns, which is more than the 3 allowed. (key: 5239c52c-cdd7-4c54-995e-fc8c079d1f33)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Printing/PrintApiController.php:93 - Remove the unused function parameter "$request". (key: 9e2cd6a3-816f-4600-85c7-539ca9bffa72)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Printing/PrintApiController.php:110 - This method has 5 returns, which is more than the 3 allowed. (key: abd439dc-6d09-4b90-9dbb-9b3ad8e39b00)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroApiClient.php:174 - This method has 4 returns, which is more than the 3 allowed. (key: 65fef8f7-212e-43b9-87de-5e045ff990ea)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroDeliveryMappingController.php:107 - This method has 6 returns, which is more than the 3 allowed. (key: f5b84a65-0df5-4188-9795-826c12de4bf5)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroDeliveryMappingController.php:163 - This method has 4 returns, which is more than the 3 allowed. (key: 76e0cad6-338c-47f8-b19f-b23d379b25c4)
- [ ] [MAJOR][CODE_SMELL][php:S1068] src/Modules/Settings/AllegroIntegrationController.php:54 - Remove this unused "$statusDiscoveryService" private field. (key: 7538d906-57ee-4332-9efe-93f818d96e15)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroIntegrationController.php:580 - This method has 5 returns, which is more than the 3 allowed. (key: 82bb5eef-a7e6-4d56-bc9d-1346dc6ae231)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroIntegrationController.php:601 - This method has 4 returns, which is more than the 3 allowed. (key: a83fb3eb-6b77-4e81-b88e-3603e25322d2)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroIntegrationController.php:? - This method has 6 returns, which is more than the 3 allowed. (key: 83c9cf56-26ac-4940-b95d-2c900e42842a)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroIntegrationController.php:? - This method has 4 returns, which is more than the 3 allowed. (key: 491a1bd5-469b-4cfc-91dd-0c3c42308f9a)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroOAuthClient.php:129 - This method has 4 returns, which is more than the 3 allowed. (key: 1327860b-f1fe-4afe-93bb-d7e7942deb18)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroOrderSyncStateRepository.php:116 - This method has 5 returns, which is more than the 3 allowed. (key: e07bea6a-b47c-4569-8424-7f3aad44dd91)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroStatusMappingController.php:24 - This method has 5 returns, which is more than the 3 allowed. (key: bdc7b785-b0f6-44da-a9aa-9141cbaa797a)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroStatusMappingController.php:60 - This method has 4 returns, which is more than the 3 allowed. (key: 9d61f6f0-681f-426a-ad7d-5c92ebe5d9f9)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroStatusSyncService.php:95 - This method has 4 returns, which is more than the 3 allowed. (key: 3ea41fce-c3e4-4130-b663-07e3539437a2)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/AllegroTokenManager.php:22 - This method has 4 returns, which is more than the 3 allowed. (key: b40ca0bb-c268-434f-85e5-23ed04992e74)
- [ ] [MAJOR][CODE_SMELL][php:S112] src/Modules/Settings/AllegroTokenManager.php:? - Define and throw a dedicated exception instead of using a generic one. (key: a90b3b80-375d-4b74-aa15-9d0dbed5a668)
- [ ] [MAJOR][CODE_SMELL][php:S112] src/Modules/Settings/AllegroTokenManager.php:? - Define and throw a dedicated exception instead of using a generic one. (key: 48f9a5e2-ed3f-4559-9236-f5d6cfb4d184)
- [ ] [MAJOR][CODE_SMELL][php:S112] src/Modules/Settings/AllegroTokenManager.php:? - Define and throw a dedicated exception instead of using a generic one. (key: 55989bbe-7ca8-4507-8ce1-60bfe9f787ba)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ApaczkaApiClient.php:12 - This method has 4 returns, which is more than the 3 allowed. (key: 3aaf7471-390f-4da6-9787-e2a90d85e757)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/DeliveryStatusMappingController.php:78 - This method has 4 returns, which is more than the 3 allowed. (key: 80297fac-393a-4c1f-9fdd-4c2c178b606f)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/EmailMailboxController.php:51 - This method has 5 returns, which is more than the 3 allowed. (key: 2fa910d3-968b-418b-8e72-a1583a704103)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/EmailMailboxController.php:149 - This method has 10 returns, which is more than the 3 allowed. (key: 970d4c0a-02d0-4d5a-ba4a-9d186ca91827)
- [ ] [MAJOR][CODE_SMELL][php:S3358] src/Modules/Settings/EmailMailboxController.php:173 - Extract this nested ternary operation into an independent statement. (key: 24f6a171-bd8f-4277-8664-2f4561db7499)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Settings/EmailMailboxController.php:184 - Remove the unused function parameter "$errno". (key: e10d7439-6df7-4ed0-af9d-be43df3d0ad0)
- [ ] [MAJOR][CODE_SMELL][php:S1066] src/Modules/Settings/EmailMailboxController.php:213 - Merge this if statement with the enclosing one. (key: 73174936-1909-41e0-93f6-27cd62529463)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/EmailTemplateController.php:180 - This method has 4 returns, which is more than the 3 allowed. (key: beec3100-a5ac-432f-a951-48e9b7e1454e)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Settings/EmailTemplateController.php:238 - Remove the unused function parameter "$request". (key: 2377826f-4c53-4fd9-83c8-e3b3a3cf160f)
- [ ] [MAJOR][CODE_SMELL][php:S112] src/Modules/Settings/EmailTemplateRepository.php:127 - Define and throw a dedicated exception instead of using a generic one. (key: f1d48d68-eb1c-4ed0-a4aa-8b1f9b3795be)
- [ ] [MAJOR][CODE_SMELL][php:S1068] src/Modules/Settings/PrintSettingsController.php:20 - Remove this unused "$translator" private field. (key: 1f25c1d8-16b8-491e-90b7-bf0729829270)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ReceiptConfigController.php:51 - This method has 4 returns, which is more than the 3 allowed. (key: 87ef6d59-5e41-4aa4-892b-fe434f1a6d33)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproApiClient.php:8 - This method has 4 returns, which is more than the 3 allowed. (key: d94d5549-57ce-4f6a-8f20-3f9e3ad1e398)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproApiClient.php:271 - This method has 6 returns, which is more than the 3 allowed. (key: 4adaba8d-505d-4021-964c-e759f5b643e2)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproIntegrationsController.php:417 - This method has 6 returns, which is more than the 3 allowed. (key: afeb41a5-6952-4bfb-9b33-3a6cd21a0164)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproIntegrationsController.php:845 - This method has 4 returns, which is more than the 3 allowed. (key: 4ba1161c-abf6-4962-a271-c3a9a036f89e)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproIntegrationsController.php:892 - This method has 4 returns, which is more than the 3 allowed. (key: ee0d2f35-63fe-4820-bbca-f37c80507ba8)
- [ ] [MAJOR][CODE_SMELL][php:S1448] src/Modules/Settings/ShopproOrderMapper.php:9 - Class "ShopproOrderMapper" has 25 methods, which is greater than 20 authorized. Split it into smaller classes. (key: e132d4d8-d7ef-43d9-9a56-bc73e29f04b5)
- [ ] [MAJOR][CODE_SMELL][php:S1066] src/Modules/Settings/ShopproOrderMapper.php:124 - Merge this if statement with the enclosing one. (key: 55b645d7-a07c-46bf-9650-6ee814db3823)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproOrderMapper.php:756 - This method has 5 returns, which is more than the 3 allowed. (key: 5d78c738-b8c0-4d64-bf60-d845a3ff79e5)
- [ ] [MAJOR][CODE_SMELL][php:S107] src/Modules/Settings/ShopproOrdersSyncService.php:148 - This function has 12 parameters, which is greater than the 7 authorized. (key: d752676c-26a9-41dc-9fc2-25fed7279945)
- [ ] [MAJOR][CODE_SMELL][php:S107] src/Modules/Settings/ShopproOrdersSyncService.php:205 - This function has 10 parameters, which is greater than the 7 authorized. (key: 8833dfe4-f5d4-41a8-9562-3900907ae83e)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproOrderSyncStateRepository.php:28 - This method has 6 returns, which is more than the 3 allowed. (key: 8f905c07-78cf-4821-91c0-07a00bf81294)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproOrderSyncStateRepository.php:119 - This method has 4 returns, which is more than the 3 allowed. (key: 568faf2a-c596-4a6d-a93b-3068ffb59018)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproOrderSyncStateRepository.php:187 - This method has 5 returns, which is more than the 3 allowed. (key: 1f865f5f-133c-4c6e-9f71-2bc16e67cf5c)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproOrderSyncStateRepository.php:233 - This method has 4 returns, which is more than the 3 allowed. (key: 78fdff90-b4e2-4788-badf-3e9c6120095d)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproProductImageResolver.php:67 - This method has 5 returns, which is more than the 3 allowed. (key: 3487bf7b-14b8-4a14-a7d5-04a06352f4e8)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproProductImageResolver.php:100 - This method has 4 returns, which is more than the 3 allowed. (key: 610094af-d885-41a3-882d-5f80b1811756)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Settings/ShopproStatusSyncService.php:85 - This method has 5 returns, which is more than the 3 allowed. (key: b96494b7-0abc-4a3c-850e-917ebb967162)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/AllegroTrackingService.php:? - This method has 4 returns, which is more than the 3 allowed. (key: fb96d9eb-76a8-4bed-bed8-51e40fb34637)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Shipments/ApaczkaShipmentService.php:? - Remove the unused function parameter "$pickupDate". (key: 89c3519a-8fd8-4f4b-8441-31dd1964d5c9)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/ApaczkaTrackingService.php:? - This method has 6 returns, which is more than the 3 allowed. (key: 7e398dc8-ba2c-46b5-a92b-c6215b5dae89)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/DeliveryStatus.php:298 - This method has 5 returns, which is more than the 3 allowed. (key: 826ef8c0-6ae2-4e6e-9362-efedcd7d4b3e)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/DeliveryStatus.php:325 - This method has 9 returns, which is more than the 3 allowed. (key: aa388daa-f00e-420e-890d-296d0bf887b7)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostShipmentService.php:162 - This method has 4 returns, which is more than the 3 allowed. (key: d6f7b0db-a66b-463f-a468-453d8c5e77e2)
- [ ] [MAJOR][CODE_SMELL][php:S108] src/Modules/Shipments/InpostShipmentService.php:259 - Either remove or fill this block of code. (key: 2c40580b-b1c5-46d1-99de-0ef17482c4fa)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostShipmentService.php:379 - This method has 4 returns, which is more than the 3 allowed. (key: 50211ce3-df60-4509-8006-0731330b33db)
- [ ] [MAJOR][CODE_SMELL][php:S3358] src/Modules/Shipments/InpostShipmentService.php:430 - Extract this nested ternary operation into an independent statement. (key: 5e93d138-15b2-42e2-aea8-cdb65fe73093)
- [ ] [MAJOR][CODE_SMELL][php:S3358] src/Modules/Shipments/InpostShipmentService.php:464 - Extract this nested ternary operation into an independent statement. (key: b4019378-ddc0-49d1-aa5b-f207191c25b9)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostShipmentService.php:481 - This method has 4 returns, which is more than the 3 allowed. (key: 52ab972c-121e-4ff9-845a-44a370a78d21)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostTrackingService.php:? - This method has 5 returns, which is more than the 3 allowed. (key: 79ec448a-2ccf-425e-b891-b5b575d32014)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostTrackingService.php:? - This method has 4 returns, which is more than the 3 allowed. (key: 25da7c1f-e8c4-4093-88e7-6273943092aa)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/InpostTrackingService.php:? - This method has 4 returns, which is more than the 3 allowed. (key: ad271852-0406-4aaa-b5bf-63c27b87c997)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/ShipmentController.php:341 - This method has 4 returns, which is more than the 3 allowed. (key: ac28cbe9-96be-4cbd-bcc4-8c61a3de54fe)
- [ ] [MAJOR][CODE_SMELL][php:S1172] src/Modules/Shipments/ShipmentPresetController.php:16 - Remove the unused function parameter "$request". (key: ca0f98ed-fd61-45c7-9983-1be5c4a3dc61)
- [ ] [MAJOR][CODE_SMELL][php:S1142] src/Modules/Shipments/ShipmentPresetController.php:36 - This method has 4 returns, which is more than the 3 allowed. (key: cafb4b15-3a32-4df7-89ed-fca044b6b2f2)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/automation/form.php:56 - Define a constant instead of duplicating this literal " selected" 10 times. (key: 1b785bca-9189-4e51-a983-1a6cd1ed413e)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/automation/form.php:64 - Define a constant instead of duplicating this literal " checked" 4 times. (key: f778b6e9-59c2-451f-b966-ee339dc056b3)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/settings/accounting.php:97 - Define a constant instead of duplicating this literal " selected" 8 times. (key: 1a039950-d513-403d-a535-63b84457aba0)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/settings/accounting.php:121 - Define a constant instead of duplicating this literal " checked" 3 times. (key: 9d152206-5833-4ae7-9814-39101c81a252)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/settings/email-mailboxes.php:121 - Define a constant instead of duplicating this literal " selected" 3 times. (key: 771b71dd-2b2e-46fe-a5a7-e58821c8b635)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] resources/views/settings/email-mailboxes.php:144 - Define a constant instead of duplicating this literal " checked" 3 times. (key: 8da76115-87b8-4eef-8448-b76492ddc805)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Accounting/AccountingController.php:51 - Define a constant instead of duplicating this literal "/accounting" 3 times. (key: 538274f1-117d-46cc-9898-95d01f1e7507)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Accounting/ReceiptController.php:38 - Define a constant instead of duplicating this literal "Not found" 5 times. (key: b2e1a08e-86f5-4429-8b0d-5c1d4896a59d)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Accounting/ReceiptController.php:44 - Define a constant instead of duplicating this literal "/orders/" 5 times. (key: 33203616-3238-415e-9883-1699fa6de54f)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Accounting/ReceiptController.php:78 - Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed. (key: f3ebebf5-028b-4dde-a2ba-ef10a0020ada)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Automation/AutomationController.php:73 - Define a constant instead of duplicating this literal "/settings/automation" 11 times. (key: f522e45e-6882-4185-ac9e-38ea4a482c82)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Automation/AutomationController.php:115 - Define a constant instead of duplicating this literal "Nieprawidlowy identyfikator" 4 times. (key: 9939d997-5fab-4101-b18a-a7a9c88a273c)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Cron/ShipmentTrackingHandler.php:24 - Refactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed. (key: c46115eb-4adf-4c9d-b25d-c5523ed6f685)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Orders/OrdersController.php:153 - Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. (key: 1b2e554e-f3ef-4c84-8ee1-d4d896150e59)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Orders/OrdersController.php:158 - Define a constant instead of duplicating this literal "Not found" 3 times. (key: 3c5e48e3-b063-4ea1-9b91-6cac61975952)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Orders/OrdersController.php:244 - Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed. (key: 72e50aff-63c1-4b6d-92e9-506a97020d17)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Printing/PrintApiController.php:? - Refactor this function to reduce its Cognitive Complexity from 16 to the 15 allowed. (key: eef29972-3369-4b8e-ae62-6e00d8f90770)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/AllegroApiClient.php:239 - Define a constant instead of duplicating this literal "Accept: application/vnd.allegro.public.v1+json" 3 times. (key: 90cf597b-cda9-431f-aaf6-2ccc9caf53ad)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/AllegroApiClient.php:240 - Define a constant instead of duplicating this literal "Content-Type: application/vnd.allegro.public.v1+json" 3 times. (key: a4185ddd-bfd0-42e8-91af-d876eabaa82f)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/AllegroApiClient.php:256 - Define a constant instead of duplicating this literal "Nieprawidlowy JSON odpowiedzi API Allegro." 3 times. (key: d982750f-ff14-4e16-ad00-a1c89004ed3c)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/AllegroApiClient.php:288 - Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed. (key: 463978ad-d6dd-4fde-a4ec-518f58ed863a)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/AllegroStatusSyncService.php:95 - Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed. (key: 722dad21-32a3-4ed6-b50e-0d1b56972c97)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/DeliveryStatusMappingController.php:91 - Define a constant instead of duplicating this literal "Brakuje wymaganych pA3l." 3 times. (key: ed96e62c-f7b6-49b1-943a-d0ddffe3320f)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/DeliveryStatusMappingController.php:92 - Define a constant instead of duplicating this literal "?provider=" 8 times. (key: 96f81947-608e-45cc-a136-4870e961017d)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/EmailMailboxController.php:54 - Define a constant instead of duplicating this literal "Nieprawidlowy token CSRF" 4 times. (key: 13fa7ac0-bcae-4a86-ab23-3c68cab37be0)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/EmailMailboxController.php:55 - Define a constant instead of duplicating this literal "/settings/email-mailboxes" 11 times. (key: f1865646-c867-4852-8957-3e99ebed3392)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/EmailMailboxController.php:149 - Refactor this function to reduce its Cognitive Complexity from 27 to the 15 allowed. (key: 375ad9aa-aedc-4b27-84ff-9f2c513322e1)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/EmailTemplateController.php:122 - Define a constant instead of duplicating this literal "Nieprawidlowy token CSRF" 5 times. (key: d707b40d-21df-4531-b377-bb28188d7fb4)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/EmailTemplateController.php:123 - Define a constant instead of duplicating this literal "/settings/email-templates" 9 times. (key: 5883ebc3-beb0-4e69-acf7-2ce30a969e0f)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/PrintSettingsController.php:57 - Define a constant instead of duplicating this literal "/settings/printing" 9 times. (key: 1767bc02-e977-418f-8014-4c07097ea449)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/ReceiptConfigController.php:54 - Define a constant instead of duplicating this literal "Nieprawidlowy token CSRF" 3 times. (key: 540bfead-9d65-4e6b-bd1f-ca39977ac9f9)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/ReceiptConfigController.php:55 - Define a constant instead of duplicating this literal "/settings/accounting" 10 times. (key: a20a4e43-843e-4e37-b19f-9abf814a1003)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproApiClient.php:271 - Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed. (key: fae0cfa7-6155-4594-8b82-37224777f0e7)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproOrderMapper.php:61 - Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed. (key: c4359cde-57d2-471b-96e5-33878b57343a)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproOrderMapper.php:527 - Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed. (key: a8351c51-818c-464c-bc58-3ee72da58ca3)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproOrdersSyncService.php:148 - Refactor this function to reduce its Cognitive Complexity from 21 to the 15 allowed. (key: 88925e9b-05a0-404e-a5ff-f941c2f5a556)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Settings/ShopproOrderSyncStateRepository.php:83 - Define a constant instead of duplicating this literal "Y-m-d H:i:s" 6 times. (key: eceb259a-a9fb-482f-b603-7415b57763f0)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproProductImageResolver.php:18 - Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed. (key: 1eb00e5e-7193-4e11-8f6c-c0e546d2a585)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproProductImageResolver.php:67 - Refactor this function to reduce its Cognitive Complexity from 18 to the 15 allowed. (key: bcc3a574-e087-4800-8051-063192de45b4)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Settings/ShopproStatusSyncService.php:85 - Refactor this function to reduce its Cognitive Complexity from 22 to the 15 allowed. (key: a809b285-820d-4cd4-9adc-d67ae5550df7)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Shipments/DeliveryStatus.php:30 - Define a constant instead of duplicating this literal "W dorÄ?czeniu" 3 times. (key: eaeb76a3-3eb1-4ac2-9df4-7483fdb22772)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Shipments/DeliveryStatus.php:32 - Define a constant instead of duplicating this literal "DorÄ?czona" 5 times. (key: 9d4c98c6-6fb8-40ef-853a-2e5be1d042cc)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Shipments/DeliveryStatus.php:87 - Define a constant instead of duplicating this literal "Odebrana przez kuriera" 3 times. (key: 818a994a-9c79-4dbb-9fa9-ed4700c97235)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Shipments/DeliveryStatus.php:102 - Define a constant instead of duplicating this literal "ZwrA3cona do nadawcy" 4 times. (key: 1873fbed-290e-4268-8a76-bb485bdc343a)
- [ ] [CRITICAL][CODE_SMELL][php:S3776] src/Modules/Shipments/InpostShipmentService.php:48 - Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed. (key: 5ed92ef6-d6ae-46f5-b142-658d66290655)
- [ ] [CRITICAL][CODE_SMELL][php:S1192] src/Modules/Shipments/InpostShipmentService.php:177 - Define a constant instead of duplicating this literal "/shipments/" 3 times. (key: 60eb2ce3-d818-4199-8c2d-6157360e309c)
- [ ] [CRITICAL][VULNERABILITY][php:S4423] src/Modules/Settings/EmailMailboxController.php:223 - Change this code to use a stronger protocol. (key: 225d34b5-726e-4ace-aeba-5f9ca4d669dd)
- [ ] [BLOCKER][BUG][php:S5911] src/Modules/Settings/AllegroOrderImportService.php:? - Create class "RuntimeException" in namespace or check correct import of class (key: 1ac28e27-43e6-4115-af21-aa08f65d068e)
<!-- SONAR_ERRORS_END -->
47. [x] Zadania automatyczne: nowe zdarzenie Utworzenie przesylki uruchamiane od razu po utworzeniu paczki oraz nowa akcja Zmiana statusu przesylki.
48. [x] Szablony e-mail: dodane zmienne `{{przesylka.numer}}` i `{{przesylka.link_sledzenia}}` z linkiem zaleznym od kuriera/providera.

View File

@@ -0,0 +1,47 @@
{"ts":"2026-04-26T19:32:23Z","tool":"Bash","cmd":"git log --oneline -3 -- \".paul/codebase/\" 2>/dev/null || echo \"no commits\"\",\"description\":\"Check last commits for codebase docs\"},\"tool_response\":{\"stdout\":\"2d4b52a feat(04-schema-docs):","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:21Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && pwd && ls -la | head -40\"},\"tool_response\":{\"stdout\":\"/c/visual studio code/projekty/orderPRO\\ntotal 3442\\ndrwxr-xr-x 1 jacek 197121 0 kwi","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:25Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && tree -L 2 src/ 2>/dev/null || find src/ -maxdepth 2 -type d | head -40\"},\"tool_response\":{\"stdout\":\"src/\\nsrc/Core\\nsrc/Core/Constants\\nsrc/Cor","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:26Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find config -maxdepth 2 -type f | head -20\"},\"tool_response\":{\"stdout\":\"config/app.php\\nconfig/database.php\",\"stderr\":\"\",\"interrupted\":fal","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:31Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la public/\"},\"tool_response\":{\"stdout\":\"total 14\\ndrwxr-xr-x 1 jacek 197121 0 mar 14 15:04 .\\ndrwxr-xr-x 1 jacek 197121 0 kwi 19 22:18 .","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:32Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la resources/\"},\"tool_response\":{\"stdout\":\"total 20\\ndrwxr-xr-x 1 jacek 197121 0 mar 14 13:16 .\\ndrwxr-xr-x 1 jacek 197121 0 kwi 19 22:18 ..","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:33Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find public -maxdepth 2 -type d | head -30\"},\"tool_response\":{\"stdout\":\"public\\npublic/assets\\npublic/assets/css\\npublic/assets/js\",\"stderr\"","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:36Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Core -maxdepth 1 -type f | head -20\"},\"tool_response\":{\"stdout\":\"src/Core/Application.php\",\"stderr\":\"\",\"interrupted\":false,\"isIma","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:37Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Modules -maxdepth 2 -type f -name '*.php' | head -50\"},\"tool_response\":{\"stdout\":\"src/Modules/Accounting/AccountingController.php\\nsrc/M","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:41Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la bootstrap/\"},\"tool_response\":{\"stdout\":\"total 16\\ndrwxr-xr-x 1 jacek 197121 0 mar 14 15:04 .\\ndrwxr-xr-x 1 jacek 197121 0 kwi 19 22:1","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:41Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Core -type f -name '*.php' | sort\"},\"tool_response\":{\"stdout\":\"src/Core/Application.php\\nsrc/Core/Constants/IntegrationSources.php\\nsrc","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:41Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la database/\"},\"tool_response\":{\"stdout\":\"total 60\\ndrwxr-xr-x 1 jacek 197121 0 mar 14 13:16 .\\ndrwxr-xr-x 1 jacek 197121 0 kwi 19 22:18 ..\","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:45Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find database/migrations -maxdepth 1 -type f | head -20\"},\"tool_response\":{\"stdout\":\"database/migrations/20260221_000001_create_users_table.sql\\n","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:45Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find resources/views -maxdepth 2 -type d | head -30\"},\"tool_response\":{\"stdout\":\"resources/views\\nresources/views/accounting\\nresources/views/au","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:49Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && wc -l routes/web.php\"},\"tool_response\":{\"stdout\":\"581 routes/web.php\",\"stderr\":\"\",\"interrupted\":false,\"isImage\":false,\"noOutputExpected\","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:50Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Modules/Orders -type f -name '*.php' | sort\"},\"tool_response\":{\"stdout\":\"src/Modules/Orders/OrderImportRepository.php\\nsrc/Modules/Order","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:50Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Modules/Shipments -type f -name '*.php' | sort\"},\"tool_response\":{\"stdout\":\"src/Modules/Shipments/AllegroShipmentService.php\\nsrc/Module","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:55Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Modules -maxdepth 1 -type d | sort\"},\"tool_response\":{\"stdout\":\"src/Modules\\nsrc/Modules/Accounting\\nsrc/Modules/Auth\\nsrc/Modules/Aut","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:55Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find resources/views -type d | sort\"},\"tool_response\":{\"stdout\":\"resources/views\\nresources/views/accounting\\nresources/views/auth\\nresources/v","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:55Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la src/Modules/Accounting/ && ls -la src/Modules/Auth/ && ls -la src/Modules/Email/\"},\"tool_response\":{\"stdout\":\"total 53\\ndrwxr-xr-x 1 jacek","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:33:59Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Modules/Settings -maxdepth 1 -type f | wc -l && find src/Modules/Cron -maxdepth 1 -type f | wc -l\"},\"tool_response\":{\"stdout\":\"51\\n12\",","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:00Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la src/Modules/Statistics/ && ls -la src/Modules/Automation/ && ls -la src/Modules/Users/\"},\"tool_response\":{\"stdout\":\"total 48\\ndrwxr-xr-x 1","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:03Z","tool":"Bash","cmd":"git -C \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" log --oneline -20\"},\"tool_response\":{\"stdout\":\"4b998ea update\\n4931c55 update\\nbc80024 update\\nc73b2fe update\\ncd1ea4a update\\n8f","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:03Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find public/assets -type f | head -30\"},\"tool_response\":{\"stdout\":\"public/assets/css/app.css\\npublic/assets/css/app.css.map\\npublic/assets/css/l","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:04Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find resources -type d | sort\"},\"tool_response\":{\"stdout\":\"resources\\nresources/lang\\nresources/modules\\nresources/modules/jquery-alerts\\nreso","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:04Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && ls -la resources/scss/ | head -30\"},\"tool_response\":{\"stdout\":\"total 308\\ndrwxr-xr-x 1 jacek 197121 0 kwi 22 22:37 .\\ndrwxr-xr-x 1 jacek 19","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:04Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find resources/views -type f -name '*.php' | head -30\"},\"tool_response\":{\"stdout\":\"resources/views/accounting/index.php\\nresources/views/auth/log","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:08Z","tool":"Bash","cmd":"git -C \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" log --format=\"%H %s\" -30 | head -15\"},\"tool_response\":{\"stdout\":\"4b998ea5be917df1aad90bba87da50f800b46fe4 update\\n4931c55338ed61c6b","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:10Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find resources/views/settings -type f | sort\"},\"tool_response\":{\"stdout\":\"resources/views/settings/accounting.php\\nresources/views/settings/alleg","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:15Z","tool":"Bash","cmd":"wc -l \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\src\\\\Modules\\\\Orders\\\\OrdersRepository.php\" \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\src\\\\Modules\\\\Orders\\\\OrdersC","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:17Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find database/migrations -type f | wc -l && ls -ltr database/migrations/ | tail -5\"},\"tool_response\":{\"stdout\":\"84\\n-rw-r--r-- 1 jacek 197121 45","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:34:18Z","tool":"Bash","cmd":"cd '/c/visual studio code/projekty/orderPRO' && find src/Core -type f -name '*.php' | sort && find src/Modules/Cron -type f -name '*.php'\"},\"tool_response\":{\"stdout\":\"src/Core/Application.php\\n","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:36:35Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\INDEX.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:36:50Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\STACK.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:37:20Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\ARCHITECTURE.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:37:46Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\CONVENTIONS.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:38:04Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\TESTING.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:38:28Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\INTEGRATIONS.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:39:04Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\codebase\\\\CONCERNS.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:39:12Z","tool":"Bash","cmd":"git add .paul/codebase/ && git commit -m \"$(cat <<'EOF'\\nchore: generate codebase map in .paul/codebase/\\n\\nINDEX, STACK, ARCHITECTURE, CONVENTIONS, TESTING, INTEGRATIONS, CONCERNS\\nEOF\\n)\"\",\","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:52:51Z","tool":"Bash","cmd":"cd \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" && npm run build:assets 2>&1\",\"description\":\"Build SCSS assets\"},\"tool_response\":{\"stdout\":\"> orderpro@1.0.0 build:assets\\n> npm run ","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:52:58Z","tool":"Bash","cmd":"cd \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" && git add src/Modules/Shipments/DeliveryStatus.php src/Modules/Automation/AutomationService.php src/Modules/Automation/AutomationController.php","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:54:19Z","tool":"Edit","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\TODO.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:54:24Z","tool":"Bash","cmd":"cd \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" && git add .paul/TODO.md && git commit -m \"chore: add TODO(DELIVERY-STATUS-MGMT) - manage normalized statuses from panel\"\",\"description\":\"","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:55:03Z","tool":"Write","file":"C:\\\\visual studio code\\\\projekty\\\\orderPRO\\\\.paul\\\\TODO.md","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:55:33Z","tool":"Bash","cmd":"cd \"C:\\\\visual studio code\\\\projekty\\\\orderPRO\" && git add .paul/codebase/todo.md .paul/TODO.md && git commit -m \"chore: move TODO to .paul/codebase/todo.md\"\",\"description\":\"Commit todo ","cwd":"/c/visual studio code/projekty/orderPRO"}
{"ts":"2026-04-26T19:55:40Z","tool":"Write","file":"C:\\\\Users\\\\jacek\\\\.claude\\\\projects\\\\C--visual-studio-code-projekty-orderPRO\\\\memory\\\\feedback_todo_location.md","cwd":"/c/visual studio code/projekty/orderPRO"}

View File

@@ -870,6 +870,12 @@
"size": 1002, "size": 1002,
"lmtime": 1776888727116, "lmtime": 1776888727116,
"modified": false "modified": false
},
"20260425_000102_create_automation_email_once_deliveries_table.sql": {
"type": "-",
"size": 927,
"lmtime": 1777132503303,
"modified": false
} }
}, },
"seeders": {}, "seeders": {},
@@ -2282,8 +2288,8 @@
"modules": { "modules": {
"automation-form.js": { "automation-form.js": {
"type": "-", "type": "-",
"size": 11257, "size": 11461,
"lmtime": 1775944356011, "lmtime": 1777132035006,
"modified": false "modified": false
}, },
"global-search.js": { "global-search.js": {
@@ -2487,8 +2493,8 @@
"automation": { "automation": {
"form.php": { "form.php": {
"type": "-", "type": "-",
"size": 18591, "size": 18891,
"lmtime": 1775944371795, "lmtime": 1777132029418,
"modified": false "modified": false
}, },
"index.php": { "index.php": {
@@ -2791,8 +2797,8 @@
"routes": { "routes": {
"web.php": { "web.php": {
"type": "-", "type": "-",
"size": 30521, "size": 31022,
"lmtime": 1776111496634, "lmtime": 1777132013572,
"modified": false "modified": false
} }
}, },
@@ -3029,8 +3035,14 @@
"Automation": { "Automation": {
"AutomationController.php": { "AutomationController.php": {
"type": "-", "type": "-",
"size": 25030, "size": 25262,
"lmtime": 1775944243152, "lmtime": 1777132021179,
"modified": false
},
"AutomationEmailOnceRepository.php": {
"type": "-",
"size": 1458,
"lmtime": 1777131984358,
"modified": false "modified": false
}, },
"AutomationExecutionLogRepository.php": { "AutomationExecutionLogRepository.php": {
@@ -3047,8 +3059,8 @@
}, },
"AutomationService.php": { "AutomationService.php": {
"type": "-", "type": "-",
"size": 27091, "size": 28361,
"lmtime": 1775948050415, "lmtime": 1777133741082,
"modified": false "modified": false
}, },
"OrderStatusAgedService.php": { "OrderStatusAgedService.php": {
@@ -3085,8 +3097,8 @@
}, },
"CronHandlerFactory.php": { "CronHandlerFactory.php": {
"type": "-", "type": "-",
"size": 10066, "size": 10182,
"lmtime": 1776888927656, "lmtime": 1777132009558,
"modified": false "modified": false
}, },
"CronJobProcessor.php": { "CronJobProcessor.php": {
@@ -3815,8 +3827,8 @@
"phpunit": { "phpunit": {
"test-results": { "test-results": {
"type": "-", "type": "-",
"size": 4466, "size": 4771,
"lmtime": 1776408192651, "lmtime": 1777133756044,
"modified": false "modified": false
} }
} }
@@ -3833,8 +3845,8 @@
"logs": { "logs": {
"app.log": { "app.log": {
"type": "-", "type": "-",
"size": 0, "size": 178,
"lmtime": 1773005634534, "lmtime": 1777133622728,
"modified": false "modified": false
} }
}, },