chore: show right path and only fields without ids in categories gridview

This commit is contained in:
Rodolfo Ruiz
2025-09-03 21:22:51 -06:00
parent e8e2ed4ff1
commit f51382164d
3 changed files with 11 additions and 21 deletions

View File

@@ -68,7 +68,7 @@ export default function App() {
{currentView === '/Products Management/Catalog Management/Product Collections' && ( {currentView === '/Products Management/Catalog Management/Product Collections' && (
<ProductCollections /> <ProductCollections />
)} )}
{currentView === '/ProductsManagement/CatalogManagement/Categories' && ( {currentView === '/Products Management/Catalog Management/Categories' && (
<Categories /> <Categories />
)} )}
</> </>

View File

@@ -162,7 +162,7 @@ export default function MenuDrawerPrivate({
} else if (node.title === 'Product Collections') { } else if (node.title === 'Product Collections') {
onSelect?.('/Products Management/Catalog Management/Product Collections'); onSelect?.('/Products Management/Catalog Management/Product Collections');
} else if (node.title === 'Categories') { } else if (node.title === 'Categories') {
onSelect?.('/ProductsManagement/CatalogManagement/Categories'); onSelect?.('/Products Management/Catalog Management/Categories');
} else { } else {
onSelect?.(node.title); onSelect?.(node.title);
} }

View File

@@ -143,41 +143,31 @@ export default function Categories() {
</Box> </Box>
), ),
}, },
{ field: 'tenantId', headerName: 'tenantId', width: 180 }, // Visible (renamed) fields
{ field: 'tagName', headerName: 'tagName', width: 200 }, { field: 'tagName', headerName: 'Name', width: 220 },
{ field: 'typeId', headerName: 'typeId', width: 260 }, { field: 'slug', headerName: 'Slug', width: 200 },
{ { field: 'icon', headerName: 'Icon', width: 160 },
field: 'parentTagId',
headerName: 'parentTagId',
width: 220,
valueGetter: (params) => Array.isArray(params.value) ? params.value.join(', ') : (params.value ?? '—'),
},
{ field: 'slug', headerName: 'slug', width: 180 },
{ field: 'displayOrder', headerName: 'displayOrder', width: 140, type: 'number' },
{ field: 'icon', headerName: 'icon', width: 160 },
{ field: '_id', headerName: '_id', width: 260 },
{ field: 'id', headerName: 'id', width: 280 },
{ {
field: 'createdAt', field: 'createdAt',
headerName: 'createdAt', headerName: 'Created Date',
width: 200, width: 200,
valueFormatter: (p) => { valueFormatter: (p) => {
const v = p?.value; const v = p?.value;
return v ? new Date(v).toLocaleString() : '—'; return v ? new Date(v).toLocaleString() : '—';
}, },
}, },
{ field: 'createdBy', headerName: 'createdBy', width: 180 }, { field: 'createdBy', headerName: 'Created By', width: 180 },
{ {
field: 'updatedAt', field: 'updatedAt',
headerName: 'updatedAt', headerName: 'Updated Date',
width: 200, width: 200,
valueFormatter: (p) => { valueFormatter: (p) => {
const v = p?.value; const v = p?.value;
return v ? new Date(v).toLocaleString() : '—'; return v ? new Date(v).toLocaleString() : '—';
}, },
}, },
{ field: 'updatedBy', headerName: 'updatedBy', width: 180 }, { field: 'updatedBy', headerName: 'Updated By', width: 180 },
{ field: 'status', headerName: 'status', width: 140 }, { field: 'status', headerName: 'Status', width: 140 },
]; ];
return ( return (