diff --git a/documentation/AGENT_TODO.md b/documentation/AGENT_TODO.md index 07c37fe8..c222ff3c 100644 --- a/documentation/AGENT_TODO.md +++ b/documentation/AGENT_TODO.md @@ -8,10 +8,12 @@ - [ ] **Step 3:** Implement formal error boundaries for 403/401 API responses to provide user-friendly "Session Expired" or "Access Denied" UI. ## 🚧 Upcoming High Priority +- **Events Launcher:** Investigate why not all Event Locations are showing in the select options list. Modify event loading to include the full location list. - **CRUD v2 Refactor:** Finalize retirement of `Element_ae_crud_v2.svelte` in favor of V3 Editor. - **Temp Cleanup:** Auto-removal of native `.tmp` files older than 24h. ## ✅ Completed Recently +- [x] **[API]** **Event File V3 Mapping:** Implemented `inc_hosted_file` support and mapped prefixed backend fields (`hosted_file_hash_sha256`, etc.) to flat properties. - [x] **[UI]** **Badge Rendering Fix:** Refactored `badge_template` lookup to use V3 Triple ID pattern. - [x] **[API]** **event_session Search Fix:** Resolved 400 error (`Unauthorized search field 'account_id'`) via backend update. - [x] **[Security]** Purged redundant `x-aether-api-token` from frontend and notified backend. diff --git a/src/lib/ae_events/ae_events__event.ts b/src/lib/ae_events/ae_events__event.ts index 4fcff2b5..3d385e57 100644 --- a/src/lib/ae_events/ae_events__event.ts +++ b/src/lib/ae_events/ae_events__event.ts @@ -24,6 +24,8 @@ export async function load_ae_obj_id__event({ inc_location_li = false, inc_session_li = false, inc_template_li = false, + enabled = 'enabled', + hidden = 'not_hidden', try_cache = true, log_lvl = 0 }: { @@ -35,6 +37,8 @@ export async function load_ae_obj_id__event({ inc_location_li?: boolean; inc_session_li?: boolean; inc_template_li?: boolean; + enabled?: 'enabled' | 'all' | 'not_enabled'; + hidden?: 'hidden' | 'all' | 'not_hidden'; try_cache?: boolean; log_lvl?: number; }): Promise { @@ -53,12 +57,14 @@ export async function load_ae_obj_id__event({ _refresh_event_v3_background({ api_cfg, event_id, view, try_cache, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, + enabled, hidden, log_lvl: 0 }); // Still handle nested loads for the cached version to ensure UI richness return await _handle_nested_loads(cached_event, { - api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl + api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, + enabled, hidden, log_lvl }); } } catch (e) { @@ -70,6 +76,7 @@ export async function load_ae_obj_id__event({ return await _refresh_event_v3_background({ api_cfg, event_id, view, try_cache, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, + enabled, hidden, log_lvl }); } @@ -80,6 +87,7 @@ export async function load_ae_obj_id__event({ async function _refresh_event_v3_background({ api_cfg, event_id, view, try_cache, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, + enabled, hidden, log_lvl }: any) { // Check if offline @@ -115,7 +123,8 @@ async function _refresh_event_v3_background({ } return await _handle_nested_loads(processed_obj, { - api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl + api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, + enabled, hidden, log_lvl }); } } catch (error: any) { @@ -127,7 +136,7 @@ async function _refresh_event_v3_background({ /** * Shared logic for loading nested child collections */ -async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, log_lvl }: any) { +async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, inc_file_li, inc_location_li, inc_session_li, inc_template_li, enabled, hidden, log_lvl }: any) { if (log_lvl) console.log(`Loading nested collections for event: ${event_obj.event_id} (Devices: ${inc_device_li}, Files: ${inc_file_li}, Locations: ${inc_location_li}, Sessions: ${inc_session_li}, Templates: ${inc_template_li})`); // String-Only ID Vision: the '_id' field IS the string ID const current_event_id = event_obj.id || event_obj.event_id; @@ -158,6 +167,8 @@ async function _handle_nested_loads(event_obj: any, { api_cfg, inc_device_li, in api_cfg, for_obj_type: 'event', for_obj_id: current_event_id, + enabled, + hidden, log_lvl }).then(res => event_obj.event_location_obj_li = res)); } diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts b/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts index 4639fb3b..ca6e19de 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts +++ b/src/routes/events/[event_id]/(launcher)/launcher/+layout.ts @@ -1,11 +1,11 @@ /** @type {import('./$types').LayoutLoad} */ console.log(`Events - [event_id] launcher +layout.ts start`); -import { error } from '@sveltejs/kit'; +// import { error } from '@sveltejs/kit'; import { browser } from '$app/environment'; import { events_func } from '$lib/ae_events_functions'; -export async function load({ params, parent, url }) { +export async function load({ params, parent }) { // route const log_lvl: number = 0; @@ -53,6 +53,15 @@ export async function load({ params, parent, url }) { for_obj_id: event_id, log_lvl: 0 }); + + events_func.load_ae_obj_li__event_location({ + api_cfg: ae_acct.api, + for_obj_type: 'event', + for_obj_id: event_id, + enabled: 'enabled', + hidden: 'all', + log_lvl: 0 + }); } return data; diff --git a/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte b/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte index 02918589..29252730 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_background_sync.svelte @@ -121,6 +121,9 @@ await events_func.load_ae_obj_id__event({ api_cfg: $ae_api, event_id: $events_slct.event_id, + inc_location_li: true, + enabled: 'enabled', + hidden: 'all', try_cache: true, log_lvl: 0 }); diff --git a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte index 0e127cf1..ffa191b9 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher_file_cont.svelte @@ -244,11 +244,13 @@ 'Please wait while this file downloads...'} *** -

Most files will automatically be opened full screen.

-

- PowerPoint or KeyNote will attempt to display in presenter view. -

-

Please close the file when finished.

+ {#if $ae_loc.is_native && $events_loc.launcher.app_mode === 'native'} +

Most files will automatically be opened full screen.

+

+ PowerPoint or KeyNote will attempt to display in presenter view. +

+

Please close the file when finished.

+ {/if} {/if}