chore: show right path and only fields without ids in categories gridview
This commit is contained in:
@@ -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 />
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user