update marketing
All checks were successful
All checks were successful
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Walkthrough - Attendance Delegation Fixes
|
||||
|
||||
I have completed the fixes for the attendance delegation module. These changes ensure that the mobile application can correctly fetch and display the attendance delegation history for employees.
|
||||
|
||||
## Changes Made
|
||||
|
||||
### Backend (ess_api)
|
||||
|
||||
#### [delegation-routes.js](file:///home/itc43/Documents/HOKBEN_PROJECT/ESS%20PROJECT/ess_api/ess_api/app/routes/delegation-routes.js)
|
||||
- Corrected the handler references for `/api/delegations/attendance/history/employee` and `/api/delegations/attendance/history/employeedelegate`.
|
||||
- They now correctly point to `delegationAttendanceServices.getAttendanceDelegationHistoryEmployee`.
|
||||
|
||||
#### [delegation-attendance-services.js](file:///home/itc43/Documents/HOKBEN_PROJECT/ESS%20PROJECT/ess_api/ess_api/app/services/delegation-attendance-services.js)
|
||||
- Fixed a typo in `getAttendanceDelegationHistory` where it was querying a non-existent `status_approval` column. It now correctly uses `status`.
|
||||
- Updated `getAttendanceDelegationHistoryEmployee` to include status `6` (Rejected) in the results. This allows employees to see their rejected delegation requests in the mobile app.
|
||||
|
||||
## Verification Results
|
||||
|
||||
- Verified that all route handlers are now valid function references.
|
||||
- Verified that the SQL queries in the service layer are consistent with the database schema (using `status` instead of `status_approval`).
|
||||
- The mobile app should now be able to fetch data from `/api/delegations/attendance/history/employeedelegate` without encountering "Internal Server Error" or empty results due to incorrect filtering.
|
||||
Reference in New Issue
Block a user