More clean up. Making this live now.
This commit is contained in:
@@ -289,7 +289,6 @@ async function handle_search__event_session(
|
||||
}
|
||||
|
||||
if ($events_sess.pres_mgmt?.status_qry__search != null && $events_sess.pres_mgmt?.status_qry__search != 'done') {
|
||||
// console.log('*** TEST SEARCH - $events_sess.pres_mgmt.status_qry__search != done ***');
|
||||
// WARNING: This is a temporary fix for the search string. It needs to be fixed in the future. Using lk_search_str for now.
|
||||
$events_sess.pres_mgmt.status_qry__last_request_str = lk_search_str;
|
||||
|
||||
@@ -298,7 +297,7 @@ async function handle_search__event_session(
|
||||
search_delay += 50+random_delay;
|
||||
}
|
||||
|
||||
log_lvl = 1;
|
||||
// log_lvl = 1;
|
||||
|
||||
let count = 0;
|
||||
let request_loop = setInterval(() => {
|
||||
@@ -349,39 +348,11 @@ async function handle_search__event_session(
|
||||
$events_trigger = 'process_search_results';
|
||||
$events_sess.pres_mgmt.status_qry__search = 'processing';
|
||||
$events_slct.event_session_obj_li = search_results;
|
||||
// console.log(search_results);
|
||||
// $events_sess.pres_mgmt.status_qry__search = 'done';
|
||||
|
||||
// if (log_lvl) {
|
||||
// console.log('TEST SEARCH - Search done. Pulling out the event_session_id_randoms...');
|
||||
// }
|
||||
// console.log(`TEST search: ${$lq_kv__event_session_obj_li}`);
|
||||
|
||||
// event_session_id_random_li = [];
|
||||
|
||||
// // We need to loop through the array of objects and get the event_session_id_random from each object a new list of event_session_id_randoms. Then we can use this list to get the full objects from the database.
|
||||
// let tmp_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
|
||||
// if (search_results && search_results.length) {
|
||||
// for (let i = 0; i < search_results.length; i++) {
|
||||
// tmp_li.push($events_slct.event_session_obj_li[i].event_session_id_random);
|
||||
// }
|
||||
// }
|
||||
// event_session_id_random_li = tmp_li;
|
||||
})
|
||||
.finally(() => {
|
||||
|
||||
|
||||
// event_session_id_random_li = $events_slct.event_session_obj_li.map(session_obj => session_obj.event_session_id_random);
|
||||
|
||||
// Finally done with the search.
|
||||
$events_trigger = 'search_done';
|
||||
$events_sess.pres_mgmt.status_qry__search = 'done';
|
||||
|
||||
// if (log_lvl > 1) {
|
||||
// console.log(`TEST SEARCH - event_session_id_random_li:`, event_session_id_random_li);
|
||||
// // console.log(`TEST SEARCH - search live query: ${$lq_kv__event_session_obj_li}`);
|
||||
// }
|
||||
|
||||
});
|
||||
clearInterval(request_loop);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user