WIP for Reporting. Pulled out calculations to utility functions.
This commit is contained in:
49
src/redux/reporting/reporting.selectors.js
Normal file
49
src/redux/reporting/reporting.selectors.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import { createSelector } from "reselect";
|
||||
|
||||
const selectReporting = (state) => state.reporting;
|
||||
|
||||
export const selectReportLoading = createSelector(
|
||||
[selectReporting],
|
||||
(reporting) => reporting.loading
|
||||
);
|
||||
export const selectDates = createSelector(
|
||||
[selectReporting],
|
||||
(reporting) => reporting.dates
|
||||
);
|
||||
export const selectScorecard = createSelector(
|
||||
[selectReporting],
|
||||
(reporting) => reporting.scoreCard
|
||||
);
|
||||
export const selectReportingError = createSelector(
|
||||
[selectReporting],
|
||||
(reporting) => reporting.error
|
||||
);
|
||||
export const selectReportData = createSelector(
|
||||
[selectReporting],
|
||||
(reporting) => reporting.data
|
||||
);
|
||||
|
||||
// export const selectWatchedPaths = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.watchedPaths
|
||||
// );
|
||||
|
||||
// export const selectWatcherError = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.watcherError
|
||||
// );
|
||||
|
||||
// export const selectSelectedJobId = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.selectedJobId
|
||||
// );
|
||||
|
||||
// export const selectSelectedJobTargetPc = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.selectedJobTargetPc
|
||||
// );
|
||||
|
||||
// export const selectSettings = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.settings
|
||||
// );
|
||||
Reference in New Issue
Block a user