408 lines
16 KiB
Svelte
408 lines
16 KiB
Svelte
<script lang="ts">
|
||
// export let data: any;
|
||
export let log_lvl: number = 0;
|
||
|
||
import type { key_val } from '$lib/ae_stores';
|
||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||
import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/ae_events_stores';
|
||
// import { events_func } from '$lib/ae_events_functions';
|
||
|
||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||
import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||
import Comp__pres_mgmt_menu_nav from '../ae_comp__events_menu_nav.svelte';
|
||
|
||
export let lq__event_obj: any;
|
||
|
||
// let ae_tmp: key_val = {};
|
||
// let ae_triggers: key_val = {};
|
||
|
||
</script>
|
||
|
||
|
||
<!-- New standard page specific menu 2025-06-20 -->
|
||
<div
|
||
class="pres_mgmt__session_search_menu ae_container_module_menu"
|
||
>
|
||
|
||
<!-- BEGIN: The menu button options -->
|
||
<div
|
||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
|
||
|
||
<Comp__pres_mgmt_menu_nav
|
||
hide={!$ae_loc.authenticated_access}
|
||
event_id={$lq__event_obj?.event_id}
|
||
ae_core={$ae_loc.administrator_access}
|
||
events__locations={$ae_loc.administrator_access}
|
||
events__reports={$ae_loc.trusted_access}
|
||
/>
|
||
|
||
<span
|
||
class="ae_menu__object_options flex flex-row items-center justify-around"
|
||
>
|
||
<!-- Button to toggle between the regular event session search view and managing event files -->
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.show_content__event_view == 'manage_files') {
|
||
$events_loc.pres_mgmt.show_content__event_view = null;
|
||
} else {
|
||
$events_loc.pres_mgmt.show_content__event_view = 'manage_files';
|
||
}
|
||
}}
|
||
class="{ae_snip.classes__events_pres_mgmt_menu__button_special}"
|
||
class:preset-filled-primary-500={$events_loc.pres_mgmt.show_content__event_view == 'manage_files'}
|
||
class:preset-tonal-primary={$events_loc.pres_mgmt.show_content__event_view != 'manage_files'}
|
||
class:hidden={!$ae_loc.administrator_access || 1==1}
|
||
disabled={!$ae_loc.manager_access}
|
||
title="Session search or manage files for the event"
|
||
>
|
||
{#if $events_loc.pres_mgmt.show_content__event_view == 'manage_files'}
|
||
<span class="fas fa-users m-1"></span>
|
||
<!-- View Session Search -->
|
||
Session Search?
|
||
{:else}
|
||
<span class="fas fa-file-archive m-1"></span>
|
||
Event Files?
|
||
<span
|
||
class="badge badge-icon preset-tonal-success absolute -top-1.5 -right-1.5 z-10"
|
||
class:hidden={!$lq__event_obj?.file_count}
|
||
>
|
||
{$lq__event_obj?.file_count}×
|
||
</span>
|
||
{/if}
|
||
</button>
|
||
|
||
<!-- Button to toggle between showing and not showing the extended options menu -->
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.show_menu__session_search == 'options') {
|
||
$events_loc.pres_mgmt.show_menu__session_search = null;
|
||
} else {
|
||
$events_loc.pres_mgmt.show_menu__session_search = 'options';
|
||
}
|
||
}}
|
||
class="btn btn-sm mx-1"
|
||
class:ae_btn_info_filled={$events_loc.pres_mgmt.show_menu__session_search == 'options'}
|
||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__session_search != 'options'}
|
||
class:hidden={!$ae_loc.trusted_access}
|
||
title="Options for the event session search"
|
||
>
|
||
<span class="fas fa-cog m-1"></span>
|
||
{#if $events_loc.pres_mgmt.show_menu__session_search == 'options'}
|
||
Hide
|
||
{:else}
|
||
<span class="hidden">
|
||
Show
|
||
</span>
|
||
{/if}
|
||
Options?
|
||
</button>
|
||
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.show_menu__session_search == 'help') {
|
||
$events_loc.pres_mgmt.show_menu__session_search = null;
|
||
} else {
|
||
$events_loc.pres_mgmt.show_menu__session_search = 'help';
|
||
}
|
||
}}
|
||
class="btn btn-sm mx-1"
|
||
class:ae_btn_info_filled={$events_loc.pres_mgmt.show_menu__session_search == 'help'}
|
||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__session_search != 'help'}
|
||
title="Help and information about the session search"
|
||
>
|
||
<span class="fas fa-question-circle m-1"></span>
|
||
{#if $events_loc.pres_mgmt.show_menu__session_search == 'help'}
|
||
Hide Help?
|
||
{:else}
|
||
Help?
|
||
{/if}
|
||
</button>
|
||
</span>
|
||
|
||
<span
|
||
class="ae_menu__action_options"
|
||
class:hidden={true}
|
||
>
|
||
No action options here yet.
|
||
</span>
|
||
|
||
|
||
</div> <!-- END: The menu button options -->
|
||
|
||
|
||
<!-- BEGIN: The expanded menu area for information and options -->
|
||
<div
|
||
class:ae_container_module_options={$events_loc.pres_mgmt.show_menu__session_search == 'options'}
|
||
class:hidden={$events_loc.pres_mgmt.show_menu__session_search != 'options'}
|
||
>
|
||
|
||
<div
|
||
class="flex flex-col gap-1"
|
||
>
|
||
<!-- Save search text option toggle button? -->
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.save_search_text = !$events_loc.pres_mgmt.save_search_text;
|
||
}}
|
||
class="btn btn-sm"
|
||
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
|
||
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.save_search_text}
|
||
title="Save the search text for this session search?"
|
||
>
|
||
{#if $events_loc.pres_mgmt.save_search_text}
|
||
<span class="fas fa-toggle-on m-1"></span>
|
||
Save Search Text
|
||
{:else}
|
||
<span class="fas fa-toggle-off m-1"></span>
|
||
<!-- <span class="fas fa-save m-1"></span> -->
|
||
Save Search Text?
|
||
{/if}
|
||
</button>
|
||
</div>
|
||
|
||
{#if $ae_loc.authenticated_access}
|
||
<div
|
||
class="flex flex-col gap-1 items-end justify-center"
|
||
>
|
||
<!-- Max presenters select options -->
|
||
<span
|
||
class="flex flex-row gap-1 items-center justify-around"
|
||
>
|
||
<label
|
||
class="text-sm w-32 text-right"
|
||
for="qry_limit__presenters">
|
||
Max presenters:
|
||
</label>
|
||
<select
|
||
id="qry_limit__presenters"
|
||
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
|
||
class="select w-20 text-sm preset-tonal-surface"
|
||
>
|
||
<option value={25}>25</option>
|
||
<option value={50}>50</option>
|
||
<option value={75}>75</option>
|
||
<option value={100}>100</option>
|
||
<option value={200}>200</option>
|
||
<option value={500}>500</option>
|
||
</select>
|
||
</span>
|
||
|
||
<!-- Max sessions select options -->
|
||
<span
|
||
class="flex flex-row gap-1 items-center justify-around"
|
||
>
|
||
<label
|
||
class="text-sm w-32 text-right"
|
||
for="qry_limit__sessions">
|
||
Max sessions:
|
||
</label>
|
||
<select
|
||
id="qry_limit__sessions"
|
||
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
|
||
class="select w-20 text-sm preset-tonal-surface"
|
||
>
|
||
<option value={25}>25</option>
|
||
<option value={50}>50</option>
|
||
<option value={75}>75</option>
|
||
<option value={100}>100</option>
|
||
<option value={200}>200</option>
|
||
<option value={500}>500</option>
|
||
</select>
|
||
</span>
|
||
|
||
<!-- Max files select options -->
|
||
<span
|
||
class="flex flex-row gap-1 items-center justify-around"
|
||
>
|
||
<label
|
||
class="text-sm w-32 text-right"
|
||
for="qry_limit__files">
|
||
Max files:
|
||
</label>
|
||
<select
|
||
id="qry_limit__files"
|
||
bind:value={$events_loc.pres_mgmt.qry_limit__files}
|
||
class="select w-20 text-sm preset-tonal-surface"
|
||
>
|
||
<option value={25}>25</option>
|
||
<option value={50}>50</option>
|
||
<option value={75}>75</option>
|
||
<option value={100}>100</option>
|
||
<option value={200}>200</option>
|
||
<option value={500}>500</option>
|
||
</select>
|
||
</span>
|
||
</div>
|
||
{/if}
|
||
|
||
{#if $ae_loc.authenticated_access}
|
||
<div class="flex flex-col gap-1 items-center">
|
||
|
||
<!-- Button to toggle between showing and not showing the launcher and location links -->
|
||
{#if $events_loc.pres_mgmt.show__launcher_link || $events_loc.pres_mgmt.show__location_link}
|
||
<button
|
||
disabled={!$ae_loc.trusted_access}
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.show__launcher_link = false;
|
||
$events_loc.pres_mgmt.show__launcher_link_legacy = false;
|
||
$events_loc.pres_mgmt.show__location_link = false;
|
||
}}
|
||
class="btn btn-sm ae_btn_surface"
|
||
>
|
||
<span class="fas fa-toggle-on m-1"></span>
|
||
Showing Links
|
||
</button>
|
||
{:else}
|
||
<button
|
||
disabled={!$ae_loc.trusted_access}
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.show__launcher_link = true;
|
||
$events_loc.pres_mgmt.show__launcher_link_legacy = true;
|
||
$events_loc.pres_mgmt.show__location_link = true;
|
||
}}
|
||
class="btn btn-sm ae_btn_surface_outlined"
|
||
>
|
||
<span class="fas fa-toggle-off m-1"></span>
|
||
Show Links?
|
||
</button>
|
||
{/if}
|
||
|
||
<!-- Button to toggle between showing and not showing the launcher and location links -->
|
||
{#if !$events_loc.pres_mgmt?.hide__session_li_poc_field}
|
||
<button
|
||
disabled={!$ae_loc.authenticated_access}
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.hide__session_li_poc_field = true;
|
||
}}
|
||
class="btn btn-sm ae_btn_surface"
|
||
>
|
||
<span class="fas fa-toggle-on m-1"></span>
|
||
Showing POC
|
||
</button>
|
||
{:else}
|
||
<button
|
||
disabled={!$ae_loc.authenticated_access}
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.hide__session_li_poc_field = false;
|
||
}}
|
||
class="btn btn-sm ae_btn_surface_outlined"
|
||
>
|
||
<span class="fas fa-toggle-off m-1"></span>
|
||
Show POC?
|
||
</button>
|
||
{/if}
|
||
|
||
<!-- Button to toggle between the showing hidden sessions -->
|
||
{#if $events_loc.pres_mgmt.qry_hidden == 'all'}
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
|
||
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
|
||
} else {
|
||
$events_loc.pres_mgmt.qry_hidden = 'all';
|
||
}
|
||
}}
|
||
class="btn btn-sm ae_btn_surface"
|
||
title="Hide sessions marked as hidden?"
|
||
>
|
||
<span class="fas fa-eye-slash m-1"></span>
|
||
Hide Sessions?
|
||
</button>
|
||
{:else}
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
|
||
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
|
||
} else {
|
||
$events_loc.pres_mgmt.qry_hidden = 'all';
|
||
}
|
||
}}
|
||
class="btn btn-sm ae_btn_surface_outlined"
|
||
title="Show all (hidden) sessions?"
|
||
>
|
||
<span class="fas fa-eye m-1"></span>
|
||
Show All (Hidden) Sessions?
|
||
</button>
|
||
{/if}
|
||
|
||
{#if $ae_loc.manager_access}
|
||
{#if $events_loc.pres_mgmt.qry_enabled == 'all'}
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
|
||
$events_loc.pres_mgmt.qry_enabled = 'enabled';
|
||
} else {
|
||
$events_loc.pres_mgmt.qry_enabled = 'all';
|
||
}
|
||
}}
|
||
class="btn btn-sm ae_btn_surface"
|
||
title="Hide disabled sessions?"
|
||
>
|
||
<span class="fas fa-eye-slash m-1"></span>
|
||
Hide Disabled Sessions?
|
||
</button>
|
||
{:else}
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
|
||
$events_loc.pres_mgmt.qry_enabled = 'enabled';
|
||
} else {
|
||
$events_loc.pres_mgmt.qry_enabled = 'all';
|
||
}
|
||
}}
|
||
class="btn btn-sm ae_btn_surface_outlined"
|
||
title="Show disabled sessions?"
|
||
>
|
||
<span class="fas fa-eye m-1"></span>
|
||
Show All (Disabled) Sessions?
|
||
</button>
|
||
{/if}
|
||
{/if}
|
||
</div>
|
||
{/if}
|
||
|
||
</div> <!-- END: The expanded menu area for information and options -->
|
||
|
||
|
||
<Element_data_store
|
||
ds_code="events__pres_mgmt__session_search_help"
|
||
ds_name="Default: Events - Pres Mgmt Session Search Help"
|
||
ds_type="html"
|
||
for_type="event"
|
||
for_id={$events_slct.event_id}
|
||
class_li="ae_container_module_help"
|
||
show_edit={false}
|
||
show_edit_btn={true}
|
||
hide={$events_loc.pres_mgmt.show_menu__session_search != 'help'}
|
||
/>
|
||
|
||
<div>
|
||
<button
|
||
type="button"
|
||
on:click={() => {
|
||
$events_loc.pres_mgmt.show_menu__session_search = !$events_loc.pres_mgmt.show_menu__session_search;
|
||
}}
|
||
class="btn btn-sm mx-1 ae_btn_info_filled"
|
||
class:hidden={!$events_loc.pres_mgmt.show_menu__session_search}
|
||
title="Collapse the expanded menu"
|
||
>
|
||
<span class="fas fa-chevron-up m-1"></span>
|
||
{#if $events_loc.pres_mgmt.show_menu__session_search}
|
||
Hide
|
||
<!-- Collapse -->
|
||
{:else}
|
||
Show
|
||
{/if}
|
||
<!-- Menu? -->
|
||
</button>
|
||
</div>
|
||
</div> <!-- End of the new standard page specific menu -->
|