-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dashboard SIS panel to correctly fetch public groups instead of g…
…roups when accessing group names.
- Loading branch information
Martin Krulis
committed
Nov 26, 2017
1 parent
e806161
commit 1929e28
Showing
4 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { createSelector } from 'reselect'; | ||
import { Map } from 'immutable'; | ||
|
||
/** | ||
* Select groups part of the state | ||
*/ | ||
const EMPTY_MAP = Map(); | ||
|
||
export const publicGroupsSelectors = state => | ||
state.publicGroups.get('resources'); | ||
|
||
export const publicGroupSelector = id => | ||
createSelector(publicGroupsSelectors, groups => groups.get(id)); | ||
|
||
export const publicGroupDataAccessorSelector = createSelector( | ||
publicGroupsSelectors, | ||
groups => groupId => groups.getIn([groupId, 'data'], EMPTY_MAP) | ||
); |