1.9 KiB
1.9 KiB
Walkthrough - New FPTK Approval Screen
I have successfully created the new FPTK Approval screen by copying and adapting the structure from the Leave Approval screen.
Changes Made
1. API Enhancements
Updated employee_request_api.dart to include:
getDataApprovalFPTK(): Fetches FPTK records pending approval.approveFPTK(): Handles approval of FPTK requests.
2. New Approval Page
Created fptk_approval_page.dart. This page features:
- A desktop-optimized table for FPTK requests.
- Mobile-responsive cards for better viewing on smaller screens.
- Direct integration with the
EmployeeRequestPagefor viewing details.
3. Navigation & Routing
- Registered the
/approvals/fptkroute in main.dart. - Added "Employee Request" (FPTK) to the Approvals section in the sidebar within root_layout.dart.
4. Localization
Added the following translation keys to translations.dart:
fptk_approval: "FPTK Approval" / "Persetujuan FPTK"fptk_request_msg: A descriptive message for the approval section.
Verification Results
- The sidebar now contains the "Employee Request" item under "Approvals".
- Navigating to the new screen displays the FPTK Approval interface.
- Clicking the "eye" icon correctly opens the detailed FPTK form in view mode.