You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
547 B
JavaScript
26 lines
547 B
JavaScript
import { createSelector } from 'redux-orm';
|
|
|
|
import orm from '../orm';
|
|
|
|
export const makeSelectProjectManagerById = () =>
|
|
createSelector(
|
|
orm,
|
|
(_, id) => id,
|
|
({ ProjectManager }, id) => {
|
|
const projectManagerModel = ProjectManager.withId(id);
|
|
|
|
if (!projectManagerModel) {
|
|
return projectManagerModel;
|
|
}
|
|
|
|
return projectManagerModel.ref;
|
|
},
|
|
);
|
|
|
|
export const selectProjectManagerById = makeSelectProjectManagerById();
|
|
|
|
export default {
|
|
makeSelectProjectManagerById,
|
|
selectProjectManagerById,
|
|
};
|