diff --git a/src/lib/ae_api/api_get__crud_obj_li_v2.ts b/src/lib/ae_api/api_get__crud_obj_li_v2.ts index f4228f00..e739dab6 100644 --- a/src/lib/ae_api/api_get__crud_obj_li_v2.ts +++ b/src/lib/ae_api/api_get__crud_obj_li_v2.ts @@ -128,15 +128,15 @@ export async function get_ae_obj_li_for_obj_id_crud_v2( endpoint = `/crud/sponsorship/list`; // } else if (obj_type == 'user') { // endpoint = `/crud/user/list`; - // } else if (obj_type == 'lu' && for_obj_type == 'country_subdivision') { - // endpoint = `/crud/lu/country_subdivision/list`; - // for_obj_type = null; - // } else if (obj_type == 'lu' && for_obj_type == 'country') { - // endpoint = `/crud/lu/country/list`; - // for_obj_type = null; - // } else if (obj_type == 'lu' && for_obj_type == 'time_zone') { - // endpoint = `/crud/lu/time_zone/list`; - // for_obj_type = null; + } else if (obj_type == 'lu' && for_obj_type == 'country_subdivision') { + endpoint = `/crud/lu/country_subdivision/list`; + // for_obj_type = null; + } else if (obj_type == 'lu' && for_obj_type == 'country') { + endpoint = `/crud/lu/country/list`; + // for_obj_type = null; + } else if (obj_type == 'lu' && for_obj_type == 'time_zone') { + endpoint = `/crud/lu/time_zone/list`; + // for_obj_type = null; } else { console.log(`Unknown object type: ${obj_type}`); return false; diff --git a/src/lib/ae_core/core__countries.ts b/src/lib/ae_core/core__countries.ts index 8351608a..2d3b1e37 100644 --- a/src/lib/ae_core/core__countries.ts +++ b/src/lib/ae_core/core__countries.ts @@ -11,37 +11,42 @@ export async function load_ae_obj_li__country( { api_cfg, // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 299, + offset = 0, + order_by_li = {'sort': 'DESC', 'english_short_name': 'ASC', 'alpha_2_code': 'ASC'}, params = {}, try_cache = true, log_lvl = 0 }: { api_cfg: any, // account_id: string, + enabled?: string, + hidden?: string, + limit?: number, + offset?: number, + order_by_li?: key_val params?: key_val, try_cache?: boolean, log_lvl?: number } ) { - console.log(`*** load_ae_obj_li__country() ***`); - - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 300); // Actual is 249 in 2024 - let offset: number = (params.qry__offset ?? 0); // 0 - - let order_by_li = {'sort': 'DESC', 'english_short_name': 'ASC', 'alpha_2_code': 'ASC'}; + if (log_lvl) { + console.log(`*** load_ae_obj_li__country() ***`); + } let params_json: key_val = {}; // console.log('params_json:', params_json); - ae_promises.load__country_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__country_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ api_cfg: api_cfg, obj_type: 'lu', for_obj_type: 'country', // for_obj_id: account_id, - use_alt_table: false, // 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 + use_alt_tbl: false, + use_alt_mdl: false, enabled: enabled, hidden: hidden, order_by_li: order_by_li, diff --git a/src/lib/ae_core/core__country_subdivisions.ts b/src/lib/ae_core/core__country_subdivisions.ts index 86bd502d..f194d465 100644 --- a/src/lib/ae_core/core__country_subdivisions.ts +++ b/src/lib/ae_core/core__country_subdivisions.ts @@ -11,12 +11,22 @@ export async function load_ae_obj_li__country_subdivision( { api_cfg, // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 399, + offset = 0, + order_by_li = {'sort': 'DESC', 'name': 'ASC', 'code': 'ASC'}, params = {}, try_cache = true, log_lvl = 0 }: { api_cfg: any, // account_id: string, + enabled?: string, + hidden?: string, + limit?: number, + offset?: number, + order_by_li?: key_val params?: key_val, try_cache?: boolean, log_lvl?: number @@ -26,24 +36,17 @@ export async function load_ae_obj_li__country_subdivision( console.log(`*** load_ae_obj_li__country_subdivision() ***`); } - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 300); // Actual is 249 in 2024 - let offset: number = (params.qry__offset ?? 0); // 0 - - let order_by_li = {'sort': 'DESC', 'name': 'ASC', 'code': 'ASC'}; - let params_json: key_val = {}; // console.log('params_json:', params_json); - ae_promises.load__country_subdivision_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__country_subdivision_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ api_cfg: api_cfg, obj_type: 'lu', for_obj_type: 'country_subdivision', // for_obj_id: account_id, - use_alt_table: false, // 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 + use_alt_tbl: false, + use_alt_mdl: false, enabled: enabled, hidden: hidden, order_by_li: order_by_li, diff --git a/src/lib/ae_core/core__time_zones.ts b/src/lib/ae_core/core__time_zones.ts index ddc46622..80cbb757 100644 --- a/src/lib/ae_core/core__time_zones.ts +++ b/src/lib/ae_core/core__time_zones.ts @@ -11,39 +11,46 @@ export async function load_ae_obj_li__time_zone( { api_cfg, // account_id, + enabled = 'enabled', + hidden = 'not_hidden', + limit = 99, + offset = 0, + // order_by_li = {'priority': 'DESC', 'group': 'ASC', 'sort': 'DESC', 'name': 'ASC'}, + order_by_li = {'priority': 'DESC', 'sort': 'DESC', 'name': 'ASC'}, params = {}, try_cache = true, log_lvl = 0 }: { api_cfg: any, // account_id: string, + enabled?: string, + hidden?: string, + limit?: number, + offset?: number, + order_by_li?: key_val, params?: key_val, try_cache?: boolean, log_lvl?: number } ) { - console.log(`*** load_ae_obj_li__time_zone() ***`); - - let enabled: string = (params.qry__enabled ?? 'enabled'); // all, disabled, enabled - let hidden: string = (params.qry__hidden ?? 'not_hidden'); // all, hidden, not_hidden - let limit: number = (params.qry__limit ?? 625); // Actual is 594 in 2024 - let offset: number = (params.qry__offset ?? 0); // 0 - + if (log_lvl) { + console.log(`*** load_ae_obj_li__time_zone() ***`); + } let params_json: key_val = {}; // console.log('params_json:', params_json); - ae_promises.load__time_zone_li = await api.get_ae_obj_li_for_obj_id_crud({ + ae_promises.load__time_zone_li = await api.get_ae_obj_li_for_obj_id_crud_v2({ api_cfg: api_cfg, obj_type: 'lu', for_obj_type: 'time_zone', // for_obj_id: account_id, - use_alt_table: false, // 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 + use_alt_tbl: true, // NOTE: Using this with the time zones to use the view named "v_lu_time_zone_cust" + use_alt_mdl: false, enabled: enabled, hidden: hidden, - order_by_li: {'name': 'ASC'}, + order_by_li: order_by_li, limit: limit, offset: offset, params_json: params_json, diff --git a/src/lib/element_manage_hosted_file_li.svelte b/src/lib/element_manage_hosted_file_li.svelte index b0fa4bea..c568c7bf 100644 --- a/src/lib/element_manage_hosted_file_li.svelte +++ b/src/lib/element_manage_hosted_file_li.svelte @@ -116,7 +116,10 @@ ae_tmp.show__direct_download = $ae_loc.core?.show__direct_download ?? false;
    {#each $lq__hosted_file_obj_li as hosted_file_obj}
  1. - {hosted_file_obj.filename} + + {hosted_file_obj.filename} + + {ae_util.format_bytes(hosted_file_obj.size)}
  2. {/each}
diff --git a/src/routes/hosted_files/+page.svelte b/src/routes/hosted_files/+page.svelte index 302bc140..2355c64e 100644 --- a/src/routes/hosted_files/+page.svelte +++ b/src/routes/hosted_files/+page.svelte @@ -410,6 +410,7 @@ function handle_submit_form(event) { +

Step X: Manage Files

-The end diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte index cc34fb56..04fba9b3 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit.svelte @@ -95,13 +95,13 @@ if ($idaa_slct.event_id) { // $ae_loc.lu_time_zone_list = []; if ($ae_loc.lu_time_zone_list && $ae_loc.lu_time_zone_list.length > 0) { - // console.log('Already have time zone list!', $ae_loc.lu_time_zone_list); + console.log('Already have time zone list!', $ae_loc.lu_time_zone_list); } else { console.log('No time zone list'); let lu_time_zone_li_get_promise = core_func.load_ae_obj_li__time_zone({ api_cfg: $ae_api, - log_lvl: 1 + log_lvl: log_lvl }) .then(function (lu_time_zone_li_get_result) { if (lu_time_zone_li_get_result) { @@ -154,7 +154,7 @@ if (lu_country_list && lu_country_list.length > 50 && Math.random() > 0.8) { let lu_country_li_get_promise = core_func.load_ae_obj_li__country({ api_cfg: $ae_api, - log_lvl: 2 + log_lvl: 1 }) .then(function (lu_country_li_get_result) { if (lu_country_li_get_result) {