feat: leads re-enable flow — detect removed leads on scan + Remove/Restore buttons

- QR scanner (single + multi): detect previously-removed leads via IDB enable flag;
  route to 'reenable' state instead of duplicate error; offer Re-activate button
- API fallback: if create fails and no IDB record, search API for disabled tracking
  record by event_exhibit_id + event_badge_id (adds qry_badge_id param to
  search__exhibit_tracking)
- Lead detail page: Replace raw enable checkbox with Remove Lead (two-click confirm,
  navigates back after) and Restore Lead card (shown when enable is falsy)
- Fix flash of disabled records in leads list: filter !enable in both filtered_lead_li
  derived and local IDB fast-path in handle_search_refresh
- eslint.config.js: disable svelte/no-navigation-without-resolve (no base path configured)
- Also includes _random field annotation cleanup (db_events, ae_types), iframe layout
  fixes, badge view tweaks, test updates, and doc updates from prior session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-20 18:18:10 -04:00
parent 4586e809d7
commit 6662e82f40
18 changed files with 505 additions and 266 deletions

View File

@@ -378,7 +378,7 @@
<!-- *** badge_front section start *** -->
<section
class="badge_front badge_type__{effective_badge_type_code.toLowerCase()}
flex flex-col gap-1
flex flex-col gap-0
items-stretch justify-between
min-h-[6.0in]
max-h-[6.0in]
@@ -394,12 +394,12 @@
>
<span
class="
print:hidden absolute top-1 left-4
text-xs italic
text-gray-500 group-hover:text-red-800
transition-all
"
>
print:hidden absolute top-1 left-4
text-xs italic
text-gray-500 group-hover:text-red-800
transition-all
"
>
{#if show_badge_back}Front of badge{:else}Badge preview{/if}
</span>
@@ -443,7 +443,8 @@
<div
class="badge_body
grow
max-h-[4in] m-0 p-0
m-0 p-0
px-1
overflow-clip
flex flex-col gap-1
items-stretch justify-between
@@ -578,7 +579,7 @@
{:then result}
{#if result}
<img
class="qr_code mecard_qr w-[0.75in] max-w-[0.75in]"
class="qr_code w-[1.10in] max-w-[1.10in] m-0 p-0"
src={result}
alt="Badge QR code"
/>
@@ -597,6 +598,7 @@
max-w-full
m-0 p-0
overflow-hidden
border-t-2 border-blue-500/75
flex flex-row gap-1 items-center justify-center
hover:outline-2 hover:outline-dashed hover:outline-gray-500/75
"