From 47e9f9f5a11c317b90f98b7a7bac053f5276834e Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 1 Oct 2024 16:08:31 -0400 Subject: [PATCH] General clean up. Improved event search and listing for IDAA. --- src/lib/{ => ae_api}/api_delete_object.ts | 0 src/lib/{ => ae_api}/api_get__crud_obj_id.ts | 0 .../{ => ae_api}/api_get__crud_obj_li_v1.ts | 0 .../{ => ae_api}/api_get__crud_obj_li_v2.ts | 0 src/lib/{ => ae_api}/api_get_object.ts | 0 src/lib/{ => ae_api}/api_patch_object.ts | 0 src/lib/{ => ae_api}/api_post_object.ts | 0 src/lib/ae_core_functions.ts | 12 +- src/lib/ae_events__event.ts | 1 + src/lib/ae_posts__post.ts | 2 +- src/lib/ae_posts__post_comment.ts | 2 +- src/lib/api.ts | 101 ++++++------ .../idaa/(idaa)/recovery_meetings/+layout.ts | 1 + .../(idaa)/recovery_meetings/+page.svelte | 44 ++--- .../ae_idaa_comp__event_obj_li.svelte | 152 ++++++++++-------- .../ae_idaa_comp__event_obj_qry.svelte | 80 ++++++++- 16 files changed, 256 insertions(+), 139 deletions(-) rename src/lib/{ => ae_api}/api_delete_object.ts (100%) rename src/lib/{ => ae_api}/api_get__crud_obj_id.ts (100%) rename src/lib/{ => ae_api}/api_get__crud_obj_li_v1.ts (100%) rename src/lib/{ => ae_api}/api_get__crud_obj_li_v2.ts (100%) rename src/lib/{ => ae_api}/api_get_object.ts (100%) rename src/lib/{ => ae_api}/api_patch_object.ts (100%) rename src/lib/{ => ae_api}/api_post_object.ts (100%) diff --git a/src/lib/api_delete_object.ts b/src/lib/ae_api/api_delete_object.ts similarity index 100% rename from src/lib/api_delete_object.ts rename to src/lib/ae_api/api_delete_object.ts diff --git a/src/lib/api_get__crud_obj_id.ts b/src/lib/ae_api/api_get__crud_obj_id.ts similarity index 100% rename from src/lib/api_get__crud_obj_id.ts rename to src/lib/ae_api/api_get__crud_obj_id.ts diff --git a/src/lib/api_get__crud_obj_li_v1.ts b/src/lib/ae_api/api_get__crud_obj_li_v1.ts similarity index 100% rename from src/lib/api_get__crud_obj_li_v1.ts rename to src/lib/ae_api/api_get__crud_obj_li_v1.ts diff --git a/src/lib/api_get__crud_obj_li_v2.ts b/src/lib/ae_api/api_get__crud_obj_li_v2.ts similarity index 100% rename from src/lib/api_get__crud_obj_li_v2.ts rename to src/lib/ae_api/api_get__crud_obj_li_v2.ts diff --git a/src/lib/api_get_object.ts b/src/lib/ae_api/api_get_object.ts similarity index 100% rename from src/lib/api_get_object.ts rename to src/lib/ae_api/api_get_object.ts diff --git a/src/lib/api_patch_object.ts b/src/lib/ae_api/api_patch_object.ts similarity index 100% rename from src/lib/api_patch_object.ts rename to src/lib/ae_api/api_patch_object.ts diff --git a/src/lib/api_post_object.ts b/src/lib/ae_api/api_post_object.ts similarity index 100% rename from src/lib/api_post_object.ts rename to src/lib/ae_api/api_post_object.ts diff --git a/src/lib/ae_core_functions.ts b/src/lib/ae_core_functions.ts index 53d9c554..1a9f46e9 100644 --- a/src/lib/ae_core_functions.ts +++ b/src/lib/ae_core_functions.ts @@ -337,6 +337,7 @@ async function handle_download_export__obj_type( get_obj_type, // The type of object to return: event_badge, event_presenter, sponsorship, etc. for_obj_type, // Usually for an account, event, event_exhibit, or sponsorship_cfg for_obj_id, // The ID of the object + exp_alt = null, // Export name (idaa, other, not 'default') file_type='CSV', // 'CSV' or 'Excel' return_file=true, filename='no_filename.csv', @@ -349,6 +350,7 @@ async function handle_download_export__obj_type( get_obj_type: string, for_obj_type: string, for_obj_id: string, + exp_alt?: null|string, file_type?: string, return_file?: boolean, filename?: string, @@ -373,6 +375,10 @@ async function handle_download_export__obj_type( params['mdl_alt'] = 'out'; + if (exp_alt) { + params['exp_alt'] = exp_alt; + } + // let clean_filename = filename.replace(/[^a-z0-9]/gi, '_'); // let clean_filename = filename.replace(/[^a-z0-9\[\]-]/gi, '_'); let clean_filename = filename.replace(/[^a-zA-Z0-9\[\]-_.]/gi, '_'); @@ -382,7 +388,7 @@ async function handle_download_export__obj_type( params['limit'] = limit; } - ae_promises.download__sponsorship_export_file = await api.get_object({ + ae_promises.download__export_file = await api.get_object({ api_cfg: api_cfg, endpoint: endpoint, params: params, @@ -393,8 +399,8 @@ async function handle_download_export__obj_type( log_lvl: log_lvl }); - console.log('ae_promises.download__sponsorship_export_file:', ae_promises.download__sponsorship_export_file); - return ae_promises.download__sponsorship_export_file; + console.log('ae_promises.download__export_file:', ae_promises.download__export_file); + return ae_promises.download__export_file; } diff --git a/src/lib/ae_events__event.ts b/src/lib/ae_events__event.ts index 6734e129..8ea459fe 100644 --- a/src/lib/ae_events__event.ts +++ b/src/lib/ae_events__event.ts @@ -116,6 +116,7 @@ export async function load_ae_obj_li__event( if (qry_conference) { params_json['and_qry']['conference'] = qry_conference; } else if (qry_conference === false) { + console.log('qry_conference is false!'); params_json['and_qry']['conference'] = qry_conference; } diff --git a/src/lib/ae_posts__post.ts b/src/lib/ae_posts__post.ts index 1d6cd3bd..c6c6883d 100644 --- a/src/lib/ae_posts__post.ts +++ b/src/lib/ae_posts__post.ts @@ -384,7 +384,7 @@ export async function qry__post( params_json['qry'].push(qry_param); } - let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}; + let order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}; ae_promises.load__post_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ api_cfg: api_cfg, diff --git a/src/lib/ae_posts__post_comment.ts b/src/lib/ae_posts__post_comment.ts index 9313799b..9033556a 100644 --- a/src/lib/ae_posts__post_comment.ts +++ b/src/lib/ae_posts__post_comment.ts @@ -63,7 +63,7 @@ export async function load_ae_obj_li__post_comment( api_cfg, for_obj_type = 'post', for_obj_id, - order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'start_datetime': 'ASC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'}, + order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'}, params = {}, try_cache = true, log_lvl = 0 diff --git a/src/lib/api.ts b/src/lib/api.ts index 2ee887cd..ad629301 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -5,15 +5,15 @@ import type { key_val } from '$lib/ae_stores'; -import { delete_object } from './api_delete_object'; // Exported at the end of this file -import { get_object } from './api_get_object'; // Exported at the end of this file -import { patch_object } from './api_patch_object'; // Exported at the end of this file -import { post_object } from './api_post_object'; // Exported at the end of this file +import { delete_object } from './ae_api/api_delete_object'; // Exported at the end of this file +import { get_object } from './ae_api/api_get_object'; // Exported at the end of this file +import { patch_object } from './ae_api/api_patch_object'; // Exported at the end of this file +import { post_object } from './ae_api/api_post_object'; // Exported at the end of this file -import { get_ae_obj_id_crud } from '$lib/api_get__crud_obj_id'; -import { get_ae_obj_li_for_obj_id_crud } from '$lib/api_get__crud_obj_li_v1'; -import { get_ae_obj_li_for_obj_id_crud_v2 } from '$lib/api_get__crud_obj_li_v2'; +import { get_ae_obj_id_crud } from '$lib/ae_api/api_get__crud_obj_id'; +import { get_ae_obj_li_for_obj_id_crud } from '$lib/ae_api/api_get__crud_obj_li_v1'; +import { get_ae_obj_li_for_obj_id_crud_v2 } from '$lib/ae_api/api_get__crud_obj_li_v2'; // This new function has not been tested yet!!! @@ -308,16 +308,16 @@ export let update_ae_obj_id_crud = async function update_ae_obj_id_crud( obj_id, field_name, field_value, - fields={}, + fields = {}, key, - jwt=null, - headers={}, - params={}, - data={}, - return_obj=false, - obj_v_name='', - return_meta=false, - log_lvl=0 + jwt = null, + headers = {}, + params = {}, + data = {}, + return_obj = false, + obj_v_name = '', + return_meta = false, + log_lvl = 0 }: { api_cfg: any, obj_type: string, @@ -326,7 +326,7 @@ export let update_ae_obj_id_crud = async function update_ae_obj_id_crud( field_value?: any, fields?: key_val, key: string, - jwt?: string, + jwt?: null|string, headers?: key_val, params?: key_val, data?: null|key_val, @@ -340,8 +340,11 @@ export let update_ae_obj_id_crud = async function update_ae_obj_id_crud( console.log('*** update_ae_obj_id_crud() ***'); } - data['super_key'] = key; - data['jwt'] = jwt; + if (!data) { + data = {}; + data['super_key'] = key; + data['jwt'] = jwt; + } // NOTE: The key and or JWT should be in the header of the DELETE, GET, PATCH, POST // This obj_v_name is the view name to use when returning data. Do not prefix it with v_. This is checked and done automatically by the API. @@ -516,19 +519,19 @@ export let delete_ae_obj_id_crud = async function delete_ae_obj_id_crud( obj_type, obj_id, key, - jwt=null, - headers={}, - params={}, - data={}, - method='delete', // 'delete', 'disable', 'hide' - return_meta=false, - log_lvl=0 + jwt = null, + headers = {}, + params = {}, + data = {}, + method = 'delete', // 'delete', 'disable', 'hide' + return_meta = false, + log_lvl = 0 } : { api_cfg: any, obj_type: string, obj_id: string, key: string, - jwt?: string, + jwt?: null|string, headers?: any, params?: any, data?: any, @@ -795,40 +798,42 @@ export let send_email = async function send_email( { api_cfg, from_email, - from_name='', + from_name = '', to_email, - to_name='', - cc_email=null, - cc_name=null, - bcc_email=null, - bcc_name=null, + to_name = '', + cc_email = null, + cc_name = null, + bcc_email = null, + bcc_name = null, subject, body_html, - body_text=null, - headers={}, - params={}, - data={}, - return_obj=false, - return_meta=false, - log_lvl=0 + body_text = null, + // headers = {}, + params = {}, + data = {}, + return_obj = false, + return_meta = false, + test = true, + log_lvl = 0 } : { api_cfg: any, from_email: string, from_name?: string, to_email: string, to_name?: string, - cc_email?: string, - cc_name?: string, - bcc_email?: string, - bcc_name?: string, + cc_email?: null|string, + cc_name?: null|string, + bcc_email?: null|string, + bcc_name?: null|string, subject: string, body_html: string, - body_text?: string, - headers?: key_val, + body_text?: null|string, + // headers?: key_val, params?: key_val, data?: key_val, return_obj?: boolean, return_meta?: boolean, + test?: boolean, log_lvl?: number } ) { @@ -861,6 +866,10 @@ export let send_email = async function send_email( params['return_obj'] = true; } + if (test) { + params['test'] = true; + } + let send_email_post_promise = await api.post_object({ api_cfg: api_cfg, endpoint: endpoint, diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts index a7de2ca6..7368179b 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts +++ b/src/routes/idaa/(idaa)/recovery_meetings/+layout.ts @@ -30,6 +30,7 @@ export async function load({ params, parent }) { // route for_obj_type: 'account', for_obj_id: account_id, order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, + qry_conference: false, params: {qry__enabled: 'enabled', qry__hidden: 'all', qry__limit: 200}, try_cache: true, log_lvl: log_lvl diff --git a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte index a6693bab..36ed3f8b 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/+page.svelte @@ -27,14 +27,14 @@ import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte'; let event_id_random_li: Array; -$: lq__event_obj_li = liveQuery(async () => { - let results = await db_events.events - .where('account_id') - .equals($slct.account_id) - .sortBy('name'); +// $: lq__event_obj_li = liveQuery(async () => { +// let results = await db_events.events +// .where('account_id') +// .equals($slct.account_id) +// .sortBy('name'); - return results; -}); +// return results; +// }); $: lq__event_obj = liveQuery(async () => { let results = await db_events.events @@ -75,21 +75,21 @@ $: lq_new__event_obj_li = liveQuery(async () => { console.log('Trying... HERE!!! END'); }); -$: lq_bulk__event_obj_li = liveQuery(async () => { - console.log('Trying... HERE!!! BULK BEGIN'); +// $: lq_bulk__event_obj_li = liveQuery(async () => { +// console.log('Trying... HERE!!! BULK BEGIN'); - if (event_id_random_li.length) { - console.log(`Trying bulkGet:`, event_id_random_li); - let results = await db_events.events - .bulkGet(event_id_random_li); +// if (event_id_random_li.length) { +// console.log(`Trying bulkGet:`, event_id_random_li); +// let results = await db_events.events +// .bulkGet(event_id_random_li); - return results; - } else { - console.log('Trying... Nothing to load'); - return null; - } - console.log('Trying... HERE!!! BULK END'); -}); +// return results; +// } else { +// console.log('Trying... Nothing to load'); +// return null; +// } +// console.log('Trying... HERE!!! BULK END'); +// }); @@ -110,7 +110,7 @@ $: lq_bulk__event_obj_li = liveQuery(async () => { bind:event_id_random_li={event_id_random_li} /> -

Recovery Meetings {$lq_new__event_obj_li?.length}

+ @@ -118,6 +118,8 @@ $: lq_bulk__event_obj_li = liveQuery(async () => { +{:else} +

No recovery meetings available to show.

{/if} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte index 92ede5bb..860e615b 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_li.svelte @@ -19,35 +19,52 @@ onMount(() => {
+ + {#if $lq__event_obj_li && $lq__event_obj_li.length} +
+

+ + Results: + + + {#if $lq__event_obj_li?.length} + + + {$lq__event_obj_li.length ?? 'None'} + + {/if} +

{#each $lq__event_obj_li as idaa_event_obj, index}

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

@@ -56,17 +73,17 @@ onMount(() => {
- {#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 $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}
-->
Type of Recovery Meeting: - {idaa_event_obj.type} + {idaa_event_obj?.type}
{ When: - - {#if idaa_event_obj.weekday_sunday || idaa_event_obj.weekday_monday || idaa_event_obj.weekday_tuesday || idaa_event_obj.weekday_wednesday || idaa_event_obj.weekday_thursday || idaa_event_obj.weekday_friday || idaa_event_obj.weekday_saturday} + + {#if idaa_event_obj?.weekday_sunday || idaa_event_obj?.weekday_monday || idaa_event_obj?.weekday_tuesday || idaa_event_obj?.weekday_wednesday || idaa_event_obj?.weekday_thursday || idaa_event_obj?.weekday_friday || idaa_event_obj?.weekday_saturday} - {#if idaa_event_obj.weekday_sunday}Sunday{/if} - {#if idaa_event_obj.weekday_monday}Monday{/if} - {#if idaa_event_obj.weekday_tuesday}Tuesday{/if} - {#if idaa_event_obj.weekday_wednesday}Wednesday{/if} - {#if idaa_event_obj.weekday_thursday}Thursday{/if} - {#if idaa_event_obj.weekday_friday}Friday{/if} - {#if idaa_event_obj.weekday_saturday}Saturday{/if} + {#if idaa_event_obj?.weekday_sunday}Sunday{/if} + {#if idaa_event_obj?.weekday_monday}Monday{/if} + {#if idaa_event_obj?.weekday_tuesday}Tuesday{/if} + {#if idaa_event_obj?.weekday_wednesday}Wednesday{/if} + {#if idaa_event_obj?.weekday_thursday}Thursday{/if} + {#if idaa_event_obj?.weekday_friday}Friday{/if} + {#if idaa_event_obj?.weekday_saturday}Saturday{/if} {/if} - {#if idaa_event_obj.recurring_start_time} + {#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} + {#if idaa_event_obj?.timezone} - ({idaa_event_obj.timezone}) + ({idaa_event_obj?.timezone}) {:else}
Required: No timezone was given!
{/if} @@ -172,30 +189,30 @@ onMount(() => {
- {#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[0].full_name} + {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[0].full_name}
Contact: - {idaa_event_obj.contact_li_json[0].full_name} - {#if idaa_event_obj.contact_li_json[0].email} - | {idaa_event_obj.contact_li_json[0].email} + {idaa_event_obj?.contact_li_json[0].full_name} + {#if idaa_event_obj?.contact_li_json[0].email} + | {idaa_event_obj?.contact_li_json[0].email} {/if} - {#if idaa_event_obj.contact_li_json[0].phone_mobile} + {#if idaa_event_obj?.contact_li_json[0].phone_mobile} | Mobile: - {idaa_event_obj.contact_li_json[0].phone_mobile} + {idaa_event_obj?.contact_li_json[0].phone_mobile} {/if} - {#if idaa_event_obj.contact_li_json[0].phone_home} + {#if idaa_event_obj?.contact_li_json[0].phone_home} | Home: - {idaa_event_obj.contact_li_json[0].phone_home} + {idaa_event_obj?.contact_li_json[0].phone_home} {/if} - {#if idaa_event_obj.contact_li_json[0].phone_office} + {#if idaa_event_obj?.contact_li_json[0].phone_office} | Office: - {idaa_event_obj.contact_li_json[0].phone_office} + {idaa_event_obj?.contact_li_json[0].phone_office} {/if} - {#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if} + {#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj?.contact_li_json[0].other_text}{/if}
{:else} {#if $ae_loc.trusted_access} @@ -206,37 +223,37 @@ onMount(() => { {/if} {/if} - {#if idaa_event_obj.contact_li_json && idaa_event_obj.contact_li_json.length && idaa_event_obj.contact_li_json[1].full_name} + {#if idaa_event_obj?.contact_li_json && idaa_event_obj?.contact_li_json.length && idaa_event_obj?.contact_li_json[1].full_name}
Contact: - {idaa_event_obj.contact_li_json[1].full_name} - {#if idaa_event_obj.contact_li_json[1].email} - | {idaa_event_obj.contact_li_json[1].email} + {idaa_event_obj?.contact_li_json[1].full_name} + {#if idaa_event_obj?.contact_li_json[1].email} + | {idaa_event_obj?.contact_li_json[1].email} {/if} - {#if idaa_event_obj.contact_li_json[1].phone_mobile} + {#if idaa_event_obj?.contact_li_json[1].phone_mobile} | Mobile: - {idaa_event_obj.contact_li_json[1].phone_mobile} + {idaa_event_obj?.contact_li_json[1].phone_mobile} {/if} - {#if idaa_event_obj.contact_li_json[1].phone_home} + {#if idaa_event_obj?.contact_li_json[1].phone_home} | Home: - {idaa_event_obj.contact_li_json[1].phone_home} + {idaa_event_obj?.contact_li_json[1].phone_home} {/if} - {#if idaa_event_obj.contact_li_json[1].phone_office} + {#if idaa_event_obj?.contact_li_json[1].phone_office} | Office: - {idaa_event_obj.contact_li_json[1].phone_office} + {idaa_event_obj?.contact_li_json[1].phone_office} {/if} - {#if idaa_event_obj.contact_li_json[0].other_text}| {idaa_event_obj.contact_li_json[0].other_text}{/if} + {#if idaa_event_obj?.contact_li_json[0].other_text}| {idaa_event_obj?.contact_li_json[0].other_text}{/if}
{/if} {#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)} + {#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} - {#if !idaa_event_obj.external_person_id} + {#if !idaa_event_obj?.external_person_id}
Warning: Not linked to a Novi record!
{/if} {/if} @@ -266,26 +283,29 @@ onMount(() => { - Created on: {ae_util.iso_datetime_formatter(idaa_event_obj.created_on, 'datetime_short')} + Created on: {ae_util.iso_datetime_formatter(idaa_event_obj?.created_on, 'datetime_short')} - Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj.updated_on, 'datetime_short')} + Updated on: {ae_util.iso_datetime_formatter(idaa_event_obj?.updated_on, 'datetime_short')}
{/if} {/each} + {:else} +
{#if $idaa_loc.recovery_meetings.qry_status === 'loading'}
Loading...
{:else} -
No recovery meetings avalible to show. The search may need to be changed.
+
No recovery meetings available to show. The search may need to be changed.
{/if} +
{/if} diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte index 1b5fa0e6..37511119 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_qry.svelte @@ -7,6 +7,7 @@ import { Spinner } from 'flowbite-svelte'; import type { key_val } from '$lib/ae_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 { core_func } from '$lib/ae_core_functions'; import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores'; import { events_func } from '$lib/ae_events_functions'; @@ -15,6 +16,7 @@ export let event_id_random_li: Array; // export let container_class_li = []; +let ae_promises: key_val = {}; let ae_tmp: key_val = {}; let ae_trigger: any = null; let ae_triggers: key_val = {}; @@ -57,7 +59,7 @@ async function handle_search__event( params = { 'qry__enabled': $idaa_loc.recovery_meetings.qry_enabled ?? 'enabled', 'qry__hidden': $idaa_loc.recovery_meetings.qry_hidden ?? 'not_hidden', - 'qry__limit': $idaa_loc.recovery_meetings.qry_limit__events ?? 35, + 'qry__limit': $idaa_loc.recovery_meetings.qry_limit ?? 35, }, try_cache=false, log_lvl=1, @@ -111,6 +113,7 @@ async function handle_search__event( api_cfg: $ae_api, for_obj_type: 'account', for_obj_id: $ae_loc.account_id, + order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'name': 'ASC'}, qry_conference: false, qry_str: lk_search_str, // type_code: type_code, @@ -322,6 +325,45 @@ async function handle_search__event(
+ + + + + + {#if $ae_loc.trusted_access && !$idaa_loc.recovery_meetings.hidden} + {#if $ae_loc.trusted_access} + + {/if} +