← All articles

AI app guides

Design a staff leave request app with clear date and approval rules

Define full days, partial days, overlapping requests and the manager's decision without inventing HR policy.

Zocri · 2 min read · Sources checked

Start with the approved policy

MDN documents date inputs as representing a calendar date without a time, with display formatting that can vary by locale. That distinction matters when a leave app mixes full days and partial days. Ask the employer to provide the actual rules for eligible leave, working days, holidays and approval. The builder should implement those decisions, not create employment policy from a generic prompt.

Define how a request names its dates. State whether the final date is included and how a half day is represented. If staff work in different locations, identify the relevant calendar and location. Avoid letting a browser's display format decide which day a person meant.

Separate request, approval and balance

A submitted request should have its own state while a manager reviews it. Decide when any balance is reserved or deducted, and what happens when the request is declined or withdrawn. Show the employee the same interpretation that the manager uses to make the decision.

Include the information a manager needs to evaluate coverage, but avoid displaying private reasons broadly to colleagues. A team calendar may need to show availability without exposing supporting notes or documents. Define those views separately rather than making one detailed record visible to everyone.

Handle overlaps and revisions

Specify the response to an overlapping request from the same person. The app might ask them to edit the existing request instead of creating another. Also decide how a date change after approval is handled: a new review may be needed, with the old approval preserved in history.

Test requests across a weekend, holiday and month boundary using the employer's actual examples. Include a partial day and a cancellation after approval. Have the policy owner confirm the expected count before asking the builder to produce it; otherwise a plausible total can conceal a wrong interpretation.

Give payroll or operations a clear handoff

If another system needs approved leave, identify the transfer process and the source of truth. Define which states are included in an export and how corrected approvals are represented. Keep an unapproved request from appearing as a final absence merely because it exists in the app.

Before a pilot, let an employee and manager complete a sample request independently. Check the date display, status and visibility from both roles. Record unresolved policy questions as blockers for those cases, while keeping the scope small enough that staff can understand and operate the finished workflow.

Put it into practice.

Open Zocri →