113 lines
3.5 KiB
JavaScript
113 lines
3.5 KiB
JavaScript
export const currentViewActionTypes = {
|
|
GETCURRENTVIEW: "GETCURRENTVIEW",
|
|
SETCURRENTVIEW: "SETCURRENTVIEW",
|
|
SETCURRENTREFERENCE: "SETCURRENTREFERENCE",
|
|
SETREPRESENTATIONCAPACITY: "SETREPRESENTATIONCAPACITY",
|
|
SETREPRESENTATIONSUBMIT: "SETREPRESENTATIONSUBMIT",
|
|
SETREPRESENTATIONSUBMITCONFIRMATION: "SETREPRESENTATIONSUBMITCONFIRMATION",
|
|
SETCURRENTLINKEDCASES: "SETCURRENTLINKEDCASES",
|
|
SETCURRENTPAGE: "SETCURRENTPAGE",
|
|
SETSHOWREPS: "SETSHOWREPS",
|
|
SETREPRESENTATIONMESSAGESENT: "SETREPRESENTATIONMESSAGESENT",
|
|
SETREPRESENTATIONRESET: "SETREPRESENTATIONRESET",
|
|
SETSHOWLOGIN: "SETSHOWLOGIN",
|
|
SETLOCALE: "SETLOCALE",
|
|
};
|
|
|
|
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,
|
|
});
|
|
};
|
|
|
|
export const setRepresentationMessageSent =
|
|
(representationMessageSent) => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETREPRESENTATIONMESSAGESENT,
|
|
representationMessageSent: representationMessageSent,
|
|
});
|
|
};
|
|
|
|
export const setRepresentationReset = () => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETREPRESENTATIONRESET,
|
|
representationCapacity: {},
|
|
representationSubmit: "",
|
|
representationSubmitConfirmation: false,
|
|
representationMessageSent: false,
|
|
});
|
|
};
|
|
|
|
export const setCurrentLinkedCases = (linkedCaseReferences) => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETCURRENTLINKEDCASES,
|
|
linkedCaseReferences: linkedCaseReferences,
|
|
});
|
|
};
|
|
|
|
export const setCurrentPage = (currentPage) => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETCURRENTPAGE,
|
|
currentPage: currentPage,
|
|
});
|
|
};
|
|
|
|
export const setShowReps = (showReps, showLogin) => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETSHOWREPS,
|
|
showLogin: showLogin,
|
|
showReps: showReps,
|
|
});
|
|
};
|
|
|
|
export const setLocale = (locale) => (dispatch) => {
|
|
return dispatch({
|
|
type: currentViewActionTypes.SETLOCALE,
|
|
locale: locale,
|
|
});
|
|
};
|