fix(launcher): restore digital poster session support

type_code was a prop in launcher_session_view that was never passed by
the parent layout, silently killing all poster-specific code paths
(sort order, section labels, poster presenter component, inline
presenter display). Fixed by deriving type_code directly from the
session LiveQuery object already present in the component.

Also adds a poster icon badge to the session list so poster sessions
are visually distinct from oral sessions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-04 17:39:41 -05:00
parent eb35cd023a
commit 9d2bab420b
2 changed files with 9 additions and 2 deletions

View File

@@ -1,13 +1,11 @@
<script lang="ts">
interface Props {
slct__event_session_id?: string | null;
type_code?: string;
log_lvl?: number;
}
let {
slct__event_session_id = $bindable(null),
type_code = $bindable(''),
log_lvl = $bindable(1)
}: Props = $props();
@@ -47,6 +45,12 @@
liveQuery(() => db_events.session.get(slct__event_session_id))
);
// WHY: type_code drives poster vs. oral UI branching throughout this component.
// It was previously a prop that was never passed by the parent, so all poster
// code paths were silently dead. Deriving it here from the session object
// ensures it always reflects the current session.
let type_code = $derived($lq__event_session_obj?.type_code ?? '');
// Event File (for a Session)
// WHY: Pure data retrieval. Side effects (updating global stores) are removed
// to prevent circular reactivity loops during rapid navigation.

View File

@@ -288,6 +288,9 @@
trasnition-all
"
>
{#if event_session_obj?.type_code == 'poster'}
<span class="fas fa-image mr-1 text-primary-500" title="Digital Poster Session"></span>
{/if}
{event_session_obj?.name}
</span>
</button>