feat: finalize ticket merging and speaker-aware imports

This commit is contained in:
Lago committed 2026-10-10 13:28:18 +02:00
1 parent 648daa0794
commit 4e71e9b797
35 files changed
+1772 -348

No files matched your search

+5 -1
View File
@@ -153,10 +153,14 @@ export async function setRegistrationType(contactEmail: string, type: Registrati
}
export async function setCheckedIn(registrationId: string, checkedIn: boolean): Promise<void> {
const { error } = await supabase.from('registrations').update({ checked_in: checkedIn }).eq('id', registrationId);
const { data, error } = await supabase.from('registrations').update({ checked_in: checkedIn }).eq('id', registrationId).select('id').single();
if (error) throw new ApiError(error.message);
if (!data) throw new ApiError('Registration no longer exists');
}
export const mergeTickets = (sourceId: string, targetId: string) =>
rpc<import('./types').TicketMergeResult>('merge_tickets', { p_source_id: sourceId, p_target_id: targetId });
// ---- Sponsors ----------------------------------------------------------------
export async function upsertSponsor(
+10
View File
@@ -172,6 +172,8 @@ export interface SidecarStatus {
}
export interface Registration {
import_source?: 'sessionize' | null;
external_id?: string | null;
id: string;
event_id: string;
contact_email: string;
@@ -182,6 +184,14 @@ export interface Registration {
created_at: string;
}
export interface TicketMergeResult {
source_id: string;
target_id: string;
target_email: string;
type: RegistrationType;
sessions_transferred: number;
}
export interface Sponsor {
id: string;
event_id: string;