feat: show tenancy scope (Org → Chapter) in chapter & member portals
Surface where the logged-in user sits in the hierarchy via a ScopeCard in the sidebar, below the brand mark. API: - Enrich chapter login/me responses with tenantName + organization (LoginResponse.admin, AdminProfile types updated) - Add GET /my/scope returning member's chapter + organization Web: - ScopeCard component (Organisation row + Chapter row, themed icons) - Chapter portal: scope from auth context, blue accent - Member portal: scope fetched server-side in layout, emerald accent - PortalShell gains a `scope` slot rendered under the brand Org and admin portals intentionally omit it — org IS the scope, admin is platform-wide. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,12 @@ export interface LoginRequest {
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface ScopeOrganization {
|
||||
id: string;
|
||||
slug: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface LoginResponse {
|
||||
token: string;
|
||||
admin: {
|
||||
@@ -48,6 +54,8 @@ export interface LoginResponse {
|
||||
role: AdminRole;
|
||||
tenantId: string;
|
||||
tenantSlug: string;
|
||||
tenantName: string;
|
||||
organization: ScopeOrganization | null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -66,4 +74,6 @@ export interface AdminProfile {
|
||||
role: AdminRole;
|
||||
tenantId: string;
|
||||
tenantSlug: string;
|
||||
tenantName: string;
|
||||
organization: ScopeOrganization | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user