feat: visitor details per ticket (dynamic form answers) #173
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!173
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/visitor-details"
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?
Visitor details per ticket, first of three pieces (then the gate review/confirm lookup and the gate app's sunlight redesign). Spec
docs/superpowers/specs/2026-11-07-visitor-details-design.md, ADR 0038.Every park-entry ticket sold on the website, the customer app and the tour operator portal now carries its own visitor: the answers to its product's dynamic form (name, ID/passport, nationality, email, plate).
holder_nameis the visitor's name, not the buyer's. This is what gate staff and rangers need to catch "declared one thing, someone else arrived".What changed
ticket_visitors: one row per sale line unit, with answers jsonb plus purpose columns. UPDATE and TRUNCATE are refused, and so is an INSERT unless the sale is pending.tickets.visitor_idis immutable and has no FK, so answers can be purged while the tickets stay.visitors: [{cart_line_id, unit, answers}]is validated bysales.Visitorsagainst the live form: required, length, range, type, active country, at most 200 runes, no control or format characters.lines[L].visitors[U][.<input id>].partner_customersname, ID number, country and email.visitor_id.sales.visitors_purge(hourly, worker) deletes answers of cancelled sales after 24 h and of completed sales 7 years after checkout. The 7 years is marked [verify] with KWS legal / the DPO. The job runs two indexed deletes over a 30-day window.form_id(live forms only). The website and the Flutter app gain a Visitors step: one block per ticket, the first prefilled from the profile. The server is the only judge of the answers, and the idempotency key changes with the answers.Checks
make covertotal 91.8% (minimum 80%);internal/sales86.5%,internal/sales/pgstore80.5%.make lintreports 0 issues; contract tests pass.flutter analyzeis clean, andflutter testpasses 284 tests.Owner check
Known gaps, parked
🤖 Generated with Claude Code