mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
WIP
This commit is contained in:
15
client/src/store/customViews/customViews.selectors.js
Normal file
15
client/src/store/customViews/customViews.selectors.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import {pickItemsFromIds} from 'store/selectors';
|
||||
|
||||
|
||||
export const getResourceViews = (state, resourceName) => {
|
||||
const resourceViewsIds = state.views.resourceViews[resourceName] || [];
|
||||
return pickItemsFromIds(state.views.views, resourceViewsIds);
|
||||
};
|
||||
|
||||
export const getViewMeta = (state, viewId) => {
|
||||
return state.views.viewsMeta[viewId] || {};
|
||||
};
|
||||
|
||||
export const getViewItem = (state, viewId) => {
|
||||
return state.views.views[viewId] || {};
|
||||
};
|
||||
Reference in New Issue
Block a user