From f51382164daab42a9847aac1ab35eb03474582d9 Mon Sep 17 00:00:00 2001 From: Rodolfo Ruiz Date: Wed, 3 Sep 2025 21:22:51 -0600 Subject: [PATCH] chore: show right path and only fields without ids in categories gridview --- src/App.jsx | 2 +- src/components/MenuDrawerPrivate.jsx | 2 +- src/private/categories/Categories.jsx | 28 +++++++++------------------ 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 2ca132e..8936ad2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -68,7 +68,7 @@ export default function App() { {currentView === '/Products Management/Catalog Management/Product Collections' && ( )} - {currentView === '/ProductsManagement/CatalogManagement/Categories' && ( + {currentView === '/Products Management/Catalog Management/Categories' && ( )} diff --git a/src/components/MenuDrawerPrivate.jsx b/src/components/MenuDrawerPrivate.jsx index 40a4af7..64a2011 100644 --- a/src/components/MenuDrawerPrivate.jsx +++ b/src/components/MenuDrawerPrivate.jsx @@ -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); } diff --git a/src/private/categories/Categories.jsx b/src/private/categories/Categories.jsx index a774237..e8aca23 100644 --- a/src/private/categories/Categories.jsx +++ b/src/private/categories/Categories.jsx @@ -143,41 +143,31 @@ export default function Categories() { ), }, - { 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 (