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' && (
<ProductCollections />
)}
{currentView === '/ProductsManagement/CatalogManagement/Categories' && (
{currentView === '/Products Management/Catalog Management/Categories' && (
<Categories />
)}
</>

View File

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

View File

@@ -143,41 +143,31 @@ export default function Categories() {
</Box>
),
},
{ field: 'tenantId', headerName: 'tenantId', width: 180 },
{ field: 'tagName', headerName: 'tagName', width: 200 },
{ field: 'typeId', headerName: 'typeId', width: 260 },
{
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 },
// Visible (renamed) fields
{ field: 'tagName', headerName: 'Name', width: 220 },
{ field: 'slug', headerName: 'Slug', width: 200 },
{ field: 'icon', headerName: 'Icon', width: 160 },
{
field: 'createdAt',
headerName: 'createdAt',
headerName: 'Created Date',
width: 200,
valueFormatter: (p) => {
const v = p?.value;
return v ? new Date(v).toLocaleString() : '—';
},
},
{ field: 'createdBy', headerName: 'createdBy', width: 180 },
{ field: 'createdBy', headerName: 'Created By', width: 180 },
{
field: 'updatedAt',
headerName: 'updatedAt',
headerName: 'Updated Date',
width: 200,
valueFormatter: (p) => {
const v = p?.value;
return v ? new Date(v).toLocaleString() : '—';
},
},
{ field: 'updatedBy', headerName: 'updatedBy', width: 180 },
{ field: 'status', headerName: 'status', width: 140 },
{ field: 'updatedBy', headerName: 'Updated By', width: 180 },
{ field: 'status', headerName: 'Status', width: 140 },
];
return (