blob: ddfacaf0db7449b31cbb2646b6d809a3ba504b9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
export const SET_AUTH_VISIBILITY_FILTER = "SET_AUTH_VISIBILITY_FILTER";
export const OPEN_NEW_SIMULATION_MODAL = "OPEN_NEW_SIMULATION_MODAL";
export const CLOSE_NEW_SIMULATION_MODAL = "CLOSE_SIMULATION_POPUP";
export const ADD_SIMULATION = "ADD_SIMULATION";
export const ADD_SIMULATION_SUCCEEDED = "ADD_SIMULATION_SUCCEEDED";
export const DELETE_SIMULATION = "DELETE_SIMULATION";
export const DELETE_SIMULATION_SUCCEEDED = "DELETE_SIMULATION_SUCCEEDED";
export const OPEN_SIMULATION = "OPEN_SIMULATION";
export function setAuthVisibilityFilter(filter) {
return {
type: SET_AUTH_VISIBILITY_FILTER,
filter: filter
};
}
export function openNewSimulationModal() {
return {
type: OPEN_NEW_SIMULATION_MODAL
};
}
export function closeNewSimulationModal() {
return {
type: CLOSE_NEW_SIMULATION_MODAL
};
}
export function addSimulation(name) {
return (dispatch, getState) => {
const {auth} = getState();
dispatch({
type: ADD_SIMULATION,
name,
userId: auth.userId
});
};
}
export function addSimulationSucceeded(authorization) {
return {
type: ADD_SIMULATION_SUCCEEDED,
authorization
};
}
export function deleteSimulation(id) {
return {
type: DELETE_SIMULATION,
id
};
}
export function deleteSimulationSucceeded(id) {
return {
type: DELETE_SIMULATION_SUCCEEDED,
id
};
}
export function openSimulation(id) {
return {
type: OPEN_SIMULATION,
id
};
}
|