Internal HR & Workflow Automation

Staff Management System — Hierarchical Leave Management with Automated Email Approvals

Role-Based Organizational Hierarchy · Automated Leave Calculations · Email-Based Approval Workflow

Laravel jQuery MySQL Email Automation
Client
Denish Nathan
Product Type
Internal Staff & Leave Management System
Team Managed
~100 Staff, 4-Tier Hierarchy
Engagement
Lead Developer

Executive Summary

A company with roughly 100 staff needed to replace ad hoc leave tracking with a proper internal system — one that could enforce their organizational hierarchy, calculate leave balances correctly under local labor law, and keep approvals moving without anyone chasing emails.

We built a complete staff and leave management system with a four-tier role hierarchy, a formula-based leave calculation engine, and an automated email approval workflow — including the ability to approve or reject a request directly from the notification email.

Business Problem

Leave management touches labor law compliance, payroll, and staff morale all at once — getting the rules or the approval chain wrong causes real problems.

No enforced approval hierarchy

Leave requests had no consistent path to the right approver, and there was no fallback when a manager was unavailable or slow to respond.

Leave balances were calculated by hand

Balances depended on a formula tied to company policy and local labor law — done manually, it was slow and error-prone.

No visibility for the admin team

The Admin had no reliable way to see pending requests across the organization or step in when something stalled.

Approvals required logging into the system

Managers and directors had to log in just to approve a routine request, which slowed down a process that should take seconds.

Solution Overview

We built the system around the company's actual reporting structure, with leave logic and notifications automated end to end.

Four roles, each with a clear scope

Admin — Full system access — can view, override, and manually adjust any employee's leave balance
Director — Administrative authority for their reporting line, acting on the Admin's behalf
Manager — Approves or escalates leave requests for their direct reports
Employee — Submits leave requests and tracks their own balance and history

Key Features Delivered

1 Hierarchical Role & Permission System

Four-tier organizational hierarchy — Admin → Directors → Managers → Employees, mirroring the company's actual reporting lines
Scoped visibility by role — Each role sees only the requests and records relevant to their position in the hierarchy
Manual balance overrides — The Admin can increase or decrease any employee's leave balance directly from the admin panel when needed

2 Automated Leave Calculation Engine

Formula-based balance calculation — Leave accrual and balances are calculated on the backend using a formula built around company policy and local labor law
Consistent, policy-compliant results — Every employee's balance is calculated the same way, removing manual error from the process

3 Email-Based Approval Workflow

Flow

Request Submitted
Notify Approver + Admin
Approve or Reject
Escalate if No Response
One-click approve or reject — Managers and directors can approve or reject a request directly from the notification email, with no login required
Automatic escalation — If the responsible Manager or Director doesn't act within the required window, the request automatically escalates to the Admin
Full notification trail — The Admin is copied on every request, so nothing moves through the system unseen

Operational Improvements

Leave approvals happen in minutes, not days

One-click email approvals mean managers no longer have to log in just to act on a routine request.

Nothing gets stuck waiting on one person

Automatic escalation means a slow or unavailable manager no longer blocks an employee's request.

Leave balances are always correct

The formula-based engine removes manual calculation from a process tied directly to labor law compliance.

The Admin has full oversight without micromanaging

Every request, approval, and escalation is visible to the Admin, without needing to be the one who processes each request.

Technical Approach

Hierarchy Enforced in the Permission Layer

Role scope (Admin/Director/Manager/Employee) is enforced in the application's permission layer, so a Manager can never see or act on requests outside their reporting line.

Actionable Email Notifications

Approve/reject actions are handled through secure, single-use links embedded in the notification email — no separate login flow needed for a routine decision.

Time-Based Escalation Logic

A scheduled job checks pending requests against their response window and automatically escalates any that have gone unanswered, so nothing is silently missed.

Need Role-Based Workflows Done Right?

If you need a hierarchy, automated approvals, and formula-based logic built correctly the first time, book a free 30-minute partner call.

Book a 30-Min Discovery Call

What Was Built

Role Hierarchy & Permissions
Admin, Director, Manager, Employee
Leave Calculation Engine
Formula-based, policy-compliant
Email Approval Workflow
One-click approve/reject, no login
Escalation & Notifications
Automatic, time-based

Project Notes

Built as part of an early engagement, now part of our team's track record
You own the system and the code
Reference available on LinkedIn upon request

Related Case Studies

Have a Project That Needs Custom Software? Let's Talk.

Book a free 30-minute partner call. We'll tell you honestly whether we can help and what it would take to deliver.

Book a 30-Min Discovery Call

No pitch. No sales call. Just an honest conversation about your project.

Book a 30-Min Discovery Call