docs: plan terminal-aware dashboard API
This commit is contained in:
@@ -208,3 +208,15 @@ Approved OpenAPI --> HTTP boundary --> auth/period/run/SSE/detail/CSV
|
||||
## Product questions
|
||||
|
||||
None.
|
||||
|
||||
## Approved feature-branch redesign API increment
|
||||
|
||||
The user approved the merchant-dashboard redesign on 2026-08-20. The backend increment is additive and follows this dependency order:
|
||||
|
||||
1. Pure, tested Jalali boundary helpers and four latest complete period descriptors.
|
||||
2. Authenticated merchant-terminal listing and optional terminal scope on analytics runs.
|
||||
3. Bounded overview payment-history points for the selected scope.
|
||||
4. Transaction listing filters and one merchant-owned transaction detail resource.
|
||||
5. OpenAPI regeneration, local database smoke, and feature preview on port `8081`.
|
||||
|
||||
No migration is required. All terminal and session identifiers are resolved under the merchant from the authenticated server session.
|
||||
|
||||
@@ -546,3 +546,21 @@ Every task must satisfy its acceptance criteria and the standing Definition of D
|
||||
- [ ] Full project Definition of Done is satisfied.
|
||||
- [ ] No unrelated frontend, deployment, physical-schema, ERD, or raw-data changes are included.
|
||||
- [ ] Human review approves completion before merge or deployment.
|
||||
|
||||
## Approved redesign API increment — 2026-08-20
|
||||
|
||||
- [ ] Task 13: Return latest complete `DAY`, `WEEK`, `JALALI_MONTH`, and `PERSIAN_SEASON` periods with the Jalali month as default.
|
||||
- Acceptance: pure boundary tests cover Nowruz, month rollover, leap Esfand, Iranian Saturday–Friday weeks, and dataset boundaries.
|
||||
- Verify: focused analytics tests and `go test ./...`.
|
||||
- [ ] Task 14: Add authenticated merchant terminal discovery and terminal-scoped analytics runs.
|
||||
- Acceptance: unknown or other-merchant terminals are rejected without changing merchant scope; an empty terminal means all merchant terminals.
|
||||
- Verify: service/handler tests plus local authenticated smoke.
|
||||
- [ ] Task 15: Add bounded daily payment-history points to overview data.
|
||||
- Acceptance: each point contains date, bank-paid amount, bank-paid sessions, and total sessions for the selected period/scope.
|
||||
- Verify: query reconciliation against aggregate metrics.
|
||||
- [ ] Task 16: Add the `ALL` transaction view, status and amount filters, and a merchant-owned transaction detail resource.
|
||||
- Acceptance: filters are allowlisted/parameterized, pagination happens after filters, and attempts are ordered without payer tokens.
|
||||
- Verify: focused tests, local drill-down smoke, and safe `404` check.
|
||||
- [ ] Task 17: Update OpenAPI and run the complete backend gate.
|
||||
- Acceptance: generated frontend types compile and the feature API runs beside the current API on port `8081`.
|
||||
- Verify: `go test ./...`, `go vet ./...`, build, and authenticated HTTP smoke.
|
||||
|
||||
Reference in New Issue
Block a user