diff --git a/package.json b/package.json index f38cbfd4..f0eb1ecb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osit-aether-app-svelte", - "version": "3.0.6", + "version": "3.1.0", "description": "One Sky IT's Aether App created with Svelte, SvelteKit, Tailwind CSS, Lucide, Font Awesome, and Skeleton UI. -Scott Idem", "homepage": "https://oneskyit.com/", "private": true, diff --git a/src/lib/ae_events/ae_events__event_file.ts b/src/lib/ae_events/ae_events__event_file.ts index f1ccfb57..53469650 100644 --- a/src/lib/ae_events/ae_events__event_file.ts +++ b/src/lib/ae_events/ae_events__event_file.ts @@ -384,6 +384,7 @@ export async function qry__event_file( event_id, qry_created_on = null, // Example greater than: '2024-10-24' qry_min_file_size = null, + qry_file_purpose = null, enabled = 'enabled', hidden = 'not_hidden', limit = 50, @@ -397,6 +398,7 @@ export async function qry__event_file( event_id: any, qry_created_on?: null|string, qry_min_file_size?: null|number, + qry_file_purpose?: null|string, enabled?: string, hidden?: string, limit?: number, @@ -427,7 +429,7 @@ export async function qry__event_file( } if (qry_min_file_size) { - console.log('qry_min_file_size:', qry_min_file_size); + // console.log('qry_min_file_size:', qry_min_file_size); let qry_param = { type: "AND", @@ -438,6 +440,21 @@ export async function qry__event_file( params_json['qry'].push(qry_param); } + if (qry_file_purpose) { + let qry_param = + { + type: "AND", + field: "file_purpose", + operator: "=", + value: qry_file_purpose + }; + params_json['qry'].push(qry_param); + } + + if (log_lvl) { + console.log('params_json:', params_json); + } + ae_promises.load__event_file_obj_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ api_cfg: api_cfg, obj_type: 'event_file', diff --git a/src/routes/events/[event_id]/reports/+page.svelte b/src/routes/events/[event_id]/reports/+page.svelte index 7d519693..b3f9413b 100644 --- a/src/routes/events/[event_id]/reports/+page.svelte +++ b/src/routes/events/[event_id]/reports/+page.svelte @@ -94,11 +94,13 @@ if ($events_loc.pres_mgmt.show_report == 'sessions_poc_agree') { } else if ($events_loc.pres_mgmt.show_report == 'recent_files') { handle_qry__event_file({ created_on_offset: $events_loc.pres_mgmt.qry__files_offset_seconds ?? 0, + file_purpose: $events_loc.pres_mgmt.qry__files_purpose ?? null, log_lvl: 0, }); } else if ($events_loc.pres_mgmt.show_report == 'large_files') { handle_qry__event_file({ min_file_size: $events_loc.pres_mgmt.qry__files_min_size ?? 100000000, // in bytes + file_purpose: $events_loc.pres_mgmt.qry__files_purpose ?? null, log_lvl: log_lvl, }); } @@ -117,6 +119,7 @@ async function handle_qry__event_file( { created_on_offset = null, min_file_size = null, // in bytes + file_purpose = null, ft_search_str = '', lk_search_str = '', try_cache = true, @@ -124,6 +127,7 @@ async function handle_qry__event_file( }: { created_on_offset?: null|number, min_file_size?: null|number, + file_purpose?: null|string, ft_search_str?: string, lk_search_str?: string, try_cache?: boolean, @@ -185,6 +189,7 @@ async function handle_qry__event_file( event_id: $events_slct.event_id, qry_created_on: created_on_str, qry_min_file_size: min_file_size, + qry_file_purpose: file_purpose, // fulltext_search_qry_str: ft_search_str, // like_search_qry_str: lk_search_str, // external_event_id: $events_loc.pres_mgmt.default__external_registration_id, @@ -1038,11 +1043,19 @@ async function handle_qry__event_session( {#if $events_loc.pres_mgmt.show_report == 'recent_files' && event_file_id_random_li} -

- Recent File Uploads +
+

+ Recent File Uploads +

+ {#if $events_sess.pres_mgmt.status_rpt[$events_sess.pres_mgmt?.show_report] == 'loading'} + + Loading... + {/if} + +
-

+ + + + + {#if $events_loc.pres_mgmt.show_report == 'large_files' && event_file_id_random_li} -

- Large File Uploads +
+

+ Large File Uploads +

+ {#if $events_sess.pres_mgmt.status_rpt[$events_sess.pres_mgmt?.show_report] == 'loading'} + + Loading... + {/if} + +
-

+ + + + +