feat: add Administration section to sidebar with role-gated Member/User nav
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,29 +79,27 @@ export class UserPortalComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
private updatePageTitle(): void {
|
||||
const url = this.router.url;
|
||||
const segments = url.split('/').filter(segment => segment);
|
||||
|
||||
if (segments.length >= 2) {
|
||||
const page = segments[1];
|
||||
this.currentPageTitle = this.getPageTitle(page);
|
||||
} else {
|
||||
this.currentPageTitle = 'Dashboard';
|
||||
}
|
||||
const url = this.router.url;
|
||||
const segments = url.split('/').filter(s => s);
|
||||
const key = segments.length >= 3
|
||||
? `${segments[1]}/${segments[2]}` // e.g. 'admin/members'
|
||||
: segments[1] ?? '';
|
||||
this.currentPageTitle = this.getPageTitle(key);
|
||||
}
|
||||
|
||||
private getPageTitle(page: string): string {
|
||||
const titles: { [key: string]: string } = {
|
||||
'dashboard': 'Dashboard',
|
||||
'transactions': 'Escrow Transactions',
|
||||
'tasks': 'Tasks & Todos',
|
||||
'contacts': 'Contacts',
|
||||
'documents': 'Documents',
|
||||
'messages': 'Messages',
|
||||
'settings': 'Settings'
|
||||
'dashboard': 'Dashboard',
|
||||
'transactions': 'Escrow Transactions',
|
||||
'tasks': 'Tasks & Todos',
|
||||
'contacts': 'Contacts',
|
||||
'documents': 'Documents',
|
||||
'messages': 'Messages',
|
||||
'settings': 'Settings',
|
||||
'admin/members': 'Member Management',
|
||||
'admin/users': 'User Management',
|
||||
};
|
||||
|
||||
return titles[page] || 'Dashboard';
|
||||
return titles[page] ?? 'Dashboard';
|
||||
}
|
||||
|
||||
toggleSidebar(): void {
|
||||
|
||||
Reference in New Issue
Block a user