Add more reports

This commit is contained in:
2017-01-08 09:47:30 -05:00
parent 908e10736a
commit 4e547fe4fd
16 changed files with 357 additions and 97 deletions

View File

@ -0,0 +1,19 @@
var assign = require('object-assign');
var ReportConstants = require('../constants/ReportConstants');
var UserConstants = require('../constants/UserConstants');
module.exports = function(state = {}, action) {
switch (action.type) {
case ReportConstants.REPORT_FETCHED:
var report = action.report;
var reports = assign({}, state, {
[report.ReportId]: report
});
return reports;
case UserConstants.USER_LOGGEDOUT:
return {};
default:
return state;
}
};