Implement Workstream L: Org Pages (Frontend)

Add organization management UI pages:
- /dashboard: Org list with grid cards
- /dashboard/[slug]: Org overview with stats and previews
- /dashboard/[slug]/members: Member management with invites
- /dashboard/[slug]/settings: Org settings, leave, delete
- /invite/accept: Token-based invite acceptance flow

Includes shared org context layout for role detection, reusable
components (role-badge, confirm-dialog), and sidebar nav update.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 17:44:42 +08:00
parent a66511a80d
commit 41b52750d8
12 changed files with 1713 additions and 6 deletions

View File

@@ -2345,15 +2345,23 @@ _Implementation notes:_
- Race conditions prevented via transaction-scoped existence checks
- Self-demotion guard in `adminUsersUpdate` prevents superusers from removing their own status
#### Workstream L: Org Pages (Frontend)
#### Workstream L: Org Pages (Frontend)
_Depends on: J1-J6, C3_
- [ ] **L1**: Create `/dashboard` page (org list)
- [ ] **L2**: Create `/dashboard/[org]` page (org overview)
- [ ] **L3**: Create `/dashboard/[org]/members` page
- [ ] **L4**: Create `/dashboard/[org]/settings` page
- [ ] **L5**: Create org invite accept flow
- [x] **L1**: Create `/dashboard` page (org list)
- [x] **L2**: Create `/dashboard/[slug]` page (org overview)
- [x] **L3**: Create `/dashboard/[slug]/members` page
- [x] **L4**: Create `/dashboard/[slug]/settings` page
- [x] **L5**: Create `/invite/accept` page (org invite accept flow)
**Implementation notes:**
- Route param uses `[slug]` to match API contract
- Shared org context via `+layout.svelte` provides role detection (owner/admin/member)
- Role-based UI: owners can manage roles, admins can invite/remove, members view-only
- Confirmation dialogs for destructive actions (remove member, cancel invite, leave/delete org)
- Reusable components: `$lib/components/org/role-badge.svelte`, `confirm-dialog.svelte`
- Sidebar updated with "Organizations" nav item
#### Workstream M: Admin Pages (Frontend)