Bluewoo HRMS

Time-Off Tracking Use Cases

Use cases for leave requests, approvals, balance management, and team calendars

Time-Off Tracking Use Cases

This document describes use cases for submitting and managing time-off requests, approval workflows, balance tracking, and team calendar visibility.

Actors

ActorDescription
EmployeeSubmits leave requests, views own balance
ManagerApproves/rejects requests for direct reports
Tenant AdminConfigures leave policies, views all requests

UC-TO-01: Submit Leave Request

Primary Actor: Employee

Preconditions

  • Employee is authenticated
  • Employee has an active profile
  • Leave types are configured for tenant

Main Flow

  1. Employee navigates to Time-Off → Request Leave
  2. Selects leave type:
    • Vacation
    • Sick Leave
    • Personal Day
    • Other configured types
  3. Selects date range:
    • Start date
    • End date
    • Full day or half day (AM/PM)
  4. Views available balance for selected type
  5. Adds reason/notes (optional or required per policy)
  6. Reviews request summary:
    • Days requested
    • Remaining balance after approval
    • Manager who will approve
  7. Submits request

Alternative Flows

A1: Insufficient Balance

  1. System warns "Insufficient leave balance"
  2. Shows current balance vs requested
  3. Employee can:
    • Reduce requested days
    • Cancel request
    • Submit anyway (if unpaid leave allowed)

A2: Overlapping Existing Leave

  1. System detects overlap with existing approved/pending leave
  2. Displays "You already have leave scheduled for these dates"
  3. Employee must adjust dates

A3: Blackout Period

  1. Requested dates fall in blackout period (e.g., year-end close)
  2. System warns "These dates are restricted"
  3. Requires admin override to proceed

Postconditions

  • Leave request created with status PENDING
  • Manager receives notification (email/in-app)
  • Request appears in employee's request history
  • Balance shows pending deduction

Business Rules

  • Cannot exceed available balance (unless unpaid leave allowed)
  • No overlapping approved leave periods
  • Request requires at least 1 day notice (configurable)
  • Maximum consecutive days per policy

UC-TO-02: Manager Approves/Rejects Leave

Primary Actor: Manager

Preconditions

  • Manager is authenticated
  • Pending leave requests exist for direct reports
  • Manager has approval permission

Main Flow

  1. Manager is notified of pending request (email/dashboard)
  2. Navigates to Time-Off → Pending Approvals
  3. Views list of pending requests with:
    • Employee name
    • Leave type
    • Dates requested
    • Days count
    • Current team coverage
  4. Selects request to review
  5. Views details:
    • Employee's current balance
    • Reason provided
    • Team calendar showing other absences
  6. Decides:
    • Approve: Request approved, balance deducted
    • Reject: Request denied with required comment
  7. Submits decision

Alternative Flows

A1: Team Coverage Conflict

  1. Calendar shows other team members off same days
  2. Manager sees coverage warning
  3. Can still approve with acknowledgment

A2: Own Request

  1. Manager submits own leave request
  2. Request goes to manager's manager (e.g., CTO approves Dev Manager's leave)
  3. Cannot approve own request

A3: Bulk Approval

  1. Multiple pending requests exist
  2. Manager can select multiple and approve all

Postconditions

  • Request status updated to APPROVED or REJECTED
  • If approved, balance deducted from employee
  • Employee notified of decision
  • Calendar updated with approved leave

Key Scenario: Dual-Role Approval Chain

Developer submits leave → Dev Manager approves
Dev Manager submits leave → CTO approves
CTO submits leave → CEO approves

Business Rules

  • Managers can only approve direct reports' requests
  • Cannot approve own requests (goes to own manager)
  • Rejection requires reason comment
  • Approval is final (reversal requires cancellation)

UC-TO-03: View Leave Balance

Primary Actor: Employee

Preconditions

  • Employee is authenticated
  • Leave balances are tracked for employee

Main Flow

  1. Employee navigates to Time-Off → My Balance
  2. Views balance summary for each leave type:
    • Total: Annual allocation
    • Used: Days already taken
    • Pending: Days in pending requests
    • Available: Remaining balance
  3. Views accrual information (if applicable):
    • Monthly accrual rate
    • Next accrual date
    • Carry-over from previous year
  4. Can view history of balance changes

Alternative Flows

A1: Mid-Year Start

  1. Employee started mid-year
  2. Pro-rated balance shown
  3. Full entitlement for next year visible

A2: No Balance Tracking

  1. Leave type has unlimited balance
  2. Shows "Unlimited" instead of numbers

Postconditions

  • Employee understands current leave availability
  • No data is modified (read-only view)

Balance Display Example

┌────────────────────────────────────────┐
│ Leave Balances                         │
├────────────────────────────────────────┤
│ Vacation                               │
│   Total: 20 days | Used: 5 | Pending: 3 │
│   Available: 12 days                    │
├────────────────────────────────────────┤
│ Sick Leave                             │
│   Total: 10 days | Used: 2 | Pending: 0 │
│   Available: 8 days                     │
├────────────────────────────────────────┤
│ Personal Days                          │
│   Total: 3 days | Used: 1 | Pending: 0  │
│   Available: 2 days                     │
└────────────────────────────────────────┘

UC-TO-04: View Team Calendar

Primary Actor: Manager, Tenant Admin

Preconditions

  • Actor is authenticated
  • Has permission to view team calendar
  • Approved time-off exists

Main Flow

  1. Actor navigates to Time-Off → Team Calendar
  2. Views calendar display:
    • Default: Current week/month
    • Toggle: Week, Month, Quarter view
  3. Sees approved time-off for:
    • Direct reports (Manager view)
    • All employees (Admin view)
    • Department filter available
  4. Color-coded by leave type:
    • Blue: Vacation
    • Red: Sick Leave
    • Yellow: Personal
  5. Clicks on leave entry to see details

Alternative Flows

A1: Filter by Department

  1. Actor selects specific department
  2. Calendar filters to show only that department

A2: Conflict Highlighting

  1. Multiple team members off same day
  2. Day is highlighted as potential coverage issue

A3: Export Calendar

  1. Actor exports to ICS format
  2. Can import to personal calendar

Postconditions

  • Actor has visibility into team availability
  • Can plan around approved absences

Calendar View Example

December 2024
Mon   Tue   Wed   Thu   Fri
 2     3     4     5     6
      [John - Vacation───────]
             [Mary - Sick]
 9    10    11    12    13
      [Bob - Vacation]

UC-TO-05: Cancel Pending Request

Primary Actor: Employee

Preconditions

  • Employee is authenticated
  • Employee has pending (not yet approved) request

Main Flow

  1. Employee navigates to Time-Off → My Requests
  2. Views list of requests with status
  3. Selects pending request
  4. Clicks "Cancel Request"
  5. Confirms cancellation
  6. Request is cancelled

Alternative Flows

A1: Approved Request Cancellation

  1. Request is already approved
  2. "Cancel" button shows "Request Cancellation"
  3. Cancellation request goes to manager
  4. Manager must approve cancellation

A2: In-Progress Leave Cancellation

  1. Leave period has already started
  2. System calculates days already taken
  3. Remaining days can be cancelled
  4. Used days remain counted

Postconditions

  • If pending: Request status changed to CANCELLED
  • If approved: Cancellation request created for manager
  • Balance adjusted accordingly
  • Manager notified (if approved leave cancelled)

Business Rules

  • Pending requests can be cancelled directly
  • Approved requests require manager approval to cancel
  • Partial cancellation allowed for approved leave
  • Cancellation reason required for approved leave

UC-TO-06: Manager Views Team Absences

Primary Actor: Manager

Preconditions

  • Manager is authenticated
  • Manager has direct reports

Main Flow

  1. Manager accesses team dashboard
  2. Views "Team Availability" widget:
    • Who is out today
    • Who is out this week
    • Upcoming scheduled absences
  3. Sees coverage summary:
    • Team capacity percentage
    • Conflict warnings (multiple key people out)
  4. Can click to see full team calendar

Alternative Flows

A1: Critical Coverage Gap

  1. More than 50% of team out on same day
  2. Dashboard shows alert
  3. Links to affected requests for potential action

A2: Extended Absence

  1. Team member on extended leave (>2 weeks)
  2. Special indicator for long-term absences
  3. Shows expected return date

Postconditions

  • Manager has quick view of team availability
  • Can proactively address coverage issues

Dashboard Widget Example

┌────────────────────────────────────┐
│ Team Availability                  │
├────────────────────────────────────┤
│ Today (Dec 5)                      │
│ ⚠ 2 of 5 team members out          │
│ • John - Vacation (returns Dec 9)  │
│ • Mary - Sick Leave                │
├────────────────────────────────────┤
│ This Week                          │
│ Dec 6: Full team available         │
│ Dec 7-8: Weekend                   │
├────────────────────────────────────┤
│ Upcoming                           │
│ Dec 15-20: Bob - Vacation          │
└────────────────────────────────────┘

Summary

Use CasePrimary ActorPurpose
UC-TO-01EmployeeSubmit leave request
UC-TO-02ManagerApprove or reject leave requests
UC-TO-03EmployeeView personal leave balance
UC-TO-04Manager, AdminView team calendar with absences
UC-TO-05EmployeeCancel pending or approved leave
UC-TO-06ManagerQuick view of team availability

Leave Request Lifecycle

                    ┌─────────────────┐
                    │    PENDING      │
                    └────────┬────────┘

              ┌──────────────┼──────────────┐
              │              │              │
              ▼              ▼              ▼
       ┌──────────┐   ┌──────────┐   ┌──────────┐
       │ APPROVED │   │ REJECTED │   │CANCELLED │
       └────┬─────┘   └──────────┘   └──────────┘


       ┌──────────┐
       │COMPLETED │ (after leave dates pass)
       └──────────┘

AI Chat Integration

The following time-off use cases can be triggered via AI Chat. See AI Chat Specification for full implementation details.

AI Chat-Enabled Actions

Use CaseAI ToolRequires Confirmation
UC-TO-01timeoff_submitYes
UC-TO-02timeoff_approveYes
UC-TO-03timeoff_check_balanceNo (read-only)
UC-TO-04timeoff_team_calendarNo (read-only)
UC-TO-05timeoff_cancelYes

UC-TO-01: Submit Leave Request via AI Chat

Example prompts:

  • "Submit a vacation request for next Monday"
  • "Request sick leave for today"
  • "Book time off from December 20 to January 2"
  • "I need a personal day on Friday"

AI Chat Flow:

User: "Submit a vacation request for December 20-24"

AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Submit Leave Request                        │
│                                             │
│ Type: Vacation                              │
│ Dates: December 20-24, 2024                 │
│ Days: 5 working days                        │
│                                             │
│ Current Balance: 12 days                    │
│ After Approval: 7 days                      │
│                                             │
│ Approver: Jane Smith (Manager)              │
│                                             │
│ [Cancel]                    [Submit]        │
└─────────────────────────────────────────────┘

User: Clicks [Submit]

AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Leave Request Submitted                │
│                                             │
│ Vacation: Dec 20-24 (5 days)                │
│ Status: Pending approval                    │
│ Jane Smith has been notified                │
│                                             │
│ [View Request]                              │
└─────────────────────────────────────────────┘

UC-TO-02: Approve Leave via AI Chat (Managers)

Example prompts:

  • "Approve John's vacation request"
  • "Reject the leave request from Sarah"
  • "What leave requests need my approval?"

AI Chat Flow:

User: "Approve John's vacation request"

AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Approve Leave Request                       │
│                                             │
│ Employee: John Smith                        │
│ Type: Vacation                              │
│ Dates: Dec 20-24 (5 days)                   │
│                                             │
│ Team Impact:                                │
│ No other team members off these dates       │
│                                             │
│ [Reject]                    [Approve]       │
└─────────────────────────────────────────────┘

User: Clicks [Approve]

AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Leave Approved                         │
│                                             │
│ John Smith's vacation approved              │
│ Dec 20-24 (5 days)                          │
│ John has been notified                      │
│                                             │
│ [View Team Calendar]                        │
└─────────────────────────────────────────────┘

UC-TO-03: Check Balance via AI Chat

Example prompts:

  • "How many vacation days do I have left?"
  • "Check my leave balance"
  • "What's my sick leave balance?"

AI Chat Flow:

User: "How many vacation days do I have?"

AI: Shows Info Card
┌─────────────────────────────────────────────┐
│ Your Leave Balance                          │
│                                             │
│ Vacation                                    │
│ ████████████░░░░░░░░ 12 of 20 days          │
│ Used: 5 | Pending: 3 | Available: 12        │
│                                             │
│ Sick Leave                                  │
│ ████████░░░░░░░░░░░░ 8 of 10 days           │
│ Used: 2 | Available: 8                      │
│                                             │
│ Personal Days                               │
│ ██████░░░░░░░░░░░░░░ 2 of 3 days            │
│ Used: 1 | Available: 2                      │
│                                             │
│ [View Full Details]                         │
└─────────────────────────────────────────────┘

UC-TO-04: View Team Calendar via AI Chat

Example prompts:

  • "Who's out this week?"
  • "Show team calendar for December"
  • "Is anyone on my team off next Monday?"

AI Chat Flow:

User: "Who's out this week?"

AI: Shows Info Card
┌─────────────────────────────────────────────┐
│ Team Availability This Week                 │
│ Dec 2-6, 2024                               │
│                                             │
│ Out Today (Dec 5):                          │
│ - John Smith: Vacation (returns Dec 9)      │
│ - Mary Jones: Sick Leave                    │
│                                             │
│ Rest of Week:                               │
│ Dec 6 (Fri): Full team available            │
│                                             │
│ Team Capacity: 60% (3 of 5 available)       │
│                                             │
│ [View Full Calendar]                        │
└─────────────────────────────────────────────┘

UC-TO-05: Cancel Leave via AI Chat

Example prompts:

  • "Cancel my vacation request"
  • "Withdraw my leave request for next week"

AI Chat Flow:

User: "Cancel my vacation request for next week"

AI: Shows Confirmation Card
┌─────────────────────────────────────────────┐
│ Cancel Leave Request                        │
│                                             │
│ Type: Vacation                              │
│ Dates: Dec 9-13 (5 days)                    │
│ Status: Pending                             │
│                                             │
│ Balance will be restored: 5 days            │
│                                             │
│ [Keep Request]              [Cancel]        │
└─────────────────────────────────────────────┘

User: Clicks [Cancel]

AI: Shows Result Card
┌─────────────────────────────────────────────┐
│ [ok] Request Cancelled                      │
│                                             │
│ Your vacation request has been cancelled    │
│ 5 days restored to your balance             │
│                                             │
│ [View Balance]                              │
└─────────────────────────────────────────────┘

Business Rules for AI Chat Time-Off Actions

RuleDescription
Balance CheckAI validates balance before showing confirmation
Overlap CheckAI warns if dates overlap with existing leave
Manager RoutingAI identifies correct approver based on reporting chain
Self-Approval BlockManagers cannot approve their own requests via AI
Audit TrailAll AI-initiated requests logged with AI actor