Prettier for Event ID
This commit is contained in:
@@ -1,65 +1,67 @@
|
||||
<script lang="ts">
|
||||
import { liveQuery } from 'dexie';
|
||||
import { Wrench, Presentation, Plane, IdCard, Contact } from '@lucide/svelte';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { events_slct } from '$lib/stores/ae_events_stores';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
import { liveQuery } from 'dexie';
|
||||
import { Wrench, Presentation, Plane, IdCard, Contact } from '@lucide/svelte';
|
||||
import { db_events } from '$lib/ae_events/db_events';
|
||||
import { ae_util } from '$lib/ae_utils/ae_utils';
|
||||
import { events_slct } from '$lib/stores/ae_events_stores';
|
||||
import { ae_loc } from '$lib/stores/ae_stores';
|
||||
|
||||
interface Props {
|
||||
data: any;
|
||||
interface Props {
|
||||
data: any;
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
|
||||
let lq__event_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
return await db_events.event.get($events_slct?.event_id ?? '');
|
||||
})
|
||||
);
|
||||
|
||||
const modules = [
|
||||
{
|
||||
name: 'Presentation Management',
|
||||
path: 'pres_mgmt',
|
||||
icon: Presentation,
|
||||
description: 'Manage sessions, presentations, and presenters.',
|
||||
color: 'preset-filled-primary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Launcher',
|
||||
path: 'launcher',
|
||||
icon: Plane,
|
||||
description: 'Launch presentations and manage live session display.',
|
||||
color: 'preset-filled-secondary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Badges',
|
||||
path: 'badges',
|
||||
icon: IdCard,
|
||||
description: 'Manage and print event badges.',
|
||||
color: 'preset-filled-tertiary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Leads',
|
||||
path: 'leads',
|
||||
icon: Contact,
|
||||
description: 'Exhibitor lead retrieval and management.',
|
||||
color: 'preset-filled-success-200-800',
|
||||
access: 'authenticated_access'
|
||||
}
|
||||
let { data }: Props = $props();
|
||||
];
|
||||
|
||||
let lq__event_obj = $derived(
|
||||
liveQuery(async () => {
|
||||
return await db_events.event.get($events_slct?.event_id ?? '');
|
||||
})
|
||||
);
|
||||
|
||||
const modules = [
|
||||
{
|
||||
name: 'Presentation Management',
|
||||
path: 'pres_mgmt',
|
||||
icon: Presentation,
|
||||
description: 'Manage sessions, presentations, and presenters.',
|
||||
color: 'preset-filled-primary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Launcher',
|
||||
path: 'launcher',
|
||||
icon: Plane,
|
||||
description: 'Launch presentations and manage live session display.',
|
||||
color: 'preset-filled-secondary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Badges',
|
||||
path: 'badges',
|
||||
icon: IdCard,
|
||||
description: 'Manage and print event badges.',
|
||||
color: 'preset-filled-tertiary-200-800',
|
||||
access: 'authenticated_access'
|
||||
},
|
||||
{
|
||||
name: 'Leads',
|
||||
path: 'leads',
|
||||
icon: Contact,
|
||||
description: 'Exhibitor lead retrieval and management.',
|
||||
color: 'preset-filled-success-200-800',
|
||||
access: 'authenticated_access'
|
||||
}
|
||||
];
|
||||
|
||||
let filtered_modules = $derived(
|
||||
modules.filter(mod => {
|
||||
if (mod.access === 'authenticated_access') return $ae_loc.authenticated_access;
|
||||
if (mod.access === 'trusted_access') return $ae_loc.trusted_access;
|
||||
if (mod.access === 'administrator_access') return $ae_loc.administrator_access;
|
||||
return true;
|
||||
})
|
||||
);
|
||||
let filtered_modules = $derived(
|
||||
modules.filter((mod) => {
|
||||
if (mod.access === 'authenticated_access')
|
||||
return $ae_loc.authenticated_access;
|
||||
if (mod.access === 'trusted_access') return $ae_loc.trusted_access;
|
||||
if (mod.access === 'administrator_access')
|
||||
return $ae_loc.administrator_access;
|
||||
return true;
|
||||
})
|
||||
);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -68,23 +70,23 @@
|
||||
</title>
|
||||
</svelte:head>
|
||||
|
||||
<div class="container mx-auto p-4 space-y-8">
|
||||
<header class="text-center space-y-2">
|
||||
<div class="container mx-auto space-y-8 p-4">
|
||||
<header class="space-y-2 text-center">
|
||||
<h1 class="text-4xl font-bold">
|
||||
{$lq__event_obj?.name ?? 'Event Hub'}
|
||||
</h1>
|
||||
<p class="text-xl opacity-70">
|
||||
Welcome to the event management dashboard. Please select a module to begin.
|
||||
Welcome to the event management dashboard. Please select a module to
|
||||
begin.
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4">
|
||||
{#each filtered_modules as mod (mod.path)}
|
||||
<a
|
||||
href="/events/{$events_slct.event_id}/{mod.path}"
|
||||
class="card card-hover p-6 flex flex-col items-center text-center space-y-4 transition-transform hover:scale-105 bg-surface-100 dark:bg-surface-800 border border-surface-200 dark:border-surface-700 shadow-lg"
|
||||
>
|
||||
<div class="p-6 rounded-full {mod.color} text-white text-4xl">
|
||||
class="card card-hover bg-surface-100 dark:bg-surface-800 border-surface-200 dark:border-surface-700 flex flex-col items-center space-y-4 border p-6 text-center shadow-lg transition-transform hover:scale-105">
|
||||
<div class="rounded-full p-6 {mod.color} text-4xl text-white">
|
||||
<mod.icon size="2rem" />
|
||||
</div>
|
||||
<h3 class="text-2xl font-bold">{mod.name}</h3>
|
||||
@@ -94,14 +96,20 @@
|
||||
</div>
|
||||
|
||||
{#if $ae_loc.administrator_access && $ae_loc.edit_mode}
|
||||
<section class="card p-6 preset-tonal-warning border-l-4 border-warning-500 mt-12 shadow-lg">
|
||||
<section
|
||||
class="card preset-tonal-warning border-warning-500 mt-12 border-l-4 p-6 shadow-lg">
|
||||
<div class="flex items-center gap-4">
|
||||
<Wrench size="2rem" class="shrink-0" aria-hidden="true" />
|
||||
<div>
|
||||
<h3 class="text-xl font-bold">Event Admin Settings</h3>
|
||||
<p>You have elevated privileges. Use the menu above to access advanced settings and reports.</p>
|
||||
<p>
|
||||
You have elevated privileges. Use the menu above to
|
||||
access advanced settings and reports.
|
||||
</p>
|
||||
</div>
|
||||
<a href="/events/{$events_slct.event_id}/settings" class="btn ae_btn_warning ml-auto">
|
||||
<a
|
||||
href="/events/{$events_slct.event_id}/settings"
|
||||
class="btn ae_btn_warning ml-auto">
|
||||
Event Settings
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user