feat: finalize ticket merging and speaker-aware imports
Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
1 parent
7f340b4c08
commit
fbc827c2b8
35 files changed
+1772
-348
No files matched your search
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user