Started pulling in the IDAA Bulletin Board code

This commit is contained in:
Scott Idem
2024-09-27 18:55:24 -04:00
parent 58928d07eb
commit 35c901f144
14 changed files with 588 additions and 269 deletions

View File

@@ -0,0 +1,81 @@
<script lang="ts">
/** @type {import('./$types').PageData} */
export let data: any;
let log_lvl = 2;
// console.log(`ae_idaa_bb +page.svelte data:`, data);
import { browser } from '$app/environment';
import { Modal } from 'flowbite-svelte';
import type { key_val } from '$lib/ae_stores';
import { ae_util } from '$lib/ae_utils/ae_utils';
import { liveQuery } from "dexie";
import { core_func } from '$lib/ae_core_functions';
import { db_posts } from "$lib/db_posts";
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, idaa_trigger } from '$lib/ae_idaa_stores';
import { posts_func } from '$lib/ae_posts_functions';
import Comp__post_obj_li from './ae_idaa_comp__post_obj_li.svelte';
import Comp__post_obj_id_view from './ae_idaa_comp__post_obj_id_view.svelte';
$: lq__post_obj_li = liveQuery(async () => {
let results = await db_posts.post
.where('account_id')
.equals($slct.account_id)
.sortBy('name');
return results;
});
$: lq__post_obj = liveQuery(async () => {
let results = await db_posts.post
.get($idaa_slct.post_id);
return results;
});
</script>
<section
class="
ae_idaa__recovery_meetings
container h-full mx-auto
flex flex-col gap-1
py-1 px-2 pb-16
items-center
min-w-full
max-w-max
"
>
<h1>Bulletin Board {$lq__post_obj_li?.length}</h1>
{#if $lq__post_obj_li && $lq__post_obj_li?.length }
<Comp__post_obj_li
lq__post_obj_li={lq__post_obj_li}
/>
{/if}
</section>
<!-- Main modal -->
<Modal
title="{$lq__post_obj?.title} - {$lq__post_obj?.id}"
bind:open={$idaa_slct.post_id}
autoclose={false}
size="xl"
class="bg-white dark:bg-gray-800 text-gray-800 dark:text-gray-200 rounded-lg border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700 shadow-md relative flex flex-col mx-auto w-full divide-y"
>
<Comp__post_obj_id_view
lq__post_obj={lq__post_obj}
/>
</Modal>