Appearance
Absence Detail
Detail view for a specific absence or annual leave approval request, showing a calendar visualization, entitlement data, and approval actions.
Route
Rendered within /organisations/:organisationId/pending-approvals/:approvalId when the request type is Holiday or Illness.
Layout
A responsive CSS grid (grid-container) with five areas: profile card, entitlement widget, approval card, calendar, and file attachment. Layout adapts across breakpoints from single-column (mobile) to two-column (desktop).
Worker Profile Card
Grid area: profile-card (column 1, row 1).
Rendered by the ProfileCard component. Displays:
- Worker profile picture (by
userId, size "xs") - Full name (
firstName+lastName) - Country (
jobLocation) - Worker contract type (
workerContractType) - Job title
- Team name (
teamName) - Manager names (derived from
assignedManagersor, if empty,managersOfUnassigned; values extracted viaObject.values) - HR-only status (
hrOnly) - Contract ended status (
isContractEnded) - Greyed out when the contract has ended (
isGreyedOutprop)
Hidden entirely if worker details fail to load (hideWorkerDetails flag).
Entitlement Widget
Grid area: entitlement-widget (column 2, rows 1-2).
Shown only for Holiday requests when the useAccrual feature flag is enabled. Contains:
EntitlementWidgetcomponent with:organisationIdfrom worker detailsworkerContractTypefrom worker detailscountryIsoCodefromjobLocationRegion(if defined) orjobLocationstartDatefrom worker's contract start dateshowLegendenabledentitlementdata (fetched viagetEntitlementAt)- Responsive padding adjustments based on
innerWidthat 1440px and 1600px breakpoints
- Radial bar chart of entitlement data
AbsenceWheelChart(in theextra-componentslot) showing a breakdown of absence types (excluding holidays), with a wheel width of 90px andshowTotaldisabled
Approval Card
Grid area: approval-card (column 1, row 2).
Rendered via the Approval component. Displays request details specific to the absence type:
For Holiday requests (with useAccrual):
- Requested days with leave type (Working or Calendar, determined by
absence.basis). When outstanding days exist (approval.absence.outstandingis truthy), the text is styled in red (text-danger) with a warning triangle (InfoTip) tooltip showing theAbsenceRequestedText. - Calendar basis info (
InfoTipwith info circle icon): shown whenabsence.basis === LeaveBases.CalendarDays, explains calendar-day-based leave for the worker's country. - Available days from
entitlement.state.totalAvailable - Allocated days from
entitlement.state.totalAllocated - Used days from
entitlement.state.totalUsed
For Holiday requests (without useAccrual):
- Remaining days:
absenceDaysAllowed - usedDays - requestedDays(orabsenceDaysAllowed - usedDayswhen approved) - Currently used:
usedDays
For Illness requests:
- Type: absence type text from
getAbsenceTypeText(approval.absence.absenceType) - Same requested days display as Holiday with outstanding warning
Common fields (Holiday and Illness):
- Start date (formatted via
formatDateRemundoStandard) - Public holiday dates (shown when present and basis is not CalendarDays; formatted as "dd MMM", comma-separated)
- Weekend dates (shown when present and basis is not CalendarDays; formatted as "dd MMM", comma-separated)
- End date (formatted via
formatDateRemundoStandard) - Note (shown when
absence.noteexists; truncated withEllipsescomponent) - File attached indicator (shown when
absence.fileNameexists; paperclip icon with tooltip showing file name) - Submitted date (formatted via
formatDateRemundoStandard) - Status with display status, approver/rejector name, and date
- Approval buttons (shown via
allowApprovalActioncheck; includes second-level pending restriction text) - Rejection reason (shown when status is Rejected; displays
approval.commentin a bordered card)
Calendar Display
Rendered via the CalendarDisplay component. Shows the absence date range with colour-coded cells.
When a file is attached: Calendar is in the grid area calendar (column 1, row 3), alongside the file viewer.
When no file is attached: Calendar is displayed separately below the grid in a responsive column (col-xl-5 col-lg-5 col-md-8 col-sm-10 col-12).
Calendar props:
status-- Approval status (as string)startDate-- Fromapproval.absence.startDate(converted viagetDateOnly)endDate-- Fromapproval.absence.endDate(converted viagetDateOnly)excludedDates-- When basis is CalendarDays: empty array. Otherwise: combinedweekendDatesandpublicHolidayDates.includedWeekendsAndHolidays-- When basis is CalendarDays: combinedweekendDatesandpublicHolidayDates. Otherwise: empty array.
File Attachment
Grid area: file-attachment (column 2, row 3).
Shown when approval.absence.fileName is present. Rendered via ApprovalFileAttached with allowFullWidth enabled. Receives absenceId (from approval.id) and fileName (from approval.absence.fileName).
Data Loading
On initialisation (pInit):
- Fetches worker details via
getWorkerDetails(approval.eorId, approval.organisationId). On failure, setshideWorkerDetails = true. - If the absence has accrual states (
approval.absence.states) anduseAccrualis enabled, fetches entitlement data viagetEntitlementAt(approval.eorId, new Date()). - Fetches all holiday and illness approvals for the worker via
getPendingApprovalByWorkerId(workerDetails.id, [RequestType.Illness, RequestType.Holiday], 'All' status). - Filters results: includes all illness absences and only current-year holidays (
startDate.getFullYear() == currentYear). Collects absence data into theabsencesarray for the wheel chart.
The component re-initialises when refreshKey changes (triggered after entitlement changes via the parent DetailView).
Behavior notes
- If worker details fail to load, the profile card section is hidden but the rest of the page still renders.
- The grid layout uses different column/row configurations at breakpoints:
- Below 767px: single column (
0.75fr), all items stack vertically withwidth: max-content(calendar useswidth: min-content) - 768px-1024px: two columns (
45% 55%) - 1025px-1440px: two columns (
35% 65%), profile card fixed at19.375rem - 1440px-1600px: two columns (
35% 65%), profile card fixed at19.375rem - 1600px-1919px: two columns (
35% 65%), profile card fixed at19.375rem - 1920px+: two columns (
25% 75%)
- Below 767px: single column (
- Excluded dates (weekends and public holidays) are combined from
weekendDatesandpublicHolidayDateson the absence object intoabsenceWeekendAndHolidays. - The
CalendarDisplayPopupcomponent handles popup interactions within the calendar.