Auditing refinements.
This commit is contained in:
@@ -5,6 +5,7 @@ const INITIAL_STATE = {
|
||||
scoreCard: null,
|
||||
error: null,
|
||||
loading: false,
|
||||
auditLoading: false,
|
||||
audit: {},
|
||||
auditError: null
|
||||
};
|
||||
@@ -30,10 +31,12 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
|
||||
return { ...state, data: action.payload };
|
||||
case ReportingActionTypes.SET_SCORE_CARD:
|
||||
return { ...state, loading: false, scoreCard: action.payload };
|
||||
case ReportingActionTypes.CALCULATE_AUDIT:
|
||||
return { ...state, auditLoading: true };
|
||||
case ReportingActionTypes.SET_AUDIT_RESULTS:
|
||||
return { ...state, loading: false, auditError: null, audit: action.payload };
|
||||
return { ...state, loading: false, auditLoading: false, auditError: null, audit: action.payload };
|
||||
case ReportingActionTypes.SET_AUDIT_ERROR:
|
||||
return { ...state, auditError: action.payload };
|
||||
return { ...state, auditLoading: false, auditError: action.payload };
|
||||
case ReportingActionTypes.TOGGLE_GROUP_VERIFIED:
|
||||
return {
|
||||
...state,
|
||||
|
||||
@@ -9,7 +9,7 @@ export const selectReportingError = createSelector([selectReporting], (reporting
|
||||
export const selectReportData = createSelector([selectReporting], (reporting) => reporting.data);
|
||||
export const selectAuditData = createSelector([selectReporting], (reporting) => reporting.audit);
|
||||
export const selectAuditError = createSelector([selectReporting], (reporting) => reporting.auditError);
|
||||
|
||||
export const selectAuditLoading = createSelector([selectReporting], (reporting) => reporting.auditLoading);
|
||||
// export const selectWatchedPaths = createSelector(
|
||||
// [selectReporting],
|
||||
// (application) => application.watchedPaths
|
||||
|
||||
Reference in New Issue
Block a user