Dual-Approval Workflow
The dual-approval workflow is the backbone of accountability in NEO. It makes sure that no single person can sign off on a worker's attendance by themselves -- two independent approvals are always required.
Why Dual Approval?
Construction sites deal with some common headaches:
- Workers claiming hours they did not actually work
- Managers inflating attendance numbers for certain workers
- Arguments over who was actually on site and for how long
The dual-approval system tackles these problems by requiring both the site manager and a company admin to give their approval before any attendance record counts toward payment.
The Flow
Step 1: Worker Submits Verification
The worker checks in (arrival) or checks out (departure) at the construction site using their NIC or Employee ID. This creates a verification submission that lands in the pending manager review state.
The submission includes:
- Which project they are reporting to
- Their identifier (NIC or Employee ID)
- The time they are claiming (arrival or departure)
- Optional photo evidence
- A server-recorded timestamp in Sri Lanka timezone -- the server captures the time, not the client, so nobody can manipulate the clock
The submission gets blocked if:
- The project has an approved stoppage on that date
- The worker already has attendance on a different project for the same day
- A duplicate submission of the same type (arrival or departure) already exists and is either pending or approved
- They are trying to submit a departure without having submitted an arrival first
Step 2: Manager Reviews
The project manager sees pending submissions in their review queue. For each one, they can:
- Approve -- The manager confirms the worker was there. The submission moves to the admin's review queue. The system also checks for cross-project attendance conflicts before letting the approval go through.
- Reject -- The manager denies the claim and provides a mandatory reason. However, the manager's rejection is not the end of the road -- the submission still moves to the admin's queue with the rejection reason attached. The admin gets the final say and can override the manager's rejection if they see fit.
The system keeps track of which manager made the call and when.
Step 3: Admin Final Approval
Submissions waiting for the admin's decision show up in their queue. This includes both manager-approved and manager-rejected submissions. The admin can:
- Approve -- This is the final green light. The submission moves to the approved state, and the system immediately creates an attendance record (more on that below).
- Override a manager rejection -- The admin can approve something the manager rejected, effectively overruling the manager's decision.
- Reject -- The admin turns it down. The submission is marked as rejected by admin, which is final -- the worker would need to submit again. A rejection reason is required.
The system records which admin made the decision and when.
Step 4: Attendance Created
When the admin approves a submission, the system immediately creates or updates an attendance record:
If only the arrival (or only the departure) has been approved so far:
- A new attendance record is created in the checked-in state
- It is marked as incomplete
- Only the available time (arrival or departure) is filled in
- If the date is in the past, it automatically gets flagged as backdated
When the other half of the submission is later approved (completing the record):
- The existing attendance record is updated with the second time
- Hours are calculated automatically (regular versus overtime)
- The record moves to the verified state
- The reviewer and review timestamp are recorded
- The record is now eligible to be included in payment calculations
The attendance record is linked back to the verification submissions for a complete audit trail.
Verification Submission Statuses
| Status | Description |
|---|---|
| Pending Manager | Waiting for the manager's first-level review |
| Pending Admin | Waiting for the admin's final decision (includes both manager-approved and manager-rejected submissions) |
| Approved | The admin approved it; an attendance record has been created |
| Rejected by Manager | The manager rejected it (in the current flow, rejections still go to the admin for the final call) |
| Rejected by Admin | The admin rejected the submission (this is final) |
Pairing Arrival and Departure
The system handles arrival and departure as separate submissions:
- A worker checks in (arrival submission) and later checks out (departure submission)
- Each submission goes through the dual-approval workflow on its own
- When the admin approves the first submission (whichever comes first), an attendance record is created immediately in the checked-in state (incomplete)
- When the admin approves the second submission (completing the pair), the attendance record is updated to verified with the hours calculated
- If only one submission ever gets approved, the attendance stays incomplete and gets flagged for review
Cross-Project Protection
The system makes sure a worker cannot be marked as present on two different projects on the same day. This check happens at every step:
- When the worker submits (blocked if attendance exists on another project)
- When the manager approves (blocked if a cross-project conflict is found)
- When the admin approves (blocked if a cross-project conflict is found)
Notifications
The system sends out notifications at key moments:
- The manager gets notified when a new verification comes in
- The admin gets notified when a manager approves or rejects a verification
- Everyone involved gets notified about the admin's decisions
Bypassing Dual Approval
In some situations, the standard dual-approval flow is modified:
- Manager direct entry -- When a manager directly marks attendance (today only), the record is created in a pending review state and still needs admin verification before it counts toward payment
- Admin direct entry -- Records created by the admin start in a pending review state (or go straight to verified if the admin explicitly verifies them right away). Even admin entries go through a review step.
These alternative paths are tracked in the audit trail so it is always clear who created what and how.