all cases reducer added

This commit is contained in:
Aman Chaturvedi
2022-12-09 14:35:37 +05:30
parent 7091b54337
commit 1dd4a2996c

View File

@@ -46,16 +46,23 @@ const allCasesSlice = createSlice({
if (todoList.length) {
todoList.unshift({
type: Type.TODO_HEADER,
caseId: -1,
caseId: -2,
} as Data);
if (otherCasesList.length) {
otherCasesList.unshift({
type: Type.CASES_HEADER,
caseId: -2,
caseId: -3,
} as Data);
}
}
state.compiledList = [...todoList, ...otherCasesList];
state.compiledList = [
{
type: Type.FILTER,
caseId: -1,
} as Data,
...todoList,
...otherCasesList,
];
state.casesListMap = list;
state.casesList = action.payload;
state.otherCasesList = action.payload;