2.2 KiB
2.2 KiB
Overtime Delegation History Enhancements
Successfully enhanced the Online Overtime History section with interactive features and detailed tracking.
Changes Made
Premium Interactive Maps
- Premium UI: Added a blurred backdrop (
BackdropFilter) and smooth scale/fade animations for a high-end feel. - Enhanced Controls:
- Custom zoom in/out buttons with modern styling.
- Added a Recenter button to quickly snap back to the original location.
- Animated map marker for better visual feedback.
- Full Interaction: Tapping any mini-map opens the large popup with full pan/zoom capabilities.
Status Timeline
- Implemented a detailed vertical timeline for each history item.
- The timeline covers the entire delegation lifecycle:
- Delegation (Submitted)
- Approval Delegate
- Execution Delegation
- Approval Atasan 1
- Approval Atasan 2
- Approval Staff HR
- Done
- Smart Logic:
- Completed steps are marked with a red check icon.
- Current/Pending steps are marked with an animated-style pulse icon.
- Future steps are greyed out.
- Rejection Handling: If a delegation is rejected (status 6), the timeline clearly marks the rejection with a red 'X' and displays the rejection comment.
Cancel Delegation
- Added a Cancel Delegation button to history items that are in the "Pending Approval" state.
- Rejection Dialog: Tapping the button opens a dialog where the user must provide a reason for cancellation.
- API Integration:
- Calls
rejectOvertimewhich triggers theCancelbyApprovalendpoint. - Sends the rejection reason and the current user's NIK as the rejector.
- Calls
- Real-time Feedback: Upon successful cancellation, the list automatically refreshes, and the status changes to "Cancelled/Rejected" in the timeline.
Verification Results
UI Components
- Map dialog opens and closes correctly.
- Zoom controls on the map popup are functional.
- Timeline steps are aligned and visually distinct.
- Timeline correctly reflects "Approved" (Done) and "Rejected" states.
Logic
- Fallback logic handles cases where specific step data might be missing by inferring from the overall status.