Admin: per-event registrations view, contact deletion, collapsible interface logs
- Registrations: event selector dropdown (default = active event), event name shown prominently in header with active badge, 'Delete all contacts for this event' action (deletes the contacts registered for the selected event) - Contacts: per-row Delete button (with confirm; cascades to registrations) - Interfaces: Sessionize + Pretix 'Recent runs' tables now in per-interface collapsibles, collapsed by default - api: deleteContact + deleteContacts helpers
This commit is contained in:
1 parent
c7d095aff7
commit
98f65e8665
4 files changed
+197
-66
No files matched your search
@@ -89,6 +89,19 @@ export async function updateContact(
|
||||
if (error) throw new ApiError(error.message);
|
||||
}
|
||||
|
||||
/** Delete a single contact (admin-only RLS). Cascades to their registrations. */
|
||||
export async function deleteContact(email: string): Promise<void> {
|
||||
const { error } = await supabase.from('contacts').delete().eq('email', email);
|
||||
if (error) throw new ApiError(error.message);
|
||||
}
|
||||
|
||||
/** Delete many contacts at once (admin-only RLS). */
|
||||
export async function deleteContacts(emails: string[]): Promise<void> {
|
||||
if (emails.length === 0) return;
|
||||
const { error } = await supabase.from('contacts').delete().in('email', emails);
|
||||
if (error) throw new ApiError(error.message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Regenerate the QR token of a contact's registration for the active event
|
||||
* (syncs the auth password, forces re-login). The token lives on the
|
||||
|
||||
Reference in new issue
Block a user