Add manual SKU planning overrides
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m18s

This commit is contained in:
Cauê Faleiros
2026-07-16 11:48:52 -03:00
parent 422828f343
commit 8eeadf00ae
11 changed files with 444 additions and 34 deletions

View File

@@ -146,6 +146,16 @@ export const productTypeOptions = Object.values(productTypeConfigs)
.filter(config => config.key !== 'ignore_from_planning')
.map(config => ({ value: config.key, label: config.label }));
export const editableProductTypeOptions = Object.values(productTypeConfigs)
.map(config => ({ value: config.key, label: config.label, description: config.description }));
export const resolveProductType = (
name: string,
override?: { productType?: ProductTypeKey | '' } | null
): ProductTypeKey => {
return override?.productType || classifyProductType(name);
};
export const getDominantProductType = <T extends { productType: ProductTypeKey; quantitySold: number }>(rows: T[]) => {
if (!rows.length) return 'unknown';