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", }; 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: {}, 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, }); };