refactor: standardize event file actions and apply batch formatting

- Updated 'create_event_file_obj_from_hosted_file_async' to use the modern V3 action endpoint.
- Standardized 'prevent_default' helper names in root Event and Archive components.
- Applied batch formatting (printWidth: 80) across the settings and events modules.
This commit is contained in:
Scott Idem
2026-02-06 16:17:31 -05:00
parent 433862ad00
commit d21e2f8e6f
20 changed files with 846 additions and 453 deletions

View File

@@ -133,11 +133,21 @@ export async function create_event_file_obj_from_hosted_file_async({
log_lvl?: number; log_lvl?: number;
}) { }) {
if (!hosted_file_id) return false; if (!hosted_file_id) return false;
const endpoint = `/event/file/from_hosted_file/${hosted_file_id}`;
// Use V3 endpoint for creation from hosted file
const endpoint = `/v3/action/event_file/from_hosted_file/${hosted_file_id}`;
const query_params = { ...params }; const query_params = { ...params };
if (return_obj) query_params['return_obj'] = true; if (return_obj) query_params['return_obj'] = true;
if (inc_hosted_file) query_params['inc_hosted_file'] = true; if (inc_hosted_file) query_params['inc_hosted_file'] = true;
const result = await api.post_object({ api_cfg, endpoint, params: query_params, data, log_lvl });
const result = await api.post_object({
api_cfg,
endpoint,
params: query_params,
data,
log_lvl
});
if (return_obj) return result; if (return_obj) return result;
return result?.event_file_id || result?.id || result?.event_file_id_random; return result?.event_file_id || result?.id || result?.event_file_id_random;
} }

View File

@@ -8,7 +8,13 @@
// *** Import other supporting libraries // *** Import other supporting libraries
// import * as icons from '@lucide/svelte'; // import * as icons from '@lucide/svelte';
import { Brain, House, Library, RefreshCw, Satellite } from '@lucide/svelte'; import {
Brain,
House,
Library,
RefreshCw,
Satellite
} from '@lucide/svelte';
// *** Import Aether specific variables and functions // *** Import Aether specific variables and functions
import type { key_val } from '$lib/stores/ae_stores'; import type { key_val } from '$lib/stores/ae_stores';
@@ -76,7 +82,9 @@
function scroll_container() { function scroll_container() {
return ( return (
document.getElementById('ae_main_content') || document.documentElement || document.body document.getElementById('ae_main_content') ||
document.documentElement ||
document.body
); );
} }
@@ -121,10 +129,10 @@
</title> </title>
</svelte:head> </svelte:head>
{#if $events_loc?.ver && $events_loc?.ver !== $events_sess?.ver} {#if $events_loc?.ver && $events_loc?.ver !== $events_sess?.ver}
<div class="fixed inset-0 bg-pink-100/80 z-40"> <div class="fixed inset-0 bg-pink-100/80 z-40">
<button type="button" <button
type="button"
class=" class="
fixed top-16 left-0 right-0 z-50 p-4 m-8 sm:mx-16 md:mx-32 fixed top-16 left-0 right-0 z-50 p-4 m-8 sm:mx-16 md:mx-32
btn btn-lg rounded-2xl btn btn-lg rounded-2xl
@@ -148,7 +156,9 @@
localStorage.clear(); localStorage.clear();
sessionStorage.clear(); sessionStorage.clear();
alert('The page will now reload. You may need to sign in again.'); alert(
'The page will now reload. You may need to sign in again.'
);
await goto('/', { invalidateAll: true }); await goto('/', { invalidateAll: true });
@@ -160,7 +170,9 @@
<span class="m-4 sm:mx-8 text-wrap"> <span class="m-4 sm:mx-8 text-wrap">
New Events Module Version Available!<br /> New Events Module Version Available!<br />
Click to Reload<br /> Click to Reload<br />
<div class="italic text-base">You may need to sign in again.</div> <div class="italic text-base">
You may need to sign in again.
</div>
</span> </span>
<span class="fas fa-sync-alt fa-spin m-1"></span> <span class="fas fa-sync-alt fa-spin m-1"></span>
@@ -219,14 +231,17 @@
> >
<span class="justify-self-start"> <span class="justify-self-start">
<!-- Be sure to explain what &AElig; (Aether) means in the title text or similar! --> <!-- Be sure to explain what &AElig; (Aether) means in the title text or similar! -->
<Satellite size="1.5em" class="mx-1 inline-block text-gray-500" /> <Satellite
size="1.5em"
class="mx-1 inline-block text-gray-500"
/>
<abbr title="Aether - Events Module"> Æ Events </abbr> <abbr title="Aether - Events Module"> Æ Events </abbr>
</span> </span>
{#if !$ae_sess?.disable_sys_header} {#if !$ae_sess?.disable_sys_header}
<Element_data_store <Element_data_store
ds_code="hub__site__appshell_header" ds_code="hub__site__appshell_header"
ds_type="html" ds_type="html"
/> />
{/if} {/if}
<a <a
href="/" href="/"
@@ -269,7 +284,8 @@
" "
> >
<!-- Scroll to top button --> <!-- Scroll to top button -->
<button type="button" <button
type="button"
class=" class="
ae_btn_success_outlined ae_btn_success_outlined
@@ -298,7 +314,8 @@
</button> </button>
<!-- Scroll to bottom button --> <!-- Scroll to bottom button -->
<button type="button" <button
type="button"
class=" class="
ae_btn_success_outlined ae_btn_success_outlined

View File

@@ -6,8 +6,18 @@
import { liveQuery } from 'dexie'; import { liveQuery } from 'dexie';
import { db_events } from '$lib/ae_events/db_events'; import { db_events } from '$lib/ae_events/db_events';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/stores/ae_stores'; import {
import { events_loc, events_slct, events_trigger } from '$lib/stores/ae_events_stores'; ae_loc,
ae_sess,
ae_api,
slct,
slct_trigger
} from '$lib/stores/ae_stores';
import {
events_loc,
events_slct,
events_trigger
} from '$lib/stores/ae_events_stores';
import { ae_util } from '$lib/ae_utils/ae_utils'; import { ae_util } from '$lib/ae_utils/ae_utils';
import { page } from '$app/stores'; import { page } from '$app/stores';
@@ -60,17 +70,22 @@
}); });
</script> </script>
<h2 class="h3">
<h2 class="h3">Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}</h2> Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}
</h2>
{#if $ae_loc.administrator_access} {#if $ae_loc.administrator_access}
<h3 class="h4">Administrator Access - Technical Support</h3> <h3 class="h4">Administrator Access - Technical Support</h3>
<p> <p>
You are accessing the presentation management system with "administrator" level permissions. You are accessing the presentation management system with
"administrator" level permissions.
</p> </p>
{:else if $ae_loc.trusted_access} {:else if $ae_loc.trusted_access}
<h3 class="h4">Trusted Access - Staff</h3> <h3 class="h4">Trusted Access - Staff</h3>
<p>You are accessing the presentation management system with "trusted" level permissions.</p> <p>
You are accessing the presentation management system with "trusted"
level permissions.
</p>
{:else if !$ae_loc.trusted_access} {:else if !$ae_loc.trusted_access}
<h3 class="h4">Restricted Access</h3> <h3 class="h4">Restricted Access</h3>
<p>You access to the presentation management system is limited.</p> <p>You access to the presentation management system is limited.</p>
@@ -99,12 +114,13 @@
/> --> /> -->
{#if $lq__event_obj_li} {#if $lq__event_obj_li}
{#if $lq__event_obj_li.length} {#if $lq__event_obj_li.length}
<ul class="space-y-2"> <ul class="space-y-2">
{#each $lq__event_obj_li as event_obj} {#each $lq__event_obj_li as event_obj}
<li class:dim={event_obj?.hide}> <li class:dim={event_obj?.hide}>
<span class="w-full flex flex-row gap-1 items-center justify-between"> <span
class="w-full flex flex-row gap-1 items-center justify-between"
>
<!-- We do not want to show events more than 8 months old. --> <!-- We do not want to show events more than 8 months old. -->
{#if new Date(event_obj.start_datetime ?? '').getTime() > new Date().getTime() - 1000 * 60 * 60 * 24 * 30 * 8 || $ae_loc.trusted_access} {#if new Date(event_obj.start_datetime ?? '').getTime() > new Date().getTime() - 1000 * 60 * 60 * 24 * 30 * 8 || $ae_loc.trusted_access}
<span> <span>
@@ -131,7 +147,9 @@
{/if} {/if}
</span> </span>
<span class="w-full flex flex-row gap-1 items-center justify-evenly"> <span
class="w-full flex flex-row gap-1 items-center justify-evenly"
>
{#if $ae_loc.authenticated_access} {#if $ae_loc.authenticated_access}
<a <a
data-sveltekit-reload data-sveltekit-reload
@@ -178,12 +196,18 @@
{/each} {/each}
</ul> </ul>
<div class="flex justify-center items-center space-x-4 mt-4"> <div class="flex justify-center items-center space-x-4 mt-4">
<button type="button" class="btn btn-sm" onclick={prev_page} disabled={current_page === 1} <button
>Previous</button type="button"
class="btn btn-sm"
onclick={prev_page}
disabled={current_page === 1}>Previous</button
> >
<span>Page {current_page} of {total_pages}</span> <span>Page {current_page} of {total_pages}</span>
<button type="button" class="btn btn-sm" onclick={next_page} disabled={current_page === total_pages} <button
>Next</button type="button"
class="btn btn-sm"
onclick={next_page}
disabled={current_page === total_pages}>Next</button
> >
</div> </div>
{:else} {:else}

View File

@@ -30,7 +30,9 @@
// Guard: Only allow administrators in edit mode // Guard: Only allow administrators in edit mode
if (!$ae_loc.administrator_access || !$ae_loc.edit_mode) { if (!$ae_loc.administrator_access || !$ae_loc.edit_mode) {
if (browser) { if (browser) {
alert('Access Denied: Administrative privileges and Edit Mode required.'); alert(
'Access Denied: Administrative privileges and Edit Mode required.'
);
goto(`/events/${event_id}`); goto(`/events/${event_id}`);
} }
} }
@@ -53,7 +55,8 @@
if (field_name === 'basic_fields') { if (field_name === 'basic_fields') {
data_kv = data; data_kv = data;
} else { } else {
const data_to_save = typeof data === 'string' ? JSON.parse(data) : data; const data_to_save =
typeof data === 'string' ? JSON.parse(data) : data;
data_kv = { [field_name]: data_to_save }; data_kv = { [field_name]: data_to_save };
} }
@@ -66,7 +69,9 @@
alert('Settings saved successfully!'); alert('Settings saved successfully!');
} catch (error) { } catch (error) {
console.error('Error saving settings:', error); console.error('Error saving settings:', error);
alert('Failed to save settings. Please check if the JSON is valid.'); alert(
'Failed to save settings. Please check if the JSON is valid.'
);
} }
} }
</script> </script>
@@ -76,16 +81,27 @@
{#if event_obj} {#if event_obj}
<div class="space-y-4"> <div class="space-y-4">
<details class="details" open> <details class="details" open>
<summary class="summary font-bold text-error-500">Admin Tools</summary> <summary class="summary font-bold text-error-500"
>Admin Tools</summary
>
<div class="p-4 space-y-4"> <div class="p-4 space-y-4">
<div class="card p-4 border rounded-md text-center"> <div class="card p-4 border rounded-md text-center">
<h4 class="h4">Badge Operations</h4> <h4 class="h4">Badge Operations</h4>
<div class="flex flex-wrap justify-center gap-2 mt-2"> <div class="flex flex-wrap justify-center gap-2 mt-2">
<button type="button" class="btn btn-primary" onclick={() => (show_create_badge_modal = true)}> <button
type="button"
class="btn btn-primary"
onclick={() => (show_create_badge_modal = true)}
>
<span class="fas fa-plus mr-2"></span> Add New Badge <span class="fas fa-plus mr-2"></span> Add New Badge
</button> </button>
<button type="button" class="btn btn-primary ml-2" onclick={() => (show_upload_badge_modal = true)}> <button
<span class="fas fa-upload mr-2"></span> Upload Badge List type="button"
class="btn btn-primary ml-2"
onclick={() => (show_upload_badge_modal = true)}
>
<span class="fas fa-upload mr-2"></span> Upload Badge
List
</button> </button>
</div> </div>
</div> </div>
@@ -103,7 +119,8 @@
href={`/events/${event_id}/badges/print_list?badge_type_code=guest&printed_status=not_printed`} href={`/events/${event_id}/badges/print_list?badge_type_code=guest&printed_status=not_printed`}
class="btn variant-filled-secondary" class="btn variant-filled-secondary"
> >
<span class="fas fa-print mr-2"></span> Print Unprinted Guests <span class="fas fa-print mr-2"></span> Print Unprinted
Guests
</a> </a>
<a <a
href={`/events/${event_id}/badges/print_list`} href={`/events/${event_id}/badges/print_list`}
@@ -125,7 +142,8 @@
href={`/events/${event_id}/badges/stats`} href={`/events/${event_id}/badges/stats`}
class="btn btn-tertiary" class="btn btn-tertiary"
> >
<span class="fas fa-chart-bar mr-2"></span> Badge Printing Stats <span class="fas fa-chart-bar mr-2"></span> Badge Printing
Stats
</a> </a>
</div> </div>
</div> </div>
@@ -145,9 +163,15 @@
<summary class="summary">General Config (cfg_json)</summary> <summary class="summary">General Config (cfg_json)</summary>
<div class="p-4"> <div class="p-4">
<div class="flex justify-end"> <div class="flex justify-end">
<button type="button" class="btn btn-sm" onclick={() => (cfg_json_view = 'form')}>Form</button <button
type="button"
class="btn btn-sm"
onclick={() => (cfg_json_view = 'form')}>Form</button
> >
<button type="button" class="btn btn-sm" onclick={() => (cfg_json_view = 'json')}>JSON</button <button
type="button"
class="btn btn-sm"
onclick={() => (cfg_json_view = 'json')}>JSON</button
> >
</div> </div>
{#if cfg_json_view === 'form'} {#if cfg_json_view === 'form'}
@@ -164,10 +188,12 @@
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) handle_save('cfg_json', event_obj.cfg_json); if (event_obj)
handle_save('cfg_json', event_obj.cfg_json);
}}>Save</button }}>Save</button
> >
{/if} {/if}
@@ -175,35 +201,52 @@
</details> </details>
<details class="details"> <details class="details">
<summary class="summary">Presentation Management (mod_pres_mgmt_json)</summary> <summary class="summary"
>Presentation Management (mod_pres_mgmt_json)</summary
>
<div class="p-4"> <div class="p-4">
<div class="flex justify-end"> <div class="flex justify-end">
<button type="button" class="btn btn-sm" onclick={() => (pres_mgmt_json_view = 'form')} <button
type="button"
class="btn btn-sm"
onclick={() => (pres_mgmt_json_view = 'form')}
>Form</button >Form</button
> >
<button type="button" class="btn btn-sm" onclick={() => (pres_mgmt_json_view = 'json')} <button
type="button"
class="btn btn-sm"
onclick={() => (pres_mgmt_json_view = 'json')}
>JSON</button >JSON</button
> >
</div> </div>
{#if pres_mgmt_json_view === 'form'} {#if pres_mgmt_json_view === 'form'}
<Ae_comp_event_settings_pres_mgmt_form <Ae_comp_event_settings_pres_mgmt_form
bind:mod_pres_mgmt_json={event_obj.mod_pres_mgmt_json} bind:mod_pres_mgmt_json={event_obj.mod_pres_mgmt_json}
onsave={(data: any) => handle_save('mod_pres_mgmt_json', data)} onsave={(data: any) =>
handle_save('mod_pres_mgmt_json', data)}
/> />
{:else} {:else}
<AE_Comp_Editor_CodeMirror <AE_Comp_Editor_CodeMirror
readonly={false} readonly={false}
content={JSON.stringify(event_obj.mod_pres_mgmt_json, null, 4)} content={JSON.stringify(
event_obj.mod_pres_mgmt_json,
null,
4
)}
bind:new_content={event_obj.mod_pres_mgmt_json} bind:new_content={event_obj.mod_pres_mgmt_json}
show_line_numbers={true} show_line_numbers={true}
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) if (event_obj)
handle_save('mod_pres_mgmt_json', event_obj.mod_pres_mgmt_json); handle_save(
'mod_pres_mgmt_json',
event_obj.mod_pres_mgmt_json
);
}}>Save</button }}>Save</button
> >
{/if} {/if}
@@ -214,31 +257,45 @@
<summary class="summary">Badges (mod_badges_json)</summary> <summary class="summary">Badges (mod_badges_json)</summary>
<div class="p-4"> <div class="p-4">
<div class="flex justify-end"> <div class="flex justify-end">
<button type="button" class="btn btn-sm" onclick={() => (badges_json_view = 'form')} <button
>Form</button type="button"
class="btn btn-sm"
onclick={() => (badges_json_view = 'form')}>Form</button
> >
<button type="button" class="btn btn-sm" onclick={() => (badges_json_view = 'json')} <button
>JSON</button type="button"
class="btn btn-sm"
onclick={() => (badges_json_view = 'json')}>JSON</button
> >
</div> </div>
{#if badges_json_view === 'form'} {#if badges_json_view === 'form'}
<Ae_comp_event_settings_badges_form <Ae_comp_event_settings_badges_form
bind:mod_badges_json={event_obj.mod_badges_json} bind:mod_badges_json={event_obj.mod_badges_json}
onsave={(data: any) => handle_save('mod_badges_json', data)} onsave={(data: any) =>
handle_save('mod_badges_json', data)}
/> />
{:else} {:else}
<AE_Comp_Editor_CodeMirror <AE_Comp_Editor_CodeMirror
readonly={false} readonly={false}
content={JSON.stringify(event_obj.mod_badges_json, null, 4)} content={JSON.stringify(
event_obj.mod_badges_json,
null,
4
)}
bind:new_content={event_obj.mod_badges_json} bind:new_content={event_obj.mod_badges_json}
show_line_numbers={true} show_line_numbers={true}
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) handle_save('mod_badges_json', event_obj.mod_badges_json); if (event_obj)
handle_save(
'mod_badges_json',
event_obj.mod_badges_json
);
}}>Save</button }}>Save</button
> >
{/if} {/if}
@@ -249,32 +306,47 @@
<summary class="summary">Abstracts (mod_abstracts_json)</summary> <summary class="summary">Abstracts (mod_abstracts_json)</summary>
<div class="p-4"> <div class="p-4">
<div class="flex justify-end"> <div class="flex justify-end">
<button type="button" class="btn btn-sm" onclick={() => (abstracts_json_view = 'form')} <button
type="button"
class="btn btn-sm"
onclick={() => (abstracts_json_view = 'form')}
>Form</button >Form</button
> >
<button type="button" class="btn btn-sm" onclick={() => (abstracts_json_view = 'json')} <button
type="button"
class="btn btn-sm"
onclick={() => (abstracts_json_view = 'json')}
>JSON</button >JSON</button
> >
</div> </div>
{#if abstracts_json_view === 'form'} {#if abstracts_json_view === 'form'}
<Ae_comp_event_settings_abstracts_form <Ae_comp_event_settings_abstracts_form
bind:mod_abstracts_json={event_obj.mod_abstracts_json} bind:mod_abstracts_json={event_obj.mod_abstracts_json}
onsave={(data: any) => handle_save('mod_abstracts_json', data)} onsave={(data: any) =>
handle_save('mod_abstracts_json', data)}
/> />
{:else} {:else}
<AE_Comp_Editor_CodeMirror <AE_Comp_Editor_CodeMirror
readonly={false} readonly={false}
content={JSON.stringify(event_obj.mod_abstracts_json, null, 4)} content={JSON.stringify(
event_obj.mod_abstracts_json,
null,
4
)}
bind:new_content={event_obj.mod_abstracts_json} bind:new_content={event_obj.mod_abstracts_json}
show_line_numbers={true} show_line_numbers={true}
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) if (event_obj)
handle_save('mod_abstracts_json', event_obj.mod_abstracts_json); handle_save(
'mod_abstracts_json',
event_obj.mod_abstracts_json
);
}}>Save</button }}>Save</button
> >
{/if} {/if}
@@ -286,16 +358,25 @@
<div class="p-4"> <div class="p-4">
<AE_Comp_Editor_CodeMirror <AE_Comp_Editor_CodeMirror
readonly={false} readonly={false}
content={JSON.stringify(event_obj.mod_exhibits_json, null, 4)} content={JSON.stringify(
event_obj.mod_exhibits_json,
null,
4
)}
bind:new_content={event_obj.mod_exhibits_json} bind:new_content={event_obj.mod_exhibits_json}
show_line_numbers={true} show_line_numbers={true}
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) handle_save('mod_exhibits_json', event_obj.mod_exhibits_json); if (event_obj)
handle_save(
'mod_exhibits_json',
event_obj.mod_exhibits_json
);
}}>Save</button }}>Save</button
> >
</div> </div>
@@ -306,16 +387,25 @@
<div class="p-4"> <div class="p-4">
<AE_Comp_Editor_CodeMirror <AE_Comp_Editor_CodeMirror
readonly={false} readonly={false}
content={JSON.stringify(event_obj.mod_meetings_json, null, 4)} content={JSON.stringify(
event_obj.mod_meetings_json,
null,
4
)}
bind:new_content={event_obj.mod_meetings_json} bind:new_content={event_obj.mod_meetings_json}
show_line_numbers={true} show_line_numbers={true}
placeholder="JSON config" placeholder="JSON config"
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg" class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
/> />
<button type="button" <button
type="button"
class="btn preset-tonal-primary" class="btn preset-tonal-primary"
onclick={() => { onclick={() => {
if (event_obj) handle_save('mod_meetings_json', event_obj.mod_meetings_json); if (event_obj)
handle_save(
'mod_meetings_json',
event_obj.mod_meetings_json
);
}}>Save</button }}>Save</button
> >
</div> </div>
@@ -330,7 +420,7 @@
<div class="card p-4"> <div class="card p-4">
<h3 class="h3">Create New Badge</h3> <h3 class="h3">Create New Badge</h3>
<Comp_badge_create_form <Comp_badge_create_form
event_id={event_id} {event_id}
on:success={() => { on:success={() => {
show_create_badge_modal = false; show_create_badge_modal = false;
}} }}
@@ -345,7 +435,7 @@
<div class="card p-4"> <div class="card p-4">
<h3 class="h3">Upload Badges (CSV)</h3> <h3 class="h3">Upload Badges (CSV)</h3>
<Comp_badge_upload_form <Comp_badge_upload_form
event_id={event_id} {event_id}
on:success={() => { on:success={() => {
show_upload_badge_modal = false; show_upload_badge_modal = false;
}} }}

View File

@@ -97,5 +97,7 @@
</div> </div>
</div> </div>
<button type="button" class="btn preset-tonal-primary" onclick={save}>Save</button> <button type="button" class="btn preset-tonal-primary" onclick={save}
>Save</button
>
</div> </div>

View File

@@ -71,13 +71,21 @@
<div> <div>
<label class="label"> <label class="label">
<span>QR Type</span> <span>QR Type</span>
<input type="text" class="input" bind:value={mod_badges_json.qr_type} /> <input
type="text"
class="input"
bind:value={mod_badges_json.qr_type}
/>
</label> </label>
</div> </div>
<div> <div>
<label class="label"> <label class="label">
<span>Trusted Passcode</span> <span>Trusted Passcode</span>
<input type="text" class="input" bind:value={mod_badges_json.trusted_passcode} /> <input
type="text"
class="input"
bind:value={mod_badges_json.trusted_passcode}
/>
</label> </label>
</div> </div>
<div> <div>
@@ -92,5 +100,7 @@
</div> </div>
</div> </div>
<button type="button" class="btn preset-tonal-primary" onclick={save}>Save</button> <button type="button" class="btn preset-tonal-primary" onclick={save}
>Save</button
>
</div> </div>

View File

@@ -28,20 +28,26 @@
</div> </div>
<div> <div>
<label class="label"> <label class="label">
<input type="checkbox" class="checkbox" bind:checked={event_obj.conference} /> <input
type="checkbox"
class="checkbox"
bind:checked={event_obj.conference}
/>
<span>Conference</span> <span>Conference</span>
</label> </label>
</div> </div>
<div> <div>
<label class="label"> <label class="label">
<span>Summary</span> <span>Summary</span>
<textarea class="textarea" bind:value={event_obj.summary}></textarea> <textarea class="textarea" bind:value={event_obj.summary}
></textarea>
</label> </label>
</div> </div>
<div> <div>
<label class="label"> <label class="label">
<span>Description</span> <span>Description</span>
<textarea class="textarea" bind:value={event_obj.description}></textarea> <textarea class="textarea" bind:value={event_obj.description}
></textarea>
</label> </label>
</div> </div>
<div> <div>
@@ -53,13 +59,21 @@
<div> <div>
<label class="label"> <label class="label">
<span>Start Datetime</span> <span>Start Datetime</span>
<input type="datetime-local" class="input" bind:value={event_obj.start_datetime} /> <input
type="datetime-local"
class="input"
bind:value={event_obj.start_datetime}
/>
</label> </label>
</div> </div>
<div> <div>
<label class="label"> <label class="label">
<span>End Datetime</span> <span>End Datetime</span>
<input type="datetime-local" class="input" bind:value={event_obj.end_datetime} /> <input
type="datetime-local"
class="input"
bind:value={event_obj.end_datetime}
/>
</label> </label>
</div> </div>
<div> <div>
@@ -68,5 +82,7 @@
<textarea class="textarea" bind:value={event_obj.notes}></textarea> <textarea class="textarea" bind:value={event_obj.notes}></textarea>
</label> </label>
</div> </div>
<button type="button" class="btn preset-tonal-primary" onclick={save}>Save</button> <button type="button" class="btn preset-tonal-primary" onclick={save}
>Save</button
>
</div> </div>

View File

@@ -26,5 +26,7 @@
<input type="text" class="input" bind:value={cfg_json.med_name} /> <input type="text" class="input" bind:value={cfg_json.med_name} />
</label> </label>
</div> </div>
<button type="button" class="btn preset-tonal-primary" onclick={save}>Save</button> <button type="button" class="btn preset-tonal-primary" onclick={save}
>Save</button
>
</div> </div>

View File

@@ -140,5 +140,7 @@
</div> </div>
</div> </div>
<button type="button" class="btn preset-tonal-primary" onclick={save}>Save</button> <button type="button" class="btn preset-tonal-primary" onclick={save}
>Save</button
>
</div> </div>

View File

@@ -111,11 +111,15 @@
let csv_row = []; let csv_row = [];
csv_row.push(ae_obj_li[i].event_file_id); csv_row.push(ae_obj_li[i].event_file_id);
csv_row.push( csv_row.push(
ae_obj_li[i].filename ? `"${ae_util.clean_filename(ae_obj_li[i].filename)}"` : '' ae_obj_li[i].filename
? `"${ae_util.clean_filename(ae_obj_li[i].filename)}"`
: ''
); );
csv_row.push(ae_obj_li[i].extension ? ae_obj_li[i].extension : ''); csv_row.push(ae_obj_li[i].extension ? ae_obj_li[i].extension : '');
csv_row.push( csv_row.push(
ae_obj_li[i].file_size ? ae_util.format_bytes(ae_obj_li[i].file_size) : '' ae_obj_li[i].file_size
? ae_util.format_bytes(ae_obj_li[i].file_size)
: ''
); );
csv_row.push(ae_obj_li[i].hash_sha256.slice(0, 10) + '...'); csv_row.push(ae_obj_li[i].hash_sha256.slice(0, 10) + '...');
csv_row.push( csv_row.push(
@@ -135,8 +139,16 @@
: '' : ''
); );
csv_row.push(ae_obj_li[i].event_session_id ? ae_obj_li[i].event_session_id : ''); csv_row.push(
csv_row.push(ae_obj_li[i].event_session_code ? ae_obj_li[i].event_session_code : ''); ae_obj_li[i].event_session_id
? ae_obj_li[i].event_session_id
: ''
);
csv_row.push(
ae_obj_li[i].event_session_code
? ae_obj_li[i].event_session_code
: ''
);
csv_row.push(ae_obj_li[i].event_session_name ?? ''); csv_row.push(ae_obj_li[i].event_session_name ?? '');
csv_row.push( csv_row.push(
ae_obj_li[i].event_session_start_datetime ae_obj_li[i].event_session_start_datetime
@@ -148,7 +160,9 @@
); );
csv_row.push( csv_row.push(
ae_obj_li[i].event_presentation_id ? ae_obj_li[i].event_presentation_id : '' ae_obj_li[i].event_presentation_id
? ae_obj_li[i].event_presentation_id
: ''
); );
csv_row.push(ae_obj_li[i].event_presentation_name ?? ''); csv_row.push(ae_obj_li[i].event_presentation_name ?? '');
csv_row.push( csv_row.push(
@@ -160,10 +174,16 @@
: '' : ''
); );
csv_row.push(ae_obj_li[i].event_presenter_id ? ae_obj_li[i].event_presenter_id : ''); csv_row.push(
ae_obj_li[i].event_presenter_id
? ae_obj_li[i].event_presenter_id
: ''
);
csv_row.push(ae_obj_li[i].event_presenter_full_name ?? ''); csv_row.push(ae_obj_li[i].event_presenter_full_name ?? '');
csv_row.push( csv_row.push(
ae_obj_li[i].event_presenter_email ? ae_obj_li[i].event_presenter_email : '' ae_obj_li[i].event_presenter_email
? ae_obj_li[i].event_presenter_email
: ''
); );
csv_row.push( csv_row.push(
@@ -189,17 +209,24 @@
csv_content_str += '\n'; csv_content_str += '\n';
}); });
const blob = new Blob([csv_content_str], { type: 'text/csv;charset=utf-8;' }); const blob = new Blob([csv_content_str], {
type: 'text/csv;charset=utf-8;'
});
const obj_url = URL.createObjectURL(blob); const obj_url = URL.createObjectURL(blob);
const download_link = document.createElement('a'); const download_link = document.createElement('a');
download_link.setAttribute('href', obj_url); download_link.setAttribute('href', obj_url);
download_link.setAttribute('download', `file_list_${ae_util.iso_datetime_formatter()}.csv`); download_link.setAttribute(
'download',
`file_list_${ae_util.iso_datetime_formatter()}.csv`
);
download_link.setAttribute('style', 'display: none;'); download_link.setAttribute('style', 'display: none;');
download_link.textContent = 'Download CSV'; download_link.textContent = 'Download CSV';
// document.querySelector('body').appendChild(download_link); // document.querySelector('body').appendChild(download_link);
document.getElementById('download_csv_container').appendChild(download_link); document
.getElementById('download_csv_container')
.appendChild(download_link);
// Automatically download the file // Automatically download the file
download_link.click(); download_link.click();
@@ -216,15 +243,22 @@
> >
<!-- {#if event_file_id_random_li && $lq_kv__event_file_obj_li && $lq_kv__event_file_obj_li?.length > 0 && $lq_kv__event_file_obj_li?.length == event_file_id_random_li?.length} --> <!-- {#if event_file_id_random_li && $lq_kv__event_file_obj_li && $lq_kv__event_file_obj_li?.length > 0 && $lq_kv__event_file_obj_li?.length == event_file_id_random_li?.length} -->
{#if $lq__event_file_obj_li && $lq__event_file_obj_li?.length} {#if $lq__event_file_obj_li && $lq__event_file_obj_li?.length}
<div bind:this={horiz_check_element} id="tbl_container" class="space-y-2 pb-8"> <div
<header class="flex flex-row flex-wrap gap-1 items-center justify-between"> bind:this={horiz_check_element}
id="tbl_container"
class="space-y-2 pb-8"
>
<header
class="flex flex-row flex-wrap gap-1 items-center justify-between"
>
<h2 class="h3"> <h2 class="h3">
<span class="text-base"> Results: </span> <span class="text-base"> Results: </span>
{#if $lq__event_file_obj_li.length} {#if $lq__event_file_obj_li.length}
<span <span
class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg" class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg"
title="Count {$lq__event_file_obj_li.length ?? 'None'}" title="Count {$lq__event_file_obj_li.length ??
'None'}"
> >
<span class="fas fa-list-ol mx-4"></span> <span class="fas fa-list-ol mx-4"></span>
{$lq__event_file_obj_li.length ?? 'None'}&times; {$lq__event_file_obj_li.length ?? 'None'}&times;
@@ -236,14 +270,21 @@
class="flex flex-row flex-wrap gap-1 items-center justify-end" class="flex flex-row flex-wrap gap-1 items-center justify-end"
class:hidden={!$ae_loc.edit_mode} class:hidden={!$ae_loc.edit_mode}
> >
<button type="button" <button
type="button"
class="btn btn-sm preset-tonal-warning border border-warning-500 mb-1 generate_csv_btn" class="btn btn-sm preset-tonal-warning border border-warning-500 mb-1 generate_csv_btn"
onclick={() => { onclick={() => {
if (!confirm('Generate and download a CSV file with the file list?')) { if (
!confirm(
'Generate and download a CSV file with the file list?'
)
) {
return false; return false;
} }
let csv_data = generate_file_export_csv($lq__event_file_obj_li); let csv_data = generate_file_export_csv(
$lq__event_file_obj_li
);
console.log('CSV Data:', csv_data); console.log('CSV Data:', csv_data);
}} }}
> >
@@ -253,7 +294,8 @@
<span id="download_csv_container"></span> <span id="download_csv_container"></span>
{#if show_session_fields} {#if show_session_fields}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
show_session_fields = !show_session_fields; show_session_fields = !show_session_fields;
}} }}
@@ -266,7 +308,8 @@
Showing Session Fields Showing Session Fields
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
show_session_fields = !show_session_fields; show_session_fields = !show_session_fields;
}} }}
@@ -282,7 +325,8 @@
<!-- Show or hide the session code --> <!-- Show or hide the session code -->
{#if !hide_session_code} {#if !hide_session_code}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
hide_session_code = true; hide_session_code = true;
}} }}
@@ -293,7 +337,8 @@
Showing Session Code Showing Session Code
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
hide_session_code = false; hide_session_code = false;
}} }}
@@ -306,9 +351,11 @@
{/if} {/if}
{#if show_presentation_fields} {#if show_presentation_fields}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
show_presentation_fields = !show_presentation_fields; show_presentation_fields =
!show_presentation_fields;
}} }}
class="btn btn-sm {show_presentation_fields class="btn btn-sm {show_presentation_fields
? 'ae_btn_surface' ? 'ae_btn_surface'
@@ -319,9 +366,11 @@
Showing Presentation Fields Showing Presentation Fields
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
show_presentation_fields = !show_presentation_fields; show_presentation_fields =
!show_presentation_fields;
}} }}
class="btn btn-sm {show_presentation_fields class="btn btn-sm {show_presentation_fields
? 'ae_btn_surface' ? 'ae_btn_surface'
@@ -335,21 +384,33 @@
</div> </div>
</header> </header>
<table class="table table-auto table-striped w-full text-xs lg:text-sm"> <table
class="table table-auto table-striped w-full text-xs lg:text-sm"
>
<thead class=""> <thead class="">
<tr> <tr>
<th class="px-4 py-2"> <th class="px-4 py-2">
Filename Filename
<!-- ({$lq__event_file_obj_li?.length}&times;) --> <!-- ({$lq__event_file_obj_li?.length}&times;) -->
</th> </th>
<th class="px-4 py-2" class:hidden={!show_direct_download}> Link </th> <th
class="px-4 py-2"
class:hidden={!show_direct_download}
>
Link
</th>
<th class="px-4 py-2">Size</th> <th class="px-4 py-2">Size</th>
<th class="px-4 py-2">Uploaded</th> <th class="px-4 py-2">Uploaded</th>
{#if show_location_fields} {#if show_location_fields}
<th class="px-4 py-2">Location</th> <th class="px-4 py-2">Location</th>
{/if} {/if}
{#if show_session_fields} {#if show_session_fields}
<th class="px-4 py-2" class:hidden={hide_session_code}> Code </th> <th
class="px-4 py-2"
class:hidden={hide_session_code}
>
Code
</th>
<th class="px-4 py-2"> Session </th> <th class="px-4 py-2"> Session </th>
<th class="px-4 py-2">Start datetime</th> <th class="px-4 py-2">Start datetime</th>
{/if} {/if}
@@ -370,7 +431,7 @@
hosted_file_id={event_file_obj?.hosted_file_id} hosted_file_id={event_file_obj?.hosted_file_id}
hosted_file_obj={event_file_obj} hosted_file_obj={event_file_obj}
show_divider={true} show_divider={true}
show_direct_download={show_direct_download} {show_direct_download}
max_filename={50} max_filename={50}
classes="btn btn-sm preset-tonal-primary hover:preset-filled-primary-500 min-w-72" classes="btn btn-sm preset-tonal-primary hover:preset-filled-primary-500 min-w-72"
/> />
@@ -384,7 +445,9 @@
class:hidden={!show_direct_download} class:hidden={!show_direct_download}
class="flex flex-row gap-0.5" class="flex flex-row gap-0.5"
> >
<span class="text-xs text-gray-500 w-32"> Original: </span> <span class="text-xs text-gray-500 w-32">
Original:
</span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={ae_util.clean_filename( href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={ae_util.clean_filename(
event_file_obj?.filename event_file_obj?.filename
@@ -392,7 +455,8 @@
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline"
title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id} Event File ID: ${event_file_obj?.event_file_id}`} title={`Download this file:\n${ae_util.clean_filename(event_file_obj?.filename)}\n[API] SHA256: ${event_file_obj?.hash_sha256.slice(0, 10)}...\nHosted ID: ${event_file_obj?.hosted_file_id} Event File ID: ${event_file_obj?.event_file_id}`}
> >
<span class="fas fa-download mx-1"></span> <span class="fas fa-download mx-1"
></span>
<span class="hidden"> Download </span> <span class="hidden"> Download </span>
</a> </a>
<!-- <button type="button" <!-- <button type="button"
@@ -412,7 +476,8 @@
)} )}
btn_text="Copy Link" btn_text="Copy Link"
btn_title="Copy the direct download file link: {ae_util.clean_filename( btn_title="Copy the direct download file link: {ae_util.clean_filename(
event_file_obj?.filename ?? 'unknown' event_file_obj?.filename ??
'unknown'
)}" )}"
btn_class="btn btn-sm p-1 preset-tonal-secondary lg:text-xs" btn_class="btn btn-sm p-1 preset-tonal-secondary lg:text-xs"
></MyClipboard> ></MyClipboard>
@@ -422,17 +487,25 @@
class="flex flex-row gap-0.5" class="flex flex-row gap-0.5"
class:hidden={!show_direct_download} class:hidden={!show_direct_download}
> >
<span class="text-xs text-gray-500 w-32"> Session Name: </span> <span class="text-xs text-gray-500 w-32">
Session Name:
</span>
<a <a
href="{$ae_api.base_url}/v3/action/event_file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/v3/action/event_file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename(event_file_obj?.event_presentation_name) .clean_filename(
.substring(0, 20)}-{ae_util.clean_filename( event_file_obj?.event_presentation_name
)
.substring(
0,
20
)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name event_file_obj?.event_presenter_full_name
)}.{event_file_obj?.extension}&key={$ae_api.account_id}" )}.{event_file_obj?.extension}&key={$ae_api.account_id}"
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline"
title={`Download renamed with session name to: ${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}`} title={`Download renamed with session name to: ${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_session_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}`}
> >
<span class="fas fa-download mx-1"></span> <span class="fas fa-download mx-1"
></span>
<span class="hidden"> Renamed </span> <span class="hidden"> Renamed </span>
</a> </a>
<!-- <button type="button" <!-- <button type="button"
@@ -464,14 +537,20 @@
</span> </span>
<a <a
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={event_file_obj?.event_session_code}-{ae_util
.clean_filename(event_file_obj?.event_presentation_name) .clean_filename(
.substring(0, 20)}-{ae_util.clean_filename( event_file_obj?.event_presentation_name
)
.substring(
0,
20
)}-{ae_util.clean_filename(
event_file_obj?.event_presenter_full_name event_file_obj?.event_presenter_full_name
)}.{event_file_obj?.extension}&key=${$ae_api.account_id}" )}.{event_file_obj?.extension}&key=${$ae_api.account_id}"
class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline" class="btn btn-sm p-1 preset-tonal-secondary *:hover:inline lg:text-xs underline"
title={`Download renamed with presentation name to: ${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}`} title={`Download renamed with presentation name to: ${event_file_obj?.event_session_code}-${ae_util.clean_filename(event_file_obj?.event_presentation_name).substring(0, 20)}-${ae_util.clean_filename(event_file_obj?.event_presenter_full_name)}.${event_file_obj?.extension}`}
> >
<span class="fas fa-download mx-1"></span> <span class="fas fa-download mx-1"
></span>
<span class="hidden"> Renamed </span> <span class="hidden"> Renamed </span>
</a> </a>
<!-- <button type="button" <!-- <button type="button"
@@ -495,7 +574,9 @@
</div> </div>
</td> </td>
<td class="px-4 py-2" <td class="px-4 py-2"
>{ae_util.format_bytes(event_file_obj?.file_size)}</td >{ae_util.format_bytes(
event_file_obj?.file_size
)}</td
> >
<td class="px-4 py-2"> <td class="px-4 py-2">
<div> <div>
@@ -513,18 +594,27 @@
</span> </span>
</div> </div>
<span <span
class:bg-yellow-200={ae_util.is_datetime_recent({ class:bg-yellow-200={ae_util.is_datetime_recent(
datetime: event_file_obj?.created_on, {
minutes: 30 datetime:
})} event_file_obj?.created_on,
class:bg-green-200={ae_util.is_datetime_recent({ minutes: 30
datetime: event_file_obj?.created_on, }
minutes: 240 )}
})} class:bg-green-200={ae_util.is_datetime_recent(
class:bg-blue-200={ae_util.is_datetime_recent({ {
datetime: event_file_obj?.created_on, datetime:
minutes: 2880 event_file_obj?.created_on,
})} minutes: 240
}
)}
class:bg-blue-200={ae_util.is_datetime_recent(
{
datetime:
event_file_obj?.created_on,
minutes: 2880
}
)}
> >
{ae_util.iso_datetime_formatter( {ae_util.iso_datetime_formatter(
event_file_obj?.created_on, event_file_obj?.created_on,
@@ -544,11 +634,16 @@
{/if} {/if}
{#if show_session_fields} {#if show_session_fields}
<td class="px-4 py-2 lg:text-xs" class:hidden={hide_session_code}> <td
{event_file_obj?.event_session_code ?? '-- not set --'} class="px-4 py-2 lg:text-xs"
class:hidden={hide_session_code}
>
{event_file_obj?.event_session_code ??
'-- not set --'}
</td> </td>
<td class="px-4 py-2 lg:text-xs"> <td class="px-4 py-2 lg:text-xs">
<span class="fas fa-chalkboard-teacher"></span> <span class="fas fa-chalkboard-teacher"
></span>
<a <a
href="/events/{event_file_obj?.event_id}/session/{event_file_obj?.event_session_id}" href="/events/{event_file_obj?.event_id}/session/{event_file_obj?.event_session_id}"
class="text-blue-500 underline hover:text-blue-800" class="text-blue-500 underline hover:text-blue-800"

View File

@@ -72,14 +72,17 @@
// } // }
if (event_file_obj_li?.length) { if (event_file_obj_li?.length) {
if (log_lvl) { if (log_lvl) {
console.log(`LQ - Using event_file_obj_li to get event files.`); console.log(
`LQ - Using event_file_obj_li to get event files.`
);
} }
event_file_id_random_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery. event_file_id_random_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
for (let i = 0; i < event_file_obj_li.length; i++) { for (let i = 0; i < event_file_obj_li.length; i++) {
let event_file_obj = event_file_obj_li[i]; let event_file_obj = event_file_obj_li[i];
let event_file_id_random = event_file_obj.event_file_id_random; let event_file_id_random =
event_file_obj.event_file_id_random;
event_file_id_random_li.push(event_file_id_random); event_file_id_random_li.push(event_file_id_random);
} }
@@ -103,7 +106,8 @@
// Check if results are different than the current session version stored under $events_slct // Check if results are different than the current session version stored under $events_slct
if ( if (
$events_slct.event_file_obj_li && $events_slct.event_file_obj_li &&
JSON.stringify($events_slct.event_file_obj_li) !== JSON.stringify(results) JSON.stringify($events_slct.event_file_obj_li) !==
JSON.stringify(results)
) { ) {
$events_slct.event_file_obj_li = [...results]; $events_slct.event_file_obj_li = [...results];
if (log_lvl) { if (log_lvl) {

View File

@@ -83,7 +83,9 @@
upload_complete = false; upload_complete = false;
const target = event.currentTarget as HTMLFormElement; const target = event.currentTarget as HTMLFormElement;
const file_input = target ? (target[input_element_id] as HTMLInputElement) : null; const file_input = target
? (target[input_element_id] as HTMLInputElement)
: null;
if (file_input && file_input.files && file_input.files.length > 0) { if (file_input && file_input.files && file_input.files.length > 0) {
// Sequential upload to provide reliable progress and avoid server race conditions // Sequential upload to provide reliable progress and avoid server race conditions
@@ -126,7 +128,10 @@
input_upload_files: any[]; input_upload_files: any[];
task_id: string; task_id: string;
}) { }) {
if (log_lvl) console.log(`*** handle_input_upload_files() *** task_id = ${task_id}`); if (log_lvl)
console.log(
`*** handle_input_upload_files() *** task_id = ${task_id}`
);
const form_data = new FormData(); const form_data = new FormData();
form_data.append('account_id', $ae_loc.account_id); form_data.append('account_id', $ae_loc.account_id);
@@ -161,12 +166,14 @@
}; };
// STEP 2: Create Event File Link // STEP 2: Create Event File Link
return await events_func.create_event_file_obj_from_hosted_file_async({ return await events_func.create_event_file_obj_from_hosted_file_async(
api_cfg: $ae_api, {
hosted_file_id: hosted_file_id, api_cfg: $ae_api,
data: event_file_data, hosted_file_id: hosted_file_id,
log_lvl: log_lvl data: event_file_data,
}); log_lvl: log_lvl
}
);
}) })
.catch(function (error: any) { .catch(function (error: any) {
console.error('Upload Process Failed:', error); console.error('Upload Process Failed:', error);
@@ -216,9 +223,13 @@
{#if label}{@render label()}{:else} {#if label}{@render label()}{:else}
<div class="flex items-center justify-center gap-2 mb-2 pt-2"> <div class="flex items-center justify-center gap-2 mb-2 pt-2">
<Lucide.Upload class="text-primary-500" /> <Lucide.Upload class="text-primary-500" />
<strong class="preset-tonal-primary px-3 py-1 rounded-full">Select Files</strong> <strong class="preset-tonal-primary px-3 py-1 rounded-full"
>Select Files</strong
>
</div> </div>
<div class="text-sm text-gray-600 dark:text-gray-400 italic pb-2"> <div
class="text-sm text-gray-600 dark:text-gray-400 italic pb-2"
>
<strong>Presentation materials only</strong><br /> <strong>Presentation materials only</strong><br />
(PPTX, Keynote, PDF, MP4, etc) (PPTX, Keynote, PDF, MP4, etc)
</div> </div>
@@ -281,7 +292,10 @@
<span class="text-sm"> Upload </span> <span class="text-sm"> Upload </span>
<span class="grow font-bold ml-2"> <span class="grow font-bold ml-2">
{#if $events_sess.files.processed_file_list?.length > 0} {#if $events_sess.files.processed_file_list?.length > 0}
{$events_sess.files.processed_file_list.length} { $events_sess.files.processed_file_list.length === 1 ? 'file' : 'files' } {$events_sess.files.processed_file_list.length}
{$events_sess.files.processed_file_list.length === 1
? 'file'
: 'files'}
{:else} {:else}
<span class="text-xs"> 0 </span> <span class="text-xs"> 0 </span>
{/if} {/if}

View File

@@ -66,7 +66,8 @@
> >
<div class="float-right flex flex-row items-center"> <div class="float-right flex flex-row items-center">
{#if $ae_loc.trusted_access && $ae_loc.edit_mode} {#if $ae_loc.trusted_access && $ae_loc.edit_mode}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
console.log('Add Presentation'); console.log('Add Presentation');
if ( if (
@@ -108,7 +109,8 @@
{#if $lq__event_presentation_obj_li?.length} {#if $lq__event_presentation_obj_li?.length}
<span <span
class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg" class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg"
title="Count {$lq__event_presentation_obj_li.length ?? 'None'}" title="Count {$lq__event_presentation_obj_li.length ??
'None'}"
> >
<span class="fas fa-list-ol mx-4"></span> <span class="fas fa-list-ol mx-4"></span>
{$lq__event_presentation_obj_li.length ?? 'None'}&times; {$lq__event_presentation_obj_li.length ?? 'None'}&times;
@@ -131,7 +133,8 @@
<li class="space-y-2 border border-gray-200 p-2 rounded-md"> <li class="space-y-2 border border-gray-200 p-2 rounded-md">
<div class="float-right space-2 flex flex-row items-center"> <div class="float-right space-2 flex flex-row items-center">
{#if $ae_loc.trusted_access && $ae_loc.edit_mode} {#if $ae_loc.trusted_access && $ae_loc.edit_mode}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
console.log('Add Presenter'); console.log('Add Presenter');
if ( if (
@@ -155,7 +158,8 @@
events_func.create_ae_obj__event_presenter({ events_func.create_ae_obj__event_presenter({
api_cfg: $ae_api, api_cfg: $ae_api,
event_id: $events_slct.event_id, event_id: $events_slct.event_id,
event_session_id: $events_slct.event_session_id, event_session_id:
$events_slct.event_session_id,
event_presentation_id: event_presentation_id:
event_presentation_obj.event_presentation_id, event_presentation_obj.event_presentation_id,
data_kv: presenter_data, data_kv: presenter_data,
@@ -173,7 +177,8 @@
<h4 class="h5 rounded-md p-2 preset-filled-surface-300-700"> <h4 class="h5 rounded-md p-2 preset-filled-surface-300-700">
<span <span
class:hidden={!event_presentation_obj.start_datetime || class:hidden={!event_presentation_obj.start_datetime ||
$events_loc.pres_mgmt.hide__presentation_datetime} $events_loc.pres_mgmt
.hide__presentation_datetime}
class="text-base border-r-2 border-gray-800/50 px-1" class="text-base border-r-2 border-gray-800/50 px-1"
> >
{ae_util.iso_datetime_formatter( {ae_util.iso_datetime_formatter(
@@ -197,7 +202,8 @@
field_type={'text'} field_type={'text'}
field_value={event_presentation_obj?.name} field_value={event_presentation_obj?.name}
allow_null={false} allow_null={false}
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} hide_edit_btn={!$ae_loc.trusted_access ||
!$ae_loc.edit_mode}
outline_element={false} outline_element={false}
show_crud={false} show_crud={false}
display_inline={true} display_inline={true}
@@ -235,7 +241,8 @@
field_type={'text'} field_type={'text'}
field_value={event_presentation_obj?.code} field_value={event_presentation_obj?.code}
allow_null={false} allow_null={false}
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} hide_edit_btn={!$ae_loc.trusted_access ||
!$ae_loc.edit_mode}
outline_element={false} outline_element={false}
show_crud={false} show_crud={false}
display_inline={true} display_inline={true}
@@ -265,13 +272,19 @@
> >
<span class="fas fa-barcode"></span> <span class="fas fa-barcode"></span>
{event_presentation_obj?.code ?? ''} {event_presentation_obj?.code ?? ''}
{event_presentation_obj?.abstract_code ?? ''} {event_presentation_obj?.abstract_code ??
''}
</span> </span>
{:else if $ae_loc.trusted_access && $ae_loc.edit_mode} {:else if $ae_loc.trusted_access && $ae_loc.edit_mode}
<span class="text-sm text-semibold text-success-800-400"> <span
class="text-sm text-semibold text-success-800-400"
>
<span class="fas fa-barcode"></span> <span class="fas fa-barcode"></span>
Code: Code:
<span class="" title="No code provided for this presentation"> <span
class=""
title="No code provided for this presentation"
>
{@html event_presentation_obj?.code ?? {@html event_presentation_obj?.code ??
ae_snip.html__not_set} ae_snip.html__not_set}
</span> </span>
@@ -281,19 +294,32 @@
<!-- Can not edit the abstract code here at this time. --> <!-- Can not edit the abstract code here at this time. -->
</h4> </h4>
<div class:hidden={!($ae_loc.trusted_access && $ae_loc.edit_mode)}> <div
<span class="text-sm text-semibold text-success-800-400"> class:hidden={!(
$ae_loc.trusted_access && $ae_loc.edit_mode
)}
>
<span
class="text-sm text-semibold text-success-800-400"
>
Date & Date &
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
if ($events_loc.pres_mgmt.time_hours == 12) { if (
$events_loc.pres_mgmt.time_hours == 12
) {
$events_loc.pres_mgmt.time_hours = 24; $events_loc.pres_mgmt.time_hours = 24;
$events_loc.pres_mgmt.datetime_format = 'datetime_long'; $events_loc.pres_mgmt.datetime_format =
$events_loc.pres_mgmt.time_format = 'time_short'; 'datetime_long';
$events_loc.pres_mgmt.time_format =
'time_short';
} else { } else {
$events_loc.pres_mgmt.time_hours = 12; $events_loc.pres_mgmt.time_hours = 12;
$events_loc.pres_mgmt.datetime_format = 'datetime_12_long'; $events_loc.pres_mgmt.datetime_format =
$events_loc.pres_mgmt.time_format = 'time_12_short'; 'datetime_12_long';
$events_loc.pres_mgmt.time_format =
'time_12_short';
} }
}} }}
> >
@@ -301,7 +327,8 @@
</button> </button>
:</span :</span
> >
<span class="fas fa-calendar-alt text-success-800-400"></span> <span class="fas fa-calendar-alt text-success-800-400"
></span>
<Element_ae_crud <Element_ae_crud
api_cfg={$ae_api} api_cfg={$ae_api}
object_type={'event_presentation'} object_type={'event_presentation'}
@@ -310,7 +337,8 @@
field_type={'datetime'} field_type={'datetime'}
field_value={event_presentation_obj.start_datetime} field_value={event_presentation_obj.start_datetime}
allow_null={false} allow_null={false}
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} hide_edit_btn={!$ae_loc.trusted_access ||
!$ae_loc.edit_mode}
outline_element={false} outline_element={false}
show_crud={false} show_crud={false}
display_inline={true} display_inline={true}
@@ -347,7 +375,8 @@
field_type={'datetime'} field_type={'datetime'}
field_value={event_presentation_obj.end_datetime} field_value={event_presentation_obj.end_datetime}
allow_null={false} allow_null={false}
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} hide_edit_btn={!$ae_loc.trusted_access ||
!$ae_loc.edit_mode}
outline_element={false} outline_element={false}
show_crud={false} show_crud={false}
display_inline={true} display_inline={true}
@@ -384,7 +413,8 @@
field_type={'textarea'} field_type={'textarea'}
field_value={event_presentation_obj?.description} field_value={event_presentation_obj?.description}
allow_null={false} allow_null={false}
hide_edit_btn={!$ae_loc.trusted_access || !$ae_loc.edit_mode} hide_edit_btn={!$ae_loc.trusted_access ||
!$ae_loc.edit_mode}
outline_element={false} outline_element={false}
show_crud={false} show_crud={false}
display_inline={true} display_inline={true}
@@ -402,12 +432,15 @@
}); });
}} }}
> >
<span class="text-sm text-semibold text-success-800-400"> <span
class="text-sm text-semibold text-success-800-400"
>
Description: Description:
</span> </span>
{#if event_presentation_obj?.description} {#if event_presentation_obj?.description}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
console.log('Show/Hide Description'); console.log('Show/Hide Description');
if ( if (
@@ -419,7 +452,8 @@
null; null;
// Was testing with LiveQuery // Was testing with LiveQuery
$events_slct.event_presentation_id = null; $events_slct.event_presentation_id =
null;
} else { } else {
$events_sess.pres_mgmt.show_content__presentation_description = $events_sess.pres_mgmt.show_content__presentation_description =
event_presentation_obj.event_presentation_id; event_presentation_obj.event_presentation_id;
@@ -432,7 +466,8 @@
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs" class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
> >
{#if $events_sess.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id} {#if $events_sess.pres_mgmt.show_content__presentation_description == event_presentation_obj.event_presentation_id}
<span class="fas fa-eye-slash mx-1"></span> <span class="fas fa-eye-slash mx-1"
></span>
<span>Hide Description</span> <span>Hide Description</span>
{:else} {:else}
<span class="fas fa-eye mx-1"></span> <span class="fas fa-eye mx-1"></span>
@@ -473,8 +508,12 @@
<Element_manage_event_file_li_wrap <Element_manage_event_file_li_wrap
link_to_type={'event_presentation'} link_to_type={'event_presentation'}
link_to_id={event_presentation_obj?.event_presentation_id} link_to_id={event_presentation_obj?.event_presentation_id}
allow_basic={$events_loc.auth__kv.session[$events_slct.event_session_id] || allow_basic={$events_loc.auth__kv.session[
$events_loc.auth__kv.presenter[$events_slct.event_presenter_id]} $events_slct.event_session_id
] ||
$events_loc.auth__kv.presenter[
$events_slct.event_presenter_id
]}
allow_moderator={$events_loc.auth__kv.session[ allow_moderator={$events_loc.auth__kv.session[
$events_slct.event_session_id $events_slct.event_session_id
]} ]}

View File

@@ -57,65 +57,67 @@
import { core_func } from '$lib/ae_core/ae_core_functions'; import { core_func } from '$lib/ae_core/ae_core_functions';
import { ae_loc, ae_api, ae_snip } from '$lib/stores/ae_stores'; import { ae_loc, ae_api, ae_snip } from '$lib/stores/ae_stores';
import { events_loc, events_sess, events_slct } from '$lib/stores/ae_events_stores'; import {
events_loc,
events_sess,
events_slct
} from '$lib/stores/ae_events_stores';
let show_details_kv: Record<string, boolean> = $state({}); let show_details_kv: Record<string, boolean> = $state({});
// Derived list of visible items (Standardized Pattern 2026-01-27) // Derived list of visible items (Standardized Pattern 2026-01-27)
let visible_session_obj_li = $derived((() => { let visible_session_obj_li = $derived(
const list = $lq__event_session_obj_li; (() => {
if (list === undefined || list === null) return null; const list = $lq__event_session_obj_li;
if (!Array.isArray(list)) return []; if (list === undefined || list === null) return null;
if (!Array.isArray(list)) return [];
const filtered = list.filter((item: any) => { const filtered = list.filter((item: any) => {
if (!item) return false; if (!item) return false;
if ($ae_loc.trusted_access) return true; if ($ae_loc.trusted_access) return true;
return !item.hide; return !item.hide;
}); });
if (log_lvl) console.log(`visible_session_obj_li: Input=${list.length}, Output=${filtered.length}`); if (log_lvl)
return filtered; console.log(
})()); `visible_session_obj_li: Input=${list.length}, Output=${filtered.length}`
);
return filtered;
})()
);
function toggle_details(id: string) { function toggle_details(id: string) {
show_details_kv[id] = !show_details_kv[id]; show_details_kv[id] = !show_details_kv[id];
} }
</script> </script>
<section class="ae_comp event_session_obj_li px-0.5 py-2 space-y-2 min-w-full w-full container overflow-x-auto {container_class_li}"> <section
class="ae_comp event_session_obj_li px-0.5 py-2 space-y-2 min-w-full w-full container overflow-x-auto {container_class_li}"
>
{#if visible_session_obj_li === null} {#if visible_session_obj_li === null}
<div class="flex flex-col items-center justify-center p-10 opacity-50"> <div class="flex flex-col items-center justify-center p-10 opacity-50">
<LoaderCircle size="3em" class="animate-spin mb-2" /> <LoaderCircle size="3em" class="animate-spin mb-2" />
<p>Loading sessions...</p> <p>Loading sessions...</p>
</div> </div>
{:else if visible_session_obj_li.length > 0} {:else if visible_session_obj_li.length > 0}
<header
class="w-full flex flex-row gap-2 items-center justify-start mb-2 px-2"
>
<h2 class="text-sm text-gray-500 font-normal">Sessions:</h2>
<header class="w-full flex flex-row gap-2 items-center justify-start mb-2 px-2"> <span
class="badge preset-tonal-success font-bold text-lg px-3 py-1"
<h2 class="text-sm text-gray-500 font-normal"> Sessions: </h2> >
{visible_session_obj_li.length}<span
<span class="badge preset-tonal-success font-bold text-lg px-3 py-1"> class="text-gray-400 dark:text-gray-600">&times;</span
>
{visible_session_obj_li.length}<span class="text-gray-400 dark:text-gray-600">&times;</span>
</span> </span>
</header> </header>
<table class="table table-auto table-striped w-full"> <table class="table table-auto table-striped w-full">
<thead> <thead>
<tr class="bg-surface-100-900"> <tr class="bg-surface-100-900">
<th>Session</th> <th>Session</th>
<th class="hidden md:table-cell">Schedule</th> <th class="hidden md:table-cell">Schedule</th>
@@ -124,286 +126,261 @@
<th class:hidden={hide__session_poc}>POC</th> <th class:hidden={hide__session_poc}>POC</th>
<th class:hidden={!$ae_loc.edit_mode || !$ae_loc.adv_mode || hide__admin}>Admin</th> <th
class:hidden={!$ae_loc.edit_mode ||
!$ae_loc.adv_mode ||
hide__admin}>Admin</th
>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each visible_session_obj_li as session_obj, index (session_obj.id || session_obj.event_session_id || session_obj.event_session_id_random || index)} {#each visible_session_obj_li as session_obj, index (session_obj.id || session_obj.event_session_id || session_obj.event_session_id_random || index)}
<tr
<tr class="relative" class:opacity-50={session_obj?.hide} class:variant-soft-warning={!session_obj?.enable}> class="relative"
class:opacity-50={session_obj?.hide}
class:variant-soft-warning={!session_obj?.enable}
>
<td> <td>
{#if session_obj?.alert && $ae_loc.trusted_access} {#if session_obj?.alert && $ae_loc.trusted_access}
<Comp_event_session_alert <Comp_event_session_alert
event_session_obj={session_obj} event_session_obj={session_obj}
{log_lvl} {log_lvl}
/> />
{/if} {/if}
<div class="flex flex-col gap-1"> <div class="flex flex-col gap-1">
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<a
href="/events/{session_obj?.event_id}/session/{session_obj?.event_session_id}"
class="flex flex-row gap-2 items-center font-bold text-lg hover:text-primary-500 text-left"
>
{#if session_obj?.hide}
<EyeOff
size="1em"
class="text-gray-400 flex-none"
/>
{:else}
<Presentation
size="1em"
class="text-primary-500 flex-none"
/>
{/if}
<a <span>{session_obj?.name}</span>
href="/events/{session_obj?.event_id}/session/{session_obj?.event_session_id}"
class="flex flex-row gap-2 items-center font-bold text-lg hover:text-primary-500 text-left"
>
{#if session_obj?.hide}
<EyeOff size="1em" class="text-gray-400 flex-none" />
{:else}
<Presentation size="1em" class="text-primary-500 flex-none" />
{/if}
<span>{session_obj?.name}</span>
{#if session_obj?.file_count_all} {#if session_obj?.file_count_all}
<span
<span class="badge preset-tonal-success flex items-center gap-1 text-xs py-0 px-1"> class="badge preset-tonal-success flex items-center gap-1 text-xs py-0 px-1"
>
<Check size="1em" /> <Check size="1em" />
{session_obj.file_count_all} {session_obj.file_count_all}
</span> </span>
{/if} {/if}
</a> </a>
{#if (show__session_presentations || show__session_files) && $ae_loc.manager_access} {#if (show__session_presentations || show__session_files) && $ae_loc.manager_access}
<button
<button type="button" type="button"
class="btn btn-icon btn-sm variant-soft-surface" class="btn btn-icon btn-sm variant-soft-surface"
onclick={() =>
onclick={() => toggle_details(session_obj.event_session_id)} toggle_details(
session_obj.event_session_id
)}
> >
{#if show_details_kv[session_obj.event_session_id]} {#if show_details_kv[session_obj.event_session_id]}
<ChevronUp size="1.2em" /> <ChevronUp size="1.2em" />
{:else} {:else}
<ChevronDown size="1.2em" /> <ChevronDown size="1.2em" />
{/if} {/if}
</button> </button>
{/if} {/if}
</div> </div>
<!-- Mobile Schedule Summary --> <!-- Mobile Schedule Summary -->
<div class="md:hidden text-xs text-surface-500 flex flex-wrap gap-x-3 gap-y-1"> <div
class="md:hidden text-xs text-surface-500 flex flex-wrap gap-x-3 gap-y-1"
<span class="flex items-center gap-1"><CalendarDays size="1em" /> {ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'date_short_month_day')}</span> >
<span class="flex items-center gap-1"
<span class="flex items-center gap-1"><Clock size="1em" /> {ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'time_12_short')}</span> ><CalendarDays size="1em" />
{ae_util.iso_datetime_formatter(
session_obj?.start_datetime,
'date_short_month_day'
)}</span
>
<span class="flex items-center gap-1"
><Clock size="1em" />
{ae_util.iso_datetime_formatter(
session_obj?.start_datetime,
'time_12_short'
)}</span
>
</div> </div>
{#if show_details_kv[session_obj.event_session_id]} {#if show_details_kv[session_obj.event_session_id]}
<div
<div class="p-2 bg-surface-500/5 rounded-lg border border-surface-500/10 mt-1"> class="p-2 bg-surface-500/5 rounded-lg border border-surface-500/10 mt-1"
>
{#if show__session_presentations && $ae_loc.manager_access} {#if show__session_presentations && $ae_loc.manager_access}
<Comp_event_presenter_obj_li <Comp_event_presenter_obj_li
link_to_type={'event_session'} link_to_type={'event_session'}
link_to_id={session_obj?.event_session_id} link_to_id={session_obj?.event_session_id}
display_mode={'minimal'} display_mode={'minimal'}
{log_lvl} {log_lvl}
/> />
{/if} {/if}
{#if show__session_files && $ae_loc.manager_access} {#if show__session_files && $ae_loc.manager_access}
<Element_manage_event_file_li <Element_manage_event_file_li
link_to_type={'event_session'} link_to_type={'event_session'}
link_to_id={session_obj?.event_session_id} link_to_id={session_obj?.event_session_id}
allow_basic={true} allow_basic={true}
allow_moderator={true} allow_moderator={true}
display_mode={'minimal'} display_mode={'minimal'}
/> />
{/if} {/if}
</div> </div>
{/if} {/if}
</div> </div>
</td> </td>
<td class="hidden md:table-cell"> <td class="hidden md:table-cell">
<div class="flex flex-col text-xs font-medium"> <div class="flex flex-col text-xs font-medium">
<span class="text-surface-900-100"
>{ae_util.iso_datetime_formatter(
session_obj?.start_datetime,
'dddd, MMM D'
)}</span
>
<span class="text-surface-900-100">{ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'dddd, MMM D')}</span> <span class="text-surface-500 whitespace-nowrap"
>{ae_util.iso_datetime_formatter(
<span class="text-surface-500 whitespace-nowrap">{ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'time_12_short')} {ae_util.iso_datetime_formatter(session_obj?.end_datetime, 'time_12_short')}</span> session_obj?.start_datetime,
'time_12_short'
)} {ae_util.iso_datetime_formatter(
session_obj?.end_datetime,
'time_12_short'
)}</span
>
</div> </div>
</td> </td>
<td class:hidden={hide__session_location}> <td class:hidden={hide__session_location}>
<div class="flex flex-col gap-1 min-w-32"> <div class="flex flex-col gap-1 min-w-32">
<span class="text-xs font-semibold"
<span class="text-xs font-semibold">{session_obj?.event_location_name ?? '--'}</span> >{session_obj?.event_location_name ??
'--'}</span
>
<div class="flex gap-1"> <div class="flex gap-1">
{#if !hide__launcher_link} {#if !hide__launcher_link}
<a
<a href="/events/{session_obj?.event_id}/launcher/{session_obj?.event_location_id}?session_id={session_obj?.event_session_id}" class="btn btn-icon btn-xs preset-tonal-tertiary" title="Svelte Launcher"><Rocket size="1em" /></a> href="/events/{session_obj?.event_id}/launcher/{session_obj?.event_location_id}?session_id={session_obj?.event_session_id}"
class="btn btn-icon btn-xs preset-tonal-tertiary"
title="Svelte Launcher"
><Rocket size="1em" /></a
>
{/if} {/if}
{#if !hide__location_link} {#if !hide__location_link}
<a
<a href="/events/{session_obj?.event_id}/location/{session_obj?.event_location_id}" class="btn btn-icon btn-xs preset-tonal-surface" title="Location Details"><MapPin size="1em" /></a> href="/events/{session_obj?.event_id}/location/{session_obj?.event_location_id}"
class="btn btn-icon btn-xs preset-tonal-surface"
title="Location Details"
><MapPin size="1em" /></a
>
{/if} {/if}
</div> </div>
</div> </div>
</td> </td>
<td class:hidden={hide__session_poc}> <td class:hidden={hide__session_poc}>
<div class="flex flex-col text-xs min-w-32"> <div class="flex flex-col text-xs min-w-32">
{#if session_obj?.poc_person_full_name} {#if session_obj?.poc_person_full_name}
<span
<span class="font-bold flex items-center gap-1"><User size="1em" /> {session_obj.poc_person_full_name}</span> class="font-bold flex items-center gap-1"
><User size="1em" />
{session_obj.poc_person_full_name}</span
>
{#if $ae_loc.trusted_access && session_obj?.poc_person_primary_email} {#if $ae_loc.trusted_access && session_obj?.poc_person_primary_email}
<a
<a href="mailto:{session_obj.poc_person_primary_email}" class="text-primary-500 hover:underline flex items-center gap-1"><Mail size="1em" /> Email</a> href="mailto:{session_obj.poc_person_primary_email}"
class="text-primary-500 hover:underline flex items-center gap-1"
><Mail size="1em" /> Email</a
>
{/if} {/if}
{:else} {:else}
<span class="opacity-30">--</span> <span class="opacity-30">--</span>
{/if} {/if}
</div> </div>
</td> </td>
<td
class:hidden={!$ae_loc.edit_mode ||
<td class:hidden={!$ae_loc.edit_mode || !$ae_loc.adv_mode || hide__admin}> !$ae_loc.adv_mode ||
hide__admin}
>
<div class="flex gap-1"> <div class="flex gap-1">
<button
<button type="button" type="button"
class="btn btn-icon btn-xs {session_obj?.hide
class="btn btn-icon btn-xs {session_obj?.hide ? 'preset-tonal-error' : 'preset-tonal-secondary'}" ? 'preset-tonal-error'
: 'preset-tonal-secondary'}"
onclick={() => core_func.update_ae_obj_id_crud_v2({ api_cfg: $ae_api, object_type: 'event_session', object_id: session_obj.event_session_id, field_name: 'hide', new_field_value: !session_obj.hide, log_lvl: 1 })} onclick={() =>
core_func.update_ae_obj_id_crud_v2({
api_cfg: $ae_api,
object_type: 'event_session',
object_id:
session_obj.event_session_id,
field_name: 'hide',
new_field_value: !session_obj.hide,
log_lvl: 1
})}
> >
{#if session_obj?.hide}<EyeOff
{#if session_obj?.hide}<EyeOff size="1.2em" />{:else}<Eye size="1.2em" />{/if} size="1.2em"
/>{:else}<Eye size="1.2em" />{/if}
</button> </button>
<button type="button" <button
type="button"
class="btn btn-icon btn-xs {session_obj?.alert ? 'preset-tonal-warning' : 'preset-tonal-surface'}" class="btn btn-icon btn-xs {session_obj?.alert
? 'preset-tonal-warning'
onclick={() => core_func.update_ae_obj_id_crud_v2({ api_cfg: $ae_api, object_type: 'event_session', object_id: session_obj.event_session_id, field_name: 'alert', new_field_value: !session_obj.alert, log_lvl: 1 })} : 'preset-tonal-surface'}"
onclick={() =>
core_func.update_ae_obj_id_crud_v2({
api_cfg: $ae_api,
object_type: 'event_session',
object_id:
session_obj.event_session_id,
field_name: 'alert',
new_field_value: !session_obj.alert,
log_lvl: 1
})}
> >
{#if session_obj?.alert}<Bell
{#if session_obj?.alert}<Bell size="1.2em" />{:else}<BellOff size="1.2em" />{/if} size="1.2em"
/>{:else}<BellOff size="1.2em" />{/if}
</button> </button>
</div> </div>
</td> </td>
</tr> </tr>
{/each} {/each}
</tbody> </tbody>
</table> </table>
{:else} {:else}
<div
<div class="flex flex-col items-center justify-center p-20 opacity-50 text-center bg-surface-50 dark:bg-surface-900/50 rounded-lg border border-dashed border-surface-300"> class="flex flex-col items-center justify-center p-20 opacity-50 text-center bg-surface-50 dark:bg-surface-900/50 rounded-lg border border-dashed border-surface-300"
>
<FileSearch size="3em" class="mb-2 opacity-20 mx-auto" /> <FileSearch size="3em" class="mb-2 opacity-20 mx-auto" />
<p class="text-xl">No sessions found matching your criteria.</p> <p class="text-xl">No sessions found matching your criteria.</p>
<p class="text-sm">Try adjusting your filters or search terms.</p> <p class="text-sm">Try adjusting your filters or search terms.</p>
</div> </div>
{/if} {/if}
</section> </section>

View File

@@ -46,8 +46,10 @@
.sortBy('start_datetime'); .sortBy('start_datetime');
return results; return results;
} else if (event_session_id_random_li.length > 0) { } else if (event_session_id_random_li.length > 0) {
const results = await db_events.session.bulkGet(event_session_id_random_li); const results = await db_events.session.bulkGet(
return results.filter(item => item !== undefined); event_session_id_random_li
);
return results.filter((item) => item !== undefined);
} }
return null; return null;
}); });

View File

@@ -62,14 +62,19 @@
class="ae_comp event_session_obj_tbl {container_class_li} container overflow-auto max-w-screen" class="ae_comp event_session_obj_tbl {container_class_li} container overflow-auto max-w-screen"
> >
{#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length} {#if $lq__event_session_obj_li && $lq__event_session_obj_li?.length}
<div bind:this={horiz_check_element} id="tbl_container" class="space-y-2 pb-48"> <div
bind:this={horiz_check_element}
id="tbl_container"
class="space-y-2 pb-48"
>
<h2 class="h3"> <h2 class="h3">
<span class="text-base"> Results: </span> <span class="text-base"> Results: </span>
{#if $lq__event_session_obj_li?.length} {#if $lq__event_session_obj_li?.length}
<span <span
class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg" class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg"
title="Count {$lq__event_session_obj_li.length ?? 'None'}" title="Count {$lq__event_session_obj_li.length ??
'None'}"
> >
<span class="fas fa-list-ol mx-4"></span> <span class="fas fa-list-ol mx-4"></span>
{$lq__event_session_obj_li.length ?? 'None'}&times; {$lq__event_session_obj_li.length ?? 'None'}&times;
@@ -77,7 +82,9 @@
{/if} {/if}
</h2> </h2>
<table class="table table-auto table-striped w-full text-xs lg:text-sm"> <table
class="table table-auto table-striped w-full text-xs lg:text-sm"
>
<thead class=""> <thead class="">
<tr> <tr>
<th class="px-4 py-2">Name</th> <th class="px-4 py-2">Name</th>

View File

@@ -57,19 +57,24 @@
if (event_session_obj_li?.length) { if (event_session_obj_li?.length) {
if (log_lvl) { if (log_lvl) {
console.log(`LQ - Using event_session_obj_li to get event sessions.`); console.log(
`LQ - Using event_session_obj_li to get event sessions.`
);
} }
event_session_id_random_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery. event_session_id_random_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
for (let i = 0; i < event_session_obj_li.length; i++) { for (let i = 0; i < event_session_obj_li.length; i++) {
let event_session_obj = event_session_obj_li[i]; let event_session_obj = event_session_obj_li[i];
let event_session_id_random = event_session_obj.event_session_id_random; let event_session_id_random =
event_session_obj.event_session_id_random;
event_session_id_random_li.push(event_session_id_random); event_session_id_random_li.push(event_session_id_random);
} }
// if (event_session_id_random_li.length) { // if (event_session_id_random_li.length) {
results = await db_events.session.bulkGet(event_session_id_random_li); results = await db_events.session.bulkGet(
event_session_id_random_li
);
// } // }
} else if (link_to_type && link_to_id) { } else if (link_to_type && link_to_id) {
console.log( console.log(
@@ -88,7 +93,8 @@
// Check if results are different than the current session version stored under $events_slct // Check if results are different than the current session version stored under $events_slct
if ( if (
$events_slct.event_session_obj_li && $events_slct.event_session_obj_li &&
JSON.stringify($events_slct.event_session_obj_li) !== JSON.stringify(results) JSON.stringify($events_slct.event_session_obj_li) !==
JSON.stringify(results)
) { ) {
$events_slct.event_session_obj_li = [...results]; $events_slct.event_session_obj_li = [...results];
if (log_lvl) { if (log_lvl) {

View File

@@ -46,7 +46,11 @@
<span <span
class="ae_menu__navigation_options flex flex-row flex-wrap gap-0.5 items-center justify-around" class="ae_menu__navigation_options flex flex-row flex-wrap gap-0.5 items-center justify-around"
> >
<a href="/core" class="btn btn-sm mx-1 ae_btn_info" class:hidden={!ae_core}> <a
href="/core"
class="btn btn-sm mx-1 ae_btn_info"
class:hidden={!ae_core}
>
<span class="fas fa-cogs m-1"></span> <span class="fas fa-cogs m-1"></span>
Æ Core Æ Core
</a> </a>

View File

@@ -24,11 +24,16 @@
</script> </script>
<!-- New standard events module menu 2025-06-20 --> <!-- New standard events module menu 2025-06-20 -->
<div class="ae_comp__pres_mgmt_menu_opts w-full border-t border-gray-300 mt-1" class:hidden={hide}> <div
class="ae_comp__pres_mgmt_menu_opts w-full border-t border-gray-300 mt-1"
class:hidden={hide}
>
<h2 class="text-sm font-semibold text-center pb-1"> <h2 class="text-sm font-semibold text-center pb-1">
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__menu_opts = !$events_loc.pres_mgmt.hide__menu_opts; $events_loc.pres_mgmt.hide__menu_opts =
!$events_loc.pres_mgmt.hide__menu_opts;
}} }}
class="btn btn-sm preset-tonal-info border border-info-500" class="btn btn-sm preset-tonal-info border border-info-500"
> >
@@ -54,8 +59,13 @@
<div class="flex flex-col gap-1 items-end justify-center"> <div class="flex flex-col gap-1 items-end justify-center">
<span class="flex flex-col gap-1 items-end justify-center"> <span class="flex flex-col gap-1 items-end justify-center">
<!-- Max person select options --> <!-- Max person select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full"> <span
<label class="text-sm w-32 text-right" for="qry_limit__people"> class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__people"
>
Max people: Max people:
</label> </label>
<!-- Not using: $events_loc.pres_mgmt.qry_limit__people --> <!-- Not using: $events_loc.pres_mgmt.qry_limit__people -->
@@ -79,13 +89,20 @@
</span> </span>
<!-- Max presenters select options --> <!-- Max presenters select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full"> <span
<label class="text-sm w-32 text-right" for="qry_limit__presenters"> class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__presenters"
>
Max presenters: Max presenters:
</label> </label>
<select <select
id="qry_limit__presenters" id="qry_limit__presenters"
bind:value={$events_loc.pres_mgmt.qry_limit__presenters} bind:value={
$events_loc.pres_mgmt.qry_limit__presenters
}
class="select w-20 text-sm preset-tonal-surface px-1" class="select w-20 text-sm preset-tonal-surface px-1"
> >
<option value="">-- not set --</option> <option value="">-- not set --</option>
@@ -104,13 +121,20 @@
</span> </span>
<!-- Max sessions select options --> <!-- Max sessions select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full"> <span
<label class="text-sm w-32 text-right" for="qry_limit__sessions"> class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__sessions"
>
Max sessions: Max sessions:
</label> </label>
<select <select
id="qry_limit__sessions" id="qry_limit__sessions"
bind:value={$events_loc.pres_mgmt.qry_limit__sessions} bind:value={
$events_loc.pres_mgmt.qry_limit__sessions
}
class="select w-20 text-sm preset-tonal-surface px-1" class="select w-20 text-sm preset-tonal-surface px-1"
> >
<option value="">-- not set --</option> <option value="">-- not set --</option>
@@ -124,8 +148,13 @@
</span> </span>
<!-- Max files select options --> <!-- Max files select options -->
<span class="flex flex-row gap-1 items-center justify-around w-full"> <span
<label class="text-sm w-32 text-right" for="qry_limit__files"> class="flex flex-row gap-1 items-center justify-around w-full"
>
<label
class="text-sm w-32 text-right"
for="qry_limit__files"
>
Max files: Max files:
</label> </label>
<select <select
@@ -147,7 +176,8 @@
<span class="flex flex-col gap-1 items-end justify-center"> <span class="flex flex-col gap-1 items-end justify-center">
<!-- Toggle between the showing hidden sessions --> <!-- Toggle between the showing hidden sessions -->
<!-- qry_hidden = all, not_hidden, hidden --> <!-- qry_hidden = all, not_hidden, hidden -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
if ($events_loc.pres_mgmt.qry_hidden == 'all') { if ($events_loc.pres_mgmt.qry_hidden == 'all') {
$events_loc.pres_mgmt.qry_hidden = 'not_hidden'; $events_loc.pres_mgmt.qry_hidden = 'not_hidden';
@@ -159,7 +189,8 @@
title="Toggle between showing hidden sessions" title="Toggle between showing hidden sessions"
> >
<span <span
class="fas {$events_loc.pres_mgmt.qry_hidden == 'all' class="fas {$events_loc.pres_mgmt.qry_hidden ==
'all'
? 'fa-toggle-on' ? 'fa-toggle-on'
: 'fa-toggle-off'} m-1" : 'fa-toggle-off'} m-1"
></span> ></span>
@@ -179,10 +210,14 @@
<!-- Toggle between the showing disabled sessions --> <!-- Toggle between the showing disabled sessions -->
<!-- qry_enabled = all, enabled --> <!-- qry_enabled = all, enabled -->
{#if $ae_loc.manager_access} {#if $ae_loc.manager_access}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
if ($events_loc.pres_mgmt.qry_enabled == 'all') { if (
$events_loc.pres_mgmt.qry_enabled = 'enabled'; $events_loc.pres_mgmt.qry_enabled == 'all'
) {
$events_loc.pres_mgmt.qry_enabled =
'enabled';
} else { } else {
$events_loc.pres_mgmt.qry_enabled = 'all'; $events_loc.pres_mgmt.qry_enabled = 'all';
} }
@@ -191,7 +226,8 @@
title="Toggle between showing disabled sessions" title="Toggle between showing disabled sessions"
> >
<span <span
class="fas {$events_loc.pres_mgmt.qry_enabled == 'all' class="fas {$events_loc.pres_mgmt.qry_enabled ==
'all'
? 'fa-toggle-on' ? 'fa-toggle-on'
: 'fa-toggle-off'} m-1" : 'fa-toggle-off'} m-1"
></span> ></span>
@@ -202,7 +238,8 @@
</span> </span>
{:else} {:else}
<span class="grow"> <span class="grow">
<span class="fas fa-check-circle m-1"></span> <span class="fas fa-check-circle m-1"
></span>
Show Disabled Sessions? Show Disabled Sessions?
</span> </span>
{/if} {/if}
@@ -213,14 +250,16 @@
{/if} {/if}
<div class="flex flex-col flex-wrap gap-1 items-center justify-evenly"> <div class="flex flex-col flex-wrap gap-1 items-center justify-evenly">
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.save_search_text = $events_loc.pres_mgmt.save_search_text =
!$events_loc.pres_mgmt.save_search_text; !$events_loc.pres_mgmt.save_search_text;
}} }}
class="btn btn-sm justify-between w-full text-center" class="btn btn-sm justify-between w-full text-center"
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text} class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
class:ae_btn_surface_outlined={!$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?" title="Save the search text for this session search?"
> >
{#if $events_loc.pres_mgmt.save_search_text} {#if $events_loc.pres_mgmt.save_search_text}
@@ -240,7 +279,8 @@
{#if $ae_loc.authenticated_access} {#if $ae_loc.authenticated_access}
{#if !$events_loc.pres_mgmt.hide__session_msg} {#if !$events_loc.pres_mgmt.hide__session_msg}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_msg = true; $events_loc.pres_mgmt.hide__session_msg = true;
}} }}
@@ -253,7 +293,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_msg = false; $events_loc.pres_mgmt.hide__session_msg = false;
}} }}
@@ -271,7 +312,8 @@
{#if $ae_loc.authenticated_access} {#if $ae_loc.authenticated_access}
<!-- Show or hide the session code --> <!-- Show or hide the session code -->
{#if !$events_loc.pres_mgmt.hide__session_code} {#if !$events_loc.pres_mgmt.hide__session_code}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_code = true; $events_loc.pres_mgmt.hide__session_code = true;
}} }}
@@ -284,7 +326,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_code = false; $events_loc.pres_mgmt.hide__session_code = false;
}} }}
@@ -304,7 +347,8 @@
{#if $ae_loc.trusted_access} {#if $ae_loc.trusted_access}
<div class="flex flex-col gap-1 items-center justify-center"> <div class="flex flex-col gap-1 items-center justify-center">
{#if $events_loc.pres_mgmt.show__copy_access_link} {#if $events_loc.pres_mgmt.show__copy_access_link}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show__copy_access_link = false; $events_loc.pres_mgmt.show__copy_access_link = false;
}} }}
@@ -314,7 +358,8 @@
Showing Copy Access Link Showing Copy Access Link
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show__copy_access_link = true; $events_loc.pres_mgmt.show__copy_access_link = true;
}} }}
@@ -326,7 +371,8 @@
{/if} {/if}
{#if $events_loc.pres_mgmt.show__email_access_link} {#if $events_loc.pres_mgmt.show__email_access_link}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show__email_access_link = false; $events_loc.pres_mgmt.show__email_access_link = false;
}} }}
@@ -336,7 +382,8 @@
Showing Email Access Link Showing Email Access Link
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show__email_access_link = true; $events_loc.pres_mgmt.show__email_access_link = true;
}} }}
@@ -352,7 +399,8 @@
{#if $ae_loc.authenticated_access} {#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-end justify-center"> <div class="flex flex-col gap-1 items-end justify-center">
{#if $events_loc.pres_mgmt.show_content__session_qr} {#if $events_loc.pres_mgmt.show_content__session_qr}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_qr = false; $events_loc.pres_mgmt.show_content__session_qr = false;
}} }}
@@ -366,7 +414,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_qr = true; $events_loc.pres_mgmt.show_content__session_qr = true;
}} }}
@@ -382,7 +431,8 @@
{/if} {/if}
{#if $events_loc.pres_mgmt.show_content__presenter_qr} {#if $events_loc.pres_mgmt.show_content__presenter_qr}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr = false; $events_loc.pres_mgmt.show_content__presenter_qr = false;
}} }}
@@ -396,7 +446,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__presenter_qr = true; $events_loc.pres_mgmt.show_content__presenter_qr = true;
}} }}
@@ -417,7 +468,8 @@
{#if $ae_loc.authenticated_access} {#if $ae_loc.authenticated_access}
<div class="flex flex-col gap-1 items-center justify-center"> <div class="flex flex-col gap-1 items-center justify-center">
<!-- Show/Hide launcher links (new version) --> <!-- Show/Hide launcher links (new version) -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__launcher_link = $events_loc.pres_mgmt.hide__launcher_link =
!$events_loc.pres_mgmt.hide__launcher_link; !$events_loc.pres_mgmt.hide__launcher_link;
@@ -438,7 +490,8 @@
</button> </button>
<!-- Show/Hide launcher links (legacy version) --> <!-- Show/Hide launcher links (legacy version) -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__launcher_link_legacy = $events_loc.pres_mgmt.hide__launcher_link_legacy =
!$events_loc.pres_mgmt.hide__launcher_link_legacy; !$events_loc.pres_mgmt.hide__launcher_link_legacy;
@@ -446,7 +499,8 @@
class="btn btn-sm ae_btn_surface justify-between w-full text-center" class="btn btn-sm ae_btn_surface justify-between w-full text-center"
> >
<span <span
class="fas {$events_loc.pres_mgmt.hide__launcher_link_legacy class="fas {$events_loc.pres_mgmt
.hide__launcher_link_legacy
? 'fa-toggle-off' ? 'fa-toggle-off'
: 'fa-toggle-on'} m-1" : 'fa-toggle-on'} m-1"
></span> ></span>
@@ -459,7 +513,8 @@
</button> </button>
<!-- Show/Hide links to the location (room) --> <!-- Show/Hide links to the location (room) -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__location_link = $events_loc.pres_mgmt.hide__location_link =
!$events_loc.pres_mgmt.hide__location_link; !$events_loc.pres_mgmt.hide__location_link;
@@ -480,16 +535,19 @@
</button> </button>
<!-- Show/Hide the Location (room) column in tables and lists --> <!-- Show/Hide the Location (room) column in tables and lists -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_li_location_field = $events_loc.pres_mgmt.hide__session_li_location_field =
!$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 text-center" class="btn btn-sm ae_btn_surface justify-between w-full text-center"
title="Toggle showing the Location column in session lists and tables" title="Toggle showing the Location column in session lists and tables"
> >
<span <span
class="fas {$events_loc.pres_mgmt.hide__session_li_location_field class="fas {$events_loc.pres_mgmt
.hide__session_li_location_field
? 'fa-toggle-off' ? 'fa-toggle-off'
: 'fa-toggle-on'} m-1" : 'fa-toggle-on'} m-1"
></span> ></span>
@@ -502,7 +560,8 @@
</button> </button>
<!-- Show/Hide the POC column in tables and lists --> <!-- Show/Hide the POC column in tables and lists -->
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.hide__session_li_poc_field = $events_loc.pres_mgmt.hide__session_li_poc_field =
!$events_loc.pres_mgmt.hide__session_li_poc_field; !$events_loc.pres_mgmt.hide__session_li_poc_field;
@@ -511,7 +570,8 @@
title="Toggle showing the POC column in session lists and tables" title="Toggle showing the POC column in session lists and tables"
> >
<span <span
class="fas {$events_loc.pres_mgmt.hide__session_li_poc_field class="fas {$events_loc.pres_mgmt
.hide__session_li_poc_field
? 'fa-toggle-off' ? 'fa-toggle-off'
: 'fa-toggle-on'} m-1" : 'fa-toggle-on'} m-1"
></span> ></span>
@@ -524,9 +584,12 @@
</button> </button>
<!-- These are related to more content showing in lists. --> <!-- These are related to more content showing in lists. -->
<span class="flex flex-col flex-wrap gap-1 items-center justify-evenly"> <span
class="flex flex-col flex-wrap gap-1 items-center justify-evenly"
>
{#if $events_loc.pres_mgmt.show_content__session_files} {#if $events_loc.pres_mgmt.show_content__session_files}
<button type="button" <button
type="button"
disabled={!$ae_loc.manager_access} disabled={!$ae_loc.manager_access}
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_files = false; $events_loc.pres_mgmt.show_content__session_files = false;
@@ -540,7 +603,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
disabled={!$ae_loc.manager_access} disabled={!$ae_loc.manager_access}
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_files = true; $events_loc.pres_mgmt.show_content__session_files = true;
@@ -556,7 +620,8 @@
{/if} {/if}
{#if $events_loc.pres_mgmt.show_content__session_presentations} {#if $events_loc.pres_mgmt.show_content__session_presentations}
<button type="button" <button
type="button"
disabled={!$ae_loc.manager_access} disabled={!$ae_loc.manager_access}
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_presentations = false; $events_loc.pres_mgmt.show_content__session_presentations = false;
@@ -570,7 +635,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
disabled={!$ae_loc.manager_access} disabled={!$ae_loc.manager_access}
onclick={() => { onclick={() => {
$events_loc.pres_mgmt.show_content__session_presentations = true; $events_loc.pres_mgmt.show_content__session_presentations = true;
@@ -588,10 +654,13 @@
</div> </div>
{/if} {/if}
<div class="flex flex-row flex-wrap gap-1 items-center justify-evenly max-w-56"> <div
class="flex flex-row flex-wrap gap-1 items-center justify-evenly max-w-56"
>
{#if $ae_loc?.trusted_access} {#if $ae_loc?.trusted_access}
{#if $ae_loc?.edit_mode} {#if $ae_loc?.edit_mode}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$ae_loc.edit_mode = false; $ae_loc.edit_mode = false;
}} }}
@@ -605,7 +674,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$ae_loc.edit_mode = true; $ae_loc.edit_mode = true;
}} }}
@@ -621,7 +691,8 @@
{/if} {/if}
{#if $ae_loc?.adv_mode} {#if $ae_loc?.adv_mode}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$ae_loc.adv_mode = false; $ae_loc.adv_mode = false;
}} }}
@@ -635,7 +706,8 @@
</span> </span>
</button> </button>
{:else} {:else}
<button type="button" <button
type="button"
onclick={() => { onclick={() => {
$ae_loc.adv_mode = true; $ae_loc.adv_mode = true;
}} }}

View File

@@ -89,7 +89,7 @@
}); });
} }
function preventDefault<T extends Event>(fn: (event: T) => void) { function prevent_default<T extends Event>(fn: (event: T) => void) {
return function (event: T) { return function (event: T) {
event.preventDefault(); event.preventDefault();
fn(event); fn(event);
@@ -304,7 +304,7 @@
class:ae_create={!$idaa_slct.archive_id} class:ae_create={!$idaa_slct.archive_id}
bind:clientHeight={$ae_loc.iframe_height_modal_body} bind:clientHeight={$ae_loc.iframe_height_modal_body}
> >
<form onsubmit={preventDefault(handle_submit_form)} class="space-y-1"> <form onsubmit={prevent_default(handle_submit_form)} class="space-y-1">
{#await update_archive_obj_promise} {#await update_archive_obj_promise}
<div class="awaiting alert_msg_pulse" out:fade={{ duration: 2000 }}>Saving...</div> <div class="awaiting alert_msg_pulse" out:fade={{ duration: 2000 }}>Saving...</div>
{:then} {:then}