1.3 KiB
1.3 KiB
Walkthrough - Overtime Delegation History
I have implemented the requested Overtime Delegation History list.
Changes Made
1. New Screen: ListOvertimeDelegation.js
- Fetches history from
POST /api/delegations/overtime/history/employee. - Displays a list of overtime requests with:
- Employee Name and NIK.
- Date and Duration.
- Status with dynamic coloring.
- Details button to show full information in a modal.
- Approve and Reject buttons with confirmation alerts and API integration.
2. Navigation Integration
- Registered
OVERTIME DELEGATIONroute inApp.js. - Exported the new screen from
screens/index.js. - Added an OVERTIME DELEGATION button in
HomeOnlineAttendance.js.
3. API Details
- History API:
POST /api/delegations/overtime/history/employee - Approve API:
POST /api/delegations/overtime/approve(Assumed) - Reject API:
POST /api/delegations/overtime/reject(Assumed)
Verification Results
- The screen follows the premium design pattern of the app.
- All required buttons (Reject, Approve, Details) are implemented.
- The API body matches the user's requirements (nik, dates, and id placeholders).
Note
Please verify the Approve and Reject endpoints with your backend team, as they were implemented based on common naming patterns in this project.