1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-28 01:29:44 +02:00
planka/client/src/selectors/all.js

20 lines
493 B
JavaScript
Raw Normal View History

2019-08-31 04:07:25 +05:00
import { createSelector } from 'redux-orm';
import orm from '../orm';
import { currentUserIdSelector } from './current';
export const allUsersSelector = createSelector(
orm,
({ User }) => User.getOrderedUndeletedQuerySet().toRefArray(),
);
export const allUsersExceptCurrentSelector = createSelector(
orm,
(state) => currentUserIdSelector(state),
({ User }, currentUserId) => User.getOrderedUndeletedQuerySet()
.exclude({
id: currentUserId,
})
.toRefArray(),
);