diff --git a/src/lib/ae_events/ae_events__event.ts b/src/lib/ae_events/ae_events__event.ts index 1436056d..4363285a 100644 --- a/src/lib/ae_events/ae_events__event.ts +++ b/src/lib/ae_events/ae_events__event.ts @@ -481,22 +481,259 @@ async function _process_generic_props>({ } // Updated 2025-11-13 + export async function process_ae_obj__event_props({ + obj_li, + log_lvl = 0 + }: { + obj_li: any[]; + log_lvl?: number; + }) { + return _process_generic_props({ + obj_li, + obj_type: 'event', + log_lvl, + specific_processor: (obj) => { + if (obj.event_code) { + obj.code = obj.event_code; + } + return obj; + } + }); -} \ No newline at end of file + +} + + + +// This function will process the event config, specifically for presentation management. + +export function sync_config__event_pres_mgmt({ + + pres_mgmt_cfg_remote, // This is the remote config that will be compared. + + pres_mgmt_cfg_local, // This is the local config that will be updated. + + log_lvl = 0 + +}: { + + pres_mgmt_cfg_remote: key_val; + + pres_mgmt_cfg_local: key_val; + + log_lvl?: number; + +}) { + + 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: + + // Labels: + + pres_mgmt_cfg_local.label__person_external_id = + + pres_mgmt_cfg_remote?.label__person_external_id ?? 'External ID'; + + pres_mgmt_cfg_local.label__presenter_external_id = + + pres_mgmt_cfg_remote?.label__presenter_external_id ?? 'External ID'; + + + + pres_mgmt_cfg_local.label__session_poc_type = + + pres_mgmt_cfg_remote?.label__session_poc_type ?? 'poc'; + + pres_mgmt_cfg_local.label__session_poc_name = + + pres_mgmt_cfg_remote?.label__session_poc_name_short ?? 'POC'; + + 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__session_poc = pres_mgmt_cfg_remote?.hide__session_poc ?? false; + + + + // Required fields or options (agreements): + + pres_mgmt_cfg_local.require__presenter_agree = + + pres_mgmt_cfg_remote?.require__presenter_agree ?? false; // In use + + 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.file_purpose_option_kv = + + pres_mgmt_cfg_remote?.file_purpose_option_kv ?? null; + + + + // 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? + + 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}` + + ); + + } + + + + 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; + + + + pres_mgmt_cfg_local.hide__presentation_code = + + pres_mgmt_cfg_remote?.hide__presentation_code ?? false; + + pres_mgmt_cfg_local.hide__presentation_datetime = + + pres_mgmt_cfg_remote?.hide__presentation_datetime ?? false; + + pres_mgmt_cfg_local.show_content__presentation_description = + + pres_mgmt_cfg_remote?.show_content__presentation_description ?? 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_msg = pres_mgmt_cfg_remote?.hide__session_msg ?? 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_launcher_link = pres_mgmt_cfg_remote?.hide_launcher_link ?? false; + + pres_mgmt_cfg_local.hide_launcher_link_legacy = + + pres_mgmt_cfg_remote?.hide_launcher_link_legacy ?? false; + + } + + + + if (log_lvl) { + + console.log(`pres_mgmt_cfg_local:`, pres_mgmt_cfg_local); + + } + + return pres_mgmt_cfg_local; + +} diff --git a/src/lib/element_qr_scanner_v2.svelte b/src/lib/element_qr_scanner_v2.svelte index ee3b29bf..a523823c 100644 --- a/src/lib/element_qr_scanner_v2.svelte +++ b/src/lib/element_qr_scanner_v2.svelte @@ -6,7 +6,6 @@ // import 'html5-qrcode'; import { Html5Qrcode, - Html5QrcodeScannerState, Html5QrcodeSupportedFormats } from 'html5-qrcode'; diff --git a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte index 9dacc9c6..37e15777 100644 --- a/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte +++ b/src/routes/journals/ae_comp__journal_entry_obj_id_view.svelte @@ -60,9 +60,7 @@ X } from '@lucide/svelte'; - // Import OpenAI, but use it with local LLM server (ollama) - import OpenAI from 'openai'; - // import { Configuration, OpenAIApi } from 'openai'; + import { wrapSelection, toggleLinePrefix } from '$lib/ae_journals/ae_journals_editor_helpers';