Files
kulakpos_web/walkthroughs/2026-05-05_42e8a19d_Overtime_Delegation_History_Enhancements.md
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

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:
    1. Delegation (Submitted)
    2. Approval Delegate
    3. Execution Delegation
    4. Approval Atasan 1
    5. Approval Atasan 2
    6. Approval Staff HR
    7. 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 rejectOvertime which triggers the CancelbyApproval endpoint.
    • Sends the rejection reason and the current user's NIK as the rejector.
  • 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.