Various bug fixes and improvements. Now able to correctly create and delete Recovery Meetings.
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
// *** Import Aether core variables and functions
|
||||
export let log_lvl: number = 0;
|
||||
// *** Import other supporting libraries
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// 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, idaa_trig, idaa_prom } 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 = {};
|
||||
// let ae_trigger: any = null;
|
||||
@@ -38,7 +47,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
<select
|
||||
id="qry_limit__posts"
|
||||
bind:value={$idaa_loc.bb.qry__limit}
|
||||
on:change={() => {
|
||||
onchange={() => {
|
||||
$idaa_trig.post_li = true;
|
||||
}}
|
||||
class="
|
||||
@@ -64,7 +73,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
{#if $ae_loc.trusted_access && (!$idaa_loc.bb.qry__hidden || $idaa_loc.bb.qry__hidden == 'not_hidden')}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__hidden = 'all';
|
||||
$idaa_loc.bb.qry__limit = 100;
|
||||
$idaa_trig.post_li = true;
|
||||
@@ -81,7 +90,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
{:else if $ae_loc.trusted_access && $idaa_loc.bb.qry__hidden != 'not_hidden'}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__hidden = 'not_hidden';
|
||||
$idaa_trig.post_li = true;
|
||||
}}
|
||||
@@ -99,7 +108,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
{#if $ae_loc.administrator_access && (!$idaa_loc.bb.qry__enabled || $idaa_loc.bb.qry__enabled == 'enabled')}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'all';
|
||||
$idaa_loc.bb.qry__hidden = 'all';
|
||||
$idaa_loc.bb.qry__limit = 500;
|
||||
@@ -117,7 +126,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
{:else if $ae_loc.administrator_access && $idaa_loc.bb.qry__enabled != 'enabled'}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_loc.bb.qry__enabled = 'enabled';
|
||||
$idaa_trig.post_li = true;
|
||||
}}
|
||||
@@ -136,7 +145,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.authenticated_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
if (!confirm('Create new post?')) {
|
||||
return false;
|
||||
}
|
||||
@@ -145,7 +154,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
|
||||
let data_kv = {
|
||||
external_person_id: $idaa_loc.novi_uuid,
|
||||
title: 'Change Me',
|
||||
title: 'Change NEW Post Title',
|
||||
full_name: $idaa_loc.novi_full_name,
|
||||
email: $idaa_loc.novi_email,
|
||||
enable: true,
|
||||
@@ -153,6 +162,7 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
if (log_lvl) {
|
||||
console.log('Creating new post with data_kv:', data_kv);
|
||||
}
|
||||
|
||||
posts_func.create_ae_obj__post({
|
||||
api_cfg: $ae_api,
|
||||
account_id: $ae_loc.account_id,
|
||||
@@ -168,10 +178,12 @@ if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||
};
|
||||
$idaa_sess.bb.edit__post_obj = $idaa_slct.post_id;
|
||||
$idaa_loc.bb.edit__post_obj = $idaa_slct.post_id;
|
||||
|
||||
// if (!$idaa_loc.bb.edit_kv) {
|
||||
// $idaa_loc.bb.edit_kv = {};
|
||||
// }
|
||||
// $idaa_loc.bb.edit_kv[$idaa_slct.post_id] = 'current';
|
||||
|
||||
// alert(`Post created successfully! ${$idaa_slct.post_id}`);
|
||||
}).catch((error) => {
|
||||
console.error('Error updating post:', error);
|
||||
|
||||
Reference in New Issue
Block a user