fix(idaa, leads): add each-block keys; gate clipboard buttons to manager_access
- Add keyed {#each} to recovery meeting list and exhibit tracking list
to satisfy Svelte's each-block-key lint rule and ensure correct DOM
reconciliation on list updates
- Gate Zoom/Jitsi copy-to-clipboard buttons behind manager_access in
both the recovery meeting list view and single meeting detail view
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
{#each lq__event_exhibit_tracking_obj_li as event_tracking_obj}
|
||||
{#each lq__event_exhibit_tracking_obj_li as event_tracking_obj (event_tracking_obj.event_exhibit_tracking_id)}
|
||||
<a
|
||||
href={`/events/${page.params.event_id}/leads/exhibit/${event_tracking_obj.event_exhibit_id}/lead/${event_tracking_obj.event_exhibit_tracking_id}`}
|
||||
class="card card-hover p-4 variant-filled-surface border-l-4 border-primary-500 flex flex-col md:flex-row gap-4 items-start md:items-center"
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.manager_access}
|
||||
<MyClipboard
|
||||
value={$lq__event_obj?.attend_json?.zoom?.full_url}
|
||||
btn_text="Copy Zoom Link"
|
||||
@@ -207,6 +208,7 @@
|
||||
transition
|
||||
"
|
||||
></MyClipboard>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if $lq__event_obj?.attend_json?.jitsi}
|
||||
<div
|
||||
@@ -243,6 +245,7 @@
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.manager_access}
|
||||
<MyClipboard
|
||||
value={$lq__event_obj?.attend_json?.jitsi?.full_url}
|
||||
btn_text="Copy Jitsi Link"
|
||||
@@ -256,6 +259,7 @@
|
||||
transition
|
||||
"
|
||||
></MyClipboard>
|
||||
{/if}
|
||||
</div>
|
||||
{:else}
|
||||
<div
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
</span>
|
||||
</h2>
|
||||
|
||||
{#each visible_event_obj_li as idaa_event_obj, index}
|
||||
{#each visible_event_obj_li as idaa_event_obj, index (idaa_event_obj?.event_id ?? index)}
|
||||
{#if idaa_event_obj}
|
||||
<!-- NOTE: There is extra logic here to hide items that are hidden/disabled for public users, but still show them to trusted/admin users. This is because the LiveQuery returns all items matching the query, and we need to filter on the client side based on the user's access level. The `visible_event_obj_li` derived store handles this filtering logic, so we can safely render based on that list. -->
|
||||
<div
|
||||
@@ -281,6 +281,7 @@
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.manager_access}
|
||||
<MyClipboard
|
||||
value={idaa_event_obj?.attend_json?.zoom
|
||||
?.full_url}
|
||||
@@ -295,6 +296,7 @@
|
||||
transition
|
||||
"
|
||||
></MyClipboard>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -330,6 +332,7 @@
|
||||
</a>
|
||||
</span>
|
||||
|
||||
{#if $ae_loc.manager_access}
|
||||
<MyClipboard
|
||||
value={idaa_event_obj?.attend_json?.jitsi
|
||||
?.full_url}
|
||||
@@ -344,6 +347,7 @@
|
||||
transition
|
||||
"
|
||||
></MyClipboard>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user