Implemented 'only_priority' filtering for V3 Lookups.
- Updated V3 lookup API and core timezone loader to support the 'only_priority' flag. - Enabled high-priority timezone filtering in IDAA Recovery Meeting and Archive editors to streamline selection lists.
This commit is contained in:
@@ -15,6 +15,7 @@ export async function get_ae_lookup_li_v3({
|
||||
for_type,
|
||||
for_id,
|
||||
include_disabled = false,
|
||||
only_priority = false,
|
||||
params = {},
|
||||
headers = {},
|
||||
log_lvl = 0
|
||||
@@ -25,6 +26,7 @@ export async function get_ae_lookup_li_v3({
|
||||
for_type?: string;
|
||||
for_id?: string;
|
||||
include_disabled?: boolean;
|
||||
only_priority?: boolean;
|
||||
params?: key_val;
|
||||
headers?: Record<string, string>;
|
||||
log_lvl?: number;
|
||||
@@ -40,6 +42,7 @@ export async function get_ae_lookup_li_v3({
|
||||
if (for_type) params['for_type'] = for_type;
|
||||
if (for_id) params['for_id'] = for_id;
|
||||
if (include_disabled) params['include_disabled'] = true;
|
||||
if (only_priority) params['only_priority'] = true;
|
||||
|
||||
// Lookup data is often global; ensure account context is handled if needed,
|
||||
// but GUIDE says it uses site Whitelist Policy.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { db_core } from '$lib/ae_core/db_core';
|
||||
|
||||
const ae_promises: key_val = {};
|
||||
|
||||
// Updated 2024-10-14
|
||||
// Updated 2026-02-20
|
||||
export async function load_ae_obj_li__time_zone({
|
||||
api_cfg,
|
||||
// account_id,
|
||||
@@ -16,6 +16,7 @@ export async function load_ae_obj_li__time_zone({
|
||||
// order_by_li = {'priority': 'DESC', 'group': 'ASC', 'sort': 'DESC', 'name': 'ASC'},
|
||||
order_by_li = { priority: 'DESC', sort: 'DESC', name: 'ASC' } as const,
|
||||
params = {},
|
||||
only_priority = false,
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
}: {
|
||||
@@ -27,11 +28,12 @@ export async function load_ae_obj_li__time_zone({
|
||||
offset?: number;
|
||||
order_by_li?: key_val;
|
||||
params?: key_val;
|
||||
only_priority?: boolean;
|
||||
try_cache?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
if (log_lvl) {
|
||||
console.log(`*** load_ae_obj_li__time_zone() ***`);
|
||||
console.log(`*** load_ae_obj_li__time_zone() *** only_priority=${only_priority}`);
|
||||
}
|
||||
|
||||
const params_json: key_val = {};
|
||||
@@ -47,6 +49,7 @@ export async function load_ae_obj_li__time_zone({
|
||||
limit: limit,
|
||||
offset: offset,
|
||||
params: params,
|
||||
only_priority: only_priority,
|
||||
log_lvl: log_lvl
|
||||
})
|
||||
.then(function (time_zone_li_get_result) {
|
||||
|
||||
@@ -47,6 +47,7 @@ export const get_ae_obj_li_for_lu = async function get_ae_obj_li_for_lu({
|
||||
headers = {},
|
||||
params_json = null,
|
||||
params = {},
|
||||
only_priority = false,
|
||||
log_lvl = 1
|
||||
}: {
|
||||
api_cfg: any;
|
||||
@@ -59,6 +60,7 @@ export const get_ae_obj_li_for_lu = async function get_ae_obj_li_for_lu({
|
||||
headers?: any;
|
||||
params_json?: any;
|
||||
params?: key_val;
|
||||
only_priority?: boolean;
|
||||
log_lvl?: number;
|
||||
}) {
|
||||
if (log_lvl) {
|
||||
@@ -77,6 +79,7 @@ export const get_ae_obj_li_for_lu = async function get_ae_obj_li_for_lu({
|
||||
api_cfg,
|
||||
lu_type: for_lu_type,
|
||||
include_disabled: enabled === 'all',
|
||||
only_priority: only_priority,
|
||||
params,
|
||||
headers: merged_headers,
|
||||
log_lvl
|
||||
|
||||
Reference in New Issue
Block a user