feat(admin): transaction management
Sprint 24. New features/admin/transactions/ module. AdminTransactionsLocalGateway derives one synthetic transaction per Sprint 23's seeded mock order rather than a separate dataset, keeping order numbers/totals consistent across the two mock feature areas. - list: search, status filter, type filter (payment/refund/qr_payment), pagination, CSV export - retry failed transactions (appends an audit entry) - fraud flag toggle - per-transaction audit log (creation/retry/fraud-flag-change), viewed via dialog - intentionally separate from the system-wide audit/security log planned for Sprint 26 (Monitoring) - wired into /:lang/backoffice/transactions, replacing the coming-soon placeholder docs/ADMIN.md + docs/BACKEND.md (new item 13) updated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -314,6 +314,27 @@ container/facade/service split as the rest of `admin/*`:
|
||||
- Wired into `/:lang/backoffice/orders` and `/:lang/backoffice/orders/:id`,
|
||||
replacing the coming-soon placeholder.
|
||||
|
||||
## Sprint 24 - Transactions (mock/local)
|
||||
|
||||
`features/admin/transactions/`. `AdminTransactionsLocalGateway` derives its
|
||||
mock data from `AdminOrdersLocalGateway`'s 24 seeded orders (one
|
||||
transaction per order, deterministic type/status/method assignment) rather
|
||||
than a separate synthetic dataset - keeps order numbers/totals consistent
|
||||
between the two mock feature areas.
|
||||
|
||||
- List: search, status filter, type filter (payment/refund/qr_payment),
|
||||
pagination, CSV export.
|
||||
- Retry failed transactions (`status: 'failed' -> 'retried'`, appends an
|
||||
audit entry).
|
||||
- Fraud flag toggle per transaction.
|
||||
- Audit log: each transaction carries its own `audit: AdminTransactionAuditEntry[]`
|
||||
(creation, retries, fraud-flag changes), viewed via a dialog - this is a
|
||||
per-transaction audit trail, not the system-wide audit/security log
|
||||
planned for Sprint 26 (Monitoring); the two are intentionally separate
|
||||
scopes.
|
||||
- Wired into `/:lang/backoffice/transactions`, replacing the coming-soon
|
||||
placeholder.
|
||||
|
||||
## Known gaps / backend needs
|
||||
|
||||
- **Dashboard metrics endpoint.** Categories/Products counts are computed
|
||||
|
||||
@@ -144,6 +144,14 @@ Plus, if authenticated history/wishlist/compare/saved-searches sync is wanted: `
|
||||
|
||||
---
|
||||
|
||||
## 13. Transactions (Sprint 24, mock/local)
|
||||
|
||||
**Current behavior:** `features/admin/transactions/` exists (list, retry-failed, fraud flag, per-transaction audit log, CSV export) against `AdminTransactionsLocalGateway`, which derives one synthetic transaction per seeded mock order from item 7's `AdminOrdersLocalGateway` — no real payment/transaction data exists.
|
||||
|
||||
**Needed:** a real payments/transactions domain (card, QR, cash-on-delivery), linked to orders, with retry semantics matching whatever the actual payment provider supports, and fraud-flag persistence.
|
||||
|
||||
**Frontend files:** implement `AdminTransactionsApiGateway` against `AdminTransactionsGateway` (`services/admin-transactions-gateway.interface.ts`) and rebind via an injection token.
|
||||
|
||||
## Known reliability issues
|
||||
|
||||
### Production 502/504 Bad Gateway on refresh / back-navigation
|
||||
|
||||
@@ -47,8 +47,9 @@ Notify user: **from Sprint 20 (Categories) once product↔category link + admin
|
||||
- [x] `docs/ADMIN.md` (new Sprint 23 section), `docs/BACKEND.md` item 7 rewritten
|
||||
- Commit: `feat(admin): order management`
|
||||
|
||||
## Sprint 24 — Transactions (mock/local)
|
||||
- [ ] Payments/refunds/QR list, status, history, export, filters, search, retry, fraud flags, audit log view
|
||||
## Sprint 24 — Transactions (mock/local) ✅ done
|
||||
- [x] Payments/refunds/QR list, status, history (derived from Sprint 23's seeded orders), export, filters, search, retry failed, fraud flags, per-transaction audit log dialog
|
||||
- [x] `docs/ADMIN.md` (new Sprint 24 section), `docs/BACKEND.md` item 13 added
|
||||
- Commit: `feat(admin): transaction management`
|
||||
|
||||
## Sprint 25 — Users & Roles
|
||||
|
||||
Reference in New Issue
Block a user