fix: add missing each-block keys (svelte/require-each-key)
Fixed all 27 remaining instances across 19 files. Keys used: - Object ID fields where available (e.g. account_id_random, event_file_id) - index for logger lists with no reliable unique key - Property name for Object.entries() loops
This commit is contained in:
@@ -12,9 +12,9 @@
|
||||
let qry_str = $state('');
|
||||
|
||||
let filtered_li = $derived(
|
||||
qry_str
|
||||
? site_li.filter(s =>
|
||||
s.name?.toLowerCase().includes(qry_str.toLowerCase()) ||
|
||||
qry_str
|
||||
? site_li.filter(s =>
|
||||
s.name?.toLowerCase().includes(qry_str.toLowerCase()) ||
|
||||
s.code?.toLowerCase().includes(qry_str.toLowerCase())
|
||||
)
|
||||
: site_li
|
||||
@@ -42,7 +42,7 @@
|
||||
if (!name) return;
|
||||
|
||||
const code = prompt('Enter site code (optional):');
|
||||
|
||||
|
||||
const new_site = await create_ae_obj__site({
|
||||
api_cfg: $ae_api,
|
||||
account_id: $ae_loc.account_id,
|
||||
@@ -84,11 +84,11 @@
|
||||
<div class="flex items-center justify-center px-4 bg-surface-300-600-token border-r border-surface-500/20">
|
||||
<Search size={18} class="opacity-50" />
|
||||
</div>
|
||||
<input
|
||||
<input
|
||||
class="bg-transparent border-0 ring-0 focus:ring-0 p-3 grow placeholder:opacity-50"
|
||||
type="search"
|
||||
bind:value={qry_str}
|
||||
placeholder="Search by name or code..."
|
||||
type="search"
|
||||
bind:value={qry_str}
|
||||
placeholder="Search by name or code..."
|
||||
/>
|
||||
<button class="variant-filled-primary font-bold px-10 py-3 hover:brightness-110 transition-all border-l border-surface-500/20 flex items-center justify-center min-w-[100px]" onclick={load_sites} disabled={loading}>
|
||||
{#if loading}
|
||||
@@ -141,7 +141,7 @@
|
||||
</h3>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
{#each filtered_li as site}
|
||||
{#each filtered_li as site (site.site_id_random)}
|
||||
<div class="card p-5 space-y-4 variant-soft-surface shadow-md border border-surface-500/10 hover:border-primary-500/30 transition-all group relative">
|
||||
<div class="absolute top-4 right-4 flex gap-1">
|
||||
{#if site.hide}
|
||||
@@ -161,7 +161,7 @@
|
||||
<p class="text-[10px] uppercase font-bold opacity-50 font-mono tracking-tighter">Code: {site.code || '--'}</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
<div class="space-y-2 text-xs opacity-70">
|
||||
<div class="flex items-center gap-2 bg-black/5 p-2 rounded-lg">
|
||||
<Calendar size={14} class="text-primary-500 shrink-0" />
|
||||
|
||||
Reference in New Issue
Block a user