# `PhoenixKitWarehouse.ColumnConfig`
[🔗](https://github.com/BeamLabEU/phoenix_kit_warehouse/blob/0.4.0/lib/phoenix_kit_warehouse/column_config.ex#L1)

Shared column-registry engine for warehouse list LiveViews.

Consolidates what were 6 near-byte-identical `*_column_config.ex` files in
Andi (`internal_order_column_config.ex`, `inventory_column_config.ex`,
`stock_column_config.ex`, `supplier_order_column_config.ex`,
`goods_issue_column_config.ex`, `goods_receipt_column_config.ex`) into one
engine (`use PhoenixKitWarehouse.ColumnConfig, scope: "..."`) plus 6 short
`columns/0` definitions — see `PhoenixKitWarehouse.ColumnConfig.{InternalOrders,
Inventories, Stock, SupplierOrders, GoodsIssues, GoodsReceipts}`.

Each column is a map with structural metadata:

  * `:id` — string identifier persisted in the per-user view config.
  * `:label` — zero-arity fn returning the translated header label.
  * `:default?` — included in `default_columns/0`.
  * `:align` — `:left` (default) or `:right`.
  * `:sortable?` / `:sort_key` — sortability + key extractor `(entry -> term)`.
  * `:default_dir` — direction the column toggles to on first sort.
  * `:filterable?` / `:filter_type` — `:text | :enum | :date_range | :numeric_range`.
  * `:filter_apply` — `(entries, value) -> entries`.
  * `:filter_options` — for `:enum` only, `(entries -> [{value, label}])`.

Cell/header rendering stays in the LiveView — only structural metadata lives
here so it can be reused for table, sort headers, and filter chips.

# `date_of`

# `date_range_filter`

# `datetime_to_unix`

# `decimal_to_float`

# `distinct_options`

# `enum_filter`

# `numeric_range_filter`

# `text_filter`

# `to_number`

---

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