feat(reports): ticket activity report and export (#38 slice 3) #111
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!111
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/38-reporting-slice3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Slice 3 of #38 (reporting): the ticket activity report. Issue stays open for slice 2 (finance: daily invoice, QR income, over/underpayment) and #51 (partner report).
What
GET /v1/admin/reports/ticket-activities(keyset paging) and/export(XLSX: "Ticket Activities" + "Summary" sheets),reports.view, platform scope only.kind=checked_in. Filters:from/to(Nairobi days, 366 max),kind,park_id,gate_id,currency,payment_method,code(sale code or check-in number).purchase_priceper currency (never converted). That is the face value of tickets used, not a sales figure (a top-up never double counts: the replaced ticket is cancelled before check-in).ticket_activities (created_at, id)index), OpenAPI + live contract test, ADR 0023 "Slice 3", CLAUDE.md bullet. Reuses slice 1's snapshot, limiter, XLSX writer and handler helpers.Owner defaults to confirm ([verify], listed in ADR 0023)
Park Entry = a filter, not a second page; only
reports.view(legacy let Marketing roles see it); export cap stays 100,000 rows (one peak legacy month was 100,243, so users add a park filter);purchase_pricevalue including waived sales; no KES grand total; masters excluded; no ticket codes or staff user in exports; UTC times; ticket-status search, details page/PDF, pax counts and revenue recognition deferred.Verification
make cover): 90.9% total (minimum 80%).make lint0 issues,make contractok,go test -race ./...ok.opt/paging code between the transaction and activity stores, merging the twoNormalizemethods. Fine for two reports; revisit with a third.🤖 Generated with Claude Code