Badges: print centering via display:contents — collapse wrappers, body as flex center

This commit is contained in:
Scott Idem
2026-03-12 17:21:56 -04:00
parent 11a6d5d35c
commit f26416de22
9 changed files with 891 additions and 1851 deletions

View File

@@ -28,7 +28,7 @@
Bell,
BellOff,
Trash2,
MinusCircle,
CircleMinus,
Settings
} from '@lucide/svelte';
@@ -186,7 +186,7 @@
class="btn-icon btn-icon-sm preset-filled-warning-500 hover:preset-filled-warning-600 transition"
title="Disable / soft-remove this {obj_label}"
>
<MinusCircle size="1.2em" />
<CircleMinus size="1.2em" />
</button>
{/if}
</div>

View File

@@ -147,69 +147,82 @@
it in the compiled layout CSS files.
-->
<!-- Print chrome reset + centering: applied regardless of layout.
Hides app nav, resets the events layout container, and centers the badge
both horizontally and vertically on the printed page.
<!-- Print layout strategy — applied regardless of badge layout:
Future manual margins: read from badge template cfg_json as
{ "print_margin": { "top": "0.25in", ... } }
and inject into @page margin via a dynamic <style> block. -->
Instead of trying to coerce #ae_main_content into a centering container
(which requires fighting its min-height, overflow, max-width, flex-col etc.),
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>
@media print {
/* Fill the physical page height so flex vertical-centering works */
/* Full-page reset */
html, body {
height: 100%;
margin: 0 !important;
padding: 0 !important;
}
/* Events layout nav bar */
.submenu { display: none !important; }
/* Events #ae_main_content — convert to a full-page flex centering container */
#ae_main_content {
/* Body is the sole centering flex container.
.event_badge_wrapper is its only non-hidden flex child
once the intermediate wrappers are collapsed via display:contents. */
body {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center !important;
overflow: visible !important;
max-width: none !important;
width: 100% !important;
min-height: 100vh !important;
height: 100% !important;
padding: 0 !important;
}
/* Hide app chrome */
.submenu { display: none !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;
background: transparent !important;
padding: 0 !important;
gap: 0 !important;
}
/* Badge render wrapper — strip screen-only right padding; flex-center the badge */
#badge_render_area {
display: flex !important;
align-items: center !important;
justify-content: center !important;
padding: 0 !important;
margin: 0 !important;
width: 100% !important;
/* Never split the front or back across pages */
.badge_front,
.badge_back {
break-inside: avoid;
page-break-inside: avoid;
}
}
</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'}
<style>
@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>
{:else if $lq__event_badge_template_obj?.layout === 'badge_4x5_fanfold'}
<style>
@page { size: 4in 10in; margin: 0; }
@media print { body { margin: 0; padding: 0; } .event_badge_wrapper { gap: 0 !important; padding: 0 !important; } }
</style>
{:else}
<!-- Default: badge_4x6_fanfold or layout not yet set -->
<style>
@page { size: 4in 12in; margin: 0; }
@media print { body { margin: 0; padding: 0; } .event_badge_wrapper { gap: 0 !important; padding: 0 !important; } }
</style>
{/if}

View File

@@ -27,7 +27,8 @@
(async () => {
// 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) {
// Not cached — fetch from API and save to Dexie
session = await events_func.load_ae_obj_id__event_session({

View File

@@ -1,29 +1,22 @@
<script lang="ts">
interface Props {
// export let data: any;
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();
import { goto } from '$app/navigation';
import { Modal } from 'flowbite-svelte';
import { Settings, X, Info } from '@lucide/svelte';
import {
ae_snip,
ae_loc,
ae_sess,
ae_api,
ae_trig,
slct,
slct_trigger
ae_api
} from '$lib/stores/ae_stores';
import {
events_loc,
events_sess,
events_slct,
events_trigger,
events_trig_kv
events_slct
} from '$lib/stores/ae_events_stores';
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 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 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>
<!-- New standard page specific menu 2025-06-20 -->
<div class="pres_mgmt__session_search_menu ae_container_module_menu">
<!-- BEGIN: The menu button options -->
<div
class="flex flex-row flex-wrap gap-1 items-center justify-around w-full"
>
<div class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
<Comp__events_menu_nav
hide={!$ae_loc.authenticated_access}
event_id={$lq__event_obj?.event_id}
@@ -49,35 +68,25 @@
events__session_search={false}
/>
<span
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
>
<!-- Button to toggle between the regular event session search view and managing event files -->
<span 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
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_content__event_view ==
'manage_files'
) {
$events_loc.pres_mgmt.show_content__event_view = null;
} else {
$events_loc.pres_mgmt.show_content__event_view =
'manage_files';
}
$events_loc.pres_mgmt.show_content__event_view =
$events_loc.pres_mgmt.show_content__event_view === 'manage_files'
? null
: 'manage_files';
}}
class={ae_snip.classes__events_pres_mgmt_menu__button_special}
class:preset-filled-primary-500={$events_loc.pres_mgmt
.show_content__event_view == 'manage_files'}
class:preset-tonal-primary={$events_loc.pres_mgmt
.show_content__event_view != 'manage_files'}
class="btn btn-sm relative"
class:preset-filled-primary-500={$events_loc.pres_mgmt.show_content__event_view === 'manage_files'}
class:preset-tonal-primary={$events_loc.pres_mgmt.show_content__event_view !== 'manage_files'}
class:hidden={!$ae_loc.administrator_access}
disabled={!$ae_loc.manager_access}
title="Session search or manage files for the event"
>
{#if $events_loc.pres_mgmt.show_content__event_view == 'manage_files'}
{#if $events_loc.pres_mgmt.show_content__event_view === 'manage_files'}
<span class="fas fa-users m-1"></span>
<!-- View Session Search -->
Session Search?
{:else}
<span class="fas fa-file-archive m-1"></span>
@@ -91,442 +100,184 @@
{/if}
</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
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__session_search ==
'options'
) {
$events_loc.pres_mgmt.show_menu__session_search = null;
} else {
$events_loc.pres_mgmt.show_menu__session_search =
'options';
}
}}
class="btn btn-sm mx-1"
class:ae_btn_info_filled={$events_loc.pres_mgmt
.show_menu__session_search == 'options'}
class:ae_btn_info={$events_loc.pres_mgmt
.show_menu__session_search != 'options'}
class:hidden={!$ae_loc.trusted_access}
title="Options for the event session search"
onclick={() => (show_help = !show_help)}
class="btn btn-sm"
class:ae_btn_info_filled={show_help}
class:ae_btn_info={!show_help}
title="Help and information about the event session search"
>
<span class="fas fa-cog m-1"></span>
{#if $events_loc.pres_mgmt.show_menu__session_search == 'options'}
Hide
{:else}
<span class="hidden"> Show </span>
{/if}
Options?
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</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>
</div>
<!-- END: The menu button options -->
<!-- BEGIN: The expanded menu area for information and options -->
<div
class:ae_container_module_options={$events_loc.pres_mgmt
.show_menu__session_search == 'options'}
class:hidden={$events_loc.pres_mgmt.show_menu__session_search !=
'options'}
<!-- Options Modal -->
<Modal
bind:open={show_modal}
autoclose={false}
dismissable={true}
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">
<h2 class="text-sm font-semibold text-center pb-1">
Æ Event Menu Options
</h2>
{#snippet header()}
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
<Settings size="1.1em" class="text-primary-500" />
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
class="flex flex-row flex-wrap gap-1 items-center justify-between"
>
<div
class="flex flex-row gap-1 items-center justify-evenly relative"
>
<!-- Toggle alert status -->
<div class="flex flex-col gap-4 p-4">
<!-- Display options for the session list -->
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Display</h4>
<div class="flex flex-col gap-1">
<button
type="button"
disabled={!$ae_loc.administrator_access}
onclick={async () => {
if (
!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 });
onclick={() => {
$events_loc.pres_mgmt.save_search_text =
!$events_loc.pres_mgmt.save_search_text;
}}
class:opacity-100={$lq__event_obj?.alert}
class:opacity-50={!$lq__event_obj?.alert}
class="
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'}
class="btn btn-sm justify-between w-full"
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.save_search_text}
>
{#if $lq__event_obj?.alert}
<!-- class="fas fa-exclamation-triangle" -->
<span
class="fas fa-bell-slash m-0.75 text-warning-600"
title="This session is marked as an alert."
></span>
{:else}
<span
class="fas fa-bell m-0.75 text-gray-400"
title="This session is not marked as an alert."
></span>
{/if}
<span class="hidden">Toggle Alert</span>
<span class="fas {$events_loc.pres_mgmt.save_search_text ? 'fa-toggle-on' : 'fa-toggle-off'} mr-1"></span>
<span class="grow">
<span class="fas fa-save mr-1"></span>
{$events_loc.pres_mgmt.save_search_text ? 'Do Not Save Search' : 'Save Search Text?'}
</span>
</button>
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__launcher_link =
!$events_loc.pres_mgmt.hide__launcher_link;
}}
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>
</div>
</section>
<div
class="flex flex-row flex-wrap gap-1 items-center justify-evenly"
>
<button
type="button"
disabled={!$ae_loc.administrator_access}
onclick={async () => {
if (
!confirm(
`Are you sure you want to mark this event as ${$lq__event_obj?.priority ? 'not priority' : 'high priority'}?`
)
) {
return false;
}
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 } });
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_surface_outlined={!$lq__event_obj?.priority}
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>
<!-- Record Controls for the Event itself -->
{#if $ae_loc.administrator_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Event Record</h4>
<AE_Record_Controls
obj={$lq__event_obj}
obj_label="event"
show_alert={true}
show_priority={true}
show_enable={true}
show_hide={true}
allow_delete={$ae_loc.super_access}
allow_disable={$ae_loc.manager_access && !$ae_loc.super_access}
{on_toggle}
{on_delete}
container_class="flex flex-row flex-wrap gap-2 items-center justify-start"
/>
</section>
{/if}
<button
type="button"
disabled={!$ae_loc.manager_access}
onclick={async () => {
if (
!confirm(
`Are you sure you want to ${$lq__event_obj?.hide ? 'unhide' : 'hide'} 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: { 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>
<!-- Pres Mgmt query options (limits, filters) — this component belongs here on the session search page -->
{#if $ae_loc.authenticated_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Query Options</h4>
<Comp__pres_mgmt_menu_opts hide={false} />
</section>
{/if}
</div>
</Modal>
<div
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 -->
<!-- Help panel -->
<Element_data_store
ds_code="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"
show_edit={false}
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>
<!-- End of the new standard page specific menu -->

View File

@@ -2,7 +2,6 @@
export interface Props {
data?: any;
log_lvl?: number;
// export let event_location_id: string;
lq__event_obj: any;
lq__event_location_obj: any;
}
@@ -14,36 +13,56 @@
lq__event_location_obj
}: Props = $props();
import { goto } from '$app/navigation';
import { Modal } from 'flowbite-svelte';
import { Settings, X, Info } from '@lucide/svelte';
import {
ae_snip,
ae_loc,
ae_sess,
ae_api,
ae_trig,
slct,
slct_trigger
ae_api
} from '$lib/stores/ae_stores';
import {
events_loc,
events_sess,
events_slct,
events_trigger,
events_trig_kv
events_slct
} from '$lib/stores/ae_events_stores';
import { events_func } from '$lib/ae_events_functions';
import { api } from '$lib/api/api';
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 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>
<!-- New standard page specific menu 2025-06-20 -->
<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
hide={!$ae_loc.authenticated_access}
event_id={$lq__event_obj?.event_id}
@@ -52,412 +71,199 @@
events__session_search={$events_slct.event_id}
/>
<span
class="ae_menu__object_options flex flex-row flex-wrap items-center justify-around"
>
<!-- Button to toggle between the regular location view and managing location files -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_content__location_view ==
'manage_files'
) {
$events_loc.pres_mgmt.show_content__location_view =
null;
} 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>
<span class="ae_menu__object_options flex flex-row flex-wrap items-center justify-around">
<!-- Options modal trigger -->
{#if $ae_loc.trusted_access}
<button
type="button"
onclick={() => (show_modal = true)}
class="btn btn-sm ae_btn_info"
title="Location options"
>
<Settings size="1em" class="mr-1" />
Options
</button>
{/if}
<!-- Help toggle -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__location == 'options'
) {
$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'}
onclick={() => (show_help = !show_help)}
class="btn btn-sm"
class:ae_btn_info_filled={show_help}
class:ae_btn_info={!show_help}
title="Help and information about the location"
>
<span class="fas fa-question-circle m-1"></span>
{#if $events_loc.pres_mgmt.show_menu__location == 'help'}
Hide Help?
{:else}
Help?
{/if}
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</button>
</span>
<!-- <span
class="ae_menu__action_options"
class:hidden={!$ae_loc.administrator_access}
>
No Actions
</span> -->
</div>
<!-- END: The menu button options -->
<!-- BEGIN: The expanded menu area for information and options -->
<div
class:ae_container_module_options={$events_loc.pres_mgmt
.show_menu__location == 'options'}
class:hidden={$events_loc.pres_mgmt.show_menu__location != 'options'}
<!-- Options Modal -->
<Modal
bind:open={show_modal}
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
type="button"
onclick={async () => {
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 } });
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
}}
class="btn btn-sm m-1 *:hover:inline"
class:ae_btn_surface_outlined={!$lq__event_location_obj?.priority}
class:ae_btn_success={$lq__event_location_obj?.priority}
>
{#if $lq__event_location_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>
?
{#snippet header()}
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
<Settings size="1.1em" class="text-primary-500" />
Location 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 class="flex flex-col gap-4 p-4">
<!-- Launcher & Location Link Toggles -->
{#if $ae_loc.administrator_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Display Links</h4>
<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}
</button>
<button
type="button"
onclick={async () => {
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 } });
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
}}
class="btn btn-sm m-1 *:hover:inline"
class:ae_btn_success_outlined={!$lq__event_location_obj?.hide}
class:ae_btn_warning={$lq__event_location_obj?.hide}
disabled={!$ae_loc.trusted_access}
>
{#if $lq__event_location_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>
<!-- Mode toggles -->
{#if $ae_loc.trusted_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Mode</h4>
<div class="flex flex-row flex-wrap gap-2">
<button
type="button"
onclick={() => ($ae_loc.edit_mode = !$ae_loc.edit_mode)}
class="btn btn-sm"
class:ae_btn_warning={$ae_loc.edit_mode}
class:ae_btn_warning_outlined={!$ae_loc.edit_mode}
>
<span class="fas fa-edit mr-1"></span>
{$ae_loc.edit_mode ? 'Edit Mode On' : 'Edit Mode?'}
</button>
<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}
</button>
<!-- Enable/Disable -->
<button
type="button"
onclick={async () => {
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 } });
events_func.load_ae_obj_id__event_location({ api_cfg: $ae_api, event_location_id: $lq__event_location_obj?.event_location_id, log_lvl });
}}
class="btn btn-sm"
class:ae_btn_success_outlined={$lq__event_location_obj?.enable}
class:ae_btn_error={!$lq__event_location_obj?.enable}
disabled={!$ae_loc.manager_access}
>
{#if $lq__event_location_obj?.enable}
<span class="fas fa-toggle-on m-1"></span>
Enabled
{:else}
<span class="fas fa-toggle-off m-1"></span>
Enable?
<!-- 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_location_obj}
obj_label="location"
show_alert={false}
show_priority={true}
show_enable={true}
show_hide={true}
allow_delete={$ae_loc.manager_access}
allow_disable={$ae_loc.administrator_access && !$ae_loc.manager_access}
{on_toggle}
{on_delete}
container_class="flex flex-row flex-wrap gap-2 items-center justify-start"
/>
</section>
{/if}
</button>
<!-- 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 -->
</div>
</Modal>
<!-- Help panel -->
<Element_data_store
ds_code="events__pres_mgmt__location_help"
ds_name="Default: Events - Pres Mgmt Location Help"
@@ -467,29 +273,6 @@
class_li="ae_container_module_help"
show_edit={false}
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>
<!-- End of the new standard page specific menu -->

View File

@@ -1,45 +1,30 @@
<script lang="ts">
interface Props {
// export let data: any;
log_lvl?: number;
// export let event_location_id: string;
lq__event_obj: any; // export let lq__auth__event_presenter_obj: any;
lq__event_obj: any;
}
let { log_lvl = 0, lq__event_obj }: Props = $props();
// import type { key_val } from '$lib/ae_stores';
import {
ae_snip,
ae_loc,
ae_sess,
ae_api,
ae_trig,
slct,
slct_trigger
} from '$lib/stores/ae_stores';
import { Modal } from 'flowbite-svelte';
import { Settings, X, Info } from '@lucide/svelte';
import { ae_loc } from '$lib/stores/ae_stores';
import {
events_loc,
events_sess,
events_slct,
events_trigger,
events_trig_kv
events_slct
} 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 Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
// let ae_tmp: key_val = {};
// let ae_triggers: key_val = {};
let show_modal = $state(false);
let show_help = $state(false);
</script>
<!-- New standard page specific menu 2025-06-20 -->
<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="pres_mgmt__locations_menu ae_container_module_menu">
<div class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
<Comp__events_menu_nav
hide={!$ae_loc.authenticated_access}
event_id={$lq__event_obj?.event_id}
@@ -48,205 +33,140 @@
events__session_search={$events_slct.event_id}
/>
<span
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
>
<!-- Button to toggle between showing and not showing the extended options menu -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__location == 'options'
) {
$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 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>
<span 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
type="button"
onclick={() => (show_modal = true)}
class="btn btn-sm ae_btn_info"
title="Location list options"
>
<Settings size="1em" class="mr-1" />
Options
</button>
{/if}
<!-- Help toggle -->
<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"
onclick={() => (show_help = !show_help)}
class="btn btn-sm"
class:ae_btn_info_filled={show_help}
class:ae_btn_info={!show_help}
title="Help and information about locations"
>
<span class="fas fa-question-circle m-1"></span>
{#if $events_loc.pres_mgmt.show_menu__location == 'help'}
Hide Help?
{:else}
Help?
{/if}
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</button>
</span>
</div>
<!-- END: The menu button options -->
<!-- BEGIN: The expanded menu area for information and options -->
<div
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"
class:hidden={$events_loc.pres_mgmt.show_menu__location != 'options'}
<!-- Options Modal -->
<Modal
bind:open={show_modal}
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
class="flex flex-row flex-wrap gap-1 items-center justify-center w-full"
> -->
<!-- Show the session list or device list -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt
.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>
{#snippet header()}
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
<Settings size="1.1em" class="text-primary-500" />
Locations Display 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}
<!-- Show or hide the device code -->
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__device_code =
!$events_loc.pres_mgmt.hide__device_code;
}}
class="btn btn-sm"
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__device_code}
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
?.hide__device_code}
title="Show or hide the device code."
>
{#if !$events_loc.pres_mgmt.hide__device_code}
<span class="fas fa-toggle-on m-1"></span>
Device Code
{:else}
<span class="fas fa-toggle-off m-1"></span>
Device Code
{/if}
</button>
<div class="flex flex-col gap-4 p-4">
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Content</h4>
<div class="flex flex-col gap-1">
<!-- Session list vs Device list per location -->
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__location_devices_sessions =
$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions'
? 'devices'
: 'sessions';
}}
class="btn btn-sm justify-between w-full"
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 !== 'sessions'}
title="Toggle between showing sessions or devices for each location"
>
<span class="fas {$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions' ? 'fa-toggle-on' : 'fa-toggle-off'} mr-1"></span>
{$events_loc.pres_mgmt.show_content__location_devices_sessions === 'sessions'
? "Location's Session List"
: "Location's Device List"}
</button>
</div>
</section>
<!-- Show or hide the location code -->
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__location_code =
!$events_loc.pres_mgmt.hide__location_code;
}}
class="btn btn-sm"
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__location_code}
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
?.hide__location_code}
title="Show or hide the location code."
>
{#if !$events_loc.pres_mgmt.hide__location_code}
<span class="fas fa-toggle-on m-1"></span>
Showing Location Code
{:else}
<span class="fas fa-toggle-off m-1"></span>
Show Location Code?
{/if}
</button>
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Show Codes</h4>
<div class="flex flex-col gap-1">
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__device_code =
!$events_loc.pres_mgmt.hide__device_code;
}}
class="btn btn-sm justify-between w-full"
class:ae_btn_surface={!$events_loc.pres_mgmt.hide__device_code}
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.hide__device_code}
>
<span class="fas {$events_loc.pres_mgmt.hide__device_code ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
{$events_loc.pres_mgmt.hide__device_code ? 'Show Device Code?' : 'Device Code Visible'}
</button>
<!-- Show or hide the session code -->
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.hide__session_code =
!$events_loc.pres_mgmt.hide__session_code;
}}
class="btn btn-sm"
class:ae_btn_surface={!$events_loc.pres_mgmt?.hide__session_code}
class:ae_btn_surface_outlined={$events_loc.pres_mgmt
?.hide__session_code}
title="Show or hide the session code."
>
{#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__location_code =
!$events_loc.pres_mgmt.hide__location_code;
}}
class="btn btn-sm justify-between w-full"
class:ae_btn_surface={!$events_loc.pres_mgmt.hide__location_code}
class:ae_btn_surface_outlined={$events_loc.pres_mgmt.hide__location_code}
>
<span class="fas {$events_loc.pres_mgmt.hide__location_code ? 'fa-toggle-off' : 'fa-toggle-on'} mr-1"></span>
{$events_loc.pres_mgmt.hide__location_code ? 'Show Location Code?' : 'Location Code Visible'}
</button>
<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
ds_code="events__pres_mgmt__location_help"
ds_name="Default: Events - Pres Mgmt Session Help"
ds_type="html"
for_type="event"
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_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>
<!-- End of the new standard page specific menu -->

View File

@@ -2,7 +2,6 @@
interface Props {
data?: any;
log_lvl?: number;
// import Sign_in_out from './sign_in_out.svelte'; // Should this be used here later???
lq__event_obj: any;
lq__event_presenter_obj: any;
}
@@ -15,410 +14,215 @@
}: Props = $props();
import { goto } from '$app/navigation';
import { Modal } from 'flowbite-svelte';
import { Settings, X, Info } from '@lucide/svelte';
import {
ae_snip,
ae_loc,
ae_sess,
ae_api,
ae_trig,
slct,
slct_trigger
ae_api
} from '$lib/stores/ae_stores';
import {
events_loc,
events_sess,
events_slct,
events_trigger,
events_trig_kv
events_slct
} from '$lib/stores/ae_events_stores';
import { events_func } from '$lib/ae_events_functions';
import { api } from '$lib/api/api';
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 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>
<!-- New standard page specific menu 2025-06-20 -->
<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
hide={false}
event_id={$lq__event_presenter_obj?.event_id}
events__reports={$lq__event_presenter_obj?.event_id &&
$ae_loc.trusted_access}
events__reports={$lq__event_presenter_obj?.event_id && $ae_loc.trusted_access}
events__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}
/>
<span
class="ae_menu__object_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
>
<!-- Button to toggle between the regular presenter view and managing presenter files -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_content__presenter_view ==
'manage_files'
) {
$events_loc.pres_mgmt.show_content__presenter_view =
null;
} 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>
<span 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
type="button"
onclick={() => (show_modal = true)}
class="btn btn-sm ae_btn_info"
title="Presenter options"
>
<Settings size="1em" class="mr-1" />
Options
</button>
{/if}
<!-- Button to toggle between showing and not showing the extended options menu -->
<!-- Help toggle -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__presenter == 'options'
) {
$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'}
onclick={() => (show_help = !show_help)}
class="btn btn-sm"
class:ae_btn_info_filled={show_help}
class:ae_btn_info={!show_help}
title="Help and information about the presenter"
>
<span class="fas fa-question-circle m-1"></span>
{#if $events_loc.pres_mgmt.show_menu__presenter == 'help'}
Hide Help?
{:else}
Help?
{/if}
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</button>
</span>
<!-- Presenter agreement action (shown when require__presenter_agree is on) -->
{#if $events_loc.pres_mgmt?.require__presenter_agree}
<span
class="ae_menu__action_options flex flex-row items-center justify-around"
>
<span class="ae_menu__action_options flex flex-row items-center justify-around">
{#if $lq__event_presenter_obj?.agree}
<!-- {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[$lq__event_presenter_obj.event_presenter_id]} -->
<button
type="button"
disabled={!$ae_loc.trusted_access &&
!$events_loc.auth__kv.presenter[
$lq__event_presenter_obj
?.event_presenter_id
]}
disabled={!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]}
onclick={() => {
$events_slct.event_presentation_id =
$lq__event_presenter_obj?.event_presentation_id_random;
// $events_slct.event_presentation_obj = $events_slct.event_presentation_obj;
$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;
$events_slct.event_presentation_id = $lq__event_presenter_obj?.event_presentation_id_random;
$events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id;
$events_loc.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"
title="Agreed to terms and conditions"
>
<span
class="fas fa-check text-green-500 px-1"
title="Agreed to terms and conditions"
></span>
<span> Agreed </span>
<span class="fas fa-check text-green-500 px-1"></span>
Agreed
</button>
{:else}
<button
type="button"
disabled={!$ae_loc.trusted_access &&
!$events_loc.auth__kv.presenter[
$lq__event_presenter_obj
?.event_presenter_id
]}
disabled={!$ae_loc.trusted_access && !$events_loc.auth__kv.presenter[$lq__event_presenter_obj?.event_presenter_id]}
onclick={() => {
$events_slct.event_presentation_id =
$lq__event_presenter_obj?.event_presentation_id_random;
// $events_slct.event_presentation_obj = $events_slct.event_presentation_obj;
$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;
$events_slct.event_presentation_id = $lq__event_presenter_obj?.event_presentation_id_random;
$events_slct.event_presenter_id = $lq__event_presenter_obj?.event_presenter_id;
$events_loc.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"
title="View terms and conditions"
>
<span
class="fas fa-times bg-red-500 text-white px-1 mx-1"
title="Not agreed to terms and conditions"
></span>
<span> Not yet agreed </span>
<span class="fas fa-times bg-red-500 text-white px-1 mx-1"></span>
Not yet agreed
</button>
{/if}
</span>
{/if}
</div>
<!-- END: The menu button options -->
<!-- BEGIN: The expanded menu area for information and options -->
<div
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"
class:hidden={$events_loc.pres_mgmt.show_menu__presenter != 'options'}
<!-- Options Modal -->
<Modal
bind:open={show_modal}
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
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: { priority: !$lq__event_presenter_obj?.priority } });
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_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
{#snippet header()}
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
<Settings size="1.1em" class="text-primary-500" />
Presenter 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>
{:else if $ae_loc.trusted_access}
<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 = {};
{/snippet}
goto(
`/events/${$lq__event_presenter_obj.event_id}/session/${$lq__event_presenter_obj.event_session_id}`
);
});
}}
class="btn btn-sm mx-1 ae_btn_warning"
title="Disable record"
>
<span class="fas fa-minus mx-1"></span>
Delete
</button>
{/if}
{#if $ae_loc.administrator_access}
{#if $events_loc.pres_mgmt.show_content__presenter_qr}
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr = false;
}}
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>
<div class="flex flex-col gap-4 p-4">
<!-- 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">
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr =
!$events_loc.pres_mgmt.show_content__presenter_qr;
}}
class="btn btn-sm"
class:ae_btn_surface={$events_loc.pres_mgmt.show_content__presenter_qr}
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.show_content__presenter_qr}
>
<span class="fas fa-qrcode mr-1"></span>
{$events_loc.pres_mgmt.show_content__presenter_qr ? 'Hide QR Code' : 'Show QR Code'}
</button>
</div>
</section>
{/if}
{/if}
{#if $ae_loc.trusted_access}
{#if $ae_loc.edit_mode}
<button
type="button"
onclick={() => {
$ae_loc.edit_mode = false;
}}
class="btn btn-sm ae_btn_warning"
>
<!-- <span class="fas fa-toggle-on m-1"></span> -->
<span class="fas fa-edit m-1"></span>
Edit Mode On
</button>
{:else}
<button
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>
<!-- Edit Mode -->
{#if $ae_loc.trusted_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Mode</h4>
<button
type="button"
onclick={() => ($ae_loc.edit_mode = !$ae_loc.edit_mode)}
class="btn btn-sm"
class:ae_btn_warning={$ae_loc.edit_mode}
class:ae_btn_warning_outlined={!$ae_loc.edit_mode}
>
<span class="fas fa-edit mr-1"></span>
{$ae_loc.edit_mode ? 'Edit Mode On' : 'Edit Mode?'}
</button>
</section>
{/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
ds_code="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"
show_edit={false}
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>
<!-- End of the new standard page specific menu -->

View File

@@ -6,41 +6,25 @@
let { data, lq__event_obj }: Props = $props();
import type { key_val } from '$lib/stores/ae_stores';
import {
ae_snip,
ae_loc,
ae_sess,
ae_api,
ae_trig,
slct,
slct_trigger
} from '$lib/stores/ae_stores';
import { Modal } from 'flowbite-svelte';
import { Settings, X, Info } from '@lucide/svelte';
import { ae_loc } from '$lib/stores/ae_stores';
import {
events_loc,
events_sess,
events_slct,
events_trigger,
events_trig_kv
events_slct
} 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 Comp__events_menu_nav from '../../../ae_comp__events_menu_nav.svelte';
let ae_tmp: key_val = {};
let ae_triggers: key_val = {};
let show_modal = $state(false);
let show_help = $state(false);
</script>
<!-- New standard page specific menu 2024-08-02 -->
<div
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"
>
<div class="pres_mgmt__event_reports ae_container_module_menu">
<div class="flex flex-row flex-wrap gap-1 items-center justify-around w-full">
<Comp__events_menu_nav
hide={!$ae_loc.authenticated_access}
event_id={$lq__event_obj?.event_id}
@@ -49,349 +33,179 @@
events__session_search={$events_slct.event_id}
/>
<span
class="ae_menu__object_options flex flex-row items-center justify-around"
>
<!-- Button to toggle between showing and not showing the extended options menu -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__event_reports ==
'options'
) {
$events_loc.pres_mgmt.show_menu__event_reports = null;
} else {
$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>
<span class="ae_menu__object_options flex flex-row items-center justify-around">
<!-- Options modal trigger -->
{#if $ae_loc.trusted_access}
<button
type="button"
onclick={() => (show_modal = true)}
class="btn btn-sm ae_btn_info"
title="Report options"
>
<Settings size="1em" class="mr-1" />
Options
</button>
{/if}
<!-- Help toggle -->
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.show_menu__event_reports == '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'}
onclick={() => (show_help = !show_help)}
class="btn btn-sm"
class:ae_btn_info_filled={show_help}
class:ae_btn_info={!show_help}
title="Help and information about the reports"
>
<span class="fas fa-question-circle mx-1"></span>
{#if $events_loc.pres_mgmt.show_menu__event_reports == 'help'}
Hide Help?
{:else}
Help?
{/if}
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</button>
</span>
</div>
<!-- END: The menu button options -->
<!-- BEGIN: The expanded menu area for information and options -->
<div
class="
flex flex-row items-center justify-around
w-full
p-2 rounded-md
bg-blue-100 hover:bg-blue-200
dark:bg-blue-900 hover:dark:bg-blue-800
border border-blue-200 hover:border-blue-400
"
class:hidden={$events_loc.pres_mgmt.show_menu__event_reports !=
'options'}
<!-- Options Modal -->
<Modal
bind:open={show_modal}
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"
>
{#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-end w-56">
<!-- Max presenters select options -->
<span class="flex flex-row gap-1 items-center justify-around">
<label
class="text-sm w-32 text-right"
for="qry_limit__presenters"
>
Max presenters:
</label>
<select
id="qry_limit__presenters"
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
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>
{#snippet header()}
<h3 class="flex-1 flex items-center gap-2 text-base font-bold">
<Settings size="1.1em" class="text-primary-500" />
Report 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}
<!-- Max sessions select options -->
<span class="flex flex-row gap-1 items-center justify-around">
<label
class="text-sm w-32 text-right"
for="qry_limit__sessions"
>
Max sessions:
</label>
<select
id="qry_limit__sessions"
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
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__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 class="flex flex-col gap-4 p-4">
<!-- Query limits -->
{#if $ae_loc.authenticated_access}
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Query Limits</h4>
<div class="flex flex-col gap-2">
<span class="flex flex-row gap-2 items-center">
<label class="text-sm w-32 text-right" for="qry_limit__presenters">Max presenters:</label>
<select
id="qry_limit__presenters"
bind:value={$events_loc.pres_mgmt.qry_limit__presenters}
class="select w-20 text-sm"
>
<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 files select options -->
<span class="flex flex-row gap-1 items-center justify-around">
<label
class="text-sm w-32 text-right"
for="qry_limit__files"
>
Max files:
</label>
<select
id="qry_limit__files"
bind:value={$events_loc.pres_mgmt.qry_limit__files}
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__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}
<span class="flex flex-row gap-2 items-center">
<label class="text-sm w-32 text-right" for="qry_limit__sessions">Max sessions:</label>
<select
id="qry_limit__sessions"
bind:value={$events_loc.pres_mgmt.qry_limit__sessions}
class="select w-20 text-sm"
>
<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>
{#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-center">
<!-- Button to toggle between the showing additional hidden download buttons -->
{#if $events_loc.pres_mgmt.show__direct_download}
<button
type="button"
onclick={() => {
$events_loc.pres_mgmt.show__direct_download =
!$events_loc.pres_mgmt.show__direct_download;
}}
class="btn btn-sm preset-tonal-success border border-success-500"
title="Hide additional direct download and copy link buttons?"
>
<span class="fas fa-eye-slash m-1"></span>
Hide Download Buttons?
</button>
{:else}
<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}
<span class="flex flex-row gap-2 items-center">
<label class="text-sm w-32 text-right" for="qry_limit__files">Max files:</label>
<select
id="qry_limit__files"
bind:value={$events_loc.pres_mgmt.qry_limit__files}
class="select w-20 text-sm"
>
<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>
</section>
<!-- Button to toggle between the showing hidden sessions -->
{#if $events_loc.pres_mgmt.qry_hidden == 'all'}
<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-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'}
<!-- Visibility filters -->
<section>
<h4 class="text-xs font-semibold uppercase tracking-wider text-surface-500 mb-2">Filters</h4>
<div class="flex flex-col gap-1">
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.qry_enabled == 'all'
) {
$events_loc.pres_mgmt.qry_enabled =
'enabled';
} else {
$events_loc.pres_mgmt.qry_enabled = 'all';
}
$events_loc.pres_mgmt.show__direct_download =
!$events_loc.pres_mgmt.show__direct_download;
}}
class="btn btn-sm preset-tonal-success border border-success-500"
title="Hide disabled sessions?"
class="btn btn-sm justify-between w-full"
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>
Hide Disabled Sessions?
<span class="fas {$events_loc.pres_mgmt.show__direct_download ? 'fa-eye-slash' : 'fa-eye'} mr-1"></span>
{$events_loc.pres_mgmt.show__direct_download ? 'Hide Download Buttons?' : 'Show Download Buttons?'}
</button>
{:else}
<button
type="button"
onclick={() => {
if (
$events_loc.pres_mgmt.qry_enabled == 'all'
) {
$events_loc.pres_mgmt.qry_enabled =
'enabled';
} else {
$events_loc.pres_mgmt.qry_enabled = 'all';
}
$events_loc.pres_mgmt.qry_hidden =
$events_loc.pres_mgmt.qry_hidden === 'all' ? 'not_hidden' : 'all';
}}
class="btn btn-sm preset-tonal-warning border border-warning-500"
title="Show disabled sessions?"
class="btn btn-sm justify-between w-full"
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>
Show All (Disabled) Sessions?
<span class="fas {$events_loc.pres_mgmt.qry_hidden === 'all' ? 'fa-eye-slash' : 'fa-eye'} mr-1"></span>
{$events_loc.pres_mgmt.qry_hidden === 'all' ? 'Hide Hidden Sessions?' : 'Show Hidden Sessions?'}
</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
ds_code="events__pres_mgmt__reports_help"
ds_name="Default: Events - Pres Mgmt Event Reports Help"
ds_type="html"
for_type="event"
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_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>
<!-- End of the new standard page specific menu -->

View File

@@ -15,7 +15,7 @@
import { goto } from '$app/navigation';
import { Modal } from 'flowbite-svelte';
import { Settings, X, HelpCircle } from '@lucide/svelte';
import { Settings, X, Info } from '@lucide/svelte';
import {
ae_loc,
@@ -120,7 +120,7 @@
class:ae_btn_info={!show_help}
title="Help and information about the session"
>
<HelpCircle size="1em" class="mr-1" />
<Info size="1em" class="mr-1" />
{show_help ? 'Hide Help' : 'Help'}
</button>
</span>