feat(booth): pay-on-foot at the booth — ticket lookup, pay, exit, voucher, snapshots
Backend: PayStation.lookup (session view + quote in one read); ExitFlow.exitForBooth reuses the reader path's paid+grace validation (no booth-only unpaid bypass) and signs vehicle_exit + pulses an exit relay; printExitVoucher reprints the paid ticket id barcode; site_config.exit_voucher_default (migration 0002) drives the default. Routes: GET /api/session/:id, POST /api/exit, POST /api/voucher. Web: BoothPayModal (entry/now/duration/total, tender, 'Printo biletë dalje'), SnapshotStrip (entry/exit evidence), api.ts client fns, SiteSettings toggle.
This commit is contained in:
@@ -151,6 +151,15 @@ export const siteConfig = sqliteTable("site_config", {
|
||||
phone: text("phone"),
|
||||
/** Contact email. */
|
||||
email: text("email"),
|
||||
/** Default for the booth pay modal's "print exit ticket" checkbox. Site-wide
|
||||
* because it's booth GEOGRAPHY: when the booth is far from the exit, the
|
||||
* customer pays at the booth and self-exits later by scanning a printed exit
|
||||
* voucher (= the ticket id reprinted, now paid). When near the exit, the booth
|
||||
* opens the barrier directly. The operator may still override per transaction.
|
||||
* Stored 0/1 (SQLite has no bool). See wiki/concepts/booth-exit-flow.md. */
|
||||
exitVoucherDefault: integer("exit_voucher_default", { mode: "boolean" })
|
||||
.notNull()
|
||||
.default(false),
|
||||
updatedAt: text("updated_at")
|
||||
.notNull()
|
||||
.default(sql`(current_timestamp)`),
|
||||
|
||||
Reference in New Issue
Block a user