Merge branch 'workstream-m' - Admin panel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 18:26:28 +08:00
13 changed files with 1853 additions and 4 deletions

View File

@@ -2363,14 +2363,24 @@ _Depends on: J1-J6, C3_
- Reusable components: `$lib/components/org/role-badge.svelte`, `confirm-dialog.svelte`
- Sidebar updated with "Organizations" nav item
#### Workstream M: Admin Pages (Frontend)
#### Workstream M: Admin Pages (Frontend)
_Depends on: K1-K5, C3_
_Can run parallel to L_
- [ ] **M1**: Create `/admin` dashboard page
- [ ] **M2**: Create `/admin/orgs` pages (list, new, details)
- [ ] **M3**: Create `/admin/users` pages (list, details)
- [x] **M1**: Create `/admin` dashboard page
- [x] **M2**: Create `/admin/orgs` pages (list, new, details)
- [x] **M3**: Create `/admin/users` pages (list, details)
**Implementation notes:**
- Admin layout at `/routes/admin/+layout.svelte` provides superuser access control
- Redirects non-superusers to `/dashboard` with toast error
- Admin dashboard shows org/user counts with quick action links
- Org management: list all orgs, create new with owner email, view/edit details, manage sites
- User management: list all users, view details, toggle superuser status, confirm email
- Sidebar shows admin link (shield icon) only for superusers
- Reusable component: `$lib/components/admin/superuser-badge.svelte`
- All destructive actions use ConfirmDialog
---