From cd8801ad27b3d9c0207b02e55d8965c98aec3532 Mon Sep 17 00:00:00 2001 From: manojava-gk Date: Mon, 3 Jul 2023 16:34:05 +0530 Subject: [PATCH] updates(connectors): disable daps sections --- CHANGELOG.md | 2 + .../components/ConnectorInsertForm.tsx | 19 +++++---- .../AddConnectorOverlay/index.tsx | 6 +-- .../EdcConnector/edcConnectorTableColumns.tsx | 41 +++++++++---------- src/components/pages/EdcConnector/index.tsx | 7 ++-- 5 files changed, 39 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 436fca238..bfb685207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,8 @@ - Change the payload data as per backend logic - App Subscription - Add and Edit Tenant URL functionality in detail overlay +- Connectors + - Disable DAPS related sections ## 1.5.0 diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx index e060cec77..3c3b88e31 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx @@ -160,13 +160,13 @@ const ConnectorInsertForm = ({ const { t } = useTranslation() const theme = useTheme() const { spacing } = theme - - const dropzoneProps = { - accept: { - 'application/x-pem-file': [], - 'application/x-x509-ca-cert': [], - }, - } + //TO-DO: Enable when DAPS enabled + // const dropzoneProps = { + // accept: { + // 'application/x-pem-file': [], + // 'application/x-x509-ca-cert': [], + // }, + // } return ( @@ -295,7 +295,8 @@ const ConnectorInsertForm = ({ /> )} -
+ {/* TO-DO: Enable when DAPS enabled */} + {/*
-
+
*/} diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx index ec0f0a038..bfe74f642 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx @@ -49,7 +49,7 @@ export type FormFieldsType = { ConnectorURL: string ConnectorBPN: string ConnectorLocation: string - ConnectorDoc: any + // ConnectorDoc: any TO-DO: Enable when DAPS enabled } const formFields = { @@ -57,7 +57,7 @@ const formFields = { ConnectorURL: '', ConnectorBPN: '', ConnectorLocation: '', - ConnectorDoc: '', + // ConnectorDoc: '', TO-DO: Enable when DAPS enabled } const AddConnectorOverlay = ({ @@ -94,7 +94,7 @@ const AddConnectorOverlay = ({ 'ConnectorName', 'ConnectorURL', 'ConnectorBPN', - 'ConnectorDoc', + // 'ConnectorDoc', TO-DO: Enable when DAPS enabled ]) if (validateFields) { onFormConfirmClick(getValues() as FormFieldsType) diff --git a/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx b/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx index 488a90a87..b56b30542 100644 --- a/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx +++ b/src/components/pages/EdcConnector/edcConnectorTableColumns.tsx @@ -26,7 +26,6 @@ import { } from '@catena-x/portal-shared-components' import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline' import CheckBoxIcon from '@mui/icons-material/CheckBox' -import LockIcon from '@mui/icons-material/Lock' import Box from '@mui/material/Box' import { ConnectorContentAPIResponse } from 'features/connector/types' @@ -71,25 +70,25 @@ export const ConnectorTableColumns = ( {row.location} ), }, - { - field: 'dapsRegistrationSuccessful', - headerName: t('content.edcconnector.columns.status'), - flex: 1.2, - sortable: false, - disableColumnMenu: true, - align: 'center', - headerAlign: 'center', - renderCell: ({ row }: { row: any }) => ( - - - - ), - }, + // { + // field: 'dapsRegistrationSuccessful', + // headerName: t('content.edcconnector.columns.status'), + // flex: 1.2, + // sortable: false, + // disableColumnMenu: true, + // align: 'center', + // headerAlign: 'center', + // renderCell: ({ row }: { row: any }) => ( + // + // + // + // ), + // }, { field: 'selfDescriptionDocumentId', headerName: t('content.edcconnector.columns.sdDescription'), @@ -139,7 +138,7 @@ export const ConnectorTableColumns = ( { field: 'details', headerName: t('content.edcconnector.columns.details'), - flex: 1, + flex: 1.2, sortable: false, disableColumnMenu: true, align: 'center', diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index 0e90dc01e..a93844821 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -125,7 +125,8 @@ const EdcConnector = () => { !params.row.dapsRegistrationSuccessful ) { setSelectedConnector(params.row as ConnectorContentAPIResponse) - setCreateDapsModalOpen(true) + //TO-DO: Enable when DAPS enabled + //setCreateDapsModalOpen(true) } } @@ -137,13 +138,13 @@ const EdcConnector = () => { } const onFormSubmit = async (data: FormFieldsType) => { - console.log(data.ConnectorDoc) const body = new FormData() body.append('Name', data.ConnectorName) body.append('ConnectorUrl', data.ConnectorURL) body.append('Location', data.ConnectorLocation) body.append('Status', ConnectorStatusType.PENDING) - body.append('Certificate', data.ConnectorDoc) + //TO-DO: Enable when DAPS enabled + // body.append('Certificate', data.ConnectorDoc) setLoading(true) if (selectedService.type === ConnectType.COMPANY_CONNECTOR) { await createConnector(body)