CampgroundTickets/backend
Hank 1ba3f9ad1c Ticket vouchers now return remaining and decrement on use
The ticket-vouchers lookup previously returned the tier entitlement
every time, so a donor could keep claiming free tickets by re-
submitting the form. It now subtracts vouchers already consumed:

  remaining = entitled - used

where `used` is the sum of the Vouchers column across that donor's
prior ticket orders (each checkout stores what it applied). Response
gains entitled/used/remaining; `vouchers` is now the remaining count
the form should grant. Consumption is implicit — no counter to keep in
sync — and resets by zeroing/deleting the Vouchers value on the order
row in NocoDB.

- nocodb: findByEmail + vouchersUsedByEmail (case-insensitive).
- 8 new tests (36 total). Doc updated with the new response + reset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 22:11:08 +00:00
..
src Ticket vouchers now return remaining and decrement on use 2026-07-16 22:11:08 +00:00
package-lock.json Initial Camp Scan ticketing system 2026-07-08 03:47:59 +00:00
package.json Initial Camp Scan ticketing system 2026-07-08 03:47:59 +00:00
tsconfig.json Initial Camp Scan ticketing system 2026-07-08 03:47:59 +00:00