Continuing to make updates to the Data Stores to use v3.
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { api } from '$lib/api/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
import Element_manage_event_file_li from '$lib/elements/element_manage_event_file_li.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
import Element_manage_event_file_li from '$lib/elements/element_manage_event_file_li.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v3.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
import { ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v3.svelte';
|
||||
import Element_manage_hosted_file_li from '$lib/elements/element_manage_hosted_file_li.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||
|
||||
import { liveQuery } from 'dexie';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
@@ -68,7 +68,7 @@
|
||||
async function load_activity() {
|
||||
if (!$slct.person_id) return;
|
||||
loading_activity = true;
|
||||
|
||||
|
||||
// Load related data using search queries
|
||||
const [events, posts, logs] = await Promise.all([
|
||||
qry_ae_obj_li__event({
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
async function handle_link_user(user_id_random: string) {
|
||||
if (!confirm('Link this person to this user account?')) return;
|
||||
|
||||
|
||||
const result = await update_ae_obj__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $slct.person_id,
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
async function handle_unlink_user() {
|
||||
if (!confirm('Unlink this person from their user account?')) return;
|
||||
|
||||
|
||||
const result = await update_ae_obj__person({
|
||||
api_cfg: $ae_api,
|
||||
person_id: $slct.person_id,
|
||||
@@ -257,8 +257,8 @@
|
||||
<Unlink size={14} class="mr-2" /> Unlink User
|
||||
</button>
|
||||
{:else}
|
||||
<button
|
||||
class="btn btn-sm variant-soft-primary"
|
||||
<button
|
||||
class="btn btn-sm variant-soft-primary"
|
||||
onclick={() => { show_link_ui = !show_link_ui; if(show_link_ui) load_unlinked_users(); }}
|
||||
>
|
||||
<Link size={14} class="mr-2" /> {show_link_ui ? 'Cancel Linking' : 'Link to User'}
|
||||
@@ -287,7 +287,7 @@
|
||||
{:else}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2">
|
||||
{#each available_users as user}
|
||||
<button
|
||||
<button
|
||||
class="card p-3 variant-soft-primary hover:variant-filled-primary text-left transition-all flex flex-col gap-1"
|
||||
onclick={() => handle_link_user(user.user_id_random)}
|
||||
>
|
||||
@@ -405,8 +405,8 @@
|
||||
</div>
|
||||
{:else if is_editing}
|
||||
<div class="px-4">
|
||||
<Person_form
|
||||
person={$lq__person_obj}
|
||||
<Person_form
|
||||
person={$lq__person_obj}
|
||||
onSave={(updated) => {
|
||||
is_editing = false;
|
||||
// The liveQuery should pick up the changes after they are saved to IndexedDB
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { api } from '$lib/api';
|
||||
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
|
||||
import { core_func } from '$lib/ae_core/ae_core_functions';
|
||||
import {
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
let { data }: Props = $props();
|
||||
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
|
||||
let lq__event_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
const account_id = $page.data.account_id;
|
||||
@@ -62,9 +60,6 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- <section
|
||||
class="ae_events_pres_mgmt md:container h-full mx-auto"
|
||||
> -->
|
||||
|
||||
<h2 class="h3">Presentation Management for {$ae_loc.account_name ?? 'Æ loading...'}</h2>
|
||||
|
||||
@@ -104,10 +99,6 @@
|
||||
/> -->
|
||||
|
||||
{#if $lq__event_obj_li}
|
||||
<!-- <div class="flex flex-row items-center justify-center">
|
||||
<span class="fas fa-check text-green-500 mx-1"></span>
|
||||
<span>Loaded</span>
|
||||
</div> -->
|
||||
|
||||
{#if $lq__event_obj_li.length}
|
||||
<ul class="space-y-2">
|
||||
@@ -126,14 +117,6 @@
|
||||
<strong>
|
||||
{event_obj.name}
|
||||
</strong>
|
||||
<!-- <a
|
||||
href="/events/{event_obj.event_id}"
|
||||
class="btn btn-md preset-tonal-primary border border-primary-500 hover:preset-filled-primary-500"
|
||||
>
|
||||
{ae_util.iso_datetime_formatter(event_obj.start_datetime, 'date_long')}
|
||||
-
|
||||
{event_obj.name}
|
||||
</a> -->
|
||||
{:else}
|
||||
<span>
|
||||
<span class="fas fa-calendar-alt mx-1"></span>
|
||||
@@ -145,11 +128,6 @@
|
||||
<strong>
|
||||
{event_obj.name}
|
||||
</strong>
|
||||
<!-- <button disabled class="btn btn-md preset-tonal-surface border border-surface-500">
|
||||
{ae_util.iso_datetime_formatter(event_obj.start_datetime, 'date_long')}
|
||||
-
|
||||
{event_obj.name}
|
||||
</button> -->
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
@@ -220,17 +198,4 @@
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
<span>Loading...</span>
|
||||
</div>
|
||||
<!-- {/if} -->
|
||||
{/if}
|
||||
|
||||
<!-- {:catch error}
|
||||
<div class="text-red-800">
|
||||
<span class="fas fa-exclamation-triangle text-xl"></span>
|
||||
<span>Error: {error.message}</span>
|
||||
</div>
|
||||
{/await} -->
|
||||
|
||||
<!-- </section> -->
|
||||
|
||||
<style lang="postcss">
|
||||
</style>
|
||||
|
||||
@@ -16,14 +16,10 @@
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
// import type { key_val } from '$lib/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
|
||||
// import Element_ae_crud from '$lib/element_ae_crud
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import MyClipboard from '$lib/e_app_clipboard.svelte';
|
||||
|
||||
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 {
|
||||
|
||||
@@ -66,10 +66,8 @@
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { api } from '$lib/api/api';
|
||||
// import Element_ae_crud from '$lib/element_ae_crud.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v2.svelte';
|
||||
// import Element_data_store from '$lib/element_data_store_v3.svelte';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
// import { db_core } from "$lib/db_core";
|
||||
import {
|
||||
ae_snip,
|
||||
ae_loc,
|
||||
@@ -92,8 +90,6 @@
|
||||
import Menu_location_list_menu from './menu_location_list.svelte';
|
||||
import Menu_session_list_menu from './menu_session_list.svelte';
|
||||
|
||||
// let slct_event_location_id: string = $state($events_slct.event_location_id);
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
$events_trigger = null;
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
// const dispatch = createEventDispatcher();
|
||||
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||
|
||||
let ae_promises: key_val = $state({});
|
||||
// let ae_tmp: key_val = {};
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
import Element_ae_crud from '$lib/elements/element_ae_crud.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v2.svelte';
|
||||
import Element_data_store from '$lib/elements/element_data_store_v3.svelte';
|
||||
import Comp__events_menu_nav from '../ae_comp__events_menu_nav.svelte';
|
||||
import Comp__pres_mgmt_menu_opts from '../ae_comp__events_menu_opts.svelte';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user