added crm driven form via oauth
This commit is contained in:
@@ -10,9 +10,12 @@ export const getFormObj = () => (dispatch) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const setForm = (formData) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: formDataActionTypes.SETFORMDATA,
|
||||
formData: formData,
|
||||
});
|
||||
};
|
||||
export const setForm =
|
||||
(formData, mandatoryFieldsData, pickListData) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: formDataActionTypes.SETFORMDATA,
|
||||
formData: formData,
|
||||
mandatoryFieldsData: mandatoryFieldsData,
|
||||
pickListData: pickListData,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,6 +2,8 @@ import { formDataActionTypes } from "./action";
|
||||
|
||||
const formDataInitialState = {
|
||||
formData: {},
|
||||
mandatoryFieldsData: {},
|
||||
pickListData: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = formDataInitialState, action) {
|
||||
@@ -9,6 +11,8 @@ export default function reducer(state = formDataInitialState, action) {
|
||||
case formDataActionTypes.SETFORMDATA:
|
||||
return {
|
||||
formData: action.formData,
|
||||
mandatoryFieldsData: action.mandatoryFieldsData,
|
||||
pickListData: action.pickListData,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
|
||||
@@ -2,6 +2,7 @@ export const searchResultsActionTypes = {
|
||||
GETSEARCHRESULTS: "GETSEARCHRESULTS",
|
||||
SETSEARCHRESULTS: "SETSEARCHRESULTS",
|
||||
UPDATESEARCHRESULTS: "UPDATESEARCHRESULTS",
|
||||
SETSEARCHDETAILS: "SETSEARCHDETAILS",
|
||||
};
|
||||
|
||||
export const getSearchResultshObj = () => (dispatch) => {
|
||||
@@ -16,3 +17,10 @@ export const setSearchResults = (searchResults) => (dispatch) => {
|
||||
searchResultsObj: searchResults,
|
||||
});
|
||||
};
|
||||
|
||||
export const setSearchDetails = (searchDetails) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: searchResultsActionTypes.SETSEARCHDETAILS,
|
||||
searchDetailsObj: searchDetails,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,14 +2,21 @@ import { searchResultsActionTypes } from "./action";
|
||||
|
||||
const searchResultsInitialState = {
|
||||
searchResultsObj: {},
|
||||
searchDetailsObj: {},
|
||||
};
|
||||
|
||||
export default function reducer(state = searchResultsInitialState, action) {
|
||||
switch (action.type) {
|
||||
case searchResultsActionTypes.SETSEARCHRESULTS:
|
||||
return {
|
||||
...state,
|
||||
searchResultsObj: action.searchResultsObj,
|
||||
};
|
||||
case searchResultsActionTypes.SETSEARCHDETAILS:
|
||||
return {
|
||||
...state,
|
||||
searchDetailsObj: action.searchDetailsObj,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user