Skip to content

Commit

Permalink
updates(connectors): disable daps sections (#116)
Browse files Browse the repository at this point in the history
hide all DAPS related code in connectors screen

----------

Refs: CPLP-2701
Reviewed-By: Martin Rohrmeier <martin.ra.rohrmeier@bmw.de>
  • Loading branch information
manojava-gk authored Jul 12, 2023
1 parent 800e62e commit cf313c8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 37 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@
- Change the payload data as per backend logic
- App Subscription
- Add and Edit Tenant URL functionality in detail overlay
- Connectors
- Disable DAPS related sections
- Certificates
- Created New page under User profile
- Fetch Certificates and connected to UI
- Data Space
- Static Pages
- Data Space
- Catena-X Participant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Box sx={{ width: '100%' }} className="connector-insert-form">
Expand Down Expand Up @@ -295,7 +295,8 @@ const ConnectorInsertForm = ({
/>
</div>
)}
<div className="form-input">
{/* TO-DO: Enable when DAPS enabled */}
{/* <div className="form-input">
<ConnectorFormInput
{...{
control,
Expand All @@ -316,7 +317,7 @@ const ConnectorInsertForm = ({
),
}}
/>
</div>
</div> */}
</form>
</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ export type FormFieldsType = {
ConnectorURL: string
ConnectorBPN: string
ConnectorLocation: string
ConnectorDoc: any
// ConnectorDoc: any TO-DO: Enable when DAPS enabled
}

const formFields = {
ConnectorName: '',
ConnectorURL: '',
ConnectorBPN: '',
ConnectorLocation: '',
ConnectorDoc: '',
// ConnectorDoc: '', TO-DO: Enable when DAPS enabled
}

const AddConnectorOverlay = ({
Expand Down Expand Up @@ -94,7 +94,7 @@ const AddConnectorOverlay = ({
'ConnectorName',
'ConnectorURL',
'ConnectorBPN',
'ConnectorDoc',
// 'ConnectorDoc', TO-DO: Enable when DAPS enabled
])
if (validateFields) {
onFormConfirmClick(getValues() as FormFieldsType)
Expand Down
41 changes: 20 additions & 21 deletions src/components/pages/EdcConnector/edcConnectorTableColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -71,25 +70,25 @@ export const ConnectorTableColumns = (
<Typography variant="body2">{row.location}</Typography>
),
},
{
field: 'dapsRegistrationSuccessful',
headerName: t('content.edcconnector.columns.status'),
flex: 1.2,
sortable: false,
disableColumnMenu: true,
align: 'center',
headerAlign: 'center',
renderCell: ({ row }: { row: any }) => (
<Box>
<LockIcon
sx={{
color: row.dapsRegistrationSuccessful ? 'green' : '#b6b6b6',
cursor: 'pointer',
}}
/>
</Box>
),
},
// {
// field: 'dapsRegistrationSuccessful',
// headerName: t('content.edcconnector.columns.status'),
// flex: 1.2,
// sortable: false,
// disableColumnMenu: true,
// align: 'center',
// headerAlign: 'center',
// renderCell: ({ row }: { row: any }) => (
// <Box>
// <LockIcon
// sx={{
// color: row.dapsRegistrationSuccessful ? 'green' : '#b6b6b6',
// cursor: 'pointer',
// }}
// />
// </Box>
// ),
// },
{
field: 'selfDescriptionDocumentId',
headerName: t('content.edcconnector.columns.sdDescription'),
Expand Down Expand Up @@ -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',
Expand Down
7 changes: 4 additions & 3 deletions src/components/pages/EdcConnector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ const EdcConnector = () => {
!params.row.dapsRegistrationSuccessful
) {
setSelectedConnector(params.row as ConnectorContentAPIResponse)
setCreateDapsModalOpen(true)
//TO-DO: Enable when DAPS enabled
//setCreateDapsModalOpen(true)
}
}

Expand All @@ -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)
Expand Down

0 comments on commit cf313c8

Please sign in to comment.