style: Apply Prettier formatting with 4-space indentation
Applied consistent code formatting across the project using Prettier, now configured to use 4-space indentation instead of tabs.
This commit is contained in:
@@ -1,87 +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}`);
|
||||
}
|
||||
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) {
|
||||
// }
|
||||
});
|
||||
// *** 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>
|
||||
<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} -->
|
||||
|
||||
|
||||
@@ -1,120 +1,120 @@
|
||||
<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}`);
|
||||
|
||||
import { onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
let lq__event_obj = $state(null);
|
||||
let lq__event_obj = $state(null);
|
||||
|
||||
onMount(() => {
|
||||
const observable = liveQuery(() => db_events.event.get($events_slct?.event_id ?? ''));
|
||||
const subscription = observable.subscribe((value) => {
|
||||
lq__event_obj = value;
|
||||
});
|
||||
onMount(() => {
|
||||
const observable = liveQuery(() => db_events.event.get($events_slct?.event_id ?? ''));
|
||||
const subscription = observable.subscribe((value) => {
|
||||
lq__event_obj = value;
|
||||
});
|
||||
|
||||
return () => {
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
return () => {
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
|
||||
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;
|
||||
// } 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;
|
||||
// }
|
||||
// }));
|
||||
// return results;
|
||||
// }
|
||||
// }));
|
||||
|
||||
// *** Functions and Logic
|
||||
// *** Functions and Logic
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
// 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>
|
||||
Badges -
|
||||
{ae_util.shorten_string({ string: lq__event_obj?.name ?? '-- not set --', max_length: 12 })}
|
||||
- OSIT's Æ Events
|
||||
</title>
|
||||
<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: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}
|
||||
event_id={$events_slct?.event_id ?? ''}
|
||||
bind:use_id_li={$events_sess.badges.use_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}
|
||||
@@ -125,14 +125,14 @@
|
||||
|
||||
<!-- 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
|
||||
badge_obj_li={$events_sess.badge_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>
|
||||
<Comp_badge_obj_li
|
||||
badge_obj_li={$events_sess.badge_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}
|
||||
|
||||
@@ -1,79 +1,81 @@
|
||||
<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);
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_badge_obj *** results=`, results);
|
||||
}
|
||||
return results;
|
||||
})
|
||||
);
|
||||
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);
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_badge_obj *** results=`, results);
|
||||
}
|
||||
return results;
|
||||
})
|
||||
);
|
||||
|
||||
// *** Functions and Logic
|
||||
// *** Functions and Logic
|
||||
|
||||
// if (browser) {
|
||||
// console.log('Browser environment detected.');
|
||||
// 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>
|
||||
<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??? -->
|
||||
@@ -81,41 +83,41 @@
|
||||
<!-- 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>
|
||||
>
|
||||
<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} -->
|
||||
<!-- {#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,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
// Page for printing badges
|
||||
// Page for printing badges
|
||||
</script>
|
||||
|
||||
<h1 class="h1">Print Badges</h1>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
// Page for reviewing badges
|
||||
// Page for reviewing badges
|
||||
</script>
|
||||
|
||||
<h1 class="h1">Review Badges</h1>
|
||||
|
||||
@@ -1,126 +1,128 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
// Exports
|
||||
container_class_li?: string | Array<string>;
|
||||
// export let display_mode: string = 'default'; // 'default', 'compact', 'minimal', 'launcher'
|
||||
badge_obj_li?: Array<any>;
|
||||
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'
|
||||
badge_obj_li?: Array<any>;
|
||||
log_lvl?: number;
|
||||
show_sensitive_fields?: boolean;
|
||||
hide_affiliations?: boolean;
|
||||
hide_location?: boolean;
|
||||
hide_badge_type?: boolean;
|
||||
}
|
||||
|
||||
let {
|
||||
container_class_li = [],
|
||||
badge_obj_li = [],
|
||||
log_lvl = $bindable(0),
|
||||
show_sensitive_fields = true,
|
||||
hide_affiliations = false,
|
||||
hide_location = false,
|
||||
hide_badge_type = false
|
||||
}: Props = $props();
|
||||
let {
|
||||
container_class_li = [],
|
||||
badge_obj_li = [],
|
||||
log_lvl = $bindable(0),
|
||||
show_sensitive_fields = true,
|
||||
hide_affiliations = false,
|
||||
hide_location = false,
|
||||
hide_badge_type = false
|
||||
}: Props = $props();
|
||||
|
||||
import { liveQuery } from 'dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
import { liveQuery } from 'dexie';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
|
||||
let trusted_access = $derived(ae_loc.trusted_access);
|
||||
let trusted_access = $derived(ae_loc.trusted_access);
|
||||
|
||||
let lq__event_badge_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
if (badge_obj_li?.length) {
|
||||
const ids = badge_obj_li.map((b) => b.event_badge_id_random);
|
||||
return await db_events.badge.bulkGet(ids);
|
||||
}
|
||||
return [];
|
||||
})
|
||||
);
|
||||
let lq__event_badge_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
if (badge_obj_li?.length) {
|
||||
const ids = badge_obj_li.map((b) => b.event_badge_id_random);
|
||||
return await db_events.badge.bulkGet(ids);
|
||||
}
|
||||
return [];
|
||||
})
|
||||
);
|
||||
</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_random}/badges/${event_badge_obj.event_badge_id_random}`}
|
||||
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_random}`}
|
||||
>
|
||||
<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_random}/badges/${event_badge_obj.event_badge_id_random}`}
|
||||
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_random}`}
|
||||
>
|
||||
<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 trusted_access}
|
||||
<span class="print_count preset-tonal-warning px-1"
|
||||
>{event_badge_obj.print_count}×</span
|
||||
>
|
||||
{/if}
|
||||
{/if}
|
||||
</span>
|
||||
{#if 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>
|
||||
@@ -133,9 +135,9 @@
|
||||
<tr><td class=""></td><td class=""></td></tr>
|
||||
</tbody>
|
||||
</table> -->
|
||||
{:else}
|
||||
<div class="">
|
||||
<p>No results available to show.</p>
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="">
|
||||
<p>No results available to show.</p>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
// Page for badge statistics
|
||||
// Page for badge statistics
|
||||
</script>
|
||||
|
||||
<h1 class="h1">Badge Stats</h1>
|
||||
|
||||
Reference in New Issue
Block a user