# Admin · People — UI / Screens & States

## Demo screens (`src/portals/admin/People.tsx`)

### Page shell
- `PageHeader` title **"People"**, subtitle "Customers, classifications, specialists,
  managers & users" (`People.tsx:24`).
- `Segmented` tab control with 4 options (`People.tsx:28`); each renders one `Card` +
  `DataTable`. Single URL/page — tab state is local React state, no routing.

### Customers tab (`People.tsx:48`)
- `DataTable` columns: **Customer** (`Avatar` + bold name), **Mobile** (`id-mono`,
  `text-ink-soft`), **Gender** (`titleCase`), **Bookings** (right-aligned count),
  **Shops** (right-aligned distinct count).
- No add/edit/row actions, no filters, no pagination chrome in this view.

### Classifications tab (`People.tsx:88`)
- `Card` with `CardHeader` title "Customer classifications" + subtitle about immutability/
  logged override (`People.tsx:139`).
- Columns: **Customer** (name resolved by mobile), **Shop** (`ShopTile` + name),
  **Classification** (`ClassificationBadge`, centered), **Reason** (slate `Badge`,
  `titleCase`), **Set on** (date), and a right-aligned **Override** secondary `Button` with
  `Repeat` icon (`People.tsx:128`).
- **OverrideModal** (`People.tsx:152`): title "Override classification", subtitle re:
  marketing-fee behaviour. Body shows **Current** badge, a **New classification** `Select`
  with descriptive labels ("Shop customer (no marketing fee)" / "Navagoo customer (marketing
  fee applies)"), and a required **Reason** `Input`. Footer: Cancel + **Apply override**
  (disabled until reason entered). Closed-state renders an empty `Modal open={false}`.
- Success → `toast.success` (`People.tsx:172`).

### Specialists tab (`People.tsx:218`)
- Columns: **Specialist** (avatar+photoUrl+name), **Shop**, **Title** (`text-ink-soft`),
  **Wage type** (slate badge), **Status** (teal Active / slate Inactive).

### Users tab (`People.tsx:289`)
- Columns: **User** (avatar+name), **Email**, **Role** (centered colour-coded badge),
  **Shop** ("Platform" muted text when no shop), **Last active** (date).

### Cross-cutting states
- **RTL**: demo runs under an i18n layer (`src/i18n`) with dir flipping; tables are
  logical-direction aware.
- **Empty**: `DataTable` renders its own empty state when `rows` is empty (shared component).
- No explicit error state in this page (store is in-memory).

## Our views

### Customers — `backend/views/user/index.php`
- Tailwind "aurora" page (custom card-table, NOT GridView render; GridView columns kept only
  for the Kartik `ExportMenu` export, `user/index.php:120`). Stat cards: total/active/inactive
  customer counts (`:92`). GET filters: id, name (Select2-style), email, mobile, status.
- Columns rendered: formatted_id, full_name, email, mobile, gender, **Mode (demo/live)**,
  **status**, timestamps, view link.
- **Gaps vs demo**: no Bookings-count column, no Shops-count column, no avatar in the name
  cell. Adds Mode + Status + Export the demo lacks.

### Specialists — `backend/views/agent/index.php`
- Same aurora pattern. Stat cards: active/inactive agents (`:91`). Columns: formatted_id,
  full_name, gender, mobile, email, shop name, Mode, status, timestamps, view + status/demo
  toggles (SweetAlert confirm).
- **Gaps vs demo**: no **wage-type** column, no **title** column. Adds toggles + export.

### Users / managers — `backend/views/managers/index.php` (+ `_form.php`, `create/update/view`)
- Full CRUD set (the demo Users tab is read-only). `_form.php` exposes a role selector fed by
  `authManager->getRoles()`.
- **Gaps vs demo**: no "Platform vs shop" shop column treatment matching the demo's muted
  "Platform" label; role vocabulary differs (`administrator/shopOwner/manager/user` vs
  `admin/owner/manager/support`); no last-active column equivalent surfaced as in demo.

### Classifications — NO admin view
- There is **no `backend/views/*/classifications` or override modal**. The nearest UI is the
  **shop portal** freeze-list manager (`frontend/views/customers/index.php`) with freeze/
  unfreeze actions — a different actor (shop), different semantics (binary fee exemption, not
  a two-value classification with logged admin override), and no marketing-fee re-derivation
  preview.

## Concrete UI gaps (admin)
1. No unified "People" page — 3 separate menu surfaces instead of one 4-tab page.
2. Customers grid missing Bookings + Shops derived-count columns.
3. Specialists grid missing Wage-type and Title columns.
4. No Classifications tab, no `ClassificationBadge`, no Override modal, no reason field, no
   "charges re-derived" feedback on the admin side.
5. Users grid: role colour-coding/vocab and "Platform" shop label not matched.
