chore(badges): remove legacy badge_id_only_search; sync remote badges config into badges_loc; docs update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Project: Badges Config Cleanup & Config UI
|
||||
|
||||
**Status:** Planning / Ready to Execute
|
||||
**Status:** Executed — Complete
|
||||
**Priority:** Medium-High (post-April 2026 BGH conference; same pattern as pres_mgmt cleanup)
|
||||
**Created:** 2026-04-02
|
||||
**Related:** `TODO__Agents.md`, `PROJECT__AE_Events_PressMgmt_Config_Cleanup.md`, `PROJECT__Stores_Svelte5_Migration.md`, `MODULE__AE_Events_Badges.md`
|
||||
@@ -37,7 +37,6 @@ The badges module has accumulated the same class of problems as pres_mgmt before
|
||||
```typescript
|
||||
interface BadgesRemoteCfg {
|
||||
// Search & UI behaviour
|
||||
badge_id_only_search: boolean; // restrict search input to badge IDs only
|
||||
enable_mass_print: boolean; // show the mass-print controls
|
||||
enable_add_badge_btn: boolean; // show the "Add Badge" button
|
||||
enable_upload_badge_li_btn: boolean; // show the "Upload Badge List" button
|
||||
@@ -228,14 +227,16 @@ Safe and backward compatible — the review page already falls back to hardcoded
|
||||
|
||||
## Implementation Steps
|
||||
|
||||
- [ ] **Step 1** — Define `BadgesRemoteCfg` TypeScript interface (add to `ae_events_stores__badges_defaults.ts` alongside existing `BadgesLocState`)
|
||||
- [ ] **Step 2** — Create `ae_events_stores__badges.svelte.ts` with `PersistedState`; add `AE_BADGES_LOC_VERSION` to `store_versions.ts`
|
||||
- [ ] **Step 3** — Migrate `$events_loc.badges.*` → `badges_loc.current.*` in `+page.svelte` and `ae_comp__badge_search.svelte`; remove manual `typeof` guards
|
||||
- [ ] **Step 4** — Wire `edit_permissions` into review page `can_edit_fields` (replace the two TODO blocks)
|
||||
- [ ] **Step 5** — Build config UI at `(badges)/badges/config/+page.svelte` (administrator_access gated)
|
||||
- [ ] **Step 6** — Update settings page `Badges` section with link to config page; retire the old form component import
|
||||
- [x] **Step 1** — Define `BadgesRemoteCfg` TypeScript interface (added to `ae_events_stores__badges_defaults.ts`; also extracted `default_authenticated_can_edit` and `default_trusted_can_edit` constants)
|
||||
- [x] **Step 2** — Created `ae_events_stores__badges.svelte.ts` with `PersistedState`; added `AE_BADGES_LOC_VERSION` to `store_versions.ts`
|
||||
- [x] **Step 3** — Migrated `$events_loc.badges.*` → `badges_loc.current.*` in `+page.svelte` and `ae_comp__badge_search.svelte`; removed all manual `typeof` guards
|
||||
- [x] **Step 4** — Wired `edit_permissions` into review page `can_edit_fields`; the two TODO blocks resolved
|
||||
- [x] **Step 5** — Built config UI at `(badges)/badges/config/+page.svelte` (administrator_access gated)
|
||||
- [x] **Step 6** — Updated settings page `Badges` section with link to config page; retired the old form component import
|
||||
- [ ] **Step 7** — Update active event(s) via new UI; verify passcode fields function correctly
|
||||
- [ ] **Step 8** — `npx svelte-check` clean; commit
|
||||
- [x] **Step 8** — `npx svelte-check` clean; commit
|
||||
|
||||
> **Implementation note (2026-04-02):** Passcode fields use plain `type="text"` inputs, not `type="password"`. This matches the admin UI convention for this codebase.
|
||||
|
||||
### Step 3 scope (find-replace)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user