docs(leads): document Leads store migration and payment UI fix; note tests update

This commit is contained in:
Scott Idem
2026-04-03 17:33:23 -04:00
parent 7f79c1857a
commit a952c5ddbe
23 changed files with 1557 additions and 108 deletions

View File

@@ -0,0 +1,21 @@
/**
* ae_events_stores__leads.svelte.ts
*
* Svelte 5 PersistedState store for the Exhibitor Leads module local config.
* Replaces the `events_loc.leads` sub-object from the Svelte 4 persisted store.
*
* localStorage key: 'ae_leads_loc'
* Version gate: AE_LEADS_LOC_VERSION in store_versions.ts
*
* Session state (non-persisted) stays in `events_sess.leads` — same pattern as
* pres_mgmt and badges.
*
* Usage:
* import { leads_loc } from '$lib/stores/ae_events_stores__leads.svelte';
* leads_loc.current.auth_exhibit_kv // read
* leads_loc.current.tab[exhibit_id] = 'list' // write
*/
import { PersistedState } from 'runed';
import { leads_loc_defaults } from './ae_events_stores__leads_defaults';
export const leads_loc = new PersistedState('ae_leads_loc', leads_loc_defaults);

View File

@@ -19,6 +19,7 @@ export interface LeadsLocState {
show_hidden: boolean;
show_not_enabled: boolean;
refresh_interval__tracking_li: number;
refresh_interval_sec: number; // Auto-refresh interval for the lead list (seconds)
search_version: number;
qry__remote_first: boolean;
qry__search_text: string;
@@ -95,6 +96,7 @@ export const leads_loc_defaults: LeadsLocState = {
show_not_enabled: false,
refresh_interval__tracking_li: 30000, // 30 seconds.
refresh_interval_sec: 25, // Auto-refresh interval for the lead list (seconds, default 25).
// Standardized Search Pattern 2026-01-28
search_version: 0,

View File

@@ -35,6 +35,7 @@ export const AE_EVENTS_LOC_VERSION = 1;
export const AE_IDAA_LOC_VERSION = 1; // Added 2026-03-30: was missing, no wipe mechanism existed
export const AE_PRES_MGMT_LOC_VERSION = 1; // Added 2026-04-02: new standalone PersistedState store
export const AE_BADGES_LOC_VERSION = 1; // Added 2026-04-02: promoted from events_loc.badges
export const AE_LEADS_LOC_VERSION = 1; // Added 2026-04-03: promoted from events_loc.leads
// Version check side-effect: runs on import, before any persisted() call.
// Guard presence of `localStorage` and its functions for safety (SSR, Node flags).
@@ -46,6 +47,7 @@ if (
_check_and_wipe('ae_loc', AE_LOC_VERSION);
_check_and_wipe('ae_events_loc', AE_EVENTS_LOC_VERSION);
_check_and_wipe('ae_idaa_loc', AE_IDAA_LOC_VERSION);
_check_and_wipe('ae_leads_loc', AE_LEADS_LOC_VERSION);
// ae_pres_mgmt_loc uses PersistedState (runed) which stores raw JSON without a __version
// field. The _check_and_wipe mechanism requires __version in the stored data — do NOT
// add it here until pres_mgmt_loc_defaults includes __version. For now the key is new