Files
OSIT-AE-App-Svelte/src/routes/events/[event_id]/(launcher)/launcher_presentation_view.svelte
Scott Idem 6abe4c897e fix(events): ensure presenters and presentation-level files show correctly
- Harden 'ae_events__event_presenter.ts' to ensure both ID and ID_random fields are synced during refreshes.
- Update presenter list wrapper to use '_id_random' for reliable Dexie queries.
- Enable 'inc_all_file_li' and 'inc_file_li' in session loaders to pre-cache nested files.
- Introduce 'Launcher_presentation_view.svelte' to explicitly display files linked to presentations.
- Refactor presenter views to focus exclusively on speaker-specific files, avoiding UI duplication.
2026-02-03 19:19:11 -05:00

62 lines
2.6 KiB
Svelte

<script lang="ts">
interface Props {
lq__event_presentation_obj: any;
}
let { lq__event_presentation_obj }: Props = $props();
import { liveQuery } from 'dexie';
import { db_events } from '$lib/ae_events/db_events';
import { ae_loc } from '$lib/stores/ae_stores';
import { events_loc, events_sess } from '$lib/stores/ae_events_stores';
import Event_launcher_file_cont from './launcher_file_cont.svelte';
// Event File (Directly linked to presentation)
let lq__event_file_obj_li = $derived(
liveQuery(async () => {
if (!lq__event_presentation_obj?.event_presentation_id) return [];
let results = await db_events.file
.where('for_id')
.equals(lq__event_presentation_obj.event_presentation_id)
.reverse()
.sortBy('created_on');
return results;
})
);
</script>
{#if $lq__event_file_obj_li && $lq__event_file_obj_li.length}
<section class="event_presentation_file_list my-1">
<div class="text-[10px] text-surface-600-400 uppercase font-bold tracking-wider opacity-70">
Presentation Files:
</div>
<ul class="space-y-1">
{#each $lq__event_file_obj_li as event_file_obj}
<li
class="flex flex-col md:flex-row flex-wrap gap-1 items-center justify-start"
class:hidden={!$events_loc.launcher.show_content__hidden_files &&
event_file_obj.hide}
>
<Event_launcher_file_cont
event_file_id={event_file_obj.event_file_id}
{event_file_obj}
hide_created_on={false}
bind:hide_draft={$events_loc.launcher.hide_content__draft_files}
show_bak_download={$ae_loc.trusted_access}
session_type={event_file_obj?.event_session_type_code ?? 'oral'}
open_method={event_file_obj?.event_session_type_code == 'poster'
? 'modal'
: null}
modal_title={lq__event_presentation_obj?.name}
bind:modal__title={$events_sess.launcher.modal__title}
bind:modal__open_event_file_id={
$events_sess.launcher.modal__open_event_file_id
}
bind:modal__event_file_obj={$events_sess.launcher.modal__event_file_obj}
/>
</li>
{/each}
</ul>
</section>
{/if}