SharePoint leave request web part
Annual leave in SPHub is a SharePoint leave request web part: employees submit leave through a two-step form, approvers review the requests in a list, and every request is kept in one list in your own tenant.
The product calls it Annual Leave Tracker, and it is one of the 27 web parts in SPHub by Inthouse. This page covers what setup creates for it, what the form and the views do, when it sends email, and what it does not do.
The list setup creates for annual leave
Setup creates one SharePoint list for annual leave, SPHubAnnualLeaveTracker, with seven custom fields.
Custom fields
type- Leave Start Date TimeDate, required
- Leave End Date TimeDate, required
- Leave TypeChoice, required. It starts with six types:
Annual Leave,Sick Leave,Personal Leave,Maternity Leave,Paternity LeaveandEmergency Leave - DescriptionMultiple lines of plain text
- ManagerPerson
- Approval StatusText
- Is ActiveYes or no, and yes by default
The built-in Title holds the requester’s name and the leave type, joined with a dash. The Leave Type dropdown on the form reads its options from the Leave Type column of this list.
The request form
Employees request leave in a two-step form: Request Information, then Schedule & Reason.
-
Step one: Request Information
In step one of the leave request form, Leave Type is required and chosen from a dropdown, and Manager is optional and picked with a people picker.
-
Step two: Schedule & Reason
In step two of the leave request form, the start and end dates are required and Description is optional. A start date in the past is refused, and so is an end date earlier than the start date.
-
A warning for overlaps
The leave request form shows “Overlapping leave request found” when you already have another active request, not rejected, that covers the same dates. The warning is informational: you can still submit.
-
Editing later
The Update form opens a request from the list, and it is editable only for the person who created the request and the manager assigned to it; anyone else sees a read-only view with a message saying so. That is a rule of the form, not a SharePoint permission.
Views and where they appear
Setup creates five SharePoint pages for annual leave, each showing the same web part in a different view, and puts three of them in the site menu under HR.
Views
what it shows- All Leave RequestsEvery active request, most recently changed first, 50 to a page. Search, sort and filter in the grid, choose columns, export to CSV, open a details panel, and delete. An Approval column holds the Approve and Reject buttons for approvers
- My Leave RequestsOnly your own active requests, in the same grid, with column choice and delete but without export or approval
- New Leave RequestThe two-step form
- Update Leave RequestThe same form, filled in from the request you opened
- Leave Requests Recycle BinDeleted requests, each with a restore option
The menu entry is Leave Requests, with All Leave Requests, My Leave Requests and New Leave Request beneath it. The Edit link and the Recycle Bin button in All Leave Requests open the other two pages. In a Teams tab the web part opens on All Leave Requests only.
Approval
In All Leave Requests, the Approve and Reject buttons are shown only to members of a SharePoint group named SPHub Approvers.
-
Who can approve
Setup does not create the
SPHub Approversgroup. Until a group with exactly that name exists and you are a member of it, the Approval column shows nothing. -
What a click does
Approve sets the request’s Approval Status to Approved, and Reject sets it to Rejected. For an approver, a request that already has one of those values shows a status badge in place of the buttons.
-
A new request has no status
A new leave request starts with an empty Approval Status, because the form does not set one and the column has no default.
-
Not tied to the manager
The Approve and Reject buttons check membership of
SPHub Approvers, not the Manager chosen on the form, so any member of that group can approve any request.
SPHub sends an email through Microsoft Graph when a leave request is created or updated, provided at least one recipient can be worked out.
-
Who receives it
A leave email goes to the manager picked on the form, the HR address saved in SPHub Settings and the module’s contact person, whichever of those exist. The requester is copied in. If none of the three resolves, nothing is sent.
-
What is sent
SPHub builds the message from one of two templates in the mail templates list: New Leave Request Template for new requests and Update Leave Request Template for edits. Setup adds both, and your team can edit them. They can carry the requester, the date, the leave type and the start and end dates.
-
Sent as the signed-in user
The email send uses
Mail.Send, one of the three Graph permissions SPHub requests. The message goes out from the signed-in user’s own mailbox and is saved to their Sent Items.
Where the data lives
Every leave request is an ordinary item in the SPHubAnnualLeaveTracker list on your SharePoint site, which you can open, export and audit.
-
Delete is soft
Deleting a leave request clears its Is Active flag instead of removing the item. The Recycle Bin view lists the inactive requests, and restoring one sets the flag back. It is SPHub’s own view, not SharePoint’s recycle bin.
-
Permissions stay SharePoint’s
SPHub adds no permission model of its own, and the list’s own SharePoint permissions are unchanged. All Leave Requests loads every active request in the list, so those permissions decide who can read which requests; where SPHub stores your data has the rest.
What annual leave does not do
The annual leave module records requests and their approval status; it does not calculate entitlements, balances or remaining days.
-
No balances
Annual leave has no allowance per employee, no accrual and no day count on the form. The module stores the dates a request spans, not how many days they are.
-
One-step approval
Approval is one Approved or Rejected value, set by one member of
SPHub Approvers. The module has no second approver, delegation or reminder step. -
Teams and Outlook
The annual leave web part can be added as a Microsoft Teams tab, where it opens on All Leave Requests only. There is no Outlook host.
How you get it
Annual leave ships inside SPHub, every plan includes every web part, and the setup wizard creates its list when you enable the module.
-
One package, every web part
There is no SPHub tier that ships fewer web parts. The pricing page has the five per-user bands, and the full set is on the web parts page.
-
Install
Lists are created only for the modules you enable. An administrator uploads one package, approves the three Graph permissions and runs setup; the install page has the steps.
Other SPHub module pages
Annual leave is not the only SPHub module with a page of its own: expenses, travel requests, asset management and issue tracking each have one.
Module pages
what it is- ExpensesA SharePoint Online web part for expense requests: an employee submits an expense with its receipt, and an approver accepts or rejects it.
- Travel requestsA SharePoint Online web part for business travel requests: an employee describes a trip with its dates and estimated costs, and an approver accepts or rejects it.
- Asset managementA SharePoint asset management web part that keeps a company’s equipment inventory in one SharePoint list.
- Issue trackingA SharePoint issue tracking web part that logs problems in one SharePoint list; each issue can carry a priority, a status, an assignee and attachments.
See leave requests running in a tenant you control
Enable annual leave on a development site, submit a request, and watch the list and the pages that setup creates for it.