Lots of clean up. Going to go with backup plan for IDAA and dealing with the Novi iframes.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user