> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invaro.org/llms.txt
> Use this file to discover all available pages before exploring further.

# LOA Management

> Submit and manage Leave of Absence requests for your staff team

LOA Management is a full leave tracking system for your staff team. Members can request time off, management can approve or deny requests, and active leaves are tracked automatically. The system posts Discord notifications at each status change and optionally assigns an on-leave role while a staff member is away.

<Info>
  LOA Management requires an **Invaro+** or **Invaro+ Boost** plan.
</Info>

***

## How LOA Requests Work

An LOA moves through several statuses automatically:

| Status       | Meaning                                                            |
| ------------ | ------------------------------------------------------------------ |
| **Pending**  | Submitted, awaiting management review                              |
| **Approved** | Reviewed and approved — the start date hasn't arrived yet          |
| **Active**   | The start date has passed — the staff member is currently on leave |
| **Extended** | Active LOA with an extended end date                               |
| **Denied**   | Rejected during review                                             |
| **Ended**    | Finished naturally or ended early by management                    |

***

## Submitting Your Own LOA

Click **Request LOA** in the top-right corner. Fill in your reason, start date, and end date. The modal shows how many days are being requested. Click **Submit Request** to send it for review.

***

## Creating an LOA for a Member

Users with `CanCreate` can submit LOA requests on behalf of another staff member without that member needing to do it themselves.

<Steps>
  <Step title="Click Create for Member">
    Click the **Create for Member** button next to Request LOA.
  </Step>

  <Step title="Search for the staff member">
    Type a username in the search box. Members are loaded from your Team Directory. Select the member from the results.
  </Step>

  <Step title="Fill in the details">
    Enter a reason, start date, and end date for the LOA.
  </Step>

  <Step title="Create">
    Click **Create LOA**. The request is created as if the staff member submitted it themselves.
  </Step>
</Steps>

***

## Reviewing Requests

Pending requests show **Approve** and **Deny** buttons on their card (visible to users with `CanManage`). Clicking either button opens a confirmation modal where you can optionally leave a review note.

Active and approved LOAs show **Extend** and **End** buttons:

* **Extend** — opens a modal to set a new end date (must be after the current end) and an optional extension reason.
* **End** — ends the LOA immediately, before the scheduled end date. An optional note can be left explaining why.

***

## Stats Strip

Three stat cards appear at the top of the page:

* **Pending Review** — number of requests awaiting action
* **Currently on LOA** — staff members with active or extended status right now
* **Total Requests** — all-time request count

***

## Filtering and Search

Use the status filter pills (All, Pending, Approved, Active, Extended, Denied, Ended) to narrow the list. Use the search bar to filter by username or reason text. The Pending pill shows a count badge when there are requests awaiting review.

Pagination controls appear at the bottom when there are more than 20 requests.

***

## LOA Settings

Click **Settings** (visible to users with `CanManage`) to open the LOA Settings page.

### Post to Channel

Select the Discord channel where LOA notifications are posted. All status change messages go here unless overridden per message template.

### On-Leave Role

Select a Discord role that is automatically assigned when an LOA becomes active and removed when it ends.

### DM on Status Change

When enabled, the staff member who submitted the request receives a direct message whenever their LOA status changes (approved, denied, active, extended, or ended).

### Message Templates

Six notification templates correspond to each status transition: New Request, Approved, Denied, Active, Extended, and Ended.

For each template you can:

* Toggle whether to **send as rich embed** or plain text
* Set an optional **channel override** to post that specific message to a different channel
* Configure the **message content** (plain text, optionally shown above the embed)
* Build the **embed** using the full embed builder with all LOA variables

#### LOA Variables

| Variable            | Output                                                    |
| ------------------- | --------------------------------------------------------- |
| `{username}`        | Staff member's Roblox username                            |
| `{reason}`          | Their stated reason for the LOA                           |
| `{startDate}`       | LOA start date                                            |
| `{endDate}`         | Current end date                                          |
| `{originalEndDate}` | Original end date before any extensions                   |
| `{newEndDate}`      | New end date (extension messages only)                    |
| `{duration}`        | Number of days                                            |
| `{status}`          | Current status                                            |
| `{actionLabel}`     | What happened (Approved, Denied, Active, Extended, Ended) |
| `{reviewNote}`      | Note left by the reviewer                                 |
| `{reviewedBy}`      | Username of who reviewed the request                      |
| `{extensionReason}` | Reason for the extension                                  |
| `{extensionCount}`  | How many times this LOA has been extended                 |
| `{endedEarlyNote}`  | Note left when ending early                               |
| `{endedEarlyBy}`    | Username of who ended it early                            |
| `{today}`           | Today's date                                              |
| `{avatarUrl}`       | Staff member's avatar URL                                 |
| `{discordId}`       | Their Discord user ID                                     |
| `{robloxId}`        | Their Roblox user ID                                      |

***

## Access Control

`CanView` lets staff see the LOA list. `CanCreate` allows submitting requests and creating LOAs on behalf of members. `CanManage` allows approving, denying, extending, ending, and accessing LOA Settings. All portal members can always submit their own LOA request regardless of page permissions.
