{#if $lq__event_event_file_obj_li}
{#each $lq__event_event_file_obj_li as event_file_obj, index}
{ // ae_promises[event_file_obj.event_file_id_random] ae_promises[event_file_obj?.event_file_id_random] = api.download_hosted_file({ api_cfg: $ae_api, hosted_file_id: event_file_obj?.hosted_file_id_random, return_file: true, filename: event_file_obj?.filename, auto_download: true, log_lvl: 0 }); }} class=" btn btn-sm text-xs w-full preset-tonal-primary hover:preset-tonal-success transition-all " >
{event_file_obj?.filename}
{/each}
{/if} {#if $ae_loc.edit_mode}
{#if $lq__event_location_obj_li && $lq__event_location_obj_li.length > 0}
Location: {#if $ae_loc.administrator_access} ({$lq__event_location_obj_li?.length}×) {/if} {#await ae_promises[slct_event_location_id]}
{:then result}
{/await}
{ // console.log(`slct_event_location_id:`, slct_event_location_id); console.log('Remove fields from the URL.'); // data_url.searchParams.delete('location_id'); data_url.searchParams.delete('presentation_id'); data_url.searchParams.delete('presenter_id'); data_url.searchParams.delete('session_id'); // let url_location_id = slct_event_location_id; // data_url.searchParams.set('location_id', url_location_id); let new_url = `/events/${$events_slct.event_id}/launcher`; if (slct_event_location_id) { $events_loc.launcher.slct.event_location_id = slct_event_location_id; $events_slct.event_location_id = slct_event_location_id; $events_slct.id_li__event_session = []; ae_promises[slct_event_location_id] = events_func.load_ae_obj_li__event_session({ api_cfg: $ae_api, for_obj_type: 'event_location', for_obj_id: $events_slct.event_location_id, inc_file_li: true, inc_presentation_li: true, inc_presenter_li: true, enabled: $events_loc.launcher.show_content__enabled_sessions ? 'all' : 'enabled', hidden: $events_loc.launcher.show_content__hidden_sessions ? 'all' : 'not_hidden', limit: 49, try_cache: true, log_lvl: 1, }) .then(async function (load_results) { console.log(`load_results = `, load_results); let event_session_id_li = []; let tmp_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery. for (let i = 0; i < load_results.length; i++) { let event_session_obj = load_results[i]; let event_session_id_random = event_session_obj.event_session_id_random; tmp_li.push(event_session_id_random); } event_session_id_li = tmp_li; console.log(`event_session_id_li:`, event_session_id_li); $events_slct.id_li__event_session = event_session_id_li; return load_results; }); new_url = `/events/${$events_slct.event_id}/launcher/${$events_slct.event_location_id}`; } else { // This will hide the selected session if the location is changed to false. // WARNING: This may need to be commented out later. // slct_event_session_id = null; $events_loc.launcher.slct.event_location_id = null; $events_slct.event_location_id = null; $events_loc.launcher.slct.event_session_id = null; $events_slct.event_session_id = null; // WARNING: This may need to be commented out later. } goto(new_url, {replaceState: true}); // goto(new_url, {replaceState: false}); }} >
Select a location
{#each $lq__event_location_obj_li as event_location_obj}
{event_location_obj?.name}
{/each}
{:else}
No locations found. (Event ID: {$lq__event_obj?.id})
{/if}
{/if} {#if $lq__location_event_file_obj_li}
{#each $lq__location_event_file_obj_li as event_file_obj, index}
{ // ae_promises[event_file_obj.event_file_id_random] ae_promises[event_file_obj?.event_file_id_random] = api.download_hosted_file({ api_cfg: $ae_api, hosted_file_id: event_file_obj?.hosted_file_id_random, return_file: true, filename: event_file_obj?.filename, auto_download: true, log_lvl: 0 }); }} class=" btn btn-sm text-xs w-full preset-tonal-primary hover:preset-tonal-success transition-all " >
{event_file_obj?.filename}
{/each}
{/if} {#if $lq__event_session_obj_li}
{/if} {#if $ae_loc.edit_mode}
{ $events_loc.launcher.show_content__hidden_files = !$events_loc.launcher.show_content__hidden_files; }} class=" btn btn-sm text-xs w-1/2 max-w-1/2 preset-tonal-warning hover:preset-tonal-success transition-all " > {#if $events_loc.launcher.show_content__hidden_files}
Hide Files {:else}
All Files {/if}
{ $events_loc.launcher.show_content__hidden_sessions = !$events_loc.launcher.show_content__hidden_sessions; }} class=" btn btn-sm text-xs w-1/2 max-w-1/2 preset-tonal-warning hover:preset-tonal-success transition-all " > {#if $events_loc.launcher.show_content__hidden_sessions}
Hide Sessions {:else}
All Sessions {/if}
{/if}