@zeniai/client-epic-state 4.20.2-beta37RR → 4.20.2-betaJK1

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 (221) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonStateTypes/animations.d.ts +1 -1
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  6. package/lib/entity/account/accountPayload.d.ts +2 -0
  7. package/lib/entity/account/accountReducer.d.ts +5 -2
  8. package/lib/entity/account/accountReducer.js +7 -2
  9. package/lib/entity/account/accountSelector.d.ts +1 -0
  10. package/lib/entity/account/accountSelector.js +8 -1
  11. package/lib/entity/account/accountState.d.ts +1 -1
  12. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  13. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  14. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
  15. package/lib/entity/class/classReducer.d.ts +4 -4
  16. package/lib/entity/class/classState.d.ts +1 -1
  17. package/lib/entity/forecast/forecastState.d.ts +1 -1
  18. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  19. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  20. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  21. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  22. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  23. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  24. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  25. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  26. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  27. package/lib/entity/snackbar/snackbarTypes.js +0 -2
  28. package/lib/entity/task/taskPayload.d.ts +0 -3
  29. package/lib/entity/task/taskPayload.js +0 -5
  30. package/lib/entity/task/taskState.d.ts +0 -3
  31. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  32. package/lib/entity/tenant/tenantReducer.js +1 -0
  33. package/lib/entity/tenant/tenantSelector.d.ts +1 -0
  34. package/lib/entity/tenant/tenantSelector.js +9 -1
  35. package/lib/entity/tenant/tenantState.d.ts +1 -0
  36. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  37. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  38. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +3 -0
  39. package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -1
  40. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  41. package/lib/entity/transaction/stateTypes/transaction.d.ts +5 -0
  42. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  43. package/lib/epic.d.ts +4 -3
  44. package/lib/epic.js +4 -3
  45. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  46. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  47. package/lib/esm/entity/account/accountReducer.js +6 -1
  48. package/lib/esm/entity/account/accountSelector.js +6 -0
  49. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  50. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  51. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
  52. package/lib/esm/entity/task/taskPayload.js +0 -5
  53. package/lib/esm/entity/tenant/tenantReducer.js +1 -0
  54. package/lib/esm/entity/tenant/tenantSelector.js +7 -0
  55. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  56. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -1
  57. package/lib/esm/epic.js +4 -3
  58. package/lib/esm/index.js +14 -13
  59. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  60. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  61. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  62. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  63. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  64. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  65. package/lib/esm/view/companyView/types/cockpitTypes.js +0 -1
  66. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +44 -0
  67. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +6 -11
  68. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +44 -0
  69. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  70. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  71. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +4 -3
  72. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  73. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  74. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  75. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +17 -1
  76. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +148 -3
  77. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  78. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  79. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +12 -4
  80. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +90 -10
  81. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +12 -6
  82. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +18 -1
  83. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  84. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  85. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  86. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  87. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  88. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  89. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  90. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  91. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  92. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  93. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  94. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  95. package/lib/esm/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +0 -3
  96. package/lib/esm/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +0 -5
  97. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -1
  98. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -1
  99. package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +0 -4
  100. package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +1 -49
  101. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -11
  102. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +8 -56
  103. package/lib/esm/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +0 -1
  104. package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -13
  105. package/lib/esm/view/taskManager/taskListView/taskList.js +0 -8
  106. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +12 -106
  107. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +39 -51
  108. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  109. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  110. package/lib/index.d.ts +20 -17
  111. package/lib/index.js +44 -36
  112. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  113. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  114. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  115. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  116. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  117. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  118. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  119. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  120. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  121. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  122. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  123. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  124. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  125. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  126. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  127. package/lib/view/classList/fetchClassListEpic.js +8 -1
  128. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  129. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  130. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  131. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  132. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  133. package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
  134. package/lib/view/companyView/types/cockpitTypes.js +0 -1
  135. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  136. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +8 -0
  137. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +48 -0
  138. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +6 -11
  139. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +9 -0
  140. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +48 -0
  141. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  142. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
  143. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +4 -3
  144. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  145. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  146. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  147. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  148. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  149. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +33 -0
  150. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  151. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +18 -2
  152. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +14 -3
  153. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +149 -4
  154. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  155. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +11 -1
  156. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  157. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  158. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +12 -4
  159. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +89 -9
  160. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -5
  161. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +5 -0
  162. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +20 -0
  163. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +12 -0
  164. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  165. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  166. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  167. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  168. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  169. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  170. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  171. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  172. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  173. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  174. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  175. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  176. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  177. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  178. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
  179. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  180. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  181. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  182. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  183. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  184. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  185. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
  186. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  187. package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.d.ts +1 -2
  188. package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.js +0 -3
  189. package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.d.ts +1 -2
  190. package/lib/view/taskManager/taskDetailView/epics/deleteTaskEpic.js +0 -5
  191. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -1
  192. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -1
  193. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -2
  194. package/lib/view/taskManager/taskDetailView/taskDetail.js +0 -4
  195. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +1 -10
  196. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +2 -50
  197. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -4
  198. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -11
  199. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +3 -9
  200. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +7 -55
  201. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +0 -1
  202. package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -13
  203. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -15
  204. package/lib/view/taskManager/taskListView/taskList.js +1 -10
  205. package/lib/view/taskManager/taskListView/taskListPayload.d.ts +0 -3
  206. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +4 -8
  207. package/lib/view/taskManager/taskListView/taskListReducer.js +13 -107
  208. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +3 -9
  209. package/lib/view/taskManager/taskListView/taskListSelector.js +39 -51
  210. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  211. package/lib/view/topEx/topExSelector.d.ts +1 -1
  212. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  213. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  214. package/package.json +1 -1
  215. package/lib/esm/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -65
  216. package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +0 -56
  217. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
  218. package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.d.ts +0 -9
  219. package/lib/view/taskManager/taskDetailView/epics/snoozeTaskEpic.js +0 -69
  220. package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.d.ts +0 -9
  221. package/lib/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +0 -60
@@ -185,54 +185,6 @@ const taskDetailView = createSlice({
185
185
  draft.editTaskStateById[taskId].archiveStatus.fetchState = fetchState;
186
186
  draft.editTaskStateById[taskId].archiveStatus.error = error;
187
187
  },
188
- snoozeTask: {
189
- reducer(draft, action) {
190
- const { taskId } = action.payload;
191
- draft.editTaskStateById[taskId] = {
192
- ...(draft.editTaskStateById[taskId] != null
193
- ? draft.editTaskStateById[taskId]
194
- : initialTaskDetail),
195
- snoozeStatus: {
196
- fetchState: 'In-Progress',
197
- error: undefined,
198
- },
199
- };
200
- },
201
- prepare(taskId, snoozedUntil) {
202
- return {
203
- payload: {
204
- taskId,
205
- snoozedUntil,
206
- },
207
- };
208
- },
209
- },
210
- snoozeTaskSuccessOrFailure(draft, action) {
211
- const { taskId, fetchState, error } = action.payload;
212
- draft.editTaskStateById[taskId].snoozeStatus.fetchState = fetchState;
213
- draft.editTaskStateById[taskId].snoozeStatus.error = error;
214
- },
215
- unsnoozeTask: {
216
- reducer(draft, action) {
217
- const { taskId } = action.payload;
218
- draft.editTaskStateById[taskId] = {
219
- ...(draft.editTaskStateById[taskId] != null
220
- ? draft.editTaskStateById[taskId]
221
- : initialTaskDetail),
222
- snoozeStatus: {
223
- fetchState: 'In-Progress',
224
- error: undefined,
225
- },
226
- };
227
- },
228
- prepare(taskId) {
229
- return {
230
- payload: {
231
- taskId,
232
- },
233
- };
234
- },
235
- },
236
188
  deleteTask: {
237
189
  reducer(draft, action) {
238
190
  const { taskId } = action.payload;
@@ -318,5 +270,5 @@ const taskDetailView = createSlice({
318
270
  },
319
271
  },
320
272
  });
321
- export const { fetchTaskDetailPage, fetchTaskDetail, initializeTaskToLocalStore, updateEditTaskFetchStatus, saveTaskUpdatesToLocalStore, discardTaskUpdatesInLocalStore, saveTaskDetail, archiveTask, archiveTaskSuccessOrFailure, snoozeTask, snoozeTaskSuccessOrFailure, unsnoozeTask, saveTaskSuccessOrFailure, deleteTask, removeTaskDetail, deleteTaskSuccessOrFailure, fetchTaskHistory, updateTaskHistory, updateTaskHistoryFetchStatus, clearTaskDetail, updateCreatedTagToLocalStore, updateDeletedTagToLocalStore, } = taskDetailView.actions;
273
+ export const { fetchTaskDetailPage, fetchTaskDetail, initializeTaskToLocalStore, updateEditTaskFetchStatus, saveTaskUpdatesToLocalStore, discardTaskUpdatesInLocalStore, saveTaskDetail, archiveTask, archiveTaskSuccessOrFailure, saveTaskSuccessOrFailure, deleteTask, removeTaskDetail, deleteTaskSuccessOrFailure, fetchTaskHistory, updateTaskHistory, updateTaskHistoryFetchStatus, clearTaskDetail, updateCreatedTagToLocalStore, updateDeletedTagToLocalStore, } = taskDetailView.actions;
322
274
  export default taskDetailView.reducer;
@@ -21,17 +21,11 @@ export const getTaskDetail = (state, taskId) => {
21
21
  };
22
22
  let taskHistory = [];
23
23
  let createdByUser = undefined;
24
- let isArchived = undefined;
25
- let isDeleted = undefined;
26
- let snoozedUntil = undefined;
27
24
  if (taskId != null && sourceTaskDetail != null) {
28
25
  const taskEntity = getTaskById(taskState, taskId);
29
26
  const fileIdsInEntity = taskEntity?.fileIds ?? [];
30
27
  if (taskEntity != null) {
31
28
  createdByUser = getUserAndUserRole(userState, userRoleState, addressState, taskEntity.createdBy);
32
- snoozedUntil = taskEntity.snoozedUntil;
33
- isArchived = taskEntity.isArchived;
34
- isDeleted = taskEntity.isDeleted;
35
29
  }
36
30
  if (fileIdsInEntity.length > 0) {
37
31
  fetchStatus = reduceFetchState([
@@ -79,10 +73,7 @@ export const getTaskDetail = (state, taskId) => {
79
73
  error: fetchStatus.error,
80
74
  version: 0,
81
75
  createdByUser,
82
- isArchived,
83
- isDeleted,
84
76
  showTaskDetailFormFooter,
85
- snoozedUntil,
86
77
  };
87
78
  };
88
79
  export const allTaskStatus = [
@@ -100,11 +91,11 @@ export const allTaskStatus = [
100
91
  },
101
92
  {
102
93
  code: 'done',
103
- name: 'Done',
94
+ name: 'In Review',
104
95
  },
105
96
  {
106
97
  code: 'resolved',
107
- name: 'Resolved',
98
+ name: 'Complete',
108
99
  },
109
100
  ];
110
101
  export const allTaskPriority = [
@@ -5,26 +5,21 @@ import { convertHHMMStrToMinutes } from '../../../../commonStateTypes/fiscalYear
5
5
  import { DEFAULT_DATE_FORMAT } from '../../../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY';
6
6
  import { updateTasks } from '../../../../entity/task/taskReducer';
7
7
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
8
- import { bulkUpdateTaskList, fetchTaskList, updateTasksListOnBulkUpdateTasksFailure, updateTasksListOnBulkUpdateTasksSuccess, } from '../taskListReducer';
9
- export const bulkUpdateTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUpdateTaskList.match), switchMap((action) => {
8
+ import { bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksFailure, updateTasksListOnBulkUpdateTasksSuccess, } from '../taskListReducer';
9
+ export const bulkUpdateTaskListEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(bulkUpdateTaskList.match), switchMap((action) => {
10
+ const state = state$.value;
10
11
  const { taskIds, updates, groupId } = action.payload;
11
- const bulkUpdates = toBulkUpdatesPayload(updates);
12
- if (groupId != null) {
13
- bulkUpdates.task_group_ids = [groupId];
14
- }
15
- const payload = { task_ids: taskIds, updates: bulkUpdates };
12
+ const payload = {
13
+ tasks: getTasksListPayload(state, taskIds, updates),
14
+ };
16
15
  return zeniAPI
17
- .putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/bulk-update`, payload)
16
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload)
18
17
  .pipe(mergeMap((response) => {
19
18
  if (isSuccessResponse(response) && response.data != null) {
20
- const removeFromList = updates.isArchived != null ||
21
- updates.isDeleted != null ||
22
- 'snoozedUntil' in updates;
23
19
  return of(updateTasks(response.data.tasks), updateTasksListOnBulkUpdateTasksSuccess({
24
20
  taskIds,
25
21
  groupId,
26
- removeFromList,
27
- }), fetchTaskList());
22
+ }));
28
23
  }
29
24
  else {
30
25
  return of(updateTasksListOnBulkUpdateTasksFailure({
@@ -38,43 +33,6 @@ export const bulkUpdateTaskListEpic = (actions$, _state$, zeniAPI) => actions$.p
38
33
  }));
39
34
  }));
40
35
  }));
41
- const toBulkUpdatesPayload = (updates) => {
42
- const payload = {};
43
- if (updates.status != null) {
44
- payload.status = updates.status.code;
45
- }
46
- if (updates.priority != null) {
47
- payload.priority = updates.priority.code;
48
- }
49
- if (updates.assignees != null) {
50
- payload.assignees = updates.assignees;
51
- }
52
- if (updates.groupAssignees != null) {
53
- payload.group_assignees = updates.groupAssignees;
54
- }
55
- if (updates.dueDate != null) {
56
- payload.due_date = updates.dueDate.format(DEFAULT_DATE_FORMAT);
57
- }
58
- if (updates.tagIds != null) {
59
- payload.tags = updates.tagIds;
60
- }
61
- if (updates.timeSpent != null) {
62
- payload.time_spent = convertHHMMStrToMinutes(updates.timeSpent.replace(/\D/g, ''));
63
- }
64
- if (updates.isArchived != null) {
65
- payload.is_archived = updates.isArchived;
66
- }
67
- if (updates.isDeleted != null) {
68
- payload.is_deleted = updates.isDeleted;
69
- }
70
- if ('snoozedUntil' in updates) {
71
- payload.snoozed_until = null;
72
- payload.snoozed_by = null;
73
- payload.snoozed_at = null;
74
- payload.is_snooze_notification_sent = false;
75
- }
76
- return payload;
77
- };
78
36
  export const getTasksListPayload = (state, taskIds, updates) => {
79
37
  const { taskState } = state;
80
38
  const tasksList = taskIds
@@ -113,12 +71,6 @@ const toTaskPayload = (state, task) => {
113
71
  assignees: task.assignees,
114
72
  description: task.description,
115
73
  group_assignees: task.groupAssignees,
116
- is_archived: task.isArchived,
117
- is_deleted: task.isDeleted,
118
- is_snooze_notification_sent: false,
119
- snoozed_at: null,
120
- snoozed_by: null,
121
- snoozed_until: task.snoozedUntil != null ? task.snoozedUntil.toISOString() : null,
122
74
  due_date: task.dueDate != null ? task.dueDate.format(DEFAULT_DATE_FORMAT) : null,
123
75
  priority: task.priority.code,
124
76
  status: task.status.code,
@@ -11,7 +11,6 @@ export const dragNDropTasksEpic = (actions$, state$) => actions$.pipe(filter(dra
11
11
  updateTasksListOnBulkUpdateTasksSuccess({
12
12
  taskIds,
13
13
  groupId,
14
- removeFromList: false,
15
14
  }),
16
15
  bulkUpdateTaskList(taskIds, groupId, updates),
17
16
  ];
@@ -9,20 +9,10 @@ export const fetchTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(f
9
9
  .getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(`{"task_type": "all"}`)}`)
10
10
  .pipe(mergeMap((response) => {
11
11
  if (isSuccessResponse(response) && response.data != null) {
12
- const { tasks, deleted, archived, snoozed } = response.data;
13
- const allTasks = [
14
- ...tasks,
15
- ...(deleted ?? []),
16
- ...(archived ?? []),
17
- ...(snoozed ?? []),
18
- ];
19
- return of(updateTasks(allTasks), updateTaskList({
20
- data: tasks,
21
- deleted: deleted ?? [],
22
- archived: archived ?? [],
23
- snoozed: snoozed ?? [],
12
+ return of(updateTasks(response.data.tasks), updateTaskList({
13
+ data: response.data.tasks,
24
14
  updateType: 'replace',
25
- }), updateTags(allTasks.map((task) => task.tags).flat()));
15
+ }), updateTags(response.data.tasks.map((task) => task.tags).flat()));
26
16
  }
27
17
  else {
28
18
  return of(updateTaskListFetchStatus({
@@ -1,11 +1,4 @@
1
1
  import { stringToUnion, stringToUnionStrict, } from '../../../commonStateTypes/stringToUnion';
2
- export const ALL_TASK_LIST_TABS = [
3
- 'live',
4
- 'archived',
5
- 'deleted',
6
- 'snoozed',
7
- ];
8
- export const toTaskListTabType = (v) => stringToUnion(v, ALL_TASK_LIST_TABS);
9
2
  export const DUE_DATE_GROUP_KEYS = [
10
3
  'overdue',
11
4
  'today',
@@ -33,7 +26,6 @@ const ALL_TASK_LIST_SORT_KEYS = [
33
26
  'status',
34
27
  'priority',
35
28
  'timeSpent',
36
- 'visibility',
37
29
  ];
38
30
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
39
31
  const toTaskListSortKeyType = (v) => stringToUnion(v, ALL_TASK_LIST_SORT_KEYS);
@@ -29,23 +29,7 @@ const initialTaskIdsByDueDate = {
29
29
  today: [],
30
30
  upcoming: [],
31
31
  };
32
- const initialTabData = {
33
- taskIds: [],
34
- taskIdsByAssignees: {},
35
- taskIdsByDueDate: { ...initialTaskIdsByDueDate },
36
- taskIdsByGroupsIds: {},
37
- taskIdsByPriority: { ...initialTaskIdsByPriority },
38
- taskIdsByStatus: { ...initialTaskIdsByStatus },
39
- taskIdsByTags: {},
40
- };
41
32
  export const initialState = {
42
- currentTab: 'live',
43
- byTab: {
44
- live: { ...initialTabData },
45
- archived: { ...initialTabData },
46
- deleted: { ...initialTabData },
47
- snoozed: { ...initialTabData },
48
- },
49
33
  taskIds: [],
50
34
  taskIdsByGroupsIds: {},
51
35
  taskIdsByPriority: initialTaskIdsByPriority,
@@ -102,30 +86,17 @@ const taskList = createSlice({
102
86
  draft.error = undefined;
103
87
  },
104
88
  updateTaskList(draft, action) {
105
- const { data, archived, deleted, snoozed } = action.payload;
89
+ const { data } = action.payload;
106
90
  draft.fetchState = 'Completed';
107
91
  draft.error = undefined;
108
- // Group live tasks
109
- const liveGrouped = getGroupedTaskIds(data);
110
- draft.byTab.live = toTabData(liveGrouped);
111
- // Group other tabs if provided
112
- if (archived != null) {
113
- draft.byTab.archived = toTabData(getGroupedTaskIds(archived));
114
- }
115
- if (deleted != null) {
116
- draft.byTab.deleted = toTabData(getGroupedTaskIds(deleted));
117
- }
118
- if (snoozed != null) {
119
- draft.byTab.snoozed = toTabData(getGroupedTaskIds(snoozed));
120
- }
121
- // Copy active tab data to top-level fields
122
- const activeTabData = draft.byTab[draft.currentTab];
123
- copyTabDataToTopLevel(draft, activeTabData);
124
- },
125
- updateTaskListTab(draft, action) {
126
- draft.currentTab = action.payload;
127
- const activeTabData = draft.byTab[action.payload];
128
- copyTabDataToTopLevel(draft, activeTabData);
92
+ const { taskIds, taskIdsGroupedByPriority, taskIdsByGroupIds, taskIdsGroupedByStatus, taskIdsByAssignees, taskIdsByDueDate, taskIdsByTags, } = getGroupedTaskIds(data);
93
+ draft.taskIds = taskIds;
94
+ draft.taskIdsByGroupsIds = taskIdsByGroupIds;
95
+ draft.taskIdsByPriority = taskIdsGroupedByPriority;
96
+ draft.taskIdsByStatus = taskIdsGroupedByStatus;
97
+ draft.taskIdsByAssignees = taskIdsByAssignees;
98
+ draft.taskIdsByDueDate = taskIdsByDueDate;
99
+ draft.taskIdsByTags = taskIdsByTags;
129
100
  },
130
101
  initiateTaskListLocalData(draft, action) {
131
102
  const { taskGroupById } = action.payload;
@@ -213,13 +184,10 @@ const taskList = createSlice({
213
184
  },
214
185
  },
215
186
  updateTasksListOnBulkUpdateTasksSuccess(draft, action) {
216
- const { taskIds, groupId, removeFromList } = action.payload;
187
+ const { taskIds, groupId } = action.payload;
217
188
  draft.updateTasksFetchState.fetchState = 'Completed';
218
189
  draft.updateTasksFetchState.error = undefined;
219
- if (removeFromList) {
220
- removeTaskIdsFromTopLevel(draft, taskIds);
221
- }
222
- else if (groupId != null) {
190
+ if (groupId != null) {
223
191
  const { groupByKey } = draft.uiState;
224
192
  if (groupByKey === 'groupName') {
225
193
  Object.keys(draft.taskIdsByGroupsIds).forEach((gId) => {
@@ -436,34 +404,12 @@ const taskList = createSlice({
436
404
  draft.updateTasksFetchState.fetchState = 'Error';
437
405
  draft.updateTasksFetchState.error = action.payload.error;
438
406
  },
439
- removeTaskFromList(draft, action) {
440
- const taskIdToRemove = action.payload;
441
- draft.taskIds = draft.taskIds.filter((id) => id !== taskIdToRemove);
442
- Object.keys(draft.taskIdsByGroupsIds).forEach((groupId) => {
443
- draft.taskIdsByGroupsIds[groupId] = draft.taskIdsByGroupsIds[groupId].filter((id) => id !== taskIdToRemove);
444
- });
445
- Object.keys(draft.taskIdsByPriority).forEach((key) => {
446
- draft.taskIdsByPriority[key] = draft.taskIdsByPriority[key].filter((id) => id !== taskIdToRemove);
447
- });
448
- Object.keys(draft.taskIdsByStatus).forEach((key) => {
449
- draft.taskIdsByStatus[key] = draft.taskIdsByStatus[key].filter((id) => id !== taskIdToRemove);
450
- });
451
- Object.keys(draft.taskIdsByDueDate).forEach((key) => {
452
- draft.taskIdsByDueDate[key] = draft.taskIdsByDueDate[key].filter((id) => id !== taskIdToRemove);
453
- });
454
- Object.keys(draft.taskIdsByAssignees).forEach((key) => {
455
- draft.taskIdsByAssignees[key] = draft.taskIdsByAssignees[key].filter((id) => id !== taskIdToRemove);
456
- });
457
- Object.keys(draft.taskIdsByTags).forEach((key) => {
458
- draft.taskIdsByTags[key] = draft.taskIdsByTags[key].filter((id) => id !== taskIdToRemove);
459
- });
460
- },
461
407
  clearTaskList(draft) {
462
408
  Object.assign(draft, initialState);
463
409
  },
464
410
  },
465
411
  });
466
- export const { fetchTaskListPage, fetchTaskList, updateTaskList, updateTaskListTab, updateTaskListFetchStatus, updateTaskListSearchText, updateTaskListUIState, updateTaskFilters, updateTaskListOnNewGroupCreationSuccess, bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess, updateTasksListOnBulkUpdateTasksFailure, initiateTaskListLocalData, updateTaskListLocalData, updateTaskListOnTaskGroupDeletion, dragNDropTasks, updateTaskListOnNewTaskCreationSuccess, updateTaskListOnTaskGroupNameUpdate, updateTaskFromListView, updateTasksListOnUpdateTaskSuccess, updateTasksListOnUpdateTaskFailure, updateTaskListOnCreateTaskFromTemplateSuccess, removeTaskFromList, clearTaskList, } = taskList.actions;
412
+ export const { fetchTaskListPage, fetchTaskList, updateTaskList, updateTaskListFetchStatus, updateTaskListSearchText, updateTaskListUIState, updateTaskFilters, updateTaskListOnNewGroupCreationSuccess, bulkUpdateTaskList, updateTasksListOnBulkUpdateTasksSuccess, updateTasksListOnBulkUpdateTasksFailure, initiateTaskListLocalData, updateTaskListLocalData, updateTaskListOnTaskGroupDeletion, dragNDropTasks, updateTaskListOnNewTaskCreationSuccess, updateTaskListOnTaskGroupNameUpdate, updateTaskFromListView, updateTasksListOnUpdateTaskSuccess, updateTasksListOnUpdateTaskFailure, updateTaskListOnCreateTaskFromTemplateSuccess, clearTaskList, } = taskList.actions;
467
413
  export default taskList.reducer;
468
414
  /**
469
415
  * helpers
@@ -542,46 +488,6 @@ const getTagsGroupKey = (tags) => {
542
488
  tagIds.sort();
543
489
  return tagIds.join(',');
544
490
  };
545
- const removeTaskIdsFromTopLevel = (draft, taskIds) => {
546
- const isRemoved = (id) => taskIds.includes(id);
547
- draft.taskIds = draft.taskIds.filter((id) => !isRemoved(id));
548
- Object.keys(draft.taskIdsByGroupsIds).forEach((gId) => {
549
- draft.taskIdsByGroupsIds[gId] = draft.taskIdsByGroupsIds[gId].filter((id) => !isRemoved(id));
550
- });
551
- Object.keys(draft.taskIdsByPriority).forEach((key) => {
552
- draft.taskIdsByPriority[key] = draft.taskIdsByPriority[key].filter((id) => !isRemoved(id));
553
- });
554
- Object.keys(draft.taskIdsByStatus).forEach((key) => {
555
- draft.taskIdsByStatus[key] = draft.taskIdsByStatus[key].filter((id) => !isRemoved(id));
556
- });
557
- Object.keys(draft.taskIdsByDueDate).forEach((key) => {
558
- draft.taskIdsByDueDate[key] = draft.taskIdsByDueDate[key].filter((id) => !isRemoved(id));
559
- });
560
- Object.keys(draft.taskIdsByAssignees).forEach((key) => {
561
- draft.taskIdsByAssignees[key] = draft.taskIdsByAssignees[key].filter((id) => !isRemoved(id));
562
- });
563
- Object.keys(draft.taskIdsByTags).forEach((key) => {
564
- draft.taskIdsByTags[key] = draft.taskIdsByTags[key].filter((id) => !isRemoved(id));
565
- });
566
- };
567
- const toTabData = (grouped) => ({
568
- taskIds: grouped.taskIds,
569
- taskIdsByAssignees: grouped.taskIdsByAssignees,
570
- taskIdsByDueDate: grouped.taskIdsByDueDate,
571
- taskIdsByGroupsIds: grouped.taskIdsByGroupIds,
572
- taskIdsByPriority: grouped.taskIdsGroupedByPriority,
573
- taskIdsByStatus: grouped.taskIdsGroupedByStatus,
574
- taskIdsByTags: grouped.taskIdsByTags,
575
- });
576
- const copyTabDataToTopLevel = (draft, tabData) => {
577
- draft.taskIds = tabData.taskIds;
578
- draft.taskIdsByGroupsIds = tabData.taskIdsByGroupsIds;
579
- draft.taskIdsByPriority = tabData.taskIdsByPriority;
580
- draft.taskIdsByStatus = tabData.taskIdsByStatus;
581
- draft.taskIdsByAssignees = tabData.taskIdsByAssignees;
582
- draft.taskIdsByDueDate = tabData.taskIdsByDueDate;
583
- draft.taskIdsByTags = tabData.taskIdsByTags;
584
- };
585
491
  const getGroupedTaskIds = (tasks) => {
586
492
  const taskIds = [];
587
493
  const taskIdsByGroupIds = {};