Commit Graph

74 Commits

Author SHA1 Message Date
d8daf61de6 feat(107-automation-email-send-once): idempotent send-once per order for email automation
Phase 107 complete:
- New table automation_email_once_deliveries with UNIQUE KEY (rule_id, action_id, order_id)
- AutomationEmailOnceRepository: wasSent() / markSent() with ON DUPLICATE KEY guard
- AutomationService: send_once_per_order flag — mark only on successful send
- Checkbox "Wyslij tylko raz dla tego zamowienia" in rule form (edit + new action JS)
- 2 unit tests added; 3/3 passing (49 assertions)

Milestone v3.1 Operational Enhancements: COMPLETE (2/2 phases)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-27 21:19:29 +02:00
4b998ea5be update 2026-04-25 21:31:50 +02:00
c73b2fe9f6 update 2026-04-22 22:54:26 +02:00
fd1e23eb26 update 2026-04-19 22:43:02 +02:00
567e888664 feat(104-apaczka-weekend-delivery): Apaczka Paczka w Weekend dla paczkomatow InPost
Phase 104 complete:
- Backend: ApaczkaShipmentService::buildOptionsPayload() mapuje weekend_delivery -> option[19] = 1 w payloadzie API Apaczka v2
- Stala OPTION_KEYS jako rozszerzalne mapowanie pole formularza -> id opcji Apaczki
- Frontend: checkbox "Dostawa w weekend (sobota)" w prepare.php widoczny tylko dla supplier=INPOST + paczkomat (door_to_point=1 lub point_to_point=1)
- JS toggle oparty na atrybutach data-supplier/data-paczkomat z resetem stanu
- 3 nowe testy jednostkowe pokrywajace mapowanie buildOptionsPayload (phpunit OK 11/11)
- Hotfix integracyjny po UAT: ShipmentController::create() nie przekazywal pola weekend_delivery z requestu do formData providera (root cause: reczna lista pol w controllerze)
- Dokumentacja zaktualizowana (DOCS/ARCHITECTURE.md, DOCS/TECH_CHANGELOG.md)

DEFER-104-01: rozwazyc test integracyjny pelnego flow controller -> service lub refactor na request->all().

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 09:03:44 +02:00
3d61d3b2df update 2026-04-16 23:19:11 +02:00
0e8f246d6f update 2026-04-14 20:36:20 +02:00
e15b4ccf45 update 2026-04-13 22:31:06 +02:00
7eefd1af61 feat(98-order-imported-first-only): gate order.imported na pierwszy import + backfill statusow
- AllegroOrderImportService / ShopproOrdersSyncService: trigger order.imported tylko gdy $wasCreated
- bin/backfill_shipped_status_98.php: jednorazowy CLI, w_realizacji + shipment -> wyslane (przez OrdersRepository::updateOrderStatus)
- backfill: 4 zamowienia naprawione (#275, #340, #396, #422), idempotentny

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:56:03 +02:00
d04e02020c update 2026-04-12 01:35:19 +02:00
12c400fdc6 feat(92-buyer-name-copy): ikona kopiowania nazwy kupujacego w szczegolach zamowienia
Phase 92 complete:
- SVG clipboard icon przy nazwie w sekcji Dane zamawiajacego
- navigator.clipboard.writeText() z wizualnym feedbackiem (checkmark 1.5s)
- Style .copy-btn-inline i .copy-name-row

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:14:36 +02:00
854adc32c1 update 2026-04-09 00:51:24 +02:00
633da52880 update 2026-04-08 23:22:48 +02:00
c5b2885b44 feat: Add User-Agent header to Allegro API requests
- Implemented buildUserAgent() method in AllegroApiClient, AllegroOAuthClient, and AllegroTrackingService to include User-Agent header in all HTTP requests to Allegro API.
- Updated .env.example to include APP_VERSION and ALLEGRO_USER_AGENT_URL for configuration.
- Created public /info page to provide application details required by Allegro, including app name, version, description, and contact information.
- Added minimalist layout for public pages to ensure a professional appearance.
- Ensured all changes comply with Allegro's API requirements for User-Agent header.
2026-04-08 20:59:55 +02:00
0f7742f10d update 2026-04-08 19:08:40 +02:00
40644eb362 update 2026-04-07 22:39:16 +02:00
8fa9ca6439 update 2026-04-07 20:32:43 +02:00
1933c74395 update 2026-04-07 10:44:03 +02:00
aadf98bc80 feat(search-by-product): extend order search to include product names
Added EXISTS subquery on order_items.original_name to the search filter
in OrdersRepository::buildPaginateFilters(). Users can now find orders
by typing a product name in the search field. Updated search placeholder
to reflect the new capability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 09:14:40 +02:00
24df01cfde feat(per-page-persistence): remember selected rows per page in localStorage
table-list component now saves per_page selection to localStorage and
restores it when navigating back to any list without explicit per_page
in URL. URL parameter takes priority over stored value to ensure
bookmarked links work predictably.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 08:26:53 +02:00
6d0905d97a feat(attributes-import): import product attributes from shopPRO API into personalization
extractPersonalization() now reads both 'attributes' and 'custom_fields' fields
from the shopPRO API response, joining non-empty values with newline separator.
Previously only custom_fields was imported, causing product attributes like
"Woreczek jutowy", "Kolor koperty", "Zakrętka" to be lost during sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 08:21:38 +02:00
278f44b360 update 2026-04-06 12:00:08 +02:00
7feda58a97 update 2026-04-04 18:20:13 +02:00
e95c4967d2 update 2026-04-03 22:35:49 +02:00
0e7ee957cb update 2026-04-03 11:30:14 +02:00
39c318382a update 2026-04-02 00:17:46 +02:00
50507d70a5 update 2026-03-31 10:56:31 +02:00
af48e84449 update 2026-03-31 00:30:50 +02:00
5435209b08 update 2026-03-30 20:23:38 +02:00
1f449f84ad fix(55-desktop-collapsed-sidebar-fix): ukrycie etykiet i centrowanie ikon w zwiniętym sidebarze
Zwiniety sidebar (is-collapsed) pokazywal obciete etykiety zamiast
czystych ikon. Naprawiono: display:none na labelach/strzalkach/sublinkach,
justify-content:center na linkach, ukrycie brand text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:51:24 +02:00
4b38f3e7a6 feat(54-order-detail-image-hover): hover zoom na miniaturkach w widoku zamowienia
Reuse istniejacego patternu orders-image-hover-wrap/popup z listy
zamowien — wrapper + popup img + JS pozycjonujacy w show.php.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:40:25 +02:00
775ede52d3 feat(53-mobile-status-panel-toggle): zwijany panel statusow na mobile
Native details/summary toggle — panel zwiniety domyslnie na mobile,
rozwijany kliknieciem. Desktop: zawsze otwarty, bez zmian.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:32:07 +02:00
1c87489824 feat(52-mobile-main-menu): hamburger + slide-in overlay sidebar na mobile
Zastapienie niedzialajacej nawigacji horyzontalnej pelnoekranowym
overlay sidebar z hamburgerem, backdrop i animacja CSS transform.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 23:15:52 +02:00
cbc2058b83 update 2026-03-28 21:16:21 +01:00
176d740578 feat(50-allegro-shipment-waybill-push): push waybill to allegro checkout form
Phase 50 complete:

- add conditional waybill push for allegro orders only

- add retry on ALLEGRO_HTTP_401 and non-critical failure handling

- add unit tests and update architecture/changelog docs
2026-03-28 15:32:34 +01:00
2ab0d0e90e update 2026-03-28 15:04:35 +01:00
ad9087d5e4 feat(47-shipment-created-automation): immediate shipment automation trigger
Phase 47 complete:

- add event shipment.created triggered immediately after shipment creation

- add action update_shipment_status with real-change guard and chain-safe emit

- update automation UI/options, docs, and PAUL state artifacts
2026-03-28 13:24:20 +01:00
957fddaf84 feat(v1.7): orderPRO -> shopPRO status push sync
Implement bidirectional status sync for shopPRO integrations.
When direction is set to orderpro_to_shoppro, cron pushes manual
status changes to shopPRO via PUT API with reverse status mapping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 12:54:57 +01:00
f2f1c44324 feat(v1.6): inline status change on orders list
Phase 44 complete:
- Clickable status badge opens dropdown with grouped statuses
- AJAX POST changes status without page reload (optimistic update)
- Fixed-position dropdown escapes table overflow:hidden
- updateStatus() returns JSON for AJAX, redirect for standard POST

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 09:40:06 +01:00
3610571949 feat(v1.5): complete phases 40-43 workflow cleanup 2026-03-25 22:46:51 +01:00
9cbe0a89f0 feat(30-button-primary-color): separate CTA color from section headings
Phase 30 complete:\n- split semantic tokens for actions vs informational headings\n- update primary/outline button styles and rebuild CSS assets\n- update TODO/docs and close PAUL loop with SUMMARY
2026-03-25 21:59:37 +01:00
325a941c42 feat(29-delivery-status-mapping-ui): konfiguracja mapowania statusów dostawy per provider
Phase 29 complete (v1.3):
- Tabela delivery_status_mappings z DB overrides
- DeliveryStatus: normalizeWithOverrides(), descriptionWithOverrides(), getDefaultMappings()
- UI ustawień: tabela mapowań per provider (InPost/Apaczka/Allegro), bulk save, reset, resetAll
- 5 endpointów w routes/web.php, link w menu bocznym

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 23:55:42 +01:00
98a0077204 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>
2026-03-23 23:04:05 +01:00
228c0e96cf feat(27-shipment-tracking-backend): infrastruktura sledzenia przesylek — statusy, tracking services, cron handler
Dwupoziomowy system statusow dostawy (normalized + raw z API), implementacje
trackingu dla InPost ShipX, Apaczka i Allegro WZA, cron handler odpytujacy
aktywne przesylki co 15 minut.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:33:44 +01:00
c59d431083 feat(26-manual-tracking-number): reczne dodawanie numeru przesylki do zamowienia
Nowy endpoint POST /orders/{id}/shipment/manual z formularzem inline
w zakladce Przesylki. Reuse tabeli shipment_packages (provider='manual',
status='created'). Activity log, walidacja CSRF, HTML required.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:17:21 +01:00
686429d9cf update 2026-03-22 23:54:59 +01:00
91963d5173 feat(25-shipment-presets-management): edycja, usuwanie i zarządzanie presetami przesyłek
Phase 25 complete — milestone v1.0 done:
- Ikonka edycji (✎) na hover z dropdown menu
- Edycja nazwy i koloru presetu w popup
- "Zapisz bieżące wartości" — aktualizacja parametrów z formularza
- Usuwanie z potwierdzeniem OrderProAlerts.confirm()
- SCSS: dropdown, edit-icon, btn-wrap style

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:53:44 +01:00
e379557533 feat(24-shipment-presets-ui): kolorowe przyciski presetów, popup tworzenia, autofill formularza
Phase 24 complete:
- SCSS moduł _shipment-presets.scss (przyciski, popup, color picker)
- Sekcja presetów nad formularzem przesyłki z przyciskiem "Dodaj"
- Popup tworzenia presetu z nazwą i wyborem koloru (8 opcji)
- JS autofill: carrier, usługa dostawy, wymiary, waga, label format
- Obsługa 3 paneli: Allegro searchable, InPost select, Apaczka select

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:42:56 +01:00
03a237e7d2 feat(23-shipment-presets-backend): tabela DB, repository CRUD i JSON API dla presetów przesyłek
Phase 23 complete:
- Migracja shipment_presets (16 kolumn: name, color, carrier, wymiary, waga, itp.)
- ShipmentPresetRepository z findAll/findById/create/update/delete
- ShipmentPresetController z 4 endpointami JSON API
- Routing w routes/web.php z auth middleware

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:27:14 +01:00
d6375cc61d fix(22-regon-save-fix): naprawa zapisu REGON, BDO, KRS i logo w ustawieniach firmy
CompanySettingsController::save() nie przekazywał 4 pól (regon, bdo_number,
court_register, logo_path) do repozytorium — dane z formularza ginęły.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 23:10:07 +01:00