@zeniai/client-epic-state 4.7.84 → 4.7.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/task/task.d.ts +46 -0
- package/lib/entity/task/task.js +36 -0
- package/lib/entity/task/taskPayload.d.ts +20 -0
- package/lib/entity/task/taskPayload.js +37 -0
- package/lib/entity/task/taskReducer.d.ts +6 -0
- package/lib/entity/task/taskReducer.js +33 -0
- package/lib/entity/task/taskSelector.d.ts +4 -0
- package/lib/entity/task/taskSelector.js +18 -0
- package/lib/entity/taskSummary/taskSummaryPayload.d.ts +7 -0
- package/lib/entity/taskSummary/taskSummaryPayload.js +2 -0
- package/lib/entity/taskSummary/taskSummaryReducer.d.ts +6 -0
- package/lib/entity/taskSummary/taskSummaryReducer.js +32 -0
- package/lib/entity/taskSummary/taskSummarySelector.d.ts +4 -0
- package/lib/entity/taskSummary/taskSummarySelector.js +18 -0
- package/lib/entity/taskSummary/taskSummaryState.d.ts +8 -0
- package/lib/entity/taskSummary/taskSummaryState.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +6 -2
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- package/lib/epic.d.ts +9 -1
- package/lib/epic.js +9 -1
- package/lib/index.d.ts +10 -2
- package/lib/index.js +21 -1
- package/lib/reducer.d.ts +12 -0
- package/lib/reducer.js +12 -0
- package/lib/view/companyView/companyViewPayload.d.ts +2 -0
- package/lib/view/companyView/epic/fetchCompanyManagementViewEpic.d.ts +2 -1
- package/lib/view/companyView/epic/fetchCompanyManagementViewEpic.js +4 -0
- package/lib/view/companyView/selector/companyManagementViewSelector.js +19 -10
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/companyView/types/cockpitTypes.js +1 -0
- package/lib/view/companyView/types/companyView.d.ts +2 -0
- package/lib/view/fileView/fileUploadHelpers.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.d.ts +1 -2
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonHistoryView/commonHistoryPayload.d.ts +1 -1
- package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +15 -7
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +22 -1
- package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.d.ts +7 -0
- package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +46 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +9 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +66 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailPageEpic.d.ts +8 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailPageEpic.js +38 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskHistoryEpic.d.ts +7 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskHistoryEpic.js +54 -0
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.d.ts +6 -0
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +36 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +8 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +76 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +27 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.js +27 -0
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +48 -0
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +197 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +23 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +176 -0
- package/lib/view/taskManager/taskListView/fetchTaskListEpic.d.ts +8 -0
- package/lib/view/taskManager/taskListView/fetchTaskListEpic.js +33 -0
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.d.ts +8 -0
- package/lib/view/taskManager/taskListView/fetchTaskListPageEpic.js +32 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +33 -0
- package/lib/view/taskManager/taskListView/taskList.js +27 -0
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +6 -0
- package/lib/view/taskManager/taskListView/taskListPayload.js +2 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +22 -0
- package/lib/view/taskManager/taskListView/taskListReducer.js +81 -0
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +18 -0
- package/lib/view/taskManager/taskListView/taskListSelector.js +63 -0
- package/lib/view/userListView/fetchUserListByTypeEpic.js +2 -0
- package/lib/view/userListView/userListViewReducer.js +1 -0
- package/lib/view/userListView/userListViewState.d.ts +2 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
var _a;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.saveTaskSuccessOrFailure = exports.saveTaskDetail = exports.discardTaskUpdatesInLocalStore = exports.saveTaskUpdatesToLocalStore = exports.updateEditTaskFetchStatus = exports.initializeTaskToLocalStore = exports.fetchTaskDetail = exports.fetchTaskDetailPage = exports.initialState = void 0;
|
|
8
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
|
+
const get_1 = __importDefault(require("lodash/get"));
|
|
10
|
+
const taskDetail_1 = require("./taskDetail");
|
|
11
|
+
const commonHistory_1 = require("../../spendManagement/commonHistoryView/commonHistory");
|
|
12
|
+
const commonHistoryPayload_1 = require("../../spendManagement/commonHistoryView/commonHistoryPayload");
|
|
13
|
+
exports.initialState = {
|
|
14
|
+
newTaskState: taskDetail_1.initialTaskDetail,
|
|
15
|
+
editTaskStateById: {},
|
|
16
|
+
taskHistoryById: {},
|
|
17
|
+
};
|
|
18
|
+
const taskDetailView = (0, toolkit_1.createSlice)({
|
|
19
|
+
name: 'taskDetailView',
|
|
20
|
+
initialState: exports.initialState,
|
|
21
|
+
reducers: {
|
|
22
|
+
fetchTaskDetailPage: {
|
|
23
|
+
reducer(draft, action) {
|
|
24
|
+
const { taskId } = action.payload;
|
|
25
|
+
if (taskId != null) {
|
|
26
|
+
const detail = (0, get_1.default)(draft.editTaskStateById, taskId, undefined);
|
|
27
|
+
if (action.payload.cacheOverride === true ||
|
|
28
|
+
detail == null ||
|
|
29
|
+
detail.fetchTaskStatus.fetchState !== 'In-Progress') {
|
|
30
|
+
draft.editTaskStateById[taskId] = Object.assign({}, taskDetail_1.initialTaskDetail);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
prepare(cacheOverride, taskId) {
|
|
35
|
+
return { payload: { cacheOverride, taskId } };
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
fetchTaskDetail: {
|
|
39
|
+
reducer() {
|
|
40
|
+
//do nothing
|
|
41
|
+
},
|
|
42
|
+
prepare(taskId, cacheOverride = false) {
|
|
43
|
+
return {
|
|
44
|
+
payload: {
|
|
45
|
+
taskId,
|
|
46
|
+
cacheOverride,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
removeTaskDetail(draft, action) {
|
|
52
|
+
const key = action.payload;
|
|
53
|
+
delete draft.editTaskStateById[key];
|
|
54
|
+
},
|
|
55
|
+
updateEditTaskFetchStatus(draft, action) {
|
|
56
|
+
const { taskId, fetchState, error } = action.payload;
|
|
57
|
+
draft.editTaskStateById[taskId] = Object.assign(Object.assign({}, draft.editTaskStateById[taskId]), { fetchTaskStatus: {
|
|
58
|
+
fetchState,
|
|
59
|
+
error: fetchState === 'Error' ? error : undefined,
|
|
60
|
+
} });
|
|
61
|
+
},
|
|
62
|
+
initializeTaskToLocalStore: {
|
|
63
|
+
reducer(draft, action) {
|
|
64
|
+
const key = action.payload.taskId;
|
|
65
|
+
draft.editTaskStateById[key] = Object.assign(Object.assign({}, draft.editTaskStateById[key]), { taskId: key });
|
|
66
|
+
},
|
|
67
|
+
prepare(taskId) {
|
|
68
|
+
return { payload: { taskId } };
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
saveTaskUpdatesToLocalStore(draft, action) {
|
|
72
|
+
if (action.payload.taskId != null) {
|
|
73
|
+
const key = action.payload.taskId;
|
|
74
|
+
draft.editTaskStateById[key].taskDetailLocalData = Object.assign(Object.assign({}, draft.editTaskStateById[key].taskDetailLocalData), action.payload.taskDetailLocalData);
|
|
75
|
+
draft.editTaskStateById[key].taskId = key;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
draft.newTaskState.taskDetailLocalData = Object.assign(Object.assign({}, draft.newTaskState.taskDetailLocalData), action.payload.taskDetailLocalData);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
discardTaskUpdatesInLocalStore(draft, action) {
|
|
82
|
+
if (action.payload.taskId != null) {
|
|
83
|
+
const key = action.payload.taskId;
|
|
84
|
+
draft.editTaskStateById[key] = taskDetail_1.initialTaskDetail;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
draft.newTaskState = taskDetail_1.initialTaskDetail;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
saveTaskDetail: {
|
|
91
|
+
reducer(draft, action) {
|
|
92
|
+
const { taskId } = action.payload;
|
|
93
|
+
if (taskId != null) {
|
|
94
|
+
draft.editTaskStateById[taskId] = Object.assign(Object.assign({}, draft.editTaskStateById[taskId]), { saveStatus: {
|
|
95
|
+
fetchState: 'In-Progress',
|
|
96
|
+
error: undefined,
|
|
97
|
+
} });
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
draft.newTaskState = Object.assign(Object.assign({}, draft.newTaskState), { saveStatus: {
|
|
101
|
+
fetchState: 'In-Progress',
|
|
102
|
+
error: undefined,
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
prepare(isArchive, taskId) {
|
|
107
|
+
return {
|
|
108
|
+
payload: {
|
|
109
|
+
isArchive,
|
|
110
|
+
taskId,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
saveTaskSuccessOrFailure(draft, action) {
|
|
116
|
+
if (action.payload.taskId != null) {
|
|
117
|
+
const { taskId } = action.payload;
|
|
118
|
+
draft.editTaskStateById[taskId].saveStatus.fetchState =
|
|
119
|
+
action.payload.fetchState;
|
|
120
|
+
draft.editTaskStateById[taskId].saveStatus.error = action.payload.error;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
draft.newTaskState.saveStatus.fetchState = action.payload.fetchState;
|
|
124
|
+
draft.newTaskState.saveStatus.error = action.payload.error;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
deleteTask: {
|
|
128
|
+
reducer(draft, action) {
|
|
129
|
+
const { taskId } = action.payload;
|
|
130
|
+
if (taskId != null) {
|
|
131
|
+
draft.editTaskStateById[taskId] = Object.assign(Object.assign({}, draft.editTaskStateById[taskId]), { deleteTaskStatus: {
|
|
132
|
+
fetchState: 'In-Progress',
|
|
133
|
+
error: undefined,
|
|
134
|
+
} });
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
draft.newTaskState = Object.assign(Object.assign({}, draft.newTaskState), { deleteTaskStatus: {
|
|
138
|
+
fetchState: 'In-Progress',
|
|
139
|
+
error: undefined,
|
|
140
|
+
} });
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
prepare(taskId) {
|
|
144
|
+
return {
|
|
145
|
+
payload: {
|
|
146
|
+
taskId,
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
deleteTaskSuccessOrFailure(draft, action) {
|
|
152
|
+
if (action.payload.taskId != null) {
|
|
153
|
+
const { taskId } = action.payload;
|
|
154
|
+
draft.editTaskStateById[taskId].deleteTaskStatus.fetchState =
|
|
155
|
+
action.payload.fetchState;
|
|
156
|
+
draft.editTaskStateById[taskId].deleteTaskStatus.error =
|
|
157
|
+
action.payload.error;
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
draft.newTaskState.deleteTaskStatus.fetchState =
|
|
161
|
+
action.payload.fetchState;
|
|
162
|
+
draft.newTaskState.deleteTaskStatus.error = action.payload.error;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
fetchTaskHistory: {
|
|
166
|
+
reducer(draft, action) {
|
|
167
|
+
const { taskId, cacheOverride } = action.payload;
|
|
168
|
+
const detail = (0, get_1.default)(draft.taskHistoryById, taskId, undefined);
|
|
169
|
+
if (cacheOverride === true ||
|
|
170
|
+
detail == null ||
|
|
171
|
+
detail.fetchState !== 'In-Progress') {
|
|
172
|
+
draft.taskHistoryById[taskId] = Object.assign({}, commonHistory_1.initialCommonHistory);
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
prepare(taskId, cacheOverride = true) {
|
|
176
|
+
return {
|
|
177
|
+
payload: { taskId, cacheOverride },
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
updateTaskHistory(draft, action) {
|
|
182
|
+
const { taskId, historicEventsPayload } = action.payload;
|
|
183
|
+
const historicEvents = historicEventsPayload.map((historicEventPayload) => (0, commonHistoryPayload_1.toHistoricEvent)(historicEventPayload));
|
|
184
|
+
draft.taskHistoryById[taskId] = Object.assign(Object.assign({}, commonHistory_1.initialCommonHistory), { fetchState: 'Completed', error: undefined, historicEvents });
|
|
185
|
+
},
|
|
186
|
+
updateTaskHistoryFetchStatus(draft, action) {
|
|
187
|
+
const { taskId, fetchState, error } = action.payload;
|
|
188
|
+
draft.taskHistoryById[taskId] = Object.assign(Object.assign({}, commonHistory_1.initialCommonHistory), { fetchState,
|
|
189
|
+
error });
|
|
190
|
+
},
|
|
191
|
+
clearTaskDetail(draft) {
|
|
192
|
+
Object.assign(draft, exports.initialState);
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
_a = taskDetailView.actions, exports.fetchTaskDetailPage = _a.fetchTaskDetailPage, exports.fetchTaskDetail = _a.fetchTaskDetail, exports.initializeTaskToLocalStore = _a.initializeTaskToLocalStore, exports.updateEditTaskFetchStatus = _a.updateEditTaskFetchStatus, exports.saveTaskUpdatesToLocalStore = _a.saveTaskUpdatesToLocalStore, exports.discardTaskUpdatesInLocalStore = _a.discardTaskUpdatesInLocalStore, exports.saveTaskDetail = _a.saveTaskDetail, exports.saveTaskSuccessOrFailure = _a.saveTaskSuccessOrFailure, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail;
|
|
197
|
+
exports.default = taskDetailView.reducer;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
+
import { Class } from '../../../entity/class/classState';
|
|
4
|
+
import { TaskTag, TaskStatus, TaskPriority } from '../../../entity/task/task';
|
|
5
|
+
import { RootState } from '../../../reducer';
|
|
6
|
+
import { File } from '../../../entity/file/fileState';
|
|
7
|
+
import { UserListSelectorView } from '../../userListView/userListViewSelector';
|
|
8
|
+
import { EditTaskDetail } from './taskDetail';
|
|
9
|
+
import { HistoricEvent } from '../../spendManagement/commonHistoryView/commonHistory';
|
|
10
|
+
export interface TaskDetailSelectorView extends SelectorView {
|
|
11
|
+
taskDetailView: EditTaskDetail;
|
|
12
|
+
userList: UserListSelectorView;
|
|
13
|
+
allAccountingClasses: Class[];
|
|
14
|
+
deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
15
|
+
updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
|
|
16
|
+
files: File[];
|
|
17
|
+
taskHistory: HistoricEvent[];
|
|
18
|
+
showTaskDetailFormFooter: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const getTaskDetail: (state: RootState, taskId?: string | undefined) => TaskDetailSelectorView;
|
|
21
|
+
export declare const allTaskTags: TaskTag[];
|
|
22
|
+
export declare const allTaskStatus: TaskStatus[];
|
|
23
|
+
export declare const allTaskPriority: TaskPriority[];
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.allTaskPriority = exports.allTaskStatus = exports.allTaskTags = exports.getTaskDetail = void 0;
|
|
7
|
+
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
8
|
+
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
9
|
+
const classSelector_1 = require("../../../entity/class/classSelector");
|
|
10
|
+
const fileViewSelector_1 = require("../../fileView/fileViewSelector");
|
|
11
|
+
const userListViewSelector_1 = require("../../userListView/userListViewSelector");
|
|
12
|
+
const fileSelector_1 = require("../../../entity/file/fileSelector");
|
|
13
|
+
const taskSelector_1 = require("../../../entity/task/taskSelector");
|
|
14
|
+
const getTaskDetail = (state, taskId) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const { taskDetailState, classListState, classState, fileState, fileViewState, taskState, } = state;
|
|
17
|
+
const deleteFileStatusById = {};
|
|
18
|
+
const updateFileStatusById = {};
|
|
19
|
+
let showTaskDetailFormFooter = false;
|
|
20
|
+
const sourceTaskDetail = taskId != null
|
|
21
|
+
? taskDetailState.editTaskStateById[taskId]
|
|
22
|
+
: taskDetailState.newTaskState;
|
|
23
|
+
const userList = (0, userListViewSelector_1.getUserList)(state, 'taskManagerCandidate');
|
|
24
|
+
let fetchStatus = {
|
|
25
|
+
fetchState: 'Not-Started',
|
|
26
|
+
error: undefined,
|
|
27
|
+
};
|
|
28
|
+
let taskHistory = [];
|
|
29
|
+
if (taskId != null && sourceTaskDetail != null) {
|
|
30
|
+
const taskEntity = (0, taskSelector_1.getTaskById)(taskState, taskId);
|
|
31
|
+
const fileIdsInEntity = (_a = taskEntity === null || taskEntity === void 0 ? void 0 : taskEntity.fileIds) !== null && _a !== void 0 ? _a : [];
|
|
32
|
+
if (fileIdsInEntity.length > 0) {
|
|
33
|
+
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
|
|
34
|
+
fileViewState.fetchFilesStatus,
|
|
35
|
+
sourceTaskDetail.fetchTaskStatus,
|
|
36
|
+
userList,
|
|
37
|
+
classListState,
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
|
|
42
|
+
sourceTaskDetail.fetchTaskStatus,
|
|
43
|
+
userList,
|
|
44
|
+
classListState,
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
showTaskDetailFormFooter = showFormFooter(sourceTaskDetail.taskDetailLocalData, taskEntity);
|
|
48
|
+
taskHistory = taskDetailState.taskHistoryById[taskId].historicEvents;
|
|
49
|
+
}
|
|
50
|
+
else if (taskId == null) {
|
|
51
|
+
fetchStatus = (0, reduceFetchState_1.reduceFetchState)([userList, classListState]);
|
|
52
|
+
}
|
|
53
|
+
const { classIds } = classListState;
|
|
54
|
+
const allAccountingClasses = (0, classSelector_1.getClassesByIds)(classState, {
|
|
55
|
+
classIds: classIds,
|
|
56
|
+
reportId: 'class_list',
|
|
57
|
+
});
|
|
58
|
+
let files = [];
|
|
59
|
+
if (sourceTaskDetail != null) {
|
|
60
|
+
sourceTaskDetail.taskDetailLocalData.fileIds.forEach((fileId) => {
|
|
61
|
+
deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
|
|
62
|
+
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
63
|
+
});
|
|
64
|
+
files = (0, fileSelector_1.getFilesByFileIds)(fileState, sourceTaskDetail.taskDetailLocalData.fileIds);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
taskDetailView: sourceTaskDetail,
|
|
68
|
+
allAccountingClasses,
|
|
69
|
+
userList,
|
|
70
|
+
deleteFileStatusById,
|
|
71
|
+
updateFileStatusById,
|
|
72
|
+
files,
|
|
73
|
+
taskHistory,
|
|
74
|
+
fetchState: fetchStatus.fetchState,
|
|
75
|
+
error: fetchStatus.error,
|
|
76
|
+
version: 0,
|
|
77
|
+
showTaskDetailFormFooter,
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
exports.getTaskDetail = getTaskDetail;
|
|
81
|
+
exports.allTaskTags = [
|
|
82
|
+
{
|
|
83
|
+
code: 'invoices',
|
|
84
|
+
name: 'Invoices',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
code: 'receipts',
|
|
88
|
+
name: 'Receipts',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
code: 'tax_equity',
|
|
92
|
+
name: 'Tax',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
code: 'payroll_statements',
|
|
96
|
+
name: 'Payroll',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
code: 'accrual',
|
|
100
|
+
name: 'Accrual',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
code: 'ap',
|
|
104
|
+
name: 'AP',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
code: 'ar',
|
|
108
|
+
name: 'AR',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
code: 'loan',
|
|
112
|
+
name: 'Loan',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
code: 'uncategorized_transactions',
|
|
116
|
+
name: 'Uncat txns',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
code: 'access',
|
|
120
|
+
name: 'Access',
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
exports.allTaskStatus = [
|
|
124
|
+
{
|
|
125
|
+
code: 'todo',
|
|
126
|
+
name: 'To Do',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
code: 'in_progress',
|
|
130
|
+
name: 'In Progress',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
code: 'on_hold',
|
|
134
|
+
name: 'On Hold',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
code: 'done',
|
|
138
|
+
name: 'Done',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
code: 'resolved',
|
|
142
|
+
name: 'Resolved',
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
exports.allTaskPriority = [
|
|
146
|
+
{
|
|
147
|
+
code: 'urgent',
|
|
148
|
+
name: 'Urgent',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
code: 'high',
|
|
152
|
+
name: 'High',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
code: 'medium',
|
|
156
|
+
name: 'Normal',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
code: 'low',
|
|
160
|
+
name: 'Low',
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
|
|
164
|
+
var _a, _b, _c;
|
|
165
|
+
if (taskDetailLocalData.name !== (taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.name) ||
|
|
166
|
+
taskDetailLocalData.description !== (taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.description) ||
|
|
167
|
+
taskDetailLocalData.priority !== (taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.priority.code) ||
|
|
168
|
+
taskDetailLocalData.status !== (taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.status.code) ||
|
|
169
|
+
!(0, isEqual_1.default)(taskDetailLocalData.tag, (_a = taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.tag) === null || _a === void 0 ? void 0 : _a.code) ||
|
|
170
|
+
!(0, isEqual_1.default)(taskDetailLocalData.assignee, (_b = taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.assignees) !== null && _b !== void 0 ? _b : []) ||
|
|
171
|
+
!(0, isEqual_1.default)(taskDetailLocalData.fileIds, (_c = taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.fileIds) !== null && _c !== void 0 ? _c : []) ||
|
|
172
|
+
!(0, isEqual_1.default)(taskDetailLocalData.dueDate, taskDetailInStore === null || taskDetailInStore === void 0 ? void 0 : taskDetailInStore.dueDate)) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
+
import { fetchTaskList, updateTaskList, updateTaskListFetchStatus } from './taskListReducer';
|
|
6
|
+
import { updateTasks } from '../../../entity/task/taskReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchTaskList> | ReturnType<typeof updateTasks> | ReturnType<typeof updateTaskList> | ReturnType<typeof updateTaskListFetchStatus>;
|
|
8
|
+
export declare const fetchTaskListEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchTaskListEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const taskListReducer_1 = require("./taskListReducer");
|
|
8
|
+
const taskReducer_1 = require("../../../entity/task/taskReducer");
|
|
9
|
+
const fetchTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.fetchTaskList.match), (0, operators_1.switchMap)(() => {
|
|
10
|
+
return zeniAPI
|
|
11
|
+
.getJSON(`${zeniAPI.apiEndPoints.taskMicroServicebaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(`{"task_type": "all"}`)}`)
|
|
12
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
14
|
+
return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(response.data.tasks), (0, taskListReducer_1.updateTaskList)({
|
|
15
|
+
data: response.data.tasks,
|
|
16
|
+
updateType: 'replace',
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return (0, rxjs_1.of)((0, taskListReducer_1.updateTaskListFetchStatus)({
|
|
21
|
+
fetchState: 'Error',
|
|
22
|
+
error: response.status,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
}), (0, operators_1.catchError)((error) => {
|
|
26
|
+
return (0, rxjs_1.of)((0, taskListReducer_1.updateTaskListFetchStatus)({
|
|
27
|
+
fetchState: 'Error',
|
|
28
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Task List REST API call errored out' +
|
|
29
|
+
JSON.stringify(error)),
|
|
30
|
+
}));
|
|
31
|
+
}));
|
|
32
|
+
}));
|
|
33
|
+
exports.fetchTaskListEpic = fetchTaskListEpic;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { fetchTaskListPage, fetchTaskList } from './taskListReducer';
|
|
4
|
+
import { RootState } from '../../../reducer';
|
|
5
|
+
import { fetchUserListByType } from '../../userListView/userListViewReducer';
|
|
6
|
+
import { fetchClassList } from '../../classList/classListReducer';
|
|
7
|
+
export declare type ActionType = ReturnType<typeof fetchTaskListPage> | ReturnType<typeof fetchTaskList> | ReturnType<typeof fetchUserListByType> | ReturnType<typeof fetchClassList>;
|
|
8
|
+
export declare const fetchTaskListPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchTaskListPageEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const taskListReducer_1 = require("./taskListReducer");
|
|
7
|
+
const userListViewReducer_1 = require("../../userListView/userListViewReducer");
|
|
8
|
+
const classListReducer_1 = require("../../classList/classListReducer");
|
|
9
|
+
const fetchTaskListPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.fetchTaskListPage.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { cacheOverride } = action.payload;
|
|
11
|
+
const taskListPageActions = [];
|
|
12
|
+
const state = state$.value;
|
|
13
|
+
if (cacheOverride === true) {
|
|
14
|
+
taskListPageActions.push((0, taskListReducer_1.fetchTaskList)());
|
|
15
|
+
taskListPageActions.push((0, classListReducer_1.fetchClassList)());
|
|
16
|
+
taskListPageActions.push((0, userListViewReducer_1.fetchUserListByType)('taskManagerCandidate', true));
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
taskListPageActions.push((0, taskListReducer_1.fetchTaskList)());
|
|
20
|
+
if (state.classListState.hasValidState() === false &&
|
|
21
|
+
state.classListState.fetchState !== 'In-Progress') {
|
|
22
|
+
taskListPageActions.push((0, classListReducer_1.fetchClassList)());
|
|
23
|
+
}
|
|
24
|
+
const taskManageUsers = state.userListViewState.userListByType.taskManagerCandidate;
|
|
25
|
+
if (taskManageUsers.hasValidState() === false &&
|
|
26
|
+
taskManageUsers.fetchState !== 'In-Progress') {
|
|
27
|
+
taskListPageActions.push((0, userListViewReducer_1.fetchUserListByType)('taskManagerCandidate', false));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return (0, rxjs_1.concat)((0, rxjs_1.from)(taskListPageActions));
|
|
31
|
+
}));
|
|
32
|
+
exports.fetchTaskListPageEpic = fetchTaskListPageEpic;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
|
+
import { ZeniDate } from '../../../zeniDayJS';
|
|
3
|
+
import { SpendManagementUIState } from '../../spendManagement/billPay/billList/billListState';
|
|
4
|
+
import { CategoryCombinationOperator, FilterCategoryType } from '../../spendManagement/spendManagementFilterHelpers';
|
|
5
|
+
export interface TaskListState extends FetchedState {
|
|
6
|
+
taskIds: ID[];
|
|
7
|
+
uiState: TaskListUIState;
|
|
8
|
+
searchText: string;
|
|
9
|
+
filters: TaskListFilters;
|
|
10
|
+
}
|
|
11
|
+
export interface TaskListFilters {
|
|
12
|
+
categoryCombinationOperator: CategoryCombinationOperator;
|
|
13
|
+
categories: TaskFilterCategory[];
|
|
14
|
+
}
|
|
15
|
+
export interface TaskFilterCategory {
|
|
16
|
+
field: TaskListFilterCategoryField;
|
|
17
|
+
matchingOperator: 'equal' | 'not-equal';
|
|
18
|
+
values: (string | ZeniDate)[];
|
|
19
|
+
valuesCombinationOperator: 'ANY';
|
|
20
|
+
}
|
|
21
|
+
export declare type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | 'createdBy' | 'priority' | 'tag';
|
|
22
|
+
export interface TaskListUIState extends SpendManagementUIState {
|
|
23
|
+
sortKey: TaskListViewSortKey;
|
|
24
|
+
}
|
|
25
|
+
export declare const ALL_TASK_LIST_SORT_KEYS: readonly ["name", "dueDate", "assignee", "tag", "status", "priority", "createdBy"];
|
|
26
|
+
export declare const toTaskListSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "createdBy" | "assignee" | "tag";
|
|
27
|
+
export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
|
|
28
|
+
export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
|
|
29
|
+
export interface TaskListFilterCategoryOption {
|
|
30
|
+
value: TaskListFilterCategoryField;
|
|
31
|
+
multiple?: boolean;
|
|
32
|
+
type?: FilterCategoryType;
|
|
33
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TASK_LIST_FILTER_CATEGORIES = exports.toTaskListSortKeyType = exports.ALL_TASK_LIST_SORT_KEYS = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
+
exports.ALL_TASK_LIST_SORT_KEYS = [
|
|
6
|
+
'name',
|
|
7
|
+
'dueDate',
|
|
8
|
+
'assignee',
|
|
9
|
+
'tag',
|
|
10
|
+
'status',
|
|
11
|
+
'priority',
|
|
12
|
+
'createdBy',
|
|
13
|
+
];
|
|
14
|
+
const toTaskListSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_TASK_LIST_SORT_KEYS);
|
|
15
|
+
exports.toTaskListSortKeyType = toTaskListSortKeyType;
|
|
16
|
+
exports.TASK_LIST_FILTER_CATEGORIES = [
|
|
17
|
+
{ value: 'status', multiple: true, type: 'dropdown' },
|
|
18
|
+
{ value: 'priority', type: 'dropdown', multiple: true },
|
|
19
|
+
{ value: 'tag', type: 'dropdown', multiple: true },
|
|
20
|
+
{ value: 'dueDate', type: 'dateRange', multiple: false },
|
|
21
|
+
{ value: 'createdBy', type: 'user', multiple: true },
|
|
22
|
+
{
|
|
23
|
+
value: 'assignee',
|
|
24
|
+
type: 'user',
|
|
25
|
+
multiple: true,
|
|
26
|
+
},
|
|
27
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TaskPayload } from '../../../entity/task/taskPayload';
|
|
2
|
+
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
3
|
+
export interface FetchTaskListPayload {
|
|
4
|
+
tasks: TaskPayload[];
|
|
5
|
+
}
|
|
6
|
+
export declare type FetchTaskListResponse = ZeniAPIResponse<FetchTaskListPayload>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FetchState, UpdateType } from '../../../commonStateTypes/common';
|
|
2
|
+
import { TaskPayload } from '../../../entity/task/taskPayload';
|
|
3
|
+
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
4
|
+
import { TaskListFilters, TaskListState, TaskListUIState } from './taskList';
|
|
5
|
+
export declare const initialState: TaskListState;
|
|
6
|
+
export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean], {
|
|
7
|
+
cacheOverride: boolean;
|
|
8
|
+
}, string, never, never>, fetchTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
|
+
data: TaskPayload[];
|
|
10
|
+
updateType: UpdateType;
|
|
11
|
+
}, string>, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
|
+
fetchState: FetchState;
|
|
13
|
+
error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
14
|
+
}, string>, updateTaskListSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
+
searchText: string;
|
|
16
|
+
}, string>, updateTaskListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
+
uiState: Partial<TaskListUIState>;
|
|
18
|
+
}, string>, updateTaskFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
filters: TaskListFilters;
|
|
20
|
+
}, string>, clearTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
21
|
+
declare const _default: import("@reduxjs/toolkit").Reducer<TaskListState, import("@reduxjs/toolkit").AnyAction>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearTaskList = exports.updateTaskFilters = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.updateTaskListFetchStatus = exports.updateTaskList = exports.fetchTaskList = exports.fetchTaskListPage = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
exports.initialState = {
|
|
7
|
+
taskIds: [],
|
|
8
|
+
fetchState: 'Not-Started',
|
|
9
|
+
searchText: '',
|
|
10
|
+
error: undefined,
|
|
11
|
+
uiState: {
|
|
12
|
+
sortOrder: 'ascending',
|
|
13
|
+
sortKey: 'name',
|
|
14
|
+
},
|
|
15
|
+
filters: {
|
|
16
|
+
categoryCombinationOperator: 'AND',
|
|
17
|
+
categories: [],
|
|
18
|
+
},
|
|
19
|
+
hasValidState() {
|
|
20
|
+
return this.fetchState == 'Completed';
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const taskList = (0, toolkit_1.createSlice)({
|
|
24
|
+
name: 'taskList',
|
|
25
|
+
initialState: exports.initialState,
|
|
26
|
+
reducers: {
|
|
27
|
+
fetchTaskListPage: {
|
|
28
|
+
reducer() {
|
|
29
|
+
//do nothing
|
|
30
|
+
},
|
|
31
|
+
prepare(cacheOverride) {
|
|
32
|
+
return { payload: { cacheOverride } };
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
fetchTaskList(draft) {
|
|
36
|
+
const existingTasks = draft.taskIds;
|
|
37
|
+
// if Tasks are already there do background fetch and don't show loader
|
|
38
|
+
draft.fetchState = existingTasks.length > 0 ? 'Completed' : 'In-Progress';
|
|
39
|
+
draft.error = undefined;
|
|
40
|
+
},
|
|
41
|
+
updateTaskList(draft, action) {
|
|
42
|
+
var _a;
|
|
43
|
+
const { data, updateType } = action.payload;
|
|
44
|
+
draft.fetchState = 'Completed';
|
|
45
|
+
draft.error = undefined;
|
|
46
|
+
const newAccounts = (_a = data.map((task) => task.task_id)) !== null && _a !== void 0 ? _a : [];
|
|
47
|
+
draft.taskIds =
|
|
48
|
+
updateType === 'merge'
|
|
49
|
+
? [...new Set([...draft.taskIds, ...newAccounts])]
|
|
50
|
+
: newAccounts;
|
|
51
|
+
},
|
|
52
|
+
updateTaskListFetchStatus(draft, action) {
|
|
53
|
+
draft.fetchState = action.payload.fetchState;
|
|
54
|
+
draft.error = action.payload.error;
|
|
55
|
+
},
|
|
56
|
+
updateTaskListSearchText(draft, action) {
|
|
57
|
+
draft.searchText = action.payload.searchText;
|
|
58
|
+
},
|
|
59
|
+
updateTaskListUIState(draft, action) {
|
|
60
|
+
if (action.payload.uiState.sortKey != null) {
|
|
61
|
+
draft.uiState.sortKey = action.payload.uiState.sortKey;
|
|
62
|
+
}
|
|
63
|
+
if (action.payload.uiState.sortOrder != null) {
|
|
64
|
+
draft.uiState.sortOrder = action.payload.uiState.sortOrder;
|
|
65
|
+
}
|
|
66
|
+
if (action.payload.uiState.scrollYOffset != null) {
|
|
67
|
+
draft.uiState.scrollYOffset = action.payload.uiState.scrollYOffset;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
updateTaskFilters(draft, action) {
|
|
71
|
+
if (action.payload.filters != null) {
|
|
72
|
+
draft.filters = action.payload.filters;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
clearTaskList(draft) {
|
|
76
|
+
Object.assign(draft, exports.initialState);
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
_a = taskList.actions, exports.fetchTaskListPage = _a.fetchTaskListPage, exports.fetchTaskList = _a.fetchTaskList, exports.updateTaskList = _a.updateTaskList, exports.updateTaskListFetchStatus = _a.updateTaskListFetchStatus, exports.updateTaskListSearchText = _a.updateTaskListSearchText, exports.updateTaskListUIState = _a.updateTaskListUIState, exports.updateTaskFilters = _a.updateTaskFilters, exports.clearTaskList = _a.clearTaskList;
|
|
81
|
+
exports.default = taskList.reducer;
|