refactor(events, idaa): standardize on String-only IDs and remove '_random' suffix
Aligned the Events Badges, Templates, and IDAA Bulletin Board modules with Aether UI/UX v3 standards by prioritizing semantic String IDs (e.g., event_id, badge_id) over legacy '_random' variants in API helpers, Dexie processors, and UI components. - Refactored badge and template loaders to use clean ID field names. - Updated search and LiveQuery logic in badge management views. - Cleaned up unused imports and legacy code in +layout and +page components. - Standardized ID mapping in generic object processors. - Improved IDAA post creation UX with autofocus and empty title defaults.
This commit is contained in:
@@ -4,16 +4,15 @@
|
|||||||
|
|
||||||
## 📋 Active Task: Badge Rendering Fix
|
## 📋 Active Task: Badge Rendering Fix
|
||||||
- [x] **Step 1:** Investigate `event_badge_template` table for corrupted numeric IDs. (Confirmed Fine / Database Integrity OK)
|
- [x] **Step 1:** Investigate `event_badge_template` table for corrupted numeric IDs. (Confirmed Fine / Database Integrity OK)
|
||||||
- [ ] **Step 2:** Verify Pydantic model alignment in backend for Badge types.
|
- [ ] **Step 2:** Refactor `badge_template` lookup in `+page.svelte` to use V3 Triple ID pattern (`id_random` or `event_badge_template_id_random`).
|
||||||
- [ ] **Step 3:** Implement field editing for "Full Name", "Title", "Affiliations" using `Element_ae_crud_v2`.
|
- [ ] **Step 3:** Implement inline field editing using `Element_ae_crud_v2.svelte` for badge fields (Admin tool pattern).
|
||||||
- [ ] **Step 4:** Coordination (Handshake with Backend regarding MariaDB schema integrity).
|
- [ ] **Step 4:** Finalize & Commit.
|
||||||
- [ ] **Step 5:** Finalize & Commit.
|
|
||||||
|
|
||||||
## 🚧 Upcoming High Priority
|
## 🚧 Upcoming High Priority
|
||||||
- **CRUD v2 Refactor:** Implement V3 API alignment for `Element_ae_crud_v2.svelte`.
|
- **CRUD v2 Refactor:** Implement V3 API alignment for `Element_ae_crud_v2.svelte`.
|
||||||
- **Temp Cleanup:** Auto-removal of native `.tmp` files older than 24h.
|
- **Temp Cleanup:** Auto-removal of native `.tmp` files older than 24h.
|
||||||
|
|
||||||
## 📝 Session Notes (Feb 11, 2026)
|
## ✅ Completed Recently
|
||||||
- **Resolved:** Launcher Session Selection Hang.
|
- [x] **[IDAA]** Verify Bulletin Board functionality.
|
||||||
- **Pattern:** Implemented "Navigation Shield" and "Side-Effect Purge" to stop reactivity loops.
|
- [x] **[IDAA]** Verify Recovery Meetings functionality.
|
||||||
- **Linter:** Fixed missing Lucide icon imports.
|
- [x] **[Journals]** Fix buttons missing `type="button"`.
|
||||||
|
|||||||
@@ -51,11 +51,11 @@ export async function load_ae_obj_id__event_badge({
|
|||||||
if (ae_promises.load__event_badge_obj) {
|
if (ae_promises.load__event_badge_obj) {
|
||||||
if (try_cache) {
|
if (try_cache) {
|
||||||
// In theory we should be able to use the event_id found in the Badge load object. 2026-02-04
|
// In theory we should be able to use the event_id found in the Badge load object. 2026-02-04
|
||||||
// This keeps coming up as undefined: ae_promises.load__event_badge_obj.event_id_random
|
// This keeps coming up as undefined: ae_promises.load__event_badge_obj.event_id
|
||||||
if (log_lvl) console.log(`Saving to local cache... Event ID: ${event_id} or ${ae_promises.load__event_badge_obj.event_id_random}`);
|
if (log_lvl) console.log(`Saving to local cache... Event ID: ${event_id} or ${ae_promises.load__event_badge_obj.event_id}`);
|
||||||
const processed_obj_li = await process_ae_obj__event_badge_props({
|
const processed_obj_li = await process_ae_obj__event_badge_props({
|
||||||
obj_li: [ae_promises.load__event_badge_obj],
|
obj_li: [ae_promises.load__event_badge_obj],
|
||||||
event_id: event_id || ae_promises.load__event_badge_obj.event_id_random,
|
event_id: event_id || ae_promises.load__event_badge_obj.event_id,
|
||||||
log_lvl
|
log_lvl
|
||||||
});
|
});
|
||||||
await db_save_ae_obj_li__ae_obj({
|
await db_save_ae_obj_li__ae_obj({
|
||||||
@@ -85,7 +85,7 @@ export async function load_ae_obj_id__event_badge({
|
|||||||
|
|
||||||
if (inc_template && ae_promises.load__event_badge_obj) {
|
if (inc_template && ae_promises.load__event_badge_obj) {
|
||||||
// Load the templates for the event badge
|
// Load the templates for the event badge
|
||||||
const current_template_id = ae_promises.load__event_badge_obj.event_badge_template_id || ae_promises.load__event_badge_obj.event_badge_template_id_random;
|
const current_template_id = ae_promises.load__event_badge_obj.event_badge_template_id;
|
||||||
if (current_template_id) {
|
if (current_template_id) {
|
||||||
ae_promises.load__event_badge_obj.event_badge_template = await load_ae_obj_id__event_badge_template({
|
ae_promises.load__event_badge_obj.event_badge_template = await load_ae_obj_id__event_badge_template({
|
||||||
api_cfg: api_cfg,
|
api_cfg: api_cfg,
|
||||||
@@ -187,7 +187,7 @@ export async function load_ae_obj_li__event_badge({
|
|||||||
|
|
||||||
if (inc_template && ae_promises.load__event_badge_obj_li) {
|
if (inc_template && ae_promises.load__event_badge_obj_li) {
|
||||||
for (const badge_obj of ae_promises.load__event_badge_obj_li) {
|
for (const badge_obj of ae_promises.load__event_badge_obj_li) {
|
||||||
const current_template_id = badge_obj.event_badge_template_id || badge_obj.event_badge_template_id_random;
|
const current_template_id = badge_obj.event_badge_template_id;
|
||||||
if (current_template_id) {
|
if (current_template_id) {
|
||||||
badge_obj.event_badge_template = await load_ae_obj_id__event_badge_template({
|
badge_obj.event_badge_template = await load_ae_obj_id__event_badge_template({
|
||||||
api_cfg: api_cfg,
|
api_cfg: api_cfg,
|
||||||
@@ -388,7 +388,7 @@ export async function search__event_badge({
|
|||||||
|
|
||||||
const search_query: any = {
|
const search_query: any = {
|
||||||
q: '',
|
q: '',
|
||||||
and: [{ field: 'event_id_random', op: 'eq', value: event_id }]
|
and: [{ field: 'event_id', op: 'eq', value: event_id }]
|
||||||
};
|
};
|
||||||
|
|
||||||
const params: key_val = {};
|
const params: key_val = {};
|
||||||
@@ -577,7 +577,7 @@ async function _process_generic_props<T extends Record<string, any>>({
|
|||||||
(processed_obj as any)[newKey] = processed_obj[key];
|
(processed_obj as any)[newKey] = processed_obj[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const randomIdKey = `${obj_type}_id_random`;
|
const randomIdKey = `${obj_type}_id`;
|
||||||
if (processed_obj[randomIdKey]) {
|
if (processed_obj[randomIdKey]) {
|
||||||
(processed_obj as any).id = processed_obj[randomIdKey];
|
(processed_obj as any).id = processed_obj[randomIdKey];
|
||||||
}
|
}
|
||||||
@@ -621,7 +621,7 @@ export async function process_ae_obj__event_badge_props({
|
|||||||
}
|
}
|
||||||
if (event_id) {
|
if (event_id) {
|
||||||
if (!obj.event_id) obj.event_id = event_id;
|
if (!obj.event_id) obj.event_id = event_id;
|
||||||
if (!obj.event_id_random) obj.event_id_random = event_id;
|
// if (!obj.event_id_random) obj.event_id_random = event_id;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ async function _process_generic_props<T extends Record<string, any>>({
|
|||||||
(processed_obj as any)[newKey] = processed_obj[key];
|
(processed_obj as any)[newKey] = processed_obj[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const randomIdKey = `${obj_type}_id_random`;
|
const randomIdKey = `${obj_type}_id`;
|
||||||
if (processed_obj[randomIdKey]) {
|
if (processed_obj[randomIdKey]) {
|
||||||
(processed_obj as any).id = processed_obj[randomIdKey];
|
(processed_obj as any).id = processed_obj[randomIdKey];
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ export async function create_ae_obj__event_badge_template({
|
|||||||
api_cfg,
|
api_cfg,
|
||||||
obj_type: 'event_badge_template',
|
obj_type: 'event_badge_template',
|
||||||
fields: {
|
fields: {
|
||||||
event_id_random: event_id,
|
event_id: event_id,
|
||||||
...data_kv
|
...data_kv
|
||||||
},
|
},
|
||||||
log_lvl
|
log_lvl
|
||||||
@@ -376,7 +376,7 @@ export async function search__event_badge_template({
|
|||||||
}) {
|
}) {
|
||||||
const search_query: any = {
|
const search_query: any = {
|
||||||
q: qry_str,
|
q: qry_str,
|
||||||
and: [{ field: 'event_id_random', op: 'eq', value: event_id }]
|
and: [{ field: 'event_id', op: 'eq', value: event_id }]
|
||||||
};
|
};
|
||||||
|
|
||||||
if (enabled === 'enabled') search_query.and.push({ field: 'enable', op: 'eq', value: true });
|
if (enabled === 'enabled') search_query.and.push({ field: 'enable', op: 'eq', value: true });
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ const ae_promises: key_val = {};
|
|||||||
export const properties_to_save_exhibit = [
|
export const properties_to_save_exhibit = [
|
||||||
'id',
|
'id',
|
||||||
'event_exhibit_id',
|
'event_exhibit_id',
|
||||||
// 'event_exhibit_id_random',
|
|
||||||
'event_id',
|
'event_id',
|
||||||
// 'event_id_random',
|
|
||||||
'code',
|
'code',
|
||||||
'name',
|
'name',
|
||||||
'description',
|
'description',
|
||||||
|
|||||||
@@ -9,46 +9,46 @@
|
|||||||
let { data, children, log_lvl = 0 }: Props = $props();
|
let { data, children, log_lvl = 0 }: Props = $props();
|
||||||
|
|
||||||
// *** Import Svelte specific
|
// *** Import Svelte specific
|
||||||
import { liveQuery } from 'dexie';
|
// import { liveQuery } from 'dexie';
|
||||||
|
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
// 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 { core_func } from '$lib/ae_core_functions';
|
// import { core_func } from '$lib/ae_core_functions';
|
||||||
import { db_events } from '$lib/ae_events/db_events';
|
// import { db_events } from '$lib/ae_events/db_events';
|
||||||
import {
|
// import {
|
||||||
ae_snip,
|
// ae_snip,
|
||||||
ae_loc,
|
// ae_loc,
|
||||||
ae_sess,
|
// ae_sess,
|
||||||
ae_api,
|
// ae_api,
|
||||||
ae_trig,
|
// ae_trig,
|
||||||
slct,
|
// slct,
|
||||||
slct_trigger
|
// slct_trigger
|
||||||
} from '$lib/stores/ae_stores';
|
// } from '$lib/stores/ae_stores';
|
||||||
import {
|
// import {
|
||||||
events_loc,
|
// events_loc,
|
||||||
events_sess,
|
// events_sess,
|
||||||
events_slct,
|
// events_slct,
|
||||||
events_trigger
|
// events_trigger
|
||||||
} from '$lib/stores/ae_events_stores';
|
// } from '$lib/stores/ae_events_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
// import { events_func } from '$lib/ae_events_functions';
|
||||||
|
|
||||||
let lq__event_obj = $derived(
|
// let lq__event_obj = $derived(
|
||||||
liveQuery(async () => {
|
// liveQuery(async () => {
|
||||||
if (log_lvl) {
|
// if (log_lvl) {
|
||||||
console.log(
|
// console.log(
|
||||||
`*** LiveQuery: lq__event_obj *** event_id=${$events_slct.event_id}`
|
// `*** LiveQuery: lq__event_obj *** event_id=${$events_slct.event_id}`
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
let results = await db_events.event.get(
|
// let results = await db_events.event.get(
|
||||||
$events_slct?.event_id ?? ''
|
// $events_slct?.event_id ?? ''
|
||||||
);
|
// );
|
||||||
|
|
||||||
return results;
|
// return results;
|
||||||
})
|
// })
|
||||||
);
|
// );
|
||||||
|
|
||||||
let nav_y_height = $state(0);
|
// let nav_y_height = $state(0);
|
||||||
|
|
||||||
let box: any;
|
let box: any;
|
||||||
let xLeft = $state(0);
|
let xLeft = $state(0);
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
let yScroll = $state(0);
|
let yScroll = $state(0);
|
||||||
let yHeight = $state(0);
|
let yHeight = $state(0);
|
||||||
|
|
||||||
let scroll_x = $state(0);
|
// let scroll_x = $state(0);
|
||||||
let scroll_y = $state(0);
|
// let scroll_y = $state(0);
|
||||||
|
|
||||||
function parse_scroll() {
|
function parse_scroll() {
|
||||||
// console.log(`parse_scroll() called`);
|
// console.log(`parse_scroll() called`);
|
||||||
@@ -73,13 +73,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// *** Functions and Logic
|
// *** Functions and Logic
|
||||||
$effect(() => {
|
// $effect(() => {
|
||||||
// if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
// // if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
||||||
// }
|
// // }
|
||||||
});
|
// });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<!-- <svelte:head>
|
||||||
<title>
|
<title>
|
||||||
Æ: Badges for
|
Æ: Badges for
|
||||||
{ae_util.shorten_string({
|
{ae_util.shorten_string({
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
- Badges v3 -
|
- Badges v3 -
|
||||||
{$events_loc?.title}
|
{$events_loc?.title}
|
||||||
</title>
|
</title>
|
||||||
</svelte:head>
|
</svelte:head> -->
|
||||||
<!-- - Badges - {$events_loc?.title} -->
|
<!-- - Badges - {$events_loc?.title} -->
|
||||||
|
|
||||||
<!-- +layout: Where is here??? -->
|
<!-- +layout: Where is here??? -->
|
||||||
|
|||||||
@@ -61,6 +61,22 @@
|
|||||||
let last_search_id = 0;
|
let last_search_id = 0;
|
||||||
let last_executed_key = ''; // Search Guard Key
|
let last_executed_key = ''; // Search Guard Key
|
||||||
|
|
||||||
|
|
||||||
|
let lq__event_obj = $derived(
|
||||||
|
liveQuery(async () => {
|
||||||
|
if (log_lvl) {
|
||||||
|
console.log(
|
||||||
|
`*** LiveQuery: lq__event_obj *** event_id=${$events_slct.event_id}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
let results = await db_events.event.get(
|
||||||
|
$events_slct?.event_id ?? ''
|
||||||
|
);
|
||||||
|
|
||||||
|
return results;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
// Stable LiveQuery Pattern (Aether UI V3)
|
// Stable LiveQuery Pattern (Aether UI V3)
|
||||||
let lq__event_badge_obj_li = $derived.by(() => {
|
let lq__event_badge_obj_li = $derived.by(() => {
|
||||||
const ids = event_badge_id_li;
|
const ids = event_badge_id_li;
|
||||||
@@ -88,7 +104,7 @@
|
|||||||
`Badge Page LQ: Fallback search for event: ${event_id}`
|
`Badge Page LQ: Fallback search for event: ${event_id}`
|
||||||
);
|
);
|
||||||
return await db_events.badge
|
return await db_events.badge
|
||||||
.where('event_id_random')
|
.where('event_id')
|
||||||
.equals(event_id)
|
.equals(event_id)
|
||||||
.limit(50)
|
.limit(50)
|
||||||
.sortBy('given_name');
|
.sortBy('given_name');
|
||||||
@@ -159,7 +175,7 @@
|
|||||||
try {
|
try {
|
||||||
if (event_id) {
|
if (event_id) {
|
||||||
let local_results = await db_events.badge
|
let local_results = await db_events.badge
|
||||||
.where('event_id_random')
|
.where('event_id')
|
||||||
.equals(event_id)
|
.equals(event_id)
|
||||||
.filter((badge) => {
|
.filter((badge) => {
|
||||||
if (
|
if (
|
||||||
@@ -258,7 +274,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const local_ids = local_results
|
const local_ids = local_results
|
||||||
.map((b) => b.id || b.event_badge_id_random)
|
.map((b) => b.event_badge_id)
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
if (current_search_id === last_search_id) {
|
if (current_search_id === last_search_id) {
|
||||||
@@ -321,7 +337,7 @@
|
|||||||
if (current_search_id === last_search_id) {
|
if (current_search_id === last_search_id) {
|
||||||
const api_results = results || [];
|
const api_results = results || [];
|
||||||
const api_ids = api_results
|
const api_ids = api_results
|
||||||
.map((b: any) => b.id || b.event_badge_id_random)
|
.map((b: any) => b.event_badge_id)
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
|
|
||||||
untrack(() => {
|
untrack(() => {
|
||||||
@@ -349,9 +365,9 @@
|
|||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>
|
<title>
|
||||||
Badges -
|
Æ: Badges -
|
||||||
{ae_util.shorten_string({
|
{ae_util.shorten_string({
|
||||||
string: $events_slct?.event_obj?.name ?? '-- not set --',
|
string: $lq__event_obj?.name ?? '-- not set --',
|
||||||
max_length: 12
|
max_length: 12
|
||||||
})}
|
})}
|
||||||
- OSIT's Æ Events
|
- OSIT's Æ Events
|
||||||
|
|||||||
@@ -36,18 +36,16 @@
|
|||||||
import { LoaderCircle } from 'lucide-svelte';
|
import { LoaderCircle } from 'lucide-svelte';
|
||||||
|
|
||||||
// *** Variables
|
// *** Variables
|
||||||
// let test_event_id = data.params.event_id;
|
|
||||||
// Use page.params for robust reactivity in Svelte 5
|
// Use page.params for robust reactivity in Svelte 5
|
||||||
let event_badge_id = $derived(page.params.badge_id);
|
let event_badge_id = $derived(page.params.badge_id);
|
||||||
|
|
||||||
// Track if we are waiting for initial IDB result
|
// Track if we are waiting for initial IDB result
|
||||||
let is_loading_idb = $state(true);
|
let is_loading_idb = $state(true);
|
||||||
|
|
||||||
// console.log(`Data Params: event_id=${test_event_id}; badge_id=${test_event_badge_id}`);
|
// let url_test_val = $derived(data.url.searchParams.get('test_val'));
|
||||||
let url_test_val = $derived(data.url.searchParams.get('test_val'));
|
// $effect(() => {
|
||||||
$effect(() => {
|
// console.log(`URL test_val = ${url_test_val}`);
|
||||||
console.log(`URL test_val = ${url_test_val}`);
|
// });
|
||||||
});
|
|
||||||
|
|
||||||
let lq__event_badge_obj = $derived(
|
let lq__event_badge_obj = $derived(
|
||||||
liveQuery(async () => {
|
liveQuery(async () => {
|
||||||
@@ -57,15 +55,8 @@
|
|||||||
`*** LiveQuery: lq__event_badge_obj *** event_badge_id=${event_badge_id}`
|
`*** LiveQuery: lq__event_badge_obj *** event_badge_id=${event_badge_id}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Attempt lookup by the ID provided in the URL
|
|
||||||
let results = await db_events.badge.get(event_badge_id);
|
let results = await db_events.badge.get(event_badge_id);
|
||||||
|
|
||||||
// Fallback: If not found by PK, try searching the event_badge_id index
|
|
||||||
// (Standardizing on semantic IDs)
|
|
||||||
if (!results) {
|
|
||||||
results = await db_events.badge.where('event_badge_id').equals(event_badge_id).first();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (log_lvl) {
|
if (log_lvl) {
|
||||||
console.log(
|
console.log(
|
||||||
`*** LiveQuery: lq__event_badge_obj *** results=`,
|
`*** LiveQuery: lq__event_badge_obj *** results=`,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createEventDispatcher } from 'svelte';
|
// import { createEventDispatcher } from 'svelte';
|
||||||
import type { key_val } from '$lib/stores/ae_stores';
|
import type { key_val } from '$lib/stores/ae_stores';
|
||||||
import { events_func } from '$lib/ae_events_functions';
|
import { events_func } from '$lib/ae_events_functions';
|
||||||
import { ae_api } from '$lib/stores/ae_stores';
|
import { ae_api } from '$lib/stores/ae_stores';
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
let { event_id }: Props = $props();
|
let { event_id }: Props = $props();
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
// const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
let full_name_override: string = $state('');
|
let full_name_override: string = $state('');
|
||||||
let professional_title_override: string = $state('');
|
let professional_title_override: string = $state('');
|
||||||
@@ -60,20 +60,20 @@
|
|||||||
});
|
});
|
||||||
if (new_badge) {
|
if (new_badge) {
|
||||||
submit_status = 'success';
|
submit_status = 'success';
|
||||||
dispatch('success', new_badge);
|
// dispatch('success', new_badge);
|
||||||
} else {
|
} else {
|
||||||
submit_status = 'error';
|
submit_status = 'error';
|
||||||
dispatch('error', 'Failed to create badge');
|
// dispatch('error', 'Failed to create badge');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
submit_status = 'error';
|
submit_status = 'error';
|
||||||
console.error('Error creating badge:', error);
|
console.error('Error creating badge:', error);
|
||||||
dispatch('error', error);
|
// dispatch('error', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_cancel() {
|
function handle_cancel() {
|
||||||
dispatch('cancel');
|
// dispatch('cancel');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<ul class="w-full space-y-1">
|
<ul class="w-full space-y-1">
|
||||||
{#each visible_badge_obj_li as event_badge_obj (event_badge_obj.event_badge_id_random)}
|
{#each visible_badge_obj_li as event_badge_obj (event_badge_obj.event_badge_id)}
|
||||||
<li
|
<li
|
||||||
class="
|
class="
|
||||||
border border-surface-200 dark:border-surface-700 rounded-lg p-2
|
border border-surface-200 dark:border-surface-700 rounded-lg p-2
|
||||||
|
|||||||
@@ -89,11 +89,11 @@
|
|||||||
{#if $lq__filtered_badges}
|
{#if $lq__filtered_badges}
|
||||||
{#if $lq__filtered_badges.length > 0}
|
{#if $lq__filtered_badges.length > 0}
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||||
{#each $lq__filtered_badges as badge_obj (badge_obj.event_badge_id_random)}
|
{#each $lq__filtered_badges as badge_obj (badge_obj.event_badge_id)}
|
||||||
<div class="badge-print-container">
|
<div class="badge-print-container">
|
||||||
<Comp_badge_obj_view
|
<Comp_badge_obj_view
|
||||||
{event_id}
|
{event_id}
|
||||||
event_badge_id={badge_obj.event_badge_id_random}
|
event_badge_id={badge_obj.event_badge_id}
|
||||||
lq__event_badge_obj={badge_obj}
|
lq__event_badge_obj={badge_obj}
|
||||||
is_review_mode={false}
|
is_review_mode={false}
|
||||||
log_lvl={0}
|
log_lvl={0}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
{#if $lq__badge_templates.length > 0}
|
{#if $lq__badge_templates.length > 0}
|
||||||
<div class="card p-4">
|
<div class="card p-4">
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
{#each $lq__badge_templates as template (template.event_badge_template_id_random)}
|
{#each $lq__badge_templates as template (template.event_badge_template_id)}
|
||||||
<li
|
<li
|
||||||
class="list-group-item flex justify-between items-center"
|
class="list-group-item flex justify-between items-center"
|
||||||
>
|
>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
class="btn btn-sm variant-filled-primary"
|
class="btn btn-sm variant-filled-primary"
|
||||||
onclick={() =>
|
onclick={() =>
|
||||||
edit_template(
|
edit_template(
|
||||||
template.event_badge_template_id_random
|
template.event_badge_template_id
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span class="fas fa-edit"></span> Edit
|
<span class="fas fa-edit"></span> Edit
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
class="btn btn-sm variant-filled-error ml-2"
|
class="btn btn-sm variant-filled-error ml-2"
|
||||||
onclick={() =>
|
onclick={() =>
|
||||||
delete_template(
|
delete_template(
|
||||||
template.event_badge_template_id_random
|
template.event_badge_template_id
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span class="fas fa-trash"></span> Delete
|
<span class="fas fa-trash"></span> Delete
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let location_data = {
|
let location_data = {
|
||||||
event_id_random: $events_slct.event_id,
|
event_id: $events_slct.event_id,
|
||||||
name: 'TEMP Location Name',
|
name: 'TEMP Location Name',
|
||||||
enable: true
|
enable: true
|
||||||
};
|
};
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
<!-- <Element_ae_crud
|
<!-- <Element_ae_crud
|
||||||
api_cfg={$ae_api}
|
api_cfg={$ae_api}
|
||||||
object_type={'event_location'}
|
object_type={'event_location'}
|
||||||
object_id={event_location_obj?.event_location_id_random}
|
object_id={event_location_obj?.event_location_id}
|
||||||
field_name={'description'}
|
field_name={'description'}
|
||||||
field_type={'textarea'}
|
field_type={'textarea'}
|
||||||
field_value={event_location_obj?.description}
|
field_value={event_location_obj?.description}
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
on:ae_crud_updated={e => {
|
on:ae_crud_updated={e => {
|
||||||
console.log(`ae_crud_updated:`, e.detail);
|
console.log(`ae_crud_updated:`, e.detail);
|
||||||
|
|
||||||
events_func.load_ae_obj_id__event_location({api_cfg: $ae_api, event_location_id: event_location_obj.event_location_id_random, log_lvl: 1});
|
events_func.load_ae_obj_id__event_location({api_cfg: $ae_api, event_location_id: event_location_obj.event_location_id, log_lvl: 1});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<strong class="text-sm">
|
<strong class="text-sm">
|
||||||
@@ -287,21 +287,21 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
console.log('Show/Hide Description');
|
console.log('Show/Hide Description');
|
||||||
if ($events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id_random) {
|
if ($events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id) {
|
||||||
$events_sess.pres_mgmt.show_content__location_description = null;
|
$events_sess.pres_mgmt.show_content__location_description = null;
|
||||||
|
|
||||||
// Was testing with LiveQuery
|
// Was testing with LiveQuery
|
||||||
$events_slct.event_location_id = null;
|
$events_slct.event_location_id = null;
|
||||||
} else {
|
} else {
|
||||||
$events_sess.pres_mgmt.show_content__location_description = event_location_obj.event_location_id_random;
|
$events_sess.pres_mgmt.show_content__location_description = event_location_obj.event_location_id;
|
||||||
|
|
||||||
// Was testing with LiveQuery
|
// Was testing with LiveQuery
|
||||||
$events_slct.event_location_id = event_location_obj.event_location_id_random;
|
$events_slct.event_location_id = event_location_obj.event_location_id;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
|
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
|
||||||
>
|
>
|
||||||
{#if $events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id_random}
|
{#if $events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id}
|
||||||
<span class="fas fa-eye-slash mx-1"></span>
|
<span class="fas fa-eye-slash mx-1"></span>
|
||||||
<span>Hide Description</span>
|
<span>Hide Description</span>
|
||||||
{:else}
|
{:else}
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
|
|
||||||
<pre
|
<pre
|
||||||
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
||||||
class:hidden={$events_sess.pres_mgmt.show_content__location_description !== event_location_obj.event_location_id_random}
|
class:hidden={$events_sess.pres_mgmt.show_content__location_description !== event_location_obj.event_location_id}
|
||||||
>{event_location_obj.description}</pre>
|
>{event_location_obj.description}</pre>
|
||||||
|
|
||||||
{:else}
|
{:else}
|
||||||
@@ -323,7 +323,7 @@
|
|||||||
<Element_ae_crud_v2
|
<Element_ae_crud_v2
|
||||||
api_cfg={$ae_api}
|
api_cfg={$ae_api}
|
||||||
object_type={'event_location'}
|
object_type={'event_location'}
|
||||||
object_id={event_location_obj?.event_location_id_random}
|
object_id={event_location_obj?.event_location_id}
|
||||||
object_reload={true}
|
object_reload={true}
|
||||||
field_name={'description'}
|
field_name={'description'}
|
||||||
field_type={'textarea'}
|
field_type={'textarea'}
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
if (
|
if (
|
||||||
$events_sess.pres_mgmt
|
$events_sess.pres_mgmt
|
||||||
.show_content__location_description ==
|
.show_content__location_description ==
|
||||||
event_location_obj.event_location_id_random
|
event_location_obj.event_location_id
|
||||||
) {
|
) {
|
||||||
$events_sess.pres_mgmt.show_content__location_description =
|
$events_sess.pres_mgmt.show_content__location_description =
|
||||||
null;
|
null;
|
||||||
@@ -360,16 +360,16 @@
|
|||||||
null;
|
null;
|
||||||
} else {
|
} else {
|
||||||
$events_sess.pres_mgmt.show_content__location_description =
|
$events_sess.pres_mgmt.show_content__location_description =
|
||||||
event_location_obj.event_location_id_random;
|
event_location_obj.event_location_id;
|
||||||
|
|
||||||
// Was testing with LiveQuery
|
// Was testing with LiveQuery
|
||||||
$events_slct.event_location_id =
|
$events_slct.event_location_id =
|
||||||
event_location_obj.event_location_id_random;
|
event_location_obj.event_location_id;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
|
class="btn btn-sm preset-tonal-surface hover:preset-filled-surface-500 text-xs"
|
||||||
>
|
>
|
||||||
{#if $events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id_random}
|
{#if $events_sess.pres_mgmt.show_content__location_description == event_location_obj.event_location_id}
|
||||||
<span class="fas fa-eye-slash mx-1"
|
<span class="fas fa-eye-slash mx-1"
|
||||||
></span>
|
></span>
|
||||||
<span>Hide Description</span>
|
<span>Hide Description</span>
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
class="whitespace-pre-wrap p-2 bg-gray-100 rounded-md"
|
||||||
class:hidden={$events_sess.pres_mgmt
|
class:hidden={$events_sess.pres_mgmt
|
||||||
.show_content__location_description !==
|
.show_content__location_description !==
|
||||||
event_location_obj.event_location_id_random}>{event_location_obj.description}</pre>
|
event_location_obj.event_location_id}>{event_location_obj.description}</pre>
|
||||||
{:else}
|
{:else}
|
||||||
{@html ae_snip.html__not_set}
|
{@html ae_snip.html__not_set}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -393,20 +393,20 @@
|
|||||||
|
|
||||||
{#if !$events_loc.pres_mgmt.show_content__location_devices_sessions || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'default' || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'sessions'}
|
{#if !$events_loc.pres_mgmt.show_content__location_devices_sessions || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'default' || $events_loc.pres_mgmt.show_content__location_devices_sessions == 'sessions'}
|
||||||
<!-- Show sessions for this location -->
|
<!-- Show sessions for this location -->
|
||||||
{#if event_location_obj?.event_location_id_random}
|
{#if event_location_obj?.event_location_id}
|
||||||
<Comp_event_session_obj_li
|
<Comp_event_session_obj_li
|
||||||
link_to_type={'event_location'}
|
link_to_type={'event_location'}
|
||||||
link_to_id={event_location_obj?.event_location_id_random}
|
link_to_id={event_location_obj?.event_location_id}
|
||||||
event_session_id_random_li={[]}
|
event_session_id_random_li={[]}
|
||||||
{log_lvl}
|
{log_lvl}
|
||||||
></Comp_event_session_obj_li>
|
></Comp_event_session_obj_li>
|
||||||
{/if}
|
{/if}
|
||||||
{:else if $events_loc.pres_mgmt.show_content__location_devices_sessions == 'devices'}
|
{:else if $events_loc.pres_mgmt.show_content__location_devices_sessions == 'devices'}
|
||||||
<!-- Show devices for this location -->
|
<!-- Show devices for this location -->
|
||||||
{#if event_location_obj?.event_location_id_random}
|
{#if event_location_obj?.event_location_id}
|
||||||
<Comp_event_device_obj_li
|
<Comp_event_device_obj_li
|
||||||
link_to_type={'event_location'}
|
link_to_type={'event_location'}
|
||||||
link_to_id={event_location_obj?.event_location_id_random}
|
link_to_id={event_location_obj?.event_location_id}
|
||||||
event_device_id_random_li={[]}
|
event_device_id_random_li={[]}
|
||||||
auto_refresh={$events_loc.pres_mgmt
|
auto_refresh={$events_loc.pres_mgmt
|
||||||
.refresh_interval ?? 90000}
|
.refresh_interval ?? 90000}
|
||||||
@@ -416,20 +416,13 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- Show files for this location -->
|
<!-- Show files for this location -->
|
||||||
<!-- <Element_manage_event_file_li_wrap
|
|
||||||
link_to_type={'event_location'}
|
|
||||||
link_to_id={event_location_obj?.event_location_id_random}
|
|
||||||
allow_basic={$events_loc.trusted_access}
|
|
||||||
allow_moderator={$events_loc.trusted_access}
|
|
||||||
container_class_li={''}
|
|
||||||
/> -->
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{:else}
|
{:else}
|
||||||
<!-- <p class:hidden={display_mode != 'default'}>
|
<!-- <p>
|
||||||
No locations available to show at this time
|
No locations available to show at this time
|
||||||
</p> -->
|
</p> -->
|
||||||
{/if}
|
{/if}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
<ul class="space-y-1 px-4 m-2 bg-gray-100 rounded-md">
|
<ul class="space-y-1 px-4 m-2 bg-gray-100 rounded-md">
|
||||||
{#each $lq__event_presenter_obj_li as event_presenter_obj}
|
{#each $lq__event_presenter_obj_li as event_presenter_obj}
|
||||||
<!-- This is a hack. I can not get the LiveQuery to work with specific presentation IDs. It only works with the session ID. I need to figure out how to get the presenters for the specific presentation. -->
|
<!-- This is a hack. I can not get the LiveQuery to work with specific presentation IDs. It only works with the session ID. I need to figure out how to get the presenters for the specific presentation. -->
|
||||||
<!-- {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} -->
|
<!-- {#if event_presenter_obj.event_presentation_id == event_presentation_obj.event_presentation_id} -->
|
||||||
<li
|
<li
|
||||||
class:dim={event_presenter_obj?.hide}
|
class:dim={event_presenter_obj?.hide}
|
||||||
class:dim_warning={!event_presenter_obj?.enable}
|
class:dim_warning={!event_presenter_obj?.enable}
|
||||||
@@ -150,7 +150,7 @@
|
|||||||
font-bold min-w-64 max-w-96 my-0.5
|
font-bold min-w-64 max-w-96 my-0.5
|
||||||
overflow-hidden
|
overflow-hidden
|
||||||
"
|
"
|
||||||
title="Person ID: {event_presenter_obj.person_id_random}; Email: {event_presenter_obj.person_primary_email}"
|
title="Person ID: {event_presenter_obj.person_id}; Email: {event_presenter_obj.person_primary_email}"
|
||||||
>
|
>
|
||||||
{#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'}
|
{#if event_presenter_obj?.given_name && event_presenter_obj?.given_name != 'Group'}
|
||||||
<span
|
<span
|
||||||
@@ -228,18 +228,18 @@
|
|||||||
'-- not set --',
|
'-- not set --',
|
||||||
base_url: $ae_loc.url_origin,
|
base_url: $ae_loc.url_origin,
|
||||||
person_id:
|
person_id:
|
||||||
event_presenter_obj?.person_id_random,
|
event_presenter_obj?.person_id,
|
||||||
person_passcode:
|
person_passcode:
|
||||||
event_presenter_obj.person_passcode ??
|
event_presenter_obj.person_passcode ??
|
||||||
'-- not set --',
|
'-- not set --',
|
||||||
event_id:
|
event_id:
|
||||||
event_presenter_obj.event_id_random,
|
event_presenter_obj.event_id,
|
||||||
event_session_id:
|
event_session_id:
|
||||||
event_presenter_obj.event_session_id_random,
|
event_presenter_obj.event_session_id,
|
||||||
event_presentation_id:
|
event_presentation_id:
|
||||||
event_presenter_obj.event_presentation_id_random,
|
event_presenter_obj.event_presentation_id,
|
||||||
event_presenter_id:
|
event_presenter_id:
|
||||||
event_presenter_obj.event_presenter_id_random,
|
event_presenter_obj.event_presenter_id,
|
||||||
session_name:
|
session_name:
|
||||||
event_presenter_obj?.event_session_name ??
|
event_presenter_obj?.event_session_name ??
|
||||||
'-- not set --',
|
'-- not set --',
|
||||||
@@ -259,26 +259,26 @@
|
|||||||
|
|
||||||
{#if $events_loc.pres_mgmt?.require__presenter_agree}
|
{#if $events_loc.pres_mgmt?.require__presenter_agree}
|
||||||
{#if event_presenter_obj?.agree}
|
{#if event_presenter_obj?.agree}
|
||||||
<!-- {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[event_presenter_obj.event_presenter_id_random]} -->
|
<!-- {#if $ae_loc.trusted_access || $events_loc.auth__kv.presenter[event_presenter_obj.event_presenter_id]} -->
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access &&
|
||||||
!$events_loc.auth__kv.presenter[
|
!$events_loc.auth__kv.presenter[
|
||||||
event_presenter_obj
|
event_presenter_obj
|
||||||
.event_presenter_id_random
|
.event_presenter_id
|
||||||
]}
|
]}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
console.log('View terms and conditions');
|
console.log('View terms and conditions');
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id =
|
||||||
event_presenter_obj.event_presentation_id_random;
|
event_presenter_obj.event_presentation_id;
|
||||||
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
$events_slct.event_presenter_id =
|
||||||
event_presenter_obj.event_presenter_id_random;
|
event_presenter_obj.event_presenter_id;
|
||||||
// $events_slct.event_presenter_obj = event_presenter_obj;
|
// $events_slct.event_presenter_obj = event_presenter_obj;
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
||||||
event_presenter_obj.event_presenter_id_random;
|
event_presenter_obj.event_presenter_id;
|
||||||
}}
|
}}
|
||||||
class="btn preset-tonal-success hover:preset-filled-success-500 my-0.5"
|
class="btn preset-tonal-success hover:preset-filled-success-500 my-0.5"
|
||||||
class:btn-sm={display_mode != 'default'}
|
class:btn-sm={display_mode != 'default'}
|
||||||
@@ -296,21 +296,21 @@
|
|||||||
disabled={!$ae_loc.trusted_access &&
|
disabled={!$ae_loc.trusted_access &&
|
||||||
!$events_loc.auth__kv.presenter[
|
!$events_loc.auth__kv.presenter[
|
||||||
event_presenter_obj
|
event_presenter_obj
|
||||||
.event_presenter_id_random
|
.event_presenter_id
|
||||||
]}
|
]}
|
||||||
onclick={() => {
|
onclick={() => {
|
||||||
console.log('View terms and conditions');
|
console.log('View terms and conditions');
|
||||||
|
|
||||||
$events_slct.event_presentation_id =
|
$events_slct.event_presentation_id =
|
||||||
event_presenter_obj.event_presentation_id_random;
|
event_presenter_obj.event_presentation_id;
|
||||||
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
// $events_slct.event_presentation_obj = $lq__event_presentation_obj;
|
||||||
|
|
||||||
$events_slct.event_presenter_id =
|
$events_slct.event_presenter_id =
|
||||||
event_presenter_obj.event_presenter_id_random;
|
event_presenter_obj.event_presenter_id;
|
||||||
// $events_slct.event_presenter_obj = event_presenter_obj;
|
// $events_slct.event_presenter_obj = event_presenter_obj;
|
||||||
|
|
||||||
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
$events_sess.pres_mgmt.show_modal__presenter_agree =
|
||||||
event_presenter_obj.event_presenter_id_random;
|
event_presenter_obj.event_presenter_id;
|
||||||
}}
|
}}
|
||||||
class="btn preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 my-0.5"
|
class="btn preset-tonal-warning border border-warning-500 hover:preset-filled-warning-500 my-0.5"
|
||||||
class:btn-sm={display_mode != 'default'}
|
class:btn-sm={display_mode != 'default'}
|
||||||
@@ -326,7 +326,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="float-right space-2 flex flex-row items-center">
|
<div class="float-right space-2 flex flex-row items-center">
|
||||||
{#if $ae_loc.administrator_access && !event_presenter_obj.person_id_random}
|
{#if $ae_loc.administrator_access && !event_presenter_obj.person_id}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onclick={async () => {
|
onclick={async () => {
|
||||||
@@ -340,8 +340,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let person_data = {
|
let person_data = {
|
||||||
account_id_random: $slct.account_id,
|
account_id: $slct.account_id,
|
||||||
// user_id_random: user_obj.user_id_random,
|
// user_id: user_obj.user_id,
|
||||||
given_name: 'New',
|
given_name: 'New',
|
||||||
family_name: 'Presenter',
|
family_name: 'Presenter',
|
||||||
primary_email:
|
primary_email:
|
||||||
@@ -373,10 +373,10 @@
|
|||||||
{
|
{
|
||||||
api_cfg: $ae_api,
|
api_cfg: $ae_api,
|
||||||
event_presenter_id:
|
event_presenter_id:
|
||||||
event_presenter_obj.event_presenter_id_random,
|
event_presenter_obj.event_presenter_id,
|
||||||
data_kv: {
|
data_kv: {
|
||||||
person_id_random:
|
person_id:
|
||||||
new_person_obj.person_id_random
|
new_person_obj.person_id
|
||||||
},
|
},
|
||||||
log_lvl: log_lvl
|
log_lvl: log_lvl
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
// *** Import Svelte specific
|
// *** Import Svelte specific
|
||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
import { untrack } from 'svelte';
|
// import { untrack } from 'svelte';
|
||||||
// import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
// import { goto, invalidate, pushState, replaceState } from '$app/navigation';
|
||||||
|
|
||||||
// *** Import other supporting libraries
|
// *** Import other supporting libraries
|
||||||
import { Modal } from 'flowbite-svelte';
|
// import { Modal } from 'flowbite-svelte';
|
||||||
import { liveQuery } from 'dexie';
|
import { liveQuery } from 'dexie';
|
||||||
|
|
||||||
// *** Import Aether specific variables and functions
|
// *** Import Aether specific variables and functions
|
||||||
@@ -83,33 +83,33 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
let lq__post_obj = $derived.by(() => {
|
// let lq__post_obj = $derived.by(() => {
|
||||||
const post_id = $idaa_slct.post_id ?? '';
|
// const post_id = $idaa_slct.post_id ?? '';
|
||||||
return liveQuery(async () => {
|
// return liveQuery(async () => {
|
||||||
if (!post_id) return null;
|
// if (!post_id) return null;
|
||||||
return await db_posts.post.get(post_id);
|
// return await db_posts.post.get(post_id);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
let lq__post_comment_obj_li = $derived.by(() => {
|
// let lq__post_comment_obj_li = $derived.by(() => {
|
||||||
const post_id = $idaa_slct.post_id ?? '';
|
// const post_id = $idaa_slct.post_id ?? '';
|
||||||
return liveQuery(async () => {
|
// return liveQuery(async () => {
|
||||||
if (!post_id) return [];
|
// if (!post_id) return [];
|
||||||
return await db_posts.comment
|
// return await db_posts.comment
|
||||||
.where('post_id')
|
// .where('post_id')
|
||||||
.equals(post_id)
|
// .equals(post_id)
|
||||||
.reverse()
|
// .reverse()
|
||||||
.sortBy('updated_on');
|
// .sortBy('updated_on');
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
let lq__post_comment_obj = $derived.by(() => {
|
// let lq__post_comment_obj = $derived.by(() => {
|
||||||
const comment_id = $idaa_slct.post_comment_id ?? '';
|
// const comment_id = $idaa_slct.post_comment_id ?? '';
|
||||||
return liveQuery(async () => {
|
// return liveQuery(async () => {
|
||||||
if (!comment_id) return null;
|
// if (!comment_id) return null;
|
||||||
return await db_posts.comment.get(comment_id);
|
// return await db_posts.comment.get(comment_id);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
// Handle Single Post Load Trigger
|
// Handle Single Post Load Trigger
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
@@ -188,57 +188,57 @@
|
|||||||
// );
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_activity_log({
|
// function add_activity_log({
|
||||||
action = 'idaa_bb_page',
|
// action = 'idaa_bb_page',
|
||||||
action_with = 'none'
|
// action_with = 'none'
|
||||||
}: {
|
// }: {
|
||||||
action?: string;
|
// action?: string;
|
||||||
action_with?: string;
|
// action_with?: string;
|
||||||
}) {
|
// }) {
|
||||||
let last_cache_refresh_iso = new Date($ae_loc?.last_cache_refresh);
|
// let last_cache_refresh_iso = new Date($ae_loc?.last_cache_refresh);
|
||||||
|
|
||||||
let activity_description = `
|
// let activity_description = `
|
||||||
${$idaa_loc.novi_full_name ?? 'none'} ${$idaa_loc.novi_email ?? 'no-email'}
|
// ${$idaa_loc.novi_full_name ?? 'none'} ${$idaa_loc.novi_email ?? 'no-email'}
|
||||||
allow=${$ae_loc?.allow_access}
|
// allow=${$ae_loc?.allow_access}
|
||||||
last_cache_refresh=${last_cache_refresh_iso.toLocaleString()}
|
// last_cache_refresh=${last_cache_refresh_iso.toLocaleString()}
|
||||||
data_route=${data?.route.toString() ?? 'unknown'}
|
// data_route=${data?.route.toString() ?? 'unknown'}
|
||||||
`;
|
// `;
|
||||||
|
|
||||||
let data_kv = {
|
// let data_kv = {
|
||||||
external_client_id: data?.route.id,
|
// external_client_id: data?.route.id,
|
||||||
name: `IDAA: ${$idaa_loc.novi_full_name ?? 'none'} ${$idaa_loc.novi_email ?? ''}`,
|
// name: `IDAA: ${$idaa_loc.novi_full_name ?? 'none'} ${$idaa_loc.novi_email ?? ''}`,
|
||||||
description: activity_description ?? null,
|
// description: activity_description ?? null,
|
||||||
object_type: 'post', // archive, post, event
|
// object_type: 'post', // archive, post, event
|
||||||
// object_id: data?.params?.event_id ?? null,
|
// // object_id: data?.params?.event_id ?? null,
|
||||||
// object_id: ae_acct.slct.archive_id, // data?.params?.archive_id ?? null,
|
// // object_id: ae_acct.slct.archive_id, // data?.params?.archive_id ?? null,
|
||||||
url_root: data?.url.origin,
|
// url_root: data?.url.origin,
|
||||||
// url_full_path: data?.url.href,
|
// // url_full_path: data?.url.href,
|
||||||
url_full_path: data?.url.pathname,
|
// url_full_path: data?.url.pathname,
|
||||||
url_params: data?.url.searchParams.toString(),
|
// url_params: data?.url.searchParams.toString(),
|
||||||
action: action,
|
// action: action,
|
||||||
action_with: action_with ?? 'none',
|
// action_with: action_with ?? 'none',
|
||||||
meta_json: {
|
// meta_json: {
|
||||||
allow_access: $ae_loc?.allow_access,
|
// allow_access: $ae_loc?.allow_access,
|
||||||
last_cache_refresh: $ae_loc?.last_cache_refresh,
|
// last_cache_refresh: $ae_loc?.last_cache_refresh,
|
||||||
last_cache_refresh_iso: last_cache_refresh_iso.toISOString(),
|
// last_cache_refresh_iso: last_cache_refresh_iso.toISOString(),
|
||||||
last_cache_refresh_locale: last_cache_refresh_iso.toLocaleString(),
|
// last_cache_refresh_locale: last_cache_refresh_iso.toLocaleString(),
|
||||||
access_level: $ae_loc?.access_level,
|
// access_level: $ae_loc?.access_level,
|
||||||
iframe: $ae_loc?.iframe
|
// iframe: $ae_loc?.iframe
|
||||||
// site_access_key: $ae_loc?.site_access_key,
|
// // site_access_key: $ae_loc?.site_access_key,
|
||||||
// site_domain_access_key: $ae_loc?.site_domain_access_key,
|
// // site_domain_access_key: $ae_loc?.site_domain_access_key,
|
||||||
// site_domain: $ae_loc?.site_domain,
|
// // site_domain: $ae_loc?.site_domain,
|
||||||
// extra_data: extra_data ?? '',
|
// // extra_data: extra_data ?? '',
|
||||||
// log_lvl: log_lvl,
|
// // log_lvl: log_lvl,
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
core_func.create_ae_obj__activity_log({
|
// core_func.create_ae_obj__activity_log({
|
||||||
api_cfg: $ae_api,
|
// api_cfg: $ae_api,
|
||||||
account_id: $ae_loc.account_id,
|
// account_id: $ae_loc.account_id,
|
||||||
data_kv: data_kv,
|
// data_kv: data_kv,
|
||||||
log_lvl: log_lvl
|
// log_lvl: log_lvl
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
@@ -473,6 +473,7 @@ Copy and paste link: <a href="${link_base_url}?post_id=${$idaa_slct.post_id}">${
|
|||||||
Title of BB post:
|
Title of BB post:
|
||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
|
autofocus
|
||||||
type="text"
|
type="text"
|
||||||
id="title"
|
id="title"
|
||||||
name="title"
|
name="title"
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
// let search_submit_results: any = null;
|
// let search_submit_results: any = null;
|
||||||
|
|
||||||
if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
// if (log_lvl) console.log('** Component Loaded: ** Post Options');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- preset-filled-surface-500 -->
|
<!-- preset-filled-surface-500 -->
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
let data_kv = {
|
let data_kv = {
|
||||||
external_person_id: $idaa_loc.novi_uuid,
|
external_person_id: $idaa_loc.novi_uuid,
|
||||||
title: 'Change NEW Post Title',
|
title: '',
|
||||||
full_name: $idaa_loc.novi_full_name,
|
full_name: $idaa_loc.novi_full_name,
|
||||||
email: $idaa_loc.novi_email,
|
email: $idaa_loc.novi_email,
|
||||||
enable: true
|
enable: true
|
||||||
|
|||||||
Reference in New Issue
Block a user