# `PhoenixKitManufacturing.ColumnConfig.Machines`
[🔗](https://github.com/BeamLabEU/phoenix_kit_manufacturing/blob/0.4.1/lib/phoenix_kit_manufacturing/column_config/machines.ex#L1)

Column registry for the Machines index list LiveView
(`PhoenixKitManufacturing.Web.MachinesLive`, `:index`).

Operates on enriched machine maps of shape `%{uuid, name, code, status,
status_label, location, types_csv, type_names, manufacturer, model,
manufacture_year, commissioned_on, warranty_until, to_next_on, data}`,
built by `enrich_machines/2` in the LiveView the same way
`PhoenixKitWarehouse.ColumnConfig.Inventories`'s flat maps are built by
`enrich_documents/1` in `inventories_live.ex`.

`types_csv` is the sorted, comma-joined list of machine type names (e.g.
`"CNC, Milling"`) used as the `:enum` filter key — `distinct_options/2`
returns distinct CSV strings and `enum_filter/1` matches on the full CSV.
`type_names` (a sorted list of the same strings) is kept on the enriched
map for badge rendering in the LiveView without re-splitting the CSV.

# `all_column_ids`

```elixir
@spec all_column_ids() :: [String.t()]
```

# `available_columns`

```elixir
@spec available_columns() :: [map()]
```

Ordered list of column metadata maps. Used by the picker modal.

# `column_metadata_map`

```elixir
@spec column_metadata_map() :: %{required(String.t()) =&gt; map()}
```

Map `%{id => meta}` for fast lookup during a single render pass.

# `default_columns`

```elixir
@spec default_columns() :: [String.t()]
```

# `scope`

```elixir
@spec scope() :: String.t()
```

# `sortable_column_ids`

```elixir
@spec sortable_column_ids() :: [String.t()]
```

Ids of the columns that declare `sortable?: true`, in registry order.

Separate from `all_column_ids/0` because a sort value can arrive from
outside the page — a shared `?sort=` link, or a fallback pushed after the
active sort column is hidden — and a non-sortable id accepted there leaves
the list unsorted with nothing selected in the sort control. Callers
whitelist against this rather than re-listing the sortable ids by hand, so
adding a sortable column can't leave a stale copy behind.

# `validate_columns`

```elixir
@spec validate_columns([String.t()]) :: [String.t()]
```

Filter input list to known column ids, preserving order.

# `validate_filters`

```elixir
@spec validate_filters([String.t()]) :: [String.t()]
```

Filter input list to known *filterable* column ids, preserving order.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
