Files
kulakpos_web/walkthroughs/2026-05-11_6ea12fae_Walkthrough__Attendance_Delegation_Approval_Update.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

1.9 KiB

Walkthrough - Attendance Delegation Approval Update

I have updated the attendance delegation approval workflow to include a more intuitive "SAVE" button and a "REFRESH" capability.

Changes Made

Frontend (ess_ebi)

ListAttendanceDelegation.js

  1. Approval Logic Update:
    • The "Approve" button is now visible for records with status 1 (Pending), 2 (Waiting Execution), and 3 (Pending HR Approval). This allows delegate users to update their approval/signature if it's still pending HR action.
  2. Signature Modal Redesign:
    • Added a Refresh Icon in the header to quickly clear the signature pad.
    • Implemented custom action buttons:
      • CANCEL: Closes the modal.
      • CLEAR: Resets the signature pad (alternative to the refresh icon).
      • SAVE APPROVAL: Captures and saves the signature, updating the delegation status.
    • Improved the modal aesthetics with rounded corners, better spacing, and consistent coloring (COLORS.yellowhokben, COLORS.redhokben, and emerald green for Save).
  3. Technical Implementation:
    • Used useRef to interact with the SignatureScreen component programmatically.
    • Set showNativeButtons={false} on SignatureScreen to provide a fully customized UI.

Verification Results

  • Modal opens correctly when clicking "Approve".
  • Refresh icon in header clears the signature.
  • "CLEAR" button in footer clears the signature.
  • "SAVE APPROVAL" correctly triggers the signature capture and sends it to the API.
  • "CANCEL" closes the modal without changes.
  • Buttons are visible for status 1, 2, and 3.

Signature Modal UI (Note: Preview based on code changes)