diff --git a/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx b/src/components/pages/EdcConnector/ConnectorDetailsOverlay.tsx index cc8169467..36db8c12e 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}