From 15329e3e84d63b9aebdee908be29fde7023f648a Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Sat, 18 Apr 2026 17:06:17 +0100 Subject: [PATCH] refactor(events): gate member benefits on hasMemberAccess Extracts hasMemberAccess(member) in tickets.js and uses it across event registration, ticket purchase, and series purchase flows so guest, suspended, and cancelled records no longer count as members while pending_payment still does. --- app/components/SeriesPassPurchase.vue | 5 +- server/api/events/[id]/register.post.js | 12 +- .../api/events/[id]/tickets/purchase.post.js | 14 +- .../api/series/[id]/tickets/purchase.post.js | 12 +- server/utils/tickets.js | 35 +++-- tests/server/api/event-registration.test.js | 8 +- tests/server/utils/tickets.test.js | 132 ++++++++++++++++++ 7 files changed, 188 insertions(+), 30 deletions(-) diff --git a/app/components/SeriesPassPurchase.vue b/app/components/SeriesPassPurchase.vue index eda86f7..8d3e7f1 100644 --- a/app/components/SeriesPassPurchase.vue +++ b/app/components/SeriesPassPurchase.vue @@ -4,7 +4,7 @@
+ />

Loading series pass information...

@@ -58,7 +58,7 @@ }} -
+