# XWUIHrPeopleAnalyticsPage

An HR analytics shell page (extends `HrInsightsPageBase` → `HrPageBase` → `XWUIShellPage`) that renders a four-tile KPI strip in an `XWUIDashboard`: Employees (total headcount, info), Active Today (success), Open Roles (warning), and Avg Tenure in years (neutral). It fetches the figures from the HR API's `getInsights()`, or renders immediately when `data.kpis` is supplied. 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 "People Analytics"). Use it as the workforce-overview dashboard for HR leadership.

## Basic Usage

Mounts the analytics page against a sandbox HR API so the KPI dashboard auto-loads headcount, active, open-roles, and tenure tiles.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Instantiates XWUIHrPeopleAnalyticsPage with createHrApi({ env: 'sandbox' }) in English, letting it fetch insights and render the four KPI tiles.
```

## Attrition Dashboard

A quarterly attrition review rendered from a supplied `data.kpis` object, so the tiles appear without an API call.

```example
file: examples/AttritionDashboard.ts
html: examples/AttritionDashboard.html
title: Attrition Dashboard
description: Renders the People Analytics tiles from a supplied InsightsKpis object (842 employees, 58 open roles, 2.6y tenure) for a Q1 attrition review, bypassing the fetch.
```

## Leadership Headcount Review

The workforce-overview dashboard pointed at the production service for a monthly leadership review, with drill-down breadcrumbs.

```example
file: examples/LeadershipHeadcountReview.ts
html: examples/LeadershipHeadcountReview.html
title: Leadership Headcount Review
description: Renders the workforce-overview KPIs from the production IHrApi with People → Leadership → Headcount breadcrumbs and a 1320px boardroom column.
```

```api
```
