From db0d0c70d4861094f39efa17c56c0cdb4cfffcbd Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:20:52 +0530 Subject: [PATCH 01/36] feat(card responsive): made card responsive in usermanagemtn (#171) --- src/components/pages/AppOverview/AppOverview.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/pages/AppOverview/AppOverview.scss b/src/components/pages/AppOverview/AppOverview.scss index c4a52aed7..d25ee2a1e 100644 --- a/src/components/pages/AppOverview/AppOverview.scss +++ b/src/components/pages/AppOverview/AppOverview.scss @@ -55,6 +55,7 @@ flex-wrap: wrap; gap: 20px; width: 1140px; + max-width: 100%; margin: 0px auto; padding-bottom: 40px; From fdf184c9a78f8b668f9c2d68f80e64d7ed5f4672 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:21:22 +0530 Subject: [PATCH 02/36] bugfix(config): change app management page role (#169) --- src/types/Config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/Config.tsx b/src/types/Config.tsx index 0e4d97758..20b68c030 100644 --- a/src/types/Config.tsx +++ b/src/types/Config.tsx @@ -202,7 +202,7 @@ export const ALL_PAGES: IPage[] = [ }, { name: PAGES.APP_MANAGEMENT, - role: ROLES.SERVICEMANAGEMENT_VIEW, + role: ROLES.APPMANAGEMENT_VIEW, element: , }, { From f1075cee2c5f710dc915474c0cd16f26a27f30a3 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:21:46 +0530 Subject: [PATCH 03/36] feat(ssi credential): add status for pending state only (#168) --- .../AdminCredentialElements.tsx | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/src/components/pages/AdminCredential/AdminCredentialElements.tsx b/src/components/pages/AdminCredential/AdminCredentialElements.tsx index fe8a32e2f..27361b993 100644 --- a/src/components/pages/AdminCredential/AdminCredentialElements.tsx +++ b/src/components/pages/AdminCredential/AdminCredentialElements.tsx @@ -34,6 +34,7 @@ import { download } from 'utils/downloadUtils' import { useFetchNewDocumentByIdMutation } from 'features/appManagement/apiSlice' import { error, success } from 'services/NotifyService' import { uniqueId } from 'lodash' +import { SubscriptionStatus } from 'features/apps/apiSlice' export interface DummyData { date: string @@ -95,6 +96,7 @@ export default function AdminCredentialElements() { status === StatusType.APPROVE ? success(t('content.adminCertificate.approvedMessage')) : error(t('content.adminCertificate.declinedMessage')) + setRefresh(Date.now()) }) .catch(() => { error(t('content.adminCertificate.errorMessage')) @@ -165,28 +167,38 @@ export default function AdminCredentialElements() { flex: 2.5, renderCell: ({ row }: { row: CredentialData }) => ( <> - - + {row.participantStatus === SubscriptionStatus.PENDING && ( + <> + + + + )} ), }, From a4557454dd1bca116247425f8b4751daea57ad4e Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:22:20 +0530 Subject: [PATCH 04/36] updates(connector): update content and help link (#162) --- public/index.html | 2 +- scripts/inject-dynamic-env.sh | 4 +- src/assets/locales/de/main.json | 15 ++ src/assets/locales/en/main.json | 15 ++ .../ConfigurationDetailsOverlay.tsx | 156 ++++++++++++++++++ .../pages/EdcConnector/EdcConnector.scss | 10 ++ src/components/pages/EdcConnector/index.tsx | 12 ++ .../shared/frame/PictureWithText/index.tsx | 22 +++ src/features/connector/connectorApiSlice.ts | 9 + src/services/EnvironmentService.ts | 4 + 10 files changed, 246 insertions(+), 3 deletions(-) create mode 100644 src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx diff --git a/public/index.html b/public/index.html index 3f4b360c6..e1dcf0356 100644 --- a/public/index.html +++ b/public/index.html @@ -30,7 +30,7 @@
diff --git a/scripts/inject-dynamic-env.sh b/scripts/inject-dynamic-env.sh index 36202884d..215d2323a 100644 --- a/scripts/inject-dynamic-env.sh +++ b/scripts/inject-dynamic-env.sh @@ -19,8 +19,8 @@ # SPDX-License-Identifier: Apache-2.0 ############################################################### -custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'"}' -custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net"}' +custom_env_vars='{PORTAL_ASSETS_URL:"'$PORTAL_ASSETS_URL'",PORTAL_BACKEND_URL:"'$PORTAL_BACKEND_URL'",CENTRALIDP_URL:"'$CENTRALIDP_URL'",BPDM_API_URL:"'$BPDM_API_URL'",SEMANTICS_URL:"'$SEMANTICS_URL'",MANAGED_IDENTITY_WALLETS_NEW_URL:"'$MANAGED_IDENTITY_WALLETS_NEW_URL'"}' +custom_env_vars_anchor='{PORTAL_ASSETS_URL:"http://localhost:3000/assets",PORTAL_BACKEND_URL:"https://portal-backend.dev.demo.catena-x.net",CENTRALIDP_URL:"https://centralidp.dev.demo.catena-x.net/auth",BPDM_API_URL:"https://partners-pool.dev.demo.catena-x.net/api",SEMANTICS_URL:"https://semantics.dev.demo.catena-x.net",MANAGED_IDENTITY_WALLETS_NEW_URL:"https://managed-identity-wallets-new.dev.demo.catena-x.net"}' index_html_reference=`cat /usr/share/nginx/html/index.html.reference` index_html=${index_html_reference//$custom_env_vars_anchor/$custom_env_vars} echo "$index_html" > /usr/share/nginx/html/index.html diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 3829be999..249824749 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -454,7 +454,22 @@ "owned": "Owned", "managed": "Managed" }, + "configurationDetails": { + "title": "Connector Configuration for authentication flow", + "description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.", + "orderList": { + "title": "Below you can find the relevant details regarding all those values", + "centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token", + "clientId": "* client id: client id of your existing or newly created tech user - details how to: ", + "clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ", + "clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "authorityBpn": "* authority bpn: {{bpn}}", + "miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}" + } + }, "helpText": "Get some help", + "helpTextNew": "Details Connector Configuration", "headertitle": "Connector Registration", "subheadertitle": "Connector", "tabletitle": "Onboarded Connectors", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index d6d90ea73..2b39b1792 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -453,7 +453,22 @@ "owned": "Owned", "managed": "Managed" }, + "configurationDetails": { + "title": "Connector Configuration for authentication flow", + "description": "Your edc instance need to get connected to the catena-x identity provider for the technical user authentication flow to fetch the user token and authenticate against the MIW. Additionally the MIW endpoint, authority BPN and your technical user need to get configured/set to ensure that the connection works correctly.", + "orderList": { + "title": "Below you can find the relevant details regarding all those values", + "centralAuth": "* central auth url: https:{{env}}/realms/CX-Central/protocol/openid-connect/token", + "clientId": "* client id: client id of your existing or newly created tech user - details how to: ", + "clientIdLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "clientSecret": "* client secret: client id of your existing or newly created tech user - details how to: ", + "clientSecretLink": "https://portal.int.demo.catena-x.net/documentation/?path=docs%2F03.+User+Management%2F03.+Technical+User%2F02.+Create+Technical+User.md", + "authorityBpn": "* authority bpn: {{bpn}}", + "miwUrl": "* miw url: https:{{managedIdentityWalletApiBase}}" + } + }, "helpText": "Get some help", + "helpTextNew": "Details Connector Configuration", "headertitle": "Connector Registration", "subheadertitle": "Connector", "tabletitle": "Onboarded Connectors", diff --git a/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx b/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx new file mode 100644 index 000000000..21ddc4b78 --- /dev/null +++ b/src/components/pages/EdcConnector/ConfigurationDetailsOverlay.tsx @@ -0,0 +1,156 @@ +/******************************************************************************** + * Copyright (c) 2021, 2023 BMW Group AG + * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +import { Trans, useTranslation } from 'react-i18next' +import { + Dialog, + DialogContent, + DialogHeader, + Typography, +} from '@catena-x/portal-shared-components' +import { useFetchOperatorBpnQuery } from 'features/connector/connectorApiSlice' +import { + getCentralIdp, + getManagedIdentityWalletsNewBase, +} from 'services/EnvironmentService' +import './EdcConnector.scss' + +interface ConfigurationDetailsOverlayProps { + openDialog: boolean + handleOverlayClose: () => void +} + +const ConfigurationDetailsOverlay = ({ + openDialog = false, + handleOverlayClose, +}: ConfigurationDetailsOverlayProps) => { + const { t } = useTranslation() + const { data } = useFetchOperatorBpnQuery() + + return ( +
+ + { + handleOverlayClose() + }} + /> + + + {t('content.edcconnector.configurationDetails.orderList.title')} + + + + {t( + 'content.edcconnector.configurationDetails.orderList.centralAuth' + )} + + + + + {t('content.edcconnector.configurationDetails.orderList.clientId')}{' '} + + window.open( + t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + ), + '_blank' + ) + } + > + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + )} + + + + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecret' + )}{' '} + + window.open( + t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + ), + '_blank' + ) + } + > + {t( + 'content.edcconnector.configurationDetails.orderList.clientSecretLink' + )} + + + {data && ( + + + {t( + 'content.edcconnector.configurationDetails.orderList.authorityBpn' + )} + + + )} + + + {t('content.edcconnector.configurationDetails.orderList.miwUrl')} + + + + +
+ ) +} + +export default ConfigurationDetailsOverlay diff --git a/src/components/pages/EdcConnector/EdcConnector.scss b/src/components/pages/EdcConnector/EdcConnector.scss index 96fcc4b8a..3b230cf91 100644 --- a/src/components/pages/EdcConnector/EdcConnector.scss +++ b/src/components/pages/EdcConnector/EdcConnector.scss @@ -51,3 +51,13 @@ margin-bottom: 0px; } } + +.detailsBodyText { + margin-bottom: 10px !important; + margin-left: 20px !important; +} + +.detailsBodyLink { + cursor: pointer; + color: #0f71cb; +} diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index 95af08ec7..79bdb1ebb 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -53,6 +53,7 @@ import CreateDapsRegistration from './AddConnectorOverlay/components/CreateDapsR import { SuccessErrorType } from 'features/admin/appuserApiSlice' import { ManagedConnectorTableColumns } from './edcManagedConnectorTableColumns' import { OwnConnectorTableColumns } from './edcOwnConnectorTableColumns' +import ConfigurationDetailsOverlay from './ConfigurationDetailsOverlay' const EdcConnector = () => { const { t } = useTranslation() @@ -88,6 +89,10 @@ const EdcConnector = () => { const [createDapsModalOpen, setCreateDapsModalOpen] = useState(false) useState(false) const [triggerDaps] = useTriggerDapsMutation() + const [ + viewConfigurationDetailsOverlayOpen, + setViewConfigurationDetailsOverlayOpen, + ] = useState(false) const onStepChange = () => { setAddConnectorOverlayCurrentStep(0) @@ -287,6 +292,10 @@ const EdcConnector = () => { loading={loading} onStepChange={onStepChange} /> + setViewConfigurationDetailsOverlayOpen(false)} + /> { text={'content.edcconnector.imagetext'} onHelpButtonClicked={() => onHelpButtonClicked()} onButtonClicked={() => setAddConnectorOverlayOpen(true)} + onNewHelpButtonClicked={() => + setViewConfigurationDetailsOverlayOpen(true) + } />
diff --git a/src/components/shared/frame/PictureWithText/index.tsx b/src/components/shared/frame/PictureWithText/index.tsx index 2ead4484f..8ee552d51 100644 --- a/src/components/shared/frame/PictureWithText/index.tsx +++ b/src/components/shared/frame/PictureWithText/index.tsx @@ -30,6 +30,7 @@ type PictureWithTextProps = { text: string onButtonClicked?: () => void onHelpButtonClicked?: () => void + onNewHelpButtonClicked?: () => void } export default function PictureWithText({ @@ -37,6 +38,7 @@ export default function PictureWithText({ text, onButtonClicked, onHelpButtonClicked, + onNewHelpButtonClicked, }: PictureWithTextProps) { const { t } = useTranslation() @@ -65,6 +67,26 @@ export default function PictureWithText({ > {t('content.edcconnector.helpText')} + {onNewHelpButtonClicked && ( + + )} + + ) + ) + } + const renderDocuments = () => { - return type === DocumentTypeText.CONFORMITY_DOCUMENT - ? documents[DocumentTypeText.CONFORMITY_APPROVAL_BUSINESS_APPS].map( - (document: DocumentData) => ( -
  • - + return documents.hasOwnProperty(DocumentTypeId.ADDITIONAL_DETAILS) || + documents.hasOwnProperty( + DocumentTypeId.APP_TECHNICAL_INFORMATION || + documents.hasOwnProperty(DocumentTypeId.APP_CONTRACT) + ) ? ( + Object.keys(documents).map( + (document) => + (document === DocumentTypeId.APP_CONTRACT || + document === DocumentTypeId.ADDITIONAL_DETAILS || + document === DocumentTypeId.APP_TECHNICAL_INFORMATION) && ( +
  • +
  • ) - ) - : Object.keys(documents).map( - (document) => - document !== DocumentTypeText.CONFORMITY_APPROVAL_BUSINESS_APPS && ( -
  • - - -
  • - ) - ) + ) + ) : ( + + {t('global.errors.noDocumentsAvailable')} + + ) } return ( -
    - + <> + {t(`content.adminboardDetail.${type}.heading`)} - + {t(`content.adminboardDetail.${type}.message`)} -
      - {checkDocumentExist ? ( - renderDocuments() - ) : ( - - {t('global.errors.noDocumentsAvailable')} - - )} -
    -
    + {type === DocumentTypeText.CONFORMITY_DOCUMENT + ? renderConformityDocument() + : renderDocuments()} + ) } diff --git a/src/components/pages/AdminBoardDetail/components/BoardHeader/BoardHeader.scss b/src/components/pages/AdminBoardDetail/components/BoardHeader/BoardHeader.scss index 87fd3b66f..1541e2c1d 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardHeader/BoardHeader.scss +++ b/src/components/pages/AdminBoardDetail/components/BoardHeader/BoardHeader.scss @@ -19,7 +19,7 @@ ********************************************************************************/ .adminboard-header { - margin: 30px -15px 94px -15px; + margin: 30px -15px 0px -15px; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; @@ -47,33 +47,6 @@ line-height: 24px; color: #888888; } - .heading { - margin: 0 0 10px 0; - color: #111111; - } - ul { - display: flex; - align-items: center; - margin: 0 0 10px 0; - padding: 0; - } - .usecase, - .language, - .price { - display: flex; - align-items: center; - flex: 1; - flex-wrap: wrap; - margin: 0 0 10px 0; - font-weight: 400; - font-size: 16px; - line-height: 24px; - color: #888888; - .head { - margin-right: 5px; - font-size: 16px; - } - } .subscribed-success-btn { pointer-events: none; } diff --git a/src/components/pages/AdminBoardDetail/components/BoardHeader/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardHeader/index.tsx index 1e3eff191..ea2e5349b 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardHeader/index.tsx +++ b/src/components/pages/AdminBoardDetail/components/BoardHeader/index.tsx @@ -25,7 +25,13 @@ import { AppDetails } from 'features/apps/details/types' import { useFetchDocumentByIdMutation } from 'features/apps/apiSlice' import CommonService from 'services/CommonService' import './BoardHeader.scss' +import { Grid } from '@mui/material' +enum CardDetails { + LANGUAGE = 'language', + USECASE = 'useCase', + PRICE = 'price', +} export interface AppDetailHeaderProps { item: AppDetails } @@ -56,38 +62,36 @@ export default function BoardHeader({ item }: AppDetailHeaderProps) { } } + const getAppData = (field: string) => { + if (field === CardDetails.LANGUAGE) return item?.languages.join(', ') + else if (field === CardDetails.USECASE) return item?.useCases.join(', ') + else if (field === CardDetails.PRICE) return item?.price + } + return (
    {item.title}
    - + {item.provider} - + {item.title} -
    - - {t('content.adminboardDetail.language')}:{' '} - - {item.languages?.map((lang, index) => ( - {(index ? ', ' : '') + lang} - ))} -
    -
    - - {t('content.adminboardDetail.usecase')}:{' '} - - {item.useCases?.map((useCase) => useCase).join(', ')} -
    -
    - - {t('content.adminboardDetail.price')}:{' '} - - {item.price} -
    + + {[CardDetails.LANGUAGE, CardDetails.USECASE, CardDetails.PRICE].map( + (field) => ( +
    + + {t(`content.apprelease.validateAndPublish.${field}`)} + {getAppData(field)} + +
    + ) + )} +
    ) diff --git a/src/components/pages/AdminBoardDetail/components/BoardImageGallery/BoardImageGallery.scss b/src/components/pages/AdminBoardDetail/components/BoardImageGallery/BoardImageGallery.scss deleted file mode 100644 index 43dcfadbb..000000000 --- a/src/components/pages/AdminBoardDetail/components/BoardImageGallery/BoardImageGallery.scss +++ /dev/null @@ -1,32 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022 BMW Group AG - * Copyright (c) 2021,2022 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -.adminboard-gallery { - margin-bottom: 93px; - .img-col { - height: 100%; - img { - height: 60%; - width: 100%; - object-fit: cover; - border-radius: 10px; - } - } -} diff --git a/src/components/pages/AdminBoardDetail/components/BoardImageGallery/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardImageGallery/index.tsx deleted file mode 100644 index 9719b2175..000000000 --- a/src/components/pages/AdminBoardDetail/components/BoardImageGallery/index.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021,2022 BMW Group AG - * Copyright (c) 2021,2022 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -import './BoardImageGallery.scss' -import { Carousel, ImageType } from '@catena-x/portal-shared-components' - -export default function BoardImageGallery({ images }: { images: ImageType[] }) { - return ( -
    - - {images?.map((image) => ( -
    - {image.text} -
    - ))} -
    -
    - ) -} diff --git a/src/components/pages/AdminBoardDetail/components/BoardPrivacy/BoardPrivacy.scss b/src/components/pages/AdminBoardDetail/components/BoardPrivacy/BoardPrivacy.scss index f86c28a44..3755db273 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardPrivacy/BoardPrivacy.scss +++ b/src/components/pages/AdminBoardDetail/components/BoardPrivacy/BoardPrivacy.scss @@ -19,14 +19,16 @@ ********************************************************************************/ .board-privacy { - margin-bottom: 93px; .privacy-content { - margin-bottom: 30px; + margin-bottom: 32px; + } + .app-policies { + padding: 0 20px; } .policies-list { display: flex; flex-wrap: wrap; - max-width: 800px; + max-width: none; margin: 0 auto; .policy-name { width: 50%; @@ -39,13 +41,4 @@ margin-right: 5px; } } - .table-text { - max-width: 850px; - font-weight: 600; - text-align: center; - background-color: #ecf0f4; - padding: 2px; - border-radius: 5px; - margin: 0 auto; - } } diff --git a/src/components/pages/AdminBoardDetail/components/BoardPrivacy/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardPrivacy/index.tsx index f21630562..90c0a43b3 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardPrivacy/index.tsx +++ b/src/components/pages/AdminBoardDetail/components/BoardPrivacy/index.tsx @@ -51,11 +51,11 @@ export default function BoardPrivacy({ item }: { item: AppDetails }) { return (
    - {t('heading')} + {t('heading')} {t('message')}
    {item.privacyPolicies && item.privacyPolicies.length ? ( -
    +
    {item.privacyPolicies.map((policy: PrivacyPolicyType) => ( ) : ( - + {t('notSupportedMessage')} )} diff --git a/src/components/pages/AdminBoardDetail/components/BoardProvider/BoardProvider.scss b/src/components/pages/AdminBoardDetail/components/BoardProvider/BoardProvider.scss index 84d721879..8f2460ffa 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardProvider/BoardProvider.scss +++ b/src/components/pages/AdminBoardDetail/components/BoardProvider/BoardProvider.scss @@ -20,7 +20,7 @@ .adminboard-provider { margin-bottom: 56px; - padding-bottom: 92px; + padding-bottom: 80px; border-bottom: 1px solid #dcdcdc; .provider-content { margin-bottom: 30px; diff --git a/src/components/pages/AdminBoardDetail/components/BoardProvider/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardProvider/index.tsx index 10cff0e6d..24e7308a4 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardProvider/index.tsx +++ b/src/components/pages/AdminBoardDetail/components/BoardProvider/index.tsx @@ -26,6 +26,7 @@ import { } from '@catena-x/portal-shared-components' import { AppDetails } from 'features/apps/apiSlice' import './BoardProvider.scss' +import { Box } from '@mui/material' export default function BoardProvider({ item }: { item: AppDetails }) { const { t } = useTranslation('', { @@ -44,10 +45,10 @@ export default function BoardProvider({ item }: { item: AppDetails }) { return (
    -
    - {t('heading')} + + {t('heading')} {t('message')} -
    +
    ) diff --git a/src/components/pages/AdminBoardDetail/components/BoardRoles/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardRoles/index.tsx index 5edcbb05a..b2ef0840d 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardRoles/index.tsx +++ b/src/components/pages/AdminBoardDetail/components/BoardRoles/index.tsx @@ -25,27 +25,36 @@ import { uniqueId } from 'lodash' import { AppDetails } from 'features/apps/apiSlice' export default function BoardRoles({ item }: { item: AppDetails }) { - const { t } = useTranslation('', { - keyPrefix: 'content.adminboardDetail.roles', - }) - + const { t } = useTranslation() return ( -
    - {t('heading')} - {t('message')} - - <> - {item.roles && - item.roles.map((role: string) => ( - - {role} - - {t('roleDescription')} - - - ))} - - -
    + <> + + {t('content.adminboardDetail.roles.heading')} + + + {t('content.adminboardDetail.roles.message')} + + {item.roles && item.roles.length > 0 ? ( + + {item.roles?.map((role) => ( + + {role} + + {t('content.adminboardDetail.roles.roleDescription')} + + + ))} + + ) : ( + + {t('global.errors.noRolesAvailable')} + + )} + ) } diff --git a/src/components/pages/AdminBoardDetail/components/BoardTechnicalUserSetup/index.tsx b/src/components/pages/AdminBoardDetail/components/BoardTechnicalUserSetup/index.tsx index 710de0988..9c2223f09 100644 --- a/src/components/pages/AdminBoardDetail/components/BoardTechnicalUserSetup/index.tsx +++ b/src/components/pages/AdminBoardDetail/components/BoardTechnicalUserSetup/index.tsx @@ -30,34 +30,34 @@ export default function BoardTechnicalUserSetup({ }) { const { t } = useTranslation() - const getTechUserData = (data: string[] | null) => { + const getTechnicalUserData = (data: string[] | null) => { return data && data?.length > 0 ? ( data?.map((role: string) => ( - - * {role} - + + + * {role} + + )) ) : ( - - {t('global.errors.noTechnicalUserProfilesAvailable')} - + + + {t('global.errors.noTechnicalUserProfilesAvailable')} + + ) } return ( -
    - + <> + {t('content.adminboardDetail.technicalUserSetup.heading')} - + {t('content.adminboardDetail.technicalUserSetup.message')} - - - {item.technicalUserProfile && - getTechUserData(Object.values(item?.technicalUserProfile)[0])} - - -
    + {item.technicalUserProfile && + getTechnicalUserData(Object.values(item?.technicalUserProfile)[0])} + ) } diff --git a/src/components/pages/AppDetail/AppDetail.scss b/src/components/pages/AppDetail/AppDetail.scss index c2e53b9c1..8301b3f6d 100644 --- a/src/components/pages/AppDetail/AppDetail.scss +++ b/src/components/pages/AppDetail/AppDetail.scss @@ -33,18 +33,6 @@ html { } } -.appdetail-main-bg { - background: #f9f9f9; - padding-bottom: 30px; - - .appdetail-back { - width: 100%; - padding: 30px 15px; - margin: 0 auto; - max-width: 1100px; - } -} - .appdetail-main { width: 100%; margin: 0 auto; @@ -63,12 +51,16 @@ html { padding-right: 30px; } } +} - .product-description { - padding-top: 85px; +.divider-height { + height: 60px; +} - p { - margin-bottom: 12px; - } +.app-marketplace-main { + min-width: 1440px; + .app-back { + height: 140px; + padding: 48px 256px 48px 160px; } } diff --git a/src/components/pages/AppDetail/AppDetailContentDetails.tsx b/src/components/pages/AppDetail/AppDetailContentDetails.tsx index f3426ecfa..0c83fad02 100644 --- a/src/components/pages/AppDetail/AppDetailContentDetails.tsx +++ b/src/components/pages/AppDetail/AppDetailContentDetails.tsx @@ -22,11 +22,11 @@ import { useEffect, useState } from 'react' import { Typography, Navigation, + ImageGallery, Button, } from '@catena-x/portal-shared-components' import { useTranslation } from 'react-i18next' import AppDetailHeader from './components/AppDetailHeader' -import AppDetailImageGallery from './components/AppDetailImageGallery' import AppDetailPrivacy from './components/AppDetailPrivacy' import AppDetailDocuments from './components/AppDetailDocuments' import AppDetailProvider from './components/AppDetailProvider' @@ -35,6 +35,7 @@ import { AppDetails } from 'features/apps/apiSlice' import './AppDetail.scss' import CommonService from 'services/CommonService' import AppDetailTechUserSetup from './components/AppDetailTechUserSetup' +import { Box } from '@mui/material' import { useNavigate } from 'react-router-dom' export default function AppDetailContentDetails({ @@ -88,9 +89,9 @@ export default function AppDetailContentDetails({ return ( item && ( <> -
    -
    - {showBack && ( +
    + {showBack && ( + - )} -
    + + )} + +
    @@ -111,18 +114,30 @@ export default function AppDetailContentDetails({ />
    +
    -
    - +
    + {item.longDescription}
    - {images && } +
    + {images && ( + + )} +
    +
    +
    +
    +
    +
    ) diff --git a/src/components/pages/AppDetail/components/AppDetailDocuments/index.tsx b/src/components/pages/AppDetail/components/AppDetailDocuments/index.tsx index aa604393e..90c352687 100644 --- a/src/components/pages/AppDetail/components/AppDetailDocuments/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailDocuments/index.tsx @@ -52,49 +52,44 @@ export default function AppDetailDocuments({ item }: { item: AppDetails }) { } } + const renderNoDocs = () => { + return ( + + {t('global.errors.noDocumentsAvailable')} + + ) + } return ( -
    -
    - - {t('content.appdetail.howtouse.heading')} - - - {t('content.appdetail.howtouse.message')} - -
    -
      - {item.documents && Object.keys(item.documents)?.length ? ( - Object.keys(item.documents).map( - (document) => - document !== - DocumentTypeText.CONFORMITY_APPROVAL_BUSINESS_APPS && ( -
    • - - -
    • - ) + ) + } + > + {item.documents[document as keyof Documents][0].documentName} + + + ) : ( + renderNoDocs() + ) ) - ) : ( - - {t('global.errors.noDocumentsAvailable')} - - )} -
    + : renderNoDocs()}
    ) } diff --git a/src/components/pages/AppDetail/components/AppDetailHeader/AppDetailHeader.scss b/src/components/pages/AppDetail/components/AppDetailHeader/AppDetailHeader.scss index e53417959..93d5d3f9c 100644 --- a/src/components/pages/AppDetail/components/AppDetailHeader/AppDetailHeader.scss +++ b/src/components/pages/AppDetail/components/AppDetailHeader/AppDetailHeader.scss @@ -41,18 +41,7 @@ .content { padding: 0 40px; flex: 1; - .provider { - margin: 0 0 10px 0; - padding: 0; - font-weight: 600; - font-size: 16px; - line-height: 24px; - color: #888888; - } - .heading { - margin: 0 0 10px 0; - color: #111111; - } + .rating { display: flex; align-items: center; @@ -61,39 +50,12 @@ font-size: 14px; } } - .price { - padding: 0; - margin: 0 0 10px 0; - font-weight: 500; - font-size: 18px; - line-height: 28px; - color: #888888; - } ul { display: flex; align-items: center; margin: 0 0 10px 0; padding: 0; } - .usecase, - .language { - display: flex; - align-items: center; - flex: 1; - flex-wrap: wrap; - margin: 0 0 10px 0; - font-weight: 400; - font-size: 16px; - line-height: 24px; - color: #888888; - .head { - margin-right: 5px; - font-size: 16px; - } - } - .mb-30 { - margin-bottom: 30px; - } .subscribed-success-btn { pointer-events: none; } diff --git a/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx b/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx index 1c91226a7..90dcfcbbc 100644 --- a/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailHeader/index.tsx @@ -180,10 +180,10 @@ export default function AppDetailHeader({ item }: AppDetailHeaderProps) { {item.title}
    - + {item.provider} - + {item.title}
    @@ -192,25 +192,21 @@ export default function AppDetailHeader({ item }: AppDetailHeaderProps) { {item.rating} */}
    - + {item.price} -
    - - {t('content.appdetail.usecase')}:{' '} - + + {t('content.appdetail.usecase')}: {item.useCases.map((useCase: UseCaseType) => ( {useCase.label} ))} -
    -
    - - {t('content.appdetail.language')}:{' '} - + + + {t('content.appdetail.language')}: {item.languages?.map((lang, index) => ( - {(index ? ', ' : '') + lang} + {(index ? ', ' : '') + lang} ))} -
    +
    {getSubscribeBtn()}
    diff --git a/src/components/pages/AppDetail/components/AppDetailImageGallery/AppDetailImageGallery.scss b/src/components/pages/AppDetail/components/AppDetailImageGallery/AppDetailImageGallery.scss deleted file mode 100644 index d5cab438e..000000000 --- a/src/components/pages/AppDetail/components/AppDetailImageGallery/AppDetailImageGallery.scss +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -.appdetail-gallery { - padding-top: 90px; - .img-col { - -ms-flex: 0 0 33.333333%; - flex: 0 0 33.333333%; - max-width: 33.333333%; - padding: 0 15px; - img { - width: 100%; - border-radius: 20px; - } - p { - color: #888888; - margin: 5px 0; - font-size: 14px; - } - } -} diff --git a/src/components/pages/AppDetail/components/AppDetailImageGallery/index.tsx b/src/components/pages/AppDetail/components/AppDetailImageGallery/index.tsx deleted file mode 100644 index 40490705a..000000000 --- a/src/components/pages/AppDetail/components/AppDetailImageGallery/index.tsx +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -import './AppDetailImageGallery.scss' -import { ImageGallery, ImageType } from '@catena-x/portal-shared-components' - -export default function AppDetailImage({ images }: { images: ImageType[] }) { - return ( - - ) -} diff --git a/src/components/pages/AppDetail/components/AppDetailPrivacy/AppDetailPrivacy.scss b/src/components/pages/AppDetail/components/AppDetailPrivacy/AppDetailPrivacy.scss index e478c1e65..c194e176d 100644 --- a/src/components/pages/AppDetail/components/AppDetailPrivacy/AppDetailPrivacy.scss +++ b/src/components/pages/AppDetail/components/AppDetailPrivacy/AppDetailPrivacy.scss @@ -19,14 +19,16 @@ ********************************************************************************/ .appdetail-privacy { - padding-top: 85px; .privacy-content { - margin-bottom: 30px; + margin-bottom: 32px; + } + .app-policies { + padding: 0 20px; } .policies-list { display: flex; flex-wrap: wrap; - max-width: 800px; + max-width: none; margin: 0 auto; .policy-name { width: 50%; @@ -39,13 +41,4 @@ margin-right: 5px; } } - .table-text { - max-width: 850px; - font-weight: 600; - text-align: center; - background-color: #ecf0f4; - padding: 2px; - border-radius: 5px; - margin: 0 auto; - } } diff --git a/src/components/pages/AppDetail/components/AppDetailPrivacy/index.tsx b/src/components/pages/AppDetail/components/AppDetailPrivacy/index.tsx index b2978a63b..5b36b67a2 100644 --- a/src/components/pages/AppDetail/components/AppDetailPrivacy/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailPrivacy/index.tsx @@ -51,11 +51,11 @@ export default function AppDetailPrivacy({ item }: { item: AppDetails }) { return (
    - {t('heading')} + {t('heading')} {t('message')}
    {item.privacyPolicies && item.privacyPolicies.length ? ( -
    +
    {item.privacyPolicies.map((policy: PrivacyPolicyType) => ( ) : ( - + {t('notSupportedMessage')} )} diff --git a/src/components/pages/AppDetail/components/AppDetailProvider/AppDetailProvider.scss b/src/components/pages/AppDetail/components/AppDetailProvider/AppDetailProvider.scss deleted file mode 100644 index 18daf99f5..000000000 --- a/src/components/pages/AppDetail/components/AppDetailProvider/AppDetailProvider.scss +++ /dev/null @@ -1,29 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2021, 2023 BMW Group AG - * Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation - * - * See the NOTICE file(s) distributed with this work for additional - * information regarding copyright ownership. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ********************************************************************************/ - -.appdetail-provider { - padding-top: 85px; - margin-bottom: 56px; - padding-bottom: 92px; - border-bottom: 1px solid #dcdcdc; - .provider-content { - margin-bottom: 30px; - } -} diff --git a/src/components/pages/AppDetail/components/AppDetailProvider/index.tsx b/src/components/pages/AppDetail/components/AppDetailProvider/index.tsx index b46735adc..274431db8 100644 --- a/src/components/pages/AppDetail/components/AppDetailProvider/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailProvider/index.tsx @@ -25,7 +25,6 @@ import { TableType, } from '@catena-x/portal-shared-components' import { AppDetails } from 'features/apps/apiSlice' -import './AppDetailProvider.scss' export default function AppDetailProvider({ item }: { item: AppDetails }) { const { t } = useTranslation('', { @@ -43,11 +42,11 @@ export default function AppDetailProvider({ item }: { item: AppDetails }) { } return ( -
    -
    - {t('heading')} - {t('message')} -
    +
    + {t('heading')} + + {t('message')} +
    ) diff --git a/src/components/pages/AppDetail/components/AppDetailTags/index.tsx b/src/components/pages/AppDetail/components/AppDetailTags/index.tsx index c24fb958f..00fea4080 100644 --- a/src/components/pages/AppDetail/components/AppDetailTags/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailTags/index.tsx @@ -26,7 +26,7 @@ export default function AppDetailTags({ item }: { item: AppDetails }) { const tags = item.tags return (
    - Tags: + Tags: {tags.map((tag, i) => ( ))} diff --git a/src/components/pages/AppDetail/components/AppDetailTechUserSetup/index.tsx b/src/components/pages/AppDetail/components/AppDetailTechUserSetup/index.tsx index b45f64539..7b071517b 100644 --- a/src/components/pages/AppDetail/components/AppDetailTechUserSetup/index.tsx +++ b/src/components/pages/AppDetail/components/AppDetailTechUserSetup/index.tsx @@ -26,32 +26,37 @@ import { Grid } from '@mui/material' export default function AppDetailTechUserSetup({ item }: { item: AppDetails }) { const { t } = useTranslation('') - const getTechUserData = (data: string[] | null) => { + const getAppDetailTechUserData = (data: string[] | null) => { return data && data?.length > 0 ? ( data?.map((role: string) => ( - - - * {role} + + + * {role} )) ) : ( - - {t('global.errors.noTechnicalUserProfilesAvailable')} - + + + {t('global.errors.noTechnicalUserProfilesAvailable')} + + ) } return ( -
    - + <> + {t('content.appdetail.technicalUserSetup.heading')} - + {t('content.appdetail.technicalUserSetup.message')} {item.technicalUserProfile && - getTechUserData(Object.values(item?.technicalUserProfile)[0])} -
    + getAppDetailTechUserData(Object.values(item?.technicalUserProfile)[0])} + ) } diff --git a/src/components/pages/AppOverview/AppOverview.scss b/src/components/pages/AppOverview/AppOverview.scss index d25ee2a1e..609f95fb8 100644 --- a/src/components/pages/AppOverview/AppOverview.scss +++ b/src/components/pages/AppOverview/AppOverview.scss @@ -135,7 +135,7 @@ } .doc-list { - padding: 0 14px; + padding: 0 18px; .document-button-link { font-size: 16px; } diff --git a/src/components/pages/ServiceAdminBoardDetail/index.tsx b/src/components/pages/ServiceAdminBoardDetail/index.tsx index fcc798d63..065db2734 100644 --- a/src/components/pages/ServiceAdminBoardDetail/index.tsx +++ b/src/components/pages/ServiceAdminBoardDetail/index.tsx @@ -38,9 +38,14 @@ import { import { useTranslation } from 'react-i18next' import { PAGES } from 'types/Constants' import ArrowForwardIcon from '@mui/icons-material/ArrowForward' -import { InputLabel, Grid } from '@mui/material' +import { Grid, Box, Divider } from '@mui/material' import { download } from 'utils/downloadUtils' +enum TableData { + SUCCESS = 'SUCCESS', + ERROR = 'ERROR', +} + export default function ServiceAdminBoardDetail() { const { t } = useTranslation('servicerelease') const navigate = useNavigate() @@ -88,156 +93,150 @@ export default function ServiceAdminBoardDetail() { const getTechUserData = (data: string[] | null) => { return data && data?.length > 0 ? ( data?.map((role: string) => ( - - * {role} - + + + * {role} + + )) ) : ( - - {t( - 'adminboardDetail.technicalUserSetup.noTechnicalUserProfilesAvailable' - )} - + + + {t( + 'adminboardDetail.technicalUserSetup.noTechnicalUserProfilesAvailable' + )} + + ) } return ( -
    - +
    + + + {serviceData && ( - <> -
    + +
    {serviceData.title}
    -
    - + + {serviceData.provider} - + {serviceData.title} -
    {getTypes()}
    -
    + + {getTypes()} + +
    -
    - {['longDescriptionTitleEN', 'longDescriptionTitleDE'].map( - (desc) => ( -
    - - {t(`adminboardDetail.${desc}`)} - - - { - serviceData?.descriptions?.filter( - (lang: { languageCode: string }) => - lang.languageCode === - (desc === 'longDescriptionTitleEN' ? 'en' : 'de') - )[0]?.longDescription - } +
    + {['longDescriptionTitleEN', 'longDescriptionTitleDE'].map((desc) => ( +
    + + {t(`adminboardDetail.${desc}`)} + + + { + serviceData?.descriptions?.filter( + (lang: { languageCode: string }) => + lang.languageCode === + (desc === 'longDescriptionTitleEN' ? 'en' : 'de') + )[0]?.longDescription + } + +
    +
    + ))} + + {t('adminboardDetail.documents.heading')} + + + {t('adminboardDetail.documents.message')} + + {serviceData?.documents && + Object.keys(serviceData.documents).length > 0 ? ( + Object.keys(serviceData.documents).map((item) => ( +
  • + +
  • - ) - )} -
    -
    - - {t('adminboardDetail.documents.heading')} - - - {t('adminboardDetail.documents.message')} + + + )) + ) : ( + + {t('adminboardDetail.noDocumentsAvailable')} - {serviceData?.documents && - Object.keys(serviceData.documents).map((item) => ( - - onDownload(serviceData.documents[item][0])} - > - - {serviceData.documents[item][0]?.documentName} - - - ))} -
    + )} -
    - - {t('adminboardDetail.technicalUserSetup.heading')} - - - {t('adminboardDetail.technicalUserSetup.message')} - - - - {serviceData.technicalUserProfile && - getTechUserData( - Object.values(serviceData?.technicalUserProfile)[0] - )} - - -
    +
    + + {t('adminboardDetail.technicalUserSetup.heading')} + + + {t('adminboardDetail.technicalUserSetup.message')} + -
    -
    - - {t('adminboardDetail.provider.heading')} - - - {t('adminboardDetail.provider.message')} - -
    + {serviceData.technicalUserProfile && + getTechUserData( + Object.values(serviceData?.technicalUserProfile)[0] + )} - + + {t('adminboardDetail.provider.heading')} + + + {t('adminboardDetail.provider.message')} + + -
    - + [serviceData?.contactEmail], + ], + }} + horizontal={true} + /> +
    + + + )}
    ) diff --git a/src/components/pages/ServiceMarketplaceDetail/Marketplace.scss b/src/components/pages/ServiceMarketplaceDetail/Marketplace.scss index e64e78979..86219d65c 100644 --- a/src/components/pages/ServiceMarketplaceDetail/Marketplace.scss +++ b/src/components/pages/ServiceMarketplaceDetail/Marketplace.scss @@ -18,17 +18,15 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ .marketplace-main { - width: 100%; - padding: 30px 0; - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; - max-width: 1140px; - .product-description { - margin: 42px 0; - p { - margin-bottom: 12px; + min-width: 1440px; + .service-back { + height: 140px; + padding: 48px 256px 48px 160px; + } + .service-marketplace-content { + padding: 0px 256px 0px 256px; + .divider-height { + height: 39px; } } } diff --git a/src/components/pages/ServiceMarketplaceDetail/MarketplaceContentDetails.tsx b/src/components/pages/ServiceMarketplaceDetail/MarketplaceContentDetails.tsx index 91535e5f0..d5a9619d5 100644 --- a/src/components/pages/ServiceMarketplaceDetail/MarketplaceContentDetails.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/MarketplaceContentDetails.tsx @@ -38,15 +38,21 @@ export default function MarketplaceContentDetails({ item.offerSubscriptionDetailData && ( <> +
    {item.offerSubscriptionDetailData.length > 0 && ( - + <> + +
    + )} -
    - {item.description} -
    + {item.description} +
    +
    +
    +
    ) ) diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceDocuments/index.tsx b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceDocuments/index.tsx index 80a0d1cab..3409ce61c 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceDocuments/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceDocuments/index.tsx @@ -28,6 +28,7 @@ import { ServiceRequest, } from 'features/serviceMarketplace/serviceApiSlice' import { useFetchDocumentMutation } from 'features/serviceManagement/apiSlice' +import { DocumentTypeId } from 'features/appManagement/apiSlice' export default function MarketplaceDocuments({ item, @@ -56,20 +57,18 @@ export default function MarketplaceDocuments({ } return ( -
    -
    - - {t('content.serviceMarketplace.document.heading')} - - - {t('content.serviceMarketplace.document.message')} - -
    -
      - {item.documents && item.documents['ADDITIONAL_DETAILS'] ? ( - item.documents['ADDITIONAL_DETAILS'].map((document: DocumentData) => ( -
    • - + <> + + {t('content.serviceMarketplace.document.heading')} + + + {t('content.serviceMarketplace.document.message')} + + {item?.documents[DocumentTypeId.ADDITIONAL_DETAILS] ? ( + item.documents[DocumentTypeId.ADDITIONAL_DETAILS].map( + (document: DocumentData) => ( +
    • +
    • - )) - ) : ( - - {t('global.errors.noDocumentsAvailable')} - - )} -
    -
    + ) + ) + ) : ( + + {t('global.errors.noDocumentsAvailable')} + + )} + ) } diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss index 305f6f994..9a067239c 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss @@ -17,40 +17,17 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -.marketplace-header { - margin: 30px -15px 60px -15px; - display: -ms-flexbox; +.service-marketplace-header { + width: 928px; + height: 288px; display: flex; - -ms-flex-wrap: wrap; flex-wrap: wrap; - .lead-image img { - border-radius: 10px; + .lead-image > img { + border-radius: 16px; + width: '288px'; + height: '288px'; } - .content { - padding: 0 30px; - flex: 1; - .provider { - margin: 0 0 10px 0; - padding: 0; - font-weight: 600; - font-size: 16px; - line-height: 24px; - color: #888888; - } - .heading { - margin: 0 0 10px 0; - color: #111111; - } - .price { - padding: 0; - margin: 0 0 10px 0; - font-weight: 500; - font-size: 18px; - line-height: 28px; - color: #888888; - } - .subscribe-btn { - margin-top: 40px; - } + .marketplace-app-content { + padding: 0px 0px 0px 56px; } } diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/index.tsx b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/index.tsx index b9b9111ca..1eee430a9 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/index.tsx @@ -29,6 +29,7 @@ import UserService from 'services/UserService' import './MarketplaceHeader.scss' import { setSuccessType } from 'features/serviceMarketplace/slice' import { getAssetBase } from 'services/EnvironmentService' +import { Box } from '@mui/material' export default function MarketplaceHeader({ item, @@ -85,28 +86,28 @@ export default function MarketplaceHeader({ } return ( -
    +
    {item.title}
    -
    - + + {item.provider} - + {item.title} - + {getAllServices(item.serviceTypes)} - + {item.price} {getSubscribeBtn()} -
    +
    ) } diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceProvider/index.tsx b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceProvider/index.tsx index e6258c8a5..7c76d592d 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceProvider/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceProvider/index.tsx @@ -42,12 +42,12 @@ export default function MarketplaceProvider({ } return ( -
    -
    - {t('heading')} - {t('message')} -
    + <> + {t('heading')} + + {t('message')} + -
    + ) } diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/MarketplaceSubscription.scss b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/MarketplaceSubscription.scss index f080b58f5..26fba0e02 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/MarketplaceSubscription.scss +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/MarketplaceSubscription.scss @@ -18,20 +18,14 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ .marketplace-subscriptions { - .subscription-main-heading { - font-weight: 700; - color: #0d55af; - } - .subscriptions-content { display: flex; - margin: 10px -5px 0 -5px; flex-wrap: wrap; .subscription-list { width: 33.3333%; padding: 0 5px; - margin-bottom: 10px; + margin: 10px 0; .subscription-name { border: 1px solid #0f71cb; @@ -47,7 +41,6 @@ .subscription-status { margin: 2px 15px; height: 18px; - // width: 27%; } } } diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/index.tsx b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/index.tsx index d06db07e0..300476149 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceSubscription/index.tsx @@ -32,11 +32,13 @@ export default function MarketplaceSubscription({ return (
    - - {t('content.serviceMarketplace.subscriptionHeading').replace( - '{serviceName}', - item.title - )} + + + {t('content.serviceMarketplace.subscriptionHeading').replace( + '{serviceName}', + item.title + )} +
    {item.offerSubscriptionDetailData.map((data) => ( diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceTechnicalUserSetup/index.tsx b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceTechnicalUserSetup/index.tsx index 4f04b75df..02718dc99 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceTechnicalUserSetup/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceTechnicalUserSetup/index.tsx @@ -34,28 +34,33 @@ export default function MarketplaceTechnicalUserSetup({ return data && data?.length > 0 ? ( data?.map((item: string) => ( - - * {item} + + * {item} )) ) : ( - - {t('global.errors.noTechnicalUserProfilesAvailable')} - + + + {t('global.errors.noTechnicalUserProfilesAvailable')} + + ) } return ( -
    - + <> + {t('content.appdetail.technicalUserSetup.heading')} - + {t('content.appdetail.technicalUserSetup.message')} {item.technicalUserProfile && getTechUserInfo(Object.values(item?.technicalUserProfile)[0])} -
    + ) } diff --git a/src/components/pages/ServiceMarketplaceDetail/index.tsx b/src/components/pages/ServiceMarketplaceDetail/index.tsx index f81893fd7..cecfb7ba7 100644 --- a/src/components/pages/ServiceMarketplaceDetail/index.tsx +++ b/src/components/pages/ServiceMarketplaceDetail/index.tsx @@ -29,6 +29,7 @@ import { currentSuccessType, setSuccessType, } from 'features/serviceMarketplace/slice' +import { Box } from '@mui/material' export default function ServiceMarketplaceDetail() { const navigate = useNavigate() @@ -45,17 +46,23 @@ export default function ServiceMarketplaceDetail() { return (
    - - {data && } + + + + {data && ( + + + + )}
    ) } diff --git a/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx b/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx index 30baf1012..4b8bd5199 100644 --- a/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx +++ b/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx @@ -265,8 +265,8 @@ export default function CommonValidateAndPublish({ const getTechUserData = (data: string[] | null) => { return data && data?.length > 0 ? ( data?.map((role: string) => ( - - + + * {role} @@ -274,7 +274,7 @@ export default function CommonValidateAndPublish({ ) : ( @@ -423,7 +423,7 @@ export default function CommonValidateAndPublish({ style={{ marginBottom: '0px', paddingTop: '0px' }} >
    - + {t('content.appdetail.privacy.heading')} @@ -456,9 +456,7 @@ export default function CommonValidateAndPublish({ {conformityDocument && ( <> - - {conformityDocument} - + {conformityDocument} {defaultValues && ( {defaultValues.conformityDocumentsDescription} @@ -487,9 +485,7 @@ export default function CommonValidateAndPublish({ )} - - {documentsTitle} - + {documentsTitle} {defaultValues && ( {defaultValues.documentsDescription} @@ -534,7 +530,7 @@ export default function CommonValidateAndPublish({ {rolesData && ( <> - + {t('content.adminboardDetail.roles.heading')} @@ -561,7 +557,7 @@ export default function CommonValidateAndPublish({ Object.values(statusData?.technicalUserProfile) && ( <> - + {t('content.adminboardDetail.technicalUserSetup.heading')} diff --git a/src/components/styles/document.scss b/src/components/styles/document.scss index b9862e8d5..927a83ce4 100644 --- a/src/components/styles/document.scss +++ b/src/components/styles/document.scss @@ -18,21 +18,27 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -.appdetail-documents { - padding-top: 85px; -} - .document-main { margin-bottom: 50px; } - -.adminboard-documents { - margin-bottom: 60px; +.document-button-link { + background-color: transparent; + border: none; + text-decoration: underline; + cursor: pointer; + line-height: 20px; + padding: 0; + color: #0f71cb !important; } +.service-documents { + padding: 10px 18px; + color: #0f71cb !important; + display: flex; +} .document-list { display: flex; - margin: 10px auto; + margin: 0px auto 10px; .document-icon { color: #9c9c9c; } @@ -41,7 +47,7 @@ border: none; text-decoration: underline; cursor: pointer; - font-size: 18px; + font-size: 16px; color: #1977cc; margin-left: 10px; } From ee5b9d2967fb89031d6abd399307897142d1584b Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:05:32 +0530 Subject: [PATCH 18/36] feat(ssi credential): added filters (#181) --- DEPENDENCIES | 2 +- package.json | 2 +- src/assets/locales/de/main.json | 2 +- src/assets/locales/en/main.json | 2 +- .../overlays/UpdateCertificate/index.tsx | 2 +- .../AdminCredentialElements.tsx | 54 +++++++++++++------ .../components/AppListGroup/index.tsx | 1 + .../components/AppListGroupView/index.tsx | 1 + .../certification/certificationApiSlice.tsx | 19 ++++--- yarn.lock | 8 +-- 10 files changed, 63 insertions(+), 30 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 12a883a7c..efdaf9c95 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1124,7 +1124,7 @@ npm/npmjs/@babel/template/7.22.5, MIT, approved, #9017 npm/npmjs/@babel/traverse/7.22.5, MIT, approved, #8954 npm/npmjs/@babel/types/7.22.5, MIT, approved, #8967 npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined -npm/npmjs/@catena-x/portal-shared-components/2.0.11, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187 +npm/npmjs/@catena-x/portal-shared-components/2.0.14, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187 npm/npmjs/@csstools/normalize.css/12.0.0, CC0-1.0, approved, clearlydefined npm/npmjs/@csstools/postcss-cascade-layers/1.1.1, CC0-1.0, approved, clearlydefined npm/npmjs/@csstools/postcss-color-function/1.1.1, CC0-1.0 AND (MIT AND W3C-20150513) AND W3C-20150513 AND MIT, approved, #3022 diff --git a/package.json b/package.json index 0117a518c..a1f760693 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ ] }, "dependencies": { - "@catena-x/portal-shared-components": "^2.0.13", + "@catena-x/portal-shared-components": "^2.0.14", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@hookform/error-message": "^2.0.1", diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index cf2a845eb..e6571c312 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -1493,7 +1493,7 @@ }, "adminCertificate": { "headline": "Credential Request Overview", - "search": "Suchen via Zertifikatstyp", + "search": "Suchen via Name der Firma", "tabs": { "all": "Alle", "open": "Offen", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index 5ef2fc587..b1b4b1b00 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -1499,7 +1499,7 @@ }, "adminCertificate": { "headline": "Credential Request Overview", - "search": "...search for certificate type", + "search": "...search for Company Name", "tabs": { "all": "All", "open": "Open", diff --git a/src/components/overlays/UpdateCertificate/index.tsx b/src/components/overlays/UpdateCertificate/index.tsx index 37d048479..aa3731af6 100644 --- a/src/components/overlays/UpdateCertificate/index.tsx +++ b/src/components/overlays/UpdateCertificate/index.tsx @@ -66,7 +66,7 @@ export default function UpdateCertificate({ id }: { id: string }) { await addCertificate(data).unwrap() setSubmitClicked(true) } - } catch (err: unknown) { + } catch (err: any) { setLoading(false) error( t('content.certificates.updateCertificate.error') + diff --git a/src/components/pages/AdminCredential/AdminCredentialElements.tsx b/src/components/pages/AdminCredential/AdminCredentialElements.tsx index 27361b993..533dd2d0c 100644 --- a/src/components/pages/AdminCredential/AdminCredentialElements.tsx +++ b/src/components/pages/AdminCredential/AdminCredentialElements.tsx @@ -17,7 +17,7 @@ * * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { useState } from 'react' +import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { Button } from '@mui/material' import ArticleOutlinedIcon from '@mui/icons-material/ArticleOutlined' @@ -28,19 +28,15 @@ import { CredentialResponse, useApproveCredentialMutation, useDeclineCredentialMutation, - useFetchCredentialsQuery, + useFetchCredentialsSearchQuery, } from 'features/certification/certificationApiSlice' import { download } from 'utils/downloadUtils' import { useFetchNewDocumentByIdMutation } from 'features/appManagement/apiSlice' import { error, success } from 'services/NotifyService' import { uniqueId } from 'lodash' import { SubscriptionStatus } from 'features/apps/apiSlice' - -export interface DummyData { - date: string - companyInfo: string - certificate: string -} +import { setSearchInput } from 'features/appManagement/actions' +import { useDispatch } from 'react-redux' enum FilterType { ALL = 'all', @@ -56,10 +52,14 @@ enum StatusType { export default function AdminCredentialElements() { const { t } = useTranslation() + const dispatch = useDispatch() - const [group, setGroup] = useState(FilterType.ALL) - const [expr, setExpr] = useState('') const [refresh, setRefresh] = useState(0) + const [group, setGroup] = useState(FilterType.ALL) + const [searchExpr, setSearchExpr] = useState('') + const [filterStatus, setFilterStatus] = useState() + const [filterValueAPI, setFilterValueAPI] = useState('') + const [fetchHookArgs, setFetchHookArgs] = useState({}) const [getDocumentById] = useFetchNewDocumentByIdMutation() const [approveCredential] = useApproveCredentialMutation() @@ -67,7 +67,30 @@ export default function AdminCredentialElements() { const setView = (e: React.MouseEvent) => { const viewValue = e.currentTarget.value + if (viewValue === FilterType.OPEN) + setFilterValueAPI(SubscriptionStatus.PENDING) + if (viewValue === FilterType.CONFIRMED) + setFilterValueAPI(SubscriptionStatus.ACTIVE) + if (viewValue === FilterType.DECLINED) + setFilterValueAPI(SubscriptionStatus.INACTIVE) + setFilterStatus(viewValue) setGroup(viewValue) + setRefresh(Date.now()) + } + + useEffect(() => { + if (onValidate(searchExpr)) { + setFetchHookArgs({ + filterType: filterValueAPI, + expr: searchExpr, + }) + } + }, [filterStatus, searchExpr]) + + const onValidate = (expr: string) => { + const validateExpr = /^[ A-Za-z0-9]{1,1000}$/.test(expr) + if (validateExpr) dispatch(setSearchInput({ open: true, text: expr })) + return validateExpr } const handleDownloadClick = async ( @@ -207,22 +230,23 @@ export default function AdminCredentialElements() { return (
    + searchExpr={searchExpr} alignCell="start" toolbarVariant={'searchAndFilter'} hasBorder={false} columnHeadersBackgroundColor={'transparent'} - searchExpr={expr} searchPlaceholder={t('content.adminCertificate.search')} + //searchInputData={searchInputData} onSearch={(expr: string) => { - if (expr !== '') return + if (!onValidate(expr)) return setRefresh(Date.now()) - setExpr(expr) + setSearchExpr(expr) }} searchDebounce={1000} title="" loadLabel={t('global.actions.more')} - fetchHook={useFetchCredentialsQuery} - fetchHookArgs={{ expr }} + fetchHook={useFetchCredentialsSearchQuery} + fetchHookArgs={fetchHookArgs} fetchHookRefresh={refresh} getRowId={(row: { [key: string]: string }) => uniqueId(row.companyId)} columns={columns} diff --git a/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx b/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx index 8fe8817bc..735374c92 100644 --- a/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx +++ b/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx @@ -60,6 +60,7 @@ export const AppListGroup = ({ items={itemsToShow} variant={'compact'} expandOnHover={true} + boxClickable={true} /> ) diff --git a/src/components/pages/AppMarketplace/components/AppListGroupView/index.tsx b/src/components/pages/AppMarketplace/components/AppListGroupView/index.tsx index 9b07706f2..8753470e2 100644 --- a/src/components/pages/AppMarketplace/components/AppListGroupView/index.tsx +++ b/src/components/pages/AppMarketplace/components/AppListGroupView/index.tsx @@ -52,6 +52,7 @@ export const AppListGroupView = ({ variant={'compact'} expandOnHover={true} imageLoader={fetchImageWithToken} + boxClickable={true} /> ) diff --git a/src/features/certification/certificationApiSlice.tsx b/src/features/certification/certificationApiSlice.tsx index 158d8db96..520dc8136 100644 --- a/src/features/certification/certificationApiSlice.tsx +++ b/src/features/certification/certificationApiSlice.tsx @@ -20,6 +20,7 @@ import { PaginFetchArgs } from '@catena-x/portal-shared-components' import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { PAGE_SIZE } from 'types/Constants' import { apiBaseQuery } from 'utils/rtkUtil' export enum StatusEnum { @@ -101,11 +102,17 @@ export const apiSlice = createApi({ }, invalidatesTags: ['certificate'], }), - fetchCredentials: builder.query({ - query: (fetchArgs) => ({ - url: `api/administration/companydata/credentials?page=${fetchArgs.page}`, - }), - }), + fetchCredentialsSearch: builder.query( + { + query: (fetchArgs) => ({ + url: `api/administration/companydata/credentials?page=${ + fetchArgs.page + }&size=${PAGE_SIZE}&companyName=${ + fetchArgs.args.expr ?? '' + }&companySsiDetailStatusId=${fetchArgs.args.filterType ?? ''}`, + }), + } + ), approveCredential: builder.mutation({ query: (credentialId) => ({ url: `api/administration/companydata/credentials/${credentialId}/approval`, @@ -124,7 +131,7 @@ export const apiSlice = createApi({ export const { useFetchCertificatesQuery, useAddCertificateMutation, - useFetchCredentialsQuery, + useFetchCredentialsSearchQuery, useApproveCredentialMutation, useDeclineCredentialMutation, } = apiSlice diff --git a/yarn.lock b/yarn.lock index 8745bd971..954c4d4fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1175,10 +1175,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@catena-x/portal-shared-components@^2.0.11": - version "2.0.11" - resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.11.tgz#be7d24d78dc3844d53a77d03b6b25e8bb2e2a395" - integrity sha512-vFZEVlqfJS5H8VSTfWhXXlCFCbbxI66x1Fz/qw48Tp2H5h+5H83e0XcvyEePG2ldk3DvRJyl6eaZyJQ1Ncg/7w== +"@catena-x/portal-shared-components@^2.0.14": + version "2.0.14" + resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.14.tgz#4892f23afedd03984e77a0e79312ceb1aed8fd8c" + integrity sha512-hjN1qx/N6I0P5UKzW5fTzgXGzjxJjfGJcBoltxq1FoB2jcN8ud4HlKPvVjYKNeRpEsA0WfQf9swFt6k3n4ldRg== dependencies: "@mui/base" "^5.0.0-beta.3" "@mui/system" "^5.13.2" From 999760a24011490e6922eeaaf8cf34fc994ba284 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:06:22 +0530 Subject: [PATCH 19/36] bugfix(connectors): do not allow confirm without customer link (#187) --- src/assets/locales/de/main.json | 5 +++-- src/assets/locales/en/main.json | 5 +++-- .../components/ConnectorInsertForm.tsx | 14 +++++++++++--- .../EdcConnector/AddConnectorOverlay/index.tsx | 7 ++++--- src/components/pages/EdcConnector/index.tsx | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index e6571c312..c4acdc0b9 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -539,9 +539,10 @@ "tooltipMsg": "Laden Sie das Zertifikat hoch, das die öffentlichen Schlüsselinformationen Ihres Connectors enthält." }, "subscription": { - "label": "Customer Link", + "label": "Customer Link*", "placeholder": "Select the related subscription", - "tooltipMsg": "Select the related subscription" + "tooltipMsg": "Select the related subscription", + "error": "Customer link is mandatory" } }, "create": { diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index b1b4b1b00..acd1f8e99 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -538,9 +538,10 @@ "tooltipMsg": "Upload the certificate that contains your connector's public key information." }, "subscription": { - "label": "Customer Link", + "label": "Customer Link*", "placeholder": "Select the related subscription", - "tooltipMsg": "Select the related subscription" + "tooltipMsg": "Select the related subscription", + "error": "Customer link is mandatory" } }, "create": { diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx index bf8c822f5..807bce887 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/components/ConnectorInsertForm.tsx @@ -162,7 +162,7 @@ const ConnectorFormInput = ({ variant="h2" sx={{ fontSize: '14px', - color: '#111111', + color: errors[name] ? '#d32f2f' : '#111111', fontWeight: '400', paddingRight: '10px', }} @@ -191,12 +191,14 @@ const ConnectorFormInput = ({ render={({ field: { onChange, value } }) => { return ( { - onChange(e) + onChange(e ? e.subscriptionId : '') }} keyTitle={keyTitle} /> @@ -343,7 +345,10 @@ const ConnectorInsertForm = ({ trigger, errors, type: 'select', - name: 'ConnectorSubscription', + name: 'ConnectorSubscriptionId', + rules: { + required: true, + }, label: t( 'content.edcconnector.modal.insertform.subscription.label' ), @@ -353,6 +358,9 @@ const ConnectorInsertForm = ({ tooltipMsg: t( 'content.edcconnector.modal.insertform.subscription.tooltipMsg' ), + helperText: t( + 'content.edcconnector.modal.insertform.subscription.error' + ), items: subscriptions, defaultSelectValue: {}, keyTitle: 'name', diff --git a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx index 045dead41..b2c28242b 100644 --- a/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx +++ b/src/components/pages/EdcConnector/AddConnectorOverlay/index.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import { Dialog, @@ -33,7 +33,6 @@ import ConnectorInsertForm from './components/ConnectorInsertForm' import { useForm } from 'react-hook-form' import { ConnectorType, - EdcSubscriptionsType, useFetchOfferSubscriptionsQuery, } from 'features/connector/connectorApiSlice' import Box from '@mui/material/Box' @@ -52,7 +51,7 @@ interface AddCollectorOverlayProps { export type FormFieldsType = { ConnectorName: string ConnectorURL: string - ConnectorSubscription: EdcSubscriptionsType + ConnectorSubscriptionId: string ConnectorLocation: string // ConnectorDoc: any TO-DO: Enable when DAPS enabled } @@ -61,6 +60,7 @@ const formFields = { ConnectorName: '', ConnectorURL: '', ConnectorLocation: '', + ConnectorSubscriptionId: '', // ConnectorDoc: '', TO-DO: Enable when DAPS enabled } @@ -99,6 +99,7 @@ const AddConnectorOverlay = ({ 'ConnectorName', 'ConnectorURL', 'ConnectorLocation', + 'ConnectorSubscriptionId', // 'ConnectorDoc', TO-DO: Enable when DAPS enabled ]) if (validateFields) { diff --git a/src/components/pages/EdcConnector/index.tsx b/src/components/pages/EdcConnector/index.tsx index 79bdb1ebb..35cf628e5 100644 --- a/src/components/pages/EdcConnector/index.tsx +++ b/src/components/pages/EdcConnector/index.tsx @@ -158,7 +158,7 @@ const EdcConnector = () => { .catch(() => showOverlay(false)) } else if (selectedService.type === ConnectType.MANAGED_CONNECTOR) { // body.append('providerBpn', data.ConnectorBPN) - body.append('subscriptionId', data.ConnectorSubscription.subscriptionId) + body.append('subscriptionId', data.ConnectorSubscriptionId) body.append('technicalUserId', '') await createManagedConnector(body) .unwrap() From 8299beea2f8d9fe371d3a8264f104901f2badeeb Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:41:14 +0530 Subject: [PATCH 20/36] fix(app activation): overlay fix (#191) --- .../ActivateSubscriptionOverlay/index.tsx | 50 ++++++++++++------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/components/pages/AppSubscription/ActivateSubscriptionOverlay/index.tsx b/src/components/pages/AppSubscription/ActivateSubscriptionOverlay/index.tsx index a10ff43f3..b5abe0fa7 100644 --- a/src/components/pages/AppSubscription/ActivateSubscriptionOverlay/index.tsx +++ b/src/components/pages/AppSubscription/ActivateSubscriptionOverlay/index.tsx @@ -144,25 +144,37 @@ const ActivateSubscriptionOverlay = ({ <> {activationResponse ? (
    - - } - onCloseWithIcon={() => dispatch(closeOverlay())} - /> - - - - - - - + + + } + onCloseWithIcon={() => dispatch(closeOverlay())} + /> + + + + + + + +
    ) : ( Date: Fri, 4 Aug 2023 12:41:51 +0530 Subject: [PATCH 21/36] feat(technical integration): remove unused code (#190) --- src/assets/locales/de/main.json | 2 +- src/assets/locales/en/main.json | 2 +- .../AddTechnicalUser/TechnicalUserAddForm.tsx | 10 +++++++-- .../overlays/AddTechnicalUser/index.tsx | 21 ------------------- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index c4acdc0b9..b62ad68e4 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -788,7 +788,7 @@ "roleDesc": "Role Description Details", "technicalUser": { "addOverlay": { - "service": "Dienst", + "service": "Technical User Role", "serviceSubHeading": "Select one service roles:", "username": "Username", "description": "Beschreibung", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index acd1f8e99..dc796cab3 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -786,7 +786,7 @@ "roleDesc": "Role Description Details", "technicalUser": { "addOverlay": { - "service": "Service", + "service": "Technical User Role", "serviceSubHeading": "Select one service roles:", "username": "Username", "description": "Description", diff --git a/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx b/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx index ba565448d..46417def3 100644 --- a/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx +++ b/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx @@ -54,7 +54,10 @@ const TechnicalUserAddFormSelect = ({ ( - + {t('content.addUser.technicalUser.addOverlay.service')} @@ -116,7 +119,10 @@ const TechnicalUserAddFormTextfield = ({ ( <> - + {label} { const [addServiceAccount] = useAddServiceAccountMutation() const [loading, setLoading] = useState(false) - const { data } = useFetchOwnUserDetailsQuery() const handleConfirm = async (formValues: DefaultFormFieldValuesType) => { setLoading(true) @@ -80,24 +77,6 @@ export const AddTechnicalUser = () => { //openAddTechnicalUserResponseOverlay() } - const userDetailsData = { - cardCategory: t('content.addUser.technicalUser.addOverlay.spocHeadline'), - cardContentItems: { - organizsationName: { - label: t('content.addUser.technicalUser.addOverlay.org'), - value: data ? data.company : '', - }, - username: { - label: t('content.addUser.technicalUser.addOverlay.name'), - value: data ? `${data.firstName} ${data.lastName}` : '', - }, - eMailAddress: { - label: t('content.addUser.technicalUser.addOverlay.email'), - value: data ? data.email : '', - }, - }, - } - const defaultFormFieldValues = { TechnicalUserName: '', TechnicalUserService: 'none', From 18447d9fb8aaa7952f3ef8ff14a95832bfb5dd71 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Fri, 4 Aug 2023 13:09:08 +0530 Subject: [PATCH 22/36] fix(app marketplace): transaltion and image loading fix (#192) --- src/assets/locales/de/main.json | 7 +++++-- src/assets/locales/en/main.json | 7 +++++-- .../pages/AppMarketplace/components/AppListGroup/index.tsx | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index b62ad68e4..203a030d7 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -242,10 +242,13 @@ "none": "Nicht kategorisiert", "businesspartnermanagement": "Geschäftspartner Datenmanagement", "circulareconomy": "Kreislaufwirtschaft", - "quality&demandmanagement": "Bedarfs- & Qualitätsmanagement", + "qualitymanagement": "Bedarfs- & Qualitätsmanagement", "demandandcapacitymanagement": "Bedarfs- & Kapazitätsmanagement", "traceability": "Rückverfolgbarkeit", - "manufacturingasaservice": "Produzieren als Dienst" + "manufacturingasaservice": "Produzieren als Dienst", + "sustainability&co2-footprint": "Sustainability & CO2 Footprint", + "real-timecontrol": "Real Time Control", + "modularproduction ": "Modular Production" }, "noMatch": "Keine Treffer", "for": "für" diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index dc796cab3..1d1a383d2 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -241,10 +241,13 @@ "none": "Not categorized", "businesspartnermanagement": "Business Partner Data Management", "circulareconomy": "Circular Economy", - "quality&demandmanagement": "Demand & Quality Management", + "qualitymanagement": "Demand & Quality Management", "demandandcapacitymanagement": "Demand & Capacity Management", "traceability": "Traceability", - "manufacturingasaservice": "Manufacturing as a Service" + "manufacturingasaservice": "Manufacturing as a Service", + "sustainability&co2-footprint": "Sustainability & CO2 Footprint", + "real-timecontrol": "Real Time Control", + "modularproduction ": "Modular Production" }, "noMatch": "No Matches", "for": "for" diff --git a/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx b/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx index 735374c92..8d499bed3 100644 --- a/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx +++ b/src/components/pages/AppMarketplace/components/AppListGroup/index.tsx @@ -18,9 +18,10 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { Cards, CategoryDivider } from '@catena-x/portal-shared-components' -import { useTranslation } from 'react-i18next' import { useState } from 'react' +import { useTranslation } from 'react-i18next' +import { Cards, CategoryDivider } from '@catena-x/portal-shared-components' +import { fetchImageWithToken } from 'services/ImageService' export const AppListGroup = ({ category, @@ -60,6 +61,7 @@ export const AppListGroup = ({ items={itemsToShow} variant={'compact'} expandOnHover={true} + imageLoader={fetchImageWithToken} boxClickable={true} /> From c07e39d4afedb14177ee924992c3c6f913c48c74 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Mon, 7 Aug 2023 11:56:26 +0530 Subject: [PATCH 23/36] feat(technical user): add hyphen if no description (#193) --- .../overlays/AddTechnicalUser/TechnicalUserAddForm.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx b/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx index 46417def3..1b885a881 100644 --- a/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx +++ b/src/components/overlays/AddTechnicalUser/TechnicalUserAddForm.tsx @@ -81,11 +81,9 @@ const TechnicalUserAddFormSelect = ({ display: 'flex', }} /> - {role.roleDescription && ( - - {role.roleDescription} - - )} + + {role.roleDescription ?? '-'} + ))} {!!errors[name] && ( From 7187394e484ecaff997dd0a9230b4f33faea0ef1 Mon Sep 17 00:00:00 2001 From: lavanya-bmw <106523828+lavanya-bmw@users.noreply.github.com> Date: Mon, 7 Aug 2023 12:28:21 +0530 Subject: [PATCH 24/36] fix(app release process): fixed console errors (#194) --- .../ReleaseProcess/components/CommonContractAndConsent.tsx | 6 +++--- src/features/store.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/shared/basic/ReleaseProcess/components/CommonContractAndConsent.tsx b/src/components/shared/basic/ReleaseProcess/components/CommonContractAndConsent.tsx index 467eae422..0fc208bb9 100644 --- a/src/components/shared/basic/ReleaseProcess/components/CommonContractAndConsent.tsx +++ b/src/components/shared/basic/ReleaseProcess/components/CommonContractAndConsent.tsx @@ -132,7 +132,7 @@ export default function CommonContractAndConsent({ useDeleteAppReleaseDocumentMutation() useEffect(() => { - deleteResponse.isSuccess && setDeleteSuccess(true) + if (deleteResponse.isSuccess) setDeleteSuccess(true) if (deleteResponse.isError) { resetField('uploadImageConformity', { defaultValue: @@ -414,7 +414,7 @@ export default function CommonContractAndConsent({ {agreementData?.map((item) => (
    - + - + {item.documentId ? ( - getDefaultMiddleware() + getDefaultMiddleware({ serializableCheck: false }) .concat(idpSlice.middleware) .concat(userSlice.middleware) .concat(serviceSlice.middleware) From eede97c4df746d7e65a6f31789274adff3d50361 Mon Sep 17 00:00:00 2001 From: Phil Schneider Date: Mon, 7 Aug 2023 09:01:59 +0200 Subject: [PATCH 25/36] release: update changelog for v1.6.0-RC5 (#195) * update change log for v1.6.0-RC5 * bump version for v1.6.0-RC5 --------- Co-authored-by: jjeroch <94133633+jjeroch@users.noreply.github.com> Reviewed-By: Martin Rohrmeier --- CHANGELOG.md | 24 ++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42d29e54a..07734de65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 1.6.0-RC5 + +### Change + +- Certificate Request Board - changed to dynamic error message as per API response +- Updated asterisk color to red in app release and service release forms +- Credential management board enhanced by filters + +### Features + +- Notifications added + - credential approval + - credential reject and + - subscription url msgs +- Technical user create overlay enhanced by role description as well as direct help link + +### Bugfix + +- Permission validation 'Credential Mgmt' page updated to 'decision_ssicredential' +- App description change - fixed page break issue in case of api response without language tag for each FE supported language +- Notification message link - 'UseCases' welcome message fixed +- handle empty customer link section in managed connectors +- Overlay fix of activation response + ## 1.6.0-RC4 ### Change diff --git a/package.json b/package.json index a1f760693..4536a9923 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v1.6.0-RC4", + "version": "v1.6.0-RC5", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", From cef72f7029e0c9142a16b31c469f33ffc8041c03 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:12:16 +0530 Subject: [PATCH 26/36] fix(card): card clickable bug (#199) --- .../AppMarketplace/components/AppListSection/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/pages/AppMarketplace/components/AppListSection/index.tsx b/src/components/pages/AppMarketplace/components/AppListSection/index.tsx index 1b5823e39..e21724bd6 100644 --- a/src/components/pages/AppMarketplace/components/AppListSection/index.tsx +++ b/src/components/pages/AppMarketplace/components/AppListSection/index.tsx @@ -77,7 +77,8 @@ export default function AppListSection() { const checkIsFavorite = (appId: string) => favoriteItems.includes(appId) - const addOrRemoveFavorite = (appId: string) => { + const addOrRemoveFavorite = (event: React.MouseEvent, appId: string) => { + event?.stopPropagation() dispatch(checkIsFavorite(appId) ? removeItem(appId) : addItem(appId)) } @@ -141,7 +142,8 @@ export default function AppListSection() { items={cardsData.map((card) => ({ ...card, onButtonClick: () => navigate(`/appdetail/${card.id}`), - onSecondaryButtonClick: () => addOrRemoveFavorite(card.id!), + onSecondaryButtonClick: (e: React.MouseEvent) => + addOrRemoveFavorite(e, card.id!), addButtonClicked: checkIsFavorite(card.id!), }))} groupKey={group} From bbc465cd78f65a2d177f4f7d9d461679a504cc93 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:12:59 +0530 Subject: [PATCH 27/36] fix(ssi credntial): fix filters (#200) --- .../AdminCredentialElements.tsx | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/pages/AdminCredential/AdminCredentialElements.tsx b/src/components/pages/AdminCredential/AdminCredentialElements.tsx index 533dd2d0c..111646f91 100644 --- a/src/components/pages/AdminCredential/AdminCredentialElements.tsx +++ b/src/components/pages/AdminCredential/AdminCredentialElements.tsx @@ -57,7 +57,6 @@ export default function AdminCredentialElements() { const [refresh, setRefresh] = useState(0) const [group, setGroup] = useState(FilterType.ALL) const [searchExpr, setSearchExpr] = useState('') - const [filterStatus, setFilterStatus] = useState() const [filterValueAPI, setFilterValueAPI] = useState('') const [fetchHookArgs, setFetchHookArgs] = useState({}) @@ -69,23 +68,21 @@ export default function AdminCredentialElements() { const viewValue = e.currentTarget.value if (viewValue === FilterType.OPEN) setFilterValueAPI(SubscriptionStatus.PENDING) - if (viewValue === FilterType.CONFIRMED) + else if (viewValue === FilterType.CONFIRMED) setFilterValueAPI(SubscriptionStatus.ACTIVE) - if (viewValue === FilterType.DECLINED) + else if (viewValue === FilterType.DECLINED) setFilterValueAPI(SubscriptionStatus.INACTIVE) - setFilterStatus(viewValue) + else setFilterValueAPI('') setGroup(viewValue) setRefresh(Date.now()) } useEffect(() => { - if (onValidate(searchExpr)) { - setFetchHookArgs({ - filterType: filterValueAPI, - expr: searchExpr, - }) - } - }, [filterStatus, searchExpr]) + setFetchHookArgs({ + filterType: filterValueAPI, + expr: searchExpr, + }) + }, [filterValueAPI, searchExpr]) const onValidate = (expr: string) => { const validateExpr = /^[ A-Za-z0-9]{1,1000}$/.test(expr) From c992cba88ca97f09f6da808873b2095ee80e4964 Mon Sep 17 00:00:00 2001 From: Manojava Koushik <111366021+manojava-gk@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:14:07 +0530 Subject: [PATCH 28/36] bugfix(service card): do not allow to erase (#201) --- .../basic/ReleaseProcess/OfferCard/index.tsx | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx b/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx index 910804b9e..da000d5bd 100644 --- a/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx +++ b/src/components/shared/basic/ReleaseProcess/OfferCard/index.tsx @@ -136,7 +136,7 @@ export default function OfferCard() { alt: fetchServiceStatus?.leadPictureUri || '', }, } - }, [fetchServiceStatus, imageData]) + }, [fetchServiceStatus]) const { handleSubmit, @@ -234,16 +234,19 @@ export default function OfferCard() { apiBody: CreateServiceStep1Item, buttonLabel: string ) => { - const uploadImageValue = getValues().uploadImage - .leadPictureUri as unknown as DropzoneFile + const uploadImageValue = + getValues().uploadImage && + (getValues().uploadImage.leadPictureUri as unknown as DropzoneFile) await saveService({ id: serviceId, body: apiBody, }) .unwrap() .then(() => { - !uploadImageValue.id && - handleUploadDocument(serviceId, uploadImageValue) + if (uploadImageValue) { + !uploadImageValue.id && + handleUploadDocument(serviceId, uploadImageValue) + } dispatch(setServiceId(serviceId)) buttonLabel === ButtonLabelTypes.SAVE_AND_PROCEED && dispatch(serviceReleaseStepIncrement()) @@ -261,8 +264,9 @@ export default function OfferCard() { apiBody: CreateServiceStep1Item, buttonLabel: string ) => { - const uploadImageValue = getValues().uploadImage - .leadPictureUri as unknown as DropzoneFile + const uploadImageValue = + getValues().uploadImage && + (getValues().uploadImage.leadPictureUri as unknown as DropzoneFile) await createService({ id: '', body: apiBody, @@ -270,7 +274,10 @@ export default function OfferCard() { .unwrap() .then((result) => { if (isString(result)) { - !uploadImageValue.id && handleUploadDocument(result, uploadImageValue) + if (uploadImageValue) { + !uploadImageValue.id && + handleUploadDocument(result, uploadImageValue) + } dispatch(setServiceId(result)) buttonLabel === ButtonLabelTypes.SAVE_AND_PROCEED && dispatch(serviceReleaseStepIncrement()) @@ -293,10 +300,11 @@ export default function OfferCard() { const apiBody = { serviceTypeIds: data.serviceTypeIds, title: data.title, - leadPictureUri: - data.uploadImage.leadPictureUri !== null && - Object.keys(data.uploadImage.leadPictureUri).length > 0 && - Object.values(data.uploadImage.leadPictureUri)[0], + leadPictureUri: data.uploadImage?.leadPictureUri + ? data.uploadImage.leadPictureUri !== null && + Object.keys(data.uploadImage.leadPictureUri).length > 0 && + Object.values(data.uploadImage.leadPictureUri)[0] + : '', descriptions: [ { languageCode: 'de', From 53dc7f57be6ba315ec53464cc17206d98d0cecbc Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:14:45 +0530 Subject: [PATCH 29/36] feat(service account): add lang support in api call (#202) --- src/features/admin/serviceApiSlice.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/admin/serviceApiSlice.ts b/src/features/admin/serviceApiSlice.ts index 86fcc7421..4b0a084ba 100644 --- a/src/features/admin/serviceApiSlice.ts +++ b/src/features/admin/serviceApiSlice.ts @@ -19,9 +19,10 @@ ********************************************************************************/ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' +import { apiBaseQuery } from 'utils/rtkUtil' +import i18next from 'i18next' import { PAGE_SIZE } from 'types/Constants' import { PaginFetchArgs, PaginResult } from '@catena-x/portal-shared-components' -import { apiBaseQuery } from 'utils/rtkUtil' export enum ServiceAccountType { SECRET = 'SECRET', @@ -90,7 +91,7 @@ export const apiSlice = createApi({ `/api/administration/serviceaccount/owncompany/serviceaccounts/${id}`, }), fetchServiceAccountRoles: builder.query({ - query: () => '/api/administration/serviceaccount/user/roles', + query: () => `/api/administration/serviceaccount/user/roles?languageShortName=${i18next.language}`, }), }), }) From 24718360bd3a28abed6eb7429bf0bc518b7e4ee4 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:18:26 +0530 Subject: [PATCH 30/36] fix(service detail): ui fixe (#204) --- .../MarketplaceHeader/MarketplaceHeader.scss | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss index 9a067239c..2ab3de0cb 100644 --- a/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss +++ b/src/components/pages/ServiceMarketplaceDetail/components/MarketplaceHeader/MarketplaceHeader.scss @@ -22,12 +22,15 @@ height: 288px; display: flex; flex-wrap: wrap; - .lead-image > img { - border-radius: 16px; - width: '288px'; - height: '288px'; + .lead-image { + img { + border-radius: 16px; + width: '288px'; + height: '288px'; + } } .marketplace-app-content { + width: 50%; padding: 0px 0px 0px 56px; } } From 37d9a8091b1c26876be2ec163b286c6f19c34944 Mon Sep 17 00:00:00 2001 From: nidhigarg-bmw <101316912+nidhigarg-bmw@users.noreply.github.com> Date: Thu, 10 Aug 2023 06:30:46 +0530 Subject: [PATCH 31/36] fix(sonar bugs): fix sonar bugs (#205) --- package.json | 2 +- .../AdminBoardDetail/BoardContentDetails.tsx | 23 +++----- .../AppDetail/AppDetailContentDetails.tsx | 30 ++++------ .../components/CommonValidateAndPublish.tsx | 15 ++--- src/features/admin/serviceApiSlice.ts | 3 +- src/services/CommonService.ts | 58 +++++-------------- yarn.lock | 2 +- 7 files changed, 40 insertions(+), 93 deletions(-) diff --git a/package.json b/package.json index 4536a9923..1e65b41c5 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ ] }, "dependencies": { - "@catena-x/portal-shared-components": "^2.0.14", + "@catena-x/portal-shared-components": "^2.0.18", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@hookform/error-message": "^2.0.1", diff --git a/src/components/pages/AdminBoardDetail/BoardContentDetails.tsx b/src/components/pages/AdminBoardDetail/BoardContentDetails.tsx index 37bcd246c..526e922f8 100644 --- a/src/components/pages/AdminBoardDetail/BoardContentDetails.tsx +++ b/src/components/pages/AdminBoardDetail/BoardContentDetails.tsx @@ -18,7 +18,6 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { useEffect, useState } from 'react' import { useNavigate } from 'react-router-dom' import { useTranslation } from 'react-i18next' import { @@ -39,20 +38,6 @@ import BoardTechnicalUserSetup from './components/BoardTechnicalUserSetup' export default function BoardContentDetails({ item }: { item: AppDetails }) { const { t } = useTranslation() const navigate = useNavigate() - const [images, setImages] = useState() - - useEffect(() => { - if (item) { - const newPromies = CommonService.fetchLeadPictures(item.images, item.id) - Promise.all(newPromies) - .then((result) => { - setImages(result.flat()) - }) - .catch((err) => { - console.log(err) - }) - } - }, [item]) return ( item && ( @@ -79,7 +64,13 @@ export default function BoardContentDetails({ item }: { item: AppDetails }) {
    ))}
    - {images && } +
    diff --git a/src/components/pages/AppDetail/AppDetailContentDetails.tsx b/src/components/pages/AppDetail/AppDetailContentDetails.tsx index 0c83fad02..940874643 100644 --- a/src/components/pages/AppDetail/AppDetailContentDetails.tsx +++ b/src/components/pages/AppDetail/AppDetailContentDetails.tsx @@ -18,7 +18,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ -import { useEffect, useState } from 'react' +import { useState } from 'react' import { Typography, Navigation, @@ -47,7 +47,6 @@ export default function AppDetailContentDetails({ }) { const navigate = useNavigate() const { t } = useTranslation() - const [images, setImages] = useState() const [selectedItem, setSelectedItem] = useState('#description') const navigationItems = [ @@ -73,19 +72,6 @@ export default function AppDetailContentDetails({ }, ] - useEffect(() => { - if (item) { - const newPromies = CommonService.fetchLeadPictures(item.images, item.id) - Promise.all(newPromies) - .then((result) => { - setImages(result.flat()) - }) - .catch((err) => { - console.log(err) - }) - } - }, [item]) - return ( item && ( <> @@ -122,11 +108,15 @@ export default function AppDetailContentDetails({
    - {images && ( - - )} +
    diff --git a/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx b/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx index 4b8bd5199..538fe57b0 100644 --- a/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx +++ b/src/components/shared/basic/ReleaseProcess/components/CommonValidateAndPublish.tsx @@ -183,17 +183,12 @@ export default function CommonValidateAndPublish({ statusData?.documents?.APP_IMAGE && statusData?.documents?.APP_IMAGE[0].documentId ) { - const newPromies = CommonService.fetchLeadPictures( - statusData?.documents?.APP_IMAGE, - id + setMultipleImages( + CommonService.imagesAndAppidToImageType( + statusData?.documents?.APP_IMAGE, + id + ) ) - Promise.all(newPromies) - .then((result) => { - setMultipleImages(result.flat()) - }) - .catch((err) => { - console.log(err) - }) } setDefaultValues(values) reset(values) diff --git a/src/features/admin/serviceApiSlice.ts b/src/features/admin/serviceApiSlice.ts index 4b0a084ba..0df0df3f8 100644 --- a/src/features/admin/serviceApiSlice.ts +++ b/src/features/admin/serviceApiSlice.ts @@ -91,7 +91,8 @@ export const apiSlice = createApi({ `/api/administration/serviceaccount/owncompany/serviceaccounts/${id}`, }), fetchServiceAccountRoles: builder.query({ - query: () => `/api/administration/serviceaccount/user/roles?languageShortName=${i18next.language}`, + query: () => + `/api/administration/serviceaccount/user/roles?languageShortName=${i18next.language}`, }), }), }) diff --git a/src/services/CommonService.ts b/src/services/CommonService.ts index f518c4670..45f85e71d 100644 --- a/src/services/CommonService.ts +++ b/src/services/CommonService.ts @@ -20,8 +20,9 @@ import { getApiBase, getAssetBase } from './EnvironmentService' import i18next from 'i18next' -import UserService from './UserService' import { AppMarketplaceApp } from 'features/apps/apiSlice' +import { ImageType } from '@catena-x/portal-shared-components' +import { fetchImageWithToken } from './ImageService' const getName = (app: AppMarketplaceApp) => app.name ?? '' const getDescription = (app: AppMarketplaceApp) => @@ -48,48 +49,17 @@ const appToCard = (app: AppMarketplaceApp) => ({ }, }) -const fetchLeadPictures = (images: string[], appId: string) => { - const promises = images?.map((image: any) => { - return [ - new Promise((resolve, reject) => { - let url = '' - if (!image.documentId) { - url = `${getApiBase()}/api/apps/${appId}/appDocuments/${isValidPictureId( - image - )}` - } else { - url = `${getApiBase()}/api/apps/${appId}/appDocuments/${isValidPictureId( - image.documentId - )}` - } - - return fetch(url, { - method: 'GET', - headers: { - authorization: `Bearer ${UserService.getToken()}`, - }, - }) - .then((response) => response.blob()) - .then( - async (blob) => - await new Promise((callback) => { - let reader = new FileReader() - reader.onload = function () { - resolve({ - url: this.result, - text: '', - }) - } - reader.readAsDataURL(blob) - }) - ) - }), - ] - }) - - const newPromies = promises.map((promise) => Promise.all(promise)) - return newPromies -} +const imagesAndAppidToImageType = ( + images: string[], + appId: string +): ImageType[] => + images?.map((image: any) => ({ + url: `${getApiBase()}/api/apps/${appId}/appDocuments/${isValidPictureId( + image.documentId ?? image + )}`, + text: 'Catena-X', + loader: fetchImageWithToken, + })) const isValidPictureId = (id: string) => { return id === '00000000-0000-0000-0000-000000000000' @@ -153,7 +123,7 @@ const CommonService = { getCompanyRoles, getUseCases, getDataSpace, - fetchLeadPictures, + imagesAndAppidToImageType, getRoleDescription, getCompanyRoleUpdateData, } diff --git a/yarn.lock b/yarn.lock index 954c4d4fd..7a8dfb5cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10339,4 +10339,4 @@ yargs@^16.2.0: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file From cf6fbb1d4a2fed143c56ea8a8ebcd10e7591609b Mon Sep 17 00:00:00 2001 From: Martin Rohrmeier Date: Thu, 10 Aug 2023 10:40:33 +0200 Subject: [PATCH 32/36] bugfix(deps): fix dependabot findings (#207) --- .eslintrc.json | 1 + DEPENDENCIES | 3 +-- package.json | 5 ++++- yarn.lock | 21 +++++++-------------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c46843efd..5af5fd7ee 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -80,6 +80,7 @@ "react/display-name": 0, "react/jsx-key": 0, "react/no-children-prop": 0, + "react/no-deprecated": 0, "react/no-unescaped-entities": 0, "spaced-comment": 0 } diff --git a/DEPENDENCIES b/DEPENDENCIES index efdaf9c95..c1153ede2 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -576,7 +576,6 @@ npm/npmjs/-/normalize-path/3.0.0, MIT, approved, clearlydefined npm/npmjs/-/normalize-range/0.1.2, MIT, approved, clearlydefined npm/npmjs/-/normalize-url/6.1.0, MIT, approved, clearlydefined npm/npmjs/-/npm-run-path/4.0.1, MIT, approved, clearlydefined -npm/npmjs/-/nth-check/1.0.2, BSD-2-Clause, approved, CQ22629 npm/npmjs/-/nth-check/2.1.1, BSD-2-Clause, approved, clearlydefined npm/npmjs/-/nwsapi/2.2.5, MIT, approved, #7909 npm/npmjs/-/object-assign/4.1.1, MIT, approved, clearlydefined @@ -1124,7 +1123,7 @@ npm/npmjs/@babel/template/7.22.5, MIT, approved, #9017 npm/npmjs/@babel/traverse/7.22.5, MIT, approved, #8954 npm/npmjs/@babel/types/7.22.5, MIT, approved, #8967 npm/npmjs/@bcoe/v8-coverage/0.2.3, ISC AND MIT, approved, clearlydefined -npm/npmjs/@catena-x/portal-shared-components/2.0.14, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187 +npm/npmjs/@catena-x/portal-shared-components/2.0.18, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187 npm/npmjs/@csstools/normalize.css/12.0.0, CC0-1.0, approved, clearlydefined npm/npmjs/@csstools/postcss-cascade-layers/1.1.1, CC0-1.0, approved, clearlydefined npm/npmjs/@csstools/postcss-color-function/1.1.1, CC0-1.0 AND (MIT AND W3C-20150513) AND W3C-20150513 AND MIT, approved, #3022 diff --git a/package.json b/package.json index 1e65b41c5..a7f883b5f 100644 --- a/package.json +++ b/package.json @@ -87,13 +87,16 @@ "react-scripts": "5.0.1", "typescript": "5.0.4" }, + "resolutions": { + "**/nth-check": "^2.1.1" + }, "scripts": { "prepare": "husky install", "build:sources": "zip -r portal-frontend.zip src package.json yarn.lock -x '*.stories.*' -x '*.test.*' -x '*.css' -x '*.scss' -x '*.svg' -x '*.jpg' -x '*.png' -x '*.webp' -x '*.ttf'", "pretty": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,sass,scss,xml,md}\"", "lint": "yarn run eslint \"./src/**/*.{ts,tsx}\"", "start": "PORT=3001 BROWSER=none GENERATE_SOURCEMAP=false react-scripts start", - "build": "react-scripts build", + "build": "GENERATE_SOURCEMAP=false react-scripts build", "test": "react-scripts test", "test:ci": "CI=true react-scripts test", "build:docker": "if [ -d \"./build\" ]; then yarn build:docker:prebuilt; else yarn build:docker:full; fi", diff --git a/yarn.lock b/yarn.lock index 7a8dfb5cc..b342bac9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1175,10 +1175,10 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@catena-x/portal-shared-components@^2.0.14": - version "2.0.14" - resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.14.tgz#4892f23afedd03984e77a0e79312ceb1aed8fd8c" - integrity sha512-hjN1qx/N6I0P5UKzW5fTzgXGzjxJjfGJcBoltxq1FoB2jcN8ud4HlKPvVjYKNeRpEsA0WfQf9swFt6k3n4ldRg== +"@catena-x/portal-shared-components@^2.0.18": + version "2.0.18" + resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.18.tgz#02088046a5efef84370ef88b463a5139a9bf26d6" + integrity sha512-gFG0pPmzjOD06nY2nas/hC/PnbHcZ+oomzodUjARZqAGxkS5yqdBnWpIA/xGSjqOcnNJWeBz8q2ivsqPyaqVBQ== dependencies: "@mui/base" "^5.0.0-beta.3" "@mui/system" "^5.13.2" @@ -3424,7 +3424,7 @@ bonjour-service@^1.0.11: fast-deep-equal "^3.1.3" multicast-dns "^7.2.5" -boolbase@^1.0.0, boolbase@~1.0.0: +boolbase@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== @@ -7237,14 +7237,7 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -nth-check@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" - integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - dependencies: - boolbase "~1.0.0" - -nth-check@^2.0.1: +nth-check@^1.0.2, nth-check@^2.0.1, nth-check@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== @@ -10339,4 +10332,4 @@ yargs@^16.2.0: yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== \ No newline at end of file + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== From 9f6de9b9355a33a2bd317adedce1d40e07fe7a9c Mon Sep 17 00:00:00 2001 From: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Fri, 11 Aug 2023 13:02:10 +0200 Subject: [PATCH 33/36] chore: change locale files (#206) Locales updated for app/service release process why: Placeholder have been set while the development process was ongoing, those placeholders getting now step-by-step replaced with more meaningful explanations (such as page descriptions) --- src/assets/locales/de/main.json | 14 +++++++------- src/assets/locales/en/main.json | 12 ++++++------ src/assets/locales/en/servicerelease.json | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 203a030d7..9df7a8455 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -977,10 +977,10 @@ }, "appPage": { "headerTitle": "App Details", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .", - "longDescriptionEN": "Long Description - EN", - "longDescriptionDE": "Long Description - DE", - "images": "Images", + "headerDescription": "Füllen Sie die Seite mit den App-Details aus. Auf dem Marktplatz werden die folgenden zusätzlichen Informationen für Kunden öffentlich verfügbar sein, um einen erweiterten Überblick über die von Ihrer Anwendung unterstützten Funktionen sowie notwendige Details zu Sicherheit, Architektur usw. zu erhalten.", + "longDescriptionEN": "Detailierte Beschreibung - EN", + "longDescriptionDE": "Detailierte Beschreibung - DE", + "images": "Bilder", "note": "Note:", "maxThreeImages": "Max.3 Images", "uploadDataPrerequisits": "Upload “Data Prerequisits”", @@ -1008,16 +1008,16 @@ }, "technicalIntegration": { "headerTitle": "Technical Integration", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .", + "headerDescription": "Integrieren Sie Ihre App mit dem catena-x-Datenraum. Für die Integration müssen Sie die von der Anwendung unterstützten Rollen sowie das erforderliche technische Benutzerprofil hochladen, das zum Ausführen Ihrer Anwendung im Netzwerk erforderlich ist. Bitte beachten Sie: In diesem Schritt legen Sie nur den Rahmen der Authentifizierung fest – es werden keine Benutzer erstellt. Wenn Sie Unterstützung benötigen, können Sie gerne die Schaltfläche „Hilfe“ oder die beigefügte Vorlage verwenden.", "step1Header": "1. User Role Upload", - "step1HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,", + "step1HeaderDescription": "Laden Sie Ihre Anwendungsrollen hoch, die Benutzeridentitäten zugewiesen werden können, um auf die Anwendung zugreifen zu können.", "clientID": "Client ID", "URL": "URL", "pleaseEnterValidURL": "Please enter a valid URL", "URLPlaceholder": "http://www.loremipsum.de", "clientCreated": "Client created", "step2Header": "2. Technical User Setup", - "step2HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,", + "step2HeaderDescription": "Richten Sie das technische Profil eines technischen Benutzer-/Dienstkontos mit den erforderlichen Berechtigungen ein, um die Anwendung im Datenraum ausführen zu können.", "uploadRolesDescription": "Upload all app roles by using the available upload template (csv) file added attached", "rolesPreview": "Preview of Roles uploaded", "uploadAppRolesButton": "Upload App Roles", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index 1d1a383d2..119dbca1e 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -939,7 +939,7 @@ }, "appPage": { "headerTitle": "App Details", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .", + "headerDescription": "Fill out your app details page. On the marketplace the following added information will be public available for customers to get a extended view of your application supported functions as well as necessary details regarding security, architecture, etc.", "longDescriptionEN": "Long Description (en)", "longDescriptionDE": "Long Description (de)", "images": "Images", @@ -950,8 +950,8 @@ "uploadAppContract": "Upload “App Contract”", "providerDetails": "Provider Details", "providerHomePage": "Provider Homepage", - "providerContactEmail": "Customer Contact E-Mail", - "providerPhoneContact": "Provider Phone Contact", + "providerContactEmail": "Contact (E-Mail)", + "providerPhoneContact": "Contac (Phone Number)", "providerPhoneContactPlaceholder": "Following formats are supported: +xx (xxx) xxxxxxxxxx; +xx xxxxxxxxxx and +xxxxxxxxxxxx", "pleaseEnterValidHomePageURL": "Please enter a valid url - eg: https://catena-x.net", "pleaseEnterValidEmail": "Please enter a valid Customer Contact E-Mail", @@ -970,16 +970,16 @@ }, "technicalIntegration": { "headerTitle": "Technical Integration", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .", + "headerDescription": "Integrate your app with the catena-x dataspace. For the integration you need to upload the application supported roles as well as the necessary technical user profile which is needed to run your application inside the network. Please note: in this step you are only setting the frame of the authentication - no users are going to get created. If you need any support feel free to use the 'Help' button or the attached template.", "step1Header": "1. User Role Upload", - "step1HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,", + "step1HeaderDescription": "Upload your application roles which can get assigned to user identities to be able to access the application.", "clientID": "Client ID", "URL": "URL", "pleaseEnterValidURL": "Please enter a valid URL", "URLPlaceholder": "http://www.loremipsum.de", "clientCreated": "Client created", "step2Header": "2. Technical User Setup", - "step2HeaderDescription": "[copy] Lorem ipsum sapientem ne neque dolor erat,eros solet invidunt duo Quisque aliquid leo. Pretium patrioque sociis eu nihil Cum enim ad, ipsum alii vidisse justo id. Option porttitor diam voluptua. Cu Eam augue dolor dolores quis,", + "step2HeaderDescription": "Setup the technical profile of a technical user/service account of needed permissions to be able to run the application inside the dataspace.", "uploadRolesDescription": "Upload all app roles by using the available upload template (csv) file added attached", "rolesPreview": "Preview of Roles uploaded", "uploadAppRolesButton": "Upload App Roles", diff --git a/src/assets/locales/en/servicerelease.json b/src/assets/locales/en/servicerelease.json index 2e8ca2897..88045857a 100644 --- a/src/assets/locales/en/servicerelease.json +++ b/src/assets/locales/en/servicerelease.json @@ -52,13 +52,13 @@ }, "technicalIntegration": { "headerTitle": "Technical Integration", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .", - "technicalUserSetupMandatory": "Please select atleast one technical user setup", + "headerDescription": "Setup the technical profile of a technical user/service account of needed permissions to be able to run the application inside the dataspace. Select minimum one permission, the selected permission(s) will be stored as service technical user profile and used to create technical users for subscription activations.", + "technicalUserSetupMandatory": "Please select at least one technical user permission for the service tech user profile", "technicalUserProfileError": "Error while updating technical user profiles" }, "step4": { "headerTitle": "Validate & Publish", - "headerDescription": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard .Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard ", + "headerDescription": "Below you can find a summary of all your service registration inputs as well as the look of the marketplace service card and detail page. Please check your entered data carefully before sending the service for release. We will validate your service registration shortly after the service submission.", "appDetails": "Service Details", "documents": "Documents", "providerInformation": "Provider Information", @@ -104,7 +104,7 @@ "overview": "My services overview" }, "defaultValues": { - "conformityDocumentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", + "conformityDocumentsDescription": "To publish your service on the marketplace, a number of Catena-X specific agreements need to get signed by you. Please have a look at the mentioned agreements and agree to them via the checklist approval.", "documentsDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }, "serviceoverview": { From 4ef467a616819d545fc4539c20ffa56718c859a9 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 11 Aug 2023 13:46:53 +0200 Subject: [PATCH 34/36] release(1.6.0-RC6): update changelog Squashed commit of the following: commit 70c0a71803bbcf61c43ca4e1580a250790f34482 Author: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Fri Aug 11 06:26:00 2023 +0200 Update CHANGELOG.md commit 5a96adb0570c8659dade7e5d96714bfc7c584e13 Author: jjeroch <94133633+jjeroch@users.noreply.github.com> Date: Fri Aug 11 06:25:39 2023 +0200 release/ChangeLog_1.6.0 RC-6 --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07734de65..2e9ce4b43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +## 1.6.0-RC6 + +### Change + +- Service Account creation - added multiLangugae support when fetching the role description from BE + +### Technical Support + +- Sonar findings fixed (Code smells and bugs) +- Dependabot findings fixed (Upgrading dependencies to the latest versions) + +### Bugfix + +- Application card favorite button click (separation from the rest of the card where the click results into opening the app card) +- Admin Credential Board - views/filter function fixed +- Service Release Form - fixed erase of entered data on deleting uploaded image +- Service Detail - header UI fix of rendering issues + ## 1.6.0-RC5 ### Change From 1c8768608bc68ba07c4715492505bf6ffbc6de3a Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 11 Aug 2023 13:48:18 +0200 Subject: [PATCH 35/36] release(1.6.0-RC6): bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a7f883b5f..cb3da5bcc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v1.6.0-RC5", + "version": "v1.6.0-RC6", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", From 241aea384a3667c353afc9e73fe2c8f5c4ddeee6 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Fri, 11 Aug 2023 15:00:47 +0200 Subject: [PATCH 36/36] chore: update dependencies file --- DEPENDENCIES | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index c1153ede2..1a83b2051 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -244,7 +244,7 @@ npm/npmjs/-/eslint-config-prettier/8.8.0, MIT, approved, #7543 npm/npmjs/-/eslint-config-react-app/7.0.1, MIT, approved, clearlydefined npm/npmjs/-/eslint-config-standard-with-typescript/35.0.0, MIT, approved, #9133 npm/npmjs/-/eslint-config-standard/17.0.0, MIT, approved, clearlydefined -npm/npmjs/-/eslint-import-resolver-node/0.3.7, MIT, approved, clearlydefined +npm/npmjs/-/eslint-import-resolver-node/0.3.7, MIT, approved, #9923 npm/npmjs/-/eslint-module-utils/2.8.0, MIT, approved, #8209 npm/npmjs/-/eslint-plugin-es/4.1.0, MIT, approved, #5026 npm/npmjs/-/eslint-plugin-flowtype/8.0.3, BSD-3-Clause, approved, #2958 @@ -257,7 +257,7 @@ npm/npmjs/-/eslint-plugin-react-hooks/4.6.0, MIT, approved, clearlydefined npm/npmjs/-/eslint-plugin-react/7.32.2, MIT, approved, #7035 npm/npmjs/-/eslint-plugin-testing-library/5.11.0, MIT, approved, clearlydefined npm/npmjs/-/eslint-scope/5.1.1, BSD-2-Clause, approved, clearlydefined -npm/npmjs/-/eslint-scope/7.2.0, BSD-2-Clause, approved, clearlydefined +npm/npmjs/-/eslint-scope/7.2.0, BSD-2-Clause, approved, #9916 npm/npmjs/-/eslint-utils/2.1.0, MIT, approved, #2498 npm/npmjs/-/eslint-utils/3.0.0, MIT, approved, #2431 npm/npmjs/-/eslint-visitor-keys/1.3.0, Apache-2.0, approved, #2501 @@ -1114,7 +1114,7 @@ npm/npmjs/@babel/plugin-transform-unicode-property-regex/7.22.5, MIT AND (BSD-2- npm/npmjs/@babel/plugin-transform-unicode-regex/7.22.5, MIT, approved, #8929 npm/npmjs/@babel/plugin-transform-unicode-sets-regex/7.22.5, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #8755 npm/npmjs/@babel/preset-env/7.22.5, MIT AND (BSD-2-Clause AND ISC AND MIT) AND BSD-2-Clause AND BSD-3-Clause, approved, #8748 -npm/npmjs/@babel/preset-modules/0.1.5, MIT, approved, clearlydefined +npm/npmjs/@babel/preset-modules/0.1.5, MIT, approved, #9932 npm/npmjs/@babel/preset-react/7.22.5, MIT, approved, #8987 npm/npmjs/@babel/preset-typescript/7.22.5, MIT, approved, #9074 npm/npmjs/@babel/regjsgen/0.8.0, MIT, approved, #7149 @@ -1193,7 +1193,7 @@ npm/npmjs/@jridgewell/set-array/1.1.2, MIT, approved, clearlydefined npm/npmjs/@jridgewell/source-map/0.3.3, MIT, approved, #9304 npm/npmjs/@jridgewell/sourcemap-codec/1.4.14, MIT, approved, clearlydefined npm/npmjs/@jridgewell/sourcemap-codec/1.4.15, MIT, approved, clearlydefined -npm/npmjs/@jridgewell/trace-mapping/0.3.18, MIT, approved, clearlydefined +npm/npmjs/@jridgewell/trace-mapping/0.3.18, MIT, approved, #9904 npm/npmjs/@leichtgewicht/ip-codec/2.0.4, MIT, approved, clearlydefined npm/npmjs/@mui/base/5.0.0-beta.4, MIT, approved, #2992 npm/npmjs/@mui/core-downloads-tracker/5.13.4, MIT, approved, #8983