Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Retain "None" Option in Technical User Setup After Submission #1039

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- removed unnecessary condition in semantic hub page's table [#979](https://github.com/eclipse-tractusx/portal-frontend/pull/979)
- fixed unchanged text of button when user requests subscription [#985](https://github.com/eclipse-tractusx/portal-frontend/pull/985)
- fixed height for "Admin Service Detail" page content [#1001](https://github.com/eclipse-tractusx/portal-frontend/pull/1001)
- fixed "None" selection issue in Technical Integration -> App Release Process [#1036](https://github.com/eclipse-tractusx/portal-frontend/issues/1036)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has been added in the wrong place. Put this at the top.
title should be "unreleased"


## 2.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ export default function TechnicalIntegration() {
)

useEffect(() => {
setTechUserProfiles(userProfiles)
if (userProfiles.length > 0) {
setTechUserProfiles(userProfiles)
} else {
// Set default value as "None" when user profiles don't have any roles
// Initially, value is "None"
setTechUserProfiles([technicalUserNone])
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better use ? : instead of if-else here:

setTechUserProfiles(userProfiles.length > 0 ? userProfiles : [technicalUserNone])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @oyo,
I am using the if and else statements because of easy to read and understand the code. Sometimes ?: will create an issue.

But anyway I will make these changes. 🙂

}, [userProfiles])

const defaultValues = {
Expand Down
Loading