diff --git a/src/lib/ae_events/ae_events__event_location.ts b/src/lib/ae_events/ae_events__event_location.ts index 61e884de..e4b04199 100644 --- a/src/lib/ae_events/ae_events__event_location.ts +++ b/src/lib/ae_events/ae_events__event_location.ts @@ -357,7 +357,7 @@ async function _handle_nested_loads( for_obj_type: 'event_location', for_obj_id: current_location_id, enabled: 'all', - limit: 25, + hidden: 'all', log_lvl }).then((res) => (location_obj.event_file_li = res)) ); diff --git a/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/+page.svelte b/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/+page.svelte index 0975fa5c..1f4da455 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/+page.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/+page.svelte @@ -29,6 +29,7 @@ import { events_trigger, events_trig_kv } from '$lib/stores/ae_events_stores'; +import { events_func } from '$lib/ae_events/ae_events_functions'; import Comp_event_files_upload from '../../../../ae_comp__event_files_upload.svelte'; import Comp_event_session_obj_li from '../../../../ae_comp__event_session_obj_li.svelte'; @@ -64,6 +65,21 @@ $effect(() => { }); }); +// WHY: Dexie starts empty on first load — liveQuery returns nothing until files are fetched. +// The upload component and refresh button are targeted, but nothing triggers the initial load. +$effect(() => { + const location_id = ae_acct?.slct?.event_location_id; + if (!location_id || !$ae_api) return; + events_func.load_ae_obj_li__event_file({ + api_cfg: $ae_api, + for_obj_type: 'event_location', + for_obj_id: location_id, + enabled: 'all', + hidden: 'all', + try_cache: true + }); +}); + let lq__event_obj = $derived( liveQuery(async () => { if (!ae_acct?.slct.event_id) return null; diff --git a/src/routes/events/[event_id]/(pres_mgmt)/locations/ae_comp__event_location_obj_li.svelte b/src/routes/events/[event_id]/(pres_mgmt)/locations/ae_comp__event_location_obj_li.svelte index fa1c0416..efb3e482 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/locations/ae_comp__event_location_obj_li.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/locations/ae_comp__event_location_obj_li.svelte @@ -49,7 +49,6 @@ import { MapPinned, Plane, Plus, - Send, TriangleAlert } from '@lucide/svelte'; // if (log_lvl) { @@ -187,15 +186,7 @@ if (!pres_mgmt_loc.current.location_kv) { - - - - - -