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>
This commit is contained in:
2026-04-27 21:19:29 +02:00
parent 5aca41750c
commit d8daf61de6
5 changed files with 199 additions and 33 deletions

View File

@@ -6,18 +6,11 @@ orderPRO to narzedzie do wielokanalowego zarzadzania sprzedaza. Projekt przechod
## Current Milestone
**v3.1 Operational Enhancements** (v3.1.0)
Status: In progress
Started: 2026-04-22
| Phase | Name | Plans | Status |
|-------|------|-------|--------|
| 106 | Customer Return Alert | 1/1 | Complete |
| 107 | Automation Email Send Once | 0/1 | Planning |
Brak aktywnego milestone — v3.1 zamkniety. Nastepny milestone do zaplanowania.
## Next Milestone
Kandydaci w kolejce (po zamknieciu v3.1):
Kandydaci w kolejce:
- Mobile Orders List / Mobile Order Details / Mobile Settings
- Zarzadzanie produktami
- Zarzadzanie stanami magazynowymi
@@ -26,6 +19,20 @@ Kandydaci w kolejce (po zamknieciu v3.1):
## Completed Milestones
<details>
<summary>v3.1 Operational Enhancements - 2026-04-27 (2 phases, 2 plans)</summary>
Usprawnienia operacyjne: alert o kliencie z historia zwrotow oraz idempotentna jednorazowa wysylka e-mail per zamowienie.
| Phase | Name | Plans | Status |
|-------|------|-------|--------|
| 106 | Customer Return Alert | 1/1 | Complete |
| 107 | Automation Email Send Once | 1/1 | Complete |
Archive: `.paul/phases/106-customer-return-alert/`, `.paul/phases/107-automation-email-send-once/`
</details>
<details>
<summary>v3.0 Mobile Responsive - 2026-04-19 (52 phases shipped, 55 plans)</summary>