diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7039740..4a6479944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ - **Use Case Participation** - fixed columns alignment ui issue [#1247](https://github.com/eclipse-tractusx/portal-frontend/pull/1247) +### Feature + +- **Clearinghouse Self-Description** + - enhance admin UI for managing SD document retriggering [#1292](https://github.com/eclipse-tractusx/portal-frontend/pull/1292) + ## 2.3.0-RC1 ### Change diff --git a/DEPENDENCIES b/DEPENDENCIES index da27e2af0..ecc509099 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -446,7 +446,7 @@ npm/npmjs/-/resolve/1.22.8, MIT AND ISC, approved, #15315 npm/npmjs/-/resolve/2.0.0-next.5, MIT AND ISC, approved, #3078 npm/npmjs/-/reusify/1.0.4, MIT, approved, clearlydefined npm/npmjs/-/rimraf/3.0.2, ISC, approved, clearlydefined -npm/npmjs/-/rollup/4.24.0, MIT, approved, clearlydefined +npm/npmjs/-/rollup/4.24.0, MIT AND (ISC AND MIT), approved, #16917 npm/npmjs/-/run-parallel/1.2.0, MIT, approved, clearlydefined npm/npmjs/-/safe-array-concat/1.1.2, MIT, approved, clearlydefined npm/npmjs/-/safe-regex-test/1.0.3, MIT, approved, clearlydefined @@ -690,22 +690,22 @@ npm/npmjs/@react-hook/latest/1.0.3, MIT, approved, clearlydefined npm/npmjs/@reduxjs/toolkit/2.2.7, MIT AND (BSD-2-Clause AND ISC AND MIT) AND Apache-2.0, approved, #14170 npm/npmjs/@remix-run/router/1.19.2, MIT, approved, clearlydefined npm/npmjs/@rollup/pluginutils/5.1.2, MIT, approved, #16428 -npm/npmjs/@rollup/rollup-android-arm-eabi/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-android-arm64/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-darwin-arm64/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-darwin-x64/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-arm-musleabihf/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-arm64-musl/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-x64-gnu/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-linux-x64-musl/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-win32-ia32-msvc/4.24.0, MIT, approved, clearlydefined -npm/npmjs/@rollup/rollup-win32-x64-msvc/4.24.0, MIT, approved, clearlydefined +npm/npmjs/@rollup/rollup-android-arm-eabi/4.24.0, MIT AND (ISC AND MIT), approved, #16904 +npm/npmjs/@rollup/rollup-android-arm64/4.24.0, MIT AND (ISC AND MIT), approved, #16918 +npm/npmjs/@rollup/rollup-darwin-arm64/4.24.0, MIT AND (ISC AND MIT), approved, #16908 +npm/npmjs/@rollup/rollup-darwin-x64/4.24.0, MIT AND (ISC AND MIT), approved, #16901 +npm/npmjs/@rollup/rollup-linux-arm-gnueabihf/4.24.0, MIT AND (ISC AND MIT), approved, #16906 +npm/npmjs/@rollup/rollup-linux-arm-musleabihf/4.24.0, MIT AND (ISC AND MIT), approved, #16914 +npm/npmjs/@rollup/rollup-linux-arm64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16910 +npm/npmjs/@rollup/rollup-linux-arm64-musl/4.24.0, MIT AND (ISC AND MIT), approved, #16912 +npm/npmjs/@rollup/rollup-linux-powerpc64le-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16916 +npm/npmjs/@rollup/rollup-linux-riscv64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16907 +npm/npmjs/@rollup/rollup-linux-s390x-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16919 +npm/npmjs/@rollup/rollup-linux-x64-gnu/4.24.0, MIT AND (ISC AND MIT), approved, #16915 +npm/npmjs/@rollup/rollup-linux-x64-musl/4.24.0, MIT AND (ISC AND MIT), approved, #16911 +npm/npmjs/@rollup/rollup-win32-arm64-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16909 +npm/npmjs/@rollup/rollup-win32-ia32-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16913 +npm/npmjs/@rollup/rollup-win32-x64-msvc/4.24.0, MIT AND (ISC AND MIT), approved, #16902 npm/npmjs/@rtsao/scc/1.1.0, MIT, approved, clearlydefined npm/npmjs/@sinclair/typebox/0.27.8, MIT, approved, clearlydefined npm/npmjs/@sinonjs/commons/3.0.1, BSD-3-Clause, approved, #12905 diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 2e38d65f9..2268717f9 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -1070,13 +1070,14 @@ "heading": "Status der Eigenerklärung", "description": "Diese Seite bietet einen Überblick über den aktuellen Stand der Eigenerklärungen für Administratoren.", "reprocess": "Nachverarbeiten", - "complianceStatus": "Compliance-Status:", + "selfDescriptionFactoryInterface": "Self-Description Factory Schnittstelle", "legalPerson": "Juristische Person", "legalPersonDesc": "Übersicht über Unternehmen mit fehlender Eigenerklärung einer juristischen Person", "connectors": "Connectors", "connectorsDesc": "Übersicht über Unternehmen mit fehlender Eigenerklärung der Konnektoren", "errorMsg": "Fehler! Etwas ist schief gelaufen", - "noDataMsg": "Keine Datensätze gefunden." + "noDataMsg": "Keine Datensätze gefunden.", + "statusMsg": "Der Status der Self-Description Factory Schnittstelle kann nur durch Konfiguration (siehe Installationsanleitung) geändert werden" }, "addUser": { "headline": "Erstelle einen neuen User", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index 8ce25b01e..1ae8d2105 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -1075,13 +1075,14 @@ "heading": "Self-Description Document Status", "description": "This page provides an overview of the current status of self-descriptions for administrators.", "reprocess": "Reprocess", - "complianceStatus": "Compliance Status:", + "selfDescriptionFactoryInterface": "Self-Description Factory Interface", "legalPerson": "Legal Person", "legalPersonDesc": "Overview of companies with missing legal person self-description", "connectors": "Connectors", "connectorsDesc": "Overview of companies with missing connector self-description", "errorMsg": "Error! Something went wrong", - "noDataMsg": "No records found." + "noDataMsg": "No records found.", + "statusMsg": "The status of the self-description factory interface can only be changed by configuration (see installation manual)" }, "addUser": { "headline": "Add User Account", diff --git a/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSD.scss b/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSD.scss index 5734acbbd..c6ec20173 100644 --- a/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSD.scss +++ b/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSD.scss @@ -38,10 +38,16 @@ } .company-list-container { - max-height: 350px; - overflow-y: auto; - scrollbar-width: none; - -ms-overflow-style: none; + height: 350px; + max-width: 100%; + overflow: auto; + padding: 0; + margin: 0; + list-style-type: none; + } + + .legal-person-list { + padding-left: 25px; } .section { @@ -58,18 +64,35 @@ } .connectors-list { - gap: 10px; margin-top: 24px; - max-height: 350px; - overflow-y: auto; - scrollbar-width: none; - -ms-overflow-style: none; + height: 350px; + max-width: 100%; + overflow: auto; + padding: 0; + list-style-type: none; + padding-left: 25px; .connector { display: flex; - gap: 80px; + gap: 5px; padding: 5px; border-radius: 5px; + align-items: center; + + span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + flex: 1; + } + + .name { + flex: 1; + } + + .companyName { + flex: 2; + } } } @@ -81,22 +104,43 @@ } } - .compliance-status { - display: flex; - align-items: center; - margin-bottom: 40px; - margin-top: 50px; + .status-section { + margin-bottom: 25px; - label { - margin-right: 10px; - font-weight: bold; + .status-title { + background-color: #edf0f4; + padding: 20px 25px; + margin-bottom: 20px; + display: flex; } - .switch-container { + .status { + padding-left: 25px; display: flex; + justify-content: space-between; align-items: center; - margin-left: 5px; } + + .status-label { + font-weight: bold; + } + + .switch-container { + background-color: #ffffff; + } + } + + .list-container { + border: 1px solid rgb(220, 220, 220); + overflow: hidden; + border-radius: 24px; + } + + .list-title { + background-color: #f9f9f9; + padding: 15px; + margin-bottom: 10px; + padding-left: 25px; } .no-data-msg { diff --git a/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSDElements.tsx b/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSDElements.tsx index f37786ad9..a3de4426c 100644 --- a/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSDElements.tsx +++ b/src/components/pages/AdminClearingHouseSD/AdminClearingHouseSDElements.tsx @@ -34,11 +34,14 @@ import { useTriggerCompanyDataMutation, useTriggerConnectorsMutation, PAGE_SIZE, + type ConnectorsType, } from 'features/adminClearingHouseSD/adminClearingHouseSDApiSlice' import { error } from 'services/NotifyService' import { isClearinghouseConnectDisabled } from 'services/EnvironmentService' const AdminclearinghouseSDElements = () => { + const [companies, setCompanies] = useState([]) + const [connectors, setConnectors] = useState([]) const [checked, setChecked] = useState(isClearinghouseConnectDisabled()) const [triggerCompanyData] = useTriggerCompanyDataMutation() const [triggerConnectors] = useTriggerConnectorsMutation() @@ -62,15 +65,33 @@ const AdminclearinghouseSDElements = () => { } = useFetchCompanyDataQuery({ page: currentCompanyPage }) const { - data: connectors, + data: connectorsData, isFetching: isFetchingConnectors, refetch: refetchConnectors, } = useFetchConnectorsQuery({ page: currentConnectorPage }) + useEffect(() => { + if (companyData?.content?.length) { + setCompanies((prevCompanies) => [ + ...prevCompanies, + ...companyData.content, + ]) + } + }, [companyData]) + + useEffect(() => { + if (connectorsData?.content?.length) { + setConnectors((prevConnectors) => [ + ...prevConnectors, + ...connectorsData.content, + ]) + } + }, [connectorsData]) + const isCompanyDataAvailable = - !isFetchingCompanyData && (companyData?.content?.length ?? 0) > 0 + !isFetchingCompanyData && (companies?.length ?? 0) > 0 const isConnectorsDataAvailable = - !isFetchingConnectors && (connectors?.content?.length ?? 0) > 0 + !isFetchingConnectors && (connectors?.length ?? 0) > 0 // Load more companies const loadMoreCompanies = () => { @@ -90,9 +111,10 @@ const AdminclearinghouseSDElements = () => { const loadMoreConnectors = () => { if ( !isFetchingMoreConnectors && - (connectors?.meta?.page ?? 0) < (connectors?.meta?.totalPages ?? 1) - 1 + (connectorsData?.meta?.page ?? 0) < + (connectorsData?.meta?.totalPages ?? 1) - 1 ) { - const currentItemCount = connectors?.content?.length ?? 0 + const currentItemCount = connectorsData?.content?.length ?? 0 if (currentItemCount % PAGE_SIZE === 0) { setIsFetchingMoreConnectors(true) setCurrentConnectorPage((prev) => prev + 1) @@ -196,7 +218,7 @@ const AdminclearinghouseSDElements = () => { <> {isCompanyDataAvailable ? ( @@ -214,10 +236,10 @@ const AdminclearinghouseSDElements = () => { <> {isConnectorsDataAvailable ? (
- {connectors?.content?.map((connector) => ( + {connectors?.map((connector) => (
- {connector?.name} - {connector?.companyName} + {connector?.name} + {connector?.companyName}
))}
@@ -241,41 +263,54 @@ const AdminclearinghouseSDElements = () => { -
- - {t('content.clearinghouseSelfDescription.complianceStatus')} +
+ + {t( + 'content.clearinghouseSelfDescription.selfDescriptionFactoryInterface' + )} - -
- +
+ Status + + +
- - {t('content.clearinghouseSelfDescription.legalPerson')} - - - {t('content.clearinghouseSelfDescription.legalPersonDesc')} - - {isFetchingCompanyData ? ( -
- +
+
+ + {t('content.clearinghouseSelfDescription.legalPerson')} + + + {t('content.clearinghouseSelfDescription.legalPersonDesc')} +
- ) : ( - renderCompanyDataContent() - )} + +
+ {isFetchingCompanyData ? ( +
+ +
+ ) : ( + renderCompanyDataContent() + )} +
+
- - {t('content.clearinghouseSelfDescription.connectors')} - - - {t('content.clearinghouseSelfDescription.connectorsDesc')} - - - {isFetchingConnectors ? ( -
- +
+
+ + {t('content.clearinghouseSelfDescription.connectors')} + + + {t('content.clearinghouseSelfDescription.connectorsDesc')} +
- ) : ( - renderConnectorsContent() - )} + + {isFetchingConnectors ? ( +
+ +
+ ) : ( + renderConnectorsContent() + )} +