feat: Migrate ESLint to flat config and resolve initial linting errors
Migrated the ESLint configuration to the new flat config format () and addressed several initial linting errors. Key changes include: - Updated ESLint configuration to treat as warnings instead of errors. - Fixed errors in by declaring and . - Corrected error in by using instead of an out-of-scope . - Resolved error in by replacing the undefined directive with the component. - Addressed errors in by replacing with and with . - Fixed errors in by importing necessary modules (, , ) and adding missing props (, , , , ).
This commit is contained in:
@@ -1,88 +1,90 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
/** @type {import('./$types').LayoutData} */
|
||||
data: any;
|
||||
children?: import('svelte').Snippet;
|
||||
log_lvl?: number;
|
||||
}
|
||||
interface Props {
|
||||
/** @type {import('./$types').LayoutData} */
|
||||
data: any;
|
||||
children?: import('svelte').Snippet;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
data,
|
||||
children,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
let { data, children, log_lvl = 0 }: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { liveQuery } from 'dexie';
|
||||
|
||||
// *** Import Svelte specific
|
||||
import { liveQuery } from "dexie";
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
|
||||
import type { key_val } from '$lib/stores/ae_stores';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
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/stores/ae_stores';
|
||||
import {
|
||||
events_loc,
|
||||
events_sess,
|
||||
events_slct,
|
||||
events_trigger
|
||||
} from '$lib/stores/ae_events_stores';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
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/stores/ae_stores';
|
||||
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
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 ?? '');
|
||||
|
||||
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;
|
||||
})
|
||||
);
|
||||
|
||||
return results;
|
||||
}));
|
||||
let nav_y_height = $state(0);
|
||||
|
||||
let nav_y_height = $state(0);
|
||||
let box: any;
|
||||
let xLeft = $state(0);
|
||||
let xScroll = $state(0);
|
||||
let xWidth = $state(0);
|
||||
let yTop = $state(0);
|
||||
let yScroll = $state(0);
|
||||
let yHeight = $state(0);
|
||||
|
||||
let box: any;
|
||||
let xLeft = $state(0);
|
||||
let xScroll = $state(0);
|
||||
let xWidth = $state(0);
|
||||
let yTop = $state(0);
|
||||
let yScroll = $state(0);
|
||||
let yHeight = $state(0);
|
||||
let scroll_x = $state(0);
|
||||
let scroll_y = $state(0);
|
||||
|
||||
let scroll_x = $state(0);
|
||||
let scroll_y = $state(0);
|
||||
|
||||
function parse_scroll() {
|
||||
// console.log(`parse_scroll() called`);
|
||||
xLeft = box.scrollLeft;
|
||||
xScroll = box.scrollWidth;
|
||||
xWidth = box.clientWidth;
|
||||
yTop = box.scrollTop;
|
||||
yHeight = box.clientHeight;
|
||||
yScroll = box.scrollHeight;
|
||||
// console.log(`parse_scroll() called: ${yTop}`);
|
||||
}
|
||||
|
||||
// *** Functions and Logic
|
||||
$effect(() => {
|
||||
// if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
||||
// }
|
||||
|
||||
});
|
||||
function parse_scroll() {
|
||||
// console.log(`parse_scroll() called`);
|
||||
xLeft = box.scrollLeft;
|
||||
xScroll = box.scrollWidth;
|
||||
xWidth = box.clientWidth;
|
||||
yTop = box.scrollTop;
|
||||
yHeight = box.clientHeight;
|
||||
yScroll = box.scrollHeight;
|
||||
// console.log(`parse_scroll() called: ${yTop}`);
|
||||
}
|
||||
|
||||
// *** Functions and Logic
|
||||
$effect(() => {
|
||||
// if ($events_trigger == 'load__event_badge_obj_li' && $events_slct.event_id) {
|
||||
// }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
Æ:
|
||||
Badges for
|
||||
{ae_util.shorten_string({string: $lq__event_obj?.name ?? '-- not set --', max_length: 12})}
|
||||
- Badges v3 -
|
||||
{$events_loc?.title}
|
||||
</title>
|
||||
Æ: Badges for
|
||||
{ae_util.shorten_string({ string: $lq__event_obj?.name ?? '-- not set --', max_length: 12 })}
|
||||
- Badges v3 -
|
||||
{$events_loc?.title}
|
||||
</title>
|
||||
</svelte:head>
|
||||
<!-- - Badges - {$events_loc?.title} -->
|
||||
|
||||
|
||||
<!-- +layout: Where is here??? -->
|
||||
|
||||
|
||||
|
||||
{@render children?.()}
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
data,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
let { data, log_lvl = 0 }: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
import { liveQuery } from "dexie";
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
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_functions';
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } 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 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_functions';
|
||||
import {
|
||||
ae_snip,
|
||||
ae_loc,
|
||||
ae_sess,
|
||||
ae_api,
|
||||
ae_trig,
|
||||
slct,
|
||||
slct_trigger
|
||||
} 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 { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
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_loc,
|
||||
events_sess,
|
||||
events_slct,
|
||||
events_trigger
|
||||
} from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
||||
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
||||
import Comp_badge_search from './ae_comp__badge_search.svelte';
|
||||
import Comp_badge_obj_li from './ae_comp__badge_obj_li.svelte';
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
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 ?? '');
|
||||
|
||||
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;
|
||||
})
|
||||
);
|
||||
|
||||
return results;
|
||||
}));
|
||||
let event_badge_id_li: Array<string> = $state([]);
|
||||
// let dq__where_type_id_val: string = `event_id_random`;
|
||||
// let dq__where_eq_id_val: string = $events_slct?.event_id ?? '';
|
||||
|
||||
let event_badge_id_li: Array<string> = $state([]);
|
||||
// let dq__where_type_id_val: string = `event_id_random`;
|
||||
// let dq__where_eq_id_val: string = $events_slct?.event_id ?? '';
|
||||
// let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
// if (event_badge_id_li.length > 0) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
// let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
// if (event_badge_id_li.length > 0) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
// return results;
|
||||
// } else {
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('given_name')
|
||||
// // This should be sorted by a custom sort field
|
||||
|
||||
// return results;
|
||||
// }
|
||||
// }));
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
// return results;
|
||||
// } else {
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('given_name')
|
||||
// // This should be sorted by a custom sort field
|
||||
|
||||
// return results;
|
||||
// }
|
||||
// }));
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
Badges -
|
||||
{ae_util.shorten_string({string: $lq__event_obj?.name ?? '-- not set --', max_length: 12})}
|
||||
- OSIT's Æ Events
|
||||
</title>
|
||||
Badges -
|
||||
{ae_util.shorten_string({ string: $lq__event_obj?.name ?? '-- not set --', max_length: 12 })}
|
||||
- OSIT's Æ Events
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<!-- badges +page: Where is here??? -->
|
||||
|
||||
|
||||
<!-- event_badge_obj_li={$lq__event_badge_obj_li} -->
|
||||
<Comp_badge_search
|
||||
event_id={$events_slct?.event_id ?? ''}
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
bind:event_badge_id_li={event_badge_id_li}
|
||||
bind:search_status={$events_sess.badges.search_status}
|
||||
bind:search_complete={$events_sess.badges.search_complete}
|
||||
bind:qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
bind:qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
>
|
||||
</Comp_badge_search>
|
||||
|
||||
event_id={$events_slct?.event_id ?? ''}
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
bind:event_badge_id_li
|
||||
bind:search_status={$events_sess.badges.search_status}
|
||||
bind:search_complete={$events_sess.badges.search_complete}
|
||||
bind:qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
bind:qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
></Comp_badge_search>
|
||||
|
||||
<!-- {#await $lq__event_badge_obj_li}
|
||||
Loading....
|
||||
@@ -120,19 +120,17 @@ let event_badge_id_li: Array<string> = $state([]);
|
||||
|
||||
{/await} -->
|
||||
|
||||
|
||||
<!-- This is how we reset the Dixie liveQuery when the search parameters change. I wish there was a better way??? -->
|
||||
{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'}
|
||||
<Comp_badge_obj_li
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
event_badge_id_li={event_badge_id_li}
|
||||
qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
>
|
||||
</Comp_badge_obj_li>
|
||||
{#if $events_sess?.badges?.search_status != 'loading' && $events_sess?.badges?.search_status != 'processing'}
|
||||
<Comp_badge_obj_li
|
||||
bind:use_id_li={$events_sess.badges.use_id_li}
|
||||
{event_badge_id_li}
|
||||
qry_str={$events_loc.badges.fulltext_search_qry_str}
|
||||
qry_type_code={$events_loc.badges.search_badge_type_code}
|
||||
log_lvl={1}
|
||||
></Comp_badge_obj_li>
|
||||
{:else}
|
||||
<p class="p-4 italic text-sm text-surface-400">Loading badges...</p>
|
||||
<p class="p-4 italic text-sm text-surface-400">Loading badges...</p>
|
||||
{/if}
|
||||
|
||||
<!-- {#if event_badge_id_li && event_badge_id_li?.length > 0}
|
||||
@@ -145,4 +143,4 @@ let event_badge_id_li: Array<string> = $state([]);
|
||||
</Comp_badge_obj_li>
|
||||
{:else}
|
||||
<p class="p-4 italic text-sm text-surface-400">No badges found for this event.</p>
|
||||
{/if} -->
|
||||
{/if} -->
|
||||
|
||||
@@ -1,123 +1,119 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
interface Props {
|
||||
/** @type {import('./$types').PageData} */
|
||||
data: any;
|
||||
log_lvl?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
data,
|
||||
log_lvl = 0
|
||||
}: Props = $props();
|
||||
let { data, log_lvl = 0 }: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
import { liveQuery } from "dexie";
|
||||
// *** Import other supporting libraries
|
||||
// import { browser } from '$app/environment';
|
||||
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_functions';
|
||||
// import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/ae_stores';
|
||||
// *** 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_functions';
|
||||
// import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/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 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 { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
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_loc,
|
||||
events_sess,
|
||||
events_slct,
|
||||
events_trigger
|
||||
} from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
import Comp_badge_obj_view from './ae_comp__badge_obj_view.svelte';
|
||||
import Comp_badge_obj_view from './ae_comp__badge_obj_view.svelte';
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
let event_badge_id = data.params.badge_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}; badge_id=${test_event_badge_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
|
||||
// *** Variables
|
||||
// let test_event_id = data.params.event_id;
|
||||
let event_badge_id = data.params.badge_id;
|
||||
// console.log(`Data Params: event_id=${test_event_id}; badge_id=${test_event_badge_id}`);
|
||||
let url_test_val = data.url.searchParams.get('test_val');
|
||||
console.log(`URL test_val = ${url_test_val}`);
|
||||
let lq__event_badge_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_badge_obj *** event_badge_id=${event_badge_id}`);
|
||||
}
|
||||
let results = await db_events.badge.get(event_badge_id);
|
||||
|
||||
let lq__event_badge_obj = $derived(liveQuery(async () => {
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_badge_obj *** event_badge_id=${event_badge_id}`);
|
||||
}
|
||||
let results = await db_events.badge
|
||||
.get(event_badge_id);
|
||||
return results;
|
||||
})
|
||||
);
|
||||
|
||||
return results;
|
||||
}));
|
||||
// *** Functions and Logic
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
|
||||
// *** Functions and Logic
|
||||
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
|
||||
// let url_test_val = data.url.searchParams.get('test_val');
|
||||
// console.log(`URL test_val = ${url_test_val}`);
|
||||
// }
|
||||
</script>
|
||||
|
||||
|
||||
<svelte:head>
|
||||
<title>
|
||||
Æ:
|
||||
Badge -
|
||||
{$lq__event_badge_obj?.given_name ?? '-- not set --'}
|
||||
{$lq__event_badge_obj?.family_name ? $lq__event_badge_obj?.family_name.charAt(0) + '.' : ''}
|
||||
- Badges v3 -
|
||||
{$events_loc?.title}
|
||||
</title>
|
||||
Æ: Badge -
|
||||
{$lq__event_badge_obj?.given_name ?? '-- not set --'}
|
||||
{$lq__event_badge_obj?.family_name ? $lq__event_badge_obj?.family_name.charAt(0) + '.' : ''}
|
||||
- Badges v3 -
|
||||
{$events_loc?.title}
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
|
||||
<!-- badge ID +page: Where is here??? -->
|
||||
|
||||
<!-- event {data.params.event_id} / badge {data.params.badge_id} -->
|
||||
|
||||
{#if $lq__event_badge_obj}
|
||||
<header
|
||||
class="
|
||||
<header
|
||||
class="
|
||||
w-full
|
||||
flex flex-row gap-1 items-center justify-between
|
||||
border-b border-gray-300
|
||||
mb-2
|
||||
pb-2
|
||||
"
|
||||
>
|
||||
<h2 class="text-2xl font-bold">
|
||||
Badge:
|
||||
{#if $lq__event_badge_obj.full_name}
|
||||
{$lq__event_badge_obj.full_name}
|
||||
{:else if $lq__event_badge_obj.given_name}
|
||||
{$lq__event_badge_obj.given_name}
|
||||
{:else}
|
||||
-- no name --
|
||||
{/if}
|
||||
</h2>
|
||||
<a href={`/events/${$lq__event_badge_obj.event_id}/badges`} class="text-sm italic text-blue-600 hover:underline">
|
||||
<span class="fas fa-search"></span>
|
||||
Back to Search
|
||||
</a>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- {#if $lq__event_badge_obj} -->
|
||||
<Comp_badge_obj_view
|
||||
event_id={$lq__event_badge_obj.event_id}
|
||||
event_badge_id={event_badge_id}
|
||||
lq__event_badge_obj={lq__event_badge_obj}
|
||||
/>
|
||||
<!-- {/if} -->
|
||||
>
|
||||
<h2 class="text-2xl font-bold">
|
||||
Badge:
|
||||
{#if $lq__event_badge_obj.full_name}
|
||||
{$lq__event_badge_obj.full_name}
|
||||
{:else if $lq__event_badge_obj.given_name}
|
||||
{$lq__event_badge_obj.given_name}
|
||||
{:else}
|
||||
-- no name --
|
||||
{/if}
|
||||
</h2>
|
||||
<a
|
||||
href={`/events/${$lq__event_badge_obj.event_id}/badges`}
|
||||
class="text-sm italic text-blue-600 hover:underline"
|
||||
>
|
||||
<span class="fas fa-search"></span>
|
||||
Back to Search
|
||||
</a>
|
||||
</header>
|
||||
|
||||
<!-- {#if $lq__event_badge_obj} -->
|
||||
<Comp_badge_obj_view
|
||||
event_id={$lq__event_badge_obj.event_id}
|
||||
{event_badge_id}
|
||||
{lq__event_badge_obj}
|
||||
/>
|
||||
<!-- {/if} -->
|
||||
{:else}
|
||||
<p>No IDB record found for ID: {event_badge_id}</p>
|
||||
<p>No IDB record found for ID: {event_badge_id}</p>
|
||||
{/if}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,286 +1,303 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
// Exports
|
||||
container_class_li?: string|Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
use_id_li?: boolean;
|
||||
event_badge_id_li?: Array<string>;
|
||||
qry_idb?: boolean;
|
||||
qry_str?: string;
|
||||
qry_type_code?: string;
|
||||
// event_badge_obj_li?: Array<any>;
|
||||
link_to_type?: string;
|
||||
link_to_id?: string;
|
||||
// export let lq__event_presentation_obj
|
||||
log_lvl?: number;
|
||||
show_sensitive_fields?: boolean;
|
||||
hide_affiliations?: boolean;
|
||||
hide_location?: boolean;
|
||||
hide_badge_type?: boolean;
|
||||
}
|
||||
interface Props {
|
||||
// Exports
|
||||
container_class_li?: string | Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
use_id_li?: boolean;
|
||||
event_badge_id_li?: Array<string>;
|
||||
qry_idb?: boolean;
|
||||
qry_str?: string;
|
||||
qry_type_code?: string;
|
||||
// event_badge_obj_li?: Array<any>;
|
||||
link_to_type?: string;
|
||||
link_to_id?: string;
|
||||
// export let lq__event_presentation_obj
|
||||
log_lvl?: number;
|
||||
show_sensitive_fields?: boolean;
|
||||
hide_affiliations?: boolean;
|
||||
hide_location?: boolean;
|
||||
hide_badge_type?: boolean;
|
||||
}
|
||||
|
||||
let {
|
||||
container_class_li = [],
|
||||
use_id_li = $bindable(true),
|
||||
event_badge_id_li = $bindable([]),
|
||||
qry_idb = false,
|
||||
qry_str = '',
|
||||
qry_type_code = '',
|
||||
// event_badge_obj_li = $bindable(),
|
||||
link_to_type,
|
||||
link_to_id,
|
||||
log_lvl = $bindable(0),
|
||||
show_sensitive_fields = true,
|
||||
hide_affiliations = false,
|
||||
hide_location = false,
|
||||
hide_badge_type = false,
|
||||
}: Props = $props();
|
||||
let {
|
||||
container_class_li = [],
|
||||
use_id_li = $bindable(true),
|
||||
event_badge_id_li = $bindable([]),
|
||||
qry_idb = false,
|
||||
qry_str = '',
|
||||
qry_type_code = '',
|
||||
// event_badge_obj_li = $bindable(),
|
||||
link_to_type,
|
||||
link_to_id,
|
||||
log_lvl = $bindable(0),
|
||||
show_sensitive_fields = true,
|
||||
hide_affiliations = false,
|
||||
hide_location = false,
|
||||
hide_badge_type = false
|
||||
}: Props = $props();
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
|
||||
// *** Import Svelte specific
|
||||
// import { goto } from '$app/navigation';
|
||||
// *** Import other supporting libraries
|
||||
import { liveQuery } from 'dexie';
|
||||
|
||||
// *** Import other supporting libraries
|
||||
import { liveQuery } from "dexie";
|
||||
// *** Import Aether specific variables and functions
|
||||
import {
|
||||
ae_snip,
|
||||
ae_loc,
|
||||
ae_sess,
|
||||
ae_api,
|
||||
ae_trig,
|
||||
slct,
|
||||
slct_trigger
|
||||
} from '$lib/stores/ae_stores';
|
||||
|
||||
// *** Import Aether specific variables and functions
|
||||
import { ae_snip, ae_loc, ae_sess, ae_api, ae_trig, slct, slct_trigger } from '$lib/stores/ae_stores';
|
||||
import {
|
||||
events_loc,
|
||||
events_sess,
|
||||
events_slct,
|
||||
events_trigger
|
||||
} from '$lib/stores/ae_events_stores';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
|
||||
import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
import { db_events } from "$lib/ae_events/db_events";
|
||||
if (log_lvl) {
|
||||
if (link_to_type && link_to_id) {
|
||||
console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
} else {
|
||||
console.log(`No link_to_type or link_to_id defined.`);
|
||||
}
|
||||
}
|
||||
|
||||
if (log_lvl) {
|
||||
if (link_to_type && link_to_id) {
|
||||
console.log(`link_to_type: ${link_to_type}; link_to_id: ${link_to_id}`);
|
||||
} else {
|
||||
console.log(`No link_to_type or link_to_id defined.`);
|
||||
}
|
||||
}
|
||||
// Variables
|
||||
// let ae_promises: key_val = {};
|
||||
// let ae_tmp: key_val = {};
|
||||
// let ae_triggers: key_val = {};
|
||||
|
||||
// let event_badge_id_li: Array<string> = $state([]);
|
||||
|
||||
// Variables
|
||||
// let ae_promises: key_val = {};
|
||||
// let ae_tmp: key_val = {};
|
||||
// let ae_triggers: key_val = {};
|
||||
// *** Functions and Logic
|
||||
let lq__event_badge_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
let results: any;
|
||||
log_lvl = 1;
|
||||
|
||||
// let event_badge_id_li: Array<string> = $state([]);
|
||||
if (use_id_li && event_badge_id_li?.length) {
|
||||
if (log_lvl) {
|
||||
console.log(`LQ - Using event_badge_id_li to get event badges.`, event_badge_id_li);
|
||||
}
|
||||
|
||||
results = await db_events.badge.bulkGet(event_badge_id_li);
|
||||
} else if (qry_str && qry_str?.length) {
|
||||
if (log_lvl) {
|
||||
console.log(`LQ - Using qry_str to get event badges. qry_str=${qry_str}`);
|
||||
}
|
||||
|
||||
// let ft_query = ae_util.sanitize_fulltext_search(qry_str);
|
||||
// let ft_query = qry_str;
|
||||
if (log_lvl) {
|
||||
console.log(`Fulltext search query: ${qry_str}`);
|
||||
}
|
||||
|
||||
// *** Functions and Logic
|
||||
let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
let results: any;
|
||||
log_lvl = 1;
|
||||
if (qry_type_code && qry_type_code !== 'all') {
|
||||
if (log_lvl) {
|
||||
console.log(`Also filtering by badge type code: ${qry_type_code}`);
|
||||
}
|
||||
results = await db_events.badge
|
||||
.where('default_qry_string')
|
||||
.equalsIgnoreCase(qry_str)
|
||||
// .equals(ft_query)
|
||||
// .and((badge) => badge.badge_type_code === qry_type_code && badge.event_id === $events_slct.event_id)
|
||||
.sortBy('tmp_sort_2');
|
||||
} else {
|
||||
// .matches(/testing/i).toArray()
|
||||
// .matches(/middle_text/i).toArray()
|
||||
|
||||
if (use_id_li && event_badge_id_li?.length) {
|
||||
if (log_lvl) {
|
||||
console.log(`LQ - Using event_badge_id_li to get event badges.`, event_badge_id_li);
|
||||
}
|
||||
results = await db_events.badge
|
||||
.where('full_name')
|
||||
.startsWithIgnoreCase(qry_str)
|
||||
// .startsWithIgnoreCase(qry_str)
|
||||
// .where('default_qry_string')
|
||||
// .equalsIgnoreCase(qry_str)
|
||||
// .equals(ft_query)
|
||||
// .and((badge) => badge.event_id === $events_slct.event_id)
|
||||
.sortBy('tmp_sort_2');
|
||||
}
|
||||
|
||||
results = await db_events.badge
|
||||
.bulkGet(event_badge_id_li);
|
||||
} else if (qry_str && qry_str?.length) {
|
||||
if (log_lvl) {
|
||||
console.log(`LQ - Using qry_str to get event badges. qry_str=${qry_str}`);
|
||||
}
|
||||
// event_badge_id_li = results.map((badge) => badge.event_badge_id);
|
||||
|
||||
// let ft_query = ae_util.sanitize_fulltext_search(qry_str);
|
||||
// let ft_query = qry_str;
|
||||
if (log_lvl) {
|
||||
console.log(`Fulltext search query: ${qry_str}`);
|
||||
}
|
||||
// } else if (event_badge_obj_li?.length) {
|
||||
// if (log_lvl) {
|
||||
// console.log(`LQ - Using event_badge_obj_li to get event badges.`);
|
||||
// }
|
||||
|
||||
if (qry_type_code && qry_type_code !== 'all') {
|
||||
if (log_lvl) {
|
||||
console.log(`Also filtering by badge type code: ${qry_type_code}`);
|
||||
}
|
||||
results = await db_events.badge
|
||||
.where('default_qry_string')
|
||||
.equalsIgnoreCase(qry_str)
|
||||
// .equals(ft_query)
|
||||
// .and((badge) => badge.badge_type_code === qry_type_code && badge.event_id === $events_slct.event_id)
|
||||
.sortBy('tmp_sort_2');
|
||||
} else {
|
||||
// event_badge_id_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
|
||||
|
||||
// .matches(/testing/i).toArray()
|
||||
// .matches(/middle_text/i).toArray()
|
||||
// for (let i = 0; i < event_badge_obj_li.length; i++) {
|
||||
// let event_badge_obj = event_badge_obj_li[i];
|
||||
// let event_badge_id_random = event_badge_obj.event_badge_id_random;
|
||||
// event_badge_id_li.push(event_badge_id_random);
|
||||
// }
|
||||
|
||||
results = await db_events.badge
|
||||
.where('full_name')
|
||||
.startsWithIgnoreCase(qry_str)
|
||||
// .startsWithIgnoreCase(qry_str)
|
||||
// .where('default_qry_string')
|
||||
// .equalsIgnoreCase(qry_str)
|
||||
// .equals(ft_query)
|
||||
// .and((badge) => badge.event_id === $events_slct.event_id)
|
||||
.sortBy('tmp_sort_2');
|
||||
}
|
||||
// results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
} else if (link_to_type && link_to_id) {
|
||||
let dq__where_type_id_val: string = `${link_to_type}_id_random`;
|
||||
let dq__where_eq_id_val: string = link_to_id ?? '';
|
||||
|
||||
// event_badge_id_li = results.map((badge) => badge.event_badge_id);
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`LQ - Trying where: ${dq__where_type_id_val}; equals: ${dq__where_eq_id_val}`
|
||||
);
|
||||
}
|
||||
// event_badge_id_li = [];
|
||||
results = await db_events.badge
|
||||
.where(dq__where_type_id_val)
|
||||
.equals(dq__where_eq_id_val)
|
||||
.sortBy('tmp_sort_2');
|
||||
|
||||
// event_badge_id_li = results.map((badge) => badge.event_badge_id);
|
||||
|
||||
// } else if (event_badge_obj_li?.length) {
|
||||
// if (log_lvl) {
|
||||
// console.log(`LQ - Using event_badge_obj_li to get event badges.`);
|
||||
// }
|
||||
// } else {
|
||||
// event_badge_id_li = [];
|
||||
// results = [];
|
||||
}
|
||||
|
||||
// event_badge_id_li = []; // This is to prevent the array from constantly updating and triggering the liveQuery.
|
||||
// log_lvl = 1;
|
||||
// Check if results are different than the current badge version stored under $events_slct
|
||||
if (
|
||||
$events_slct.event_badge_obj_li &&
|
||||
JSON.stringify($events_slct.event_badge_obj_li) !== JSON.stringify(results)
|
||||
) {
|
||||
$events_slct.event_badge_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`Session slct li stored version has changed for ID = ${$events_slct.event_id}`,
|
||||
$events_slct.event_badge_obj_li
|
||||
);
|
||||
}
|
||||
} else if (!$events_slct?.event_badge_obj_li) {
|
||||
$events_slct.event_badge_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(
|
||||
`Session slct li stored version was not set for ID = ${$events_slct.event_id}`,
|
||||
$events_slct.event_badge_obj_li
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl > 1) {
|
||||
console.log(
|
||||
`Session slct li stored version has not changed for ID = ${$events_slct.event_id}`,
|
||||
$events_slct.event_badge_obj_li
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// for (let i = 0; i < event_badge_obj_li.length; i++) {
|
||||
// let event_badge_obj = event_badge_obj_li[i];
|
||||
// let event_badge_id_random = event_badge_obj.event_badge_id_random;
|
||||
// event_badge_id_li.push(event_badge_id_random);
|
||||
// }
|
||||
return results;
|
||||
|
||||
// results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
// if (event_badge_id_li.length) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
} else if (link_to_type && link_to_id) {
|
||||
let dq__where_type_id_val: string = `${link_to_type}_id_random`;
|
||||
let dq__where_eq_id_val: string = link_to_id ?? '';
|
||||
|
||||
if (log_lvl) {
|
||||
console.log(`LQ - Trying where: ${dq__where_type_id_val}; equals: ${dq__where_eq_id_val}`);
|
||||
}
|
||||
// event_badge_id_li = [];
|
||||
results = await db_events.badge
|
||||
.where(dq__where_type_id_val)
|
||||
.equals(dq__where_eq_id_val)
|
||||
.sortBy('tmp_sort_2');
|
||||
|
||||
// event_badge_id_li = results.map((badge) => badge.event_badge_id);
|
||||
|
||||
// } else {
|
||||
// event_badge_id_li = [];
|
||||
// results = [];
|
||||
|
||||
}
|
||||
|
||||
// log_lvl = 1;
|
||||
// Check if results are different than the current badge version stored under $events_slct
|
||||
if ($events_slct.event_badge_obj_li && JSON.stringify($events_slct.event_badge_obj_li) !== JSON.stringify(results)) {
|
||||
$events_slct.event_badge_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(`Session slct li stored version has changed for ID = ${$events_slct.event_id}`, $events_slct.event_badge_obj_li);
|
||||
|
||||
}
|
||||
} else if (!$events_slct?.event_badge_obj_li) {
|
||||
$events_slct.event_badge_obj_li = [...results];
|
||||
if (log_lvl) {
|
||||
console.log(`Session slct li stored version was not set for ID = ${$events_slct.event_id}`, $events_slct.event_badge_obj_li);
|
||||
}
|
||||
} else {
|
||||
if (log_lvl > 1) {
|
||||
console.log(`Session slct li stored version has not changed for ID = ${$events_slct.event_id}`, $events_slct.event_badge_obj_li);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
|
||||
// if (event_badge_id_li.length) {
|
||||
// let results = await db_events.badge
|
||||
// .bulkGet(event_badge_id_li);
|
||||
|
||||
// return results;
|
||||
// } else if (link_to_type && link_to_id) {
|
||||
// console.log(`Trying where: ${dq__where_type_id_val}; equals: ${dq__where_eq_id_val}`);
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('name')
|
||||
|
||||
// return results;
|
||||
// } else {
|
||||
// return null;
|
||||
// }
|
||||
}));
|
||||
// return results;
|
||||
// } else if (link_to_type && link_to_id) {
|
||||
// console.log(`Trying where: ${dq__where_type_id_val}; equals: ${dq__where_eq_id_val}`);
|
||||
// let results = await db_events.badge
|
||||
// .where(dq__where_type_id_val)
|
||||
// .equals(dq__where_eq_id_val)
|
||||
// .sortBy('name')
|
||||
|
||||
// return results;
|
||||
// } else {
|
||||
// return null;
|
||||
// }
|
||||
})
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
<section class="px-1 flex flex-col gap-1 items-center justify-center space-y-1">
|
||||
<!-- event_badge_id_li?.length && -->
|
||||
{#if $lq__event_badge_obj_li?.length}
|
||||
<header class="w-full flex flex-row gap-1 items-center justify-start">
|
||||
<h2 class="text-base">Results:</h2>
|
||||
<div class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg">
|
||||
<span class="fas fa-list-ol mx-4"></span>
|
||||
{$lq__event_badge_obj_li.length}×
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- event_badge_id_li?.length && -->
|
||||
{#if $lq__event_badge_obj_li?.length}
|
||||
<header class="w-full flex flex-row gap-1 items-center justify-start">
|
||||
<h2 class="text-base">Results:</h2>
|
||||
<div class="text-3xl font-bold preset-filled-success-100-900 px-4 rounded-lg">
|
||||
<span class="fas fa-list-ol mx-4"></span>
|
||||
{$lq__event_badge_obj_li.length}×
|
||||
</div>
|
||||
</header>
|
||||
<!-- The email should only be the first 3 chars and then @domain name. -->
|
||||
|
||||
<!-- The email should only be the first 3 chars and then @domain name. -->
|
||||
|
||||
<ul class="list-disc list-inside">
|
||||
{#each $lq__event_badge_obj_li as event_badge_obj (event_badge_obj.event_badge_id_random)}
|
||||
<li
|
||||
class="
|
||||
<ul class="list-disc list-inside">
|
||||
{#each $lq__event_badge_obj_li as event_badge_obj (event_badge_obj.event_badge_id_random)}
|
||||
<li
|
||||
class="
|
||||
border-b border-gray-300 dark:border-gray-600 py-0.5
|
||||
flex flex-row gap-1 items-center justify-between w-full
|
||||
"
|
||||
>
|
||||
<a
|
||||
href={`/events/${event_badge_obj.event_id}/badges/${event_badge_obj.event_badge_id}`}
|
||||
class="flex flex-row gap-1 items-center justify-start min-w-fit"
|
||||
title={`Badge: ${event_badge_obj.full_name ?? event_badge_obj.given_name ?? '-- no name --'}\nID: ${event_badge_obj.event_badge_id}`}
|
||||
>
|
||||
<span>
|
||||
{#if event_badge_obj.hide}
|
||||
<span class="fas fa-eye-slash mx-1"></span>
|
||||
{:else}
|
||||
<span class="fas fa-id-badge mx-1"></span>
|
||||
{/if}
|
||||
{#if event_badge_obj.print_count >= 1}
|
||||
<!-- Show a green checkmark -->
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
>
|
||||
<a
|
||||
href={`/events/${event_badge_obj.event_id}/badges/${event_badge_obj.event_badge_id}`}
|
||||
class="flex flex-row gap-1 items-center justify-start min-w-fit"
|
||||
title={`Badge: ${event_badge_obj.full_name ?? event_badge_obj.given_name ?? '-- no name --'}\nID: ${event_badge_obj.event_badge_id}`}
|
||||
>
|
||||
<span>
|
||||
{#if event_badge_obj.hide}
|
||||
<span class="fas fa-eye-slash mx-1"></span>
|
||||
{:else}
|
||||
<span class="fas fa-id-badge mx-1"></span>
|
||||
{/if}
|
||||
{#if event_badge_obj.print_count >= 1}
|
||||
<!-- Show a green checkmark -->
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
|
||||
{#if $ae_loc.trusted_access}
|
||||
<span class="print_count preset-tonal-warning px-1">{event_badge_obj.print_count}×</span>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
{#if $ae_loc.trusted_access}
|
||||
<span class="print_count preset-tonal-warning px-1"
|
||||
>{event_badge_obj.print_count}×</span
|
||||
>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
|
||||
<span class="font-bold">
|
||||
{#if event_badge_obj.full_name_override}
|
||||
{event_badge_obj.full_name_override}
|
||||
{:else if event_badge_obj.full_name}
|
||||
{event_badge_obj.full_name}
|
||||
{:else if event_badge_obj.given_name}
|
||||
{event_badge_obj.given_name} {event_badge_obj.family_name}
|
||||
{:else}
|
||||
-- no name --
|
||||
{/if}
|
||||
</span>
|
||||
</a>
|
||||
<span class="font-bold">
|
||||
{#if event_badge_obj.full_name_override}
|
||||
{event_badge_obj.full_name_override}
|
||||
{:else if event_badge_obj.full_name}
|
||||
{event_badge_obj.full_name}
|
||||
{:else if event_badge_obj.given_name}
|
||||
{event_badge_obj.given_name} {event_badge_obj.family_name}
|
||||
{:else}
|
||||
-- no name --
|
||||
{/if}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
{#if show_sensitive_fields}
|
||||
-
|
||||
<span class="min-w-fit">
|
||||
<!-- The email should only be the first 3 chars and then @domain name. -->
|
||||
<!-- Example: original: scott.idem@oneskyit.com obscured: sco...@oneskyit.com -->
|
||||
<span class="fas fa-envelope"></span>
|
||||
{event_badge_obj.email ? event_badge_obj.email.replace(/^(.{3}).*@/, '$1...@') : ''}
|
||||
</span>
|
||||
{/if}
|
||||
{#if !hide_affiliations}
|
||||
-
|
||||
{event_badge_obj?.affiliations ?? '-- no affiliations --'}
|
||||
{/if}
|
||||
{#if !hide_location}
|
||||
-
|
||||
{event_badge_obj?.location ?? '-- no location --'}
|
||||
{/if}
|
||||
{#if !hide_badge_type}
|
||||
-
|
||||
<span class="italic">{event_badge_obj?.badge_type}</span>
|
||||
{/if}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
{#if show_sensitive_fields}
|
||||
-
|
||||
<span class="min-w-fit">
|
||||
<!-- The email should only be the first 3 chars and then @domain name. -->
|
||||
<!-- Example: original: scott.idem@oneskyit.com obscured: sco...@oneskyit.com -->
|
||||
<span class="fas fa-envelope"></span>
|
||||
{event_badge_obj.email ? event_badge_obj.email.replace(/^(.{3}).*@/, '$1...@') : ''}
|
||||
</span>
|
||||
{/if}
|
||||
{#if !hide_affiliations}
|
||||
-
|
||||
{event_badge_obj?.affiliations ?? '-- no affiliations --'}
|
||||
{/if}
|
||||
{#if !hide_location}
|
||||
-
|
||||
{event_badge_obj?.location ?? '-- no location --'}
|
||||
{/if}
|
||||
{#if !hide_badge_type}
|
||||
-
|
||||
<span class="italic">{event_badge_obj?.badge_type}</span>
|
||||
{/if}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
<!-- <table class="table">
|
||||
<!-- <table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Badge</th>
|
||||
@@ -293,9 +310,9 @@ let lq__event_badge_obj_li = $derived(liveQuery(async () => {
|
||||
<tr><td class=""></td><td class=""></td></tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
{:else}
|
||||
<div class="">
|
||||
<p>No results available to show.</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
{:else}
|
||||
<div class="">
|
||||
<p>No results available to show.</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user