Minor changes

This commit is contained in:
Scott Idem
2024-08-14 14:37:53 -04:00
parent 380a8d2ad3
commit 56c16bef10

View File

@@ -271,6 +271,7 @@ export async function handle_load_ae_obj_li__event_session(
}
// This new function is using CRUD v2. This should allow for more flexibility in the queries.
// Updated 2024-08-14
export async function handle_qry__event_session(
{
@@ -278,6 +279,7 @@ export async function handle_qry__event_session(
event_id,
qry_str,
qry_files,
qry_start_datetime, // Example greater than: '2024-10-24'
params = {},
try_cache = true,
log_lvl = 0
@@ -286,6 +288,7 @@ export async function handle_qry__event_session(
event_id: any,
qry_str?: string,
qry_files?: null|boolean,
qry_start_datetime?: null|string,
params?: any,
try_cache?: boolean,
log_lvl?: number
@@ -305,26 +308,37 @@ export async function handle_qry__event_session(
// params_json['ft_qry']['default_qry_str'] = qry_str;
// }
params_json['qry'] = {};
params_json['qry'] = [];
if (qry_files === true) {
params_json['qry'] = [
let qry_param =
{
type: "AND",
field: "file_count_all",
operator: ">",
value: 0
},
];
};
params_json['qry'].push(qry_param);
} else if (qry_files === false) {
params_json['qry'] = [
let qry_param =
{
type: "AND",
field: "file_count_all",
operator: "IS",
value: null
},
];
};
params_json['qry'].push(qry_param);
}
if (qry_start_datetime) {
let qry_param =
{
type: "AND",
field: "start_datetime",
operator: ">",
value: qry_start_datetime
};
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'};