From 6f969db780b3953588fed633de870b0d40b82a07 Mon Sep 17 00:00:00 2001 From: Malini Date: Wed, 5 Nov 2025 13:32:47 +0530 Subject: [PATCH] bug fixed in company profile --- ipi-survey-platform/src/App.jsx | 11 +- .../src/components/common/Table.jsx | 14 +- .../src/pages/Admin/Configuration.jsx | 26 +- .../Admin/configuration/CompanyProfile.jsx | 326 +++++------------- 4 files changed, 120 insertions(+), 257 deletions(-) diff --git a/ipi-survey-platform/src/App.jsx b/ipi-survey-platform/src/App.jsx index 22550aa..3780ffd 100644 --- a/ipi-survey-platform/src/App.jsx +++ b/ipi-survey-platform/src/App.jsx @@ -226,7 +226,7 @@ function App() { } /> - + {/* } /> - + */} + + + + } /> + {/* /> */} + {/* */} +
{beforeHeader} -
diff --git a/ipi-survey-platform/src/pages/Admin/Configuration.jsx b/ipi-survey-platform/src/pages/Admin/Configuration.jsx index a8286e3..2e5e058 100644 --- a/ipi-survey-platform/src/pages/Admin/Configuration.jsx +++ b/ipi-survey-platform/src/pages/Admin/Configuration.jsx @@ -33,20 +33,20 @@ const Configuration = () => { }, [active, navigate]); // Update active tab based on URL - useEffect(() => { - const pathToTab = { - 'quarterly': 'Quarterly Windows', - 'hscodes': 'HS Codes', - 'unitmaster': 'Unit Master', - 'admin-users': 'Admin Users', - 'profile': 'Company Profile' - }; +useEffect(() => { + const pathToTab = { + 'quarterly': 'Quarterly Windows', + 'hscodes': 'HS Codes', + 'unitmaster': 'Unit Master', + 'admin-users': 'Admin Users', + 'profile': 'Company Profile' + }; - const path = location.pathname.split('/').pop(); - if (pathToTab[path] && pathToTab[path] !== active) { - setActive(pathToTab[path]); - } - }, [location.pathname]); + const path = location.pathname.split('/').pop(); + if (pathToTab[path] && pathToTab[path] !== active) { + setActive(pathToTab[path]); + } +}, [location.pathname]); const Breadcrumbs = (
{ + setCurrentPage(page); + // Scroll to top when changing pages + window.scrollTo({ top: 0, behavior: 'smooth' }); + }, pageSize, - totalItems: filteredProfiles.length, + totalItems: filteredProfiles.length, // Use filtered count for pagination pageSizeOptions: [10, 20, 50, 100], + onPageSizeChange: (size) => { + setPageSize(size); + setCurrentPage(1); // Reset to first page when changing page size + } }} /> )}