I should have committed this earlier. Lots of changes to use LiveQuery and better menus.
This commit is contained in:
@@ -215,25 +215,8 @@ export function sync_config__event_pres_mgmt(
|
||||
log_lvl?: number
|
||||
}
|
||||
) {
|
||||
console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote);
|
||||
|
||||
|
||||
// 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 : 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 = 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;
|
||||
}
|
||||
if (log_lvl) {
|
||||
console.log(`*** sync_config__event_pres_mgmt() *** pres_mgmt_cfg_remote:`, pres_mgmt_cfg_remote);
|
||||
}
|
||||
|
||||
// Deal with things that can not be overridden first:
|
||||
@@ -245,21 +228,8 @@ 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__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 = 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__report_kv = pres_mgmt_cfg_remote?.hide__report_kv ?? null;
|
||||
|
||||
@@ -271,15 +241,33 @@ 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__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:
|
||||
|
||||
// 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 : 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 = 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) {
|
||||
// pres_mgmt_cfg_local.sync_local_config = true;
|
||||
// } else {
|
||||
// pres_mgmt_cfg_local.sync_local_config = pres_mgmt_cfg_remote?.sync_local_config ?? false;
|
||||
// }
|
||||
}
|
||||
|
||||
if (pres_mgmt_cfg_local?.sync_local_config) {
|
||||
if (log_lvl) {
|
||||
console.log(`Syncing the local config with the remote config!!!`);
|
||||
}
|
||||
// Hide content:
|
||||
pres_mgmt_cfg_local.hide__location_code = pres_mgmt_cfg_remote?.hide__location_code ?? false;
|
||||
|
||||
|
||||
@@ -177,9 +177,10 @@ let events_local_data_struct: key_val = {
|
||||
|
||||
},
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
'pres_mgmt': {
|
||||
// Presentation Management
|
||||
pres_mgmt: {
|
||||
sync_local_config: true,
|
||||
lock_config: false,
|
||||
|
||||
datetime_format: 'datetime_12_long',
|
||||
time_format: 'time_12_short',
|
||||
@@ -203,7 +204,7 @@ let events_local_data_struct: key_val = {
|
||||
show_content__launcher_link: false,
|
||||
show_content__location_link: false,
|
||||
show_content__location_qr: false,
|
||||
show_content__presentation_description: false,
|
||||
show_content__presentation_description: false, // Note that this is for *all* presentations in the user interface. It is a global setting.
|
||||
show_content__presenter_page_help: true,
|
||||
// show_content__presenter_start: false,
|
||||
show_content__presenter_view: null,
|
||||
@@ -379,8 +380,17 @@ let events_session_data_struct: key_val = {
|
||||
'btn_10_license_rental': 'buy_btn_1OvrPs2gJkNsDuiN1nPkjPOM',
|
||||
},
|
||||
|
||||
// Presentation Management (Distributing)
|
||||
'pres_mgmt': {
|
||||
// Presentation Management
|
||||
pres_mgmt: {
|
||||
// link: {
|
||||
// ae_core: true,
|
||||
// pres_mgmt__launcher_id: null, // event_location_id
|
||||
// pres_mgmt__location_id: null, // event_location_id
|
||||
// pres_mgmt__presenter_id: null, // event_presenter_id
|
||||
// pres_mgmt__reports: null, // event_id
|
||||
// pres_mgmt__session_id: null, // event_session_id
|
||||
// pres_mgmt__session_search: null, // event_id
|
||||
// },
|
||||
// presenter__url_str: null,
|
||||
presenter__updated_on: null,
|
||||
session_updated_on: null,
|
||||
@@ -397,6 +407,8 @@ let events_session_data_struct: key_val = {
|
||||
show_content__agree_text: false,
|
||||
show_content__presenter_start: false,
|
||||
|
||||
show_content__presentation_description: false, // Note that this is per presentation. The event_presentation_id_random should match.
|
||||
|
||||
show_report__presenters_agree: false,
|
||||
show_report__recent_files: false,
|
||||
|
||||
|
||||
@@ -202,6 +202,10 @@ function dispatch_edit_mode_changed() {
|
||||
on:click={() => {
|
||||
$ae_loc.sync_local_config = false;
|
||||
$events_loc.pres_mgmt.sync_local_config = false;
|
||||
|
||||
$ae_loc.lock_config = false;
|
||||
$events_loc.pres_mgmt.lock_config = false;
|
||||
|
||||
// dispatch_sync_local_config_changed();
|
||||
// tick();
|
||||
return false;
|
||||
@@ -220,6 +224,10 @@ function dispatch_edit_mode_changed() {
|
||||
on:click={() => {
|
||||
$ae_loc.sync_local_config = true;
|
||||
$events_loc.pres_mgmt.sync_local_config = true;
|
||||
|
||||
$ae_loc.lock_config = true;
|
||||
$events_loc.pres_mgmt.lock_config = true;
|
||||
|
||||
// dispatch_sync_local_config_changed();
|
||||
// tick();
|
||||
return true;
|
||||
|
||||
@@ -27,7 +27,7 @@ export let try_cache: boolean = true;
|
||||
|
||||
export let hide: boolean = false; // Hide the entire element
|
||||
export let show_edit: boolean = false;
|
||||
export let show_edit_btn: boolean = true;
|
||||
export let show_edit_btn: boolean = false;
|
||||
export let show_view: boolean = true;
|
||||
// export let show_delete_btn: boolean = false;
|
||||
|
||||
@@ -789,7 +789,7 @@ async function handle_update__data_store(
|
||||
type="button"
|
||||
class="ae_btn_edit__ds btn hover:variant-glass-warning text-xs absolute top-0 right-0 opacity-30 hover:opacity-100 transition delay-700 hover:delay-200 m-1 p-1"
|
||||
class:opacity-5={!$ae_loc.manager_access}
|
||||
class:hidden={!show_edit_btn || !$ae_loc.trusted_access}
|
||||
class:hidden={!$ae_loc.edit_mode && !$ae_loc.administrator_access && !(show_edit_btn && $ae_loc.trusted_access)}
|
||||
on:dblclick={() => {
|
||||
trigger = 'load__ds__code';
|
||||
show_edit = true;
|
||||
|
||||
@@ -81,7 +81,7 @@ onMount(() => {
|
||||
// ae_tmp.show__file_li = true;
|
||||
}}
|
||||
class="btn btn-sm p-1 m-1 variant-soft-tertiary hover:variant-ghost-warning transition hover:transition-all *:hover:inline"
|
||||
class:hidden={!$ae_loc.authenticated_access}
|
||||
class:hidden={!$ae_loc.edit_mode || !$ae_loc.authenticated_access}
|
||||
title="Refresh the list of files"
|
||||
>
|
||||
<span class="fas fa-sync-alt m-1"></span>
|
||||
@@ -97,7 +97,7 @@ onMount(() => {
|
||||
ae_tmp.show__direct_download = !ae_tmp.show__direct_download;
|
||||
}}
|
||||
class="btn btn-sm p-1 m-1 variant-soft-tertiary hover:variant-ghost-warning transition hover:transition-all *:hover:inline"
|
||||
class:hidden={!$ae_loc.trusted_access}
|
||||
class:hidden={!$ae_loc.edit_mode || !$ae_loc.trusted_access}
|
||||
title="Toggle direct download link and copy link button"
|
||||
>
|
||||
<span class="fas fa-download m-1"></span>
|
||||
|
||||
Reference in New Issue
Block a user