Badges: print centering via display:contents — collapse wrappers, body as flex center
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
Bell,
|
Bell,
|
||||||
BellOff,
|
BellOff,
|
||||||
Trash2,
|
Trash2,
|
||||||
MinusCircle,
|
CircleMinus,
|
||||||
Settings
|
Settings
|
||||||
} from '@lucide/svelte';
|
} from '@lucide/svelte';
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
class="btn-icon btn-icon-sm preset-filled-warning-500 hover:preset-filled-warning-600 transition"
|
class="btn-icon btn-icon-sm preset-filled-warning-500 hover:preset-filled-warning-600 transition"
|
||||||
title="Disable / soft-remove this {obj_label}"
|
title="Disable / soft-remove this {obj_label}"
|
||||||
>
|
>
|
||||||
<MinusCircle size="1.2em" />
|
<CircleMinus size="1.2em" />
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -147,69 +147,82 @@
|
|||||||
it in the compiled layout CSS files.
|
it in the compiled layout CSS files.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Print chrome reset + centering: applied regardless of layout.
|
<!-- Print layout strategy — applied regardless of badge layout:
|
||||||
Hides app nav, resets the events layout container, and centers the badge
|
|
||||||
both horizontally and vertically on the printed page.
|
|
||||||
|
|
||||||
Future manual margins: read from badge template cfg_json as
|
Instead of trying to coerce #ae_main_content into a centering container
|
||||||
{ "print_margin": { "top": "0.25in", ... } }
|
(which requires fighting its min-height, overflow, max-width, flex-col etc.),
|
||||||
and inject into @page margin via a dynamic <style> block. -->
|
we use `display: contents` to dissolve the intermediate wrappers from the
|
||||||
|
layout. This makes .event_badge_wrapper a direct flex child of <body>, and
|
||||||
|
body becomes the single centering container for the whole printed page.
|
||||||
|
|
||||||
|
For PVC / fanfold: the @page size below matches the badge exactly, so
|
||||||
|
margin: 0 fills the page cleanly. If per-template margins are needed,
|
||||||
|
set cfg_json: { "print_margin": { "top": "0.25in", ... } } on the template
|
||||||
|
and a dynamic @page rule can be injected here via print_margin_cfg. -->
|
||||||
<style>
|
<style>
|
||||||
@media print {
|
@media print {
|
||||||
/* Fill the physical page height so flex vertical-centering works */
|
/* Full-page reset */
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Events layout nav bar */
|
/* Body is the sole centering flex container.
|
||||||
.submenu { display: none !important; }
|
.event_badge_wrapper is its only non-hidden flex child
|
||||||
|
once the intermediate wrappers are collapsed via display:contents. */
|
||||||
/* Events #ae_main_content — convert to a full-page flex centering container */
|
body {
|
||||||
#ae_main_content {
|
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: column !important;
|
|
||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
justify-content: center !important;
|
justify-content: center !important;
|
||||||
overflow: visible !important;
|
}
|
||||||
max-width: none !important;
|
|
||||||
width: 100% !important;
|
/* Hide app chrome */
|
||||||
min-height: 100vh !important;
|
.submenu { display: none !important; }
|
||||||
height: 100% !important;
|
|
||||||
padding: 0 !important;
|
/* Dissolve layout wrappers — removes their boxes from the layout while
|
||||||
|
keeping children renderable. The badge section floats up to body
|
||||||
|
as a direct flex child, so body's centering applies to it directly.
|
||||||
|
This avoids all height-chain and overflow-clip issues. */
|
||||||
|
#ae_main_content,
|
||||||
|
#badge_render_area {
|
||||||
|
display: contents !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Badge wrapper: reset screen-only mx-auto; the @page size = badge size
|
||||||
|
so margin: 0 fills the page exactly.
|
||||||
|
gap/padding are stripped to eliminate any whitespace bleed. */
|
||||||
|
.event_badge_wrapper {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
background: transparent !important;
|
padding: 0 !important;
|
||||||
gap: 0 !important;
|
gap: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Badge render wrapper — strip screen-only right padding; flex-center the badge */
|
/* Never split the front or back across pages */
|
||||||
#badge_render_area {
|
.badge_front,
|
||||||
display: flex !important;
|
.badge_back {
|
||||||
align-items: center !important;
|
break-inside: avoid;
|
||||||
justify-content: center !important;
|
page-break-inside: avoid;
|
||||||
padding: 0 !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- @page paper size: matched to the badge stock per template layout.
|
||||||
|
margin: 0 so the badge occupies the full printable area.
|
||||||
|
If per-template offsets are needed, inject a dynamic style element
|
||||||
|
here driven by print_margin_cfg (parsed from template cfg_json). -->
|
||||||
{#if $lq__event_badge_template_obj?.layout === 'badge_3.5x5.5_pvc'}
|
{#if $lq__event_badge_template_obj?.layout === 'badge_3.5x5.5_pvc'}
|
||||||
<style>
|
<style>
|
||||||
@page { size: 3.5in 5.5in; margin: 0; }
|
@page { size: 3.5in 5.5in; margin: 0; }
|
||||||
@media print { body { margin: 0; padding: 0; } .event_badge_wrapper { gap: 0 !important; padding: 0 !important; } }
|
|
||||||
</style>
|
</style>
|
||||||
{:else if $lq__event_badge_template_obj?.layout === 'badge_4x5_fanfold'}
|
{:else if $lq__event_badge_template_obj?.layout === 'badge_4x5_fanfold'}
|
||||||
<style>
|
<style>
|
||||||
@page { size: 4in 10in; margin: 0; }
|
@page { size: 4in 10in; margin: 0; }
|
||||||
@media print { body { margin: 0; padding: 0; } .event_badge_wrapper { gap: 0 !important; padding: 0 !important; } }
|
|
||||||
</style>
|
</style>
|
||||||
{:else}
|
{:else}
|
||||||
<!-- Default: badge_4x6_fanfold or layout not yet set -->
|
<!-- Default: badge_4x6_fanfold or layout not yet set -->
|
||||||
<style>
|
<style>
|
||||||
@page { size: 4in 12in; margin: 0; }
|
@page { size: 4in 12in; margin: 0; }
|
||||||
@media print { body { margin: 0; padding: 0; } .event_badge_wrapper { gap: 0 !important; padding: 0 !important; } }
|
|
||||||
</style>
|
</style>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// Check Dexie cache first — sessions are typically cached from prior page visits
|
// Check Dexie cache first — sessions are typically cached from prior page visits
|
||||||
let session = await db_events.session.get(session_id);
|
// Typed as any: Dexie returns Session|undefined, API returns ae_EventSession|null — both duck-type fine
|
||||||
|
let session: any = await db_events.session.get(session_id);
|
||||||
if (!session) {
|
if (!session) {
|
||||||
// Not cached — fetch from API and save to Dexie
|
// Not cached — fetch from API and save to Dexie
|
||||||
session = await events_func.load_ae_obj_id__event_session({
|
session = await events_func.load_ae_obj_id__event_session({
|
||||||
|
|||||||
@@ -1,29 +1,22 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
interface Props {
|
interface Props {
|
||||||
// export let data: any;
|
|
||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
lq__event_obj: any; // let ae_tmp: key_val = {};
|
lq__event_obj: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
let { log_lvl = 0, lq__event_obj }: Props = $props();
|
let { log_lvl = 0, lq__event_obj }: Props = $props();
|
||||||
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import { Modal } from 'flowbite-svelte';
|
||||||
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ae_snip,
|
|
||||||
ae_loc,
|
ae_loc,
|
||||||
ae_sess,
|
ae_api
|
||||||
ae_api,
|
|
||||||
ae_trig,
|
|
||||||
slct,
|
|
||||||
slct_trigger
|
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_slct
|
||||||
events_slct,
|
|
||||||
events_trigger,
|
|
||||||
events_trig_kv
|
|
||||||
} from '$lib/stores/ae_events_stores';
|
} from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
@@ -31,14 +24,40 @@
|
|||||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../ae_comp__events_menu_nav.svelte';
|
||||||
import Comp__pres_mgmt_menu_opts from '../../ae_comp__events_menu_opts.svelte';
|
import Comp__pres_mgmt_menu_opts from '../../ae_comp__events_menu_opts.svelte';
|
||||||
|
import AE_Record_Controls from '$lib/ae_elements/AE_Record_Controls.svelte';
|
||||||
|
|
||||||
|
let show_modal = $state(false);
|
||||||
|
let show_help = $state(false);
|
||||||
|
|
||||||
|
async function on_toggle(field: string, new_val: boolean) {
|
||||||
|
await api.update_ae_obj_v3({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
obj_type: 'event',
|
||||||
|
obj_id: $lq__event_obj?.event_id,
|
||||||
|
fields: { [field]: new_val }
|
||||||
|
});
|
||||||
|
events_func.load_ae_obj_id__event({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_id: $lq__event_obj?.event_id,
|
||||||
|
log_lvl
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function on_delete(method: 'delete' | 'disable') {
|
||||||
|
await events_func.delete_ae_obj_id__event({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_id: $lq__event_obj.event_id,
|
||||||
|
method
|
||||||
|
});
|
||||||
|
$events_slct.event_id = null;
|
||||||
|
$events_slct.event_obj = {};
|
||||||
|
goto('/events');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- New standard page specific menu 2025-06-20 -->
|
|
||||||
<div class="pres_mgmt__session_search_menu ae_container_module_menu">
|
<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">
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
|
|
||||||
>
|
|
||||||
<Comp__events_menu_nav
|
<Comp__events_menu_nav
|
||||||
hide={!$ae_loc.authenticated_access}
|
hide={!$ae_loc.authenticated_access}
|
||||||
event_id={$lq__event_obj?.event_id}
|
event_id={$lq__event_obj?.event_id}
|
||||||
@@ -49,35 +68,25 @@
|
|||||||
events__session_search={false}
|
events__session_search={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span
|
<span class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around">
|
||||||
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
|
<!-- Event Files toggle — the one real working button from the old menu, kept in place -->
|
||||||
>
|
|
||||||
<!-- Button to toggle between the regular event session search view and managing event files -->
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
if (
|
$events_loc.pres_mgmt.show_content__event_view =
|
||||||
$events_loc.pres_mgmt.show_content__event_view ==
|
$events_loc.pres_mgmt.show_content__event_view === 'manage_files'
|
||||||
'manage_files'
|
? null
|
||||||
) {
|
: '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="btn btn-sm relative"
|
||||||
class:preset-filled-primary-500={$events_loc.pres_mgmt
|
class:preset-filled-primary-500={$events_loc.pres_mgmt.show_content__event_view === 'manage_files'}
|
||||||
.show_content__event_view == 'manage_files'}
|
class:preset-tonal-primary={$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}
|
class:hidden={!$ae_loc.administrator_access}
|
||||||
disabled={!$ae_loc.manager_access}
|
disabled={!$ae_loc.manager_access}
|
||||||
title="Session search or manage files for the event"
|
title="Session search or manage files for the event"
|
||||||
>
|
>
|
||||||
{#if $events_loc.pres_mgmt.show_content__event_view == 'manage_files'}
|
{#if $events_loc.pres_mgmt.show_content__event_view === 'manage_files'}
|
||||||
<span class="fas fa-users m-1"></span>
|
<span class="fas fa-users m-1"></span>
|
||||||
<!-- View Session Search -->
|
|
||||||
Session Search?
|
Session Search?
|
||||||
{:else}
|
{:else}
|
||||||
<span class="fas fa-file-archive m-1"></span>
|
<span class="fas fa-file-archive m-1"></span>
|
||||||
@@ -91,442 +100,184 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Button to toggle between showing and not showing the extended options menu -->
|
<!-- Options modal trigger -->
|
||||||
|
{#if $ae_loc.trusted_access}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => (show_modal = true)}
|
||||||
|
class="btn btn-sm ae_btn_info"
|
||||||
|
title="Event options"
|
||||||
|
>
|
||||||
|
<Settings size="1em" class="mr-1" />
|
||||||
|
Options
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<!-- Help toggle -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => (show_help = !show_help)}
|
||||||
if (
|
class="btn btn-sm"
|
||||||
$events_loc.pres_mgmt.show_menu__session_search ==
|
class:ae_btn_info_filled={show_help}
|
||||||
'options'
|
class:ae_btn_info={!show_help}
|
||||||
) {
|
title="Help and information about the event session search"
|
||||||
$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>
|
<Info size="1em" class="mr-1" />
|
||||||
{#if $events_loc.pres_mgmt.show_menu__session_search == 'options'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
Hide
|
|
||||||
{:else}
|
|
||||||
<span class="hidden"> Show </span>
|
|
||||||
{/if}
|
|
||||||
Options?
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: The menu button options -->
|
|
||||||
|
|
||||||
<!-- BEGIN: The expanded menu area for information and options -->
|
<!-- Options Modal -->
|
||||||
<div
|
<Modal
|
||||||
class:ae_container_module_options={$events_loc.pres_mgmt
|
bind:open={show_modal}
|
||||||
.show_menu__session_search == 'options'}
|
autoclose={false}
|
||||||
class:hidden={$events_loc.pres_mgmt.show_menu__session_search !=
|
dismissable={true}
|
||||||
'options'}
|
placement="top-center"
|
||||||
|
size="lg"
|
||||||
|
class="relative flex flex-col mx-auto w-full bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg shadow-xl"
|
||||||
|
headerClass="flex flex-row gap-2 items-center justify-between w-full bg-surface-100 dark:bg-surface-800 p-4 rounded-t-lg border-b border-surface-200 dark:border-surface-700"
|
||||||
>
|
>
|
||||||
<div class="ae_comp__event_menu_opts w-full">
|
{#snippet header()}
|
||||||
<h2 class="text-sm font-semibold text-center pb-1">
|
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
|
||||||
Æ Event Menu Options
|
<Settings size="1.1em" class="text-primary-500" />
|
||||||
</h2>
|
Event Options
|
||||||
|
</h3>
|
||||||
|
<button type="button" class="btn-icon btn-icon-sm preset-tonal-surface ml-2" onclick={() => (show_modal = false)}>
|
||||||
|
<X size="1.1em" />
|
||||||
|
</button>
|
||||||
|
{/snippet}
|
||||||
|
|
||||||
<div
|
<div class="flex flex-col gap-4 p-4">
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-between"
|
<!-- Display options for the session list -->
|
||||||
>
|
<section>
|
||||||
<div
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Display</h4>
|
||||||
class="flex flex-row gap-1 items-center justify-evenly relative"
|
<div class="flex flex-col gap-1">
|
||||||
>
|
|
||||||
<!-- Toggle alert status -->
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.administrator_access}
|
onclick={() => {
|
||||||
onclick={async () => {
|
$events_loc.pres_mgmt.save_search_text =
|
||||||
if (
|
!$events_loc.pres_mgmt.save_search_text;
|
||||||
!confirm(
|
|
||||||
`Are you sure you want to toggle the alert status for this session?`
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event', obj_id: $lq__event_obj?.event_id, fields: { alert: !$lq__event_obj?.alert } });
|
|
||||||
events_func.load_ae_obj_id__event({ api_cfg: $ae_api, event_id: $lq__event_obj?.event_id, log_lvl });
|
|
||||||
}}
|
}}
|
||||||
class:opacity-100={$lq__event_obj?.alert}
|
class="btn btn-sm justify-between w-full"
|
||||||
class:opacity-50={!$lq__event_obj?.alert}
|
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
|
||||||
class="
|
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.save_search_text}
|
||||||
btn btn-sm
|
|
||||||
preset-tonal-warning hover:preset-tonal-error
|
|
||||||
preset-outlined-warning-100-900 hover:preset-outlined-warning-600-400
|
|
||||||
hover:opacity-100
|
|
||||||
transition-all
|
|
||||||
"
|
|
||||||
title={$lq__event_obj?.alert
|
|
||||||
? 'Remove alert status'
|
|
||||||
: 'Mark as alert'}
|
|
||||||
>
|
>
|
||||||
{#if $lq__event_obj?.alert}
|
<span class="fas {$events_loc.pres_mgmt.save_search_text ? 'fa-toggle-on' : 'fa-toggle-off'} mr-1"></span>
|
||||||
<!-- class="fas fa-exclamation-triangle" -->
|
<span class="grow">
|
||||||
<span
|
<span class="fas fa-save mr-1"></span>
|
||||||
class="fas fa-bell-slash m-0.75 text-warning-600"
|
{$events_loc.pres_mgmt.save_search_text ? 'Do Not Save Search' : 'Save Search Text?'}
|
||||||
title="This session is marked as an alert."
|
</span>
|
||||||
></span>
|
</button>
|
||||||
{:else}
|
|
||||||
<span
|
<button
|
||||||
class="fas fa-bell m-0.75 text-gray-400"
|
type="button"
|
||||||
title="This session is not marked as an alert."
|
onclick={() => {
|
||||||
></span>
|
$events_loc.pres_mgmt.hide__launcher_link =
|
||||||
{/if}
|
!$events_loc.pres_mgmt.hide__launcher_link;
|
||||||
<span class="hidden">Toggle Alert</span>
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full ae_btn_surface"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__launcher_link ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-plane mr-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__launcher_link ? 'Show Launcher Links' : 'Hide Launcher Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__launcher_link_legacy =
|
||||||
|
!$events_loc.pres_mgmt.hide__launcher_link_legacy;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full ae_btn_surface"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__launcher_link_legacy ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-paper-plane mr-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__launcher_link_legacy ? 'Show Legacy Launcher Links' : 'Hide Legacy Launcher Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__location_link =
|
||||||
|
!$events_loc.pres_mgmt.hide__location_link;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full ae_btn_surface"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__location_link ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-map-marker-alt mr-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__location_link ? 'Show Location Links' : 'Hide Location Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__session_li_location_field =
|
||||||
|
!$events_loc.pres_mgmt.hide__session_li_location_field;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full ae_btn_surface"
|
||||||
|
title="Toggle the Location column in session lists"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__session_li_location_field ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
{$events_loc.pres_mgmt.hide__session_li_location_field ? 'Show Location Column' : 'Hide Location Column?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__session_li_poc_field =
|
||||||
|
!$events_loc.pres_mgmt.hide__session_li_poc_field;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full ae_btn_surface"
|
||||||
|
title="Toggle the POC column in session lists"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__session_li_poc_field ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
{$events_loc.pres_mgmt.hide__session_li_poc_field ? 'Show POC Column' : 'Hide POC Column?'}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div
|
<!-- Record Controls for the Event itself -->
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-evenly"
|
{#if $ae_loc.administrator_access}
|
||||||
>
|
<section>
|
||||||
<button
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Event Record</h4>
|
||||||
type="button"
|
<AE_Record_Controls
|
||||||
disabled={!$ae_loc.administrator_access}
|
obj={$lq__event_obj}
|
||||||
onclick={async () => {
|
obj_label="event"
|
||||||
if (
|
show_alert={true}
|
||||||
!confirm(
|
show_priority={true}
|
||||||
`Are you sure you want to mark this event as ${$lq__event_obj?.priority ? 'not priority' : 'high priority'}?`
|
show_enable={true}
|
||||||
)
|
show_hide={true}
|
||||||
) {
|
allow_delete={$ae_loc.super_access}
|
||||||
return false;
|
allow_disable={$ae_loc.manager_access && !$ae_loc.super_access}
|
||||||
}
|
{on_toggle}
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event', obj_id: $lq__event_obj?.event_id, fields: { priority: !$lq__event_obj?.priority } });
|
{on_delete}
|
||||||
events_func.load_ae_obj_id__event({ api_cfg: $ae_api, event_id: $lq__event_obj?.event_id, log_lvl });
|
container_class="flex flex-row flex-wrap gap-2 items-center justify-start"
|
||||||
}}
|
/>
|
||||||
class="btn btn-sm *:hover:inline"
|
</section>
|
||||||
class:ae_btn_surface_outlined={!$lq__event_obj?.priority}
|
{/if}
|
||||||
class:ae_btn_success={$lq__event_obj?.priority}
|
|
||||||
>
|
|
||||||
{#if $lq__event_obj?.priority}
|
|
||||||
<span class="fas fa-star m-1"></span>
|
|
||||||
<span class="hidden"> Not Priority? </span>
|
|
||||||
{:else}
|
|
||||||
<span class="far fa-star m-1"></span>
|
|
||||||
<span class="hidden"> Priority </span>
|
|
||||||
?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
<!-- Pres Mgmt query options (limits, filters) — this component belongs here on the session search page -->
|
||||||
type="button"
|
{#if $ae_loc.authenticated_access}
|
||||||
disabled={!$ae_loc.manager_access}
|
<section>
|
||||||
onclick={async () => {
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Query Options</h4>
|
||||||
if (
|
<Comp__pres_mgmt_menu_opts hide={false} />
|
||||||
!confirm(
|
</section>
|
||||||
`Are you sure you want to ${$lq__event_obj?.hide ? 'unhide' : 'hide'} this session?`
|
{/if}
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event', obj_id: $lq__event_obj?.event_id, fields: { hide: !$lq__event_obj?.hide } });
|
|
||||||
events_func.load_ae_obj_id__event({ api_cfg: $ae_api, event_id: $lq__event_obj?.event_id, log_lvl });
|
|
||||||
}}
|
|
||||||
class="btn btn-sm *:hover:inline"
|
|
||||||
class:ae_btn_success_outlined={!$lq__event_obj?.hide}
|
|
||||||
class:ae_btn_warning={$lq__event_obj?.hide}
|
|
||||||
>
|
|
||||||
{#if $lq__event_obj?.hide}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Unhide?
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-eye m-1"></span>
|
|
||||||
<span class="hidden"> Not Hidden </span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Enable/Disable -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
onclick={async () => {
|
|
||||||
if (
|
|
||||||
!confirm(
|
|
||||||
`Are you sure you want to ${$lq__event_obj?.enable ? 'disable' : 'enable'} this session?`
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event', obj_id: $lq__event_obj?.event_id, fields: { enable: !$lq__event_obj?.enable } });
|
|
||||||
events_func.load_ae_obj_id__event({ api_cfg: $ae_api, event_id: $lq__event_obj?.event_id, log_lvl });
|
|
||||||
}}
|
|
||||||
class="btn btn-sm"
|
|
||||||
class:ae_btn_success_outlined={$lq__event_obj?.enable}
|
|
||||||
class:ae_btn_error={!$lq__event_obj?.enable}
|
|
||||||
>
|
|
||||||
{#if $lq__event_obj?.enable}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Enabled
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Enable?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Sort -->
|
|
||||||
|
|
||||||
<!-- Group -->
|
|
||||||
|
|
||||||
{#if $ae_loc.manager_access}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.super_access}
|
|
||||||
onclick={() => {
|
|
||||||
if (
|
|
||||||
!confirm(
|
|
||||||
'Are you sure you want to delete this session?'
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
events_func
|
|
||||||
.delete_ae_obj_id__event({
|
|
||||||
api_cfg: $ae_api,
|
|
||||||
event_id: $lq__event_obj.event_id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
.then(function (delete_results) {
|
|
||||||
$events_slct.event_id = null;
|
|
||||||
$events_slct.event_obj = {};
|
|
||||||
|
|
||||||
goto(`/events`);
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 ae_btn_error"
|
|
||||||
title="Delete record permanently"
|
|
||||||
>
|
|
||||||
<span class="fas fa-minus-circle mx-1"></span>
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
{:else if $ae_loc.manager_access}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
if (
|
|
||||||
!confirm(
|
|
||||||
'Are you sure you want to remove (disable) this session? This is not common.'
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
events_func
|
|
||||||
.delete_ae_obj_id__event({
|
|
||||||
api_cfg: $ae_api,
|
|
||||||
event_id: $lq__event_obj.event_id,
|
|
||||||
method: 'disable'
|
|
||||||
})
|
|
||||||
.then(function (delete_results) {
|
|
||||||
$events_slct.event_id = null;
|
|
||||||
$events_slct.event_obj = {};
|
|
||||||
|
|
||||||
goto(`/events`);
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 ae_btn_warning"
|
|
||||||
title="Disable record"
|
|
||||||
>
|
|
||||||
<span class="fas fa-minus mx-1"></span>
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
<div
|
<!-- Help panel -->
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-center w-full p-1"
|
|
||||||
>
|
|
||||||
<!-- Save search text option toggle button? -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.save_search_text =
|
|
||||||
!$events_loc.pres_mgmt.save_search_text;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm justify-between w-full max-w-50 text-center"
|
|
||||||
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>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-save m-1"></span>
|
|
||||||
Do Not Save Search?
|
|
||||||
</span>
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-save m-1"></span>
|
|
||||||
Save Search Text?
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide launcher links (new version) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__launcher_link =
|
|
||||||
!$events_loc.pres_mgmt.hide__launcher_link;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full max-w-50 text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__launcher_link
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-plane m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__launcher_link
|
|
||||||
? 'Show Launcher Links'
|
|
||||||
: 'Hide Launcher Links?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide launcher links (legacy version) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__launcher_link_legacy =
|
|
||||||
!$events_loc.pres_mgmt.hide__launcher_link_legacy;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full max-w-50 text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__launcher_link_legacy
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-paper-plane m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__launcher_link_legacy
|
|
||||||
? 'Legacy Launcher Links'
|
|
||||||
: 'Hide Legacy Launcher?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide links to the location (room) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__location_link =
|
|
||||||
!$events_loc.pres_mgmt.hide__location_link;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full max-w-50 text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__location_link
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-map-marker-alt m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__location_link
|
|
||||||
? 'Show Location Links'
|
|
||||||
: 'Hide Location Links?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide the Location (room) column in tables and lists -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__session_li_location_field =
|
|
||||||
!$events_loc.pres_mgmt.hide__session_li_location_field;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full max-w-50 text-center"
|
|
||||||
title="Toggle showing the Location column in session lists and tables"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt
|
|
||||||
.hide__session_li_location_field
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<!-- <span class="fas fa-door-open m-1"></span> -->
|
|
||||||
{$events_loc.pres_mgmt.hide__session_li_location_field
|
|
||||||
? 'Show Location Column'
|
|
||||||
: 'Hide Location Column?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide the POC column in tables and lists -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__session_li_poc_field =
|
|
||||||
!$events_loc.pres_mgmt.hide__session_li_poc_field;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full max-w-50 text-center"
|
|
||||||
title="Toggle showing the POC column in session lists and tables"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__session_li_poc_field
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<!-- <span class="fas fa-user-tie m-1"></span> -->
|
|
||||||
{$events_loc.pres_mgmt.hide__session_li_poc_field
|
|
||||||
? 'Show POC Column'
|
|
||||||
: 'Hide POC Column?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Comp__pres_mgmt_menu_opts hide={!$ae_loc.authenticated_access} />
|
|
||||||
</div>
|
|
||||||
<!-- END: The expanded menu area for information and options -->
|
|
||||||
|
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="events__pres_mgmt__session_search_help"
|
ds_code="events__pres_mgmt__session_search_help"
|
||||||
ds_name="Default: Events - Pres Mgmt Session Search Help"
|
ds_name="Default: Events - Pres Mgmt Session Search Help"
|
||||||
@@ -536,29 +287,6 @@
|
|||||||
class_li="ae_container_module_help"
|
class_li="ae_container_module_help"
|
||||||
show_edit={false}
|
show_edit={false}
|
||||||
show_edit_btn={true}
|
show_edit_btn={true}
|
||||||
hide={$events_loc.pres_mgmt.show_menu__session_search != 'help'}
|
hide={!show_help}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$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>
|
</div>
|
||||||
<!-- End of the new standard page specific menu -->
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
export interface Props {
|
export interface Props {
|
||||||
data?: any;
|
data?: any;
|
||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
// export let event_location_id: string;
|
|
||||||
lq__event_obj: any;
|
lq__event_obj: any;
|
||||||
lq__event_location_obj: any;
|
lq__event_location_obj: any;
|
||||||
}
|
}
|
||||||
@@ -14,36 +13,56 @@
|
|||||||
lq__event_location_obj
|
lq__event_location_obj
|
||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
|
import { goto } from '$app/navigation';
|
||||||
|
import { Modal } from 'flowbite-svelte';
|
||||||
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ae_snip,
|
|
||||||
ae_loc,
|
ae_loc,
|
||||||
ae_sess,
|
ae_api
|
||||||
ae_api,
|
|
||||||
ae_trig,
|
|
||||||
slct,
|
|
||||||
slct_trigger
|
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_slct
|
||||||
events_slct,
|
|
||||||
events_trigger,
|
|
||||||
events_trig_kv
|
|
||||||
} from '$lib/stores/ae_events_stores';
|
} from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
import { api } from '$lib/api/api';
|
import { api } from '$lib/api/api';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
||||||
|
import AE_Record_Controls from '$lib/ae_elements/AE_Record_Controls.svelte';
|
||||||
|
|
||||||
|
let show_modal = $state(false);
|
||||||
|
let show_help = $state(false);
|
||||||
|
|
||||||
|
async function on_toggle(field: string, new_val: boolean) {
|
||||||
|
await api.update_ae_obj_v3({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
obj_type: 'event_location',
|
||||||
|
obj_id: $lq__event_location_obj?.event_location_id,
|
||||||
|
fields: { [field]: new_val }
|
||||||
|
});
|
||||||
|
events_func.load_ae_obj_id__event_location({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_location_id: $lq__event_location_obj?.event_location_id,
|
||||||
|
log_lvl
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function on_delete(method: 'delete' | 'disable') {
|
||||||
|
await (events_func as any).delete_ae_obj_id__event_location({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_location_id: $lq__event_location_obj.event_location_id,
|
||||||
|
method
|
||||||
|
});
|
||||||
|
$events_slct.event_location_id = null;
|
||||||
|
goto(`/events/${$lq__event_location_obj.event_id}/locations`);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- New standard page specific menu 2025-06-20 -->
|
|
||||||
<div class="pres_mgmt__location_menu ae_container_module_menu">
|
<div class="pres_mgmt__location_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">
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
|
|
||||||
>
|
|
||||||
<Comp__events_menu_nav
|
<Comp__events_menu_nav
|
||||||
hide={!$ae_loc.authenticated_access}
|
hide={!$ae_loc.authenticated_access}
|
||||||
event_id={$lq__event_obj?.event_id}
|
event_id={$lq__event_obj?.event_id}
|
||||||
@@ -52,412 +71,199 @@
|
|||||||
events__session_search={$events_slct.event_id}
|
events__session_search={$events_slct.event_id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span
|
<span class="ae_menu__object_options flex flex-row flex-wrap items-center justify-around">
|
||||||
class="ae_menu__object_options flex flex-row flex-wrap items-center justify-around"
|
<!-- Options modal trigger -->
|
||||||
>
|
{#if $ae_loc.trusted_access}
|
||||||
<!-- Button to toggle between the regular location view and managing location files -->
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onclick={() => (show_modal = true)}
|
||||||
onclick={() => {
|
class="btn btn-sm ae_btn_info"
|
||||||
if (
|
title="Location options"
|
||||||
$events_loc.pres_mgmt.show_content__location_view ==
|
>
|
||||||
'manage_files'
|
<Settings size="1em" class="mr-1" />
|
||||||
) {
|
Options
|
||||||
$events_loc.pres_mgmt.show_content__location_view =
|
</button>
|
||||||
null;
|
{/if}
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_content__location_view =
|
|
||||||
'manage_files';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class={ae_snip.classes__events_pres_mgmt_menu__button_special}
|
|
||||||
class:preset-filled-primary-500={$events_loc.pres_mgmt
|
|
||||||
.show_content__location_view == 'manage_files'}
|
|
||||||
class:preset-tonal-primary={$events_loc.pres_mgmt
|
|
||||||
.show_content__location_view != 'manage_files'}
|
|
||||||
class:hidden={!$ae_loc.trusted_access || 1 == 1}
|
|
||||||
title="Manage files for the location"
|
|
||||||
>
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__location_view == 'manage_files'}
|
|
||||||
<span class="fas fa-users m-1"></span>
|
|
||||||
<!-- View Details -->
|
|
||||||
Location Sessions?
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-file-archive m-1"></span>
|
|
||||||
Location Files?
|
|
||||||
<span
|
|
||||||
class="badge badge-icon preset-tonal-success absolute -top-1.5 -right-1.5 z-10"
|
|
||||||
class:hidden={!$lq__event_location_obj?.file_count}
|
|
||||||
>
|
|
||||||
{$lq__event_location_obj?.file_count}×
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
|
<!-- Help toggle -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => (show_help = !show_help)}
|
||||||
if (
|
class="btn btn-sm"
|
||||||
$events_loc.pres_mgmt.show_menu__location == 'options'
|
class:ae_btn_info_filled={show_help}
|
||||||
) {
|
class:ae_btn_info={!show_help}
|
||||||
$events_loc.pres_mgmt.show_menu__location = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_menu__location = 'options';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__location == 'options'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__location !=
|
|
||||||
'options'}
|
|
||||||
class:hidden={!$ae_loc.trusted_access}
|
|
||||||
title="Options for the location"
|
|
||||||
>
|
|
||||||
<span class="fas fa-cog m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location == 'options'}
|
|
||||||
Hide
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
Options?
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
if ($events_loc.pres_mgmt.show_menu__location == 'help') {
|
|
||||||
$events_loc.pres_mgmt.show_menu__location = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_menu__location = 'help';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__location == 'help'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__location !=
|
|
||||||
'help'}
|
|
||||||
title="Help and information about the location"
|
title="Help and information about the location"
|
||||||
>
|
>
|
||||||
<span class="fas fa-question-circle m-1"></span>
|
<Info size="1em" class="mr-1" />
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location == 'help'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
Hide Help?
|
|
||||||
{:else}
|
|
||||||
Help?
|
|
||||||
{/if}
|
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- <span
|
|
||||||
class="ae_menu__action_options"
|
|
||||||
class:hidden={!$ae_loc.administrator_access}
|
|
||||||
>
|
|
||||||
No Actions
|
|
||||||
</span> -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- END: The menu button options -->
|
|
||||||
|
|
||||||
<!-- BEGIN: The expanded menu area for information and options -->
|
<!-- Options Modal -->
|
||||||
<div
|
<Modal
|
||||||
class:ae_container_module_options={$events_loc.pres_mgmt
|
bind:open={show_modal}
|
||||||
.show_menu__location == 'options'}
|
autoclose={false}
|
||||||
class:hidden={$events_loc.pres_mgmt.show_menu__location != 'options'}
|
dismissable={true}
|
||||||
|
placement="top-center"
|
||||||
|
size="md"
|
||||||
|
class="relative flex flex-col mx-auto w-full bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg shadow-xl"
|
||||||
|
headerClass="flex flex-row gap-2 items-center justify-between w-full bg-surface-100 dark:bg-surface-800 p-4 rounded-t-lg border-b border-surface-200 dark:border-surface-700"
|
||||||
>
|
>
|
||||||
<button
|
{#snippet header()}
|
||||||
type="button"
|
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
|
||||||
onclick={async () => {
|
<Settings size="1.1em" class="text-primary-500" />
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_location', obj_id: $lq__event_location_obj?.event_location_id, fields: { priority: !$lq__event_location_obj?.priority } });
|
Location Options
|
||||||
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
|
</h3>
|
||||||
}}
|
<button type="button" class="btn-icon btn-icon-sm preset-tonal-surface ml-2" onclick={() => (show_modal = false)}>
|
||||||
class="btn btn-sm m-1 *:hover:inline"
|
<X size="1.1em" />
|
||||||
class:ae_btn_surface_outlined={!$lq__event_location_obj?.priority}
|
</button>
|
||||||
class:ae_btn_success={$lq__event_location_obj?.priority}
|
{/snippet}
|
||||||
>
|
|
||||||
{#if $lq__event_location_obj?.priority}
|
<div class="flex flex-col gap-4 p-4">
|
||||||
<span class="fas fa-star m-1"></span>
|
<!-- Launcher & Location Link Toggles -->
|
||||||
<span class="hidden"> Not Priority? </span>
|
{#if $ae_loc.administrator_access}
|
||||||
{:else}
|
<section>
|
||||||
<span class="far fa-star m-1"></span>
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Display Links</h4>
|
||||||
<span class="hidden"> Priority </span>
|
<div class="flex flex-col gap-1">
|
||||||
?
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__launcher_link =
|
||||||
|
!$events_loc.pres_mgmt.hide__launcher_link;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__launcher_link ? 'fa-toggle-off' : 'fa-toggle-on'} m-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-plane m-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__launcher_link ? 'Show Launcher Links' : 'Hide Launcher Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__launcher_link_legacy =
|
||||||
|
!$events_loc.pres_mgmt.hide__launcher_link_legacy;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__launcher_link_legacy ? 'fa-toggle-off' : 'fa-toggle-on'} m-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-paper-plane m-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__launcher_link_legacy ? 'Show Legacy Launcher Links' : 'Hide Legacy Launcher Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__location_link =
|
||||||
|
!$events_loc.pres_mgmt.hide__location_link;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__location_link ? 'fa-toggle-off' : 'fa-toggle-on'} m-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-map-marker-alt m-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__location_link ? 'Show Location Links' : 'Hide Location Links?'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Linked Files / Presentations (testing) -->
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
disabled={!$ae_loc.manager_access}
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.show_content__session_files =
|
||||||
|
!$events_loc.pres_mgmt.show_content__session_files;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full text-center"
|
||||||
|
class:ae_btn_surface={$events_loc.pres_mgmt.show_content__session_files}
|
||||||
|
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.show_content__session_files}
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.show_content__session_files ? 'fa-toggle-on' : 'fa-toggle-off'} m-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-list m-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.show_content__session_files ? 'Hide Linked Files (testing)' : 'Show Linked Files? (testing)'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
disabled={!$ae_loc.manager_access}
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.show_content__session_presentations =
|
||||||
|
!$events_loc.pres_mgmt.show_content__session_presentations;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full text-center"
|
||||||
|
class:ae_btn_surface={$events_loc.pres_mgmt.show_content__session_presentations}
|
||||||
|
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.show_content__session_presentations}
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.show_content__session_presentations ? 'fa-toggle-on' : 'fa-toggle-off'} m-1"></span>
|
||||||
|
<span class="grow">
|
||||||
|
<span class="fas fa-list m-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.show_content__session_presentations ? 'Hide Linked Presentations (testing)' : 'Show Linked Presentations? (testing)'}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
<!-- Mode toggles -->
|
||||||
type="button"
|
{#if $ae_loc.trusted_access}
|
||||||
onclick={async () => {
|
<section>
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_location', obj_id: $lq__event_location_obj?.event_location_id, fields: { hide: !$lq__event_location_obj?.hide } });
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Mode</h4>
|
||||||
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
|
<div class="flex flex-row flex-wrap gap-2">
|
||||||
}}
|
<button
|
||||||
class="btn btn-sm m-1 *:hover:inline"
|
type="button"
|
||||||
class:ae_btn_success_outlined={!$lq__event_location_obj?.hide}
|
onclick={() => ($ae_loc.edit_mode = !$ae_loc.edit_mode)}
|
||||||
class:ae_btn_warning={$lq__event_location_obj?.hide}
|
class="btn btn-sm"
|
||||||
disabled={!$ae_loc.trusted_access}
|
class:ae_btn_warning={$ae_loc.edit_mode}
|
||||||
>
|
class:ae_btn_warning_outlined={!$ae_loc.edit_mode}
|
||||||
{#if $lq__event_location_obj?.hide}
|
>
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
<span class="fas fa-edit mr-1"></span>
|
||||||
Unhide?
|
{$ae_loc.edit_mode ? 'Edit Mode On' : 'Edit Mode?'}
|
||||||
{:else}
|
</button>
|
||||||
<span class="fas fa-eye m-1"></span>
|
|
||||||
<span class="hidden"> Not Hidden </span>
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => ($ae_loc.adv_mode = !$ae_loc.adv_mode)}
|
||||||
|
class="btn btn-sm"
|
||||||
|
class:ae_btn_warning={$ae_loc.adv_mode}
|
||||||
|
class:ae_btn_warning_outlined={!$ae_loc.adv_mode}
|
||||||
|
>
|
||||||
|
<span class="fas fa-hat-wizard mr-1"></span>
|
||||||
|
{$ae_loc.adv_mode ? 'Advanced Mode On' : 'Advanced Mode?'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Enable/Disable -->
|
<!-- Record Controls -->
|
||||||
<button
|
{#if $ae_loc.trusted_access}
|
||||||
type="button"
|
<section>
|
||||||
onclick={async () => {
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Record</h4>
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_location', obj_id: $lq__event_location_obj?.event_location_id, fields: { enable: !$lq__event_location_obj?.enable } });
|
<AE_Record_Controls
|
||||||
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
|
obj={$lq__event_location_obj}
|
||||||
}}
|
obj_label="location"
|
||||||
class="btn btn-sm"
|
show_alert={false}
|
||||||
class:ae_btn_success_outlined={$lq__event_location_obj?.enable}
|
show_priority={true}
|
||||||
class:ae_btn_error={!$lq__event_location_obj?.enable}
|
show_enable={true}
|
||||||
disabled={!$ae_loc.manager_access}
|
show_hide={true}
|
||||||
>
|
allow_delete={$ae_loc.manager_access}
|
||||||
{#if $lq__event_location_obj?.enable}
|
allow_disable={$ae_loc.administrator_access && !$ae_loc.manager_access}
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
{on_toggle}
|
||||||
Enabled
|
{on_delete}
|
||||||
{:else}
|
container_class="flex flex-row flex-wrap gap-2 items-center justify-start"
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
/>
|
||||||
Enable?
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</div>
|
||||||
|
</Modal>
|
||||||
<!-- Sort -->
|
|
||||||
|
|
||||||
<!-- Group -->
|
|
||||||
|
|
||||||
{#if $ae_loc.administrator_access}
|
|
||||||
<div class="flex flex-col gap-1 items-center">
|
|
||||||
<!-- {#if $events_loc.pres_mgmt.show_content__location_qr}
|
|
||||||
<button type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
on:click={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__location_qr = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm variant-ghost-success"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Showing QR Code
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
on:click={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__location_qr = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm variant-ringed-warning"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Show QR Code?
|
|
||||||
</button>
|
|
||||||
{/if} -->
|
|
||||||
|
|
||||||
<!-- Show/Hide launcher links (new version) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__launcher_link =
|
|
||||||
!$events_loc.pres_mgmt.hide__launcher_link;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__launcher_link
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-plane m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__launcher_link
|
|
||||||
? 'Show Launcher Links'
|
|
||||||
: 'Hide Launcher Links?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide launcher links (legacy version) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__launcher_link_legacy =
|
|
||||||
!$events_loc.pres_mgmt.hide__launcher_link_legacy;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt
|
|
||||||
.hide__launcher_link_legacy
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-paper-plane m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__launcher_link_legacy
|
|
||||||
? 'Show Launcher Links'
|
|
||||||
: 'Hide Legacy Launcher Links?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show/Hide links to the location (room) -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.hide__location_link =
|
|
||||||
!$events_loc.pres_mgmt.hide__location_link;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="fas {$events_loc.pres_mgmt.hide__location_link
|
|
||||||
? 'fa-toggle-off'
|
|
||||||
: 'fa-toggle-on'} m-1"
|
|
||||||
></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-map-marker-alt m-1"></span>
|
|
||||||
{$events_loc.pres_mgmt.hide__location_link
|
|
||||||
? 'Show Location Links'
|
|
||||||
: 'Hide Location Links?'}
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__session_files}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__session_files = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-list m-1"></span>
|
|
||||||
Hide Linked Files (testing)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__session_files = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface_outlined justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-list m-1"></span>
|
|
||||||
Show Linked Files? (testing)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__session_presentations}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__session_presentations = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-list m-1"></span>
|
|
||||||
Hide Linked Presentations (testing)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__session_presentations = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface_outlined justify-between w-full text-center"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-list m-1"></span>
|
|
||||||
Show Linked Presentations? (testing)
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $ae_loc?.trusted_access}
|
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-evenly max-w-56"
|
|
||||||
>
|
|
||||||
{#if $ae_loc?.edit_mode}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$ae_loc.edit_mode = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_warning justify-between w-full text-center"
|
|
||||||
title="Turn off edit mode"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-edit m-1"></span>
|
|
||||||
Edit Mode Off
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$ae_loc.edit_mode = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_warning_outlined justify-between w-full text-center"
|
|
||||||
title="Turn on edit mode"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-user-ninja m-1"></span>
|
|
||||||
Edit Mode?
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $ae_loc?.adv_mode}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$ae_loc.adv_mode = false;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_warning justify-between w-full text-center"
|
|
||||||
title="Turn off advanced mode"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-magic m-1"></span>
|
|
||||||
Advanced Mode Off
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$ae_loc.adv_mode = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_warning_outlined justify-between w-full text-center"
|
|
||||||
title="Turn on advanced mode"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<span class="grow">
|
|
||||||
<span class="fas fa-hat-wizard m-1"></span>
|
|
||||||
Advanced Mode?
|
|
||||||
</span>
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<!-- END: The expanded menu area for information and options -->
|
|
||||||
|
|
||||||
|
<!-- Help panel -->
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="events__pres_mgmt__location_help"
|
ds_code="events__pres_mgmt__location_help"
|
||||||
ds_name="Default: Events - Pres Mgmt Location Help"
|
ds_name="Default: Events - Pres Mgmt Location Help"
|
||||||
@@ -467,29 +273,6 @@
|
|||||||
class_li="ae_container_module_help"
|
class_li="ae_container_module_help"
|
||||||
show_edit={false}
|
show_edit={false}
|
||||||
show_edit_btn={true}
|
show_edit_btn={true}
|
||||||
hide={$events_loc.pres_mgmt.show_menu__location != 'help'}
|
hide={!show_help}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_menu__location =
|
|
||||||
!$events_loc.pres_mgmt.show_menu__location;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 ae_btn_info_filled"
|
|
||||||
class:hidden={!$events_loc.pres_mgmt.show_menu__location}
|
|
||||||
title="Collapse the expanded menu"
|
|
||||||
>
|
|
||||||
<span class="fas fa-chevron-up m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location}
|
|
||||||
Hide
|
|
||||||
<!-- Collapse -->
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
<!-- Menu? -->
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End of the new standard page specific menu -->
|
|
||||||
|
|||||||
@@ -1,45 +1,30 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
interface Props {
|
interface Props {
|
||||||
// export let data: any;
|
|
||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
// export let event_location_id: string;
|
lq__event_obj: any;
|
||||||
lq__event_obj: any; // export let lq__auth__event_presenter_obj: any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let { log_lvl = 0, lq__event_obj }: Props = $props();
|
let { log_lvl = 0, lq__event_obj }: Props = $props();
|
||||||
|
|
||||||
// import type { key_val } from '$lib/ae_stores';
|
import { Modal } from 'flowbite-svelte';
|
||||||
import {
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
ae_snip,
|
|
||||||
ae_loc,
|
import { ae_loc } from '$lib/stores/ae_stores';
|
||||||
ae_sess,
|
|
||||||
ae_api,
|
|
||||||
ae_trig,
|
|
||||||
slct,
|
|
||||||
slct_trigger
|
|
||||||
} from '$lib/stores/ae_stores';
|
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_slct
|
||||||
events_slct,
|
|
||||||
events_trigger,
|
|
||||||
events_trig_kv
|
|
||||||
} from '$lib/stores/ae_events_stores';
|
} from '$lib/stores/ae_events_stores';
|
||||||
// import { events_func } from '$lib/ae_events_functions';
|
|
||||||
|
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
|
||||||
|
|
||||||
// let ae_tmp: key_val = {};
|
let show_modal = $state(false);
|
||||||
// let ae_triggers: key_val = {};
|
let show_help = $state(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- New standard page specific menu 2025-06-20 -->
|
<div class="pres_mgmt__locations_menu ae_container_module_menu">
|
||||||
<div class="pres_mgmt__location_menu ae_container_module_menu">
|
<div class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
|
||||||
<!-- BEGIN: The menu button options -->
|
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
|
|
||||||
>
|
|
||||||
<Comp__events_menu_nav
|
<Comp__events_menu_nav
|
||||||
hide={!$ae_loc.authenticated_access}
|
hide={!$ae_loc.authenticated_access}
|
||||||
event_id={$lq__event_obj?.event_id}
|
event_id={$lq__event_obj?.event_id}
|
||||||
@@ -48,205 +33,140 @@
|
|||||||
events__session_search={$events_slct.event_id}
|
events__session_search={$events_slct.event_id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span
|
<span class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around">
|
||||||
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
|
<!-- Options modal trigger -->
|
||||||
>
|
{#if $ae_loc.trusted_access}
|
||||||
<!-- Button to toggle between showing and not showing the extended options menu -->
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onclick={() => (show_modal = true)}
|
||||||
onclick={() => {
|
class="btn btn-sm ae_btn_info"
|
||||||
if (
|
title="Location list options"
|
||||||
$events_loc.pres_mgmt.show_menu__location == 'options'
|
>
|
||||||
) {
|
<Settings size="1em" class="mr-1" />
|
||||||
$events_loc.pres_mgmt.show_menu__location = null;
|
Options
|
||||||
} else {
|
</button>
|
||||||
$events_loc.pres_mgmt.show_menu__location = 'options';
|
{/if}
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__location == 'options'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__location !=
|
|
||||||
'options'}
|
|
||||||
class:hidden={!$ae_loc.trusted_access}
|
|
||||||
title="Options for the event locations"
|
|
||||||
>
|
|
||||||
<span class="fas fa-cog m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location == 'options'}
|
|
||||||
Hide
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
Options?
|
|
||||||
</button>
|
|
||||||
|
|
||||||
|
<!-- Help toggle -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => (show_help = !show_help)}
|
||||||
if ($events_loc.pres_mgmt.show_menu__location == 'help') {
|
class="btn btn-sm"
|
||||||
$events_loc.pres_mgmt.show_menu__location = null;
|
class:ae_btn_info_filled={show_help}
|
||||||
} else {
|
class:ae_btn_info={!show_help}
|
||||||
$events_loc.pres_mgmt.show_menu__location = 'help';
|
title="Help and information about locations"
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__location == 'help'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__location !=
|
|
||||||
'help'}
|
|
||||||
title="Help and information about the location"
|
|
||||||
>
|
>
|
||||||
<span class="fas fa-question-circle m-1"></span>
|
<Info size="1em" class="mr-1" />
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location == 'help'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
Hide Help?
|
|
||||||
{:else}
|
|
||||||
Help?
|
|
||||||
{/if}
|
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: The menu button options -->
|
|
||||||
|
|
||||||
<!-- BEGIN: The expanded menu area for information and options -->
|
<!-- Options Modal -->
|
||||||
<div
|
<Modal
|
||||||
class="flex flex-row flex-wrap gap-0.5 items-center justify-around w-full bg-blue-100 hover:bg-blue-200 border border-blue-200 hover:border-blue-400 p-2 rounded-md"
|
bind:open={show_modal}
|
||||||
class:hidden={$events_loc.pres_mgmt.show_menu__location != 'options'}
|
autoclose={false}
|
||||||
|
dismissable={true}
|
||||||
|
placement="top-center"
|
||||||
|
size="sm"
|
||||||
|
class="relative flex flex-col mx-auto w-full bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg shadow-xl"
|
||||||
|
headerClass="flex flex-row gap-2 items-center justify-between w-full bg-surface-100 dark:bg-surface-800 p-4 rounded-t-lg border-b border-surface-200 dark:border-surface-700"
|
||||||
>
|
>
|
||||||
<!-- <div
|
{#snippet header()}
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-center w-full"
|
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
|
||||||
> -->
|
<Settings size="1.1em" class="text-primary-500" />
|
||||||
<!-- Show the session list or device list -->
|
Locations Display Options
|
||||||
<button
|
</h3>
|
||||||
type="button"
|
<button type="button" class="btn-icon btn-icon-sm preset-tonal-surface ml-2" onclick={() => (show_modal = false)}>
|
||||||
onclick={() => {
|
<X size="1.1em" />
|
||||||
if (
|
</button>
|
||||||
$events_loc.pres_mgmt
|
{/snippet}
|
||||||
.show_content__location_devices_sessions == 'sessions'
|
|
||||||
) {
|
|
||||||
$events_loc.pres_mgmt.show_content__location_devices_sessions =
|
|
||||||
'devices';
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_content__location_devices_sessions =
|
|
||||||
'sessions';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm"
|
|
||||||
class:ae_btn_surface={$events_loc.pres_mgmt
|
|
||||||
?.show_content__location_devices_sessions == 'sessions'}
|
|
||||||
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
|
|
||||||
?.show_content__location_devices_sessions == 'devices'}
|
|
||||||
title="Show the session list or device list for each location."
|
|
||||||
>
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__location_devices_sessions == 'sessions'}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Location's Session List
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Location's Device List
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show or hide the device code -->
|
<div class="flex flex-col gap-4 p-4">
|
||||||
<button
|
<section>
|
||||||
type="button"
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Content</h4>
|
||||||
onclick={() => {
|
<div class="flex flex-col gap-1">
|
||||||
$events_loc.pres_mgmt.hide__device_code =
|
<!-- Session list vs Device list per location -->
|
||||||
!$events_loc.pres_mgmt.hide__device_code;
|
<button
|
||||||
}}
|
type="button"
|
||||||
class="btn btn-sm"
|
onclick={() => {
|
||||||
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__device_code}
|
$events_loc.pres_mgmt.show_content__location_devices_sessions =
|
||||||
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
|
$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions'
|
||||||
?.hide__device_code}
|
? 'devices'
|
||||||
title="Show or hide the device code."
|
: 'sessions';
|
||||||
>
|
}}
|
||||||
{#if !$events_loc.pres_mgmt.hide__device_code}
|
class="btn btn-sm justify-between w-full"
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
class:ae_btn_surface={$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions'}
|
||||||
Device Code
|
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.show_content__location_devices_sessions !== 'sessions'}
|
||||||
{:else}
|
title="Toggle between showing sessions or devices for each location"
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
>
|
||||||
Device Code
|
<span class="fas {$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions' ? 'fa-toggle-on' : 'fa-toggle-off'} mr-1"></span>
|
||||||
{/if}
|
{$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions'
|
||||||
</button>
|
? "Location's Session List"
|
||||||
|
: "Location's Device List"}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- Show or hide the location code -->
|
<section>
|
||||||
<button
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Show Codes</h4>
|
||||||
type="button"
|
<div class="flex flex-col gap-1">
|
||||||
onclick={() => {
|
<button
|
||||||
$events_loc.pres_mgmt.hide__location_code =
|
type="button"
|
||||||
!$events_loc.pres_mgmt.hide__location_code;
|
onclick={() => {
|
||||||
}}
|
$events_loc.pres_mgmt.hide__device_code =
|
||||||
class="btn btn-sm"
|
!$events_loc.pres_mgmt.hide__device_code;
|
||||||
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__location_code}
|
}}
|
||||||
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
|
class="btn btn-sm justify-between w-full"
|
||||||
?.hide__location_code}
|
class:ae_btn_surface={!$events_loc.pres_mgmt.hide__device_code}
|
||||||
title="Show or hide the location code."
|
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.hide__device_code}
|
||||||
>
|
>
|
||||||
{#if !$events_loc.pres_mgmt.hide__location_code}
|
<span class="fas {$events_loc.pres_mgmt.hide__device_code ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
{$events_loc.pres_mgmt.hide__device_code ? 'Show Device Code?' : 'Device Code Visible'}
|
||||||
Showing Location Code
|
</button>
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Show Location Code?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Show or hide the session code -->
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onclick={() => {
|
||||||
onclick={() => {
|
$events_loc.pres_mgmt.hide__location_code =
|
||||||
$events_loc.pres_mgmt.hide__session_code =
|
!$events_loc.pres_mgmt.hide__location_code;
|
||||||
!$events_loc.pres_mgmt.hide__session_code;
|
}}
|
||||||
}}
|
class="btn btn-sm justify-between w-full"
|
||||||
class="btn btn-sm"
|
class:ae_btn_surface={!$events_loc.pres_mgmt.hide__location_code}
|
||||||
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__session_code}
|
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.hide__location_code}
|
||||||
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
|
>
|
||||||
?.hide__session_code}
|
<span class="fas {$events_loc.pres_mgmt.hide__location_code ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
title="Show or hide the session code."
|
{$events_loc.pres_mgmt.hide__location_code ? 'Show Location Code?' : 'Location Code Visible'}
|
||||||
>
|
</button>
|
||||||
{#if !$events_loc.pres_mgmt.hide__session_code}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Showing Session Code
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Show Session Code?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
<!-- </div> -->
|
|
||||||
</div>
|
|
||||||
<!-- END: The expanded menu area for information and options -->
|
|
||||||
|
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.hide__session_code =
|
||||||
|
!$events_loc.pres_mgmt.hide__session_code;
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full"
|
||||||
|
class:ae_btn_surface={!$events_loc.pres_mgmt.hide__session_code}
|
||||||
|
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.hide__session_code}
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.hide__session_code ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.hide__session_code ? 'Show Session Code?' : 'Session Code Visible'}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
<!-- Help panel -->
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="events__pres_mgmt__location_help"
|
ds_code="events__pres_mgmt__location_help"
|
||||||
ds_name="Default: Events - Pres Mgmt Session Help"
|
ds_name="Default: Events - Pres Mgmt Session Help"
|
||||||
ds_type="html"
|
ds_type="html"
|
||||||
for_type="event"
|
for_type="event"
|
||||||
for_id={$lq__event_obj?.event_id}
|
for_id={$lq__event_obj?.event_id}
|
||||||
class_li="bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl"
|
class_li="ae_container_module_help"
|
||||||
show_edit={false}
|
show_edit={false}
|
||||||
show_edit_btn={true}
|
show_edit_btn={true}
|
||||||
hide={$events_loc.pres_mgmt.show_menu__location != 'help'}
|
hide={!show_help}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_menu__location =
|
|
||||||
!$events_loc.pres_mgmt.show_menu__location;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 preset-tonal-error border border-error-500 hover:preset-filled-error-500"
|
|
||||||
class:hidden={!$events_loc.pres_mgmt.show_menu__location}
|
|
||||||
title="Collapse the expanded menu"
|
|
||||||
>
|
|
||||||
<span class="fas fa-chevron-up m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__location}
|
|
||||||
Hide
|
|
||||||
<!-- Collapse -->
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
<!-- Menu? -->
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End of the new standard page specific menu -->
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
interface Props {
|
interface Props {
|
||||||
data?: any;
|
data?: any;
|
||||||
log_lvl?: number;
|
log_lvl?: number;
|
||||||
// import Sign_in_out from './sign_in_out.svelte'; // Should this be used here later???
|
|
||||||
lq__event_obj: any;
|
lq__event_obj: any;
|
||||||
lq__event_presenter_obj: any;
|
lq__event_presenter_obj: any;
|
||||||
}
|
}
|
||||||
@@ -15,410 +14,215 @@
|
|||||||
}: Props = $props();
|
}: Props = $props();
|
||||||
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
import { Modal } from 'flowbite-svelte';
|
||||||
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ae_snip,
|
|
||||||
ae_loc,
|
ae_loc,
|
||||||
ae_sess,
|
ae_api
|
||||||
ae_api,
|
|
||||||
ae_trig,
|
|
||||||
slct,
|
|
||||||
slct_trigger
|
|
||||||
} from '$lib/stores/ae_stores';
|
} from '$lib/stores/ae_stores';
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_slct
|
||||||
events_slct,
|
|
||||||
events_trigger,
|
|
||||||
events_trig_kv
|
|
||||||
} from '$lib/stores/ae_events_stores';
|
} from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
import { api } from '$lib/api/api';
|
import { api } from '$lib/api/api';
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../../../ae_comp__events_menu_nav.svelte';
|
||||||
|
import AE_Record_Controls from '$lib/ae_elements/AE_Record_Controls.svelte';
|
||||||
|
|
||||||
|
let show_modal = $state(false);
|
||||||
|
let show_help = $state(false);
|
||||||
|
|
||||||
|
async function on_toggle(field: string, new_val: boolean) {
|
||||||
|
await api.update_ae_obj_v3({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
obj_type: 'event_presenter',
|
||||||
|
obj_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||||
|
fields: { [field]: new_val }
|
||||||
|
});
|
||||||
|
events_func.load_ae_obj_id__event_presenter({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_presenter_id: $lq__event_presenter_obj?.event_presenter_id,
|
||||||
|
log_lvl
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function on_delete(method: 'delete' | 'disable') {
|
||||||
|
await (events_func as any).delete_ae_obj_id__event_presenter({
|
||||||
|
api_cfg: $ae_api,
|
||||||
|
event_presentation_id: $lq__event_presenter_obj.event_presentation_id,
|
||||||
|
event_presenter_id: $lq__event_presenter_obj.event_presenter_id,
|
||||||
|
method
|
||||||
|
});
|
||||||
|
$events_slct.event_presenter_id = null;
|
||||||
|
$events_slct.event_presenter_obj = {};
|
||||||
|
goto(`/events/${$lq__event_presenter_obj.event_id}/session/${$lq__event_presenter_obj.event_session_id}`);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- New standard page specific menu 2025-06-20 -->
|
|
||||||
<div class="pres_mgmt__presenter_view_menu ae_container_module_menu">
|
<div class="pres_mgmt__presenter_view_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">
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
|
|
||||||
>
|
|
||||||
<Comp__events_menu_nav
|
<Comp__events_menu_nav
|
||||||
hide={false}
|
hide={false}
|
||||||
event_id={$lq__event_presenter_obj?.event_id}
|
event_id={$lq__event_presenter_obj?.event_id}
|
||||||
events__reports={$lq__event_presenter_obj?.event_id &&
|
events__reports={$lq__event_presenter_obj?.event_id && $ae_loc.trusted_access}
|
||||||
$ae_loc.trusted_access}
|
|
||||||
events__session_id={$lq__event_presenter_obj?.event_session_id}
|
events__session_id={$lq__event_presenter_obj?.event_session_id}
|
||||||
events__launcher_session_id={$lq__event_presenter_obj?.event_session_id}
|
events__launcher_session_id={$lq__event_presenter_obj?.event_session_id}
|
||||||
events__session_search={$events_slct.event_id}
|
events__session_search={$events_slct.event_id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span
|
<span class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around">
|
||||||
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
|
<!-- Options modal trigger -->
|
||||||
>
|
{#if $ae_loc.trusted_access}
|
||||||
<!-- Button to toggle between the regular presenter view and managing presenter files -->
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onclick={() => (show_modal = true)}
|
||||||
onclick={() => {
|
class="btn btn-sm ae_btn_info"
|
||||||
if (
|
title="Presenter options"
|
||||||
$events_loc.pres_mgmt.show_content__presenter_view ==
|
>
|
||||||
'manage_files'
|
<Settings size="1em" class="mr-1" />
|
||||||
) {
|
Options
|
||||||
$events_loc.pres_mgmt.show_content__presenter_view =
|
</button>
|
||||||
null;
|
{/if}
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_content__presenter_view =
|
|
||||||
'manage_files';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class={ae_snip.classes__events_pres_mgmt_menu__button_special}
|
|
||||||
class:preset-filled-primary-500={$events_loc.pres_mgmt
|
|
||||||
.show_content__presenter_view == 'manage_files'}
|
|
||||||
class:preset-tonal-primary={$events_loc.pres_mgmt
|
|
||||||
.show_content__presenter_view != 'manage_files'}
|
|
||||||
class:hidden={!$ae_loc.authenticated_access || 1 == 1}
|
|
||||||
title="View presenter information or manage files for the presenter"
|
|
||||||
>
|
|
||||||
{#if $events_loc.pres_mgmt.show_content__presenter_view == 'manage_files'}
|
|
||||||
<span class="fas fa-info m-1"></span>
|
|
||||||
<!-- View Details -->
|
|
||||||
Presenter Info?
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-file-archive m-1"></span>
|
|
||||||
Presenter Files?
|
|
||||||
<span
|
|
||||||
class="badge badge-icon preset-tonal-success absolute -top-1.5 -right-1.5 z-10"
|
|
||||||
class:hidden={!$lq__event_presenter_obj?.file_count}
|
|
||||||
>
|
|
||||||
{$lq__event_presenter_obj?.file_count}×
|
|
||||||
</span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Button to toggle between showing and not showing the extended options menu -->
|
<!-- Help toggle -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => (show_help = !show_help)}
|
||||||
if (
|
class="btn btn-sm"
|
||||||
$events_loc.pres_mgmt.show_menu__presenter == 'options'
|
class:ae_btn_info_filled={show_help}
|
||||||
) {
|
class:ae_btn_info={!show_help}
|
||||||
$events_loc.pres_mgmt.show_menu__presenter = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_menu__presenter = 'options';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__presenter == 'options'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__presenter !=
|
|
||||||
'options'}
|
|
||||||
class:hidden={!$ae_loc.trusted_access}
|
|
||||||
title="Options for the presenter"
|
|
||||||
>
|
|
||||||
<span class="fas fa-cog m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__presenter == 'options'}
|
|
||||||
Hide
|
|
||||||
{:else}
|
|
||||||
<span class="hidden"> Show </span>
|
|
||||||
{/if}
|
|
||||||
Options?
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
if ($events_loc.pres_mgmt.show_menu__presenter == 'help') {
|
|
||||||
$events_loc.pres_mgmt.show_menu__presenter = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_menu__presenter = 'help';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1"
|
|
||||||
class:ae_btn_info_filled={$events_loc.pres_mgmt
|
|
||||||
.show_menu__presenter == 'help'}
|
|
||||||
class:ae_btn_info={$events_loc.pres_mgmt.show_menu__presenter !=
|
|
||||||
'help'}
|
|
||||||
title="Help and information about the presenter"
|
title="Help and information about the presenter"
|
||||||
>
|
>
|
||||||
<span class="fas fa-question-circle m-1"></span>
|
<Info size="1em" class="mr-1" />
|
||||||
{#if $events_loc.pres_mgmt.show_menu__presenter == 'help'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
Hide Help?
|
|
||||||
{:else}
|
|
||||||
Help?
|
|
||||||
{/if}
|
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<!-- Presenter agreement action (shown when require__presenter_agree is on) -->
|
||||||
{#if $events_loc.pres_mgmt?.require__presenter_agree}
|
{#if $events_loc.pres_mgmt?.require__presenter_agree}
|
||||||
<span
|
<span class="ae_menu__action_options flex flex-row items-center justify-around">
|
||||||
class="ae_menu__action_options flex flex-row items-center justify-around"
|
|
||||||
>
|
|
||||||
{#if $lq__event_presenter_obj?.agree}
|
{#if $lq__event_presenter_obj?.agree}
|
||||||
<!-- {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj.event_presenter_id]} -->
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]}
|
||||||
!$events_loc.auth__kv.presenter[
|
|
||||||
$lq__event_presenter_obj
|
|
||||||
?.event_presenter_id
|
|
||||||
]}
|
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id = $lq__event_presenter_obj?.event_presentation_id_random;
|
||||||
$lq__event_presenter_obj?.event_presentation_id_random;
|
$events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id;
|
||||||
// $events_slct.event_presentation_obj = $events_slct.event_presentation_obj;
|
$events_loc.pres_mgmt.show_modal__presenter_agree = $lq__event_presenter_obj?.event_presenter_id;
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
|
||||||
$lq__event_presenter_obj?.event_presenter_id;
|
|
||||||
// $lq__event_presenter_obj = $lq__event_presenter_obj;
|
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
|
||||||
$lq__event_presenter_obj?.event_presenter_id;
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm mx-1 font-bold ae_btn_success_filled"
|
class="btn btn-sm mx-1 font-bold ae_btn_success_filled"
|
||||||
title="Agreed to terms and conditions"
|
title="Agreed to terms and conditions"
|
||||||
>
|
>
|
||||||
<span
|
<span class="fas fa-check text-green-500 px-1"></span>
|
||||||
class="fas fa-check text-green-500 px-1"
|
Agreed
|
||||||
title="Agreed to terms and conditions"
|
|
||||||
></span>
|
|
||||||
<span> Agreed </span>
|
|
||||||
</button>
|
</button>
|
||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]}
|
||||||
!$events_loc.auth__kv.presenter[
|
|
||||||
$lq__event_presenter_obj
|
|
||||||
?.event_presenter_id
|
|
||||||
]}
|
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id = $lq__event_presenter_obj?.event_presentation_id_random;
|
||||||
$lq__event_presenter_obj?.event_presentation_id_random;
|
$events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id;
|
||||||
// $events_slct.event_presentation_obj = $events_slct.event_presentation_obj;
|
$events_loc.pres_mgmt.show_modal__presenter_agree = $lq__event_presenter_obj?.event_presenter_id;
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
|
||||||
$lq__event_presenter_obj?.event_presenter_id;
|
|
||||||
// $lq__event_presenter_obj = $lq__event_presenter_obj;
|
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
|
||||||
$lq__event_presenter_obj?.event_presenter_id;
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm mx-1 font-bold ae_btn_warning_filled"
|
class="btn btn-sm mx-1 font-bold ae_btn_warning_filled"
|
||||||
title="View terms and conditions"
|
title="View terms and conditions"
|
||||||
>
|
>
|
||||||
<span
|
<span class="fas fa-times bg-red-500 text-white px-1 mx-1"></span>
|
||||||
class="fas fa-times bg-red-500 text-white px-1 mx-1"
|
Not yet agreed
|
||||||
title="Not agreed to terms and conditions"
|
|
||||||
></span>
|
|
||||||
<span> Not yet agreed </span>
|
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<!-- END: The menu button options -->
|
|
||||||
|
|
||||||
<!-- BEGIN: The expanded menu area for information and options -->
|
<!-- Options Modal -->
|
||||||
<div
|
<Modal
|
||||||
class="flex flex-row flex-wrap items-center justify-around w-full bg-blue-100 hover:bg-blue-200 border border-blue-200 hover:border-blue-400 p-2 rounded-md"
|
bind:open={show_modal}
|
||||||
class:hidden={$events_loc.pres_mgmt.show_menu__presenter != 'options'}
|
autoclose={false}
|
||||||
|
dismissable={true}
|
||||||
|
placement="top-center"
|
||||||
|
size="md"
|
||||||
|
class="relative flex flex-col mx-auto w-full bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg shadow-xl"
|
||||||
|
headerClass="flex flex-row gap-2 items-center justify-between w-full bg-surface-100 dark:bg-surface-800 p-4 rounded-t-lg border-b border-surface-200 dark:border-surface-700"
|
||||||
>
|
>
|
||||||
<button
|
{#snippet header()}
|
||||||
type="button"
|
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
|
||||||
onclick={async () => {
|
<Settings size="1.1em" class="text-primary-500" />
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_presenter', obj_id: $lq__event_presenter_obj?.event_presenter_id, fields: { priority: !$lq__event_presenter_obj?.priority } });
|
Presenter Options
|
||||||
events_func.load_ae_obj_id__event_presenter({ api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl });
|
</h3>
|
||||||
}}
|
<button type="button" class="btn-icon btn-icon-sm preset-tonal-surface ml-2" onclick={() => (show_modal = false)}>
|
||||||
class="btn btn-sm m-1 *:hover:inline"
|
<X size="1.1em" />
|
||||||
class:ae_btn_surface_outlined={!$lq__event_presenter_obj?.priority}
|
|
||||||
class:ae_btn_success={$lq__event_presenter_obj?.priority}
|
|
||||||
>
|
|
||||||
{#if $lq__event_presenter_obj?.priority}
|
|
||||||
<span class="fas fa-star m-1"></span>
|
|
||||||
<span class="hidden"> Not Priority? </span>
|
|
||||||
{:else}
|
|
||||||
<span class="far fa-star m-1"></span>
|
|
||||||
<span class="hidden"> Priority </span>
|
|
||||||
?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={async () => {
|
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_presenter', obj_id: $lq__event_presenter_obj?.event_presenter_id, fields: { hide: !$lq__event_presenter_obj?.hide } });
|
|
||||||
events_func.load_ae_obj_id__event_presenter({ api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl });
|
|
||||||
}}
|
|
||||||
class="btn btn-sm m-1 *:hover:inline"
|
|
||||||
class:ae_btn_success_outlined={!$lq__event_presenter_obj?.hide}
|
|
||||||
class:ae_btn_warning={$lq__event_presenter_obj?.hide}
|
|
||||||
disabled={!$ae_loc.trusted_access}
|
|
||||||
>
|
|
||||||
{#if $lq__event_presenter_obj?.hide}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Unhide?
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-eye m-1"></span>
|
|
||||||
<span class="hidden"> Not Hidden </span>
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Enable/Disable -->
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={async () => {
|
|
||||||
await api.update_ae_obj_v3({ api_cfg: $ae_api, obj_type: 'event_presenter', obj_id: $lq__event_presenter_obj?.event_presenter_id, fields: { enable: !$lq__event_presenter_obj?.enable } });
|
|
||||||
events_func.load_ae_obj_id__event_presenter({ api_cfg: $ae_api, event_presenter_id: $lq__event_presenter_obj?.event_presenter_id, log_lvl });
|
|
||||||
}}
|
|
||||||
class="btn btn-sm"
|
|
||||||
class:ae_btn_success_outlined={$lq__event_presenter_obj?.enable}
|
|
||||||
class:ae_btn_error={!$lq__event_presenter_obj?.enable}
|
|
||||||
disabled={!$ae_loc.manager_access}
|
|
||||||
>
|
|
||||||
{#if $lq__event_presenter_obj?.enable}
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Enabled
|
|
||||||
{:else}
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Enable?
|
|
||||||
{/if}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Sort -->
|
|
||||||
|
|
||||||
<!-- Group -->
|
|
||||||
|
|
||||||
{#if $ae_loc.manager_access}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
if (
|
|
||||||
!confirm(
|
|
||||||
'Are you sure you want to delete this presenter?'
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
(events_func as any)
|
|
||||||
.delete_ae_obj_id__event_presenter({
|
|
||||||
api_cfg: $ae_api,
|
|
||||||
event_presentation_id:
|
|
||||||
$lq__event_presenter_obj.event_presentation_id,
|
|
||||||
event_presenter_id:
|
|
||||||
$lq__event_presenter_obj.event_presenter_id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
.then(function (delete_results: any) {
|
|
||||||
$events_slct.event_presenter_id = null;
|
|
||||||
$events_slct.event_presenter_obj = {};
|
|
||||||
|
|
||||||
goto(
|
|
||||||
`/events/${$lq__event_presenter_obj.event_id}/session/${$lq__event_presenter_obj.event_session_id}`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 ae_btn_error"
|
|
||||||
title="Delete record permanently"
|
|
||||||
>
|
|
||||||
<span class="fas fa-minus-circle mx-1"></span>
|
|
||||||
Delete
|
|
||||||
</button>
|
</button>
|
||||||
{:else if $ae_loc.trusted_access}
|
{/snippet}
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
if (
|
|
||||||
!confirm(
|
|
||||||
'Are you sure you want to remove (disable) this presenter?'
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
events_func
|
|
||||||
.delete_ae_obj_id__event_presenter({
|
|
||||||
api_cfg: $ae_api,
|
|
||||||
event_presenter_id:
|
|
||||||
$lq__event_presenter_obj.event_presenter_id,
|
|
||||||
method: 'disable'
|
|
||||||
})
|
|
||||||
.then(function (delete_results: any) {
|
|
||||||
$events_slct.event_presenter_id = null;
|
|
||||||
$events_slct.event_presenter_obj = {};
|
|
||||||
|
|
||||||
goto(
|
<div class="flex flex-col gap-4 p-4">
|
||||||
`/events/${$lq__event_presenter_obj.event_id}/session/${$lq__event_presenter_obj.event_session_id}`
|
<!-- Presenter-specific display options -->
|
||||||
);
|
{#if $ae_loc.administrator_access}
|
||||||
});
|
<section>
|
||||||
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Display</h4>
|
||||||
}}
|
<div class="flex flex-row flex-wrap gap-2">
|
||||||
class="btn btn-sm mx-1 ae_btn_warning"
|
<button
|
||||||
title="Disable record"
|
type="button"
|
||||||
>
|
onclick={() => {
|
||||||
<span class="fas fa-minus mx-1"></span>
|
$events_loc.pres_mgmt.show_content__presenter_qr =
|
||||||
Delete
|
!$events_loc.pres_mgmt.show_content__presenter_qr;
|
||||||
</button>
|
}}
|
||||||
{/if}
|
class="btn btn-sm"
|
||||||
|
class:ae_btn_surface={$events_loc.pres_mgmt.show_content__presenter_qr}
|
||||||
{#if $ae_loc.administrator_access}
|
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.show_content__presenter_qr}
|
||||||
{#if $events_loc.pres_mgmt.show_content__presenter_qr}
|
>
|
||||||
<button
|
<span class="fas fa-qrcode mr-1"></span>
|
||||||
type="button"
|
{$events_loc.pres_mgmt.show_content__presenter_qr ? 'Hide QR Code' : 'Show QR Code'}
|
||||||
onclick={() => {
|
</button>
|
||||||
$events_loc.pres_mgmt.show_content__presenter_qr = false;
|
</div>
|
||||||
}}
|
</section>
|
||||||
class="btn btn-sm ae_btn_surface"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-on m-1"></span>
|
|
||||||
Showing QR Code
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_content__presenter_qr = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_surface_outlined"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
Show QR Code?
|
|
||||||
</button>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
|
|
||||||
{#if $ae_loc.trusted_access}
|
<!-- Edit Mode -->
|
||||||
{#if $ae_loc.edit_mode}
|
{#if $ae_loc.trusted_access}
|
||||||
<button
|
<section>
|
||||||
type="button"
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Mode</h4>
|
||||||
onclick={() => {
|
<button
|
||||||
$ae_loc.edit_mode = false;
|
type="button"
|
||||||
}}
|
onclick={() => ($ae_loc.edit_mode = !$ae_loc.edit_mode)}
|
||||||
class="btn btn-sm ae_btn_warning"
|
class="btn btn-sm"
|
||||||
>
|
class:ae_btn_warning={$ae_loc.edit_mode}
|
||||||
<!-- <span class="fas fa-toggle-on m-1"></span> -->
|
class:ae_btn_warning_outlined={!$ae_loc.edit_mode}
|
||||||
<span class="fas fa-edit m-1"></span>
|
>
|
||||||
Edit Mode On
|
<span class="fas fa-edit mr-1"></span>
|
||||||
</button>
|
{$ae_loc.edit_mode ? 'Edit Mode On' : 'Edit Mode?'}
|
||||||
{:else}
|
</button>
|
||||||
<button
|
</section>
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$ae_loc.edit_mode = true;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm ae_btn_warning_outlined"
|
|
||||||
>
|
|
||||||
<span class="fas fa-toggle-off m-1"></span>
|
|
||||||
<!-- <span class="fas fa-edit m-1"></span> -->
|
|
||||||
Edit Mode?
|
|
||||||
</button>
|
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<!-- END: The expanded menu area for information and options -->
|
|
||||||
|
|
||||||
|
<!-- Record Controls -->
|
||||||
|
{#if $ae_loc.trusted_access}
|
||||||
|
<section>
|
||||||
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Record</h4>
|
||||||
|
<AE_Record_Controls
|
||||||
|
obj={$lq__event_presenter_obj}
|
||||||
|
obj_label="presenter"
|
||||||
|
show_alert={false}
|
||||||
|
show_priority={true}
|
||||||
|
show_enable={true}
|
||||||
|
show_hide={true}
|
||||||
|
allow_delete={$ae_loc.manager_access}
|
||||||
|
allow_disable={$ae_loc.trusted_access && !$ae_loc.manager_access}
|
||||||
|
{on_toggle}
|
||||||
|
{on_delete}
|
||||||
|
container_class="flex flex-row flex-wrap gap-2 items-center justify-start"
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
<!-- Help panel -->
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="events__pres_mgmt__presenter_page_help"
|
ds_code="events__pres_mgmt__presenter_page_help"
|
||||||
ds_name="Default: Events - Pres Mgmt Presenter Page Help"
|
ds_name="Default: Events - Pres Mgmt Presenter Page Help"
|
||||||
@@ -428,29 +232,6 @@
|
|||||||
class_li="ae_container_module_help"
|
class_li="ae_container_module_help"
|
||||||
show_edit={false}
|
show_edit={false}
|
||||||
show_edit_btn={true}
|
show_edit_btn={true}
|
||||||
hide={$events_loc.pres_mgmt.show_menu__presenter != 'help'}
|
hide={!show_help}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_menu__presenter =
|
|
||||||
!$events_loc.pres_mgmt.show_menu__presenter;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 ae_btn_info_filled"
|
|
||||||
class:hidden={!$events_loc.pres_mgmt.show_menu__presenter}
|
|
||||||
title="Collapse the expanded menu"
|
|
||||||
>
|
|
||||||
<span class="fas fa-chevron-up m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__presenter}
|
|
||||||
Hide
|
|
||||||
<!-- Collapse -->
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
<!-- Menu? -->
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End of the new standard page specific menu -->
|
|
||||||
|
|||||||
@@ -6,41 +6,25 @@
|
|||||||
|
|
||||||
let { data, lq__event_obj }: Props = $props();
|
let { data, lq__event_obj }: Props = $props();
|
||||||
|
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import { Modal } from 'flowbite-svelte';
|
||||||
import {
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
ae_snip,
|
|
||||||
ae_loc,
|
import { ae_loc } from '$lib/stores/ae_stores';
|
||||||
ae_sess,
|
|
||||||
ae_api,
|
|
||||||
ae_trig,
|
|
||||||
slct,
|
|
||||||
slct_trigger
|
|
||||||
} from '$lib/stores/ae_stores';
|
|
||||||
import {
|
import {
|
||||||
events_loc,
|
events_loc,
|
||||||
events_sess,
|
events_slct
|
||||||
events_slct,
|
|
||||||
events_trigger,
|
|
||||||
events_trig_kv
|
|
||||||
} from '$lib/stores/ae_events_stores';
|
} from '$lib/stores/ae_events_stores';
|
||||||
// import { events_func } from '$lib/ae_events_functions';
|
|
||||||
|
|
||||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||||
import Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
|
import Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
|
||||||
|
|
||||||
let ae_tmp: key_val = {};
|
let show_modal = $state(false);
|
||||||
let ae_triggers: key_val = {};
|
let show_help = $state(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- New standard page specific menu 2024-08-02 -->
|
<div class="pres_mgmt__event_reports ae_container_module_menu">
|
||||||
<div
|
<div class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
|
||||||
class="pres_mgmt__event_reports {ae_snip.classes__events_pres_mgmt_menu}"
|
|
||||||
class:border-gray-100={!$events_loc.pres_mgmt.show_menu__event_reports}
|
|
||||||
>
|
|
||||||
<!-- BEGIN: The menu button options -->
|
|
||||||
<div
|
|
||||||
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
|
|
||||||
>
|
|
||||||
<Comp__events_menu_nav
|
<Comp__events_menu_nav
|
||||||
hide={!$ae_loc.authenticated_access}
|
hide={!$ae_loc.authenticated_access}
|
||||||
event_id={$lq__event_obj?.event_id}
|
event_id={$lq__event_obj?.event_id}
|
||||||
@@ -49,349 +33,179 @@
|
|||||||
events__session_search={$events_slct.event_id}
|
events__session_search={$events_slct.event_id}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span
|
<span class="ae_menu__object_options flex flex-row items-center justify-around">
|
||||||
class="ae_menu__object_options flex flex-row items-center justify-around"
|
<!-- Options modal trigger -->
|
||||||
>
|
{#if $ae_loc.trusted_access}
|
||||||
<!-- Button to toggle between showing and not showing the extended options menu -->
|
<button
|
||||||
<button
|
type="button"
|
||||||
type="button"
|
onclick={() => (show_modal = true)}
|
||||||
onclick={() => {
|
class="btn btn-sm ae_btn_info"
|
||||||
if (
|
title="Report options"
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports ==
|
>
|
||||||
'options'
|
<Settings size="1em" class="mr-1" />
|
||||||
) {
|
Options
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports = null;
|
</button>
|
||||||
} else {
|
{/if}
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports =
|
|
||||||
'options';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class={ae_snip.classes__events_pres_mgmt_menu__button}
|
|
||||||
class:preset-filled-secondary-500={$events_loc.pres_mgmt
|
|
||||||
.show_menu__event_reports == 'options'}
|
|
||||||
class:preset-tonal-secondary={$events_loc.pres_mgmt
|
|
||||||
.show_menu__event_reports != 'options'}
|
|
||||||
class:hidden={!$ae_loc.trusted_access}
|
|
||||||
title="Options for the presenter"
|
|
||||||
>
|
|
||||||
<span class="fas fa-cog m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__event_reports == 'options'}
|
|
||||||
Hide
|
|
||||||
{:else}
|
|
||||||
<span class="hidden"> Show </span>
|
|
||||||
{/if}
|
|
||||||
Options?
|
|
||||||
</button>
|
|
||||||
|
|
||||||
|
<!-- Help toggle -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => (show_help = !show_help)}
|
||||||
if (
|
class="btn btn-sm"
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports == 'help'
|
class:ae_btn_info_filled={show_help}
|
||||||
) {
|
class:ae_btn_info={!show_help}
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports = null;
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports = 'help';
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
class={ae_snip.classes__events_pres_mgmt_menu__button}
|
|
||||||
class:preset-filled-secondary-500={$events_loc.pres_mgmt
|
|
||||||
.show_menu__event_reports == 'help'}
|
|
||||||
class:preset-tonal-secondary={$events_loc.pres_mgmt
|
|
||||||
.show_menu__event_reports != 'help'}
|
|
||||||
title="Help and information about the reports"
|
title="Help and information about the reports"
|
||||||
>
|
>
|
||||||
<span class="fas fa-question-circle mx-1"></span>
|
<Info size="1em" class="mr-1" />
|
||||||
{#if $events_loc.pres_mgmt.show_menu__event_reports == 'help'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
Hide Help?
|
|
||||||
{:else}
|
|
||||||
Help?
|
|
||||||
{/if}
|
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- END: The menu button options -->
|
|
||||||
|
|
||||||
<!-- BEGIN: The expanded menu area for information and options -->
|
<!-- Options Modal -->
|
||||||
<div
|
<Modal
|
||||||
class="
|
bind:open={show_modal}
|
||||||
flex flex-row items-center justify-around
|
autoclose={false}
|
||||||
w-full
|
dismissable={true}
|
||||||
p-2 rounded-md
|
placement="top-center"
|
||||||
bg-blue-100 hover:bg-blue-200
|
size="md"
|
||||||
dark:bg-blue-900 hover:dark:bg-blue-800
|
class="relative flex flex-col mx-auto w-full bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg shadow-xl"
|
||||||
border border-blue-200 hover:border-blue-400
|
headerClass="flex flex-row gap-2 items-center justify-between w-full bg-surface-100 dark:bg-surface-800 p-4 rounded-t-lg border-b border-surface-200 dark:border-surface-700"
|
||||||
"
|
|
||||||
class:hidden={$events_loc.pres_mgmt.show_menu__event_reports !=
|
|
||||||
'options'}
|
|
||||||
>
|
>
|
||||||
{#if $ae_loc.authenticated_access}
|
{#snippet header()}
|
||||||
<div class="flex flex-col gap-1 items-end w-56">
|
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
|
||||||
<!-- Max presenters select options -->
|
<Settings size="1.1em" class="text-primary-500" />
|
||||||
<span class="flex flex-row gap-1 items-center justify-around">
|
Report Options
|
||||||
<label
|
</h3>
|
||||||
class="text-sm w-32 text-right"
|
<button type="button" class="btn-icon btn-icon-sm preset-tonal-surface ml-2" onclick={() => (show_modal = false)}>
|
||||||
for="qry_limit__presenters"
|
<X size="1.1em" />
|
||||||
>
|
</button>
|
||||||
Max presenters:
|
{/snippet}
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="qry_limit__presenters"
|
|
||||||
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
|
|
||||||
onchange={() => {
|
|
||||||
// search__event_presenter({
|
|
||||||
// api_cfg: $ae_api,
|
|
||||||
// event_id: $events_slct.event_id,
|
|
||||||
// agree: true,
|
|
||||||
// biography: null,
|
|
||||||
// ft_search_str: '',
|
|
||||||
// lk_search_str: '',
|
|
||||||
// params: {
|
|
||||||
// 'qry__enabled': 'enabled',
|
|
||||||
// 'qry__hidden': 'not_hidden',
|
|
||||||
// 'qry__limit': $events_loc.pres_mgmt.qry_limit__presenters,},
|
|
||||||
// try_cache: false,
|
|
||||||
// log_lvl: log_lvl,
|
|
||||||
// });
|
|
||||||
}}
|
|
||||||
class="select w-20 text-sm"
|
|
||||||
>
|
|
||||||
<option value={25}>25</option>
|
|
||||||
<option value={50}>50</option>
|
|
||||||
<option value={75}>75</option>
|
|
||||||
<option value={100}>100</option>
|
|
||||||
<option value={150}>150</option>
|
|
||||||
<option value={200}>200</option>
|
|
||||||
<option value={250}>250</option>
|
|
||||||
<option value={300}>300</option>
|
|
||||||
<option value={500}>500</option>
|
|
||||||
<option value={750}>750</option>
|
|
||||||
<option value={1000}>1000</option>
|
|
||||||
</select>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<!-- Max sessions select options -->
|
<div class="flex flex-col gap-4 p-4">
|
||||||
<span class="flex flex-row gap-1 items-center justify-around">
|
<!-- Query limits -->
|
||||||
<label
|
{#if $ae_loc.authenticated_access}
|
||||||
class="text-sm w-32 text-right"
|
<section>
|
||||||
for="qry_limit__sessions"
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Query Limits</h4>
|
||||||
>
|
<div class="flex flex-col gap-2">
|
||||||
Max sessions:
|
<span class="flex flex-row gap-2 items-center">
|
||||||
</label>
|
<label class="text-sm w-32 text-right" for="qry_limit__presenters">Max presenters:</label>
|
||||||
<select
|
<select
|
||||||
id="qry_limit__sessions"
|
id="qry_limit__presenters"
|
||||||
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
|
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
|
||||||
onchange={() => {
|
class="select w-20 text-sm"
|
||||||
// search__event_presenter({
|
>
|
||||||
// api_cfg: $ae_api,
|
<option value={25}>25</option>
|
||||||
// event_id: $events_slct.event_id,
|
<option value={50}>50</option>
|
||||||
// agree: true,
|
<option value={75}>75</option>
|
||||||
// biography: null,
|
<option value={100}>100</option>
|
||||||
// ft_search_str: '',
|
<option value={150}>150</option>
|
||||||
// lk_search_str: '',
|
<option value={200}>200</option>
|
||||||
// params: {
|
<option value={250}>250</option>
|
||||||
// 'qry__enabled': 'enabled',
|
<option value={300}>300</option>
|
||||||
// 'qry__hidden': 'not_hidden',
|
<option value={500}>500</option>
|
||||||
// 'qry__limit': $events_loc.pres_mgmt.qry_limit__sessions,},
|
<option value={750}>750</option>
|
||||||
// try_cache: false,
|
<option value={1000}>1000</option>
|
||||||
// log_lvl: log_lvl,
|
</select>
|
||||||
// });
|
</span>
|
||||||
}}
|
|
||||||
class="select w-20 text-sm"
|
|
||||||
>
|
|
||||||
<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-2 items-center">
|
||||||
<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>
|
||||||
<label
|
<select
|
||||||
class="text-sm w-32 text-right"
|
id="qry_limit__sessions"
|
||||||
for="qry_limit__files"
|
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
|
||||||
>
|
class="select w-20 text-sm"
|
||||||
Max files:
|
>
|
||||||
</label>
|
<option value={25}>25</option>
|
||||||
<select
|
<option value={50}>50</option>
|
||||||
id="qry_limit__files"
|
<option value={75}>75</option>
|
||||||
bind:value={$events_loc.pres_mgmt.qry_limit__files}
|
<option value={100}>100</option>
|
||||||
onchange={() => {
|
<option value={200}>200</option>
|
||||||
// search__event_presenter({
|
<option value={500}>500</option>
|
||||||
// api_cfg: $ae_api,
|
</select>
|
||||||
// event_id: $events_slct.event_id,
|
</span>
|
||||||
// agree: true,
|
|
||||||
// biography: null,
|
|
||||||
// ft_search_str: '',
|
|
||||||
// lk_search_str: '',
|
|
||||||
// params: {
|
|
||||||
// 'qry__enabled': 'enabled',
|
|
||||||
// 'qry__hidden': 'not_hidden',
|
|
||||||
// 'qry__limit': $events_loc.pres_mgmt.qry_limit__sessions,},
|
|
||||||
// try_cache: false,
|
|
||||||
// log_lvl: log_lvl,
|
|
||||||
// });
|
|
||||||
}}
|
|
||||||
class="select w-20 text-sm"
|
|
||||||
>
|
|
||||||
<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}
|
<span class="flex flex-row gap-2 items-center">
|
||||||
<div class="flex flex-col gap-1 items-center">
|
<label class="text-sm w-32 text-right" for="qry_limit__files">Max files:</label>
|
||||||
<!-- Button to toggle between the showing additional hidden download buttons -->
|
<select
|
||||||
{#if $events_loc.pres_mgmt.show__direct_download}
|
id="qry_limit__files"
|
||||||
<button
|
bind:value={$events_loc.pres_mgmt.qry_limit__files}
|
||||||
type="button"
|
class="select w-20 text-sm"
|
||||||
onclick={() => {
|
>
|
||||||
$events_loc.pres_mgmt.show__direct_download =
|
<option value={25}>25</option>
|
||||||
!$events_loc.pres_mgmt.show__direct_download;
|
<option value={50}>50</option>
|
||||||
}}
|
<option value={75}>75</option>
|
||||||
class="btn btn-sm preset-tonal-success border border-success-500"
|
<option value={100}>100</option>
|
||||||
title="Hide additional direct download and copy link buttons?"
|
<option value={200}>200</option>
|
||||||
>
|
<option value={500}>500</option>
|
||||||
<span class="fas fa-eye-slash m-1"></span>
|
</select>
|
||||||
Hide Download Buttons?
|
</span>
|
||||||
</button>
|
</div>
|
||||||
{:else}
|
</section>
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show__direct_download =
|
|
||||||
!$events_loc.pres_mgmt.show__direct_download;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm preset-tonal-warning border border-warning-500"
|
|
||||||
title="Show additional direct download and copy link buttons?"
|
|
||||||
>
|
|
||||||
<span class="fas fa-eye m-1"></span>
|
|
||||||
Show Download Buttons?
|
|
||||||
</button>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<!-- Button to toggle between the showing hidden sessions -->
|
<!-- Visibility filters -->
|
||||||
{#if $events_loc.pres_mgmt.qry_hidden == 'all'}
|
<section>
|
||||||
<button
|
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Filters</h4>
|
||||||
type="button"
|
<div class="flex flex-col gap-1">
|
||||||
onclick={() => {
|
|
||||||
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 preset-tonal-success border border-success-500"
|
|
||||||
title="Hide sessions marked as hidden?"
|
|
||||||
>
|
|
||||||
<span class="fas fa-eye-slash m-1"></span>
|
|
||||||
Hide Sessions?
|
|
||||||
</button>
|
|
||||||
{:else}
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
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 preset-tonal-warning border border-warning-500"
|
|
||||||
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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
if (
|
$events_loc.pres_mgmt.show__direct_download =
|
||||||
$events_loc.pres_mgmt.qry_enabled == 'all'
|
!$events_loc.pres_mgmt.show__direct_download;
|
||||||
) {
|
|
||||||
$events_loc.pres_mgmt.qry_enabled =
|
|
||||||
'enabled';
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.qry_enabled = 'all';
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm preset-tonal-success border border-success-500"
|
class="btn btn-sm justify-between w-full"
|
||||||
title="Hide disabled sessions?"
|
class:preset-tonal-success={$events_loc.pres_mgmt.show__direct_download}
|
||||||
|
class:preset-tonal-warning={!$events_loc.pres_mgmt.show__direct_download}
|
||||||
>
|
>
|
||||||
<span class="fas fa-eye-slash m-1"></span>
|
<span class="fas {$events_loc.pres_mgmt.show__direct_download ? 'fa-eye-slash' : 'fa-eye'} mr-1"></span>
|
||||||
Hide Disabled Sessions?
|
{$events_loc.pres_mgmt.show__direct_download ? 'Hide Download Buttons?' : 'Show Download Buttons?'}
|
||||||
</button>
|
</button>
|
||||||
{:else}
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
if (
|
$events_loc.pres_mgmt.qry_hidden =
|
||||||
$events_loc.pres_mgmt.qry_enabled == 'all'
|
$events_loc.pres_mgmt.qry_hidden === 'all' ? 'not_hidden' : 'all';
|
||||||
) {
|
|
||||||
$events_loc.pres_mgmt.qry_enabled =
|
|
||||||
'enabled';
|
|
||||||
} else {
|
|
||||||
$events_loc.pres_mgmt.qry_enabled = 'all';
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm preset-tonal-warning border border-warning-500"
|
class="btn btn-sm justify-between w-full"
|
||||||
title="Show disabled sessions?"
|
class:preset-tonal-success={$events_loc.pres_mgmt.qry_hidden === 'all'}
|
||||||
|
class:preset-tonal-warning={$events_loc.pres_mgmt.qry_hidden !== 'all'}
|
||||||
>
|
>
|
||||||
<span class="fas fa-eye m-1"></span>
|
<span class="fas {$events_loc.pres_mgmt.qry_hidden === 'all' ? 'fa-eye-slash' : 'fa-eye'} mr-1"></span>
|
||||||
Show All (Disabled) Sessions?
|
{$events_loc.pres_mgmt.qry_hidden === 'all' ? 'Hide Hidden Sessions?' : 'Show Hidden Sessions?'}
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
<!-- END: The expanded menu area for information and options -->
|
|
||||||
|
|
||||||
|
{#if $ae_loc.manager_access}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onclick={() => {
|
||||||
|
$events_loc.pres_mgmt.qry_enabled =
|
||||||
|
$events_loc.pres_mgmt.qry_enabled === 'all' ? 'enabled' : 'all';
|
||||||
|
}}
|
||||||
|
class="btn btn-sm justify-between w-full"
|
||||||
|
class:preset-tonal-success={$events_loc.pres_mgmt.qry_enabled === 'all'}
|
||||||
|
class:preset-tonal-warning={$events_loc.pres_mgmt.qry_enabled !== 'all'}
|
||||||
|
>
|
||||||
|
<span class="fas {$events_loc.pres_mgmt.qry_enabled === 'all' ? 'fa-eye-slash' : 'fa-eye'} mr-1"></span>
|
||||||
|
{$events_loc.pres_mgmt.qry_enabled === 'all' ? 'Hide Disabled Sessions?' : 'Show Disabled Sessions?'}
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
<!-- Help panel -->
|
||||||
<Element_data_store
|
<Element_data_store
|
||||||
ds_code="events__pres_mgmt__reports_help"
|
ds_code="events__pres_mgmt__reports_help"
|
||||||
ds_name="Default: Events - Pres Mgmt Event Reports Help"
|
ds_name="Default: Events - Pres Mgmt Event Reports Help"
|
||||||
ds_type="html"
|
ds_type="html"
|
||||||
for_type="event"
|
for_type="event"
|
||||||
for_id={$events_slct.event_id}
|
for_id={$events_slct.event_id}
|
||||||
class_li="bg-yellow-100 border border-yellow-400 p-2 rounded-md max-w-xl"
|
class_li="ae_container_module_help"
|
||||||
show_edit={false}
|
show_edit={false}
|
||||||
show_edit_btn={true}
|
show_edit_btn={true}
|
||||||
hide={$events_loc.pres_mgmt.show_menu__event_reports != 'help'}
|
hide={!show_help}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
onclick={() => {
|
|
||||||
$events_loc.pres_mgmt.show_menu__event_reports =
|
|
||||||
!$events_loc.pres_mgmt.show_menu__event_reports;
|
|
||||||
}}
|
|
||||||
class="btn btn-sm mx-1 preset-tonal-error border border-error-500 hover:preset-filled-error-500"
|
|
||||||
class:hidden={!$events_loc.pres_mgmt.show_menu__event_reports}
|
|
||||||
title="Collapse the expanded menu"
|
|
||||||
>
|
|
||||||
<span class="fas fa-chevron-up m-1"></span>
|
|
||||||
{#if $events_loc.pres_mgmt.show_menu__event_reports}
|
|
||||||
Hide
|
|
||||||
<!-- Collapse -->
|
|
||||||
{:else}
|
|
||||||
Show
|
|
||||||
{/if}
|
|
||||||
<!-- Menu? -->
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End of the new standard page specific menu -->
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { Modal } from 'flowbite-svelte';
|
import { Modal } from 'flowbite-svelte';
|
||||||
import { Settings, X, HelpCircle } from '@lucide/svelte';
|
import { Settings, X, Info } from '@lucide/svelte';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ae_loc,
|
ae_loc,
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
class:ae_btn_info={!show_help}
|
class:ae_btn_info={!show_help}
|
||||||
title="Help and information about the session"
|
title="Help and information about the session"
|
||||||
>
|
>
|
||||||
<HelpCircle size="1em" class="mr-1" />
|
<Info size="1em" class="mr-1" />
|
||||||
{show_help ? 'Hide Help' : 'Help'}
|
{show_help ? 'Hide Help' : 'Help'}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user