@zeniai/client-epic-state 5.0.84-betaJK6 → 5.0.84-betaJK8
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/esm/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +1 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +6 -3
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +6 -3
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
14
14
|
const taskActions = [];
|
|
15
15
|
const state = state$.value;
|
|
16
16
|
const isTaskListFetched = state.taskListState.fetchState === 'Completed';
|
|
17
|
+
console.log('jklogs ~ fetchTaskDetailEpic ~ isTaskListFetched:', isTaskListFetched);
|
|
17
18
|
const taskDetail = recordGet(state.taskDetailState.editTaskStateById, taskId, undefined);
|
|
18
19
|
if (cacheOverride === true) {
|
|
19
20
|
taskActions.push(removeTaskDetail(taskId));
|
|
@@ -54,7 +54,7 @@ const taskDetailView = createSlice({
|
|
|
54
54
|
updateEditTaskFetchStatus(draft, action) {
|
|
55
55
|
const { taskId, fetchState, error } = action.payload;
|
|
56
56
|
draft.editTaskStateById[taskId] = {
|
|
57
|
-
...draft.editTaskStateById[taskId],
|
|
57
|
+
...(draft.editTaskStateById[taskId] ?? initialTaskDetail),
|
|
58
58
|
fetchTaskStatus: {
|
|
59
59
|
fetchState,
|
|
60
60
|
error: fetchState === 'Error' ? error : undefined,
|
|
@@ -137,13 +137,16 @@ export const allTaskPriority = [
|
|
|
137
137
|
},
|
|
138
138
|
];
|
|
139
139
|
const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
|
|
140
|
-
if (
|
|
140
|
+
if (taskDetailInStore == null) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
if (taskDetailLocalData.name !== taskDetailInStore.name ||
|
|
141
144
|
taskDetailLocalData.description !== taskDetailInStore.description ||
|
|
142
145
|
taskDetailLocalData.priority !== taskDetailInStore.priority.code ||
|
|
143
146
|
taskDetailLocalData.status !== taskDetailInStore.status.code ||
|
|
144
147
|
!isEqual(taskDetailInStore.tagIds, taskDetailLocalData.tagIds) ||
|
|
145
|
-
!isEqual(taskDetailLocalData.assignee, taskDetailInStore
|
|
146
|
-
!isEqual(taskDetailLocalData.groupAssignees, taskDetailInStore
|
|
148
|
+
!isEqual(taskDetailLocalData.assignee, taskDetailInStore.assignees ?? []) ||
|
|
149
|
+
!isEqual(taskDetailLocalData.groupAssignees, taskDetailInStore.groupAssignees ?? []) ||
|
|
147
150
|
!isEqual(taskDetailLocalData.fileIds, taskDetailInStore.fileIds ?? []) ||
|
|
148
151
|
!isEqual(taskDetailLocalData.dueDate, taskDetailInStore.dueDate) ||
|
|
149
152
|
!isEqual(taskDetailLocalData.type, taskDetailInStore.type) ||
|
|
@@ -61,7 +61,7 @@ const taskDetailView = (0, toolkit_1.createSlice)({
|
|
|
61
61
|
updateEditTaskFetchStatus(draft, action) {
|
|
62
62
|
const { taskId, fetchState, error } = action.payload;
|
|
63
63
|
draft.editTaskStateById[taskId] = {
|
|
64
|
-
...draft.editTaskStateById[taskId],
|
|
64
|
+
...(draft.editTaskStateById[taskId] ?? taskDetail_1.initialTaskDetail),
|
|
65
65
|
fetchTaskStatus: {
|
|
66
66
|
fetchState,
|
|
67
67
|
error: fetchState === 'Error' ? error : undefined,
|
|
@@ -144,13 +144,16 @@ exports.allTaskPriority = [
|
|
|
144
144
|
},
|
|
145
145
|
];
|
|
146
146
|
const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
|
|
147
|
-
if (
|
|
147
|
+
if (taskDetailInStore == null) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
if (taskDetailLocalData.name !== taskDetailInStore.name ||
|
|
148
151
|
taskDetailLocalData.description !== taskDetailInStore.description ||
|
|
149
152
|
taskDetailLocalData.priority !== taskDetailInStore.priority.code ||
|
|
150
153
|
taskDetailLocalData.status !== taskDetailInStore.status.code ||
|
|
151
154
|
!(0, isEqual_1.default)(taskDetailInStore.tagIds, taskDetailLocalData.tagIds) ||
|
|
152
|
-
!(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore
|
|
153
|
-
!(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore
|
|
155
|
+
!(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore.assignees ?? []) ||
|
|
156
|
+
!(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore.groupAssignees ?? []) ||
|
|
154
157
|
!(0, isEqual_1.default)(taskDetailLocalData.fileIds, taskDetailInStore.fileIds ?? []) ||
|
|
155
158
|
!(0, isEqual_1.default)(taskDetailLocalData.dueDate, taskDetailInStore.dueDate) ||
|
|
156
159
|
!(0, isEqual_1.default)(taskDetailLocalData.type, taskDetailInStore.type) ||
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.84-
|
|
3
|
+
"version": "5.0.84-betaJK8",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|