Fixed bug where trusted_access value changes were not working.
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
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); // This does NOT work with Svelte v5
|
||||
// let trusted_access = $ae_loc?.trusted_access; // This works with Svelte v5
|
||||
|
||||
let lq__event_badge_obj_li = $derived(
|
||||
liveQuery(async () => {
|
||||
@@ -53,14 +54,14 @@
|
||||
|
||||
<ul class="list-disc list-inside">
|
||||
{#each $lq__event_badge_obj_li as event_badge_obj (event_badge_obj.event_badge_id_random)}
|
||||
{#if !event_badge_obj.hide || trusted_access}
|
||||
{#if !event_badge_obj.hide || $ae_loc.trusted_access}
|
||||
<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
|
||||
"
|
||||
>
|
||||
{#if event_badge_obj.print_count < 1 || trusted_access}
|
||||
{#if event_badge_obj.print_count < 1 || $ae_loc.trusted_access}
|
||||
<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"
|
||||
@@ -75,7 +76,7 @@
|
||||
{#if event_badge_obj.print_count >= 1}
|
||||
<!-- Show a green checkmark -->
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
|
||||
|
||||
<span class="print_count px-1"
|
||||
>{event_badge_obj.print_count}×</span
|
||||
> {/if}
|
||||
@@ -107,7 +108,7 @@
|
||||
{#if event_badge_obj.print_count >= 1}
|
||||
<!-- Show a green checkmark -->
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
|
||||
|
||||
<span class="print_count px-1"
|
||||
>{event_badge_obj.print_count}×</span
|
||||
> {/if}
|
||||
@@ -131,7 +132,7 @@
|
||||
-
|
||||
<span class="min-w-fit">
|
||||
<span class="fas fa-envelope"></span>
|
||||
{#if trusted_access}
|
||||
{#if $ae_loc.trusted_access}
|
||||
{event_badge_obj.email}
|
||||
{:else}
|
||||
{event_badge_obj.email
|
||||
@@ -153,7 +154,7 @@
|
||||
<span class="italic">{event_badge_obj?.badge_type}</span>
|
||||
{/if}
|
||||
|
||||
{#if trusted_access}
|
||||
{#if $ae_loc.trusted_access}
|
||||
<a
|
||||
href={`/events/${event_badge_obj.event_id}/badges/${event_badge_obj.event_badge_id}#review`}
|
||||
class="btn btn-sm variant-soft-primary">Review</a
|
||||
|
||||
Reference in New Issue
Block a user