# XWUIPurchaseOrderWorkbench

A list-detail workbench for purchase orders: a roster pane (`basic/XWUIList`)
selects into a detail pane that composes `basic/XWUIBadge` (status, tinted
green/amber/red by where the order sits in its lifecycle), `basic/XWUIDescriptionList`
(vendor, order date, expected date, total), a `basic/XWUITable` for `lineItems`
(item / qty / unit price / total - only when the order has line items and
`config.showLineItems` is true) and `basic/XWUIQuickActions` (Approve/Reject -
only while `status` is `pending-approval`; Send - only once `approved`;
Receive - only while `sent` or `partially-received`; plus a fixed Note action
with no gate). Selection defaults to the first order and is controllable via
`data.selectedId`; a click on a roster row, a call to `selectOrder(id)`, and a
`host.data = {...}` write on the custom element all go through the same path.

`data.loading` and `data.error` take precedence over the roster and leave the
detail pane blank, so a host wiring this to a real fetch does not need a
separate skeleton component.

This is the first component in `industry/purchasing/`, wired to
`XWUISuperPurchasing`'s `purchasing-orders` menu leaf. The other six leaves
(`purchasing-requisitions`, `purchasing-suppliers`, `purchasing-contracts`,
`purchasing-invoices`, `purchasing-reports`, and the dashboard's KPI strip)
still mount the shell's placeholder / synthesized KPIs.

## Basic Usage

Three purchase orders spanning `pending-approval`, `approved` and `sent`
statuses, with mixed line items, so every gated quick action and the
line-items table are each visible on at least one of them.

```api
```
