auth-yes/ui/components/sessions/EventAttendeesDrawer.tsx
google-labs-jules[bot] 0a4f6a8344 feat(event-controls): implement live attendee management drawer and session pause
This commit finalizes Phase 4 of the Event & Session Overhaul:
1. Implements session pause logic across PostgreSQL schema, Valkey cache, and `auth_forward.ts` edge check (`is_paused`).
2. Implements non-destructive operational endpoints (`/api/events/:id/rotate-pin`, `/api/events/:id/expand`, `/api/events/:id/attendees`) with Zero-Trust Ownership verification.
3. Upgrades existing `end` and `extend` endpoints in `events.ts` to utilize robust Zero-Trust Ownership queries (created_by OR isGlobalAdmin).
4. Creates `EventAttendeesDrawer.tsx` to handle live participant inspection and individual session controls (Pause, Revoke).
5. Updates `EventCockpitDeck.tsx` and `SessionsScript.tsx` to mount and drive the new controls via vanilla JavaScript, respecting zero-framework guidelines.
6. Ensures `deno fmt`, `deno task lint`, `deno task check` and `deno test` execute successfully against the new schema and API guards.

Co-authored-by: mrteye <1945243+mrteye@users.noreply.github.com>
2026-08-27 01:53:52 +00:00

50 lines
1.7 KiB
TypeScript

export const EventAttendeesDrawer = () => {
return (
<div
id="attendeesDrawer"
class="drawer-overlay"
style="display: none;"
>
<div
class="card"
style="border-left: 4px solid var(--primary); margin-bottom: 1.5rem;"
>
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem;">
<div style="width: 100%;">
<div style="display: flex; justify-content: space-between; align-items: center;">
<h3
id="attendeesDrawerTitle"
style="margin: 0 0 0.25rem 0; color: var(--text-primary);"
>
Live Attendees
</h3>
<button
type="button"
onclick="closeAttendeesDrawer()"
style="background: none; border: none; font-size: 1.3rem; color: var(--text-muted); cursor: pointer;"
aria-label="Close Drawer"
>
&times;
</button>
</div>
<p style="color: var(--text-secondary); font-size: 0.85rem; margin: 0;">
Manage active guest sessions for{" "}
<strong id="attendeesDrawerEventName">...</strong>.
</p>
</div>
</div>
<div
id="attendeesDrawerContent"
style="min-height: 200px; max-height: 400px; overflow-y: auto; padding-right: 0.5rem;"
>
{/* Populated dynamically via JS */}
<div style="display: flex; justify-content: center; align-items: center; height: 100%; color: var(--text-muted); font-size: 0.9rem;">
Loading attendees...
</div>
</div>
</div>
</div>
);
};