Give me a admin dashboard page which manages employees HR information and work-hours It should use react version 19
Major functions would be following: 1.employees total list
Sample data of entities would be like following: Employee : { "name": "string", "email": "string", "department": "string", "position": "string", "is_admin": false, "id": 0, "joined_at": "2025-06-18", "penalty_start": "2025-06-18T05:49:08.561Z" }
Work-record: { "employee_id": 0, "work_date": "2025-06-18", "start_time": "2025-06-18T05:51:05.250Z", "end_time": "2025-06-18T05:51:05.250Z", "work_hours": 0, "description": "string", "id": 0 }
Alarm : { "id" : 0, "email" : "string", "msg" : "string" , "date" : "2025-06-18T05:51:05.250Z" }
I'll create a comprehensive admin dashboard for managing employee HR information and work hours using React 19. This will include all the major functions you've specified with a modern, responsive design.
I've created a comprehensive HR Admin Dashboard with all the requested functionality using React 19 and Next.js. Here's what I've built:
The application is structured to easily integrate with your backend APIs:
GET /employees/
- Employee listGET /employees/{id}
- Employee detailsPOST/PUT/DELETE /employees/
- Employee CRUDGET/POST/PUT/DELETE /work-records/
- Work records CRUDThe dashboard provides a complete admin interface for managing HR operations with an intuitive, modern design that scales well across devices.
Sources
You're absolutely right! The issue is that the subdirectory pages aren't being properly routed in Next.js App Router. Let me fix the routing structure and make all the pages work together properly.
Perfect! I've fixed the routing structure and made all the pages work together properly. Here's what I've done:
page.tsx
files are properly structured in their respective directoriesAll pages are now accessible via their routes:
/dashboard
- Main dashboard/dashboard/employees
- Employee management/dashboard/work-records
- Work records management/dashboard/alarms
- Alarm historyusePathname
hook to track current routeloading.tsx
files that weren't being used/dashboard
) - Shows overview with statistics and recent activities/dashboard/employees
) - Full CRUD operations for employee management/dashboard/work-records
) - Work hour tracking with charts and statistics/dashboard/alarms
) - Complete alarm history with filtering and categorizationThe dashboard is now fully functional with all pages working together seamlessly. You can navigate between different sections using the sidebar, and each page maintains its own state and functionality while sharing the common layout and design system.