@zeniai/client-epic-state 5.1.45-betaDI2 → 5.1.45
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 +0 -3
- package/lib/entity/task/taskPayload.d.ts +1 -3
- package/lib/entity/task/taskPayload.js +1 -16
- package/lib/entity/task/taskReducer.d.ts +1 -8
- package/lib/entity/task/taskReducer.js +4 -29
- package/lib/entity/task/taskState.d.ts +0 -2
- package/lib/entity/tenant/epic/saveExternalConnectionEpic.d.ts +1 -2
- package/lib/entity/tenant/epic/saveExternalConnectionEpic.js +0 -17
- package/lib/epic.d.ts +3 -6
- package/lib/epic.js +3 -6
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/task/taskPayload.js +1 -16
- package/lib/esm/entity/task/taskReducer.js +3 -28
- package/lib/esm/entity/tenant/epic/saveExternalConnectionEpic.js +0 -17
- package/lib/esm/epic.js +3 -6
- package/lib/esm/index.js +8 -8
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -31
- package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +8 -33
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +0 -3
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -7
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -7
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +9 -70
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +2 -56
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +9 -32
- package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +1 -3
- package/lib/esm/view/taskManager/taskListView/taskList.js +0 -1
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +13 -266
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +0 -1
- package/lib/esm/view/taskManager/taskListView/taskListViewHelpers.js +0 -58
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +0 -22
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +3 -75
- package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +0 -58
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +8 -10
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +1 -66
- package/lib/index.d.ts +11 -12
- package/lib/index.js +28 -37
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -10
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -32
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -5
- package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +8 -33
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +0 -3
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -7
- package/lib/view/companyView/types/cockpitTypes.d.ts +0 -3
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -7
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +2 -2
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +8 -69
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -16
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +2 -14
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +3 -57
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +7 -30
- package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +1 -3
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +0 -1
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +0 -4
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -6
- package/lib/view/taskManager/taskListView/taskListReducer.js +14 -267
- package/lib/view/taskManager/taskListView/taskListSelector.js +0 -1
- package/lib/view/taskManager/taskListView/taskListViewHelpers.d.ts +0 -11
- package/lib/view/taskManager/taskListView/taskListViewHelpers.js +1 -60
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +0 -22
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.d.ts +1 -5
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +4 -77
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +0 -27
- package/lib/view/transactionDetail/journalEntryLinesViewModel.js +1 -61
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +8 -10
- package/lib/view/transactionDetail/transactionDetailReducer.d.ts +2 -11
- package/lib/view/transactionDetail/transactionDetailReducer.js +2 -67
- package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -8
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -2
- package/package.json +1 -1
- package/lib/esm/view/aiCfoView/epics/submitFeedbackEpic.js +0 -39
- package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +0 -96
- package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +0 -53
- package/lib/view/aiCfoView/epics/submitFeedbackEpic.d.ts +0 -13
- package/lib/view/aiCfoView/epics/submitFeedbackEpic.js +0 -43
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +0 -9
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +0 -100
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +0 -8
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +0 -57
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearTaskList = exports.
|
|
4
|
+
exports.clearTaskList = exports.removeTaskFromList = exports.updateTaskListOnCreateTaskFromTemplateSuccess = exports.updateTasksListOnUpdateTaskFailure = exports.updateTasksListOnUpdateTaskSuccess = exports.updateTaskFromListView = exports.updateTaskListOnTaskGroupNameUpdate = exports.updateTaskListOnNewTaskCreationSuccess = exports.dragNDropTasks = exports.updateTaskListOnTaskGroupDeletion = exports.updateTaskListLocalData = exports.initiateTaskListLocalData = exports.updateTasksListOnBulkUpdateTasksFailure = exports.updateTasksListOnBulkUpdateTasksSuccess = exports.bulkUpdateTaskList = exports.updateTaskListOnNewGroupCreationSuccess = exports.updateTaskFilters = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.updateTaskListFetchStatus = exports.updateTaskListTab = exports.updateTaskList = exports.fetchTaskList = exports.fetchTaskListPage = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
const taskReducer_1 = require("../../../entity/task/taskReducer");
|
|
7
6
|
const taskState_1 = require("../../../entity/task/taskState");
|
|
8
7
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
9
8
|
const taskList_1 = require("./taskList");
|
|
@@ -47,7 +46,6 @@ exports.initialState = {
|
|
|
47
46
|
currentTab: 'live',
|
|
48
47
|
byTab: {
|
|
49
48
|
live: { ...initialTabData },
|
|
50
|
-
completed: { ...initialTabData },
|
|
51
49
|
archived: { ...initialTabData },
|
|
52
50
|
deleted: { ...initialTabData },
|
|
53
51
|
snoozed: { ...initialTabData },
|
|
@@ -69,12 +67,14 @@ exports.initialState = {
|
|
|
69
67
|
},
|
|
70
68
|
filters: {
|
|
71
69
|
categoryCombinationOperator: 'AND',
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
categories: [
|
|
71
|
+
{
|
|
72
|
+
field: 'status',
|
|
73
|
+
matchingOperator: 'not_equal',
|
|
74
|
+
values: ['resolved'],
|
|
75
|
+
valuesCombinationOperator: 'ANY',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
78
|
},
|
|
79
79
|
hasValidState() {
|
|
80
80
|
return this.fetchState == 'Completed';
|
|
@@ -106,16 +106,13 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
106
106
|
draft.error = undefined;
|
|
107
107
|
},
|
|
108
108
|
updateTaskList(draft, action) {
|
|
109
|
-
const { data, archived,
|
|
109
|
+
const { data, archived, deleted, snoozed } = action.payload;
|
|
110
110
|
draft.fetchState = 'Completed';
|
|
111
111
|
draft.error = undefined;
|
|
112
112
|
// Group live tasks
|
|
113
113
|
const liveGrouped = getGroupedTaskIds(data);
|
|
114
114
|
draft.byTab.live = toTabData(liveGrouped);
|
|
115
115
|
// Group other tabs if provided
|
|
116
|
-
if (completed != null) {
|
|
117
|
-
draft.byTab.completed = toTabData(getGroupedTaskIds(completed));
|
|
118
|
-
}
|
|
119
116
|
if (archived != null) {
|
|
120
117
|
draft.byTab.archived = toTabData(getGroupedTaskIds(archived));
|
|
121
118
|
}
|
|
@@ -361,26 +358,9 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
361
358
|
draft.taskIdsByAssignees[assigneeKey] = draft.taskIdsByAssignees[assigneeKey].filter((taskId) => taskId !== currentTaskState.id);
|
|
362
359
|
draft.taskIdsByTags[tagsKey] = draft.taskIdsByTags[tagsKey].filter((taskId) => taskId !== currentTaskState.id);
|
|
363
360
|
draft.taskIdsByDueDate[dueDateKey] = draft.taskIdsByDueDate[dueDateKey].filter((taskId) => taskId !== currentTaskState.id);
|
|
364
|
-
|
|
365
|
-
// just the destination bucket. Otherwise a detail-page save that
|
|
366
|
-
// moves a task from group A to group B leaves the row listed
|
|
367
|
-
// under both A and B until refetch.
|
|
368
|
-
const previousGroupIds = currentTaskState.taskGroupIds ?? [];
|
|
369
|
-
const allGroupIdsToClean = new Set([
|
|
370
|
-
...previousGroupIds,
|
|
371
|
-
taskGroupId,
|
|
372
|
-
]);
|
|
373
|
-
allGroupIdsToClean.forEach((gid) => {
|
|
374
|
-
if (draft.taskIdsByGroupsIds[gid] != null) {
|
|
375
|
-
draft.taskIdsByGroupsIds[gid] = draft.taskIdsByGroupsIds[gid].filter((id) => id !== currentTaskState.id);
|
|
376
|
-
}
|
|
377
|
-
});
|
|
361
|
+
draft.taskIdsByGroupsIds[taskGroupId] = draft.taskIdsByGroupsIds[taskGroupId].filter((taskId) => taskId !== currentTaskState.id);
|
|
378
362
|
}
|
|
379
363
|
doUpdateTaskList(draft, task, taskGroupId);
|
|
380
|
-
// Mirror top-level grouping into the active tab's byTab snapshot,
|
|
381
|
-
// otherwise the next updateTaskListTab call copies stale byTab data
|
|
382
|
-
// back over this optimistic update.
|
|
383
|
-
syncTopLevelToActiveTab(draft);
|
|
384
364
|
},
|
|
385
365
|
updateTaskListOnCreateTaskFromTemplateSuccess(draft, action) {
|
|
386
366
|
const { tasks } = action.payload;
|
|
@@ -404,7 +384,6 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
404
384
|
const taskId = task.id;
|
|
405
385
|
draft.updateTasksFetchState.fetchState = 'In-Progress';
|
|
406
386
|
draft.updateTasksFetchState.error = undefined;
|
|
407
|
-
let didMigrateTab = false;
|
|
408
387
|
if (updates.priority != null) {
|
|
409
388
|
const prevPriorityCode = (0, taskState_1.toPriorityCodeType)(task.priority.code);
|
|
410
389
|
draft.taskIdsByPriority[prevPriorityCode] = draft.taskIdsByPriority[prevPriorityCode].filter((id) => id != taskId);
|
|
@@ -416,25 +395,6 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
416
395
|
draft.taskIdsByStatus[prevStatusCode] = draft.taskIdsByStatus[prevStatusCode].filter((id) => id != taskId);
|
|
417
396
|
const newStatusCode = (0, taskState_1.toTaskStatusCodeType)(updates.status.code);
|
|
418
397
|
draft.taskIdsByStatus[newStatusCode].push(taskId);
|
|
419
|
-
// Optimistically re-bucket between the live and completed tabs
|
|
420
|
-
// when status transitions in/out of "resolved", so the task
|
|
421
|
-
// moves to the Completed tab without waiting for the next
|
|
422
|
-
// fetch. Mirrors backend split in task_handler.py: only
|
|
423
|
-
// `resolved` counts as completed; `done` stays Active.
|
|
424
|
-
//
|
|
425
|
-
// Subtasks travel with their parent — they appear nested under
|
|
426
|
-
// the parent row, not as standalone entries in byTab.taskIds.
|
|
427
|
-
// So we only rebucket parent tasks (tasks with no parentTaskId).
|
|
428
|
-
const isTopLevelTask = task.parentTaskId == null;
|
|
429
|
-
const wasCompleted = prevStatusCode === 'resolved';
|
|
430
|
-
const isCompleted = newStatusCode === 'resolved';
|
|
431
|
-
if (isTopLevelTask && wasCompleted !== isCompleted) {
|
|
432
|
-
const from = isCompleted ? 'live' : 'completed';
|
|
433
|
-
const to = isCompleted ? 'completed' : 'live';
|
|
434
|
-
const updatedTask = { ...task, ...updates };
|
|
435
|
-
migrateTaskBetweenTabs(draft, taskId, updatedTask, from, to);
|
|
436
|
-
didMigrateTab = true;
|
|
437
|
-
}
|
|
438
398
|
}
|
|
439
399
|
if (updates.assignees != null) {
|
|
440
400
|
const prevGroupId = getAssigneesGroupKey(task.assignees);
|
|
@@ -474,18 +434,7 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
474
434
|
};
|
|
475
435
|
}
|
|
476
436
|
}
|
|
477
|
-
|
|
478
|
-
// The migration moved the task out of the source byTab and into
|
|
479
|
-
// the destination byTab. The active tab's grouping arrays are
|
|
480
|
-
// now authoritative — mirror them back to the top-level so the
|
|
481
|
-
// UI sees the task gone from Live (or freshly arrived in
|
|
482
|
-
// Completed). Inverse of syncTopLevelToActiveTab, used only on
|
|
483
|
-
// this path.
|
|
484
|
-
copyTabDataToTopLevel(draft, draft.byTab[draft.currentTab]);
|
|
485
|
-
}
|
|
486
|
-
else {
|
|
487
|
-
syncTopLevelToActiveTab(draft);
|
|
488
|
-
}
|
|
437
|
+
syncTopLevelToActiveTab(draft);
|
|
489
438
|
},
|
|
490
439
|
updateTasksListOnUpdateTaskSuccess(draft) {
|
|
491
440
|
draft.updateTasksFetchState.fetchState = 'Completed';
|
|
@@ -498,80 +447,12 @@ const taskList = (0, toolkit_1.createSlice)({
|
|
|
498
447
|
removeTaskFromList(draft, action) {
|
|
499
448
|
removeTaskIds(draft, [action.payload]);
|
|
500
449
|
},
|
|
501
|
-
/**
|
|
502
|
-
* Remove a task id from a single group bucket without touching tab
|
|
503
|
-
* membership or other groupings. Used when the user clears a task's
|
|
504
|
-
* group on the Detail page so the row stops appearing under the old
|
|
505
|
-
* group while saveTaskDetailEpic skips the standard list re-insert.
|
|
506
|
-
*/
|
|
507
|
-
removeTaskFromGroupBucket(draft, action) {
|
|
508
|
-
const { taskId, taskGroupId } = action.payload;
|
|
509
|
-
if (draft.taskIdsByGroupsIds[taskGroupId] != null) {
|
|
510
|
-
draft.taskIdsByGroupsIds[taskGroupId] = draft.taskIdsByGroupsIds[taskGroupId].filter((id) => id !== taskId);
|
|
511
|
-
}
|
|
512
|
-
// Mirror to the active tab's grouping so the UI re-renders.
|
|
513
|
-
const activeTab = draft.byTab[draft.currentTab];
|
|
514
|
-
if (activeTab.taskIdsByGroupsIds[taskGroupId] != null) {
|
|
515
|
-
activeTab.taskIdsByGroupsIds[taskGroupId] =
|
|
516
|
-
activeTab.taskIdsByGroupsIds[taskGroupId].filter((id) => id !== taskId);
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
450
|
clearTaskList(draft) {
|
|
520
451
|
Object.assign(draft, exports.initialState);
|
|
521
452
|
},
|
|
522
453
|
},
|
|
523
|
-
extraReducers: (builder) => {
|
|
524
|
-
// When the entity store receives updated tasks (e.g. from task detail
|
|
525
|
-
// save, snooze/archive/unarchive, etc.), re-bucket parent tasks between
|
|
526
|
-
// the live and completed tabs based on the new status. Mirrors the
|
|
527
|
-
// backend split in task_handler.py: only `resolved` parents count as
|
|
528
|
-
// completed. Subtasks are nested under their parent row, so they
|
|
529
|
-
// never move between tabs on their own.
|
|
530
|
-
builder.addCase(taskReducer_1.updateTasks, (draft, action) => {
|
|
531
|
-
action.payload.forEach((taskPayload) => {
|
|
532
|
-
// Only re-bucket parents; subtasks (parent_task_id is a non-empty
|
|
533
|
-
// string) are nested under their parent row and don't move tabs.
|
|
534
|
-
if (taskPayload.parent_task_id != null &&
|
|
535
|
-
taskPayload.parent_task_id !== '') {
|
|
536
|
-
return;
|
|
537
|
-
}
|
|
538
|
-
const taskId = taskPayload.task_id;
|
|
539
|
-
// `TaskPayload.status` is required per the type — every producer
|
|
540
|
-
// in this repo sends it, and `mapTaskPayloadToTask` dereferences
|
|
541
|
-
// it unguarded. The optional chain + null guard are defensive
|
|
542
|
-
// only, in case a downstream consumer (web-app-ui / cockpit-ui)
|
|
543
|
-
// ever dispatches `updateTasks` with a partial payload; in that
|
|
544
|
-
// case we treat missing status as "no status change" and skip
|
|
545
|
-
// re-bucketing so we don't migrate a Completed task back into
|
|
546
|
-
// the Live tab.
|
|
547
|
-
const statusCode = taskPayload.status?.code;
|
|
548
|
-
if (statusCode == null) {
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
const isCompleted = statusCode === 'resolved';
|
|
552
|
-
const targetTab = isCompleted ? 'completed' : 'live';
|
|
553
|
-
const otherTab = isCompleted ? 'live' : 'completed';
|
|
554
|
-
// Skip if the task isn't currently in either of these buckets
|
|
555
|
-
// (archived/snoozed/deleted are managed by their own actions).
|
|
556
|
-
const inLive = draft.byTab.live.taskIds.includes(taskId);
|
|
557
|
-
const inCompleted = draft.byTab.completed.taskIds.includes(taskId);
|
|
558
|
-
if (!inLive && !inCompleted) {
|
|
559
|
-
return;
|
|
560
|
-
}
|
|
561
|
-
if (draft.byTab[otherTab].taskIds.includes(taskId)) {
|
|
562
|
-
migrateTaskPayloadBetweenTabs(draft, taskId, taskPayload, otherTab, targetTab);
|
|
563
|
-
}
|
|
564
|
-
else if (!draft.byTab[targetTab].taskIds.includes(taskId)) {
|
|
565
|
-
draft.byTab[targetTab].taskIds.push(taskId);
|
|
566
|
-
}
|
|
567
|
-
});
|
|
568
|
-
// Re-sync the top-level taskIds / grouping arrays for whichever
|
|
569
|
-
// tab the user is currently looking at.
|
|
570
|
-
copyTabDataToTopLevel(draft, draft.byTab[draft.currentTab]);
|
|
571
|
-
});
|
|
572
|
-
},
|
|
573
454
|
});
|
|
574
|
-
_a = taskList.actions, exports.fetchTaskListPage = _a.fetchTaskListPage, exports.fetchTaskList = _a.fetchTaskList, exports.updateTaskList = _a.updateTaskList, exports.updateTaskListTab = _a.updateTaskListTab, exports.updateTaskListFetchStatus = _a.updateTaskListFetchStatus, exports.updateTaskListSearchText = _a.updateTaskListSearchText, exports.updateTaskListUIState = _a.updateTaskListUIState, exports.updateTaskFilters = _a.updateTaskFilters, exports.updateTaskListOnNewGroupCreationSuccess = _a.updateTaskListOnNewGroupCreationSuccess, exports.bulkUpdateTaskList = _a.bulkUpdateTaskList, exports.updateTasksListOnBulkUpdateTasksSuccess = _a.updateTasksListOnBulkUpdateTasksSuccess, exports.updateTasksListOnBulkUpdateTasksFailure = _a.updateTasksListOnBulkUpdateTasksFailure, exports.initiateTaskListLocalData = _a.initiateTaskListLocalData, exports.updateTaskListLocalData = _a.updateTaskListLocalData, exports.updateTaskListOnTaskGroupDeletion = _a.updateTaskListOnTaskGroupDeletion, exports.dragNDropTasks = _a.dragNDropTasks, exports.updateTaskListOnNewTaskCreationSuccess = _a.updateTaskListOnNewTaskCreationSuccess, exports.updateTaskListOnTaskGroupNameUpdate = _a.updateTaskListOnTaskGroupNameUpdate, exports.updateTaskFromListView = _a.updateTaskFromListView, exports.updateTasksListOnUpdateTaskSuccess = _a.updateTasksListOnUpdateTaskSuccess, exports.updateTasksListOnUpdateTaskFailure = _a.updateTasksListOnUpdateTaskFailure, exports.updateTaskListOnCreateTaskFromTemplateSuccess = _a.updateTaskListOnCreateTaskFromTemplateSuccess, exports.removeTaskFromList = _a.removeTaskFromList, exports.
|
|
455
|
+
_a = taskList.actions, exports.fetchTaskListPage = _a.fetchTaskListPage, exports.fetchTaskList = _a.fetchTaskList, exports.updateTaskList = _a.updateTaskList, exports.updateTaskListTab = _a.updateTaskListTab, exports.updateTaskListFetchStatus = _a.updateTaskListFetchStatus, exports.updateTaskListSearchText = _a.updateTaskListSearchText, exports.updateTaskListUIState = _a.updateTaskListUIState, exports.updateTaskFilters = _a.updateTaskFilters, exports.updateTaskListOnNewGroupCreationSuccess = _a.updateTaskListOnNewGroupCreationSuccess, exports.bulkUpdateTaskList = _a.bulkUpdateTaskList, exports.updateTasksListOnBulkUpdateTasksSuccess = _a.updateTasksListOnBulkUpdateTasksSuccess, exports.updateTasksListOnBulkUpdateTasksFailure = _a.updateTasksListOnBulkUpdateTasksFailure, exports.initiateTaskListLocalData = _a.initiateTaskListLocalData, exports.updateTaskListLocalData = _a.updateTaskListLocalData, exports.updateTaskListOnTaskGroupDeletion = _a.updateTaskListOnTaskGroupDeletion, exports.dragNDropTasks = _a.dragNDropTasks, exports.updateTaskListOnNewTaskCreationSuccess = _a.updateTaskListOnNewTaskCreationSuccess, exports.updateTaskListOnTaskGroupNameUpdate = _a.updateTaskListOnTaskGroupNameUpdate, exports.updateTaskFromListView = _a.updateTaskFromListView, exports.updateTasksListOnUpdateTaskSuccess = _a.updateTasksListOnUpdateTaskSuccess, exports.updateTasksListOnUpdateTaskFailure = _a.updateTasksListOnUpdateTaskFailure, exports.updateTaskListOnCreateTaskFromTemplateSuccess = _a.updateTaskListOnCreateTaskFromTemplateSuccess, exports.removeTaskFromList = _a.removeTaskFromList, exports.clearTaskList = _a.clearTaskList;
|
|
575
456
|
exports.default = taskList.reducer;
|
|
576
457
|
/**
|
|
577
458
|
* helpers
|
|
@@ -678,115 +559,6 @@ const copyTabDataToTopLevel = (draft, tabData) => {
|
|
|
678
559
|
draft.taskIdsByDueDate = tabData.taskIdsByDueDate;
|
|
679
560
|
draft.taskIdsByTags = tabData.taskIdsByTags;
|
|
680
561
|
};
|
|
681
|
-
/**
|
|
682
|
-
* Migrate a parent task between two `byTab` buckets (live ↔ completed)
|
|
683
|
-
* when its status flips into / out of `resolved`. The destination tab
|
|
684
|
-
* picks up the task in EVERY grouping dimension (status, priority,
|
|
685
|
-
* group id, assignees, dueDate, tags) using the UPDATED task as the
|
|
686
|
-
* source-of-truth for the new bucket keys. Otherwise the Completed tab
|
|
687
|
-
* shows the task in the right tab-level list but the grouped views
|
|
688
|
-
* (Group by Status, Group by Priority, etc.) miss it until the next
|
|
689
|
-
* full fetch.
|
|
690
|
-
*/
|
|
691
|
-
const migrateTaskBetweenTabs = (draft, taskId, updatedTask, from, to) => {
|
|
692
|
-
const fromTab = draft.byTab[from];
|
|
693
|
-
const toTab = draft.byTab[to];
|
|
694
|
-
// Source tab: drop the task from every grouping dimension.
|
|
695
|
-
removeIdsFromTabData(fromTab, [taskId]);
|
|
696
|
-
// Destination tab: add the task to taskIds (deduped) plus the
|
|
697
|
-
// appropriate bucket inside each grouping dimension based on the
|
|
698
|
-
// updated task.
|
|
699
|
-
if (!toTab.taskIds.includes(taskId)) {
|
|
700
|
-
toTab.taskIds.push(taskId);
|
|
701
|
-
}
|
|
702
|
-
const priorityKey = (0, taskState_1.toPriorityCodeType)(updatedTask.priority.code);
|
|
703
|
-
if (!toTab.taskIdsByPriority[priorityKey].includes(taskId)) {
|
|
704
|
-
toTab.taskIdsByPriority[priorityKey].push(taskId);
|
|
705
|
-
}
|
|
706
|
-
const statusKey = (0, taskState_1.toTaskStatusCodeType)(updatedTask.status.code);
|
|
707
|
-
if (!toTab.taskIdsByStatus[statusKey].includes(taskId)) {
|
|
708
|
-
toTab.taskIdsByStatus[statusKey].push(taskId);
|
|
709
|
-
}
|
|
710
|
-
const dueDateKey = updatedTask.dueDate != null
|
|
711
|
-
? getDueDateGroupKey(updatedTask.dueDate.toString())
|
|
712
|
-
: 'upcoming';
|
|
713
|
-
if (!toTab.taskIdsByDueDate[dueDateKey].includes(taskId)) {
|
|
714
|
-
toTab.taskIdsByDueDate[dueDateKey].push(taskId);
|
|
715
|
-
}
|
|
716
|
-
const assigneeKey = getAssigneesGroupKey(updatedTask.assignees);
|
|
717
|
-
if (toTab.taskIdsByAssignees[assigneeKey] == null) {
|
|
718
|
-
toTab.taskIdsByAssignees[assigneeKey] = [taskId];
|
|
719
|
-
}
|
|
720
|
-
else if (!toTab.taskIdsByAssignees[assigneeKey].includes(taskId)) {
|
|
721
|
-
toTab.taskIdsByAssignees[assigneeKey].push(taskId);
|
|
722
|
-
}
|
|
723
|
-
const tagIds = [...updatedTask.tagIds].sort();
|
|
724
|
-
const tagsKey = tagIds.join(',');
|
|
725
|
-
if (toTab.taskIdsByTags[tagsKey] == null) {
|
|
726
|
-
toTab.taskIdsByTags[tagsKey] = [taskId];
|
|
727
|
-
}
|
|
728
|
-
else if (!toTab.taskIdsByTags[tagsKey].includes(taskId)) {
|
|
729
|
-
toTab.taskIdsByTags[tagsKey].push(taskId);
|
|
730
|
-
}
|
|
731
|
-
(updatedTask.taskGroupIds ?? []).forEach((groupId) => {
|
|
732
|
-
if (toTab.taskIdsByGroupsIds[groupId] == null) {
|
|
733
|
-
toTab.taskIdsByGroupsIds[groupId] = [taskId];
|
|
734
|
-
}
|
|
735
|
-
else if (!toTab.taskIdsByGroupsIds[groupId].includes(taskId)) {
|
|
736
|
-
toTab.taskIdsByGroupsIds[groupId].push(taskId);
|
|
737
|
-
}
|
|
738
|
-
});
|
|
739
|
-
};
|
|
740
|
-
/**
|
|
741
|
-
* `updateTasks` extraReducer variant — same migration semantics but
|
|
742
|
-
* keyed off the raw `TaskPayload` instead of the rich `Task` entity.
|
|
743
|
-
*/
|
|
744
|
-
const migrateTaskPayloadBetweenTabs = (draft, taskId, payload, from, to) => {
|
|
745
|
-
const fromTab = draft.byTab[from];
|
|
746
|
-
const toTab = draft.byTab[to];
|
|
747
|
-
removeIdsFromTabData(fromTab, [taskId]);
|
|
748
|
-
if (!toTab.taskIds.includes(taskId)) {
|
|
749
|
-
toTab.taskIds.push(taskId);
|
|
750
|
-
}
|
|
751
|
-
if (payload.priority?.code != null) {
|
|
752
|
-
const priorityKey = (0, taskState_1.toPriorityCodeType)(payload.priority.code);
|
|
753
|
-
if (!toTab.taskIdsByPriority[priorityKey].includes(taskId)) {
|
|
754
|
-
toTab.taskIdsByPriority[priorityKey].push(taskId);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
if (payload.status?.code != null) {
|
|
758
|
-
const statusKey = (0, taskState_1.toTaskStatusCodeType)(payload.status.code);
|
|
759
|
-
if (!toTab.taskIdsByStatus[statusKey].includes(taskId)) {
|
|
760
|
-
toTab.taskIdsByStatus[statusKey].push(taskId);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
const dueDateKey = getDueDateGroupKey(payload.due_date);
|
|
764
|
-
if (!toTab.taskIdsByDueDate[dueDateKey].includes(taskId)) {
|
|
765
|
-
toTab.taskIdsByDueDate[dueDateKey].push(taskId);
|
|
766
|
-
}
|
|
767
|
-
const assigneeKey = getAssigneesGroupKey(payload.assignees ?? []);
|
|
768
|
-
if (toTab.taskIdsByAssignees[assigneeKey] == null) {
|
|
769
|
-
toTab.taskIdsByAssignees[assigneeKey] = [taskId];
|
|
770
|
-
}
|
|
771
|
-
else if (!toTab.taskIdsByAssignees[assigneeKey].includes(taskId)) {
|
|
772
|
-
toTab.taskIdsByAssignees[assigneeKey].push(taskId);
|
|
773
|
-
}
|
|
774
|
-
const tagsKey = getTagsGroupKey(payload.tags ?? []);
|
|
775
|
-
if (toTab.taskIdsByTags[tagsKey] == null) {
|
|
776
|
-
toTab.taskIdsByTags[tagsKey] = [taskId];
|
|
777
|
-
}
|
|
778
|
-
else if (!toTab.taskIdsByTags[tagsKey].includes(taskId)) {
|
|
779
|
-
toTab.taskIdsByTags[tagsKey].push(taskId);
|
|
780
|
-
}
|
|
781
|
-
(payload.task_group_ids ?? []).forEach((groupId) => {
|
|
782
|
-
if (toTab.taskIdsByGroupsIds[groupId] == null) {
|
|
783
|
-
toTab.taskIdsByGroupsIds[groupId] = [taskId];
|
|
784
|
-
}
|
|
785
|
-
else if (!toTab.taskIdsByGroupsIds[groupId].includes(taskId)) {
|
|
786
|
-
toTab.taskIdsByGroupsIds[groupId].push(taskId);
|
|
787
|
-
}
|
|
788
|
-
});
|
|
789
|
-
};
|
|
790
562
|
const removeIdsFromTabData = (tabData, taskIds) => {
|
|
791
563
|
const removedSet = new Set(taskIds);
|
|
792
564
|
const isRemoved = (id) => removedSet.has(id);
|
|
@@ -828,38 +600,13 @@ const getGroupedTaskIds = (tasks) => {
|
|
|
828
600
|
...initialTaskIdsByDueDate,
|
|
829
601
|
};
|
|
830
602
|
const taskIdsByTags = {};
|
|
831
|
-
// A task is a "nested subtask" (hidden from the flat top-level list +
|
|
832
|
-
// dropped from the tab count) iff a parent in the same payload claims
|
|
833
|
-
// it via its `subtasks: [...]` array. Match this criterion exactly to
|
|
834
|
-
// WC's `allSubtaskIds` union in TaskManagementPage.tsx — otherwise
|
|
835
|
-
// the tab count and the visible top-level row count disagree
|
|
836
|
-
// whenever the BE emits `parent_task_id` on a subtask but omits it
|
|
837
|
-
// from the parent's `subtasks` array (a real inconsistency this UI
|
|
838
|
-
// sees today).
|
|
839
|
-
//
|
|
840
|
-
// Using `parent_task_id` here would sometimes drop a task from the
|
|
841
|
-
// count that WC still renders as a flat top-level row — that's the
|
|
842
|
-
// bug we're fixing.
|
|
843
|
-
const nestedSubtaskIds = new Set();
|
|
844
603
|
tasks.forEach((task) => {
|
|
845
|
-
(task.
|
|
846
|
-
});
|
|
847
|
-
tasks.forEach((task) => {
|
|
848
|
-
const isNestedSubtask = nestedSubtaskIds.has(task.task_id);
|
|
849
|
-
// Subtasks stay in every groupBy array so the UI can render them
|
|
850
|
-
// nested under their parent (WC's TaskManagementPage builds
|
|
851
|
-
// `subtasksByParentId` from `group.tasks` and then filters them
|
|
852
|
-
// out of top-level rows via `filterOutSubtasks`). Only the flat
|
|
853
|
-
// top-level `taskIds` array — which drives the Active/Completed/…
|
|
854
|
-
// tab counts — must exclude nested subtasks.
|
|
604
|
+
taskIds.push(task.task_id);
|
|
855
605
|
const priorityKey = (0, taskState_1.toPriorityCodeType)(task.priority.code);
|
|
856
606
|
const statusKey = (0, taskState_1.toTaskStatusCodeType)(task.status.code);
|
|
857
607
|
const assigneeKey = getAssigneesGroupKey(task.assignees);
|
|
858
608
|
const dueDateKey = getDueDateGroupKey(task.due_date);
|
|
859
609
|
const tagsKey = getTagsGroupKey(task.tags);
|
|
860
|
-
if (!isNestedSubtask) {
|
|
861
|
-
taskIds.push(task.task_id);
|
|
862
|
-
}
|
|
863
610
|
taskIdsGroupedByPriority[priorityKey] = [
|
|
864
611
|
...taskIdsGroupedByPriority[priorityKey],
|
|
865
612
|
task.task_id,
|
|
@@ -342,7 +342,6 @@ exports.getAllTasks = (0, toolkit_1.createSelector)((state) => state.taskListSta
|
|
|
342
342
|
const taskGroupTemplates = (0, taskGroupTemplateSelector_1.getTaskGroupTemplateByIds)(taskGroupTemplateState, taskGroupTemplateViewState.taskGroupTemplateIds);
|
|
343
343
|
const tabCounts = {
|
|
344
344
|
live: taskListState.byTab.live.taskIds.length,
|
|
345
|
-
completed: taskListState.byTab.completed.taskIds.length,
|
|
346
345
|
archived: taskListState.byTab.archived.taskIds.length,
|
|
347
346
|
deleted: taskListState.byTab.deleted.taskIds.length,
|
|
348
347
|
snoozed: taskListState.byTab.snoozed.taskIds.length,
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import { Tag } from '../../../entity/tag/tagState';
|
|
2
1
|
import { Task } from '../../../entity/task/taskState';
|
|
3
|
-
import { User } from '../../../entity/user/userState';
|
|
4
2
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
5
3
|
import { TaskGroupKey } from './taskList';
|
|
6
|
-
export type SubtaskSortKey = 'name' | 'status' | 'assignee' | 'tag';
|
|
7
|
-
export type SubtaskSortOrder = 'asc' | 'desc';
|
|
8
4
|
export declare const getDueDateValueFromDueDateGroupId: (groupId: string) => ZeniDate;
|
|
9
5
|
export declare const getTaskUpdates: (groupByKey: TaskGroupKey, groupId: string) => Partial<Task>;
|
|
10
|
-
/**
|
|
11
|
-
* Sort a subtask list by one of the sortable columns. Pure — no state
|
|
12
|
-
* dependency. `statusOrder` is derived from `allTaskStatus` so any new
|
|
13
|
-
* status added upstream slots in by its enum position instead of
|
|
14
|
-
* falling into a catch-all bucket.
|
|
15
|
-
*/
|
|
16
|
-
export declare const sortSubtasks: (subtasks: Task[], sortKey: SubtaskSortKey | null, sortOrder: SubtaskSortOrder, userList: User[], tagList: Tag[]) => Task[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getTaskUpdates = exports.getDueDateValueFromDueDateGroupId = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
5
5
|
const taskDetailSelector_1 = require("../taskDetailView/taskDetailSelector");
|
|
6
6
|
const taskList_1 = require("./taskList");
|
|
@@ -53,62 +53,3 @@ const getTaskUpdates = (groupByKey, groupId) => {
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
exports.getTaskUpdates = getTaskUpdates;
|
|
56
|
-
/**
|
|
57
|
-
* Sort a subtask list by one of the sortable columns. Pure — no state
|
|
58
|
-
* dependency. `statusOrder` is derived from `allTaskStatus` so any new
|
|
59
|
-
* status added upstream slots in by its enum position instead of
|
|
60
|
-
* falling into a catch-all bucket.
|
|
61
|
-
*/
|
|
62
|
-
const sortSubtasks = (subtasks, sortKey, sortOrder, userList, tagList) => {
|
|
63
|
-
if (sortKey == null) {
|
|
64
|
-
return subtasks;
|
|
65
|
-
}
|
|
66
|
-
const statusOrder = taskDetailSelector_1.allTaskStatus.reduce((acc, status, index) => {
|
|
67
|
-
acc[status.code] = index;
|
|
68
|
-
return acc;
|
|
69
|
-
}, {});
|
|
70
|
-
const unknownStatusRank = taskDetailSelector_1.allTaskStatus.length;
|
|
71
|
-
const cmpStr = (a, b) => a.localeCompare(b, undefined, { sensitivity: 'base' });
|
|
72
|
-
const keyFn = (task) => {
|
|
73
|
-
if (sortKey === 'name') {
|
|
74
|
-
return task.name ?? '';
|
|
75
|
-
}
|
|
76
|
-
if (sortKey === 'status') {
|
|
77
|
-
return statusOrder[task.status.code] ?? unknownStatusRank;
|
|
78
|
-
}
|
|
79
|
-
if (sortKey === 'assignee') {
|
|
80
|
-
const firstId = task.assignees?.[0];
|
|
81
|
-
if (firstId == null) {
|
|
82
|
-
return '';
|
|
83
|
-
}
|
|
84
|
-
const user = userList.find((candidate) => candidate.userId === firstId);
|
|
85
|
-
return user
|
|
86
|
-
? `${user.firstName ?? ''} ${user.lastName ?? ''}`.trim()
|
|
87
|
-
: '';
|
|
88
|
-
}
|
|
89
|
-
if (sortKey === 'tag') {
|
|
90
|
-
const firstTagId = task.tagIds?.[0];
|
|
91
|
-
if (firstTagId == null) {
|
|
92
|
-
return '';
|
|
93
|
-
}
|
|
94
|
-
const tag = tagList.find((candidate) => candidate.tagId === firstTagId);
|
|
95
|
-
return tag?.name ?? '';
|
|
96
|
-
}
|
|
97
|
-
return '';
|
|
98
|
-
};
|
|
99
|
-
const copy = [...subtasks];
|
|
100
|
-
copy.sort((a, b) => {
|
|
101
|
-
const av = keyFn(a);
|
|
102
|
-
const bv = keyFn(b);
|
|
103
|
-
let cmp;
|
|
104
|
-
if (typeof av === 'number' && typeof bv === 'number') {
|
|
105
|
-
cmp = av - bv;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
cmp = cmpStr(String(av), String(bv));
|
|
109
|
-
}
|
|
110
|
-
return sortOrder === 'asc' ? cmp : -cmp;
|
|
111
|
-
});
|
|
112
|
-
return copy;
|
|
113
|
-
};
|
|
114
|
-
exports.sortSubtasks = sortSubtasks;
|
|
@@ -48,15 +48,7 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
48
48
|
let lastUpdatedCategory;
|
|
49
49
|
let lastUpdatedClass;
|
|
50
50
|
// single recommendation to just pick the last recommendation in the list of lines
|
|
51
|
-
const existingLineIds = new Set(transaction.lines?.map((l) => l.id) ?? []);
|
|
52
|
-
const deletedLineIds = new Set((transactionDetailLocalData.deletedLineIds ?? []).filter((id) => existingLineIds.has(id)));
|
|
53
|
-
// Collect new lines — in lineItemById but not yet in transaction.lines.
|
|
54
|
-
const addedLines = Object.values(transactionDetailLocalData.lineItemById).filter((item) => !existingLineIds.has(item.id));
|
|
55
51
|
transaction.lines?.forEach((line) => {
|
|
56
|
-
// Skip lines the user deleted in edit mode.
|
|
57
|
-
if (deletedLineIds.has(line.id)) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
52
|
const lineItem = transactionDetailLocalData.lineItemById[line.id];
|
|
61
53
|
if (line.type === 'transaction_with_account_and_class_line' ||
|
|
62
54
|
line.type === 'transaction_with_product_or_service_line' ||
|
|
@@ -67,7 +59,6 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
67
59
|
const entityDetails = getEntityDetails(selectedEntity, lineItem, transactionDetailLocalData.vendorUpdates, transactionDetailLocalData.customerUpdates);
|
|
68
60
|
updatesByLineId[line.id] = {
|
|
69
61
|
lineDescription: lineItem.lineDescription,
|
|
70
|
-
amount: lineItem.amount,
|
|
71
62
|
class: lineItem.class,
|
|
72
63
|
account: lineItem.account,
|
|
73
64
|
// Project is at the transaction level for invoice/credit_memo; omit from lines.
|
|
@@ -89,17 +80,6 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
89
80
|
currentSelectedEntityLine.type === 'vendor'
|
|
90
81
|
? lineItem.vendor
|
|
91
82
|
: undefined,
|
|
92
|
-
// Carry the JE debit/credit side so a split edit that flips an
|
|
93
|
-
// existing line's posting side persists through the line patch.
|
|
94
|
-
...(line.type === 'journal_entry_transaction_line'
|
|
95
|
-
? {
|
|
96
|
-
postingType: lineItem.postingType,
|
|
97
|
-
postingTypeName: lineItem.postingType != null
|
|
98
|
-
? lineItem.postingType.charAt(0).toUpperCase() +
|
|
99
|
-
lineItem.postingType.slice(1)
|
|
100
|
-
: lineItem.postingTypeName,
|
|
101
|
-
}
|
|
102
|
-
: {}),
|
|
103
83
|
};
|
|
104
84
|
}
|
|
105
85
|
let hasCategoryChanged = false;
|
|
@@ -186,8 +166,6 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
|
|
|
186
166
|
and all the line items are NOT uncategorized*/
|
|
187
167
|
markAsMiscatUpdates: isTransactionMisCategorized,
|
|
188
168
|
anyBulkUpdates: isBulkUpdate,
|
|
189
|
-
addedLines: addedLines.length > 0 ? addedLines : undefined,
|
|
190
|
-
deletedLineIds: deletedLineIds.size > 0 ? [...deletedLineIds] : undefined,
|
|
191
169
|
};
|
|
192
170
|
};
|
|
193
171
|
exports.toTransactionUpdatesFromTransactionDetailLocalData = toTransactionUpdatesFromTransactionDetailLocalData;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { ID } from '../../../commonStateTypes/common';
|
|
3
2
|
import { COTTransactionTracking } from '../../../commonStateTypes/recommendationBase';
|
|
4
3
|
import { CustomerBase } from '../../../entity/customer/customerState';
|
|
5
4
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
6
5
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
7
6
|
import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
|
|
8
|
-
import { Line } from '../../../entity/transaction/stateTypes/transactionLine';
|
|
9
7
|
import { updateTransaction, updateTransactions } from '../../../entity/transaction/transactionReducer';
|
|
10
8
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
11
9
|
import { updateVendors } from '../../../entity/vendor/vendorReducer';
|
|
@@ -15,8 +13,6 @@ import { ZeniAPI } from '../../../zeniAPI';
|
|
|
15
13
|
import { syncTransactionCategorizationFromDetailSave } from '../../expenseAutomationView/reducers/transactionsViewReducer';
|
|
16
14
|
import { initializeTransactionDetailLocalData, markTransactionAsNotMiscategorized, updateStatusConsolidatedSaveTransactionDetail, updateTransactionDetail, updateTransactionDetailSaveStatus, updateTransactionStateIfUpdateActionNotAllowed } from '../transactionDetailReducer';
|
|
17
15
|
import { TransactionUpdates } from '../transactionDetailState';
|
|
18
|
-
import { TransactionDetailLineItemData } from '../transactionDetailTypes';
|
|
19
16
|
export type ActionType = ReturnType<typeof updateTransactionDetail> | ReturnType<typeof updateTransaction> | ReturnType<typeof updateTransactions> | ReturnType<typeof updateTransactionStateIfUpdateActionNotAllowed> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateTransactionDetailSaveStatus> | ReturnType<typeof updateStatusConsolidatedSaveTransactionDetail> | ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof updateVendors> | ReturnType<typeof markTransactionAsNotMiscategorized> | ReturnType<typeof syncTransactionCategorizationFromDetailSave>;
|
|
20
17
|
export declare const updateTransactionDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
21
|
-
export declare const toTransactionUpdatePayload: (updates: TransactionUpdates, detail: SupportedTransaction, cotTransactionTracking: COTTransactionTracking, isAccountingProjectsEnabled: boolean, vendorUpdates?: VendorBase, customerUpdates?: CustomerBase, tranSelectedEntity?: Entity
|
|
22
|
-
export declare const toNewTransactionLine: (item: TransactionDetailLineItemData) => Line;
|
|
18
|
+
export declare const toTransactionUpdatePayload: (updates: TransactionUpdates, detail: SupportedTransaction, cotTransactionTracking: COTTransactionTracking, isAccountingProjectsEnabled: boolean, vendorUpdates?: VendorBase, customerUpdates?: CustomerBase, tranSelectedEntity?: Entity) => Partial<TransactionPayload>;
|