Lots of clean up. Going to go with backup plan for IDAA and dealing with the Novi iframes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/** @type {import('./$types').LayoutLoad} */
|
||||
console.log(`IDAA BB - [account_id] +layout.ts start`);
|
||||
// console.log(`IDAA BB - [account_id] +layout.ts start`);
|
||||
|
||||
// import { error } from '@sveltejs/kit';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').PageData} */
|
||||
let log_lvl: number = 1;
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
|
||||
let log_lvl: number = $state(0);
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { page } from '$app/state';
|
||||
import { browser } from '$app/environment';
|
||||
// import { Modal } from 'flowbite-svelte';
|
||||
// import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
// import { Modal } from 'flowbite-svelte';
|
||||
import { liveQuery } from "dexie";
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
@@ -21,16 +28,6 @@ import { idaa_loc, idaa_sess, idaa_slct, idaa_trig } from '$lib/ae_idaa_stores';
|
||||
|
||||
import Comp__archive_obj_li from './ae_idaa_comp__archive_obj_li.svelte';
|
||||
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`ae_idaa_bb +page.svelte data:`, data);
|
||||
}
|
||||
|
||||
let lq__archive_obj_li = $derived(liveQuery(async () => {
|
||||
let results = await db_archives.archive
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
<script lang="ts">
|
||||
/** @type {import('./$types').PageData} */
|
||||
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
let log_lvl: number = 0;
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { page } from '$app/state';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
@@ -28,17 +36,23 @@ import Archive_content_obj_id_edit from './ae_idaa_comp__archive_content_obj_id_
|
||||
// import Media_player from './../ae_idaa_comp__media_player.svelte';
|
||||
import Modal_media_player from './ae_idaa_comp__modal_media_player.svelte';
|
||||
|
||||
interface Props {
|
||||
data: any;
|
||||
}
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
// let ae_promises: key_val = {};
|
||||
// let ae_tmp: key_val = {};
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
// Variables
|
||||
|
||||
// let archive_content_id = page.url.searchParams.get('archive_content_id') ?? null;
|
||||
// if (!archive_content_id) {
|
||||
// $idaa_slct.archive_content_id = null;
|
||||
// } else {
|
||||
// console.log(`ae Posts - [archive_content_id] +page.ts: archive_content_id = `, archive_content_id);
|
||||
// $idaa_slct.archive_content_id = archive_content_id;
|
||||
// $idaa_trig.archive_content_id = archive_content_id;
|
||||
// }
|
||||
|
||||
// *** Quickly pull out data from parent(s)
|
||||
let ae_acct = data[$slct.account_id];
|
||||
if (log_lvl) {
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy';
|
||||
import { page } from '$app/state';
|
||||
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
let log_lvl: number = $state(0);
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`ae_idaa_bb +page.svelte data:`, data);
|
||||
}
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { page } from '$app/state';
|
||||
import { browser } from '$app/environment';
|
||||
// import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { liveQuery } from "dexie";
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// 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/ae_core_functions';
|
||||
import { db_posts } from "$lib/ae_posts/db_posts";
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
@@ -85,7 +84,6 @@ let lq__post_comment_obj = $derived(liveQuery(async () => {
|
||||
}));
|
||||
|
||||
|
||||
|
||||
$effect(() => {
|
||||
if ($idaa_trig.post_li) {
|
||||
$idaa_trig.post_li = false;
|
||||
@@ -174,6 +172,9 @@ $effect(() => {
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
|
||||
let message = {'post_id': $idaa_slct?.post_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
|
||||
add_activity_log(
|
||||
{
|
||||
action: 'idaa_bb_page',
|
||||
@@ -335,6 +336,11 @@ function add_activity_log(
|
||||
onclick={() => {
|
||||
$idaa_sess.bb.show__modal_view__post_id = false;
|
||||
$idaa_sess.bb.show__inline_edit__post_obj = false;
|
||||
|
||||
$idaa_slct.post_id = null;
|
||||
$idaa_slct.post_obj = null;
|
||||
let message = {'post_id': $idaa_slct.post_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-times"></span>
|
||||
@@ -355,6 +361,11 @@ function add_activity_log(
|
||||
onclick={() => {
|
||||
$idaa_sess.bb.show__modal_view__post_id = false;
|
||||
$idaa_sess.bb.show__inline_edit__post_obj = false;
|
||||
|
||||
$idaa_slct.post_id = null;
|
||||
$idaa_slct.post_obj = null;
|
||||
let message = {'post_id': $idaa_slct.post_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-times"></span>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
|
||||
import { onDestroy } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
@@ -12,27 +13,33 @@ import { idaa_loc, idaa_sess, idaa_slct, idaa_trig } from '$lib/ae_idaa_stores';
|
||||
import Comp__post_obj_id_edit from './ae_idaa_comp__post_obj_id_edit.svelte';
|
||||
import Comp__post_comment_obj_id_edit from './ae_idaa_comp__post_comment_obj_id_edit.svelte';
|
||||
|
||||
export let lq__post_obj: any;
|
||||
export let lq__post_comment_obj_li: any;
|
||||
export let lq__post_comment_obj: any;
|
||||
interface Props {
|
||||
lq__post_obj: any;
|
||||
lq__post_comment_obj_li: any;
|
||||
lq__post_comment_obj: any;
|
||||
}
|
||||
|
||||
let ae_promises: key_val = {};
|
||||
let { lq__post_obj, lq__post_comment_obj_li, lq__post_comment_obj }: Props = $props();
|
||||
|
||||
let ae_promises: key_val = $state({});
|
||||
|
||||
if ($idaa_slct.post_id) {
|
||||
console.log(`Post ID selected: ${$idaa_slct.post_id}`);
|
||||
console.log(`Post Object selected: ${lq__post_obj}`);
|
||||
console.log(`Post Object title: ${$lq__post_obj?.title}`);
|
||||
console.log(`Post Object selected: `, $lq__post_obj);
|
||||
console.log(`Post Object title (name): ${$lq__post_obj?.title}`);
|
||||
|
||||
$idaa_trig.post_id = $idaa_slct.post_id;
|
||||
}
|
||||
|
||||
$: if (browser && $lq__post_obj?.post_id) {
|
||||
document.body.scrollIntoView();
|
||||
$effect(() => {
|
||||
if (browser && $lq__post_obj?.post_id) {
|
||||
document.body.scrollIntoView();
|
||||
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('post_id', $lq__post_obj?.post_id);
|
||||
history.pushState({}, '', url);
|
||||
}
|
||||
const url = new URL(location);
|
||||
url.searchParams.set('post_id', $lq__post_obj?.post_id);
|
||||
history.pushState({}, '', url);
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
console.log('** Component Destroyed: ** View - Post Obj');
|
||||
@@ -152,7 +159,7 @@ onDestroy(() => {
|
||||
<button
|
||||
type="button"
|
||||
disabled={!$ae_loc.trusted_access}
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
ae_promises[linked_obj.hosted_file_id_random] = api.download_hosted_file({
|
||||
api_cfg: $ae_api,
|
||||
hosted_file_id: linked_obj.hosted_file_id_random,
|
||||
@@ -239,7 +246,7 @@ onDestroy(() => {
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $idaa_loc.novi_uuid}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
if (confirm('Are you sure you want to add a new comment?')) {
|
||||
$idaa_slct.post_comment_id = null;
|
||||
$idaa_slct.post_comment_obj = {};
|
||||
@@ -257,7 +264,7 @@ onDestroy(() => {
|
||||
{#if ($ae_loc.trusted_access && $ae_loc.edit_mode) || $lq__post_obj?.external_person_id === $idaa_loc.novi_uuid}
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
// $idaa_slct.post_id = $idaa_slct.post_obj.post_id_random;
|
||||
$idaa_slct.post_obj = $lq__post_obj; // In case things changed
|
||||
|
||||
@@ -337,7 +344,7 @@ onDestroy(() => {
|
||||
<div class="ae_options">
|
||||
<button
|
||||
type="button"
|
||||
on:click={() => {
|
||||
onclick={() => {
|
||||
$idaa_slct.post_comment_id = post_comment_obj.post_comment_id;
|
||||
$idaa_slct.post_comment_obj = post_comment_obj;
|
||||
|
||||
|
||||
@@ -2,15 +2,7 @@
|
||||
let log_lvl: number = 0;
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// 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_events } from "$lib/db_events";
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
// import { events_loc, events_sess, events_slct, events_trigger } from '$lib/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
import { idaa_loc, idaa_sess, idaa_slct } from '$lib/ae_idaa_stores';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy';
|
||||
import { page } from '$app/state';
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
}
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
let log_lvl: number = $state(0);
|
||||
// console.log(`ae_events_pres_mgmt event [event_id] +page.svelte data:`, data);
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { page } from '$app/state';
|
||||
import { browser } from '$app/environment';
|
||||
// import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { liveQuery } from "dexie";
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
import { idaa_loc, idaa_sess, idaa_slct, idaa_trig, idaa_prom } from '$lib/ae_idaa_stores';
|
||||
|
||||
import { add, liveQuery } from "dexie";
|
||||
import { db_events } from "$lib/ae_events/db_events";
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
@@ -34,8 +34,6 @@ import Comp__event_obj_id_edit from './ae_idaa_comp__event_obj_id_edit.svelte';
|
||||
import Comp__event_obj_id_view from './ae_idaa_comp__event_obj_id_view.svelte';
|
||||
|
||||
|
||||
let event_id_random_li: Array<string> = $state();
|
||||
|
||||
let event_id = page.url.searchParams.get('event_id') ?? null;
|
||||
if (!event_id) {
|
||||
$idaa_slct.event_id = null;
|
||||
@@ -45,6 +43,8 @@ if (!event_id) {
|
||||
$idaa_trig.event_id = event_id;
|
||||
}
|
||||
|
||||
let event_id_random_li: Array<string> = $state();
|
||||
|
||||
// Functions and Logic
|
||||
let lq_new__event_obj_li = $derived(liveQuery(async () => {
|
||||
let link_to_type: string = 'account';
|
||||
@@ -281,12 +281,12 @@ $effect(() => {
|
||||
|
||||
|
||||
$effect(() => {
|
||||
if ($idaa_trig.event_id) {
|
||||
// log_lvl = 1;
|
||||
if ($idaa_trig.event_id && $idaa_slct.event_id) {
|
||||
log_lvl = 1;
|
||||
$idaa_trig.event_id = false;
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`Triggered: $idaa_trig.event_id`);
|
||||
console.log(`Triggered: $idaa_slct.event_id = ${$idaa_slct.event_id}`);
|
||||
}
|
||||
|
||||
$idaa_prom.load__event_obj = events_func.load_ae_obj_id__event({
|
||||
@@ -331,9 +331,9 @@ $effect(() => {
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
|
||||
if (!$idaa_sess.recovery_meetings.show__modal_edit && !$idaa_sess.recovery_meetings.show__modal_view__event_id) {
|
||||
$idaa_slct.event_id = null;
|
||||
}
|
||||
// if (!$idaa_sess.recovery_meetings.show__modal_edit && !$idaa_sess.recovery_meetings.show__modal_view__event_id) {
|
||||
// $idaa_slct.event_id = null;
|
||||
// }
|
||||
|
||||
let message = {'event_id': $idaa_slct?.event_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
@@ -511,7 +511,7 @@ function add_activity_log(
|
||||
}
|
||||
);
|
||||
}}
|
||||
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
|
||||
class="novi_btn btn btn-sm btn-warning preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
|
||||
title={`View meeting: ${$lq__event_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-times m-1"></span> Cancel Edit
|
||||
@@ -544,7 +544,7 @@ function add_activity_log(
|
||||
}
|
||||
);
|
||||
}}
|
||||
class="novi_btn btn btn-sm preset-tonal-warning hover:preset-tonal-warning border border-warning-500"
|
||||
class="novi_btn btn btn-warning btn-sm preset-tonal-warning hover:preset-tonal-warning border border-warning-500"
|
||||
>
|
||||
<span class="fas fa-times mx-1"></span>
|
||||
Close
|
||||
@@ -588,14 +588,16 @@ function add_activity_log(
|
||||
}
|
||||
);
|
||||
}}
|
||||
class="novi_btn btn btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
|
||||
class="novi_btn btn btn-warning btn-sm preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 transition"
|
||||
title={`Edit meeting: ${$lq__event_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-edit m-1"></span> Edit
|
||||
</button>
|
||||
{/if}
|
||||
<span class="fas fa-calendar-day m-1"></span>
|
||||
{$lq__event_obj?.name ?? '-- not set --'}
|
||||
<span class="">
|
||||
<span class="fas fa-calendar-day m-1"></span>
|
||||
{$lq__event_obj?.name ?? '-- not set --'}
|
||||
</span>
|
||||
</h3>
|
||||
{#if $lq__event_obj?.status == 'unknown'}
|
||||
<span class="badge badge-warning preset-tonal-error" title="This meeting has not been confirmed by IDAA Central Office. Please reach out to the chair for current meeting list info. Meeting attendees can reach out to info@idaa.org if they know this is information is accurate and this meeting is still taking place.">
|
||||
@@ -609,12 +611,17 @@ function add_activity_log(
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-secondary absolute top-2 right-2"
|
||||
class="novi_btn btn btn-sm btn-secondary absolute top-2 right-2"
|
||||
onclick={() => {
|
||||
$idaa_sess.recovery_meetings.show__modal_view = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_view__event_id = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_edit = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_edit__event_id = false;
|
||||
|
||||
$idaa_slct.event_id = null;
|
||||
$idaa_slct.event_obj = null;
|
||||
let message = {'event_id': $idaa_slct.event_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-times"></span>
|
||||
@@ -635,6 +642,11 @@ function add_activity_log(
|
||||
$idaa_sess.recovery_meetings.show__modal_view__event_id = false;
|
||||
$idaa_sess.recovery_meetings.show__modal_edit = false;
|
||||
$idaa_sess.recovery_meetings.show__inline_edit__event_obj = false;
|
||||
|
||||
$idaa_slct.event_id = null;
|
||||
$idaa_slct.event_obj = null;
|
||||
let message = {'event_id': $idaa_slct.event_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
}}
|
||||
>
|
||||
<span class="fas fa-times"></span>
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
<script lang="ts">
|
||||
import type { PageData } from './$types';
|
||||
|
||||
let { data }: { data: PageData } = $props();
|
||||
|
||||
let log_lvl: number = 0;
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import { Modal } from 'flowbite-svelte';
|
||||
import { liveQuery } from "dexie";
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
|
||||
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 { db_events } from "$lib/ae_events/db_events";
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
// import Event_obj_id_edit from '.././ae_idaa_comp__event_obj_id_edit.svelte';
|
||||
import Event_obj_id_view from '.././ae_idaa_comp__event_obj_id_view.svelte';
|
||||
|
||||
// *** Quickly pull out data from parent(s)
|
||||
let ae_acct = data[$slct.account_id];
|
||||
if (log_lvl) {
|
||||
console.log(`ae_acct = `, ae_acct);
|
||||
}
|
||||
|
||||
$idaa_slct.event_id = ae_acct.slct.event_id;
|
||||
// $idaa_slct.event_obj = ae_acct.slct.event_obj;
|
||||
|
||||
|
||||
let lq__event_obj = $derived(liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`lq__event_obj: event_id = ${$idaa_slct?.event_id}`);
|
||||
}
|
||||
let results = await db_events.event
|
||||
.get($idaa_slct?.event_id ?? ''); // null or undefined does not reset things like '' does
|
||||
|
||||
return results;
|
||||
}));
|
||||
|
||||
if (browser) {
|
||||
console.log('Browser environment detected.');
|
||||
|
||||
let message = {'event_id': $idaa_slct?.event_id ?? null};
|
||||
window.parent.postMessage(message, "*");
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
IDAA Recovery Meetings:
|
||||
{$lq__event_obj?.name ? ae_util.shorten_string({ string: $lq__event_obj?.name, max_length: 20, begin_length: 10, end_length: 4 }) : ''}
|
||||
- Novi - {$ae_loc?.title}
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
<a href="/idaa/recovery_meetings" class="novi_btn btn btn-secondary btn-sm
|
||||
preset-tonal-tertiary border border-tertiary-500
|
||||
hover:preset-filled-tertiary-500
|
||||
transition
|
||||
">
|
||||
<!-- <span class="fas fa-arrow-left m-1"></span> Back to Meetings -->
|
||||
<span class="fas fa-times m-1"></span> View Other Meetings
|
||||
</a>
|
||||
|
||||
|
||||
<Event_obj_id_view
|
||||
lq__event_obj={lq__event_obj}
|
||||
/>
|
||||
41
src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts
Normal file
41
src/routes/idaa/(idaa)/recovery_meetings/[event_id]/+page.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
console.log(`ae_p_idaa_events [event_id] +page.ts start`);
|
||||
|
||||
import { browser } from '$app/environment';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export const load = (async ({ params, parent }) => { // route
|
||||
let log_lvl: number = 0;
|
||||
|
||||
let data = await parent();
|
||||
data.log_lvl = log_lvl;
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
|
||||
let event_id = params.event_id;
|
||||
|
||||
ae_acct.slct.event_id = event_id;
|
||||
|
||||
if (browser) {
|
||||
if (log_lvl) {
|
||||
console.log(`ae_idaa_events events [event_id] +page.ts: event_id = `, event_id);
|
||||
}
|
||||
// Load event event object
|
||||
let load_event_obj = await events_func.load_ae_obj_id__event({
|
||||
api_cfg: ae_acct.api,
|
||||
event_id: event_id,
|
||||
log_lvl: log_lvl
|
||||
});
|
||||
if (log_lvl) {
|
||||
console.log(`load_event_obj = `, load_event_obj);
|
||||
}
|
||||
ae_acct.slct.event_obj = load_event_obj;
|
||||
}
|
||||
|
||||
data[account_id] = ae_acct;
|
||||
|
||||
return data;
|
||||
// return {};
|
||||
}) satisfies PageLoad;
|
||||
@@ -158,6 +158,15 @@ function add_activity_log(
|
||||
</header>
|
||||
|
||||
<div class="ae_options flex flex-row gap-2 items-center justify-center">
|
||||
<a
|
||||
href="/idaa/recovery_meetings/{idaa_event_obj?.event_id}"
|
||||
class="novi_btn btn btn-secondary btn-md preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500 transition"
|
||||
title={`Open to see details: ${idaa_event_obj?.name}`}
|
||||
>
|
||||
<span class="fas fa-envelope-open m-1"></span>
|
||||
<!-- <span class="fas fa-info-circle"></span> -->
|
||||
Info X
|
||||
</a>
|
||||
<button
|
||||
on:click={() => {
|
||||
$idaa_slct.event_id = idaa_event_obj?.event_id;
|
||||
|
||||
Reference in New Issue
Block a user