Dim hidden sessions and presenters in the list

This commit is contained in:
Scott Idem
2024-08-19 14:24:10 -04:00
parent 85138e7b44
commit fefd7c8027
2 changed files with 9 additions and 32 deletions

View File

@@ -171,7 +171,9 @@ onMount(() => {
{#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. -->
<!-- {#if event_presenter_obj.event_presentation_id_random == event_presentation_obj.event_presentation_id_random} -->
<li>
<li
class:dim={event_presenter_obj?.hide}
>
<a
href="/events_pres_mgmt/presenter/{event_presenter_obj.event_presenter_id_random}"
class="btn variant-ghost-primary hover:variant-filled-primary font-bold min-w-64 my-0.5"

View File

@@ -40,6 +40,7 @@ let dq__where_eq_id_val: string = link_to_id;
// Functions and Logic
import { browser } from '$app/environment';
import { hide } from '@floating-ui/dom';
if (browser) {
console.log('Browser environment detected.');
}
@@ -97,6 +98,7 @@ let lq_kv__event_session_obj_li = liveQuery(
{#if event_session_id_random_li && $events_slct.event_session_obj_li?.length == $lq_kv__event_session_obj_li?.length}
<!-- {#if $events_slct.event_session_obj_li?.length == event_session_id_random_li?.length && event_session_id_random_li.length == $lq__event_session_obj_li?.length} -->
<!-- {#if $events_slct?.event_session_obj_li && $events_slct.event_session_obj_li.length > 0} -->
<!-- <section class="ae_h_scrollfix py-2 space-y-2"> -->
<section class="py-2 space-y-2 xs:max-w-sm lg:max-w-100 container overflow-x-scroll">
<h2 class="h3">
@@ -126,7 +128,9 @@ let lq_kv__event_session_obj_li = liveQuery(
<tbody>
<!-- {#each $events_slct?.event_session_obj_li as session_obj} -->
{#each $lq_kv__event_session_obj_li as session_obj}
<tr>
<tr
class:dim={session_obj?.hide}
>
<td>
<a
href="/events_pres_mgmt/session/{session_obj?.event_session_id_random}"
@@ -381,6 +385,7 @@ let lq_kv__event_session_obj_li = liveQuery(
</tbody>
</table>
</section>
{:else}
<p class="text-center text-2xl bg-gray-100 p-4 rounded-md">
<span class="fas fa-exclamation-triangle text-2xl text-yellow-500"></span>
@@ -395,34 +400,4 @@ let lq_kv__event_session_obj_li = liveQuery(
<!-- </div> -->
{/if}
<!-- This is to help correct a bug(?) with Dexie and LiveQuery and Svelte. The LiveQuery value may not be updated if no results are found. This a problem on the very first run. -->
<!-- This needs to be in here so it works correctly with the liveQuery. -->
<!-- {#if $events_slct.event_session_obj_li?.length == $lq__event_session_obj_li?.length} -->
<!-- {#if $events_slct.event_session_obj_li?.length == event_session_id_random_li?.length && event_session_id_random_li.length == $lq__event_session_obj_li?.length} -->
<!-- <div
class="text-sm text-gray-500 text-center"
class:hidden={!$ae_loc.administrator_access}
> -->
<!-- Count: -->
<!-- {event_session_id_random_li.length} -->
<!-- {$lq__event_session_obj_li?.map(event_session_obj => event_session_obj?.event_session_id_random)} -->
<!-- {#if $lq__event_session_obj_li?.length > 0}
<div class="flex flex-row flex-wrap justify-center items-center space-x-2 space-y-2">
{#each $lq__event_session_obj_li as event_session_obj}
<span>
{event_session_obj?.event_session_id_random}
</span>
{/each}
</div>
{:else}
<div class="text-center">
<span class="fas fa-exclamation-triangle text-2xl text-yellow-500"></span>
<span class="text-lg">No results found.</span>
</div>
{/if} -->
<!-- </div>
{:else} -->
<!-- No match -->
<!-- {/if} -->
</section>