diff --git a/CHANGELOG.md b/CHANGELOG.md index dc929329e..908eac064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ - Fixed missing street number in form [#1081](https://github.com/eclipse-tractusx/portal-frontend/issues/1081) - **App and Service Admin board** - Fix data disappearing issue on re-clicking active tab/filter in app/service admin board [#1100](https://github.com/eclipse-tractusx/portal-frontend/pull/1100) +- **App & Service Subcription Managment** + - Search place holder text updated + - Show only available offer names at the top ## Unreleased 2.2.0-RC3 @@ -54,7 +57,6 @@ - **Technical User Management** - Display technicalUserManagement button based on role validation [#1073](https://github.com/eclipse-tractusx/portal-frontend/pull/1073) - **OSP Consent form** - - Display invited company name in OSP consent form (Previously hard coded with 'BMW') [#1083](https://github.com/eclipse-tractusx/portal-frontend/pull/1083) - Fix OSP consent form 400 submission error [#1102](https://github.com/eclipse-tractusx/portal-frontend/pull/1102/files) - **Use Case participation** - Removes use cases without verified credentials from the "Use Case Participation" list [#1088](https://github.com/eclipse-tractusx/portal-frontend/pull/1088) diff --git a/src/assets/locales/de/main.json b/src/assets/locales/de/main.json index 5cf594ca4..4b741e55f 100644 --- a/src/assets/locales/de/main.json +++ b/src/assets/locales/de/main.json @@ -1474,7 +1474,7 @@ "description": "Do you wan't to rather use the autosetup; connect your service to automate marketplace subscription build", "readMore": "Read More", "registerURL": "RegisterURL", - "search": "...search by entering the app name here.", + "search": "...search by entering the company name here.", "noDataMessage": "No data available", "subscriptionHeading": ">> there are already active subscriptions for the service {serviceName}", "subscribeSuccessMsg": "Subscribed Successfully", diff --git a/src/assets/locales/de/servicerelease.json b/src/assets/locales/de/servicerelease.json index daef24a49..463e9f045 100644 --- a/src/assets/locales/de/servicerelease.json +++ b/src/assets/locales/de/servicerelease.json @@ -153,7 +153,7 @@ "description": "Do you wan't to rather use the autosetup; connect your service to automate marketplace subscription build", "readMore": "Read More", "registerURL": "RegisterURL", - "search": "...search by entering the service name here.", + "search": "...search by entering the company name here.", "noDataMessage": "No data available", "subscriptionHeading": ">> there are already active subscriptions for the service {serviceName}", "subscribeSuccessMsg": "Subscribed Successfully", diff --git a/src/assets/locales/en/main.json b/src/assets/locales/en/main.json index cdda83a22..a5e7a550d 100644 --- a/src/assets/locales/en/main.json +++ b/src/assets/locales/en/main.json @@ -1442,7 +1442,7 @@ "description": "Do you wan't to rather use the autosetup; connect your service to automate marketplace subscription build", "readMore": "Read More", "registerURL": "RegisterURL", - "search": "...search by entering the app name here.", + "search": "...search by entering the company name here.", "noDataMessage": "No data available", "subscriptionHeading": ">> there are already active subscriptions for the service {serviceName}", "subscribeSuccessMsg": "Subscribed Successfully", diff --git a/src/assets/locales/en/servicerelease.json b/src/assets/locales/en/servicerelease.json index 8c86fee4b..2ff796b0b 100644 --- a/src/assets/locales/en/servicerelease.json +++ b/src/assets/locales/en/servicerelease.json @@ -153,7 +153,7 @@ "description": "Do you wan't to rather use the autosetup; connect your service to automate marketplace subscription build", "readMore": "Read More", "registerURL": "RegisterURL", - "search": "...search by entering the service name here.", + "search": "...search by entering the company name here.", "noDataMessage": "No data available", "subscriptionHeading": ">> there are already active subscriptions for the service {serviceName}", "subscribeSuccessMsg": "Subscribed Successfully", diff --git a/src/components/shared/templates/Subscription/index.tsx b/src/components/shared/templates/Subscription/index.tsx index 10b617e77..29380105b 100644 --- a/src/components/shared/templates/Subscription/index.tsx +++ b/src/components/shared/templates/Subscription/index.tsx @@ -304,15 +304,6 @@ export default function Subscription({ appFiltersData = data?.content } - useEffect(() => { - if (appFiltersData?.length) { - setState({ - type: ActionKind.SET_APP_FILTERS, - payload: appFiltersData, - }) - } - }, [appFiltersData, type]) - const { data, refetch, @@ -331,6 +322,25 @@ export default function Subscription({ } }, [data]) + useEffect(() => { + if (data?.content && appFiltersData) { + const fillers: AppFiltersResponse[] = [] + appFiltersData.forEach((item) => { + data.content.forEach((base: { offerId: string }) => { + if (base.offerId === item.id) { + fillers.push(item) + } + }) + }) + if (fillers?.length) { + setState({ + type: ActionKind.SET_APP_FILTERS, + payload: fillers, + }) + } + } + }, [appFiltersData, data]) + const setView = (e: React.MouseEvent) => { let status = '' if (e.currentTarget.value === FilterType.REQUEST) {