@zeniai/client-epic-state 5.1.41-beta0ND → 5.1.41-betaDI3

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.
Files changed (121) hide show
  1. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastCalculatedSection.d.ts +1 -1
  2. package/lib/entity/account/accountSelector.d.ts +6 -6
  3. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +18 -18
  4. package/lib/entity/accountGroup/accountGroupSelector.d.ts +44 -44
  5. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  6. package/lib/entity/snackbar/snackbarTypes.js +1 -1
  7. package/lib/entity/task/taskPayload.d.ts +2 -1
  8. package/lib/entity/task/taskPayload.js +8 -1
  9. package/lib/entity/task/taskReducer.d.ts +8 -1
  10. package/lib/entity/task/taskReducer.js +29 -4
  11. package/lib/entity/task/taskState.d.ts +1 -0
  12. package/lib/entity/tenant/epic/saveExternalConnectionEpic.js +7 -15
  13. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +3 -3
  14. package/lib/epic.d.ts +5 -3
  15. package/lib/epic.js +5 -3
  16. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -1
  17. package/lib/esm/entity/task/taskPayload.js +8 -1
  18. package/lib/esm/entity/task/taskReducer.js +28 -3
  19. package/lib/esm/entity/tenant/epic/saveExternalConnectionEpic.js +7 -15
  20. package/lib/esm/epic.js +5 -3
  21. package/lib/esm/index.js +711 -0
  22. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +3 -0
  23. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +7 -1
  24. package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +96 -0
  25. package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +53 -0
  26. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  27. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +70 -9
  28. package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +56 -2
  29. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +32 -9
  30. package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
  31. package/lib/esm/view/taskManager/taskListView/taskList.js +1 -0
  32. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +240 -12
  33. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -0
  34. package/lib/esm/view/taskManager/taskListView/taskListViewHelpers.js +58 -0
  35. package/lib/index.d.ts +995 -0
  36. package/lib/index.js +2612 -0
  37. package/lib/view/addressView/epic/fetchAddressEpic.d.ts +1 -1
  38. package/lib/view/addressView/epic/updateAddressEpic.d.ts +1 -1
  39. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +3 -3
  40. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +2 -2
  41. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +3 -3
  42. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +3 -3
  43. package/lib/view/aiCfoView/epics/deleteChatSessionEpic.d.ts +5 -5
  44. package/lib/view/auditReportView/auditReportViewSelector.d.ts +1 -1
  45. package/lib/view/billPayCard/billPayCardSelector.d.ts +3 -3
  46. package/lib/view/cardBalance/cardBalanceEpic.d.ts +2 -2
  47. package/lib/view/cardBalance/cardBalanceSelector.d.ts +8 -8
  48. package/lib/view/cardBalance/statementCloseDayEpic.d.ts +3 -3
  49. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +4 -4
  50. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +4 -4
  51. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +5 -5
  52. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +5 -5
  53. package/lib/view/cashBalance/cashBalanceEpic.d.ts +2 -2
  54. package/lib/view/cashBalance/cashBalanceSelector.d.ts +8 -8
  55. package/lib/view/cashInCashOut/cashInCashOutEpic.d.ts +5 -5
  56. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +5 -5
  57. package/lib/view/cashPosition/cashPositionEpic.d.ts +3 -3
  58. package/lib/view/cashPosition/cashPositionSelector.d.ts +5 -5
  59. package/lib/view/companyConfigView/companyConfigSelector.d.ts +2 -2
  60. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +3 -0
  61. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +7 -1
  62. package/lib/view/companyView/epic/companyPassport/saveCompanyPassportDetailsEpic.d.ts +1 -1
  63. package/lib/view/companyView/types/cockpitTypes.d.ts +3 -0
  64. package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +1 -1
  65. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +3 -3
  66. package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +3 -3
  67. package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +3 -3
  68. package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.d.ts +4 -4
  69. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +3 -3
  70. package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic.d.ts +1 -1
  71. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +1 -1
  72. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  73. package/lib/view/forecastList/forecastListSelector.d.ts +4 -4
  74. package/lib/view/insightsCard/insightsCardEpic.d.ts +1 -1
  75. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +5 -5
  76. package/lib/view/people/deletePersonEpic.d.ts +4 -4
  77. package/lib/view/people/fetchPeopleEpic.d.ts +2 -2
  78. package/lib/view/people/invitePeopleEpic.d.ts +7 -7
  79. package/lib/view/people/inviteZeniPeopleEpic.d.ts +7 -7
  80. package/lib/view/people/resendInviteEpic.d.ts +3 -3
  81. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +3 -3
  82. package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.d.ts +11 -11
  83. package/lib/view/reportUIOptions/updateReportUIOptionCompareModeEpic.d.ts +8 -8
  84. package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.d.ts +8 -8
  85. package/lib/view/settingsView/epic/fetchBankAccountsListEpic.d.ts +3 -3
  86. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +3 -3
  87. package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewSelector.d.ts +2 -2
  88. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +4 -4
  89. package/lib/view/spendManagement/helpers.d.ts +1 -1
  90. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.d.ts +3 -3
  91. package/lib/view/tagView/epics/createTagEpic.d.ts +3 -3
  92. package/lib/view/tagView/epics/deleteTagEpic.d.ts +7 -7
  93. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +9 -0
  94. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +100 -0
  95. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +8 -0
  96. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +57 -0
  97. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  98. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.d.ts +2 -2
  99. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +69 -8
  100. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +15 -0
  101. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +14 -2
  102. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +57 -3
  103. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +2 -1
  104. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +30 -7
  105. package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
  106. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
  107. package/lib/view/taskManager/taskListView/taskList.js +1 -0
  108. package/lib/view/taskManager/taskListView/taskListPayload.d.ts +4 -0
  109. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +6 -2
  110. package/lib/view/taskManager/taskListView/taskListReducer.js +241 -13
  111. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -0
  112. package/lib/view/taskManager/taskListView/taskListViewHelpers.d.ts +11 -0
  113. package/lib/view/taskManager/taskListView/taskListViewHelpers.js +60 -1
  114. package/lib/view/tasksCard/tasksCardSelector.d.ts +2 -2
  115. package/lib/view/topEx/topExEpic.d.ts +2 -2
  116. package/lib/view/topEx/topExSelector.d.ts +7 -7
  117. package/lib/view/transactionDetail/epics/uploadMissingAttachmentSuccessEpic.d.ts +5 -5
  118. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.d.ts +1 -1
  119. package/lib/view/userRoleConfigView/userRoleConfigSelector.d.ts +2 -2
  120. package/lib/view/zeniOAuthView/epics/approveOAuthConsentEpic.d.ts +3 -3
  121. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { PriorityCodeType, TaskStatusCodeType } from '../../../entity/task/taskS
3
3
  import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { SpendManagementUIState } from '../../spendManagement/billPay/billList/billListState';
5
5
  import { CategoryCombinationOperator, FilterCategoryType } from '../../spendManagement/spendManagementFilterHelpers';
6
- export declare const ALL_TASK_LIST_TABS: readonly ["live", "archived", "deleted", "snoozed"];
6
+ export declare const ALL_TASK_LIST_TABS: readonly ["live", "completed", "archived", "deleted", "snoozed"];
7
7
  export type TaskListTab = (typeof ALL_TASK_LIST_TABS)[number];
8
8
  export interface TaskListTabData {
9
9
  taskIds: ID[];
@@ -4,6 +4,7 @@ exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = ex
4
4
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_TASK_LIST_TABS = [
6
6
  'live',
7
+ 'completed',
7
8
  'archived',
8
9
  'deleted',
9
10
  'snoozed',
@@ -3,6 +3,10 @@ import { ZeniAPIResponse } from '../../../responsePayload';
3
3
  interface FetchTaskListPayload {
4
4
  tasks: TaskPayload[];
5
5
  archived?: TaskPayload[];
6
+ /** Tasks whose status is "done" or "resolved". Returned as a separate
7
+ * bucket so the "Completed" tab can show them without duplicating
8
+ * them under Active. */
9
+ completed?: TaskPayload[];
6
10
  deleted?: TaskPayload[];
7
11
  snoozed?: TaskPayload[];
8
12
  }
@@ -12,9 +12,10 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
12
12
  }, "taskList/fetchTaskListPage", never, never>, fetchTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/fetchTaskList">, updateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
13
  data: TaskPayload[];
14
14
  archived?: TaskPayload[];
15
+ completed?: TaskPayload[];
15
16
  deleted?: TaskPayload[];
16
17
  snoozed?: TaskPayload[];
17
- }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
+ }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"completed" | "deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
19
  fetchState: FetchState;
19
20
  error?: ZeniAPIStatus;
20
21
  }, "taskList/updateTaskListFetchStatus">, updateTaskListSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -58,6 +59,9 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
58
59
  error: ZeniAPIStatus;
59
60
  }, "taskList/updateTasksListOnUpdateTaskFailure">, updateTaskListOnCreateTaskFromTemplateSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
60
61
  tasks: TaskPayload[];
61
- }, "taskList/updateTaskListOnCreateTaskFromTemplateSuccess">, removeTaskFromList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskList/removeTaskFromList">, clearTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/clearTaskList">;
62
+ }, "taskList/updateTaskListOnCreateTaskFromTemplateSuccess">, removeTaskFromList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskList/removeTaskFromList">, removeTaskFromGroupBucket: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
63
+ taskGroupId: ID;
64
+ taskId: ID;
65
+ }, "taskList/removeTaskFromGroupBucket">, clearTaskList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskList/clearTaskList">;
62
66
  declare const _default: import("redux").Reducer<TaskListState>;
63
67
  export default _default;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
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;
4
+ exports.clearTaskList = exports.removeTaskFromGroupBucket = 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");
6
7
  const taskState_1 = require("../../../entity/task/taskState");
7
8
  const zeniDayJS_1 = require("../../../zeniDayJS");
8
9
  const taskList_1 = require("./taskList");
@@ -46,6 +47,7 @@ exports.initialState = {
46
47
  currentTab: 'live',
47
48
  byTab: {
48
49
  live: { ...initialTabData },
50
+ completed: { ...initialTabData },
49
51
  archived: { ...initialTabData },
50
52
  deleted: { ...initialTabData },
51
53
  snoozed: { ...initialTabData },
@@ -67,14 +69,12 @@ exports.initialState = {
67
69
  },
68
70
  filters: {
69
71
  categoryCombinationOperator: 'AND',
70
- categories: [
71
- {
72
- field: 'status',
73
- matchingOperator: 'not_equal',
74
- values: ['resolved'],
75
- valuesCombinationOperator: 'ANY',
76
- },
77
- ],
72
+ // Default to no filters. The Completed tab now owns the "hide resolved
73
+ // tasks from the live list" responsibility via the byTab split in
74
+ // updateTaskList / updateTaskFromListView / the updateTasks
75
+ // extraReducer. Keeping the historical `status != resolved` filter
76
+ // here would empty out the Completed tab.
77
+ categories: [],
78
78
  },
79
79
  hasValidState() {
80
80
  return this.fetchState == 'Completed';
@@ -106,13 +106,16 @@ const taskList = (0, toolkit_1.createSlice)({
106
106
  draft.error = undefined;
107
107
  },
108
108
  updateTaskList(draft, action) {
109
- const { data, archived, deleted, snoozed } = action.payload;
109
+ const { data, archived, completed, 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
+ }
116
119
  if (archived != null) {
117
120
  draft.byTab.archived = toTabData(getGroupedTaskIds(archived));
118
121
  }
@@ -358,9 +361,26 @@ const taskList = (0, toolkit_1.createSlice)({
358
361
  draft.taskIdsByAssignees[assigneeKey] = draft.taskIdsByAssignees[assigneeKey].filter((taskId) => taskId !== currentTaskState.id);
359
362
  draft.taskIdsByTags[tagsKey] = draft.taskIdsByTags[tagsKey].filter((taskId) => taskId !== currentTaskState.id);
360
363
  draft.taskIdsByDueDate[dueDateKey] = draft.taskIdsByDueDate[dueDateKey].filter((taskId) => taskId !== currentTaskState.id);
361
- draft.taskIdsByGroupsIds[taskGroupId] = draft.taskIdsByGroupsIds[taskGroupId].filter((taskId) => taskId !== currentTaskState.id);
364
+ // Remove from EVERY previous group bucket the task lived in, not
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
+ });
362
378
  }
363
379
  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);
364
384
  },
365
385
  updateTaskListOnCreateTaskFromTemplateSuccess(draft, action) {
366
386
  const { tasks } = action.payload;
@@ -384,6 +404,7 @@ const taskList = (0, toolkit_1.createSlice)({
384
404
  const taskId = task.id;
385
405
  draft.updateTasksFetchState.fetchState = 'In-Progress';
386
406
  draft.updateTasksFetchState.error = undefined;
407
+ let didMigrateTab = false;
387
408
  if (updates.priority != null) {
388
409
  const prevPriorityCode = (0, taskState_1.toPriorityCodeType)(task.priority.code);
389
410
  draft.taskIdsByPriority[prevPriorityCode] = draft.taskIdsByPriority[prevPriorityCode].filter((id) => id != taskId);
@@ -395,6 +416,25 @@ const taskList = (0, toolkit_1.createSlice)({
395
416
  draft.taskIdsByStatus[prevStatusCode] = draft.taskIdsByStatus[prevStatusCode].filter((id) => id != taskId);
396
417
  const newStatusCode = (0, taskState_1.toTaskStatusCodeType)(updates.status.code);
397
418
  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
+ }
398
438
  }
399
439
  if (updates.assignees != null) {
400
440
  const prevGroupId = getAssigneesGroupKey(task.assignees);
@@ -434,7 +474,18 @@ const taskList = (0, toolkit_1.createSlice)({
434
474
  };
435
475
  }
436
476
  }
437
- syncTopLevelToActiveTab(draft);
477
+ if (didMigrateTab) {
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
+ }
438
489
  },
439
490
  updateTasksListOnUpdateTaskSuccess(draft) {
440
491
  draft.updateTasksFetchState.fetchState = 'Completed';
@@ -447,12 +498,80 @@ const taskList = (0, toolkit_1.createSlice)({
447
498
  removeTaskFromList(draft, action) {
448
499
  removeTaskIds(draft, [action.payload]);
449
500
  },
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
+ },
450
519
  clearTaskList(draft) {
451
520
  Object.assign(draft, exports.initialState);
452
521
  },
453
522
  },
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
+ },
454
573
  });
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;
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.removeTaskFromGroupBucket = _a.removeTaskFromGroupBucket, exports.clearTaskList = _a.clearTaskList;
456
575
  exports.default = taskList.reducer;
457
576
  /**
458
577
  * helpers
@@ -559,6 +678,115 @@ const copyTabDataToTopLevel = (draft, tabData) => {
559
678
  draft.taskIdsByDueDate = tabData.taskIdsByDueDate;
560
679
  draft.taskIdsByTags = tabData.taskIdsByTags;
561
680
  };
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
+ };
562
790
  const removeIdsFromTabData = (tabData, taskIds) => {
563
791
  const removedSet = new Set(taskIds);
564
792
  const isRemoved = (id) => removedSet.has(id);
@@ -342,6 +342,7 @@ 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,
345
346
  archived: taskListState.byTab.archived.taskIds.length,
346
347
  deleted: taskListState.byTab.deleted.taskIds.length,
347
348
  snoozed: taskListState.byTab.snoozed.taskIds.length,
@@ -1,5 +1,16 @@
1
+ import { Tag } from '../../../entity/tag/tagState';
1
2
  import { Task } from '../../../entity/task/taskState';
3
+ import { User } from '../../../entity/user/userState';
2
4
  import { ZeniDate } from '../../../zeniDayJS';
3
5
  import { TaskGroupKey } from './taskList';
6
+ export type SubtaskSortKey = 'name' | 'status' | 'assignee' | 'tag';
7
+ export type SubtaskSortOrder = 'asc' | 'desc';
4
8
  export declare const getDueDateValueFromDueDateGroupId: (groupId: string) => ZeniDate;
5
9
  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.getTaskUpdates = exports.getDueDateValueFromDueDateGroupId = void 0;
3
+ exports.sortSubtasks = 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,3 +53,62 @@ 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;
@@ -3,8 +3,8 @@ export declare const getTasksCardReport: (state: RootState) => {
3
3
  reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
- status: import("../../commonStateTypes/status").Status | undefined;
7
- fetchState: import("../../commonStateTypes/common").FetchState;
6
+ status: import("../..").Status | undefined;
7
+ fetchState: import("../..").FetchState;
8
8
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
9
9
  tasks: {
10
10
  isUncategorizedExpenseAccountIdentified: boolean;
@@ -5,9 +5,9 @@ import { ZeniAPI } from '../../zeniAPI';
5
5
  import { fetchTopEx, updateTopEx, updateTopExFailure } from './topExReducer';
6
6
  export type ActionType = ReturnType<typeof fetchTopEx> | ReturnType<typeof updateTopEx> | ReturnType<typeof updateTopExFailure> | ReturnType<typeof updateAccounts>;
7
7
  export declare const fetchTopExEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<import("@reduxjs/toolkit").PayloadAction<import("../../entity/account/accountPayload").AccountPayload[], "account/updateAccounts", {
8
- reportId: import("../../commonStateTypes/viewAndReport/viewAndReport").ReportIDPlusForecastID;
8
+ reportId: import("../..").ReportIDPlusForecastID;
9
9
  classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
10
- updateType: import("../../commonStateTypes/common").UpdateType;
10
+ updateType: import("../..").UpdateType;
11
11
  }, never> | {
12
12
  payload: import("../../responsePayload").ZeniReportData<import("./topExPayload").TopExPayload>;
13
13
  type: "top_expenses/updateTopEx";
@@ -7,12 +7,12 @@ export declare const getTopExpenses: (accountState: AccountState, topExState: To
7
7
  reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation" | "transfer_accounts" | "credit_card_transfer_accounts";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
- status: import("../../commonStateTypes/status").Status | undefined;
11
- fetchState: import("../../commonStateTypes/common").FetchState;
12
- error: import("../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
10
+ status: import("../..").Status | undefined;
11
+ fetchState: import("../..").FetchState;
12
+ error: import("../..").ZeniAPIStatus<Record<string, unknown>> | undefined;
13
13
  topExTimePeriod: "last_month" | "last_3_months" | "last_6_months" | "last_12_months" | "last_year" | "this_week_to_date" | "last_week" | "this_month_to_date" | "this_year_to_date";
14
14
  topExpenses: {
15
- total: import("../../commonStateTypes/amount").Amount | undefined;
15
+ total: import("../..").Amount | undefined;
16
16
  startDate: import("dayjs").Dayjs | undefined;
17
17
  endDate: import("dayjs").Dayjs | undefined;
18
18
  timePeriod: "last_month" | "last_3_months" | "last_6_months" | "last_12_months" | "last_year" | "this_week_to_date" | "last_week" | "this_month_to_date" | "this_year_to_date";
@@ -25,13 +25,13 @@ export declare const getTopExpenses: (accountState: AccountState, topExState: To
25
25
  accountSubType: string | undefined;
26
26
  accountDescription: string;
27
27
  logo: import("url-parse")<Record<string, string | undefined>> | import("url-parse")<string> | undefined;
28
- balance: import("../../commonStateTypes/balance").Balance;
28
+ balance: import("../..").Balance;
29
29
  }[];
30
30
  };
31
31
  allTimePeriods: TopExTimePeriodWithMetaData[];
32
- dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
32
+ dataAvailable: import("../..").TimeframeTick | undefined;
33
33
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
34
- downloadState: import("../../commonStateTypes/common").FetchState;
34
+ downloadState: import("../..").FetchState;
35
35
  };
36
36
  export declare const getTop6Expenses: (state: RootState) => TopExReport;
37
37
  export declare const getAllTopExpenses: (state: RootState) => TopExReport;
@@ -5,9 +5,9 @@ import { uploadMissingAttachmentSuccess } from '../transactionDetailReducer';
5
5
  export type ActionType = ReturnType<typeof uploadMissingAttachmentSuccess> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateTransaction>;
6
6
  export declare const uploadMissingAttachmentSuccessEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<{
7
7
  payload: {
8
- messageSection: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageSections;
9
- messageText: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageSectionTexts;
10
- type: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageType;
8
+ messageSection: import("../../..").SnackbarMessageSections;
9
+ messageText: import("../../..").SnackbarMessageSectionTexts;
10
+ type: import("../../..").SnackbarMessageType;
11
11
  showStatusIcon?: boolean;
12
12
  variables?: {
13
13
  variableName: string;
@@ -17,7 +17,7 @@ export declare const uploadMissingAttachmentSuccessEpic: (actions$: ActionsObser
17
17
  type: "snackbar/openSnackbar";
18
18
  } | import("@reduxjs/toolkit").PayloadAction<{
19
19
  id: string;
20
- payload: import("../../../entity/transaction/transactionState").SupportedTransactionPayload;
20
+ payload: import("../../..").SupportedTransactionPayload;
21
21
  }, "transaction/updateTransaction", {
22
- updateType: import("../../../commonStateTypes/common").UpdateType;
22
+ updateType: import("../../..").UpdateType;
23
23
  }, never>>;
@@ -15,7 +15,7 @@ export declare const toLineEntity: (lineRecord: JournalEntryTransactionLine | Tr
15
15
  qboId: string;
16
16
  id: ID;
17
17
  name: string;
18
- logo?: import("../../zeniUrl").ZeniUrl;
18
+ logo?: import("../..").ZeniUrl;
19
19
  } | undefined;
20
20
  export declare const getRecommendedCategoryClass: (isCategoryMiscategorized: boolean, isClassMiscategorized: boolean, recommendation?: RecommendationWithCOT[], account?: AccountBase, classObj?: ClassBase, uncategorizedIncomeExpense?: UncategorizedAccounts) => {
21
21
  recommendedAccount: RecommendedAccountBase | undefined;
@@ -6,7 +6,7 @@ export interface UserRoleConfigView extends SelectorView {
6
6
  }
7
7
  export declare const getUserRoleConfig: (userRoleConfigState: UserRoleConfigState) => {
8
8
  companyTitles: AllowedValueWithCode[];
9
- fetchState: import("../../commonStateTypes/common").FetchState;
10
- error: import("../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
9
+ fetchState: import("../..").FetchState;
10
+ error: import("../..").ZeniAPIStatus<Record<string, unknown>> | undefined;
11
11
  version: string;
12
12
  };
@@ -6,9 +6,9 @@ import { approveOAuthConsent, approveOAuthConsentFailure, approveOAuthConsentSuc
6
6
  export type ActionType = ReturnType<typeof approveOAuthConsent> | ReturnType<typeof approveOAuthConsentSuccess> | ReturnType<typeof approveOAuthConsentFailure> | ReturnType<typeof openSnackbar>;
7
7
  export declare const approveOAuthConsentEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
8
8
  payload: {
9
- messageSection: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageSections;
10
- messageText: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageSectionTexts;
11
- type: import("../../../entity/snackbar/snackbarTypes").SnackbarMessageType;
9
+ messageSection: import("../../..").SnackbarMessageSections;
10
+ messageText: import("../../..").SnackbarMessageSectionTexts;
11
+ type: import("../../..").SnackbarMessageType;
12
12
  showStatusIcon?: boolean;
13
13
  variables?: {
14
14
  variableName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.41-beta0ND",
3
+ "version": "5.1.41-betaDI3",
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",