Skip to content

Commit

Permalink
fix: display user management navigation button based on role validati…
Browse files Browse the repository at this point in the history
…on (#1073)
  • Loading branch information
charmi-v authored Sep 6, 2024
1 parent 4ac2435 commit 3acd1eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
22 changes: 8 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Changelog

## Unreleased

### Bugfixes

- **Connector Management**
- fixed technical user selection

## 2.2.0-RC2
## Unreleased 2.2.0-RC3

### Feature

Expand All @@ -16,12 +9,6 @@
- **Company Subscription Management**
- Extended the subscription detail page for customer to include more app-related information [#1051](https://github.com/eclipse-tractusx/portal-frontend/pull/1051)

### BugFix

- Technical User
- Show appropriate error message.
- Fix closing page notification bar issue

### Change

- **Technical User Management**
Expand All @@ -35,6 +22,11 @@

### Bugfixes

- **Connector Management**
- fixed technical user selection
- **Technical User**
- Show appropriate error message.
- Fix closing page notification bar issue
- **IDP management**
- Fixed statusTag color in status coloumn [#978](https://github.com/eclipse-tractusx/portal-frontend/pull/978)
- **Connector Management**
Expand All @@ -45,6 +37,8 @@
- Fixed 'activeTab' conditions to load data for Tab-2(Registration Process) [#1050](https://github.com/eclipse-tractusx/portal-frontend/pull/1050)
- **App Release Process**:
- Fixed role upload does not work using Firefox [#1003](https://github.com/eclipse-tractusx/portal-frontend/pull/1003)
- **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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { useEffect } from 'react'
import { SubNavigation } from '@catena-x/portal-shared-components'
import { useTranslation } from 'react-i18next'
import { useNavigate } from 'react-router-dom'
import UserService from 'services/UserService'
import { PAGES, ROLES } from 'types/Constants'

export const StageSubNavigation = () => {
const { t } = useTranslation()
Expand All @@ -44,9 +46,13 @@ export const StageSubNavigation = () => {

return (
<SubNavigation
buttonLabel={t('navigation.subNavigation.buttonLabel')}
buttonLabel={
(UserService.hasRole(ROLES.TECH_USER_VIEW) &&
t('navigation.subNavigation.buttonLabel')) ||
undefined
}
onButtonClick={() => {
navigate('/technicalUserManagement')
navigate(`/${PAGES.TECH_USER_MANAGEMENT}`)
}}
link1Label={t('navigation.subNavigation.link1Label')}
onLink1Click={() => {
Expand Down

0 comments on commit 3acd1eb

Please sign in to comment.