diff --git a/src/lib/ae_archives__archive.ts b/src/lib/ae_archives/ae_archives__archive.ts similarity index 100% rename from src/lib/ae_archives__archive.ts rename to src/lib/ae_archives/ae_archives__archive.ts diff --git a/src/lib/ae_archives__archive_content.ts b/src/lib/ae_archives/ae_archives__archive_content.ts similarity index 100% rename from src/lib/ae_archives__archive_content.ts rename to src/lib/ae_archives/ae_archives__archive_content.ts diff --git a/src/lib/ae_archives_functions.ts b/src/lib/ae_archives/ae_archives_functions.ts similarity index 100% rename from src/lib/ae_archives_functions.ts rename to src/lib/ae_archives/ae_archives_functions.ts diff --git a/src/lib/ae_events__event.ts b/src/lib/ae_events__event.ts index fc39379e..faa8a35a 100644 --- a/src/lib/ae_events__event.ts +++ b/src/lib/ae_events__event.ts @@ -67,11 +67,12 @@ export async function handle_load_ae_obj_id__event( } -// Updated 2024-05-24 -export async function handle_load_ae_obj_li__event( +// Updated 2024-09-27 +export async function load_ae_obj_li__event( { api_cfg, - account_id, + for_obj_type = 'account', + for_obj_id, inc_file_li = false, inc_location_li = false, inc_presentation_li = false, @@ -83,7 +84,8 @@ export async function handle_load_ae_obj_li__event( log_lvl = 0 }: { api_cfg: any, - account_id: string, + for_obj_type: string, + for_obj_id: string, inc_file_li?: boolean, inc_location_li?: boolean, inc_presentation_li?: boolean, @@ -95,7 +97,7 @@ export async function handle_load_ae_obj_li__event( log_lvl?: number } ) { - console.log(`*** handle_load_ae_obj_li__event() *** account_id=${account_id}`); + console.log(`*** load_ae_obj_li__event() *** for_obj_id=${for_obj_id}`); let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden @@ -110,8 +112,8 @@ export async function handle_load_ae_obj_li__event( ae_promises.load__event_obj_li = await api.get_ae_obj_li_for_obj_id_crud({ api_cfg: api_cfg, obj_type: 'event', - for_obj_type: 'account', - for_obj_id: account_id, + for_obj_type: for_obj_type, + for_obj_id: for_obj_id, use_alt_table: true, // NOTE: This will use the table_name_alt value instead of the table_name value in the API config. use_alt_base: false, // NOTE: This will use the base_name_alt value instead of the base_name value enabled: enabled, @@ -316,6 +318,23 @@ export function handle_db_save_ae_obj_li__event( created_on: obj.created_on, updated_on: obj.updated_on, + // IDAA Recovery Meetings + contact_li_json: obj.contact_li_json, + external_person_id: obj.external_person_id, + + physical: obj.physical, + virtual: obj.virtual, + + weekday_sunday: obj.weekday_sunday, + weekday_monday: obj.weekday_monday, + weekday_tuesday: obj.weekday_tuesday, + weekday_wednesday: obj.weekday_wednesday, + weekday_thursday: obj.weekday_thursday, + weekday_friday: obj.weekday_friday, + weekday_saturday: obj.weekday_saturday, + + recurring_start_time: obj.recurring_start_time, + // From SQL view file_count: obj.file_count, file_count_all: obj.file_count_all, diff --git a/src/lib/ae_events_functions.ts b/src/lib/ae_events_functions.ts index 33801540..f4ac4908 100644 --- a/src/lib/ae_events_functions.ts +++ b/src/lib/ae_events_functions.ts @@ -2,7 +2,7 @@ import { handle_load_ae_obj_id__event, - handle_load_ae_obj_li__event, + load_ae_obj_li__event, create_ae_obj__event, update_ae_obj__event, handle_db_save_ae_obj_li__event, @@ -78,7 +78,7 @@ import { let export_obj = { handle_load_ae_obj_id__event: handle_load_ae_obj_id__event, - handle_load_ae_obj_li__event: handle_load_ae_obj_li__event, + load_ae_obj_li__event: load_ae_obj_li__event, create_ae_obj__event: create_ae_obj__event, update_ae_obj__event: update_ae_obj__event, handle_db_save_ae_obj_li__event: handle_db_save_ae_obj_li__event, diff --git a/src/lib/ae_idaa_stores.ts b/src/lib/ae_idaa_stores.ts new file mode 100644 index 00000000..e430a31e --- /dev/null +++ b/src/lib/ae_idaa_stores.ts @@ -0,0 +1,113 @@ +import { localStorageStore } from '@skeletonlabs/skeleton'; +import { writable } from 'svelte/store'; +import type { Writable } from 'svelte/store'; + +import type { key_val } from '$lib/ae_stores'; + +// Set the version for the app data. Changing this should force a notification and ask the user to clear and reload the page. +let ver = '2024-08-21_1646'; +let ver_idb = '2024-08-21_1645'; + +/* *** BEGIN *** Initialize idaa_local_data_struct */ +// Longer-term app data. This should be stored to *local* storage. +// Updated 2024-03-06 +let idaa_local_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, + + // Shared + name: 'Aether - IDAA (SvelteKit 2.x Svelte 4.x)', + title: `OSIT's Æ IDAA`, // - Dev SvelteKit`, // Æ + + 'ds': {}, + + 'idaa_cfg_json': {}, + + // all, disabled, enabled + 'qry__enabled': 'enabled', + // all, hidden, not_hidden + 'qry__hidden': 'not_hidden', + 'qry__limit': 20, + 'qry__offset': 0, + + archives: { + + }, + + posts: { + + }, + + recovery_meetings: { + + }, +}; +// console.log(`AE Stores - App IDAA Local Storage Data:`, idaa_local_data_struct); + +// This works, but does not uses local storage: +// export let ae_loc = writable(idaa_local_data_struct); + +// This works and uses *local* storage: +export let idaa_loc: Writable = localStorageStore('ae_idaa_loc', idaa_local_data_struct); +// console.log(`AE Stores - App Local Storage Data:`, get(ae_loc)); + + +/* *** BEGIN *** Initialize idaa_session_data_struct */ +// Temporary app data. This should be stored to session storage. +// Updated 2024-03-06 +let idaa_session_data_struct: key_val = { + ver: ver, + ver_idb: ver_idb, + log_lvl: 1, + + archives: { + + }, + + posts: { + + }, + + recovery_meetings: { + + }, + +}; +// console.log(`AE Stores - App IDAA Session Storage Data:`, idaa_session_data_struct); +export let idaa_sess = writable(idaa_session_data_struct); + + +/* *** BEGIN *** Initialize idaa_slct and idaa_trigger */ +/* The slct and slct_trigger variable should not be stored in local storage. Only use session storage because browser tabs can be open to different idaa, badges, exhibits, etc. */ + +// Intended for temporary session storage. +// Updated 2024-03-06 +let idaa_slct_obj_template: key_val = { + // Top level + 'event_id': null, + 'event_obj': {}, + 'event_obj_li': [], + + 'archive_id': null, + 'archive_obj': {}, + 'archive_obj_li': [], + + 'archive_content_id': null, + 'archive_content_obj': {}, + 'archive_content_obj_li': [], + + 'post_id': null, + 'post_obj': {}, + 'post_obj_li': [], + + 'post_comment_id': null, + 'post_comment_obj': {}, + 'post_comment_obj_li': [], +}; +// console.log(`AE Stores - Selected IDAA Objects:`, idaa_slct_obj_template); + +// This works, and uses *session* (not local) storage: +export let idaa_slct = writable(idaa_slct_obj_template); + +// This works and uses *local* storage: +// export let idaa_slct: Writable = localStorageStore('ae_idaa_slct', idaa_slct_obj_template); \ No newline at end of file diff --git a/src/lib/db_events.ts b/src/lib/db_events.ts index 8aaad84f..5031d576 100644 --- a/src/lib/db_events.ts +++ b/src/lib/db_events.ts @@ -42,6 +42,23 @@ export interface Event { created_on: Date; updated_on: null|Date; + // IDAA Recovery Meetings + contact_li_json?: null|string[]; // full_name, email, phone_mobile, phone_home, phone_office, other_text + external_person_id?: null|string; + + physical?: null|boolean; + virtual?: null|boolean; + + weekday_sunday?: null|boolean; + weekday_monday?: null|boolean; + weekday_tuesday?: null|boolean; + weekday_wednesday?: null|boolean; + weekday_thursday?: null|boolean; + weekday_friday?: null|boolean; + weekday_saturday?: null|boolean; + + recurring_start_time?: null|string; + // Additional fields for convenience (database views) file_count?: null|number; file_count_all?: null|number; diff --git a/src/routes/core/+layout.ts b/src/routes/core/+layout.ts index f2e97885..9bbc064d 100644 --- a/src/routes/core/+layout.ts +++ b/src/routes/core/+layout.ts @@ -22,7 +22,7 @@ export async function load({ parent }) { // } // // // Should we limit these to event.conference = true? - // // let load_event_obj_li = events_func.handle_load_ae_obj_li__event({ + // // let load_event_obj_li = events_func.load_ae_obj_li__event({ // // api_cfg: ae_acct.api, // // account_id: account_id, // // params: {enabled: 'enabled', qry__limit: 25}, @@ -38,7 +38,7 @@ export async function load({ parent }) { // return false; // } - // let load_event_obj = events_func.handle_load_ae_obj_id__event({ + // let load_event_obj = events_func.load_ae_obj_id__event({ // api_cfg: ae_acct.api, // event_id: event_id, // try_cache: true diff --git a/src/routes/events_pres_mgmt/+layout.ts b/src/routes/events_pres_mgmt/+layout.ts index 5e60508f..e061c9e5 100644 --- a/src/routes/events_pres_mgmt/+layout.ts +++ b/src/routes/events_pres_mgmt/+layout.ts @@ -31,7 +31,7 @@ export async function load({ parent }) { if (browser) { // Should we limit these to event.conference = true? - let load_event_obj_li = events_func.handle_load_ae_obj_li__event({ + let load_event_obj_li = events_func.load_ae_obj_li__event({ api_cfg: ae_acct.api, account_id: account_id, params: {enabled: 'enabled', qry__limit: 25}, @@ -41,7 +41,7 @@ export async function load({ parent }) { ae_acct.slct.event_obj_li = load_event_obj_li; } - // let load_event_obj = events_func.handle_load_ae_obj_id__event({ + // let load_event_obj = events_func.load_ae_obj_id__event({ // api_cfg: ae_acct.api, // event_id: event_id, // try_cache: false @@ -51,7 +51,7 @@ export async function load({ parent }) { // if (browser) { // console.log(`Browser: ${browser}`); - // events_func.handle_db_save_ae_obj_li__event({ + // events_func.db_save_ae_obj_li__event({ // obj_type: 'event', // obj_li: [load_event_obj_li], // }); diff --git a/src/routes/events_pres_mgmt/+page.ts b/src/routes/events_pres_mgmt/+page.ts index c8d9cac4..d0ab9297 100644 --- a/src/routes/events_pres_mgmt/+page.ts +++ b/src/routes/events_pres_mgmt/+page.ts @@ -19,7 +19,7 @@ export async function load({ parent }) { // let ae_acct = data[account_id]; // Should we limit these to event.conference = true? - // let load_event_obj_li = await events_func.handle_load_ae_obj_li__event({ + // let load_event_obj_li = await events_func.load_ae_obj_li__event({ // api_cfg: ae_acct.api, // account_id: account_id, // params: {enabled: 'enabled', qry__limit: 25}, diff --git a/src/routes/events_speakers/+page.svelte b/src/routes/events_speakers/+page.svelte index 1314e682..49a657fa 100644 --- a/src/routes/events_speakers/+page.svelte +++ b/src/routes/events_speakers/+page.svelte @@ -259,7 +259,7 @@ async function handle_load_ae_obj_li__event_presenter({event_id, try_cache=true} -// handle_load_ae_obj_li__event() was done in layout.ts +// load_ae_obj_li__event() was done in layout.ts // This is different from how the sponsorships are loaded. // Do we need anything from the event object to load the presenters? diff --git a/src/routes/idaa/(idaa)/+layout.svelte b/src/routes/idaa/(idaa)/+layout.svelte index e69de29b..13e960cc 100644 --- a/src/routes/idaa/(idaa)/+layout.svelte +++ b/src/routes/idaa/(idaa)/+layout.svelte @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte new file mode 100644 index 00000000..2ad06c8b --- /dev/null +++ b/src/routes/idaa/(idaa)/recovery_meetings/+layout.svelte @@ -0,0 +1,31 @@ + + + + diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts new file mode 100644 index 00000000..a7de2ca6 --- /dev/null +++ b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts @@ -0,0 +1,45 @@ +/** @type {import('./$types').LayoutLoad} */ +console.log(`IDAA Recovery Meetings - [account_id] +layout.ts start`); + +import { error } from '@sveltejs/kit'; +import { browser } from '$app/environment'; +import { events_func } from '$lib/ae_events_functions'; + +export async function load({ params, parent }) { // route + let log_lvl = 0; + + let data = await parent(); + data.log_lvl = log_lvl; + + let account_id = data.account_id; + let ae_acct = data[account_id]; + // console.log(`ae_acct = `, ae_acct); + + if (!account_id) { + console.log(`ae IDAA Recovery Meetings - [account_id] +page.ts: The account_id was not found!!!`); + error(404, { + message: 'Account ID not found' + }); + } + + ae_acct.slct.account_id = account_id; + + if (browser) { + let load_event_obj_li = events_func.load_ae_obj_li__event({ + api_cfg: ae_acct.api, + for_obj_type: 'account', + for_obj_id: account_id, + order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, + params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, + try_cache: true, + log_lvl: log_lvl + }); + console.log(`load_event_obj_li = `, load_event_obj_li); + ae_acct.slct.event_obj_li = load_event_obj_li; + } + + // WARNING: Precaution against shared data between sites and sessions. + data[account_id] = ae_acct; + + return data; +} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte new file mode 100644 index 00000000..f6e9d5f9 --- /dev/null +++ b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte @@ -0,0 +1,88 @@ + + + +
+ + +

Recovery Meetings {$lq__event_obj_li?.length}

+{#if $lq__event_obj_li && $lq__event_obj_li?.length } + + +{/if} + + +
+ + + + + + + + \ No newline at end of file diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+page.ts b/src/routes/idaa/(idaa)/recovery_meetings/+page.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/routes/idaa/(idaa)/recovery_meetings/0_events__main.svelte b/src/routes/idaa/(idaa)/recovery_meetings/0_events__main.svelte index 1c224913..a41e4fb5 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/0_events__main.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/0_events__main.svelte @@ -18,8 +18,8 @@ import { slct, slct_trigger, ae_app } from './stores'; // *** Import Aether module components import Edit_event_obj from './10_edit__event_obj.svelte'; -import List_event_obj from './10_list__event_obj.svelte'; -import View_event_obj from './10_view__event_obj.svelte'; +import List_event_obj from './ae_idaa_comp__event_obj_li.svelte'; +import View_event_obj from './ae_idaa_comp__event_obj_id_view.svelte'; // *** Export/Exposed variables and functions for component // export let account_id: string = $page['page_for']['account_id']; diff --git a/src/routes/idaa/(idaa)/recovery_meetings/10_view__event_obj.svelte b/src/routes/idaa/(idaa)/recovery_meetings/10_view__event_obj.svelte deleted file mode 100644 index d18ff01d..00000000 --- a/src/routes/idaa/(idaa)/recovery_meetings/10_view__event_obj.svelte +++ /dev/null @@ -1,392 +0,0 @@ - - - -
- - - -
-
-
Description:
-
{@html $slct.event_obj.description}
-
- -
- Type of Recovery Meeting: - {$slct.event_obj.type} -
- -
- -
-
- Address: -
- {#if $slct.event_obj.location_address_json} - - {#if $slct.event_obj.physical} - {#if $slct.event_obj.location_address_json.name}{$slct.event_obj.location_address_json.name}
{/if} - {#if $slct.event_obj.location_address_json.line_1}{$slct.event_obj.location_address_json.line_1}
{/if} - {#if $slct.event_obj.location_address_json.line_2}{$slct.event_obj.location_address_json.line_2}
{/if} - {#if $slct.event_obj.location_address_json.line_3}{$slct.event_obj.location_address_json.line_3}
{/if} - {/if} - {#if $slct.event_obj.location_address_json.city}{$slct.event_obj.location_address_json.city}, {/if} - {#if $slct.event_obj.location_address_json.state_province}{$slct.event_obj.location_address_json.state_province}{/if} - {#if $slct.event_obj.physical} - {#if $slct.event_obj.location_address_json.postal_code}{$slct.event_obj.location_address_json.postal_code}{/if} - {/if} - {#if $slct.event_obj.location_address_json.country} -
- {$slct.event_obj.location_address_json.country} - {/if} - - {:else} - - {#if $slct.event_obj.physical} - {#if $slct.event_obj.address_name}{$slct.event_obj.address_name}
{/if} - {#if $slct.event_obj.address_line_1}{$slct.event_obj.address_line_1}
{/if} - {#if $slct.event_obj.address_line_2}{$slct.event_obj.address_line_2}
{/if} - {#if $slct.event_obj.address_line_3}{$slct.event_obj.address_line_3}
{/if} - {/if} - {#if $slct.event_obj.address_city}{$slct.event_obj.address_city}, {/if} - {#if $slct.event_obj.address_country_subdivision_name}{$slct.event_obj.address_country_subdivision_name}{/if} - {#if $slct.event_obj.physical} - {#if $slct.event_obj.address_postal_code}{$slct.event_obj.address_postal_code}{/if} - {/if} - {#if $slct.event_obj.address_country_name} -
- {$slct.event_obj.address_country_name} - {/if} - - {/if} -
- {#if $slct.event_obj.physical} -
- Additional information: {@html $slct.event_obj.location_text} -
- {/if} -
-
- -
-
- - - URL: - - - {$slct.event_obj.attend_url} - - - - Passcode: - - - {$slct.event_obj.attend_url_passcode} - -
-
- - - Phone: - - - {$slct.event_obj.attend_phone} - - - - Passcode: - - - {$slct.event_obj.attend_phone_passcode} - -
-
- Additional information: {@html $slct.event_obj.attend_text} -
-
- -
- -
- -
-
- - - Frequency: - - {#if $slct.event_obj.recurring_pattern == 'weekly'}Weekly - {:else if $slct.event_obj.recurring_pattern == 'monthly'}Monthly - {:else if $slct.event_obj.recurring_pattern == 'every other week'}Every Other Week - {:else if $slct.event_obj.recurring_pattern == 'other'}Other - {/if} - {#if $slct.event_obj.recurring_text && $slct.event_obj.recurring_text.length > 0} - {#if $slct.event_obj.recurring_text.includes('*gen*') && $ae_app.administrator_access} - {@html $slct.event_obj.recurring_text} - {:else if (!$slct.event_obj.recurring_text.includes('*gen*'))} - {@html $slct.event_obj.recurring_text} - {/if} - - {/if} -
-
- - - Days of week: - - {#if $slct.event_obj.weekday_sunday}Sunday{/if} - {#if $slct.event_obj.weekday_monday}Monday{/if} - {#if $slct.event_obj.weekday_tuesday}Tuesday{/if} - {#if $slct.event_obj.weekday_wednesday}Wednesday{/if} - {#if $slct.event_obj.weekday_thursday}Thursday{/if} - {#if $slct.event_obj.weekday_friday}Friday{/if} - {#if $slct.event_obj.weekday_saturday}Saturday{/if} -
-
- {#if $slct.event_obj.recurring_start_time} - - - Start time: - - {ae.util.iso_datetime_formatter(`2024-01-01 ${$slct.event_obj.recurring_start_time}`, 'time_short')} - - - - - End time: - {ae.util.iso_datetime_formatter(`2024-01-01 ${$slct.event_obj.recurring_end_time}`, 'time_short')} - - - - - - - Timezone: - {$slct.event_obj.timezone} - - - {#if $slct.event_obj.timezone} - - ( - Your TZ: - - {dayjs.tz(`${$ae_app.current_date_str} ${$slct.event_obj.recurring_start_time}`, $slct.event_obj.timezone).tz($ae_app.current_timezone).format('hh:mm A')} {$ae_app.current_timezone} - - ) - - {/if} - {:else} - No times set - {/if} - - - - -
-
- -
- - -
- - {#if $slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json.length && $slct.event_obj.contact_li_json[0].full_name} -
- - Contact: - - {$slct.event_obj.contact_li_json[0].full_name} - {#if $slct.event_obj.contact_li_json[0].email} - | {$slct.event_obj.contact_li_json[0].email} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_mobile} - | Mobile: - {$slct.event_obj.contact_li_json[0].phone_mobile} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_home} - | Home: - {$slct.event_obj.contact_li_json[0].phone_home} - {/if} - {#if $slct.event_obj.contact_li_json[0].phone_office} - | Office: - {$slct.event_obj.contact_li_json[0].phone_office} - {/if} - {#if $slct.event_obj.contact_li_json[0].other_text}| {$slct.event_obj.contact_li_json[0].other_text}{/if} -
- {/if} - - {#if $slct.event_obj.contact_li_json && $slct.event_obj.contact_li_json.length && $slct.event_obj.contact_li_json[1].full_name} -
- - Contact: - - {$slct.event_obj.contact_li_json[1].full_name} - {#if $slct.event_obj.contact_li_json[1].email} - | {$slct.event_obj.contact_li_json[1].email} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_mobile} - | Mobile: - {$slct.event_obj.contact_li_json[1].phone_mobile} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_home} - | Home: - {$slct.event_obj.contact_li_json[1].phone_home} - {/if} - {#if $slct.event_obj.contact_li_json[1].phone_office} - | Office: - {$slct.event_obj.contact_li_json[1].phone_office} - {/if} - {#if $slct.event_obj.contact_li_json[1].other_text}| {$slct.event_obj.contact_li_json[1].other_text}{/if} -
- {/if} - -
- -
-
- - ID: - {$slct.event_obj.event_id_random} - - - Created on: {ae.util.iso_datetime_formatter($slct.event_obj.created_on, 'datetime_short')} - - - Updated on: {ae.util.iso_datetime_formatter($slct.event_obj.updated_on, 'datetime_short')} - -
- - {#if $ae_app.trusted_access || $slct.event_obj.external_person_id === $ae_app.novi_uuid || $slct.event_obj.contact_li_json[0].email === $ae_app.novi_email} -
- -
- {/if} -
- -
- -
- - - diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte new file mode 100644 index 00000000..9c7af09f --- /dev/null +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_view.svelte @@ -0,0 +1,394 @@ + + + +
+ + + +
+
+
Description:
+
{@html $lq__event_obj?.description}
+
+ +
+ Type of Recovery Meeting: + {$lq__event_obj?.type} +
+ +
+ +
+
+ Address: +
+ {#if $lq__event_obj?.location_address_json} + + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.location_address_json.name}{$lq__event_obj?.location_address_json.name}
{/if} + {#if $lq__event_obj?.location_address_json.line_1}{$lq__event_obj?.location_address_json.line_1}
{/if} + {#if $lq__event_obj?.location_address_json.line_2}{$lq__event_obj?.location_address_json.line_2}
{/if} + {#if $lq__event_obj?.location_address_json.line_3}{$lq__event_obj?.location_address_json.line_3}
{/if} + {/if} + {#if $lq__event_obj?.location_address_json.city}{$lq__event_obj?.location_address_json.city}, {/if} + {#if $lq__event_obj?.location_address_json.state_province}{$lq__event_obj?.location_address_json.state_province}{/if} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.location_address_json.postal_code}{$lq__event_obj?.location_address_json.postal_code}{/if} + {/if} + {#if $lq__event_obj?.location_address_json.country} +
+ {$lq__event_obj?.location_address_json.country} + {/if} + + {:else} + + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.address_name}{$lq__event_obj?.address_name}
{/if} + {#if $lq__event_obj?.address_line_1}{$lq__event_obj?.address_line_1}
{/if} + {#if $lq__event_obj?.address_line_2}{$lq__event_obj?.address_line_2}
{/if} + {#if $lq__event_obj?.address_line_3}{$lq__event_obj?.address_line_3}
{/if} + {/if} + {#if $lq__event_obj?.address_city}{$lq__event_obj?.address_city}, {/if} + {#if $lq__event_obj?.address_country_subdivision_name}{$lq__event_obj?.address_country_subdivision_name}{/if} + {#if $lq__event_obj?.physical} + {#if $lq__event_obj?.address_postal_code}{$lq__event_obj?.address_postal_code}{/if} + {/if} + {#if $lq__event_obj?.address_country_name} +
+ {$lq__event_obj?.address_country_name} + {/if} + + {/if} +
+ {#if $lq__event_obj?.physical} +
+ Additional information: {@html $lq__event_obj?.location_text} +
+ {/if} +
+
+ +
+
+ + + URL: + + + {$lq__event_obj?.attend_url} + + + + Passcode: + + + {$lq__event_obj?.attend_url_passcode} + +
+
+ + + Phone: + + + {$lq__event_obj?.attend_phone} + + + + Passcode: + + + {$lq__event_obj?.attend_phone_passcode} + +
+
+ Additional information: {@html $lq__event_obj?.attend_text} +
+
+ +
+ +
+ +
+
+ + + Frequency: + + {#if $lq__event_obj?.recurring_pattern == 'weekly'}Weekly + {:else if $lq__event_obj?.recurring_pattern == 'monthly'}Monthly + {:else if $lq__event_obj?.recurring_pattern == 'every other week'}Every Other Week + {:else if $lq__event_obj?.recurring_pattern == 'other'}Other + {/if} + {#if $lq__event_obj?.recurring_text && $lq__event_obj?.recurring_text.length > 0} + {#if $lq__event_obj?.recurring_text.includes('*gen*') && $ae_loc.administrator_access} + {@html $lq__event_obj?.recurring_text} + {:else if (!$lq__event_obj?.recurring_text.includes('*gen*'))} + {@html $lq__event_obj?.recurring_text} + {/if} + + {/if} +
+
+ + + Days of week: + + {#if $lq__event_obj?.weekday_sunday}Sunday{/if} + {#if $lq__event_obj?.weekday_monday}Monday{/if} + {#if $lq__event_obj?.weekday_tuesday}Tuesday{/if} + {#if $lq__event_obj?.weekday_wednesday}Wednesday{/if} + {#if $lq__event_obj?.weekday_thursday}Thursday{/if} + {#if $lq__event_obj?.weekday_friday}Friday{/if} + {#if $lq__event_obj?.weekday_saturday}Saturday{/if} +
+
+ {#if $lq__event_obj?.recurring_start_time} + + + Start time: + + {ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_start_time}`, 'time_short')} + + + - + End time: + {ae_util.iso_datetime_formatter(`2024-01-01 ${$lq__event_obj?.recurring_end_time}`, 'time_short')} + + + + + - + Timezone: + {$lq__event_obj?.timezone} + + + {#if $lq__event_obj?.timezone} + + ( + Your TZ: + + {dayjs.tz(`${$ae_loc.current_date_str} ${$lq__event_obj?.recurring_start_time}`, $lq__event_obj?.timezone).tz($ae_loc.current_timezone).format('hh:mm A')} {$ae_loc.current_timezone} + + ) + + {/if} + {:else} + No times set + {/if} + + + + +
+
+ +
+ + +
+ + {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[0].full_name} +
+ + Contact: + + {$lq__event_obj?.contact_li_json[0].full_name} + {#if $lq__event_obj?.contact_li_json[0].email} + | {$lq__event_obj?.contact_li_json[0].email} + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_mobile} + | Mobile: + {$lq__event_obj?.contact_li_json[0].phone_mobile} + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_home} + | Home: + {$lq__event_obj?.contact_li_json[0].phone_home} + {/if} + {#if $lq__event_obj?.contact_li_json[0].phone_office} + | Office: + {$lq__event_obj?.contact_li_json[0].phone_office} + {/if} + {#if $lq__event_obj?.contact_li_json[0].other_text}| {$lq__event_obj?.contact_li_json[0].other_text}{/if} +
+ {/if} + + {#if $lq__event_obj?.contact_li_json && $lq__event_obj?.contact_li_json.length && $lq__event_obj?.contact_li_json[1].full_name} +
+ + Contact: + + {$lq__event_obj?.contact_li_json[1].full_name} + {#if $lq__event_obj?.contact_li_json[1].email} + | {$lq__event_obj?.contact_li_json[1].email} + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_mobile} + | Mobile: + {$lq__event_obj?.contact_li_json[1].phone_mobile} + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_home} + | Home: + {$lq__event_obj?.contact_li_json[1].phone_home} + {/if} + {#if $lq__event_obj?.contact_li_json[1].phone_office} + | Office: + {$lq__event_obj?.contact_li_json[1].phone_office} + {/if} + {#if $lq__event_obj?.contact_li_json[1].other_text}| {$lq__event_obj?.contact_li_json[1].other_text}{/if} +
+ {/if} + +
+ +
+
+ + ID: + {$lq__event_obj?.event_id_random} + + + Created on: {ae_util.iso_datetime_formatter($lq__event_obj?.created_on, 'datetime_short')} + + + Updated on: {ae_util.iso_datetime_formatter($lq__event_obj?.updated_on, 'datetime_short')} + +
+ + {#if $ae_loc.trusted_access || $lq__event_obj?.external_person_id === $ae_loc.novi_uuid || $lq__event_obj?.contact_li_json[0].email === $ae_loc.novi_email} +
+ +
+ {/if} +
+ +
+ +
+ + + diff --git a/src/routes/idaa/(idaa)/recovery_meetings/10_list__event_obj.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte similarity index 75% rename from src/routes/idaa/(idaa)/recovery_meetings/10_list__event_obj.svelte rename to src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte index 2e50b27f..4d22902d 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/10_list__event_obj.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte @@ -4,24 +4,27 @@ import { onMount } from 'svelte'; import { Spinner } from 'flowbite-svelte'; // *** Import Aether core variables and functions -import { ae } from 'aether_npm_lib'; -import { slct, ae_app, slct_trigger } from './stores'; +import { ae_util } from '$lib/ae_utils/ae_utils'; +import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores'; +import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores'; + +export let lq__event_obj_li: any; export let container_class_li = []; onMount(() => { - console.log('** Component Mounted: ** List - Event Obj'); + console.log('** Component Mounted: ** List - Recovery Meeting (Event) Obj'); });
-{#if $slct.event_obj_li && $slct.event_obj_li.length} +{#if $lq__event_obj_li && $lq__event_obj_li.length} -{#each $slct.event_obj_li as idaa_event_obj, index} +{#each $lq__event_obj_li as idaa_event_obj, index}
@@ -29,22 +32,35 @@ onMount(() => {

{idaa_event_obj.name} - {#if idaa_event_obj.physical && idaa_event_obj.virtual} F2F and Virtual{:else if idaa_event_obj.physical} F2F{:else if idaa_event_obj.virtual} Virtual{/if} - {#if idaa_event_obj.type} {idaa_event_obj.type}{/if} - - {#if $ae_app.trusted_access && idaa_event_obj.hide} Hidden{/if} - {#if $ae_app.administrator_access && !idaa_event_obj.enable} Not enabled{/if} + + {#if idaa_event_obj.physical && idaa_event_obj.virtual} + F2F and Virtual + {:else if idaa_event_obj.physical} + F2F + {:else if idaa_event_obj.virtual} + Virtual + {/if} + + {#if idaa_event_obj.type} + {idaa_event_obj.type} + {/if} + {#if $ae_loc.trusted_access && idaa_event_obj.hide} + Hidden + {/if} + {#if $ae_loc.administrator_access && !idaa_event_obj.enable} + Not enabled + {/if}

- {#if $ae_app.trusted_access || idaa_event_obj.external_person_id === $ae_app.novi_uuid || idaa_event_obj.contact_li_json[0].email === $ae_app.novi_email} + {#if $ae_loc.trusted_access || idaa_event_obj.external_person_id === $ae_loc.novi_uuid || idaa_event_obj.contact_li_json[0].email === $ae_loc.novi_email} {/if}
@@ -124,7 +141,7 @@ onMount(() => { class="ae_group event__timezone event__recurring_start_time" > - + When: @@ -143,7 +160,7 @@ onMount(() => { {#if idaa_event_obj.recurring_start_time} - {ae.util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj.recurring_start_time}`, 'time_short')} + {ae_util.iso_datetime_formatter(`2023-01-01 ${idaa_event_obj.recurring_start_time}`, 'time_short')} {/if} {#if idaa_event_obj.timezone} @@ -160,7 +177,7 @@ onMount(() => { class:ae_d_none={!idaa_event_obj.contact_li_json[0].full_name} > - Contact: + Contact: {idaa_event_obj.contact_li_json[0].full_name} {#if idaa_event_obj.contact_li_json[0].email} @@ -181,7 +198,7 @@ onMount(() => { {#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if}
{:else} - {#if $ae_app.trusted_access} + {#if $ae_loc.trusted_access}
ALERT: The primary contact information may be missing? This meeting should be checked and updated. Please Edit and Save to use the new format. @@ -194,7 +211,7 @@ onMount(() => { class:ae_d_none={!idaa_event_obj.contact_li_json[1].full_name} > - Contact: + Contact: {idaa_event_obj.contact_li_json[1].full_name} {#if idaa_event_obj.contact_li_json[1].email} @@ -215,7 +232,7 @@ onMount(() => { {#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if}
{/if} - {#if $ae_app.trusted_access} + {#if $ae_loc.trusted_access} {#if (idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && !idaa_event_obj.contact_li_json[0].full_name)}
Required: No primary contact information was found!
{/if} @@ -228,7 +245,7 @@ onMount(() => {
- {#if $ae_app.administrator_access} + {#if $ae_loc.administrator_access}