HR-App is a simple and interactive web application designed to manage employees, departments, and job roles efficiently. The app provides a user-friendly interface to view, update, and manage employee details dynamically.
-
EmployeeCard Component:
- Displays each employee’s name, role, location and start date.
-
EmployeeList Component:
- Renders multiple EmployeeCard components by passing employee details as props.
-
Promotion & Demotion Functionality:
- Employees can be promoted or demoted through buttons, following a predefined hierarchy:
- Intern → Junior Developer → Developer → Senior Developer → Lead Developer.
- Employees can be promoted or demoted through buttons, following a predefined hierarchy:
-
State Management:
- Employee roles are managed dynamically using React state.
-
Employee Data Management:
- Backend data:
name: Full name of the employee.role: Job role.location: Office location.startDate: Date of joining.department
- Backend data:
-
Dynamic Employee List:
- Renders the employee list as individual cards displaying:
- Name
- Role
- Location
- Start Date
- Department
- Years Worked (calculated dynamically)
- Renders the employee list as individual cards displaying:
-
Log In Functionality:
- Added a "Log In" button that toggles between:
- Employee list view (default when logged in).
- A login message when logged out.
- Added a "Log In" button that toggles between:
-
Years Worked Calculation:
- Uses JavaScript’s
Dateobject to dynamically calculate and display years worked.
- Uses JavaScript’s
-
Anniversary & Probation Reminders:
- Displays a "Happy Anniversary!" message if the current date matches an employee’s start date.
- Shows a probation reminder for employees with less than 1 year of experience.
-
Props Destructuring:
- Improved readability and maintainability by destructuring props in all components.
-
Reusable Button Component:
- Created a customizable Button component with support for:
labelonClickcolor
- Ensures consistency in UI and follows Material-UI styling standards.
- Created a customizable Button component with support for:
-
Editable Employee Details:
- Added an "Edit" button to EmployeeCard to allow users to:
- Change an employee's role.
- Update the department.
- Modify location.
- Added an "Edit" button to EmployeeCard to allow users to:
-
Dynamic Department-Based Styling:
- Employee cards visually adapt based on department assignments.
- Uses a mapping object to define styles per department, enhancing user experience.
Live Demo: hr-app
- Vite + React
- TypeScript
- Material UI
-
Clone the repository:
git clone https://github.com/your-repository/hr-app.git
-
Navigate to the project folder:
cd hr-app -
Install dependencies:
npm install
-
Run the application:
npm start