# XWUIHrPresenceAnalyticsPage

An HR analytics shell page (extends `HrInsightsPageBase` → `HrPageBase` → `XWUIShellPage`) that renders a four-tile KPI strip in an `XWUIDashboard` summarizing workforce presence: Employees (total headcount, info), Active Today (success), Open Roles (warning), and Avg Tenure in years (neutral). Figures come from the HR API's `getInsights()`, or render immediately when `data.kpis` is provided. Configure the source via `conf_comp.hrApiOptions` (default `{ env: 'sandbox' }`) or `conf_comp.hrApi`, set `conf_comp.locale` (`en`/`ar`), and override the heading with `data.title` / `data.titleAr` (default "Presence Analytics"). Use it as the attendance / who's-in dashboard for HR and operations.

## Basic Usage

Mounts the page against a sandbox HR API so the KPI dashboard auto-loads the presence summary tiles.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Instantiates XWUIHrPresenceAnalyticsPage with createHrApi({ env: 'sandbox' }) in English, fetching insights and rendering the Employees / Active Today / Open Roles / Avg Tenure tiles.
```

## Regional Presence Snapshot

Renders the KPI tiles for a single regional office directly from explicit `data.kpis`, with a low Active Today flagging an attendance dip.

```example
file: examples/RegionalPresenceSnapshot.ts
html: examples/RegionalPresenceSnapshot.html
title: Regional Presence Snapshot
description: Supplies data.kpis (184 employees, 96 active today, 7 open roles, 4.2y tenure) so the dashboard renders the Riyadh office snapshot instantly without an API call.
```

## Arabic Attendance Board

Loads the live presence tiles in Arabic (RTL) as an operations "who's in today" board.

```example
file: examples/ArabicAttendanceBoard.ts
html: examples/ArabicAttendanceBoard.html
title: Arabic Attendance Board
description: Mounts XWUIHrPresenceAnalyticsPage in Arabic (locale 'ar') against the sandbox HR API so getInsights() populates the attendance KPI strip RTL for an operations team.
```

```api
```
