This tutorial will guide you through integrating ProcFu with Tape to create a simple HRMS application. The ProcFu app will allow staff members to log in, view their leave records, and request new leave.
Step 1: Setting Up Tables in Tape
- Employee Table - Contains employee details. This will be used for authentication.
- Absences and Leaves Table - Stores leave records, with a relation tying each leave record back to an employee.
Step 2: Setting Up Authentication in ProcFu
- In ProcFu, select the Employee table for authentication.
- Use the Name field as the username and the Password field for login credentials.
Step 3: Index Screen - Viewing Leave Records
Once logged in, users are directed to the index screen where they can see all their leave records. A Request Leave button allows users to submit new leave requests.
Step 4: Requesting Leave
- Clicking the Request Leave button opens a form.
- Upon submission, a new record is created in Tape.
- Default values set:
status = "New"
- The employee field is auto-filled to the logged-in user using:
form_values["relation"] = custom_tokens.user
Step 5: Viewing and Editing Leave Records
Clicking on a leave entry opens the View Screen. The Edit button appears conditionally:
- If
status = "New"
, the user can edit. - Once a manager approves or deletes the request, editing is disabled.
Step 6: Editing Leave Requests
If editing is allowed, the user can update the leave details. This demonstrates how to create conditional access and workflows within ProcFu.
Expanding Functionality
This example showcases how ProcFu enables controlled two-way data communication with Tape. With more advanced logic, we can implement:
- Manager approvals
- Notifications and alerts
- More complex access controls
In future tutorials, I’ll explore more powerful capabilities of ProcFu and Tape integration.