Format product color labels

This commit is contained in:
Cauê Faleiros
2026-07-09 13:58:48 -03:00
parent 634cf4db48
commit d3d8886a90
7 changed files with 57 additions and 33 deletions

View File

@@ -8,6 +8,7 @@ import { buildOpenProductionByProductId } from '../analytics/cutting';
import type { DateRange, ProductAnalyticsItem, ProductionOrderItem } from '../types';
import { exportToCSV, fetchProductAnalytics, fetchProductionOrders } from '../dataService';
import { encodeProductGroupKey, parseProductName, sortProductSizes } from '../productParsing';
import { formatColorLabel } from '../displayFormatters';
type ReplenishmentStatus = 'need' | 'covered' | 'no_sales' | 'no_stock';
type ReplenishmentFilter = 'all' | ReplenishmentStatus;
@@ -237,7 +238,7 @@ const Replenishment = () => {
: 'covered';
const sizes = sortProductSizes(Array.from(new Set(group.flatMap(row => row.sizes))));
const productIds = group.map(row => row.id);
const name = first.color ? `${first.baseName} · ${first.color}` : first.baseName;
const name = first.color ? `${first.baseName} · ${formatColorLabel(first.color)}` : first.baseName;
return {
...first,