Saving notes and todo updates

This commit is contained in:
Scott Idem
2026-01-06 15:51:19 -05:00
parent 0e93514262
commit 076ac1e662
2 changed files with 19 additions and 23 deletions

View File

@@ -223,28 +223,23 @@ The activity logging functionality is now working as expected. While the origina
- **Search Logic Construction:** When building complex V3 `search_query` objects, avoid including empty `and` or `or` arrays, as some backend parsers may strictly validate their presence or content. Only attach these properties if they contain at least one filter.
- **Backend Operator Support:** Always verify supported operators (`like`, `eq`, `gt`, etc.) in the backend FastAPI implementation. Using unsupported operators like `ilike` or `contains` will cause immediate backend `ValueError` crashes.
### Session Learnings (2026-01-06)
### Session Learnings (2026-01-06 - Evening)
**Context:** Migrated core modules (Accounts, Sites, Persons, Users, Activity Logs) and Event Badges to Aether API CRUD V3. Scaffolded the initial Core Management UI.
**Context:** Restructured core management into linkable routes, implemented User linking, and built the User Detail page.
**Key Accomplishments:**
- **Full Core Module V3 Migration:** Implemented V3 CRUD logic for `Account`, `Site`, `Site Domain`, `Person`, `User`, and `Activity Log`. Standardized on the "API -> Processor -> DB Save" pattern.
- **Whitelist Implementation:** Created `editable_fields` files for all migrated modules to ensure only permitted fields are sent in POST/PATCH requests.
- **Database Schema Update:** Expanded the `ae_core_db` (Dexie) schema to include `account`, `site`, `site_domain`, and `user` tables, enabling local caching for these core objects.
- **Management UI Scaffolding:**
- Modernized `/core` dashboard with navigation cards and Lucide icons.
- Built list and detail pages for Accounts and Sites (including domain management).
- Built a User list and search page.
- Created a view-only System Lookups page for Countries and Time Zones.
- **SQL Schema Alignment:** Renamed `domain` property to `fqdn` in the Site Domain module to match the backend SQL schema provided in exports.
- **Badge V3 Completion:** Finished the V3 migration for Event Badges (Create, Update, Delete).
- **Route Restructuring:** Renamed `/core/person` to `/core/people` and ensured all management sub-pages are directly linkable standard `<a>` tags.
- **Common Layout Navigation:** Implemented a unified `<nav>` menu in `src/routes/core/+layout.svelte` for quick switching between core modules.
- **User Linking Logic:** Added functionality to the Person detail page to browse unlinked User accounts and establish/break links between `Person` and `User` records.
- **User Detail Page:** Built `/core/users/[user_id]` with full permission management (Super, Manager, Admin toggles) and account status controls.
- **Bug Fixes:** Resolved 500 errors related to broken import paths after directory renaming and refined layout data requirements.
**Key Learnings:**
- **FQDN vs Domain:** Backend consistency is paramount. The discovery of the `fqdn` field name in the SQL export necessitated a quick refactor of the Site Domain interface and UI.
- **V3 Search Complexity:** V3 search is explicit. When using `search_ae_obj_v3`, filters like `enabled` and `hidden` must be explicitly added to the `search_query` object if they are to be applied, unlike the legacy list endpoints which often defaulted them.
- **Standardized UI Components:** Using Lucide icons and Skeleton's card/table components significantly improved the management dashboard's look and feel while maintaining a consistent design language.
- **Svelte 5 & Dexie Reactivity:** Using `$derived` with `liveQuery` (e.g., `$derived(liveQuery(() => db.table.bulkGet(ids)))`) is the correct way to maintain a reactive list of objects in Svelte 5 when the ID list is dynamic.
- **Standard Links vs goto():** Favoring standard `<a>` tags over programmatic navigation with `goto()` is essential for power-user features like "Open in New Tab" and copying links, especially in management interfaces.
- **Manager Access Pattern:** Standardized on `if (!$ae_loc.manager_access) { goto('/core'); }` for protecting sensitive management routes on the frontend.
**Next Steps:**
- **User Detail Page:** Implement `/core/users/[user_id]` for detailed user management.
- **Person Linking:** Add logic to link/unlink Persons and Users in the UI.
- **Authentication:** Standardize JWT handling in V3 wrappers once the backend fix is confirmed.
- **Person Detail Improvement:** Implement a dedicated edit form for Person records (currently using inline CRUD).
- **Lookup Refinement:** Add specific detail views or search for lookups if necessary.
- **Addresses & Contacts:** Begin scaffolding UI for these core objects.

11
TODO.md
View File

@@ -65,18 +65,19 @@ This is a list of tasks to be completed before the next event/show/conference.
### 4. Person Management
- [ ] **Enhance:** Improve the existing person management components under `/core/person`.
- [ ] **Enhance:** Improve the existing person management components under `/core/people`.
- [ ] **UI:**
- [ ] Create a dedicated page for creating new person records.
- [ ] Add search and filtering capabilities to the person list.
- [x] Implement searchable person list (`Comp_person_search`).
- [ ] Create a dedicated page/form for creating and editing person records.
- [x] Implement User-Person linking UI in the detail page.
### 5. User Management
- [x] **Route:** Create a new route at `/core/users`.
- [x] **UI:**
- [x] Create a `+page.svelte` to list all users.
- [ ] Create a `[user_id]` dynamic route to view and edit user details, including permissions.
- [ ] Implement a component to link users to person records.
- [x] Create a `[user_id]` dynamic route to view and edit user details, including permissions.
- [x] Implement logic to link users to person records.
### 6. Shared Lookup Lists