Skip to content

feat(mobile): pre-approval flow (expected visitors)#41

Merged
ankitsejwal merged 2 commits into
mainfrom
feat/mobile-pre-approvals
Jul 2, 2026
Merged

feat(mobile): pre-approval flow (expected visitors)#41
ankitsejwal merged 2 commits into
mainfrom
feat/mobile-pre-approvals

Conversation

@ankitsejwal

Copy link
Copy Markdown
Member

Wires the pre-approval / 'expected visitor' flow into the mobile app. The backend was fully built (create/list/redeem under /visitors/pre-approvals) but had no client methods and no UI — this adds both.

What

  • Client methods: createPreApproval, redeemPreApproval.
  • Resident — new /pre-approve screen: enter visitor name + apartment → get a short shareable code (defaults to ONE_TIME). Linked from the home screen.
  • Guard — the /gate screen gains a code input; redeeming a valid code auto-creates an ENTERED entry for the expected visitor and refreshes the list.

Verified E2E (expo-web + Chrome DevTools, live Neon)

  • Resident generated a code (7F56BDFE) for 'Expected Guest' @ B-201.
  • Guard entered the code on the gate → 'Expected Guest' appeared as ENTERED with a Check out action.
  • Console clean; full gate green (check-types, lint, test).

Follow-ups

  • QR generation + guard QR scanning (tasks #60/#61) — this ships the code-based path (#62); QR is a natural layer on top.
  • Optional validity window / max-uses fields in the resident form (backend already supports validUntil + maxUses).

New /pre-approve screen: a resident enters a visitor + apartment and gets a
short shareable code (createPreApproval). Adds the pre-approval client methods.
The gate screen gains a code input; redeeming a valid code auto-creates an
ENTERED entry for the expected visitor and refreshes the list.
@ankitsejwal ankitsejwal merged commit 225316f into main Jul 2, 2026
1 check passed
@ankitsejwal ankitsejwal deleted the feat/mobile-pre-approvals branch July 2, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant