From 9b1b56e05d3a4c04cd93ca3e16a970c242395743 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 21 May 2026 15:55:19 +0200 Subject: [PATCH] feat(activities): status badge + buy-disabled on own pending events Show a "Pending review" (or "Rejected") badge on the user's own non-approved events, and disable the Buy Ticket button on any non-approved event with a "Not yet available" label. Probe auto_approve via the public endpoint with inkey, not adminkey, so the warning copy works for non-admin owners. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/modules/activities/views/EventsPage.vue | 28 ++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/modules/activities/views/EventsPage.vue b/src/modules/activities/views/EventsPage.vue index 2a4adac..a8eefdd 100644 --- a/src/modules/activities/views/EventsPage.vue +++ b/src/modules/activities/views/EventsPage.vue @@ -48,11 +48,13 @@ function canEdit(event: TicketedEvent): boolean { onMounted(async () => { if (!isAuthenticated.value) return - const adminKey = currentUser.value?.wallets?.[0]?.adminkey - if (!adminKey) return + const wallet = currentUser.value?.wallets?.[0] + if (!wallet?.inkey) return const ticketApi = injectService(SERVICE_TOKENS.TICKET_API) as TicketApiService - isAdmin.value = await ticketApi.isAdmin(adminKey) - autoApprove.value = await ticketApi.getAutoApprove(adminKey) + autoApprove.value = await ticketApi.getAutoApprove(wallet.inkey) + if (wallet.adminkey) { + isAdmin.value = await ticketApi.isAdmin(wallet.adminkey) + } }) function formatDate(dateStr: string | null | undefined) { @@ -159,7 +161,16 @@ function handleEventChanged() {
- {{ event.name }} +
+ {{ event.name }} + + {{ event.status === 'rejected' ? 'Rejected' : 'Pending review' }} + +
{{ event.info }}
@@ -186,13 +197,18 @@ function handleEventChanged() {