Skip to content

Commit

Permalink
fix(subscription management): update search placeholder text. show on…
Browse files Browse the repository at this point in the history
…ly available offer names at the top (eclipse-tractusx#1111)
  • Loading branch information
manojava-gk authored Sep 17, 2024
1 parent 37fd7ff commit d1f5f22
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/de/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/de/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/locales/en/servicerelease.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 19 additions & 9 deletions src/components/shared/templates/Subscription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<HTMLInputElement>) => {
let status = ''
if (e.currentTarget.value === FilterType.REQUEST) {
Expand Down

0 comments on commit d1f5f22

Please sign in to comment.