add methods and store for case reference

This commit is contained in:
2021-07-20 11:26:25 +01:00
parent 0d9015d772
commit 4c31728322
10 changed files with 69 additions and 16 deletions
+8
View File
@@ -8,6 +8,7 @@ export const appealTypeDataActionTypes = {
UPDATEAPPEALTYPEDATA: "UPDATEAPPEALTYPEDATA",
SETCURRENTSECTION: "SETCURRENTSECTION",
SETAPPEALLPA: "SETAPPEALLPA",
SETCASEREFERENCE: "SETCASEREFERENCE",
};
export const getAppealTypeObj = () => (dispatch) => {
@@ -48,3 +49,10 @@ export const setAppealLPA = (appealLPA) => (dispatch) => {
appealLPA: appealLPA,
});
};
export const setCaseReference = (caseReference) => (dispatch) => {
return dispatch({
type: appealTypeDataActionTypes.SETCASEREFERENCE,
caseReference: caseReference,
});
};
+6 -1
View File
@@ -6,6 +6,7 @@ const appealTypeDataInitialState = {
appealTypeID: {},
currentSection: 1,
appealLPA: "",
caseReference: "",
};
export default function reducer(state = appealTypeDataInitialState, action) {
@@ -35,7 +36,11 @@ export default function reducer(state = appealTypeDataInitialState, action) {
...state,
appealLPA: action.appealLPA,
};
case appealTypeDataActionTypes.SETCASEREFERENCE:
return {
...state,
caseReference: action.caseReference,
};
default:
return state;
}