1.7 KiB
1.7 KiB
Overtime Data Mapping Update Walkthrough
I have updated the mapping logic in overtime_history_page.dart to correctly handle the new JSON response format provided.
Changes Made
1. Overtime Data Mapping Update
- Field Mapping: Updated
overtime_history_page.dartto use new keys:id,tgl,starttime,endtime,total_waktu,whattodo, etc. - ISO8601 Support: Added specialized parsing for ISO8601 time strings (e.g.,
2025-09-29T18:00:00.000Z) with local time conversion. - Robustness: Improved date/time formatting with better null safety and placeholder handling.
2. Subordinate Directory API Integration
- New
DirectoryApi: Createdlib/api/directory/directory_api.dartto handle fetching subordinate details via thegetdatadetailsbawahanendpoint. - Live UI: Updated
DirectoryPageto replace placeholder data with real-time employee information. - Enhanced Card Design:
- NIK Badge: Added a stylized NIK identifier for each employee.
- Device Visibility: Integrated a new row showing the employee's model and brand (e.g., "samsung Galaxy A32").
- Active Status: Implemented a green/grey status indicator for the
isactiveflag.
- Details Dialog: Created a comprehensive "View Profile" dialog that displays full employee information, including NIK, Email, Location, Full Device Details, and Status, with a professional UI.
Verification Results
- Field Mapping: Verified fields:
nik,nama,lokasi,device_name,brand,isactive, andposisi. - UI Responsiveness: Confirmed the directory grid and details dialog are responsive and visually consistent.
- Code Quality: Resolved lint errors related to invalid widget parameters in the details dialog.