chore: minor updates across events, journals, elements, and shared components
Miscellaneous small changes to events (badges, launcher, leads, pres_mgmt, settings), journals, reusable elements (crud, field editor), app components, core components, and test README. Mostly 1-2 line changes per file.
This commit is contained in:
@@ -240,7 +240,7 @@
|
||||
<div
|
||||
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 w-full max-w-6xl"
|
||||
>
|
||||
{#each $lq__event_exhibit_obj_li as exhibit_obj}
|
||||
{#each $lq__event_exhibit_obj_li as exhibit_obj (exhibit_obj.event_exhibit_id)}
|
||||
<a
|
||||
href="/events/{page.params
|
||||
.event_id}/leads/exhibit/{exhibit_obj.event_exhibit_id}"
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
|
||||
<div class="space-y-3">
|
||||
{#each questions as q, i}
|
||||
{#each questions as q, i (i)}
|
||||
<div class="card p-4 variant-soft border border-surface-500/10 space-y-3 animate-in fade-in slide-in-from-right-2">
|
||||
<!-- Question header row: number + delete (always visible for mobile) -->
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
|
||||
<div class="space-y-3">
|
||||
{#each local_license_li as license, i}
|
||||
{#each local_license_li as license, i (i)}
|
||||
<div class="card p-4 variant-soft border border-surface-500/10 space-y-3 relative group animate-in fade-in slide-in-from-right-2">
|
||||
<button
|
||||
class="absolute top-2 right-2 p-2 text-error-500 opacity-0 group-hover:opacity-100 transition-opacity"
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
{#if !$ae_loc.administrator_access}
|
||||
<option value="my">My Leads</option>
|
||||
{/if}
|
||||
{#each licensee_li as l}
|
||||
{#each licensee_li as l (l.email)}
|
||||
<option value={l.email}>{l.full_name || l.email}</option>
|
||||
{/each}
|
||||
</select>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
{#if results.length > 0}
|
||||
<div class="results-list space-y-2 max-h-[50vh] overflow-y-auto pr-2">
|
||||
{#each results as badge}
|
||||
{#each results as badge (badge.event_badge_id_random ?? badge.event_badge_id)}
|
||||
{@const badge_id = badge.event_badge_id_random || badge.event_badge_id}
|
||||
{@const existing_id = $existing_leads_map?.get(badge_id) ?? (last_added_badge_id === badge_id ? last_added_tracking_id : '')}
|
||||
<div class="card p-3 flex justify-between items-center variant-soft shadow-sm">
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
{@const responses = typeof $lq__lead_obj.responses_json === 'string' ? JSON.parse($lq__lead_obj.responses_json) : $lq__lead_obj.responses_json}
|
||||
{#if Object.keys(responses).length > 0}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 animate-in fade-in">
|
||||
{#each Object.entries(responses) as [question, answer]}
|
||||
{#each Object.entries(responses) as [question, answer] (question)}
|
||||
{@const display_value = (answer !== null && typeof answer === 'object') ? (answer as any).response ?? '' : String(answer ?? '')}
|
||||
<div class="p-3 bg-surface-500/5 rounded-lg border border-surface-500/10">
|
||||
<div class="text-[10px] uppercase font-black opacity-40 tracking-widest mb-1 leading-tight">{question}</div>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<div class="lead-detail-form space-y-6">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
|
||||
{#each question_defs as q}
|
||||
{#each question_defs as q (q_key(q))}
|
||||
{@const key = q_key(q)}
|
||||
{@const display = q.question || q.label || key}
|
||||
<div class="space-y-2">
|
||||
@@ -130,13 +130,13 @@
|
||||
class="select variant-filled-surface rounded-lg p-3 text-sm"
|
||||
>
|
||||
{#if Array.isArray(q.option_li)}
|
||||
{#each q.option_li as opt}
|
||||
{#each q.option_li as opt (opt)}
|
||||
<option value={opt}>{opt || '-- Select --'}</option>
|
||||
{/each}
|
||||
{:else}
|
||||
<!-- Legacy: options was a comma-separated string -->
|
||||
<option value="">-- Select Option --</option>
|
||||
{#each (q.options || '').split(',').map((o: string) => o.trim()) as opt}
|
||||
{#each (q.options || '').split(',').map((o: string) => o.trim()) as opt (opt)}
|
||||
<option value={opt}>{opt}</option>
|
||||
{/each}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user