1.9 KiB
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
- Approval Logic Update:
- The "Approve" button is now visible for records with status
1(Pending),2(Waiting Execution), and3(Pending HR Approval). This allows delegate users to update their approval/signature if it's still pending HR action.
- The "Approve" button is now visible for records with status
- 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).
- Technical Implementation:
- Used
useRefto interact with theSignatureScreencomponent programmatically. - Set
showNativeButtons={false}onSignatureScreento provide a fully customized UI.
- Used
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.