import type { ProductListRow } from "@/app/lib/types"; /** * "Name (CODE)" for the inventory product pickers. Product names are not unique (BA-001 and * EVENT-BA-001 share one), so the code is what tells them apart; it is also the picker item's * value, which cmdk needs to be unique. */ export function productPickerLabel(product: Pick): string { return product.productCode ? `${product.productName} (${product.productCode})` : product.productName; }