new appeal progress pattern

This commit is contained in:
2022-07-19 11:54:00 +01:00
parent 58415b82c6
commit ee110bd8a7
6 changed files with 452 additions and 210 deletions
+8
View File
@@ -10,6 +10,7 @@ export const appealTypeDataActionTypes = {
SETFORMCOMPLETE: "SETFORMCOMPLETE",
SETDOCUMENTLIST: "SETDOCUMENTLIST",
SETFILELIST: "SETFILELIST",
SETNEWAPPEALPROGRESS: "SETNEWAPPEALPROGRESS",
};
export const getAppealTypeObj = () => (dispatch) => {
@@ -78,3 +79,10 @@ export const setFilesForAppeal = (fileList) => (dispatch) => {
fileList: fileList,
});
};
export const setNewAppealProgress = (progress) => (dispatch) => {
return dispatch({
type: appealTypeDataActionTypes.SETNEWAPPEALPROGRESS,
progress: progress,
});
};
+6
View File
@@ -10,6 +10,7 @@ const appealTypeDataInitialState = {
formComplete: "false",
documentList: {},
fileList: {},
progress: [],
};
export default function reducer(state = appealTypeDataInitialState, action) {
@@ -59,6 +60,11 @@ export default function reducer(state = appealTypeDataInitialState, action) {
...state,
fileList: action.fileList,
};
case appealTypeDataActionTypes.SETNEWAPPEALPROGRESS:
return {
...state,
progress: action.progress,
};
default:
return state;
}