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:
@@ -133,11 +133,21 @@ export async function create_event_file_obj_from_hosted_file_async({
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
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 };
|
||||
if (return_obj) query_params['return_obj'] = 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;
|
||||
return result?.event_file_id || result?.id || result?.event_file_id_random;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
|
||||
// *** Import other supporting libraries
|
||||
// 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 type { key_val } from '$lib/stores/ae_stores';
|
||||
@@ -76,7 +82,9 @@
|
||||
|
||||
function scroll_container() {
|
||||
return (
|
||||
document.getElementById('ae_main_content') || document.documentElement || document.body
|
||||
document.getElementById('ae_main_content') ||
|
||||
document.documentElement ||
|
||||
document.body
|
||||
);
|
||||
}
|
||||
|
||||
@@ -121,10 +129,10 @@
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
{#if $events_loc?.ver && $events_loc?.ver !== $events_sess?.ver}
|
||||
<div class="fixed inset-0 bg-pink-100/80 z-40">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="
|
||||
fixed top-16 left-0 right-0 z-50 p-4 m-8 sm:mx-16 md:mx-32
|
||||
btn btn-lg rounded-2xl
|
||||
@@ -148,7 +156,9 @@
|
||||
localStorage.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 });
|
||||
|
||||
@@ -160,7 +170,9 @@
|
||||
<span class="m-4 sm:mx-8 text-wrap">
|
||||
New Events Module Version Available!<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 class="fas fa-sync-alt fa-spin m-1"></span>
|
||||
|
||||
@@ -219,14 +231,17 @@
|
||||
>
|
||||
<span class="justify-self-start">
|
||||
<!-- Be sure to explain what Æ (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>
|
||||
</span>
|
||||
{#if !$ae_sess?.disable_sys_header}
|
||||
<Element_data_store
|
||||
ds_code="hub__site__appshell_header"
|
||||
ds_type="html"
|
||||
/>
|
||||
/>
|
||||
{/if}
|
||||
<a
|
||||
href="/"
|
||||
@@ -269,7 +284,8 @@
|
||||
"
|
||||
>
|
||||
<!-- Scroll to top button -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="
|
||||
ae_btn_success_outlined
|
||||
|
||||
@@ -298,7 +314,8 @@
|
||||
</button>
|
||||
|
||||
<!-- Scroll to bottom button -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="
|
||||
ae_btn_success_outlined
|
||||
|
||||
|
||||
@@ -6,8 +6,18 @@
|
||||
|
||||
import { liveQuery } from 'dexie';
|
||||
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 { events_loc, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
import {
|
||||
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 { page } from '$app/stores';
|
||||
@@ -60,17 +70,22 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<h2 class="h3">Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}</h2>
|
||||
<h2 class="h3">
|
||||
Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}
|
||||
</h2>
|
||||
|
||||
{#if $ae_loc.administrator_access}
|
||||
<h3 class="h4">Administrator Access - Technical Support</h3>
|
||||
<p>
|
||||
You are accessing the presentation management system with "administrator" level permissions.
|
||||
You are accessing the presentation management system with
|
||||
"administrator" level permissions.
|
||||
</p>
|
||||
{:else if $ae_loc.trusted_access}
|
||||
<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}
|
||||
<h3 class="h4">Restricted Access</h3>
|
||||
<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.length}
|
||||
<ul class="space-y-2">
|
||||
{#each $lq__event_obj_li as event_obj}
|
||||
<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. -->
|
||||
{#if new Date(event_obj.start_datetime ?? '').getTime() > new Date().getTime() - 1000 * 60 * 60 * 24 * 30 * 8 || $ae_loc.trusted_access}
|
||||
<span>
|
||||
@@ -131,7 +147,9 @@
|
||||
{/if}
|
||||
</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}
|
||||
<a
|
||||
data-sveltekit-reload
|
||||
@@ -178,12 +196,18 @@
|
||||
{/each}
|
||||
</ul>
|
||||
<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}
|
||||
>Previous</button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
onclick={prev_page}
|
||||
disabled={current_page === 1}>Previous</button
|
||||
>
|
||||
<span>Page {current_page} of {total_pages}</span>
|
||||
<button type="button" class="btn btn-sm" onclick={next_page} disabled={current_page === total_pages}
|
||||
>Next</button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
onclick={next_page}
|
||||
disabled={current_page === total_pages}>Next</button
|
||||
>
|
||||
</div>
|
||||
{:else}
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
// Guard: Only allow administrators in edit mode
|
||||
if (!$ae_loc.administrator_access || !$ae_loc.edit_mode) {
|
||||
if (browser) {
|
||||
alert('Access Denied: Administrative privileges and Edit Mode required.');
|
||||
alert(
|
||||
'Access Denied: Administrative privileges and Edit Mode required.'
|
||||
);
|
||||
goto(`/events/${event_id}`);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +55,8 @@
|
||||
if (field_name === 'basic_fields') {
|
||||
data_kv = data;
|
||||
} 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 };
|
||||
}
|
||||
|
||||
@@ -66,7 +69,9 @@
|
||||
alert('Settings saved successfully!');
|
||||
} catch (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>
|
||||
@@ -76,16 +81,27 @@
|
||||
{#if event_obj}
|
||||
<div class="space-y-4">
|
||||
<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="card p-4 border rounded-md text-center">
|
||||
<h4 class="h4">Badge Operations</h4>
|
||||
<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
|
||||
</button>
|
||||
<button 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
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +119,8 @@
|
||||
href={`/events/${event_id}/badges/print_list?badge_type_code=guest&printed_status=not_printed`}
|
||||
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
|
||||
href={`/events/${event_id}/badges/print_list`}
|
||||
@@ -125,7 +142,8 @@
|
||||
href={`/events/${event_id}/badges/stats`}
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -145,9 +163,15 @@
|
||||
<summary class="summary">General Config (cfg_json)</summary>
|
||||
<div class="p-4">
|
||||
<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>
|
||||
{#if cfg_json_view === 'form'}
|
||||
@@ -164,10 +188,12 @@
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
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
|
||||
>
|
||||
{/if}
|
||||
@@ -175,35 +201,52 @@
|
||||
</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="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
|
||||
>
|
||||
<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
|
||||
>
|
||||
</div>
|
||||
{#if pres_mgmt_json_view === 'form'}
|
||||
<Ae_comp_event_settings_pres_mgmt_form
|
||||
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}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
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}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
onclick={() => {
|
||||
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
|
||||
>
|
||||
{/if}
|
||||
@@ -214,31 +257,45 @@
|
||||
<summary class="summary">Badges (mod_badges_json)</summary>
|
||||
<div class="p-4">
|
||||
<div class="flex justify-end">
|
||||
<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 = 'form')}>Form</button
|
||||
>
|
||||
<button type="button" class="btn btn-sm" onclick={() => (badges_json_view = 'json')}
|
||||
>JSON</button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm"
|
||||
onclick={() => (badges_json_view = 'json')}>JSON</button
|
||||
>
|
||||
</div>
|
||||
{#if badges_json_view === 'form'}
|
||||
<Ae_comp_event_settings_badges_form
|
||||
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}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
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}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
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
|
||||
>
|
||||
{/if}
|
||||
@@ -249,32 +306,47 @@
|
||||
<summary class="summary">Abstracts (mod_abstracts_json)</summary>
|
||||
<div class="p-4">
|
||||
<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
|
||||
>
|
||||
<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
|
||||
>
|
||||
</div>
|
||||
{#if abstracts_json_view === 'form'}
|
||||
<Ae_comp_event_settings_abstracts_form
|
||||
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}
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
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}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
onclick={() => {
|
||||
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
|
||||
>
|
||||
{/if}
|
||||
@@ -286,16 +358,25 @@
|
||||
<div class="p-4">
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
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}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
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
|
||||
>
|
||||
</div>
|
||||
@@ -306,16 +387,25 @@
|
||||
<div class="p-4">
|
||||
<AE_Comp_Editor_CodeMirror
|
||||
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}
|
||||
show_line_numbers={true}
|
||||
placeholder="JSON config"
|
||||
class_li="p-1 preset-outlined-success-400-600 shadow-lg rounded-lg"
|
||||
/>
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
class="btn preset-tonal-primary"
|
||||
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
|
||||
>
|
||||
</div>
|
||||
@@ -330,7 +420,7 @@
|
||||
<div class="card p-4">
|
||||
<h3 class="h3">Create New Badge</h3>
|
||||
<Comp_badge_create_form
|
||||
event_id={event_id}
|
||||
{event_id}
|
||||
on:success={() => {
|
||||
show_create_badge_modal = false;
|
||||
}}
|
||||
@@ -345,7 +435,7 @@
|
||||
<div class="card p-4">
|
||||
<h3 class="h3">Upload Badges (CSV)</h3>
|
||||
<Comp_badge_upload_form
|
||||
event_id={event_id}
|
||||
{event_id}
|
||||
on:success={() => {
|
||||
show_upload_badge_modal = false;
|
||||
}}
|
||||
|
||||
@@ -97,5 +97,7 @@
|
||||
</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>
|
||||
|
||||
@@ -71,13 +71,21 @@
|
||||
<div>
|
||||
<label class="label">
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
@@ -92,5 +100,7 @@
|
||||
</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>
|
||||
|
||||
@@ -28,20 +28,26 @@
|
||||
</div>
|
||||
<div>
|
||||
<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>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span>Summary</span>
|
||||
<textarea class="textarea" bind:value={event_obj.summary}></textarea>
|
||||
<textarea class="textarea" bind:value={event_obj.summary}
|
||||
></textarea>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<span>Description</span>
|
||||
<textarea class="textarea" bind:value={event_obj.description}></textarea>
|
||||
<textarea class="textarea" bind:value={event_obj.description}
|
||||
></textarea>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
@@ -53,13 +59,21 @@
|
||||
<div>
|
||||
<label class="label">
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label">
|
||||
<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>
|
||||
</div>
|
||||
<div>
|
||||
@@ -68,5 +82,7 @@
|
||||
<textarea class="textarea" bind:value={event_obj.notes}></textarea>
|
||||
</label>
|
||||
</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>
|
||||
|
||||
@@ -26,5 +26,7 @@
|
||||
<input type="text" class="input" bind:value={cfg_json.med_name} />
|
||||
</label>
|
||||
</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>
|
||||
|
||||
@@ -140,5 +140,7 @@
|
||||
</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>
|
||||
|
||||
@@ -111,11 +111,15 @@
|
||||
let csv_row = [];
|
||||
csv_row.push(ae_obj_li[i].event_file_id);
|
||||
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].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(
|
||||
@@ -135,8 +139,16 @@
|
||||
: ''
|
||||
);
|
||||
|
||||
csv_row.push(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_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_start_datetime
|
||||
@@ -148,7 +160,9 @@
|
||||
);
|
||||
|
||||
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(
|
||||
@@ -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_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(
|
||||
@@ -189,17 +209,24 @@
|
||||
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 download_link = document.createElement('a');
|
||||
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.textContent = 'Download CSV';
|
||||
|
||||
// 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
|
||||
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 $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">
|
||||
<header class="flex flex-row flex-wrap gap-1 items-center justify-between">
|
||||
<div
|
||||
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">
|
||||
<span class="text-base"> Results: </span>
|
||||
|
||||
{#if $lq__event_file_obj_li.length}
|
||||
<span
|
||||
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>
|
||||
{$lq__event_file_obj_li.length ?? 'None'}×
|
||||
@@ -236,14 +270,21 @@
|
||||
class="flex flex-row flex-wrap gap-1 items-center justify-end"
|
||||
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"
|
||||
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;
|
||||
}
|
||||
|
||||
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);
|
||||
}}
|
||||
>
|
||||
@@ -253,7 +294,8 @@
|
||||
<span id="download_csv_container"></span>
|
||||
|
||||
{#if show_session_fields}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
show_session_fields = !show_session_fields;
|
||||
}}
|
||||
@@ -266,7 +308,8 @@
|
||||
Showing Session Fields
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
show_session_fields = !show_session_fields;
|
||||
}}
|
||||
@@ -282,7 +325,8 @@
|
||||
|
||||
<!-- Show or hide the session code -->
|
||||
{#if !hide_session_code}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
hide_session_code = true;
|
||||
}}
|
||||
@@ -293,7 +337,8 @@
|
||||
Showing Session Code
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
hide_session_code = false;
|
||||
}}
|
||||
@@ -306,9 +351,11 @@
|
||||
{/if}
|
||||
|
||||
{#if show_presentation_fields}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
show_presentation_fields = !show_presentation_fields;
|
||||
show_presentation_fields =
|
||||
!show_presentation_fields;
|
||||
}}
|
||||
class="btn btn-sm {show_presentation_fields
|
||||
? 'ae_btn_surface'
|
||||
@@ -319,9 +366,11 @@
|
||||
Showing Presentation Fields
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
show_presentation_fields = !show_presentation_fields;
|
||||
show_presentation_fields =
|
||||
!show_presentation_fields;
|
||||
}}
|
||||
class="btn btn-sm {show_presentation_fields
|
||||
? 'ae_btn_surface'
|
||||
@@ -335,21 +384,33 @@
|
||||
</div>
|
||||
</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="">
|
||||
<tr>
|
||||
<th class="px-4 py-2">
|
||||
Filename
|
||||
<!-- ({$lq__event_file_obj_li?.length}×) -->
|
||||
</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">Uploaded</th>
|
||||
{#if show_location_fields}
|
||||
<th class="px-4 py-2">Location</th>
|
||||
{/if}
|
||||
{#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">Start datetime</th>
|
||||
{/if}
|
||||
@@ -370,7 +431,7 @@
|
||||
hosted_file_id={event_file_obj?.hosted_file_id}
|
||||
hosted_file_obj={event_file_obj}
|
||||
show_divider={true}
|
||||
show_direct_download={show_direct_download}
|
||||
{show_direct_download}
|
||||
max_filename={50}
|
||||
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="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
|
||||
href="{$ae_api.base_url}/event/file/{event_file_obj?.event_file_id}/download?filename={ae_util.clean_filename(
|
||||
event_file_obj?.filename
|
||||
@@ -392,7 +455,8 @@
|
||||
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}`}
|
||||
>
|
||||
<span class="fas fa-download mx-1"></span>
|
||||
<span class="fas fa-download mx-1"
|
||||
></span>
|
||||
<span class="hidden"> Download </span>
|
||||
</a>
|
||||
<!-- <button type="button"
|
||||
@@ -412,7 +476,8 @@
|
||||
)}
|
||||
btn_text="Copy Link"
|
||||
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"
|
||||
></MyClipboard>
|
||||
@@ -422,17 +487,25 @@
|
||||
class="flex flex-row gap-0.5"
|
||||
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
|
||||
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)
|
||||
.substring(0, 20)}-{ae_util.clean_filename(
|
||||
.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}&key={$ae_api.account_id}"
|
||||
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}`}
|
||||
>
|
||||
<span class="fas fa-download mx-1"></span>
|
||||
<span class="fas fa-download mx-1"
|
||||
></span>
|
||||
<span class="hidden"> Renamed </span>
|
||||
</a>
|
||||
<!-- <button type="button"
|
||||
@@ -464,14 +537,20 @@
|
||||
</span>
|
||||
<a
|
||||
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)
|
||||
.substring(0, 20)}-{ae_util.clean_filename(
|
||||
.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}&key=${$ae_api.account_id}"
|
||||
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}`}
|
||||
>
|
||||
<span class="fas fa-download mx-1"></span>
|
||||
<span class="fas fa-download mx-1"
|
||||
></span>
|
||||
<span class="hidden"> Renamed </span>
|
||||
</a>
|
||||
<!-- <button type="button"
|
||||
@@ -495,7 +574,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<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">
|
||||
<div>
|
||||
@@ -513,18 +594,27 @@
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class:bg-yellow-200={ae_util.is_datetime_recent({
|
||||
datetime: event_file_obj?.created_on,
|
||||
minutes: 30
|
||||
})}
|
||||
class:bg-green-200={ae_util.is_datetime_recent({
|
||||
datetime: event_file_obj?.created_on,
|
||||
minutes: 240
|
||||
})}
|
||||
class:bg-blue-200={ae_util.is_datetime_recent({
|
||||
datetime: event_file_obj?.created_on,
|
||||
minutes: 2880
|
||||
})}
|
||||
class:bg-yellow-200={ae_util.is_datetime_recent(
|
||||
{
|
||||
datetime:
|
||||
event_file_obj?.created_on,
|
||||
minutes: 30
|
||||
}
|
||||
)}
|
||||
class:bg-green-200={ae_util.is_datetime_recent(
|
||||
{
|
||||
datetime:
|
||||
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(
|
||||
event_file_obj?.created_on,
|
||||
@@ -544,11 +634,16 @@
|
||||
{/if}
|
||||
|
||||
{#if show_session_fields}
|
||||
<td class="px-4 py-2 lg:text-xs" class:hidden={hide_session_code}>
|
||||
{event_file_obj?.event_session_code ?? '-- not set --'}
|
||||
<td
|
||||
class="px-4 py-2 lg:text-xs"
|
||||
class:hidden={hide_session_code}
|
||||
>
|
||||
{event_file_obj?.event_session_code ??
|
||||
'-- not set --'}
|
||||
</td>
|
||||
<td class="px-4 py-2 lg:text-xs">
|
||||
<span class="fas fa-chalkboard-teacher"></span>
|
||||
<span class="fas fa-chalkboard-teacher"
|
||||
></span>
|
||||
<a
|
||||
href="/events/{event_file_obj?.event_id}/session/{event_file_obj?.event_session_id}"
|
||||
class="text-blue-500 underline hover:text-blue-800"
|
||||
|
||||
@@ -72,14 +72,17 @@
|
||||
// }
|
||||
if (event_file_obj_li?.length) {
|
||||
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.
|
||||
|
||||
for (let i = 0; i < event_file_obj_li.length; 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);
|
||||
}
|
||||
|
||||
@@ -103,7 +106,8 @@
|
||||
// Check if results are different than the current session version stored under $events_slct
|
||||
if (
|
||||
$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];
|
||||
if (log_lvl) {
|
||||
|
||||
@@ -83,7 +83,9 @@
|
||||
upload_complete = false;
|
||||
|
||||
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) {
|
||||
// Sequential upload to provide reliable progress and avoid server race conditions
|
||||
@@ -126,7 +128,10 @@
|
||||
input_upload_files: any[];
|
||||
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();
|
||||
form_data.append('account_id', $ae_loc.account_id);
|
||||
@@ -161,12 +166,14 @@
|
||||
};
|
||||
|
||||
// STEP 2: Create Event File Link
|
||||
return await events_func.create_event_file_obj_from_hosted_file_async({
|
||||
api_cfg: $ae_api,
|
||||
hosted_file_id: hosted_file_id,
|
||||
data: event_file_data,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
return await events_func.create_event_file_obj_from_hosted_file_async(
|
||||
{
|
||||
api_cfg: $ae_api,
|
||||
hosted_file_id: hosted_file_id,
|
||||
data: event_file_data,
|
||||
log_lvl: log_lvl
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(function (error: any) {
|
||||
console.error('Upload Process Failed:', error);
|
||||
@@ -216,9 +223,13 @@
|
||||
{#if label}{@render label()}{:else}
|
||||
<div class="flex items-center justify-center gap-2 mb-2 pt-2">
|
||||
<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 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 />
|
||||
(PPTX, Keynote, PDF, MP4, etc)
|
||||
</div>
|
||||
@@ -281,11 +292,14 @@
|
||||
<span class="text-sm"> Upload </span>
|
||||
<span class="grow font-bold ml-2">
|
||||
{#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}
|
||||
<span class="text-xs"> 0 </span>
|
||||
{/if}
|
||||
</span>
|
||||
{/await}
|
||||
</button>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
>
|
||||
<div class="float-right flex flex-row items-center">
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Add Presentation');
|
||||
if (
|
||||
@@ -108,7 +109,8 @@
|
||||
{#if $lq__event_presentation_obj_li?.length}
|
||||
<span
|
||||
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>
|
||||
{$lq__event_presentation_obj_li.length ?? 'None'}×
|
||||
@@ -131,7 +133,8 @@
|
||||
<li class="space-y-2 border border-gray-200 p-2 rounded-md">
|
||||
<div class="float-right space-2 flex flex-row items-center">
|
||||
{#if $ae_loc.trusted_access && $ae_loc.edit_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Add Presenter');
|
||||
if (
|
||||
@@ -155,7 +158,8 @@
|
||||
events_func.create_ae_obj__event_presenter({
|
||||
api_cfg: $ae_api,
|
||||
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_obj.event_presentation_id,
|
||||
data_kv: presenter_data,
|
||||
@@ -173,7 +177,8 @@
|
||||
<h4 class="h5 rounded-md p-2 preset-filled-surface-300-700">
|
||||
<span
|
||||
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"
|
||||
>
|
||||
{ae_util.iso_datetime_formatter(
|
||||
@@ -197,7 +202,8 @@
|
||||
field_type={'text'}
|
||||
field_value={event_presentation_obj?.name}
|
||||
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}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -235,7 +241,8 @@
|
||||
field_type={'text'}
|
||||
field_value={event_presentation_obj?.code}
|
||||
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}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -265,13 +272,19 @@
|
||||
>
|
||||
<span class="fas fa-barcode"></span>
|
||||
{event_presentation_obj?.code ?? ''}
|
||||
{event_presentation_obj?.abstract_code ?? ''}
|
||||
{event_presentation_obj?.abstract_code ??
|
||||
''}
|
||||
</span>
|
||||
{: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>
|
||||
Code:
|
||||
<span class="" title="No code provided for this presentation">
|
||||
<span
|
||||
class=""
|
||||
title="No code provided for this presentation"
|
||||
>
|
||||
{@html event_presentation_obj?.code ??
|
||||
ae_snip.html__not_set}
|
||||
</span>
|
||||
@@ -281,19 +294,32 @@
|
||||
<!-- Can not edit the abstract code here at this time. -->
|
||||
</h4>
|
||||
|
||||
<div class:hidden={!($ae_loc.trusted_access && $ae_loc.edit_mode)}>
|
||||
<span class="text-sm text-semibold text-success-800-400">
|
||||
<div
|
||||
class:hidden={!(
|
||||
$ae_loc.trusted_access && $ae_loc.edit_mode
|
||||
)}
|
||||
>
|
||||
<span
|
||||
class="text-sm text-semibold text-success-800-400"
|
||||
>
|
||||
Date &
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
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.datetime_format = 'datetime_long';
|
||||
$events_loc.pres_mgmt.time_format = 'time_short';
|
||||
$events_loc.pres_mgmt.datetime_format =
|
||||
'datetime_long';
|
||||
$events_loc.pres_mgmt.time_format =
|
||||
'time_short';
|
||||
} else {
|
||||
$events_loc.pres_mgmt.time_hours = 12;
|
||||
$events_loc.pres_mgmt.datetime_format = 'datetime_12_long';
|
||||
$events_loc.pres_mgmt.time_format = 'time_12_short';
|
||||
$events_loc.pres_mgmt.datetime_format =
|
||||
'datetime_12_long';
|
||||
$events_loc.pres_mgmt.time_format =
|
||||
'time_12_short';
|
||||
}
|
||||
}}
|
||||
>
|
||||
@@ -301,7 +327,8 @@
|
||||
</button>
|
||||
:</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
|
||||
api_cfg={$ae_api}
|
||||
object_type={'event_presentation'}
|
||||
@@ -310,7 +337,8 @@
|
||||
field_type={'datetime'}
|
||||
field_value={event_presentation_obj.start_datetime}
|
||||
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}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -347,7 +375,8 @@
|
||||
field_type={'datetime'}
|
||||
field_value={event_presentation_obj.end_datetime}
|
||||
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}
|
||||
show_crud={false}
|
||||
display_inline={true}
|
||||
@@ -384,7 +413,8 @@
|
||||
field_type={'textarea'}
|
||||
field_value={event_presentation_obj?.description}
|
||||
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}
|
||||
show_crud={false}
|
||||
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:
|
||||
</span>
|
||||
|
||||
{#if event_presentation_obj?.description}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
console.log('Show/Hide Description');
|
||||
if (
|
||||
@@ -419,7 +452,8 @@
|
||||
null;
|
||||
|
||||
// Was testing with LiveQuery
|
||||
$events_slct.event_presentation_id = null;
|
||||
$events_slct.event_presentation_id =
|
||||
null;
|
||||
} else {
|
||||
$events_sess.pres_mgmt.show_content__presentation_description =
|
||||
event_presentation_obj.event_presentation_id;
|
||||
@@ -432,7 +466,8 @@
|
||||
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}
|
||||
<span class="fas fa-eye-slash mx-1"></span>
|
||||
<span class="fas fa-eye-slash mx-1"
|
||||
></span>
|
||||
<span>Hide Description</span>
|
||||
{:else}
|
||||
<span class="fas fa-eye mx-1"></span>
|
||||
@@ -473,8 +508,12 @@
|
||||
<Element_manage_event_file_li_wrap
|
||||
link_to_type={'event_presentation'}
|
||||
link_to_id={event_presentation_obj?.event_presentation_id}
|
||||
allow_basic={$events_loc.auth__kv.session[$events_slct.event_session_id] ||
|
||||
$events_loc.auth__kv.presenter[$events_slct.event_presenter_id]}
|
||||
allow_basic={$events_loc.auth__kv.session[
|
||||
$events_slct.event_session_id
|
||||
] ||
|
||||
$events_loc.auth__kv.presenter[
|
||||
$events_slct.event_presenter_id
|
||||
]}
|
||||
allow_moderator={$events_loc.auth__kv.session[
|
||||
$events_slct.event_session_id
|
||||
]}
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
}: Props = $props();
|
||||
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import {
|
||||
LoaderCircle,
|
||||
Presentation,
|
||||
Check,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Mail,
|
||||
MapPin,
|
||||
User,
|
||||
ChevronDown,
|
||||
import {
|
||||
LoaderCircle,
|
||||
Presentation,
|
||||
Check,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Mail,
|
||||
MapPin,
|
||||
User,
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
SendHorizontal,
|
||||
Rocket,
|
||||
@@ -49,7 +49,7 @@
|
||||
CalendarDays,
|
||||
Clock
|
||||
} from 'lucide-svelte';
|
||||
|
||||
|
||||
import Element_ae_crud_v2 from '$lib/elements/element_ae_crud_v2.svelte';
|
||||
import Comp_event_presenter_obj_li from './[event_id]/(pres_mgmt)/presenter/ae_comp__event_presenter_obj_li_wrapper.svelte';
|
||||
import Element_manage_event_file_li from '$lib/elements/element_manage_event_file_li_direct.svelte';
|
||||
@@ -57,65 +57,67 @@
|
||||
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
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({});
|
||||
|
||||
// Derived list of visible items (Standardized Pattern 2026-01-27)
|
||||
let visible_session_obj_li = $derived((() => {
|
||||
const list = $lq__event_session_obj_li;
|
||||
if (list === undefined || list === null) return null;
|
||||
if (!Array.isArray(list)) return [];
|
||||
|
||||
const filtered = list.filter((item: any) => {
|
||||
if (!item) return false;
|
||||
if ($ae_loc.trusted_access) return true;
|
||||
return !item.hide;
|
||||
});
|
||||
let visible_session_obj_li = $derived(
|
||||
(() => {
|
||||
const list = $lq__event_session_obj_li;
|
||||
if (list === undefined || list === null) return null;
|
||||
if (!Array.isArray(list)) return [];
|
||||
|
||||
if (log_lvl) console.log(`visible_session_obj_li: Input=${list.length}, Output=${filtered.length}`);
|
||||
return filtered;
|
||||
})());
|
||||
const filtered = list.filter((item: any) => {
|
||||
if (!item) return false;
|
||||
if ($ae_loc.trusted_access) return true;
|
||||
return !item.hide;
|
||||
});
|
||||
|
||||
if (log_lvl)
|
||||
console.log(
|
||||
`visible_session_obj_li: Input=${list.length}, Output=${filtered.length}`
|
||||
);
|
||||
return filtered;
|
||||
})()
|
||||
);
|
||||
|
||||
function toggle_details(id: string) {
|
||||
show_details_kv[id] = !show_details_kv[id];
|
||||
}
|
||||
</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}
|
||||
|
||||
<div class="flex flex-col items-center justify-center p-10 opacity-50">
|
||||
|
||||
<LoaderCircle size="3em" class="animate-spin mb-2" />
|
||||
|
||||
<p>Loading sessions...</p>
|
||||
|
||||
</div>
|
||||
|
||||
{: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">
|
||||
|
||||
<h2 class="text-sm text-gray-500 font-normal"> Sessions: </h2>
|
||||
|
||||
<span class="badge preset-tonal-success font-bold text-lg px-3 py-1">
|
||||
|
||||
{visible_session_obj_li.length}<span class="text-gray-400 dark:text-gray-600">×</span>
|
||||
|
||||
<span
|
||||
class="badge preset-tonal-success font-bold text-lg px-3 py-1"
|
||||
>
|
||||
{visible_session_obj_li.length}<span
|
||||
class="text-gray-400 dark:text-gray-600">×</span
|
||||
>
|
||||
</span>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
<table class="table table-auto table-striped w-full">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr class="bg-surface-100-900">
|
||||
|
||||
<th>Session</th>
|
||||
|
||||
<th class="hidden md:table-cell">Schedule</th>
|
||||
@@ -124,286 +126,261 @@
|
||||
|
||||
<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>
|
||||
|
||||
</thead>
|
||||
|
||||
<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)}
|
||||
|
||||
<tr class="relative" class:opacity-50={session_obj?.hide} class:variant-soft-warning={!session_obj?.enable}>
|
||||
|
||||
<tr
|
||||
class="relative"
|
||||
class:opacity-50={session_obj?.hide}
|
||||
class:variant-soft-warning={!session_obj?.enable}
|
||||
>
|
||||
<td>
|
||||
|
||||
{#if session_obj?.alert && $ae_loc.trusted_access}
|
||||
|
||||
<Comp_event_session_alert
|
||||
|
||||
event_session_obj={session_obj}
|
||||
|
||||
{log_lvl}
|
||||
|
||||
/>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
|
||||
<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
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
||||
|
||||
<span>{session_obj?.name}</span>
|
||||
|
||||
{#if session_obj?.file_count_all}
|
||||
|
||||
<span class="badge preset-tonal-success flex items-center gap-1 text-xs py-0 px-1">
|
||||
|
||||
<span
|
||||
class="badge preset-tonal-success flex items-center gap-1 text-xs py-0 px-1"
|
||||
>
|
||||
<Check size="1em" />
|
||||
|
||||
{session_obj.file_count_all}
|
||||
|
||||
</span>
|
||||
|
||||
{/if}
|
||||
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
{#if (show__session_presentations || show__session_files) && $ae_loc.manager_access}
|
||||
|
||||
<button type="button"
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-icon btn-sm variant-soft-surface"
|
||||
|
||||
onclick={() => toggle_details(session_obj.event_session_id)}
|
||||
|
||||
onclick={() =>
|
||||
toggle_details(
|
||||
session_obj.event_session_id
|
||||
)}
|
||||
>
|
||||
|
||||
{#if show_details_kv[session_obj.event_session_id]}
|
||||
|
||||
<ChevronUp size="1.2em" />
|
||||
|
||||
{:else}
|
||||
|
||||
<ChevronDown size="1.2em" />
|
||||
|
||||
{/if}
|
||||
|
||||
</button>
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Mobile Schedule Summary -->
|
||||
|
||||
<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"><Clock size="1em" /> {ae_util.iso_datetime_formatter(session_obj?.start_datetime, 'time_12_short')}</span>
|
||||
<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"
|
||||
><Clock size="1em" />
|
||||
{ae_util.iso_datetime_formatter(
|
||||
session_obj?.start_datetime,
|
||||
'time_12_short'
|
||||
)}</span
|
||||
>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{#if show_details_kv[session_obj.event_session_id]}
|
||||
|
||||
<div class="p-2 bg-surface-500/5 rounded-lg border border-surface-500/10 mt-1">
|
||||
|
||||
<div
|
||||
class="p-2 bg-surface-500/5 rounded-lg border border-surface-500/10 mt-1"
|
||||
>
|
||||
{#if show__session_presentations && $ae_loc.manager_access}
|
||||
|
||||
<Comp_event_presenter_obj_li
|
||||
|
||||
link_to_type={'event_session'}
|
||||
|
||||
link_to_id={session_obj?.event_session_id}
|
||||
|
||||
display_mode={'minimal'}
|
||||
|
||||
{log_lvl}
|
||||
|
||||
/>
|
||||
|
||||
{/if}
|
||||
|
||||
{#if show__session_files && $ae_loc.manager_access}
|
||||
|
||||
<Element_manage_event_file_li
|
||||
|
||||
link_to_type={'event_session'}
|
||||
|
||||
link_to_id={session_obj?.event_session_id}
|
||||
|
||||
allow_basic={true}
|
||||
|
||||
allow_moderator={true}
|
||||
|
||||
display_mode={'minimal'}
|
||||
|
||||
/>
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class="hidden md:table-cell">
|
||||
|
||||
<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(session_obj?.start_datetime, 'time_12_short')} – {ae_util.iso_datetime_formatter(session_obj?.end_datetime, 'time_12_short')}</span>
|
||||
|
||||
<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
|
||||
>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class:hidden={hide__session_location}>
|
||||
|
||||
<div class="flex flex-col gap-1 min-w-32">
|
||||
|
||||
<span class="text-xs font-semibold">{session_obj?.event_location_name ?? '--'}</span>
|
||||
<span class="text-xs font-semibold"
|
||||
>{session_obj?.event_location_name ??
|
||||
'--'}</span
|
||||
>
|
||||
|
||||
<div class="flex gap-1">
|
||||
|
||||
{#if !hide__launcher_link}
|
||||
|
||||
<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>
|
||||
|
||||
<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 !hide__location_link}
|
||||
|
||||
<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>
|
||||
|
||||
<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}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class:hidden={hide__session_poc}>
|
||||
|
||||
<div class="flex flex-col text-xs min-w-32">
|
||||
|
||||
{#if 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>
|
||||
<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}
|
||||
|
||||
<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>
|
||||
|
||||
<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}
|
||||
|
||||
{:else}
|
||||
|
||||
<span class="opacity-30">--</span>
|
||||
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td class:hidden={!$ae_loc.edit_mode || !$ae_loc.adv_mode || hide__admin}>
|
||||
|
||||
<td
|
||||
class:hidden={!$ae_loc.edit_mode ||
|
||||
!$ae_loc.adv_mode ||
|
||||
hide__admin}
|
||||
>
|
||||
<div class="flex gap-1">
|
||||
|
||||
<button type="button"
|
||||
|
||||
class="btn btn-icon btn-xs {session_obj?.hide ? '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 })}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-icon btn-xs {session_obj?.hide
|
||||
? '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
|
||||
})}
|
||||
>
|
||||
|
||||
{#if session_obj?.hide}<EyeOff size="1.2em" />{:else}<Eye size="1.2em" />{/if}
|
||||
|
||||
{#if session_obj?.hide}<EyeOff
|
||||
size="1.2em"
|
||||
/>{:else}<Eye size="1.2em" />{/if}
|
||||
</button>
|
||||
|
||||
<button type="button"
|
||||
|
||||
class="btn btn-icon btn-xs {session_obj?.alert ? 'preset-tonal-warning' : '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 })}
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-icon btn-xs {session_obj?.alert
|
||||
? 'preset-tonal-warning'
|
||||
: '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 size="1.2em" />{:else}<BellOff size="1.2em" />{/if}
|
||||
|
||||
{#if session_obj?.alert}<Bell
|
||||
size="1.2em"
|
||||
/>{:else}<BellOff size="1.2em" />{/if}
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{/each}
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
{:else}
|
||||
|
||||
<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">
|
||||
|
||||
<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"
|
||||
>
|
||||
<FileSearch size="3em" class="mb-2 opacity-20 mx-auto" />
|
||||
|
||||
<p class="text-xl">No sessions found matching your criteria.</p>
|
||||
|
||||
<p class="text-sm">Try adjusting your filters or search terms.</p>
|
||||
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -46,8 +46,10 @@
|
||||
.sortBy('start_datetime');
|
||||
return results;
|
||||
} else if (event_session_id_random_li.length > 0) {
|
||||
const results = await db_events.session.bulkGet(event_session_id_random_li);
|
||||
return results.filter(item => item !== undefined);
|
||||
const results = await db_events.session.bulkGet(
|
||||
event_session_id_random_li
|
||||
);
|
||||
return results.filter((item) => item !== undefined);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
@@ -64,4 +66,4 @@
|
||||
{hide__launcher_link}
|
||||
{hide__location_link}
|
||||
{log_lvl}
|
||||
></Comp_event_session_obj_li>
|
||||
></Comp_event_session_obj_li>
|
||||
|
||||
@@ -62,14 +62,19 @@
|
||||
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}
|
||||
<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">
|
||||
<span class="text-base"> Results: </span>
|
||||
|
||||
{#if $lq__event_session_obj_li?.length}
|
||||
<span
|
||||
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>
|
||||
{$lq__event_session_obj_li.length ?? 'None'}×
|
||||
@@ -77,7 +82,9 @@
|
||||
{/if}
|
||||
</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="">
|
||||
<tr>
|
||||
<th class="px-4 py-2">Name</th>
|
||||
|
||||
@@ -57,19 +57,24 @@
|
||||
|
||||
if (event_session_obj_li?.length) {
|
||||
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.
|
||||
|
||||
for (let i = 0; i < event_session_obj_li.length; 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);
|
||||
}
|
||||
|
||||
// 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) {
|
||||
console.log(
|
||||
@@ -88,7 +93,8 @@
|
||||
// Check if results are different than the current session version stored under $events_slct
|
||||
if (
|
||||
$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];
|
||||
if (log_lvl) {
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
<span
|
||||
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>
|
||||
Æ Core
|
||||
</a>
|
||||
|
||||
@@ -24,11 +24,16 @@
|
||||
</script>
|
||||
|
||||
<!-- 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">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
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"
|
||||
>
|
||||
@@ -54,8 +59,13 @@
|
||||
<div 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 -->
|
||||
<span class="flex flex-row gap-1 items-center justify-around w-full">
|
||||
<label class="text-sm w-32 text-right" for="qry_limit__people">
|
||||
<span
|
||||
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:
|
||||
</label>
|
||||
<!-- Not using: $events_loc.pres_mgmt.qry_limit__people -->
|
||||
@@ -79,13 +89,20 @@
|
||||
</span>
|
||||
|
||||
<!-- Max presenters select options -->
|
||||
<span class="flex flex-row gap-1 items-center justify-around w-full">
|
||||
<label class="text-sm w-32 text-right" for="qry_limit__presenters">
|
||||
<span
|
||||
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:
|
||||
</label>
|
||||
<select
|
||||
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"
|
||||
>
|
||||
<option value="">-- not set --</option>
|
||||
@@ -104,13 +121,20 @@
|
||||
</span>
|
||||
|
||||
<!-- Max sessions select options -->
|
||||
<span class="flex flex-row gap-1 items-center justify-around w-full">
|
||||
<label class="text-sm w-32 text-right" for="qry_limit__sessions">
|
||||
<span
|
||||
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:
|
||||
</label>
|
||||
<select
|
||||
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"
|
||||
>
|
||||
<option value="">-- not set --</option>
|
||||
@@ -124,8 +148,13 @@
|
||||
</span>
|
||||
|
||||
<!-- Max files select options -->
|
||||
<span class="flex flex-row gap-1 items-center justify-around w-full">
|
||||
<label class="text-sm w-32 text-right" for="qry_limit__files">
|
||||
<span
|
||||
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:
|
||||
</label>
|
||||
<select
|
||||
@@ -147,7 +176,8 @@
|
||||
<span class="flex flex-col gap-1 items-end justify-center">
|
||||
<!-- Toggle between the showing hidden sessions -->
|
||||
<!-- qry_hidden = all, not_hidden, hidden -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
if ($events_loc.pres_mgmt.qry_hidden == 'all') {
|
||||
$events_loc.pres_mgmt.qry_hidden = 'not_hidden';
|
||||
@@ -159,7 +189,8 @@
|
||||
title="Toggle between showing hidden sessions"
|
||||
>
|
||||
<span
|
||||
class="fas {$events_loc.pres_mgmt.qry_hidden == 'all'
|
||||
class="fas {$events_loc.pres_mgmt.qry_hidden ==
|
||||
'all'
|
||||
? 'fa-toggle-on'
|
||||
: 'fa-toggle-off'} m-1"
|
||||
></span>
|
||||
@@ -179,10 +210,14 @@
|
||||
<!-- Toggle between the showing disabled sessions -->
|
||||
<!-- qry_enabled = all, enabled -->
|
||||
{#if $ae_loc.manager_access}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
if ($events_loc.pres_mgmt.qry_enabled == 'all') {
|
||||
$events_loc.pres_mgmt.qry_enabled = 'enabled';
|
||||
if (
|
||||
$events_loc.pres_mgmt.qry_enabled == 'all'
|
||||
) {
|
||||
$events_loc.pres_mgmt.qry_enabled =
|
||||
'enabled';
|
||||
} else {
|
||||
$events_loc.pres_mgmt.qry_enabled = 'all';
|
||||
}
|
||||
@@ -191,7 +226,8 @@
|
||||
title="Toggle between showing disabled sessions"
|
||||
>
|
||||
<span
|
||||
class="fas {$events_loc.pres_mgmt.qry_enabled == 'all'
|
||||
class="fas {$events_loc.pres_mgmt.qry_enabled ==
|
||||
'all'
|
||||
? 'fa-toggle-on'
|
||||
: 'fa-toggle-off'} m-1"
|
||||
></span>
|
||||
@@ -202,7 +238,8 @@
|
||||
</span>
|
||||
{:else}
|
||||
<span class="grow">
|
||||
<span class="fas fa-check-circle m-1"></span>
|
||||
<span class="fas fa-check-circle m-1"
|
||||
></span>
|
||||
Show Disabled Sessions?
|
||||
</span>
|
||||
{/if}
|
||||
@@ -213,14 +250,16 @@
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col flex-wrap gap-1 items-center justify-evenly">
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.save_search_text =
|
||||
!$events_loc.pres_mgmt.save_search_text;
|
||||
}}
|
||||
class="btn btn-sm justify-between w-full text-center"
|
||||
class:ae_btn_surface={$events_loc.pres_mgmt.save_search_text}
|
||||
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt.save_search_text}
|
||||
class:ae_btn_surface_outlined={!$events_loc.pres_mgmt
|
||||
.save_search_text}
|
||||
title="Save the search text for this session search?"
|
||||
>
|
||||
{#if $events_loc.pres_mgmt.save_search_text}
|
||||
@@ -240,7 +279,8 @@
|
||||
|
||||
{#if $ae_loc.authenticated_access}
|
||||
{#if !$events_loc.pres_mgmt.hide__session_msg}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__session_msg = true;
|
||||
}}
|
||||
@@ -253,7 +293,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__session_msg = false;
|
||||
}}
|
||||
@@ -271,7 +312,8 @@
|
||||
{#if $ae_loc.authenticated_access}
|
||||
<!-- Show or hide the session code -->
|
||||
{#if !$events_loc.pres_mgmt.hide__session_code}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__session_code = true;
|
||||
}}
|
||||
@@ -284,7 +326,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__session_code = false;
|
||||
}}
|
||||
@@ -304,7 +347,8 @@
|
||||
{#if $ae_loc.trusted_access}
|
||||
<div class="flex flex-col gap-1 items-center justify-center">
|
||||
{#if $events_loc.pres_mgmt.show__copy_access_link}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show__copy_access_link = false;
|
||||
}}
|
||||
@@ -314,7 +358,8 @@
|
||||
Showing Copy Access Link
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show__copy_access_link = true;
|
||||
}}
|
||||
@@ -326,7 +371,8 @@
|
||||
{/if}
|
||||
|
||||
{#if $events_loc.pres_mgmt.show__email_access_link}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show__email_access_link = false;
|
||||
}}
|
||||
@@ -336,7 +382,8 @@
|
||||
Showing Email Access Link
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show__email_access_link = true;
|
||||
}}
|
||||
@@ -352,7 +399,8 @@
|
||||
{#if $ae_loc.authenticated_access}
|
||||
<div class="flex flex-col gap-1 items-end justify-center">
|
||||
{#if $events_loc.pres_mgmt.show_content__session_qr}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_qr = false;
|
||||
}}
|
||||
@@ -366,7 +414,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_qr = true;
|
||||
}}
|
||||
@@ -382,7 +431,8 @@
|
||||
{/if}
|
||||
|
||||
{#if $events_loc.pres_mgmt.show_content__presenter_qr}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__presenter_qr = false;
|
||||
}}
|
||||
@@ -396,7 +446,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__presenter_qr = true;
|
||||
}}
|
||||
@@ -417,7 +468,8 @@
|
||||
{#if $ae_loc.authenticated_access}
|
||||
<div class="flex flex-col gap-1 items-center justify-center">
|
||||
<!-- Show/Hide launcher links (new version) -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__launcher_link =
|
||||
!$events_loc.pres_mgmt.hide__launcher_link;
|
||||
@@ -438,7 +490,8 @@
|
||||
</button>
|
||||
|
||||
<!-- Show/Hide launcher links (legacy version) -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$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"
|
||||
>
|
||||
<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-on'} m-1"
|
||||
></span>
|
||||
@@ -459,7 +513,8 @@
|
||||
</button>
|
||||
|
||||
<!-- Show/Hide links to the location (room) -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.hide__location_link =
|
||||
!$events_loc.pres_mgmt.hide__location_link;
|
||||
@@ -480,16 +535,19 @@
|
||||
</button>
|
||||
|
||||
<!-- Show/Hide the Location (room) column in tables and lists -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
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;
|
||||
}}
|
||||
class="btn btn-sm ae_btn_surface justify-between w-full text-center"
|
||||
title="Toggle showing the Location column in session lists and tables"
|
||||
>
|
||||
<span
|
||||
class="fas {$events_loc.pres_mgmt.hide__session_li_location_field
|
||||
class="fas {$events_loc.pres_mgmt
|
||||
.hide__session_li_location_field
|
||||
? 'fa-toggle-off'
|
||||
: 'fa-toggle-on'} m-1"
|
||||
></span>
|
||||
@@ -502,7 +560,8 @@
|
||||
</button>
|
||||
|
||||
<!-- Show/Hide the POC column in tables and lists -->
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$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"
|
||||
>
|
||||
<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-on'} m-1"
|
||||
></span>
|
||||
@@ -524,9 +584,12 @@
|
||||
</button>
|
||||
|
||||
<!-- 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}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.manager_access}
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_files = false;
|
||||
@@ -540,7 +603,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.manager_access}
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_files = true;
|
||||
@@ -556,7 +620,8 @@
|
||||
{/if}
|
||||
|
||||
{#if $events_loc.pres_mgmt.show_content__session_presentations}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.manager_access}
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_presentations = false;
|
||||
@@ -570,7 +635,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.manager_access}
|
||||
onclick={() => {
|
||||
$events_loc.pres_mgmt.show_content__session_presentations = true;
|
||||
@@ -588,10 +654,13 @@
|
||||
</div>
|
||||
{/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?.edit_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$ae_loc.edit_mode = false;
|
||||
}}
|
||||
@@ -605,7 +674,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$ae_loc.edit_mode = true;
|
||||
}}
|
||||
@@ -621,7 +691,8 @@
|
||||
{/if}
|
||||
|
||||
{#if $ae_loc?.adv_mode}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$ae_loc.adv_mode = false;
|
||||
}}
|
||||
@@ -635,7 +706,8 @@
|
||||
</span>
|
||||
</button>
|
||||
{:else}
|
||||
<button type="button"
|
||||
<button
|
||||
type="button"
|
||||
onclick={() => {
|
||||
$ae_loc.adv_mode = true;
|
||||
}}
|
||||
|
||||
@@ -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) {
|
||||
event.preventDefault();
|
||||
fn(event);
|
||||
@@ -304,7 +304,7 @@
|
||||
class:ae_create={!$idaa_slct.archive_id}
|
||||
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}
|
||||
<div class="awaiting alert_msg_pulse" out:fade={{ duration: 2000 }}>Saving...</div>
|
||||
{:then}
|
||||
|
||||
Reference in New Issue
Block a user