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
  • Loading branch information
manojava-gk committed Sep 13, 2024
1 parent 20b6637 commit f8f2c1d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
- 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)
- **App & Service Subcription Managemnt**
- Search place holder text updated
- Show only available offer names at the top

## 2.2.0

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 @@ -1471,7 +1471,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 @@ -152,7 +152,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 @@ -1439,7 +1439,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 @@ -152,7 +152,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 f8f2c1d

Please sign in to comment.