The search is working better now. Also better and less debug logging.
This commit is contained in:
@@ -81,6 +81,7 @@ export async function load_ae_obj_li__event(
|
||||
inc_presenter_li = false,
|
||||
inc_session_li = false,
|
||||
order_by_li = {'start_datetime': 'DESC', 'name': 'ASC', 'updated_on': 'DESC', 'created_on': 'DESC'},
|
||||
params_json = null,
|
||||
params = {},
|
||||
try_cache = true,
|
||||
log_lvl = 0
|
||||
@@ -96,6 +97,7 @@ export async function load_ae_obj_li__event(
|
||||
inc_presenter_li?: boolean,
|
||||
inc_session_li?: boolean,
|
||||
order_by_li?: key_val,
|
||||
params_json?: null|key_val,
|
||||
params?: key_val,
|
||||
try_cache?: boolean,
|
||||
log_lvl?: number
|
||||
@@ -108,19 +110,31 @@ export async function load_ae_obj_li__event(
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
|
||||
let params_json: key_val = {};
|
||||
|
||||
params_json['and_qry'] = {};
|
||||
// There is probably a better way to handle this. I don't want to just start a new object if it is not passed. However, the qry_conference and qry_str are sort of a special case. -2024-10-01
|
||||
if (!params_json) {
|
||||
params_json = {};
|
||||
}
|
||||
|
||||
if (qry_conference) {
|
||||
if (!params_json['and_qry']) {
|
||||
params_json['and_qry'] = {};
|
||||
}
|
||||
|
||||
params_json['and_qry']['conference'] = qry_conference;
|
||||
} else if (qry_conference === false) {
|
||||
if (!params_json['and_qry']) {
|
||||
params_json['and_qry'] = {};
|
||||
}
|
||||
|
||||
console.log('qry_conference is false!');
|
||||
params_json['and_qry']['conference'] = qry_conference;
|
||||
}
|
||||
|
||||
if (qry_str) {
|
||||
if (!params_json['ft_qry']) {
|
||||
params_json['ft_qry'] = {};
|
||||
}
|
||||
|
||||
params_json['ft_qry'] = {};
|
||||
params_json['ft_qry']['default_qry_str'] = qry_str;
|
||||
params_json['ft_qry']['location_address_json_ext'] = qry_str;
|
||||
@@ -191,8 +205,8 @@ export async function qry_ae_obj_li__event(
|
||||
for_obj_type = 'account',
|
||||
for_obj_id,
|
||||
qry_conference = true,
|
||||
qry_virtual = null,
|
||||
qry_physical = null,
|
||||
qry_virtual = null,
|
||||
qry_type = null,
|
||||
qry_str = null,
|
||||
inc_file_li = false,
|
||||
@@ -209,8 +223,8 @@ export async function qry_ae_obj_li__event(
|
||||
for_obj_type: string,
|
||||
for_obj_id: string,
|
||||
qry_conference?: null|boolean,
|
||||
qry_virtual?: null|boolean,
|
||||
qry_physical?: null|boolean,
|
||||
qry_virtual?: null|boolean,
|
||||
qry_type?: null|string,
|
||||
qry_str?: null|string,
|
||||
inc_file_li?: boolean,
|
||||
@@ -231,29 +245,28 @@ export async function qry_ae_obj_li__event(
|
||||
let limit: number = (params.qry__limit ?? 99); // 99
|
||||
let offset: number = (params.qry__offset ?? 0); // 0
|
||||
|
||||
// Build the params_json object. This needs to be documented better! -2024-10-01
|
||||
let params_json: key_val = {};
|
||||
|
||||
params_json['and_qry'] = {};
|
||||
|
||||
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;
|
||||
}
|
||||
// This is handled in the actual load_ae_obj_li__event() function. For now...?
|
||||
// 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;
|
||||
// }
|
||||
|
||||
if (qry_virtual) {
|
||||
params_json['and_qry']['virtual'] = qry_virtual;
|
||||
} else if (qry_virtual === false) {
|
||||
console.log('qry_virtual is false!');
|
||||
params_json['and_qry']['virtual'] = qry_virtual;
|
||||
}
|
||||
|
||||
if (qry_physical) {
|
||||
params_json['and_qry']['physical'] = qry_physical;
|
||||
} else if (qry_physical === false) {
|
||||
console.log('qry_physical is false!');
|
||||
params_json['and_qry']['physical'] = qry_physical;
|
||||
if (qry_physical && qry_virtual) {
|
||||
// Ignore both if both are set to true.
|
||||
} else if (qry_physical || qry_virtual) {
|
||||
if (qry_physical) {
|
||||
params_json['and_qry']['physical'] = qry_physical;
|
||||
}
|
||||
if (qry_virtual) {
|
||||
params_json['and_qry']['virtual'] = qry_virtual;
|
||||
}
|
||||
}
|
||||
|
||||
if (qry_type) {
|
||||
@@ -283,6 +296,7 @@ export async function qry_ae_obj_li__event(
|
||||
inc_presenter_li: inc_presenter_li,
|
||||
inc_session_li: inc_session_li,
|
||||
order_by_li: order_by_li,
|
||||
params_json: params_json,
|
||||
params: params,
|
||||
try_cache: try_cache,
|
||||
log_lvl: log_lvl
|
||||
|
||||
Reference in New Issue
Block a user