From dfcbff8594423a6fe270d0dff8ecdb8128fb3ddb Mon Sep 17 00:00:00 2001 From: manojava-gk Date: Mon, 14 Oct 2024 14:59:59 +0530 Subject: [PATCH 1/3] fix(application request): display appropriate document information in the company details overlay --- CHANGELOG.md | 2 ++ .../RegistrationRequests/CompanyDetailOverlay/index.tsx | 5 +++-- src/features/admin/registration/types.ts | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21e76bb30..f828ba543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - **Service Subscriptions** - rename 'Configure' button to 'Activate' button [#1150](https://github.com/eclipse-tractusx/portal-frontend/pull/1150) +- **Application Request** + - display appropriate document information in the company details overlay ## 2.3.0-alpha.2 diff --git a/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/index.tsx b/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/index.tsx index 9977b9e0d..2bb2b28ef 100644 --- a/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/index.tsx +++ b/src/components/pages/Admin/components/RegistrationRequests/CompanyDetailOverlay/index.tsx @@ -192,9 +192,10 @@ const CompanyDetailOverlay = ({ key: '', value: ( <> - {company?.documents && company.documents.length > 0 ? ( + {selectedCompany?.documents && + selectedCompany.documents.length > 0 ? ( <> - {company.documents.map( + {selectedCompany.documents.map( (contract: { documentId: string documentType: string diff --git a/src/features/admin/registration/types.ts b/src/features/admin/registration/types.ts index 121480d0e..dc543f9f7 100644 --- a/src/features/admin/registration/types.ts +++ b/src/features/admin/registration/types.ts @@ -20,6 +20,7 @@ import type { PaginResult } from '@catena-x/portal-shared-components' import { initialPaginResult, RequestState } from 'types/MainTypes' +import { type DocumentMapper } from '../applicationRequestApiSlice' export const name = 'admin/registration' @@ -63,6 +64,7 @@ export type CompanyDetail = { uniqueIds?: Array countryAlpha2Code?: string companyUser: Array + documents: Array } export type RegistrationRequestDocument = { From f5484af18a6b4069a74153e856cebed04ff40789 Mon Sep 17 00:00:00 2001 From: manojava-gk Date: Mon, 14 Oct 2024 15:02:02 +0530 Subject: [PATCH 2/3] fix(application request): update notes with pr info --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f828ba543..f07eb5f77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - **Service Subscriptions** - rename 'Configure' button to 'Activate' button [#1150](https://github.com/eclipse-tractusx/portal-frontend/pull/1150) - **Application Request** - - display appropriate document information in the company details overlay + - display appropriate document information in the company details overlay [#1223](https://github.com/eclipse-tractusx/portal-frontend/pull/1223) ## 2.3.0-alpha.2 From de340bfe04947d0903eab8cfac95f03060fbfed6 Mon Sep 17 00:00:00 2001 From: manojava-gk Date: Thu, 17 Oct 2024 14:35:54 +0530 Subject: [PATCH 3/3] fix(connector management): do not show regular overlay when error detail is shown. refetch connector details to fix cache issue in the details overlay --- CHANGELOG.md | 2 + .../EdcConnector/ConnectorDetailsOverlay.tsx | 465 +++++++++--------- src/components/pages/EdcConnector/index.tsx | 1 + 3 files changed, 239 insertions(+), 229 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b718e9f7b..7296d3063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - **App Subscription Management** - fixed 'read more' link by adding link [#1200](https://github.com/eclipse-tractusx/portal-frontend/pull/1200) +- **Connector Management** + - do not show regular overlay when error detail is shown. refetch connector details to fix cache issue in the details overlay ### Feature diff --git a/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx b/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx index cc8169467..9fd527059 100644 --- a/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx +++ b/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx @@ -274,260 +274,267 @@ const ConnectorDetailsOverlay = ({ )} - - - - {isFetching ? ( -
- -
- ) : ( - <> - - - {t( - 'content.edcconnector.details.configureYourConnectorDetails' - )} - - - - - - - {t('content.edcconnector.details.name')} - - } - value={fetchConnectorDetails?.name ?? ''} - disabled={true} - sx={{ mb: 2 }} - /> - - - - {t('content.edcconnector.details.url')} - - } - value={connectorUrlValue} - disabled={enableConnectorUrl} - onChange={(e) => { - validateURL(e.target.value) - }} - /> - - {urlErrorMsg} + + + {isFetching ? ( +
+ +
+ ) : ( + <> + + + {t( + 'content.edcconnector.details.configureYourConnectorDetails' + )} -
- - {}} + variant="outlined" size="small" - sx={{ - mt: 8, - }} - onClick={() => { - setEnableConnectorUrl(false) - setEnableUrlApiErrorMsg(false) - }} - disabled={!userHasPortalRole(ROLES.MODIFY_CONNECTORS)} + disabled > - + + + + + {t('content.edcconnector.details.name')} + + } + value={fetchConnectorDetails?.name ?? ''} + disabled={true} + sx={{ mb: 2 }} + /> + + + + {t('content.edcconnector.details.url')} + + } + value={connectorUrlValue} + disabled={enableConnectorUrl} + onChange={(e) => { + validateURL(e.target.value) }} /> - - - {!enableConnectorUrl && ( - <> - - {t('content.edcconnector.details.note')} - - - {t('content.edcconnector.details.noteDesc')} + + {urlErrorMsg} - + + { + setEnableConnectorUrl(false) + setEnableUrlApiErrorMsg(false) + }} + disabled={!userHasPortalRole(ROLES.MODIFY_CONNECTORS)} > - - {confirmLoading ? ( - { - // do nothing - }} - loading={confirmLoading} - label={t('global.actions.confirm')} - loadIndicator="Loading..." - /> - ) : ( - )} - - - )} -
- {enableUrlApiErrorMsg && ( - - {t('content.edcconnector.details.urlErrorMessage')} - - )} - - {detailsData.map((item) => { - return ( - { + // do nothing + }} + loading={confirmLoading} + label={t('global.actions.confirm')} + loadIndicator="Loading..." + /> + ) : ( + + )} + + + )} + + {enableUrlApiErrorMsg && ( + - - - {item.key} - - - - {item.key === - t('content.edcconnector.details.SdRegistration') ? ( - - - - ) : ( - + {t('content.edcconnector.details.urlErrorMessage')} + + )} + + {detailsData.map((item) => { + return ( + + - {item.value} + {item.key} - )} + + {item.key === + t('content.edcconnector.details.SdRegistration') ? ( + + + + ) : ( + + + {item.value} + + + )} + + ) + })} + + + + {t('content.edcconnector.details.SdDocument')} + + + + + {fetchConnectorDetails?.selfDescriptionDocumentId === + null ? ( + t('content.edcconnector.details.noDocumentAvailable') + ) : ( + + + + + )} + - ) - })} - - - - {t('content.edcconnector.details.SdDocument')} - - - - - {fetchConnectorDetails?.selfDescriptionDocumentId === - null ? ( - t('content.edcconnector.details.noDocumentAvailable') - ) : ( - - - - - )} - - - - - )} -
- - - -
+ + + )} + + + + + + )} ) } diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index a8cd76b83..0b4e91024 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -356,6 +356,7 @@ const EdcConnector = () => { { + setOverlayData(undefined) setOpenDetailsOverlay(false) }} overlayData={overlayData}