Column registry for the warehouse stock-balances ("In stock") flat list LiveView.
Operates on enriched flat stock maps of shape %{item, display_name, sku, catalogue_name, category_name, unit_label, quantity, unit_value, total_value, min_quantity, available, below_min?} where quantity,
unit_value, total_value, min_quantity, and available are Decimal
(or nil for value columns), below_min? is boolean, and the rest are
strings.
min_quantity / available / below_min? come from
PhoenixKitWarehouse.Deficits and PhoenixKitWarehouse.MinStockSettings
(§5, deficit tracking) — deliberately global-per-item (summed across every
warehouse), not scoped to the current warehouse_scope, same as
Deficits.available_by_item/0 itself.
Summary
Functions
Ordered list of column metadata maps. Used by the picker modal.
Map %{id => meta} for fast lookup during a single render pass.
Filter input list to known column ids, preserving order.
Filter input list to known filterable column ids, preserving order.
Functions
@spec all_column_ids() :: [String.t()]
@spec available_columns() :: [map()]
Ordered list of column metadata maps. Used by the picker modal.
Map %{id => meta} for fast lookup during a single render pass.
@spec default_columns() :: [String.t()]
@spec scope() :: String.t()
Filter input list to known column ids, preserving order.
Filter input list to known filterable column ids, preserving order.