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 6e577b8a..bf6f6b44 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 @@ -96,21 +96,20 @@ let visible_badge_obj_li = $derived( if (list === undefined || list === null) return null; if (!Array.isArray(list)) return []; - // The Printed Status filter dropdown is accessible to: trusted+edit OR manager+. - // Match that gate here so the filter actually controls what's displayed. - const can_use_filter = (is_trusted && is_edit_mode) || $ae_loc.manager_access; const filtered = list.filter((item: any) => { if (!item) return false; - if (can_use_filter) { - // Filter dropdown controls visibility for users who can access it. + if (is_trusted) { + // Trusted staff and above: qry_printed_status is the authoritative control. + // Filter state persists across edit mode toggles — intentional. Staff set + // their filter and it stays regardless of whether edit mode is on or off. const ps = badges_loc.current.qry_printed_status; if (ps === 'printed') return (item.print_count ?? 0) >= 1 && !item.hide; if (ps === 'not_printed') return (item.print_count ?? 0) < 1 && !item.hide; return !item.hide; // 'all' — show everything non-hidden } - // Kiosk / attendee / below-trusted: only unprinted badges. - // The filter dropdown is not visible at these access levels, so - // qry_printed_status is not a reliable signal here. + // Public (kiosk) / authenticated / anonymous: only unprinted. + // Badge kiosks run at public_access — attendees should only see their own + // unprinted badge, never a list of already-printed ones. return (item.print_count ?? 0) < 1 && !item.hide; });