fix(locations): auto-load locations on page open; fix session query and POC visibility
- Add +page.ts to trigger load_ae_obj_li__event_location on page load (locations were never fetched without a manual trigger) - Fix ae_comp__event_session_obj_li_wrapper: query used event_location_id_random (deprecated index) instead of event_location_id, causing empty session lists under each location - Wire hide__session_poc to pres_mgmt_loc.current.show__session_li_poc_field so the Options toggle actually takes effect in the per-location session list - Also set hide__session_location=true since location is implicit in that context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
|
||||
## 🔴 BGH Conference — April 21 (Must Fix Before Event)
|
||||
|
||||
- [ ] **[Locations] Event Locations list does not auto-load** — list must be loaded automatically on
|
||||
page open; currently requires manual trigger. Also needs general cleanup of the Locations list UI.
|
||||
- [x] **[Locations] Event Locations list does not auto-load** — added `+page.ts` to trigger
|
||||
`load_ae_obj_li__event_location` on page load. Also fixed session query using stale
|
||||
`event_location_id_random` index (should be `event_location_id`). (2026-04-19)
|
||||
|
||||
- [ ] **[Files] Warn/error on `.ppt` upload** — if a presenter tries to upload a `.ppt` file (legacy
|
||||
PowerPoint format), show a clear warning or block the upload with an error message instructing them
|
||||
@@ -19,9 +20,10 @@
|
||||
the build and deployment process; verify the latest version is installed and functional on the
|
||||
onsite Mac laptops before April 21.
|
||||
|
||||
- [ ] **[Pres Mgmt] POC column shown in "Sessions at this Location"** — the POC (Point of Contact)
|
||||
column is appearing in the Sessions at this Location view when it should be hidden. Identify the
|
||||
condition controlling visibility and suppress it in this context.
|
||||
- [x] **[Pres Mgmt] POC column shown in "Sessions at this Location"** — wired
|
||||
`hide__session_poc={!pres_mgmt_loc.current.show__session_li_poc_field}` in
|
||||
`ae_comp__event_location_obj_li.svelte`; also set `hide__session_location={true}` since
|
||||
location is implicit in that context. (2026-04-19)
|
||||
|
||||
---
|
||||
|
||||
|
||||
23
src/routes/events/[event_id]/(pres_mgmt)/locations/+page.ts
Normal file
23
src/routes/events/[event_id]/(pres_mgmt)/locations/+page.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/** @type {import('./$types').PageLoad} */
|
||||
|
||||
import { browser } from '$app/environment';
|
||||
import { events_func } from '$lib/ae_events/ae_events_functions';
|
||||
|
||||
export async function load({ parent }) {
|
||||
const parent_data = await parent();
|
||||
|
||||
const account_id = parent_data.account_id;
|
||||
const ae_acct = parent_data[account_id];
|
||||
const event_id = ae_acct.slct.event_id;
|
||||
|
||||
if (browser && event_id) {
|
||||
events_func.load_ae_obj_li__event_location({
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'event',
|
||||
for_obj_id: event_id,
|
||||
hidden: 'all'
|
||||
});
|
||||
}
|
||||
|
||||
return parent_data;
|
||||
}
|
||||
@@ -386,6 +386,8 @@ if (!pres_mgmt_loc.current.location_kv) {
|
||||
link_to_type={'event_location'}
|
||||
link_to_id={event_location_obj?.event_location_id}
|
||||
event_session_id_random_li={[]}
|
||||
hide__session_location={true}
|
||||
hide__session_poc={!pres_mgmt_loc.current.show__session_li_poc_field}
|
||||
{log_lvl}></Comp_event_session_obj_li>
|
||||
{/if}
|
||||
{:else if pres_mgmt_loc.current.show_content__location_devices_sessions == 'devices'}
|
||||
|
||||
@@ -41,7 +41,7 @@ let lq__event_session_obj_li = $derived.by(() => {
|
||||
return liveQuery(async () => {
|
||||
if (link_to_type && link_to_id) {
|
||||
const results = await db_events.session
|
||||
.where(`${link_to_type}_id_random`)
|
||||
.where(`${link_to_type}_id`)
|
||||
.equals(link_to_id)
|
||||
.sortBy('start_datetime');
|
||||
return results;
|
||||
|
||||
Reference in New Issue
Block a user