diff --git a/src/result/result-store.js b/src/result/result-store.js new file mode 100644 index 0000000..fb6ab36 --- /dev/null +++ b/src/result/result-store.js @@ -0,0 +1,33 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + + +import ArrayStore from '../common/array-store'; +import ResultsDataManager from './results-data-manager'; + +class ResultStore extends ArrayStore { + constructor() { + super('results', ResultsDataManager); + } + + reduce(state, action) { + return super.reduce(state, action); + } + +} + +export default new ResultStore(); \ No newline at end of file diff --git a/src/result/results-data-manager.js b/src/result/results-data-manager.js new file mode 100644 index 0000000..b30c9c1 --- /dev/null +++ b/src/result/results-data-manager.js @@ -0,0 +1,29 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + + +import RestDataManager from '../common/data-managers/rest-data-manager'; + +class ResultsDataManager extends RestDataManager{ + + constructor() { + super('result', '/results'); + } + +} + +export default new ResultsDataManager() \ No newline at end of file diff --git a/src/scenario/scenarios-data-manager.js b/src/scenario/scenarios-data-manager.js index 760493b..e440e92 100644 --- a/src/scenario/scenarios-data-manager.js +++ b/src/scenario/scenarios-data-manager.js @@ -108,6 +108,12 @@ class ScenariosDataManager extends RestDataManager { token: token, param: '?scenarioID=' + scenario.id, }); + + AppDispatcher.dispatch({ + type: 'results/start-load', + token: token, + param: '?scenarioID=' + scenario.id + }) } } }