Fixed show/hide for hidden and disabled records.
This commit is contained in:
@@ -50,6 +50,12 @@ let idaa_local_data_struct: key_val = {
|
||||
limit: 150,
|
||||
offset: 0,
|
||||
show_list__post_obj_li: true,
|
||||
|
||||
qry__enabled: 'enabled', // all, disabled, enabled
|
||||
qry__hidden: 'not_hidden', // all, hidden, not_hidden
|
||||
qry__limit: 150,
|
||||
qry__offset: 0,
|
||||
qry__order_by_li: {'priority': 'DESC', 'sort': 'DESC', 'updated_on': 'DESC', 'created_on': 'DESC', 'title': 'ASC'},
|
||||
},
|
||||
|
||||
recovery_meetings: {
|
||||
|
||||
@@ -25,7 +25,7 @@ export async function load({ params, parent }) { // route
|
||||
ae_acct.slct.account_id = account_id;
|
||||
|
||||
if (browser) {
|
||||
let load_event_obj_li = posts_func.load_ae_obj_li__post({
|
||||
let load_post_obj_li = posts_func.load_ae_obj_li__post({
|
||||
api_cfg: ae_acct.api,
|
||||
for_obj_type: 'account',
|
||||
for_obj_id: account_id,
|
||||
@@ -35,8 +35,8 @@ export async function load({ params, parent }) { // route
|
||||
try_cache: true,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
console.log(`load_event_obj_li = `, load_event_obj_li);
|
||||
ae_acct.slct.event_obj_li = load_event_obj_li;
|
||||
console.log(`load_post_obj_li = `, load_post_obj_li);
|
||||
ae_acct.slct.post_obj_li = load_post_obj_li;
|
||||
}
|
||||
|
||||
// WARNING: Precaution against shared data between sites and sessions.
|
||||
|
||||
@@ -22,8 +22,9 @@ onMount(() => {
|
||||
{#each $lq__post_obj_li as idaa_post_obj, index}
|
||||
<div
|
||||
class="container bb_post post_obj border border-1 rounded p-2 mb-2 space-y-2"
|
||||
class:dim={idaa_post_obj.hide}
|
||||
class:dim={idaa_post_obj?.hide}
|
||||
class:bg-warning-100={!idaa_post_obj?.enable}
|
||||
class:hidden={(idaa_post_obj.hide && $idaa_loc.bb.qry__hidden != 'all') || (!idaa_post_obj.enable && $idaa_loc.bb.qry__enabled != 'all')}
|
||||
>
|
||||
|
||||
<header class="ae_header">
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<script lang="ts">
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
export let log_lvl = 1;
|
||||
import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||
import { posts_func } from '$lib/ae_posts/ae_posts_functions';
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
let ae_tmp: key_val = {};
|
||||
@@ -52,6 +54,21 @@ let search_submit_results: any = null;
|
||||
$idaa_loc.bb.qry__hidden = 'all';
|
||||
$idaa_loc.bb.qry__limit = 200;
|
||||
ae_trigger = 'load__post_obj_li';
|
||||
|
||||
|
||||
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,
|
||||
order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
params: {qry__enabled: $idaa_loc.bb.qry__enabled, qry__hidden: $idaa_loc.bb.qry__hidden, qry__limit: $idaa_loc.bb.qry__limit},
|
||||
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"
|
||||
>
|
||||
@@ -63,6 +80,19 @@ let search_submit_results: any = null;
|
||||
$idaa_loc.bb.qry__hidden = 'not_hidden';
|
||||
$idaa_loc.bb.qry__limit = 100;
|
||||
ae_trigger = 'load__post_obj_li';
|
||||
|
||||
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,
|
||||
order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
params: {qry__enabled: $idaa_loc.bb.qry__enabled, qry__hidden: $idaa_loc.bb.qry__hidden, qry__limit: $idaa_loc.bb.qry__limit},
|
||||
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"
|
||||
>
|
||||
@@ -77,6 +107,19 @@ let search_submit_results: any = null;
|
||||
$idaa_loc.bb.qry__enabled = 'all';
|
||||
$idaa_loc.bb.qry__limit = 500;
|
||||
ae_trigger = 'load__post_obj_li';
|
||||
|
||||
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,
|
||||
order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
params: {qry__enabled: $idaa_loc.bb.qry__enabled, qry__hidden: $idaa_loc.bb.qry__hidden, qry__limit: $idaa_loc.bb.qry__limit},
|
||||
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"
|
||||
>
|
||||
@@ -87,6 +130,19 @@ let search_submit_results: any = null;
|
||||
on:click={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'enabled';
|
||||
ae_trigger = 'load__post_obj_li';
|
||||
|
||||
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,
|
||||
order_by_li: $idaa_loc.bb.qry__order_by_li,
|
||||
params: {qry__enabled: $idaa_loc.bb.qry__enabled, qry__hidden: $idaa_loc.bb.qry__hidden, qry__limit: $idaa_loc.bb.qry__limit},
|
||||
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