Files
hr-portal/app/frontend/components/layout/Topbar.tsx
T
TenX PM 87e9346d62 feat: complete HR portal full-stack application
- NestJS backend with 11 modules: Auth, Employees, Departments, Attendance, Leaves, Payroll, Reimbursements, Announcements, Tax, Reports, Admin
- JWT authentication with refresh tokens, role-based access (employee/hr_admin/super_admin)
- MongoDB schemas with Mongoose for all entities
- PDF payslip generation with pdfkit
- OpenTelemetry tracing to SigNoz
- Automatic database seeding on first startup
- Next.js 14 frontend with App Router, Tailwind CSS
- 25 pages covering all employee, HR admin, and super admin workflows
- Multi-stage Dockerfile with nginx proxy
- test-manifest.json for E2E testing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 19:32:52 +00:00

28 lines
895 B
TypeScript

'use client';
import { useAuth } from '@/lib/auth-context';
interface TopbarProps {
title: string;
}
export default function Topbar({ title }: TopbarProps) {
const { user } = useAuth();
return (
<header className="bg-white border-b border-gray-200 px-6 py-4 flex items-center justify-between">
<h1 className="text-xl font-semibold text-gray-800">{title}</h1>
<div className="flex items-center gap-3">
<div className="text-right">
<p className="text-sm font-medium text-gray-800">
{user?.firstName} {user?.lastName}
</p>
<p className="text-xs text-gray-500">{user?.email}</p>
</div>
<div className="w-9 h-9 bg-indigo-600 rounded-full flex items-center justify-center text-white font-semibold text-sm">
{user?.firstName?.[0]}{user?.lastName?.[0]}
</div>
</div>
</header>
);
}