Working on making the Journal Entry search work correctly. There were/are some difference between the front and backend. Mainly it was not expecting not_enabled. It was expecting disabled. That has been changed on the backend. There is still some weirdness with the "all" options for either the enable and or hide fields.
This commit is contained in:
@@ -173,15 +173,15 @@ export async function load_ae_obj_li__journal({
|
||||
|
||||
// Add enabled/hidden filters to search query as V3 search is explicit
|
||||
if (enabled === 'enabled') {
|
||||
search_query.and.push({ field: 'enabled', op: 'eq', value: true });
|
||||
search_query.and.push({ field: 'enable', op: 'eq', value: true });
|
||||
} else if (enabled === 'not_enabled') {
|
||||
search_query.and.push({ field: 'enabled', op: 'eq', value: false });
|
||||
search_query.and.push({ field: 'enable', op: 'eq', value: false });
|
||||
}
|
||||
|
||||
if (hidden === 'hidden') {
|
||||
search_query.and.push({ field: 'hidden', op: 'eq', value: true });
|
||||
search_query.and.push({ field: 'hide', op: 'eq', value: true });
|
||||
} else if (hidden === 'not_hidden') {
|
||||
search_query.and.push({ field: 'hidden', op: 'eq', value: false });
|
||||
search_query.and.push({ field: 'hide', op: 'eq', value: false });
|
||||
}
|
||||
|
||||
if (log_lvl) {
|
||||
@@ -523,15 +523,15 @@ export async function qry__journal({
|
||||
|
||||
// Add enabled/hidden filters
|
||||
if (enabled === 'enabled') {
|
||||
search_query.and.push({ field: 'enabled', op: 'eq', value: true });
|
||||
search_query.and.push({ field: 'enable', op: 'eq', value: true });
|
||||
} else if (enabled === 'not_enabled') {
|
||||
search_query.and.push({ field: 'enabled', op: 'eq', value: false });
|
||||
search_query.and.push({ field: 'enable', op: 'eq', value: false });
|
||||
}
|
||||
|
||||
if (hidden === 'hidden') {
|
||||
search_query.and.push({ field: 'hidden', op: 'eq', value: true });
|
||||
search_query.and.push({ field: 'hide', op: 'eq', value: true });
|
||||
} else if (hidden === 'not_hidden') {
|
||||
search_query.and.push({ field: 'hidden', op: 'eq', value: false });
|
||||
search_query.and.push({ field: 'hide', op: 'eq', value: false });
|
||||
}
|
||||
|
||||
ae_promises.load__journal_obj_li = await api
|
||||
|
||||
@@ -348,6 +348,7 @@ export async function qry__journal_entry({
|
||||
console.log('qry_str:', qry_str);
|
||||
// Using 'like' with wildcards to ensure compatibility
|
||||
search_query.and.push({ field: 'default_qry_str', op: 'like', value: `%${qry_str.trim()}%` });
|
||||
params['lk_qry'] = { 'default_qry_str': qry_str.trim() };
|
||||
}
|
||||
|
||||
if (qry_created_on) {
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
if ($journals_trig.journal_entry_qry) {
|
||||
$journals_trig.journal_entry_qry = false;
|
||||
|
||||
log_lvl = 1;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`Triggered: $journals_trig.journal_entry_qry: ${$journals_loc.qry__search_text}`
|
||||
@@ -90,10 +92,10 @@
|
||||
// qry_priority: null,
|
||||
// qry_type: and_type,
|
||||
|
||||
// enabled: $journals_loc.recovery_meetings.qry__enabled,
|
||||
// hidden: $journals_loc.recovery_meetings.qry__hidden,
|
||||
// order_by_li: $journals_loc.recovery_meetings.qry__order_by_li,
|
||||
// limit: $journals_loc.recovery_meetings.qry__limit,
|
||||
enabled: 'enabled', // $journals_loc.qry__enabled,
|
||||
hidden: 'not_hidden', // $journals_loc.qry__hidden,
|
||||
// order_by_li: $journals_loc.qry__order_by_li,
|
||||
// limit: $journals_loc.qry__limit,
|
||||
// try_cache: try_cache,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user