Remediated test #1 results
This commit is contained in:
@@ -80,8 +80,12 @@ export const AppLayout: React.FC = () => {
|
||||
});
|
||||
|
||||
// Ensure current logged-in user is registered in the email cache
|
||||
if (sub && (user?.email || claims.email)) {
|
||||
registerUserEmail(sub, ((user?.email || claims.email) as string));
|
||||
const effectiveEmail = ((user?.email || claims?.email || claims?.['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress'] || claims?.upn) as string);
|
||||
if (sub && effectiveEmail) {
|
||||
registerUserEmail(sub, effectiveEmail);
|
||||
}
|
||||
if (user?.id && effectiveEmail) {
|
||||
registerUserEmail(user.id, effectiveEmail);
|
||||
}
|
||||
|
||||
// Extract name and email directly from validated token claims
|
||||
@@ -148,31 +152,20 @@ export const AppLayout: React.FC = () => {
|
||||
{navItems.map((item) => {
|
||||
const Icon = item.icon;
|
||||
return (
|
||||
<div key={item.path} className="flex items-center justify-between group">
|
||||
<NavLink
|
||||
to={item.path}
|
||||
className={({ isActive }) =>
|
||||
`flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-xs font-medium transition-all flex-1 min-w-0 ${
|
||||
isActive
|
||||
? 'bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-md shadow-blue-600/25 font-semibold'
|
||||
: 'text-slate-400 hover:text-slate-100 hover:bg-slate-800/60'
|
||||
}`
|
||||
}
|
||||
>
|
||||
<Icon className="w-4 h-4 shrink-0" />
|
||||
{sidebarOpen && <span className="truncate">{item.name}</span>}
|
||||
</NavLink>
|
||||
{sidebarOpen && (
|
||||
<div className="pl-1">
|
||||
<HelpTooltip
|
||||
title={item.name}
|
||||
content={item.help}
|
||||
size="sm"
|
||||
placement="right"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<NavLink
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
className={({ isActive }) =>
|
||||
`flex items-center gap-3 px-3.5 py-2.5 rounded-xl text-xs font-medium transition-all min-w-0 ${
|
||||
isActive
|
||||
? 'bg-gradient-to-r from-blue-600 to-indigo-600 text-white shadow-md shadow-blue-600/25 font-semibold'
|
||||
: 'text-slate-400 hover:text-slate-100 hover:bg-slate-800/60'
|
||||
}`
|
||||
}
|
||||
>
|
||||
<Icon className="w-4 h-4 shrink-0" />
|
||||
{sidebarOpen && <span className="truncate">{item.name}</span>}
|
||||
</NavLink>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
@@ -210,21 +203,6 @@ export const AppLayout: React.FC = () => {
|
||||
{/* Top Header */}
|
||||
<header className="h-16 bg-[#0d121f]/90 border-b border-slate-800/80 backdrop-blur-md px-4 sm:px-6 md:px-8 flex items-center justify-between shrink-0 z-20">
|
||||
<div className="flex items-center gap-3">
|
||||
{/* Brand Icon */}
|
||||
<Link
|
||||
to="/"
|
||||
id="header-brand-logo-link"
|
||||
className="flex items-center gap-2 group cursor-pointer"
|
||||
title="PFM Console Home"
|
||||
>
|
||||
<BrandLogo size={28} showGlow={false} animateOnHover />
|
||||
<span className="font-bold text-xs tracking-tight text-white hidden md:inline-block group-hover:text-blue-400 transition">
|
||||
PFM
|
||||
</span>
|
||||
</Link>
|
||||
|
||||
<span className="h-4 w-px bg-slate-800 hidden md:block" />
|
||||
|
||||
{/* Home Navigation */}
|
||||
<Link
|
||||
to="/"
|
||||
|
||||
Reference in New Issue
Block a user