diff --git a/CHANGELOG.md b/CHANGELOG.md index 9896a00f0..aa6daf952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 2.0.0-RC3 + +### Bugfix + +- Technical Setup + - fixed white page issue on connector registration with "Existing Technical User" selection + ## 2.0.0-RC2 ### Change diff --git a/package.json b/package.json index f8c9250f0..90dff1746 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v2.0.0-RC2", + "version": "v2.0.0-RC3", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx index 87b7debc5..a34e587d1 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx @@ -35,7 +35,7 @@ import HelpOutlineIcon from '@mui/icons-material/HelpOutline' import Patterns from 'types/Patterns' import { ConnectType } from 'features/connector/connectorApiSlice' import { Dropzone } from '../../../../shared/basic/Dropzone' -import { useState } from 'react' +import { useEffect, useState } from 'react' import './EdcComponentStyles.scss' const ConnectorFormInput = ({ @@ -254,6 +254,16 @@ const ConnectorInsertForm = ({ any) => { const { t } = useTranslation() const [selectedValue, setSelectedValue] = useState() + const [serviceAccountUsers, setServiceAccountUsers] = useState([]) + + useEffect(() => { + if (fetchServiceAccountUsers?.content) + setServiceAccountUsers( + fetchServiceAccountUsers.content?.filter( + (item: { name: string }) => item.name + ) + ) + }, [fetchServiceAccountUsers]) const handleTechnicalUserSubmit = () => { if ( @@ -364,9 +374,9 @@ any) => { helperText: t( 'content.edcconnector.modal.insertform.technicalUser.error' ), - items: fetchServiceAccountUsers?.content, + items: serviceAccountUsers, defaultSelectValue: {}, - keyTitle: 'clientId', + keyTitle: 'name', }} /> )} diff --git a/src/features/admin/serviceApiSlice.ts b/src/features/admin/serviceApiSlice.ts index b9cbd5d13..253e3e728 100644 --- a/src/features/admin/serviceApiSlice.ts +++ b/src/features/admin/serviceApiSlice.ts @@ -165,9 +165,9 @@ export const apiSlice = createApi({ method: 'POST', }), }), - fetchServiceAccountUsers: builder.query({ + fetchServiceAccountUsers: builder.query({ query: () => - '/api/administration/serviceaccount/owncompany/serviceaccounts?page=0&size=10&filterForInactive=false', + `/api/administration/serviceaccount/owncompany/serviceaccounts?page=0&size=${PAGE_SIZE}&filterForInactive=false`, }), }), })