Skip to content

Commit

Permalink
Edit all selected users when clicking on the experience of a specific…
Browse files Browse the repository at this point in the history
… user (#4280)

* edit all selected users when clicking on the user experience of a specific user

* update changelog
  • Loading branch information
philippotto authored Sep 12, 2019
1 parent 60614c0 commit dedc347
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
### Changed

- Renamed "Expected Time" to "Time Limit" in the project table. [#4278](https://github.com/scalableminds/webknossos/pull/4278)
- Clicking on an experience domain of a user, while multiple users are selected will edit the domain of all selected users (instead of only the domain of the clicked row). [#4280](https://github.com/scalableminds/webknossos/pull/4280)

### Fixed
- When creating tasks from zip, the individual nml names are used again, rather than the zip name. [#4277](https://github.com/scalableminds/webknossos/pull/4277)
Expand Down
8 changes: 5 additions & 3 deletions frontend/javascripts/admin/user/user_list_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,13 @@ class UserListView extends React.PureComponent<PropsWithRouter, State> {
<Tag key={`experience_${user.id}_${domain}`}>
<span
onClick={() => {
this.setState({
singleSelectedUser: user,
this.setState(prevState => ({
// If no user is selected, set singleSelectedUser. Otherwise,
// open the modal so that all selected users are edited.
singleSelectedUser: prevState.selectedUserIds.length > 0 ? null : user,
isExperienceModalVisible: true,
domainToEdit: domain,
});
}));
}}
>
{domain} : {value}
Expand Down

0 comments on commit dedc347

Please sign in to comment.