You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Application Overview
## 1. Dashboard
The **Dashboard** displays a summary of your leave balance, upcoming holidays, and your team's upcoming leaves. It provides a quick view of your leave status and helps track team availability for better planning.
## 2. Applying for Leave
When applying for leave, I have implemented validation on both the **frontend** and **backend** to ensure that the total leave days are calculated correctly, excluding weekends. The backend API does not accept the total days from the frontend but instead calculates it internally and updates the database accordingly. Additionally, the backend API only returns the leave types specific to **male** and **female** employees based on their eligibility.
## 3. My Teams Tab
In the **"My Teams"** tab, there are two sections:
### I. Leaves Tab
This section displays all approved leave requests. It also includes a **"Details"** button for viewing more information about each employee's leave request.
### II. Requests Tab
This section contains all **pending**, **cancelled**, and **rejected** leave requests.
## 4. Approving/Rejecting Employee Leave Requests
When a manager approves or rejects an employee's leave request, a **dialog box** will appear displaying the employee's details, including their total available leaves, pending leaves, and the specific leave type for which the request was made. This information helps the manager make an informed decision on whether to approve or reject the request.
## 5. Employee Leave Request
When an employee applies for a leave request, the system calls the **EmployeeLeaveSummary API**, which provides a list of the employee's leave summaries, including the leave type, available leaves, and pending leaves. This data is displayed in the leave type selection bar, allowing the employee to view how many leaves are available for each specific leave type before submitting their request.
## 6. Exception Handling
I have handled all exceptions and implemented multiple **catch blocks** in the controllers, ensuring that a specific message and status code are returned for each particular exception.
## 7. Singleton Pattern
I have implemented the **singleton pattern** for repositories, ensuring that only a single instance of the repository is created, even when multiple client requests are made. This helps optimize resource usage and improve performance.
## 8. Response Handling
After converting the response into **JSON** format, I delete the custom POJO objects by assigning them to `null`, allowing the **garbage collector** to free up memory by removing them.
## 9. Client Response Handler
I have implemented a **ClientResponseHandler** in the `util` package to handle sending responses to the client. This functionality is reusable across all servlets, and I have used it within the `finally` block to ensure that the client receives a response, regardless of whether the outcome is successful or an error.
## 10. Session Management
I maintain user sessions using both **cookies** and **HttpSession**, ensuring consistent session management and user authentication throughout the application. I have also implemented an **authentication filter** in my application to manage and enforce authentication requirements effectively.
## 11. Data Transfer Objects (DTOs)
I have written **Data Transfer Objects (DTOs)** to handle requests that need specific data, ensuring that only the necessary information is transferred and processed.
## 12. Login and Logout Servlets
I have implemented both a **login servlet** and a **logout servlet**. Upon login, a random cookie value is created, added to the response, and stored in the database. During logout, the cookie is deleted to ensure proper session management and security.
1. Dashboard

2. My Leaves Tab - Leaves Section

3. When Applies for the leave which has more than the current current leave type limit

4. The Details Dialog Box For My Leaves

5. When applying for the leave, showing available and used leaves on every leave type on specific employee

6. My Team - Leaves Summary, Showing My Team Employee leave summary - available and used leaves on every leave type

7. Approving a leave request, shows employee leave specific details

8. On Rejecting a Leave Request Also Shows Employee Leave Summary

9. My Team - Leaves Section - shows employee APPROVED, CANCELLED, REJECTED Leave requests

10. Filter Tab for My team - Leaves section which can shows leave requests based on STATUS

11. On Clicking the Employee Profile icon or profile name, Employee basic details will come

# LeaveManagementAppSpring
# LeaveManagementAppSpring
# LeaveManagementAppSpring