diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d1ae7372..4358176db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,152 +1,61 @@ # Changelog -## 1.6.0-RC7 - -### Feature - -- Daps related elements, business logic and locales removed - -### Technical Support - -- changed license notice for images -- added second license - -### Bugfix - -- fixed missing URL and Email data after re-opening a service under the service release process -- fixed app release process process handling (Step 3 - Consent) button "save" -- app detail page "back" button fixed - -## 1.6.0-RC6 - -### Change - -- Service Account creation - added multi language 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 - -- 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 - -- Connector Technical Integration page - connector configuration details added - -### Bugfix - -- App Management page access permission changed to add_apps -- Certificate Management page - approval/decline button only available for "pending" credential requests -- Permission validation 'Credential Mgmt' page activated - -## 1.6.0-RC3 +## 1.6.0-RC8 ### Change +- Connector Technical Integration + - connector configuration details added - App Subscription Management - - Activation Approval Overlay (enhanced by customer name, bpn, technical user permission, appId) + - subscription activation overlay enhanced by customer name, bpn, technical user permission, appId - Technical User Management - - support managed tech user with app information + - added "Offer Link"/"Name" inside the technical user overview user table - Connector Registration - - managed connector option only available for app/service provider - - info message added for inactive select scenario - -### Bugfix - -- Managed connector registration api call - technicalUserID string empty instead of submitting the subscriptionID - -## 1.6.0-RC2 - -### Change - + - registration of "Managed Connectors" limited to company with the role app/service provider & info multi lingual message added for inactive select scenario(s) - App Release Process - changed 'Privacy Policy' selection to mandatory + - updated "mandatory"/"required" icon (asterisk) color from black to red + - design/styling of the app release step "validate and publish" updated + - GET /languages endpoint structure updated inside the FE business logic + - Phone number pattern updated +- Service Release Process + - logic added to skip technical integration tab for serviceTypeId "consultancy" + - updated "mandatory"/"required" icon (asterisk) color from black to red +- Static Pages Updated + - Data Space + - Catena-X Participant ### Feature +- Removed all daps related code - frontend implementation, business logic and locales +- New Notification messages released: + - credential approval + - credential rejection and + - subscription url change +- User Management + - technical user role description & help link added inside the technical user creation overlay. Incl. multi language support - Connector Registration - Managed - added subscriptionID linkage inside the registration page as well as the business logic to submit the connector connected subscriptionID - Search - - enabled in all portal pages - - new design update for result area - - added functionality to close the search whenever the user clicks on the hidden background area -- Company Role - - enable company role deselection - -### Technical Support - -- exclude locales from duplication sonar checks - -### Bugfix - -- App Release Process - consent conformity check upon upload of the conformity certificate, previous selected consents got deleted -- Data Space Information page - style fix stage sub navigation header and fixed responsive issues - -## 1.6.0-RC1 - -### Change - -- App Release Process - - validate and publish style updates - - updated language endpoint changed structure -- Service Release Process - - Skip technical integration for serviceTypeIds(consultancy) -- Company Roles Update - - Added deselect feature -- SSI Certificat Credential Adminboard - - Add new page and created UI - - Add Backend Logic to fetch certificates - - Add Confirm/Decline business logic - -### Feature - + - new search element enabled/activated for all portal pages + - search result style newly introduced + - added search close function whenever the user clicks on the background/outside the search component +- Company Role Management + - enabled company role unselecting - App Subscription - Add "Detail Data" Button and Overlay - Refracting Activate Subscription Page - Add App Filter Search Functionality + - enabled app tenant url change for active apps +- App Change Function enabled + - 'Change Image' enabled for app owners if app is active (App Management -> App Overview) + - 'Change Description' enabled for app owners if app is active (App Management -> App Overview) - User Account & My User Account - Add Admin Info -- Home, Use cases and Company roles - - Mobile friendly header and stage navigation - - Slider stage header -- App overview - - Enhance Sub Menu by adding 'Change Image' for active apps - - Change Image(sub menu) functionality added for active apps - - App overview 'in review' rendering and styling changed - - Enhance Sub Menu by adding 'Change Description' for active apps - - Change Description(sub menu) functionality added for active apps +- Multi Device Function + - mobile friendly header and stage navigation enabled + - slider stage header implemented and activated + - Home - Carousel - Responsiveness - when switching the portal width screens get rendering issues - Usecase Participation - Created New page under User profile - Add edit Overlay UI @@ -156,33 +65,52 @@ - Show done state - Provide icon for marking a notification as read/unread - New Header and Filter UI -- Connectors - - Disable DAPS related sections -- App Subscription - - Add and Edit Tenant URL functionality in detail overlay -- Static Pages - - Data Space - - Catena-X Participant -- SSI Certificat Credential Adminboard - - Add new page and created UI +- SSI Certificate Request Credential Adminboard released + - new page for credential request management released incl management filters and search + - GET /certificate request api endpoint connected + - certificate request approval function enabled (with backend connection PUT /credentials/{credentialId}/approval) + - certificate request decline/reject function enabled (with backend connection PUT /credentials/{credentialId}/reject) + - download useCase participation document enabled ### Technical Support +- Changed license notice for images +- Added second license +- Sonar findings fixed (Code smells and bugs) +- Dependabot findings fixed (Upgrading dependencies to the latest versions) +- Excluded locales from duplication sonar checks - Project Structure - Moved out shared components and source folders to root level +- app access management component (app cards element) endpoint path updated/changed due to new endpoint path provided by apps services ### Bugfix +- fixed missing URL and Email data after re-opening a service under the service release process +- fixed app release process process handling (Step 3 - Consent) button "save" +- app detail page "back" button fixed +- 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 +- 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 +- App Management page access permission changed to add_apps +- Permission validation 'Credential Mgmt' page activated +- Managed connector registration api call - technicalUserID string empty instead of submitting the subscriptionID +- App Release Process - consent conformity check upon upload of the conformity certificate, previous selected consents got deleted +- Data Space Information page - style fix stage sub navigation header and fixed responsive issues - App Detail - - Subscribe Button - wrong state -- Service Release Process - - Service Release process not working - - Service details page crash issue -- Home - Carousel - - Responsiveness - when switching the portal width screens get rendering issues + - Subscribe Button state management updated - Service Marketplace - Subscription Button cross service highlighted +### Known Knowns + +... + ## 1.5.0 ### Change diff --git a/DEPENDENCIES b/DEPENDENCIES index bbf0a7a55..9b167e687 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.22, Apache-2.0 AND (BSD-3-Clause AND MIT), approved, #9187 +npm/npmjs/@catena-x/portal-shared-components/2.0.23, 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 4ea021a1b..64a22e666 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@catena-x/portal-frontend", - "version": "v1.6.0-RC7", + "version": "v1.6.0-RC8", "description": "Catena-X Portal Frontend", "author": "Catena-X Contributors", "license": "Apache-2.0", @@ -26,7 +26,7 @@ ] }, "dependencies": { - "@catena-x/portal-shared-components": "^2.0.22", + "@catena-x/portal-shared-components": "^2.0.23", "@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 dd5e78335..cc798e320 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -251,7 +251,7 @@ "manufacturingasaservice": "Produzieren als Dienst", "sustainability&co2-footprint": "Sustainability & CO2 Footprint", "real-timecontrol": "Real Time Control", - "modularproduction ": "Modular Production" + "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 1a88d5c16..90cffed4f 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -250,7 +250,7 @@ "manufacturingasaservice": "Manufacturing as a Service", "sustainability&co2-footprint": "Sustainability & CO2 Footprint", "real-timecontrol": "Real Time Control", - "modularproduction ": "Modular Production" + "modularproduction": "Modular Production" }, "noMatch": "No Matches", "for": "for" diff --git a/src/components/pages/AppDetail/AppDetailContentDetails.tsx b/src/components/pages/AppDetail/AppDetailContentDetails.tsx index 9854db8fd..70d8d4325 100644 --- a/src/components/pages/AppDetail/AppDetailContentDetails.tsx +++ b/src/components/pages/AppDetail/AppDetailContentDetails.tsx @@ -82,7 +82,7 @@ export default function AppDetailContentDetails({ diff --git a/src/components/pages/Organization/index.tsx b/src/components/pages/Organization/index.tsx index 9fbf84452..b1f9bdd8f 100644 --- a/src/components/pages/Organization/index.tsx +++ b/src/components/pages/Organization/index.tsx @@ -29,10 +29,7 @@ import { useDispatch } from 'react-redux' import { show } from 'features/control/overlay' import './Organization.scss' import { OVERLAYS } from 'types/Constants' -import { - useFetchActiveAppsQuery, - useFetchSubscriptionStatusQuery, -} from 'features/apps/apiSlice' +import { useFetchActiveAppsQuery } from 'features/apps/apiSlice' import { appToStatus } from 'features/apps/mapper' import { useFetchOwnCompanyDetailsQuery } from 'features/admin/userApiSlice' import LoadingError from './LoadingError' @@ -42,14 +39,8 @@ import { UserDetailCard } from 'components/shared/basic/UserDetailInfo/UserDetai export default function Organization() { const { t } = useTranslation() const dispatch = useDispatch() - const { - data: subscriptionStatus, - isError, - isLoading, - } = useFetchSubscriptionStatusQuery() const { data } = useFetchActiveAppsQuery() - const appSubscribedData = - data && subscriptionStatus && appToStatus(data, subscriptionStatus.content) + const appSubscribedData = data && appToStatus(data) const { data: companyDetails, isError: companyDetailsError, @@ -103,11 +94,6 @@ export default function Organization() {
-
diff --git a/src/components/pages/UserManagement/AppArea/index.tsx b/src/components/pages/UserManagement/AppArea/index.tsx index c9a3a5ec7..296e26966 100644 --- a/src/components/pages/UserManagement/AppArea/index.tsx +++ b/src/components/pages/UserManagement/AppArea/index.tsx @@ -24,8 +24,7 @@ import Box from '@mui/material/Box' import { useTranslation } from 'react-i18next' import SubHeaderTitle from 'components/shared/frame/SubHeaderTitle' import { - SubscriptionStatus, - SubscriptionStatusItem, + ActiveSubscriptionItem, useFetchSubscriptionStatusQuery, } from 'features/apps/apiSlice' import { fetchImageWithToken } from 'services/ImageService' @@ -33,10 +32,7 @@ import { fetchImageWithToken } from 'services/ImageService' export const AppArea = () => { const navigate = useNavigate() const { t } = useTranslation() - const subscriptionStatus = useFetchSubscriptionStatusQuery().data - const cards = subscriptionStatus?.content.filter( - (app) => app.offerSubscriptionStatus === SubscriptionStatus.ACTIVE - ) + const cards = useFetchSubscriptionStatusQuery().data return (
@@ -51,13 +47,13 @@ export const AppArea = () => { position={cards && cards.length > 0 ? 'relative' : ''} > {cards && cards.length > 0 - ? cards?.map((item: SubscriptionStatusItem) => { + ? cards?.map((item: ActiveSubscriptionItem) => { return ( { expandOnHover={false} filledBackground={true} onClick={() => { - navigate(`/appusermanagement/${item.appId}`) + navigate(`/appusermanagement/${item.offerId}`) }} /> ) diff --git a/src/components/shared/basic/CertificateCard/index.tsx b/src/components/shared/basic/CertificateCard/index.tsx index cd36221e8..11a193a78 100644 --- a/src/components/shared/basic/CertificateCard/index.tsx +++ b/src/components/shared/basic/CertificateCard/index.tsx @@ -58,11 +58,12 @@ export const CertificateCard = ({ const renderStatusIcon = () => { if ( - ssiDetailData?.participationStatus.toLowerCase() === StatusVariants.active + ssiDetailData?.participationStatus?.toLowerCase() === + StatusVariants.active ) { return } else if ( - ssiDetailData?.participationStatus.toLowerCase() === + ssiDetailData?.participationStatus?.toLowerCase() === StatusVariants.pending ) { return @@ -84,9 +85,9 @@ export const CertificateCard = ({ {renderStatusIcon()} - {ssiDetailData?.participationStatus.toLowerCase() !== + {ssiDetailData?.participationStatus?.toLowerCase() !== StatusVariants.active && - ssiDetailData?.participationStatus.toLowerCase() !== + ssiDetailData?.participationStatus?.toLowerCase() !== StatusVariants.pending && ( )} @@ -104,7 +105,7 @@ export const CertificateCard = ({ {t('content.certificates.certificateCard.status')} {ssiDetailData?.participationStatus ?? StatusEnum.INACTIVE} - {ssiDetailData?.participationStatus.toLowerCase() === + {ssiDetailData?.participationStatus?.toLowerCase() === StatusVariants.pending && ( <> diff --git a/src/features/apps/apiSlice.ts b/src/features/apps/apiSlice.ts index 7d3e1b33f..81449c133 100644 --- a/src/features/apps/apiSlice.ts +++ b/src/features/apps/apiSlice.ts @@ -70,23 +70,16 @@ export enum SubscriptionStatusText { CREATED = 'In Progress', } -export type SubscriptionStatusItem = { - appId: string +export type ActiveSubscriptionItem = { offerId: string - offerSubscriptionStatus?: SubscriptionStatus - name?: string - provider?: string + name: string + provider: string image?: ImageType } -export type SubscriptionStatusResponse = { - content: SubscriptionStatusItem[] - meta: { - contentSize: number - page: number - totalElements: number - totalPages: number - } +export type SubscriptionStatusItem = { + offerId: string + status: SubscriptionStatus } export type SubscriptionStatusDuplicateItem = { @@ -190,12 +183,12 @@ export const apiSlice = createApi({ if (activeApps.error) return { error: activeApps.error } const data = activeApps.data as AppMarketplaceApp[] const subscriptionStatus = await fetchWithBQ( - '/api/apps/subscribed/subscription-status' + '/api/Apps/subscribed/subscriptions' ) const subscriptionData = - subscriptionStatus.data as SubscriptionStatusResponse + subscriptionStatus.data as SubscriptionStatusItem[] - subscriptionData.content.forEach( + subscriptionData.forEach( (subscriptionItem: SubscriptionStatusDuplicateItem) => { subscriptionItem.offerSubscriptionStatus = subscriptionItem.status subscriptionItem.appId = subscriptionItem.offerId @@ -203,11 +196,10 @@ export const apiSlice = createApi({ ) data.forEach((appItem: AppMarketplaceApp) => { - subscriptionData.content.forEach( + subscriptionData.forEach( (subscriptionItem: SubscriptionStatusItem) => { - if (appItem.id === subscriptionItem.appId) - appItem.subscriptionStatus = - subscriptionItem.offerSubscriptionStatus + if (appItem.id === subscriptionItem.offerId) + appItem.subscriptionStatus = subscriptionItem.status } ) }) @@ -217,31 +209,24 @@ export const apiSlice = createApi({ fetchFavoriteApps: builder.query({ query: () => '/api/apps/favourites', }), - fetchSubscriptionStatus: builder.query({ + fetchSubscriptionStatus: builder.query({ async queryFn(_arg, _queryApi, _extraOptions, fetchWithBQ) { const subscriptionApps = await fetchWithBQ( - '/api/apps/subscribed/subscription-status' + '/api/Apps/subscribed/activesubscriptions' ) if (subscriptionApps.error) return { error: subscriptionApps.error } const subscriptionData = - subscriptionApps.data as SubscriptionStatusResponse - subscriptionData.content.forEach( - (subscriptionItem: SubscriptionStatusDuplicateItem) => { - subscriptionItem.offerSubscriptionStatus = subscriptionItem.status - subscriptionItem.appId = subscriptionItem.offerId - } - ) - subscriptionData.content.forEach( - (subscriptionItem: SubscriptionStatusItem) => { - subscriptionItem.image = { - src: subscriptionItem.image - ? `${getApiBase()}/api/apps/${ - subscriptionItem.appId - }/appDocuments/${subscriptionItem.image}` - : LogoGrayData, - } + subscriptionApps.data as ActiveSubscriptionItem[] + + subscriptionData.forEach((subscriptionItem: ActiveSubscriptionItem) => { + subscriptionItem.image = { + src: subscriptionItem.image + ? `${getApiBase()}/api/apps/${ + subscriptionItem.offerId + }/appDocuments/${subscriptionItem.image}` + : LogoGrayData, } - ) + }) return { data: subscriptionData } }, }), diff --git a/src/features/apps/mapper.ts b/src/features/apps/mapper.ts index 32fba2471..def179746 100644 --- a/src/features/apps/mapper.ts +++ b/src/features/apps/mapper.ts @@ -91,23 +91,18 @@ export const filterSubscribed = ( const subscribed = subscriptionStatus .filter( (status: SubscriptionStatusItem) => - status.offerSubscriptionStatus === SubscriptionStatus.ACTIVE + status.status === SubscriptionStatus.ACTIVE ) - .map((status: SubscriptionStatusItem) => status.appId) + .map((status: SubscriptionStatusItem) => status.offerId) return apps .filter((app: AppMarketplaceApp) => subscribed?.includes(app.id)) .map(appToCard) } -export const appToStatus = ( - apps: AppMarketplaceApp[], - subscriptionStatus: SubscriptionStatusItem[] -): AppMarketplaceApp[] => { +export const appToStatus = (apps: AppMarketplaceApp[]): AppMarketplaceApp[] => { return apps ?.map((app: AppMarketplaceApp) => { - const status = subscriptionStatus?.find( - (e) => e.appId === app.id - )?.offerSubscriptionStatus + const status = SubscriptionStatus.ACTIVE const image = { src: getAppImageUrl(app), alt: app.title, diff --git a/yarn.lock b/yarn.lock index 0e2ede2c5..9ad01b8ac 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.22": - version "2.0.22" - resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.22.tgz#acfd9ed4b6c4d13c45d4ada3b8a2ca086fea7052" - integrity sha512-iKOxkfmsDK8yBjmwyKO0DqpRewBm5CVGSzhkC36zRuW9XZB6XBKuPcG49hCPkimVsR0zE91udID0QioAcHvGIA== +"@catena-x/portal-shared-components@^2.0.23": + version "2.0.23" + resolved "https://registry.yarnpkg.com/@catena-x/portal-shared-components/-/portal-shared-components-2.0.23.tgz#026fd5c0798512560fed8acea157c19f82e4f08f" + integrity sha512-erUqQfmRzrxyUf8IgNZEJeXI5yieI6Gtp1nsb5dIf9004yX3rgGfn40Uc3QmNGEs4QDdSCSnCLgC8fOwNlar+A== dependencies: "@mui/base" "^5.0.0-beta.3" "@mui/system" "^5.13.2"