Adding more options related to session content.

This commit is contained in:
Scott Idem
2024-09-16 14:43:28 -04:00
parent 3a6c462155
commit 1faf7fb18f
5 changed files with 399 additions and 216 deletions

View File

@@ -219,14 +219,24 @@ export function sync_config__event_pres_mgmt(
// Locking the config is targeted at the trusted staff level and below. It is more or less ignored at the global manager and super levels. It may be enforced at the staff admin level?
pres_mgmt_cfg_local.lock_config = pres_mgmt_cfg_remote?.lock_config ?? true; // This disables the sync local config button and options.
pres_mgmt_cfg_local.lock_config = pres_mgmt_cfg_remote?.lock_config ? true : false; // This disables the sync local config button and options.
if (pres_mgmt_cfg_local.lock_config) {
console.log(`The config should be locked! Forcing the sync!`);
// This is to forcibly sync the local config with the remote config.
pres_mgmt_cfg_local.sync_local_config = pres_mgmt_cfg_remote?.sync_local_config ?? true;
pres_mgmt_cfg_local.sync_local_config = true;
} else {
// Do not override the preference for syncing the local config with the remote config.
console.log(`The config is not locked. Currently set to sync: ${pres_mgmt_cfg_local.sync_local_config}`);
// Check if the sync_local_config is undefined versus just false.
if (pres_mgmt_cfg_local?.sync_local_config === undefined) {
pres_mgmt_cfg_local.sync_local_config = true;
} else {
pres_mgmt_cfg_local.sync_local_config = pres_mgmt_cfg_remote?.sync_local_config ?? false;
}
}
// Deal with things that can not be overridden first:
// Labels:
pres_mgmt_cfg_local.label__presenter_external_id = pres_mgmt_cfg_remote?.label__presenter_external_id ?? 'External ID';
@@ -235,21 +245,21 @@ export function sync_config__event_pres_mgmt(
pres_mgmt_cfg_local.label__session_poc_name = pres_mgmt_cfg_remote?.label__session_poc_name ?? 'Point of Contact';
// Hide content:
pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false;
// pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false;
pres_mgmt_cfg_local.hide__presentation_code = pres_mgmt_cfg_remote?.hide__presentation_code ?? false;
// pres_mgmt_cfg_local.hide__presentation_code = pres_mgmt_cfg_remote?.hide__presentation_code ?? false;
pres_mgmt_cfg_local.hide__presenter_code = pres_mgmt_cfg_remote?.hide__presenter_code ?? false;
pres_mgmt_cfg_local.hide__presenter_biography = pres_mgmt_cfg_remote?.hide__presenter_biography ?? false;
// pres_mgmt_cfg_local.hide__presenter_code = pres_mgmt_cfg_remote?.hide__presenter_code ?? false;
// pres_mgmt_cfg_local.hide__presenter_biography = pres_mgmt_cfg_remote?.hide__presenter_biography ?? false;
pres_mgmt_cfg_local.hide__session_code = pres_mgmt_cfg_remote?.hide__session_code ?? false;
pres_mgmt_cfg_local.hide__session_description = pres_mgmt_cfg_remote?.hide__session_description ?? false;
pres_mgmt_cfg_local.hide__session_location = pres_mgmt_cfg_remote?.hide__session_location ?? false;
// pres_mgmt_cfg_local.hide__session_code = pres_mgmt_cfg_remote?.hide__session_code ?? false;
// pres_mgmt_cfg_local.hide__session_description = pres_mgmt_cfg_remote?.hide__session_description ?? false;
// pres_mgmt_cfg_local.hide__session_location = pres_mgmt_cfg_remote?.hide__session_location ?? false;
pres_mgmt_cfg_local.hide__session_poc = pres_mgmt_cfg_remote?.hide__session_poc ?? false;
pres_mgmt_cfg_local.hide__session_poc_profile = pres_mgmt_cfg_remote?.hide__session_poc_profile ?? false; // This should still allow the POC name to be shown.
pres_mgmt_cfg_local.hide__session_poc_biography = pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress
pres_mgmt_cfg_local.hide__session_poc_profile_pic = pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress
// pres_mgmt_cfg_local.hide__session_poc_profile = pres_mgmt_cfg_remote?.hide__session_poc_profile ?? false; // This should still allow the POC name to be shown.
// pres_mgmt_cfg_local.hide__session_poc_biography = pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress
// pres_mgmt_cfg_local.hide__session_poc_profile_pic = pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress
// pres_mgmt_cfg_local.hide__report_kv = pres_mgmt_cfg_remote?.hide__report_kv ?? null;
@@ -261,11 +271,37 @@ export function sync_config__event_pres_mgmt(
pres_mgmt_cfg_local.require__session_agree = pres_mgmt_cfg_remote?.require__session_agree ?? false; // New and in progress
// Show content:
pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false;
pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false;
// pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false;
// pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
// pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false;
// pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false;
// pres_mgmt_cfg_local.show__navigation = pres_mgmt_cfg_remote?.show__navigation ?? false;
// Deal with things that can be overridden:
if (pres_mgmt_cfg_remote?.sync_local_config) {
// Hide content:
pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false;
pres_mgmt_cfg_local.hide__presentation_code = pres_mgmt_cfg_remote?.hide__presentation_code ?? false;
pres_mgmt_cfg_local.hide__presenter_code = pres_mgmt_cfg_remote?.hide__presenter_code ?? false;
pres_mgmt_cfg_local.hide__presenter_biography = pres_mgmt_cfg_remote?.hide__presenter_biography ?? false;
pres_mgmt_cfg_local.hide__session_code = pres_mgmt_cfg_remote?.hide__session_code ?? false;
pres_mgmt_cfg_local.hide__session_description = pres_mgmt_cfg_remote?.hide__session_description ?? false;
pres_mgmt_cfg_local.hide__session_location = pres_mgmt_cfg_remote?.hide__session_location ?? false;
pres_mgmt_cfg_local.hide__session_poc_profile = pres_mgmt_cfg_remote?.hide__session_poc_profile ?? false; // This should still allow the POC name to be shown.
pres_mgmt_cfg_local.hide__session_poc_biography = pres_mgmt_cfg_remote?.hide__session_poc_biography ?? false; // New and in progress
pres_mgmt_cfg_local.hide__session_poc_profile_pic = pres_mgmt_cfg_remote?.hide__session_poc_profile_pic ?? false; // New and in progress
pres_mgmt_cfg_local.show__copy_access_link = pres_mgmt_cfg_remote?.show__copy_access_link ?? false;
pres_mgmt_cfg_local.show__email_access_link = pres_mgmt_cfg_remote?.show__email_access_link ?? false;
pres_mgmt_cfg_local.show__launcher_link = pres_mgmt_cfg_remote?.show__launcher_link ?? false;
pres_mgmt_cfg_local.show__launcher_link_legacy = pres_mgmt_cfg_remote?.show__launcher_link_legacy ?? false;
}
if (log_lvl) {
console.log(`pres_mgmt_cfg_local:`, pres_mgmt_cfg_local);
}

View File

@@ -60,6 +60,7 @@ export let ae_app_local_data_struct: key_val = {
debug: false, // A simple flag to know if we should show debug information.
edit_mode: false, // A simple flag to know if we should show edit mode options.
sync_local_config: true, // A simple flag to know if we should sync local config with the remote API server.
'account_id': ae_account_id, // OSIT Demo _XY7DXtc9MY
'account_code': 'not_set',

View File

@@ -5,7 +5,8 @@ import { createEventDispatcher, onMount, tick } from 'svelte';
import { ae_util } from '$lib/ae_utils';
import { ae_loc, ae_sess, ae_api, slct, slct_trigger } from '$lib/ae_stores';
// import { events_loc } from '$lib/ae_events_stores';
// Ideally the Event related stores should not be imported here?
import { events_loc } from '$lib/ae_events_stores';
// import { db_events } from "$lib/db_events";
let entered_passcode: null|string = null;
@@ -194,24 +195,68 @@ function dispatch_edit_mode_changed() {
<div>
{#if $ae_loc.trusted_access}
{#if $ae_loc.manager_access}
{#if $ae_loc?.sync_local_config}
<button
type="button"
on:click={() => {
$ae_loc.sync_local_config = false;
$events_loc.pres_mgmt.sync_local_config = false;
// dispatch_sync_local_config_changed();
// tick();
return false;
}}
class="btn btn-sm variant-ghost-success hover:variant-filled-success transition-all hover:transition-all *:hover:inline"
title="Syncing the local configuration with the remote configuration."
>
<span class="fas fa-sync m-1"></span>
<span class="hidden">
Sync
</span>
</button>
{:else}
<button
type="button"
on:click={() => {
$ae_loc.sync_local_config = true;
$events_loc.pres_mgmt.sync_local_config = true;
// dispatch_sync_local_config_changed();
// tick();
return true;
}}
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning transition-all hover:transition-all *:hover:inline"
title="Currently not syncing with the remote server. Re-sync the local configuration with the remote configuration?"
>
<span class="fas fa-unlink m-1"></span>
<span class="hidden">
Re-sync?
</span>
</button>
{/if}
{/if}
{#if $ae_loc.edit_mode}
<button
type="button"
on:click={() => {
$ae_loc.edit_mode = false;
dispatch_edit_mode_changed();
}}
class="btn btn-sm variant-ghost-success hover:variant-filled-success"
title="Edit mode is currently enabled. Click to disable."
>
<span class="fas fa-toggle-on mx-1"></span>
Edit Mode On
</button>
{:else}
<button
type="button"
on:click={() => {
$ae_loc.edit_mode = true;
dispatch_edit_mode_changed();
}}
class="btn btn-sm variant-ghost-warning hover:variant-filled-warning"
title="Edit mode is currently disabled. Click to enable."
>
<span class="fas fa-toggle-off mx-1"></span>
Edit Mode?
@@ -247,6 +292,7 @@ function dispatch_edit_mode_changed() {
{/if}
<button
type="button"
class="btn btn-sm variant-ghost-success hover:variant-filled-success access_type_lock_btn transition-all hover:transition-all"
on:click={() => {
handle_clear_access();
@@ -257,6 +303,7 @@ function dispatch_edit_mode_changed() {
</button>
{:else}
<button
type="button"
class="btn btn-sm variant-glass-success hover:variant-filled-warning access_type_unlock_btn transition-all hover:transition-all"
on:click={async () => {
show_passcode_input = !show_passcode_input;

View File

@@ -198,199 +198,288 @@ let ae_triggers: key_val = {};
</button>
</Element_ae_crud>
<Element_ae_crud
trigger_patch={ae_triggers.priority}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'priority'}
field_type={'button'}
field_value={ae_tmp.value__priority}
allow_null={true}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={'m-1'}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
<div class="flex flex-col gap-1 items-center justify-around">
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
});
}}
>
<!-- {@html $lq__event_session_obj?.priority ? '<span class="fas fa-star m-1"></span> High Priority' : '<span class="far fa-star m-1"></span> Priority not set'} -->
<button
on:click={() => {
ae_tmp.value__priority = !$lq__event_session_obj?.priority;
<Element_ae_crud
trigger_patch={ae_triggers.priority}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'priority'}
field_type={'button'}
field_value={ae_tmp.value__priority}
allow_null={true}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={''}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
// $events_slct.exhibit_tracking_obj.priority = !$lq__event_session_obj?.priority;
ae_triggers.priority = true;
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
});
}}
class="btn btn-sm m-1 transition-all hover:transition-all *:hover:inline"
class:variant-ringed-surface={!$lq__event_session_obj?.priority}
class:variant-ghost-success={$lq__event_session_obj?.priority}
>
{#if $lq__event_session_obj?.priority}
<span class="fas fa-star m-1"></span>
<!-- <span class="fas fa-arrow-down m-1"></span> -->
<span class="hidden">
Not Priority?
</span>
{:else}
<!-- <span class="fas fa-toggle-off m-1"></span> -->
<span class="far fa-star m-1"></span>
<span class="hidden">
Priority
</span>
?
{/if}
</button>
</Element_ae_crud>
<Element_ae_crud
trigger_patch={ae_triggers.hide}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'hide'}
field_type={'button'}
field_value={ae_tmp.value__hide}
allow_null={false}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={'m-1'}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
});
}}
>
<!-- {($lq__event_session_obj?.hide ? 'Hidden' : 'Not Hidden')} -->
<button
on:click={() => {
ae_tmp.value__hide = !$lq__event_session_obj?.hide;
// $events_slct.exhibit_tracking_obj.hide = !$lq__event_session_obj?.hide;
ae_triggers.hide = true;
}}
class="btn btn-sm m-1 transition-all hover:transition-all *:hover:inline"
class:variant-ghost-success={!$lq__event_session_obj?.hide}
class:variant-ringed-warning={$lq__event_session_obj?.hide}
disabled={!$ae_loc.trusted_access}
>
{#if $lq__event_session_obj?.hide}
<span class="fas fa-toggle-on m-1"></span>
Unhide?
{:else}
<!-- <span class="fas fa-toggle-off m-1"></span> -->
<span class="fas fa-eye m-1"></span>
<span class="hidden">
Not Hidden
</span>
{/if}
<!-- {@html ($lq__event_session_obj?.hide ? '<span class="fas fa-eye m-1"></span> Unhide?' : '<span class="fas fa-eye-slash m-1"></span> Hide?')} -->
</button>
</Element_ae_crud>
<!-- Enable/Disable -->
<Element_ae_crud
trigger_patch={ae_triggers.enable}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'enable'}
field_type={'button'}
field_value={ae_tmp.value__enable}
allow_null={false}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={'m-1'}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
})
.then(function (load_results) {
// Maybe reload page?
// window.location.reload();
});
}}
>
<!-- {($lq__event_session_obj?.enable ? 'Enabled' : 'Disabled')} -->
<button
on:click={() => {
ae_tmp.value__enable = !$lq__event_session_obj?.enable;
// $events_slct.exhibit_tracking_obj.hide = !$lq__event_session_obj?.hide;
ae_triggers.enable = true;
}}
class="btn btn-sm"
class:variant-ghost-success={$lq__event_session_obj?.enable}
class:variant-ringed-warning={!$lq__event_session_obj?.enable}
disabled={!$ae_loc.manager_access}
>
{#if $lq__event_session_obj?.enable}
<span class="fas fa-toggle-on m-1"></span>
Enabled
{:else}
<span class="fas fa-toggle-off m-1"></span>
Enable?
{/if}
<!-- {@html ($lq__event_session_obj?.enable ? '<span class="fas fa-toggle-on m-1"></span> Disable?' : '<span class="fas fa-toggle-off m-1"></span> Enable?')} -->
</button>
</Element_ae_crud>
<!-- Sort -->
<!-- Group -->
{#if $ae_loc.authenticated_access}
{#if $events_loc.pres_mgmt.show_content__session_qr}
<!-- {@html $lq__event_session_obj?.priority ? '<span class="fas fa-star m-1"></span> High Priority' : '<span class="far fa-star m-1"></span> Priority not set'} -->
<button
on:click={() => {
$events_loc.pres_mgmt.show_content__session_qr = false;
ae_tmp.value__priority = !$lq__event_session_obj?.priority;
// $events_slct.exhibit_tracking_obj.priority = !$lq__event_session_obj?.priority;
ae_triggers.priority = true;
}}
class="btn btn-sm variant-ghost-success"
class="btn btn-sm transition-all hover:transition-all *:hover:inline"
class:variant-ringed-surface={!$lq__event_session_obj?.priority}
class:variant-ghost-success={$lq__event_session_obj?.priority}
>
<span class="fas fa-toggle-on m-1"></span>
Showing QR Code
{#if $lq__event_session_obj?.priority}
<span class="fas fa-star m-1"></span>
<!-- <span class="fas fa-arrow-down m-1"></span> -->
<span class="hidden">
Not Priority?
</span>
{:else}
<!-- <span class="fas fa-toggle-off m-1"></span> -->
<span class="far fa-star m-1"></span>
<span class="hidden">
Priority
</span>
?
{/if}
</button>
{:else}
</Element_ae_crud>
<Element_ae_crud
trigger_patch={ae_triggers.hide}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'hide'}
field_type={'button'}
field_value={ae_tmp.value__hide}
allow_null={false}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={''}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
});
}}
>
<!-- {($lq__event_session_obj?.hide ? 'Hidden' : 'Not Hidden')} -->
<button
on:click={() => {
$events_loc.pres_mgmt.show_content__session_qr = true;
ae_tmp.value__hide = !$lq__event_session_obj?.hide;
// $events_slct.exhibit_tracking_obj.hide = !$lq__event_session_obj?.hide;
ae_triggers.hide = true;
}}
class="btn btn-sm variant-ringed-warning"
class="btn btn-sm transition-all hover:transition-all *:hover:inline"
class:variant-ghost-success={!$lq__event_session_obj?.hide}
class:variant-ringed-warning={$lq__event_session_obj?.hide}
disabled={!$ae_loc.trusted_access}
>
<span class="fas fa-toggle-off m-1"></span>
Show QR Code?
{#if $lq__event_session_obj?.hide}
<span class="fas fa-toggle-on m-1"></span>
Unhide?
{:else}
<!-- <span class="fas fa-toggle-off m-1"></span> -->
<span class="fas fa-eye m-1"></span>
<span class="hidden">
Not Hidden
</span>
{/if}
<!-- {@html ($lq__event_session_obj?.hide ? '<span class="fas fa-eye m-1"></span> Unhide?' : '<span class="fas fa-eye-slash m-1"></span> Hide?')} -->
</button>
</Element_ae_crud>
<!-- Enable/Disable -->
<Element_ae_crud
trigger_patch={ae_triggers.enable}
api_cfg={$ae_api}
object_type={'event_session'}
object_id={$lq__event_session_obj?.event_session_id_random}
field_name={'enable'}
field_type={'button'}
field_value={ae_tmp.value__enable}
allow_null={false}
hide_edit_btn={true}
outline_element={false}
show_crud={false}
display_inline={true}
class_li={''}
on:ae_crud_updated={e => {
console.log(`ae_crud_updated:`, e.detail);
events_func.load_ae_obj_id__event_session({
api_cfg: $ae_api,
event_session_id: $lq__event_session_obj?.event_session_id_random,
log_lvl: log_lvl
})
.then(function (load_results) {
// Maybe reload page?
// window.location.reload();
});
}}
>
<!-- {($lq__event_session_obj?.enable ? 'Enabled' : 'Disabled')} -->
<button
on:click={() => {
ae_tmp.value__enable = !$lq__event_session_obj?.enable;
// $events_slct.exhibit_tracking_obj.hide = !$lq__event_session_obj?.hide;
ae_triggers.enable = true;
}}
class="btn btn-sm transition-all hover:transition-all"
class:variant-ghost-success={$lq__event_session_obj?.enable}
class:variant-ringed-warning={!$lq__event_session_obj?.enable}
disabled={!$ae_loc.manager_access}
>
{#if $lq__event_session_obj?.enable}
<span class="fas fa-toggle-on m-1"></span>
Enabled
{:else}
<span class="fas fa-toggle-off m-1"></span>
Enable?
{/if}
<!-- {@html ($lq__event_session_obj?.enable ? '<span class="fas fa-toggle-on m-1"></span> Disable?' : '<span class="fas fa-toggle-off m-1"></span> Enable?')} -->
</button>
</Element_ae_crud>
<!-- Sort -->
<!-- Group -->
</div>
<div class="flex flex-col gap-1 items-center">
{#if $ae_loc.authenticated_access}
{#if !$events_loc.pres_mgmt.hide__session_code}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.hide__session_code = true;
}}
class="btn btn-sm variant-ghost-success"
>
<span class="fas fa-toggle-on m-1"></span>
Showing Session Code
</button>
{:else}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.hide__session_code = false;
}}
class="btn btn-sm variant-ringed-warning"
>
<span class="fas fa-toggle-off m-1"></span>
Show Session Code?
</button>
{/if}
{/if}
{/if}
{#if $ae_loc.trusted_access}
{#if $events_loc.pres_mgmt.show__copy_access_link}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show__copy_access_link = false;
}}
class="btn btn-sm variant-ghost-success"
>
<span class="fas fa-toggle-on m-1"></span>
Showing Copy Access Link
</button>
{:else}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show__copy_access_link = true;
}}
class="btn btn-sm variant-ringed-warning"
>
<span class="fas fa-toggle-off m-1"></span>
Show Copy Access Link?
</button>
{/if}
{/if}
{#if $ae_loc.trusted_access}
{#if $events_loc.pres_mgmt.show__email_access_link}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show__email_access_link = false;
}}
class="btn btn-sm variant-ghost-success"
>
<span class="fas fa-toggle-on m-1"></span>
Showing Email Access Link
</button>
{:else}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show__email_access_link = true;
}}
class="btn btn-sm variant-ringed-warning"
>
<span class="fas fa-toggle-off m-1"></span>
Show Email Access Link?
</button>
{/if}
{/if}
{#if $ae_loc.authenticated_access}
{#if $events_loc.pres_mgmt.show_content__session_qr}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show_content__session_qr = false;
}}
class="btn btn-sm variant-ghost-success"
>
<span class="fas fa-toggle-on m-1"></span>
Showing QR Code
</button>
{:else}
<button
type="button"
on:click={() => {
$events_loc.pres_mgmt.show_content__session_qr = true;
}}
class="btn btn-sm variant-ringed-warning"
>
<span class="fas fa-toggle-off m-1"></span>
Show QR Code?
</button>
{/if}
{/if}
</div>
{#if $ae_loc.trusted_access}
{#if $ae_loc.edit_mode}
<button
type="button"
on:click={() => {
$ae_loc.edit_mode = false;
}}
@@ -402,6 +491,7 @@ let ae_triggers: key_val = {};
</button>
{:else}
<button
type="button"
on:click={() => {
$ae_loc.edit_mode = true;
}}

View File

@@ -185,7 +185,7 @@ $: if ($lq__event_session_obj) {
});
}}
>
<strong class="text-sm">Name/Title:</strong> {$lq__event_session_obj.name}
<strong class="text-sm">Name/title:</strong> {$lq__event_session_obj.name}
</Element_ae_crud>
{#if !$events_loc.pres_mgmt?.hide__session_code}
@@ -226,7 +226,27 @@ $: if ($lq__event_session_obj) {
{/if}
</li>
<li>
<strong class="text-sm">Date time:</strong>
<strong class="text-sm">
Date
&amp;
<button
type="button"
on:click={() => {
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';
} 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';
}
}}
>
time
</button>
:</strong>
<span class="fas fa-calendar-alt"></span>
<Element_ae_crud
api_cfg={$ae_api}
object_type={'event_session'}
@@ -252,22 +272,7 @@ $: if ($lq__event_session_obj) {
}}
>
{ae_util.iso_datetime_formatter($lq__event_session_obj.start_datetime, 'dddd')},
<button
type="button"
on:click={() => {
if ($events_loc.launcher.time_hours == 12) {
$events_loc.launcher.time_hours = 24;
$events_loc.launcher.datetime_format = 'datetime_long';
$events_loc.launcher.time_format = 'time_short';
} else {
$events_loc.launcher.time_hours = 12;
$events_loc.launcher.datetime_format = 'datetime_12_long';
$events_loc.launcher.time_format = 'time_12_short';
}
}}
>
{ae_util.iso_datetime_formatter($lq__event_session_obj.start_datetime, $events_loc.launcher.datetime_format)}
</button>
{ae_util.iso_datetime_formatter($lq__event_session_obj.start_datetime, $events_loc.pres_mgmt.datetime_format)}
</Element_ae_crud>
-
<Element_ae_crud
@@ -294,11 +299,11 @@ $: if ($lq__event_session_obj) {
// $events_trig_kv['event_session_id'] = $lq__event_session_obj?.event_session_id_random;
}}
>
{ae_util.iso_datetime_formatter($lq__event_session_obj.end_datetime, $events_loc.launcher.time_format)}
{ae_util.iso_datetime_formatter($lq__event_session_obj.end_datetime, $events_loc.pres_mgmt.time_format)}
</Element_ae_crud>
</li>
<li>
<strong class="text-sm">Location/Room:</strong>
<strong class="text-sm">Location/room:</strong>
<!-- Minimum level access to see the link here is trusted. Administrators can see even if the show launcher link is disabled. -->
<!-- BEGIN: Legacy link -->
@@ -451,7 +456,7 @@ $: if ($lq__event_session_obj) {
class="text-blue-500 hover:text-blue-800 hover:underline"
title="View Person: {$lq__event_session_obj?.poc_person_full_name} {$lq__event_session_obj?.poc_person_id_random}"
>
{@html $lq__event_session_obj.poc_person_full_name ? $lq__event_session_obj.poc_person_full_name : ae_snip.html__not_set}
{@html $lq__event_session_obj?.poc_person_full_name ? $lq__event_session_obj.poc_person_full_name : ae_snip.html__not_set}
</a>
{/if}
@@ -463,8 +468,8 @@ $: if ($lq__event_session_obj) {
class="btn btn-sm variant-soft-primary hover:variant-filled-primary"
on:click={() => ($events_sess.pres_mgmt.show__session_poc_profile = true)}>
<span class="fas fa-id-card m-1"></span>
{$events_loc.pres_mgmt?.label__session_poc_name}'s
Profile
<!-- {$events_loc.pres_mgmt?.label__session_poc_name}'s -->
{$lq__event_session_obj?.poc_person_full_name}'s Profile
</button>
<!-- Main modal -->
@@ -706,7 +711,10 @@ $: if ($lq__event_session_obj) {
{#if $events_loc.auth__kv.session[$events_slct.event_session_id] === true}
<span class="text-green-500">Signed In</span>
{/if}
{#if $lq__event_session_obj.poc_person_primary_email && ($ae_loc.trusted_access || !$events_loc.auth__person.id && $events_loc.pres_mgmt?.show__email_access_link)}
{#if $events_loc.pres_mgmt?.show__email_access_link
&& $lq__event_session_obj.poc_person_primary_email
&& ($ae_loc.trusted_access || !$events_loc.auth__kv.session[$lq__event_session_obj?.event_session_id_random])
}
<button
type="button"
@@ -736,7 +744,7 @@ $: if ($lq__event_session_obj) {
}
);
}}
class="btn btn-sm variant-ghost-primary hover:variant-filled-primary"
class="btn btn-sm variant-ghost-secondary hover:variant-filled-secondary"
title="Email the access link to the POC (moderator/champion)"
>
<span class="fas fa-envelope mx-1"></span>
@@ -745,7 +753,8 @@ $: if ($lq__event_session_obj) {
{/if}
{#if $lq__event_session_obj.poc_person_id_random && $ae_loc.trusted_access}
{#if $events_loc.pres_mgmt?.show__copy_access_link
&& ($ae_loc.trusted_access || $lq__event_session_obj.poc_person_id_random)}
<!-- A button to copy the access link to the clipboard. -->
<!-- Example: /events_pres_mgmt/session/Wh8UnJlbIA0?person_id=fV1dl_IJ0yY&person_pass=abc123 -->
<button