Route SKU actions to focused editors
This commit is contained in:
@@ -12,3 +12,15 @@ export const buildSkuEditPath = ({ sku, name = '', color = '', size = '' }: SkuE
|
||||
if (size) params.set('size', size);
|
||||
return `/registrations?${params.toString()}`;
|
||||
};
|
||||
|
||||
export const buildCuttingSkuConfigPath = ({ sku }: Pick<SkuEditParams, 'sku'>) => {
|
||||
const params = new URLSearchParams({ config: 'corrections', sku });
|
||||
return `/cutting?${params.toString()}`;
|
||||
};
|
||||
|
||||
export const buildConsumptionReferencePath = ({ sku, name = '', color = '' }: Omit<SkuEditParams, 'size'>) => {
|
||||
const params = new URLSearchParams({ tab: 'references', sku });
|
||||
if (name) params.set('name', name);
|
||||
if (color) params.set('color', color);
|
||||
return `/registrations?${params.toString()}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user