From f26416de22a87b9505e1846f165c1ae44bd27af3 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 12 Mar 2026 17:21:56 -0400 Subject: [PATCH] =?UTF-8?q?Badges:=20print=20centering=20via=20display:con?= =?UTF-8?q?tents=20=E2=80=94=20collapse=20wrappers,=20body=20as=20flex=20c?= =?UTF-8?q?enter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/ae_elements/AE_Record_Controls.svelte | 4 +- .../badges/[badge_id]/print/+page.svelte | 75 +- .../(launcher)/launcher/+page.svelte | 3 +- .../(pres_mgmt)/event_page_menu.svelte | 684 ++++++------------ .../location_page_menu.svelte | 643 ++++++---------- .../locations/locations_page_menu.svelte | 330 ++++----- .../[presenter_id]/presenter_page_menu.svelte | 515 ++++--------- .../reports/event_reports_page_menu.svelte | 484 ++++--------- .../[session_id]/session_page_menu.svelte | 4 +- 9 files changed, 891 insertions(+), 1851 deletions(-) diff --git a/src/lib/ae_elements/AE_Record_Controls.svelte b/src/lib/ae_elements/AE_Record_Controls.svelte index 50451671..08ad9216 100644 --- a/src/lib/ae_elements/AE_Record_Controls.svelte +++ b/src/lib/ae_elements/AE_Record_Controls.svelte @@ -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}" > - + {/if} diff --git a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/print/+page.svelte b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/print/+page.svelte index 129427c9..32f0d3c6 100644 --- a/src/routes/events/[event_id]/(badges)/badges/[badge_id]/print/+page.svelte +++ b/src/routes/events/[event_id]/(badges)/badges/[badge_id]/print/+page.svelte @@ -147,69 +147,82 @@ it in the compiled layout CSS files. --> - + 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 , 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. --> + {#if $lq__event_badge_template_obj?.layout === 'badge_3.5x5.5_pvc'} {:else if $lq__event_badge_template_obj?.layout === 'badge_4x5_fanfold'} {:else} {/if} diff --git a/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte b/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte index dc2005b4..ab386902 100644 --- a/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte +++ b/src/routes/events/[event_id]/(launcher)/launcher/+page.svelte @@ -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({ diff --git a/src/routes/events/[event_id]/(pres_mgmt)/event_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/event_page_menu.svelte index 569e1284..bf695daf 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/event_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/event_page_menu.svelte @@ -1,29 +1,22 @@ -
- -
+
+ - - + + - + + {#if $ae_loc.trusted_access} + + {/if} + + - - - - - - No action options here yet.
- - -
+ -
-

- Æ Event Menu Options -

+ {#snippet header()} +

+ + Event Options +

+ + {/snippet} -
-
- +
+ +
+

Display

+
+ + + + + + + + + +
+
-
- + + {#if $ae_loc.administrator_access} +
+

Event Record

+ +
+ {/if} - - - - - - - - - - {#if $ae_loc.manager_access} - - {:else if $ae_loc.manager_access} - - {/if} -
-
+ + {#if $ae_loc.authenticated_access} +
+

Query Options

+ +
+ {/if}
+ -
- - - - - - - - - - - - - - - - - -
- - -
- - + - -
- -
- diff --git a/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/location_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/location_page_menu.svelte index b243def7..cfb73c36 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/location_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/location/[event_location_id]/location_page_menu.svelte @@ -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`); + } -
- -
+
+ - - - + + + {#if $ae_loc.trusted_access} + + {/if} + - - - -
- - -
+ - + {/snippet} + +
+ + {#if $ae_loc.administrator_access} +
+

Display Links

+
+ + + + + + + + + + +
+
{/if} - - + + +
+ {/if} - - - - - - - - - {#if $ae_loc.administrator_access} -
- - - - - - - - - - - - {#if $events_loc.pres_mgmt.show_content__session_files} - - {:else} - - {/if} - - {#if $events_loc.pres_mgmt.show_content__session_presentations} - - {:else} - - {/if} -
- {/if} - - {#if $ae_loc?.trusted_access} -
- {#if $ae_loc?.edit_mode} - - {:else} - - {/if} - - {#if $ae_loc?.adv_mode} - - {:else} - - {/if} -
- {/if} -
- +
+ + - -
- -
- diff --git a/src/routes/events/[event_id]/(pres_mgmt)/locations/locations_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/locations/locations_page_menu.svelte index d7cfebae..53316872 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/locations/locations_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/locations/locations_page_menu.svelte @@ -1,45 +1,30 @@ - -
- -
+
+
+ - - - + + + {#if $ae_loc.trusted_access} + + {/if} +
- - -
+ - - - + {#snippet header()} +

+ + Locations Display Options +

+ + {/snippet} - - +
+
+

Content

+
+ + +
+
- - +
+

Show Codes

+
+ - - - -
- + + +
+ +
+ + + - -
- -
- diff --git a/src/routes/events/[event_id]/(pres_mgmt)/presenter/[presenter_id]/presenter_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/presenter/[presenter_id]/presenter_page_menu.svelte index b5c85382..528b5c59 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/presenter/[presenter_id]/presenter_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/presenter/[presenter_id]/presenter_page_menu.svelte @@ -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}`); + } -
- -
+
+ - - - + + + {#if $ae_loc.trusted_access} + + {/if} - + - - + {#if $events_loc.pres_mgmt?.require__presenter_agree} - + {#if $lq__event_presenter_obj?.agree} - {:else} {/if} {/if}
- - -
+ - - - - - - - - - - - - {#if $ae_loc.manager_access} - - {:else if $ae_loc.trusted_access} - - {/if} - - {#if $ae_loc.administrator_access} - {#if $events_loc.pres_mgmt.show_content__presenter_qr} - - {:else} - +
+ + {#if $ae_loc.administrator_access} +
+

Display

+
+ +
+
{/if} - {/if} - {#if $ae_loc.trusted_access} - {#if $ae_loc.edit_mode} - - {:else} - + + {#if $ae_loc.trusted_access} +
+

Mode

+ +
{/if} - {/if} -
- + + {#if $ae_loc.trusted_access} +
+

Record

+ +
+ {/if} +
+ + + - -
- -
- diff --git a/src/routes/events/[event_id]/(pres_mgmt)/reports/event_reports_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/reports/event_reports_page_menu.svelte index c71a6f80..f51e3bea 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/reports/event_reports_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/reports/event_reports_page_menu.svelte @@ -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); - -
- -
+
+
+ - - - + + + {#if $ae_loc.trusted_access} + + {/if} +
- - -
+ - {#if $ae_loc.authenticated_access} -
- - - - - + {#snippet header()} +

+ + Report Options +

+ + {/snippet} - - - - - +
+ + {#if $ae_loc.authenticated_access} +
+

Query Limits

+
+ + + + - - - - - -
- {/if} + + + + - {#if $ae_loc.authenticated_access} -
- - {#if $events_loc.pres_mgmt.show__direct_download} - - {:else} - - {/if} + + + + +
+
- - {#if $events_loc.pres_mgmt.qry_hidden == 'all'} - - {:else} - - {/if} - - {#if $ae_loc.manager_access} - {#if $events_loc.pres_mgmt.qry_enabled == 'all'} + +
+

Filters

+
- {:else} + - {/if} - {/if} -
- {/if} -
- + {#if $ae_loc.manager_access} + + {/if} +
+ + {/if} +
+ + + - -
- -
- diff --git a/src/routes/events/[event_id]/(pres_mgmt)/session/[session_id]/session_page_menu.svelte b/src/routes/events/[event_id]/(pres_mgmt)/session/[session_id]/session_page_menu.svelte index cdb9c6b0..0c0fa040 100644 --- a/src/routes/events/[event_id]/(pres_mgmt)/session/[session_id]/session_page_menu.svelte +++ b/src/routes/events/[event_id]/(pres_mgmt)/session/[session_id]/session_page_menu.svelte @@ -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" > - + {show_help ? 'Hide Help' : 'Help'}