diff --git a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte index c4598a57..bb7c5608 100644 --- a/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/ae_comp__badge_obj_li.svelte @@ -42,6 +42,9 @@ import { // Track per-badge copy state for the "Review Link" clipboard button let copy_status: Record = $state({}); +// Track which badge has a pending email confirmation (null = none pending) +let email_confirm_badge_id: string | null = $state(null); + // Access level shortcuts let is_trusted = $derived($ae_loc.trusted_access === true); let is_admin = $derived($ae_loc.administrator_access === true); @@ -80,8 +83,13 @@ async function copy_review_link(event_badge_obj: any) { } } -// TODO: replace alert with actual email API call when available -function send_review_email(event_badge_obj: any) { +// TODO: replace with actual email API call when available +function confirm_send_review_email(event_badge_obj: any) { + email_confirm_badge_id = event_badge_obj.event_badge_id; +} + +function do_send_review_email(event_badge_obj: any) { + email_confirm_badge_id = null; const name = event_badge_obj?.full_name_override ?? event_badge_obj?.full_name ?? @@ -404,16 +412,34 @@ let visible_badge_obj_li = $derived( {#if is_admin && (is_edit_mode || is_manager)} - + {#if email_confirm_badge_id === event_badge_obj.event_badge_id} + +
+ Send link to {display_name}? + + +
+ {:else} + + {/if} {/if}