Much better searching triggers for recovery meetings (events).
This commit is contained in:
@@ -72,12 +72,17 @@ $: if ($idaa_trig.post_li) {
|
||||
console.log(`Triggered: $idaa_trig.post_li`);
|
||||
}
|
||||
|
||||
if ($idaa_loc.bb.qry__enabled !== 'all' || $idaa_loc.bb.qry__hidden !== 'all') {
|
||||
// This may need to be rethought... For now things are cleared if query is anything but 'all' for enabled and hidden.
|
||||
if ($idaa_loc.bb.qry__enabled !== 'all' || $idaa_loc.bb.qry__hidden !== 'all' || $idaa_loc.bb.qry__limit < 50) {
|
||||
console.log(`Deleting disabled or hidden post.`);
|
||||
let results = db_posts.post
|
||||
.clear();
|
||||
console.log(`Deleted ${results} disabled post.`);
|
||||
|
||||
console.log(`Deleting disabled or hidden post comments.`);
|
||||
results = db_posts.comment
|
||||
.clear();
|
||||
console.log(`Deleted ${results} disabled post comments.`);
|
||||
}
|
||||
|
||||
$idaa_prom.load__post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
|
||||
@@ -36,6 +36,7 @@ let search_submit_results: any = null;
|
||||
id="qry_limit__posts"
|
||||
bind:value={$idaa_loc.bb.qry__limit}
|
||||
on:change={() => {
|
||||
$idaa_trig.post_li = true;
|
||||
}}
|
||||
class="select w-20 text-sm"
|
||||
>
|
||||
@@ -53,24 +54,8 @@ let search_submit_results: any = null;
|
||||
type="button"
|
||||
on:click={() => {
|
||||
$idaa_loc.bb.qry__hidden = 'all';
|
||||
// $idaa_loc.bb.qry__limit = 200;
|
||||
$idaa_loc.bb.qry__limit = 100;
|
||||
$idaa_trig.post_li = true;
|
||||
|
||||
// let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
// api_cfg: $ae_api,
|
||||
// for_obj_type: 'account',
|
||||
// for_obj_id: $ae_loc.account_id,
|
||||
// inc_comment_li: true,
|
||||
// enabled: $idaa_loc.bb.qry__enabled,
|
||||
// hidden: $idaa_loc.bb.qry__hidden,
|
||||
// limit: $idaa_loc.bb.qry__limit,
|
||||
// order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
// try_cache: true,
|
||||
// log_lvl: log_lvl
|
||||
// });
|
||||
// console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
// $idaa_slct.post_obj_li = load_post_obj_li;
|
||||
|
||||
}}
|
||||
class="btn_show_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
>
|
||||
@@ -81,23 +66,7 @@ let search_submit_results: any = null;
|
||||
type="button"
|
||||
on:click={() => {
|
||||
$idaa_loc.bb.qry__hidden = 'not_hidden';
|
||||
// $idaa_loc.bb.qry__limit = 100;
|
||||
$idaa_trig.post_li = true;
|
||||
|
||||
// let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
// api_cfg: $ae_api,
|
||||
// for_obj_type: 'account',
|
||||
// for_obj_id: $ae_loc.account_id,
|
||||
// inc_comment_li: true,
|
||||
// enabled: $idaa_loc.bb.qry__enabled,
|
||||
// hidden: $idaa_loc.bb.qry__hidden,
|
||||
// limit: $idaa_loc.bb.qry__limit,
|
||||
// order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
// try_cache: true,
|
||||
// log_lvl: log_lvl
|
||||
// });
|
||||
// console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
// $idaa_slct.post_obj_li = load_post_obj_li;
|
||||
}}
|
||||
class="btn_hide_bb_post ae_btn btn btn-info btn-sm variant-ghost-secondary"
|
||||
>
|
||||
@@ -113,21 +82,6 @@ let search_submit_results: any = null;
|
||||
$idaa_loc.bb.qry__enabled = 'all';
|
||||
$idaa_loc.bb.qry__limit = 500;
|
||||
$idaa_trig.post_li = true;
|
||||
|
||||
// let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
// api_cfg: $ae_api,
|
||||
// for_obj_type: 'account',
|
||||
// for_obj_id: $ae_loc.account_id,
|
||||
// inc_comment_li: true,
|
||||
// enabled: $idaa_loc.bb.qry__enabled,
|
||||
// hidden: $idaa_loc.bb.qry__hidden,
|
||||
// limit: $idaa_loc.bb.qry__limit,
|
||||
// order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
// try_cache: true,
|
||||
// log_lvl: log_lvl
|
||||
// });
|
||||
// console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
// $idaa_slct.post_obj_li = load_post_obj_li;
|
||||
}}
|
||||
class="btn_show_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
>
|
||||
@@ -139,21 +93,6 @@ let search_submit_results: any = null;
|
||||
on:click={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'enabled';
|
||||
$idaa_trig.post_li = true;
|
||||
|
||||
// let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
// api_cfg: $ae_api,
|
||||
// for_obj_type: 'account',
|
||||
// for_obj_id: $ae_loc.account_id,
|
||||
// inc_comment_li: true,
|
||||
// enabled: $idaa_loc.bb.qry__enabled,
|
||||
// hidden: $idaa_loc.bb.qry__hidden,
|
||||
// limit: $idaa_loc.bb.qry__limit,
|
||||
// order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
// try_cache: true,
|
||||
// log_lvl: log_lvl
|
||||
// });
|
||||
// console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
// $idaa_slct.post_obj_li = load_post_obj_li;
|
||||
}}
|
||||
class="btn_hide_bb_post ae_btn btn btn-warning btn-sm variant-ghost-secondary"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user