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.
This commit is contained in:
Scott Idem
2026-02-03 19:19:11 -05:00
parent 0809ad3eac
commit 6abe4c897e
8 changed files with 103 additions and 15 deletions

View File

@@ -146,11 +146,11 @@
.then(function (result) {
console.log(result);
video_clip_file_kv[result.hosted_file_id_random] = {};
video_clip_file_kv[result.hosted_file_id_random] = result;
video_clip_file_kv[result.hosted_file_id] = {};
video_clip_file_kv[result.hosted_file_id] = result;
// $ae_loc.files.video_clip_file_kv[result.hosted_file_id_random] = {};
// $ae_loc.files.video_clip_file_kv[result.hosted_file_id_random] = result;
// $ae_loc.files.video_clip_file_kv[result.hosted_file_id] = {};
// $ae_loc.files.video_clip_file_kv[result.hosted_file_id] = result;
$ae_sess.files.processed_file_kv[hosted_file_id].submit_status = 'clipped';
$ae_sess.files.processed_file_kv[hosted_file_id].clip_complete = true;
@@ -203,7 +203,7 @@
);
}}
class="btn btn-sm preset-tonal-warning hover:preset-filled-warning-500"
title={`Remove this file from list of videos:\n${hosted_file_obj.filename}\n[API] SHA256: ${hosted_file_obj?.hash_sha256?.slice(0, 10)}... Hosted ID: ${hosted_file_obj.hosted_file_id_random}`}
title={`Remove this file from list of videos:\n${hosted_file_obj.filename}\n[API] SHA256: ${hosted_file_obj?.hash_sha256?.slice(0, 10)}... Hosted ID: ${hosted_file_obj.hosted_file_id}`}
>
<span class="fas fa-minus-circle m-1"></span>
<span class="">Remove</span>
@@ -229,7 +229,7 @@
>
<span>
<span class="text-sm font-bold"> File ID: </span>
{hosted_file_obj.hosted_file_id_random}</span
{hosted_file_obj.hosted_file_id}</span
>
<span>
<span class="text-sm font-bold"> Type: </span>
@@ -242,12 +242,12 @@
onsubmit={preventDefault(handle_clip_video)}
class="{class_li_default} {class_li}"
>
<!-- {$ae_sess?.files[hosted_file_obj?.hosted_file_id_random ?? 'obj'].submit_status ?? 'not set'} -->
<!-- {$ae_sess?.files[hosted_file_obj?.hosted_file_id ?? 'obj'].submit_status ?? 'not set'} -->
<input
type="hidden"
name="hosted_file_id"
value={hosted_file_obj.hosted_file_id_random}
value={hosted_file_obj.hosted_file_id}
/>
<div class="flex flex-row gap-1 justify-center items-center w-full">

View File

@@ -136,15 +136,35 @@ async function _refresh_presenter_li_background({ api_cfg, for_obj_type, for_obj
const processed = await process_ae_obj__event_presenter_props({ obj_li: result_li, log_lvl });
// String-Only ID Vision: Ensure linking ID is set for indexing
processed.forEach(p => {
if (for_obj_type === 'event_presentation') p.event_presentation_id = for_obj_id;
if (for_obj_type === 'event_session') p.event_session_id = for_obj_id;
if (for_obj_type === 'event') p.event_id = for_obj_id;
processed.forEach((p) => {
if (for_obj_type === 'event_presentation') {
p.event_presentation_id = for_obj_id;
p.event_presentation_id_random = for_obj_id;
}
if (for_obj_type === 'event_session') {
p.event_session_id = for_obj_id;
p.event_session_id_random = for_obj_id;
}
if (for_obj_type === 'event') {
p.event_id = for_obj_id;
p.event_id_random = for_obj_id;
}
});
if (try_cache) {
await db_save_ae_obj_li__ae_obj({ db_instance: db_events, table_name: 'presenter', obj_li: processed, properties_to_save, log_lvl });
}
// Background nested loads for refreshed items (FIRE AND FORGET)
if (inc_file_li) {
processed.forEach(p => {
load_ae_obj_li__event_file({
api_cfg, for_obj_type: 'event_presenter', for_obj_id: p.id,
enabled: 'all', limit: 25, try_cache: false, log_lvl: 0
});
});
}
return processed;
}
} catch (e) {}
@@ -297,4 +317,4 @@ export async function process_ae_obj__event_presenter_props({ obj_li, log_lvl =
if (obj.event_id_random) obj.event_id = obj.event_id_random;
return obj;
}});
}
}