diff --git a/src/private/catalogs/categories/Categories.jsx b/src/private/catalogs/categories/Categories.jsx index 449386b..be9a904 100644 --- a/src/private/catalogs/categories/Categories.jsx +++ b/src/private/catalogs/categories/Categories.jsx @@ -254,7 +254,7 @@ export default function Categories() { }} > - Categories + Categories - - - setVal('modelId', e.target.value)} /> - - - setVal('name', e.target.value)} /> - - - {/* Clasificación */} - - setVal('categoryId', e.target.value)} - helperText="Se envía el tagName por ahora" - > - {loadingTags && Cargando…} - {!loadingTags && options.categories.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - - setVal('providerId', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.providers.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - {/* Específicos de variante */} - - setVal('color', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.colors.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - - setVal('line', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.lines.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - - setVal('currency', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.currencies.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - {/* Atributos como catálogos */} - - setVal('attributes.material', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.materials.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - - setVal('attributes.legs', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.legs.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - - setVal('attributes.origin', e.target.value)} - > - {loadingTags && Cargando…} - {!loadingTags && options.origins.filter(t => t.status !== 'Inactive').map(tag => ( - {tag.tagName} - ))} - - - - {/* Números */} - - setVal('stock', e.target.value)} /> - - - setVal('price', e.target.value)} /> - - + + {/* Name */} + setVal('name', e.target.value)} /> {/* Status */} - - setVal('status', e.target.value)}> - Active - Inactive - - - + setVal('status', e.target.value)}> + Active + Inactive + + + {/* Category / Provider */} + setVal('categoryId', e.target.value)} + helperText="Se envía el tagName por ahora" + > + {loadingTags && Cargando…} + {!loadingTags && options.categories.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + setVal('providerId', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.providers.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + + {/* Color / Line / Currency */} + setVal('color', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.colors.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + setVal('line', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.lines.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + setVal('currency', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.currencies.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + + {/* Attributes */} + setVal('attributes.material', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.materials.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + setVal('attributes.legs', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.legs.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + setVal('attributes.origin', e.target.value)} + > + {loadingTags && Cargando…} + {!loadingTags && options.origins.filter(t => t.status !== 'Inactive').map(tag => ( + {tag.tagName} + ))} + + + {/* Stock / Price */} + setVal('stock', e.target.value)} /> + setVal('price', e.target.value)} /> + diff --git a/src/private/catalogs/products/ProductCollections.jsx b/src/private/catalogs/products/ProductCollections.jsx index bc7071b..b16b75c 100644 --- a/src/private/catalogs/products/ProductCollections.jsx +++ b/src/private/catalogs/products/ProductCollections.jsx @@ -80,16 +80,7 @@ export default function ProductCollections() { return found?.tagName || String(value); }; }; - - const labelCategory = useMemo(() => buildLabelResolver(TYPE_NAMES.category), [byType]); - const labelProvider = useMemo(() => buildLabelResolver(TYPE_NAMES.provider), [byType]); - const labelColor = useMemo(() => buildLabelResolver(TYPE_NAMES.color), [byType]); - const labelLine = useMemo(() => buildLabelResolver(TYPE_NAMES.line), [byType]); - const labelCurrency = useMemo(() => buildLabelResolver(TYPE_NAMES.currency), [byType]); - const labelMaterial = useMemo(() => buildLabelResolver(TYPE_NAMES.material), [byType]); - const labelLegs = useMemo(() => buildLabelResolver(TYPE_NAMES.legs), [byType]); - const labelOrigin = useMemo(() => buildLabelResolver(TYPE_NAMES.origin), [byType]); - + // Cargar TagTypes + Tags useEffect(() => { let mounted = true; @@ -273,10 +264,16 @@ export default function ProductCollections() { ]; return ( - - + - Product Collection + Product Collection 'auto'} columnBuffer={0} sx={{ - width: '100%', - '& .MuiDataGrid-cell': { + height: '100%', + '& .MuiDataGrid-cell, & .MuiDataGrid-columnHeader': { display: 'flex', alignItems: 'center', - whiteSpace: 'normal', - wordBreak: 'break-word', - minHeight: '100%', }, - '& .MuiDataGrid-columnHeader': { - display: 'flex', - alignItems: 'center', - whiteSpace: 'normal', - wordBreak: 'break-word', - }, - '& .MuiDataGrid-virtualScroller': { - overflowX: 'auto', - }, - '& .MuiDataGrid-main': { - minWidth: '1000px', + '& .MuiDataGrid-filler': { + display: 'none', }, }} + slots={{ + noRowsOverlay: () => ( + No product collection found. Try switching the status filter to "All". + ), + }} /> @@ -349,7 +339,6 @@ export default function ProductCollections() { /> - ); }