OSGF Leave Calculator preview

OSGF Leave Calculator: HR Workflow Automation

The OSGF Leave Calculator is a modern, responsive application designed to automate the complex process of calculating public service leave in Nigeria. Built as a Progressive Web App (PWA), it ensures accuracy, removes manual errors, and saves countless hours across HR workflows.

Background

During my time in the Office of the Secretary to the Government of the Federation (OSGF), I worked in the Leave Matters unit of HRM. Every year, over 2,000+ leave applications are processed. Staff previously had to manually count days on calendars—especially error-prone around festive seasons when applications surge.

Key operational challenges:

  • Counting leave days sometimes included weekends or holidays by mistake
  • Public holidays vary annually, and external APIs often include irrelevant dates
  • Grade-level rules (e.g., GL 06 = 21 days, GL 07+ = 30 days) are easy to mishandle manually
  • Resumption dates must strictly fall on working days

This calculator automates these rules to deliver accurate, compliant results.

OSGF Leave Calculator interface

Features

  • Accurate leave counting that excludes weekends and Nigerian public holidays
  • Multiple leave types: Annual/Vacation, Maternity (112 working days), Casual, Study, Sick, Sabbatical
  • Public holiday management with local overrides and persistence
  • Responsive, offline-first PWA with local storage
  • Simple UI with real-time expiration/resumption results

Core Logic

  1. Start from the selected leave start date
  2. Count only weekdays, skipping Saturdays, Sundays, and public holidays
  3. Stop when the required number of working days is reached
  4. Set the leave expiration date
  5. Compute the resumption date as the first valid working day after expiration

Tech Stack

  • React + TypeScript
  • Vite
  • Tailwind CSS + shadcn/ui
  • Zustand
  • date-fns
  • Superbase

Impact

  • Reduced HR errors in calculating resumption dates
  • Faster processing of leave applications during peak seasons
  • Future-proof design via public holiday overrides

Live Project

Visit the website: OSGF Leave Calculator

Note: GitHub link is currently private/unlisted. Replace githubUrl when ready. Update the date field if you prefer a different timeline label.