Files
pedwfrontend/store/currentView/action.js
T
2021-08-09 10:16:54 +01:00

59 lines
1.9 KiB
JavaScript

export const currentViewActionTypes = {
GETCURRENTVIEW: "GETCURRENTVIEW",
SETCURRENTVIEW: "SETCURRENTVIEW",
SETCURRENTREFERENCE: "SETCURRENTREFERENCE",
SETREPRESENTATIONCAPACITY: "SETREPRESENTATIONCAPACITY",
SETREPRESENTATIONSUBMIT: "SETREPRESENTATIONSUBMIT",
SETREPRESENTATIONSUBMITCONFIRMATION: "SETREPRESENTATIONSUBMITCONFIRMATION",
};
export const getCurrentViewObj = () => (dispatch) => {
return dispatch({
type: currentViewActionTypes.GETCURRENTVIEW,
});
};
export const setCurrentView = (currentView) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETCURRENTVIEW,
currentView: currentView,
});
};
export const setCurrentReference = (caseReference) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETCURRENTREFERENCE,
caseReference: caseReference,
});
};
export const setRepresentationCapacity =
(representationCapacity) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETREPRESENTATIONCAPACITY,
representationCapacity: representationCapacity,
});
};
export const setRepresentationSubmit = (representationSubmit) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETREPRESENTATIONSUBMIT,
representationSubmit: representationSubmit,
});
};
export const setSubmitBack = (representationSubmit) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETREPRESENTATIONSUBMIT,
representationSubmit: representationSubmit,
});
};
export const setRepresentationSubmitConfirmation =
(representationSubmitConfirmation) => (dispatch) => {
return dispatch({
type: currentViewActionTypes.SETREPRESENTATIONSUBMITCONFIRMATION,
representationSubmitConfirmation: representationSubmitConfirmation,
});
};