summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/redux/actions
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-07 17:30:15 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-07-07 17:39:43 +0200
commit9c8a987556d0fb0cdf0eb67e0c191a8dcc5593b9 (patch)
tree617c184a6d2868aec6efc29f1c8dea1b19a00598 /opendc-web/opendc-web-ui/src/redux/actions
parentd28a2f194a75eb86095485ae4f88be349bcc18b6 (diff)
ui: Fetch scenarios and portfolios using React Query
Diffstat (limited to 'opendc-web/opendc-web-ui/src/redux/actions')
-rw-r--r--opendc-web/opendc-web-ui/src/redux/actions/portfolios.js34
-rw-r--r--opendc-web/opendc-web-ui/src/redux/actions/scenarios.js34
2 files changed, 0 insertions, 68 deletions
diff --git a/opendc-web/opendc-web-ui/src/redux/actions/portfolios.js b/opendc-web/opendc-web-ui/src/redux/actions/portfolios.js
deleted file mode 100644
index 923cd217..00000000
--- a/opendc-web/opendc-web-ui/src/redux/actions/portfolios.js
+++ /dev/null
@@ -1,34 +0,0 @@
-export const ADD_PORTFOLIO = 'ADD_PORTFOLIO'
-export const UPDATE_PORTFOLIO = 'UPDATE_PORTFOLIO'
-export const DELETE_PORTFOLIO = 'DELETE_PORTFOLIO'
-export const OPEN_PORTFOLIO_SUCCEEDED = 'OPEN_PORTFOLIO_SUCCEEDED'
-
-export function addPortfolio(projectId, portfolio) {
- return {
- type: ADD_PORTFOLIO,
- projectId,
- portfolio,
- }
-}
-
-export function updatePortfolio(portfolio) {
- return {
- type: UPDATE_PORTFOLIO,
- portfolio,
- }
-}
-
-export function deletePortfolio(id) {
- return {
- type: DELETE_PORTFOLIO,
- id,
- }
-}
-
-export function openPortfolioSucceeded(projectId, portfolioId) {
- return {
- type: OPEN_PORTFOLIO_SUCCEEDED,
- projectId,
- portfolioId,
- }
-}
diff --git a/opendc-web/opendc-web-ui/src/redux/actions/scenarios.js b/opendc-web/opendc-web-ui/src/redux/actions/scenarios.js
deleted file mode 100644
index 644933d6..00000000
--- a/opendc-web/opendc-web-ui/src/redux/actions/scenarios.js
+++ /dev/null
@@ -1,34 +0,0 @@
-export const ADD_SCENARIO = 'ADD_SCENARIO'
-export const UPDATE_SCENARIO = 'UPDATE_SCENARIO'
-export const DELETE_SCENARIO = 'DELETE_SCENARIO'
-export const OPEN_SCENARIO_SUCCEEDED = 'OPEN_SCENARIO_SUCCEEDED'
-
-export function addScenario(scenario) {
- return {
- type: ADD_SCENARIO,
- scenario,
- }
-}
-
-export function updateScenario(scenario) {
- return {
- type: UPDATE_SCENARIO,
- scenario,
- }
-}
-
-export function deleteScenario(id) {
- return {
- type: DELETE_SCENARIO,
- id,
- }
-}
-
-export function openScenarioSucceeded(projectId, portfolioId, scenarioId) {
- return {
- type: OPEN_SCENARIO_SUCCEEDED,
- projectId,
- portfolioId,
- scenarioId,
- }
-}