@zeniai/client-epic-state 5.1.18-betaAA0 → 5.1.18-betaDI10

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 (386) hide show
  1. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  3. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  4. package/lib/entity/task/taskPayload.d.ts +1 -0
  5. package/lib/entity/task/taskPayload.js +1 -0
  6. package/lib/entity/task/taskReducer.d.ts +5 -1
  7. package/lib/entity/task/taskReducer.js +8 -2
  8. package/lib/entity/task/taskState.d.ts +2 -1
  9. package/lib/entity/tenant/clearAllEpic.d.ts +2 -39
  10. package/lib/entity/tenant/clearAllEpic.js +8 -82
  11. package/lib/entity/tenant/tenantReducer.js +3 -3
  12. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
  13. package/lib/epic.d.ts +4 -31
  14. package/lib/epic.js +4 -32
  15. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  16. package/lib/esm/entity/task/taskPayload.js +1 -0
  17. package/lib/esm/entity/task/taskReducer.js +7 -1
  18. package/lib/esm/entity/tenant/clearAllEpic.js +0 -74
  19. package/lib/esm/entity/tenant/tenantReducer.js +3 -3
  20. package/lib/esm/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
  21. package/lib/esm/epic.js +4 -32
  22. package/lib/esm/index.js +3 -80
  23. package/lib/esm/reducer.js +0 -114
  24. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
  25. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
  26. package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +80 -0
  27. package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +36 -0
  28. package/lib/esm/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
  29. package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  30. package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
  31. package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +37 -0
  32. package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +56 -2
  33. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +21 -9
  34. package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
  35. package/lib/esm/view/taskManager/taskListView/taskList.js +1 -0
  36. package/lib/esm/view/taskManager/taskListView/taskListReducer.js +189 -10
  37. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -0
  38. package/lib/index.d.ts +4 -100
  39. package/lib/index.js +13 -372
  40. package/lib/reducer.d.ts +0 -114
  41. package/lib/reducer.js +12 -126
  42. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
  43. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
  44. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -0
  45. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  46. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  47. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  48. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  49. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  50. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
  51. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +9 -0
  52. package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +84 -0
  53. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +8 -0
  54. package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +40 -0
  55. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
  56. package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
  57. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
  58. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
  59. package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.d.ts +20 -0
  60. package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +41 -0
  61. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +14 -0
  62. package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +14 -2
  63. package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +57 -3
  64. package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +2 -1
  65. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +19 -7
  66. package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
  67. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
  68. package/lib/view/taskManager/taskListView/taskList.js +1 -0
  69. package/lib/view/taskManager/taskListView/taskListPayload.d.ts +4 -0
  70. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -1
  71. package/lib/view/taskManager/taskListView/taskListReducer.js +189 -10
  72. package/lib/view/taskManager/taskListView/taskListSelector.js +1 -0
  73. package/lib/zeniAPI.d.ts +0 -1
  74. package/package.json +1 -1
  75. package/lib/entity/invoicing/coupon/couponReducer.d.ts +0 -12
  76. package/lib/entity/invoicing/coupon/couponReducer.js +0 -33
  77. package/lib/entity/invoicing/creditNote/creditNoteReducer.d.ts +0 -12
  78. package/lib/entity/invoicing/creditNote/creditNoteReducer.js +0 -35
  79. package/lib/entity/invoicing/customer/customerReducer.d.ts +0 -12
  80. package/lib/entity/invoicing/customer/customerReducer.js +0 -33
  81. package/lib/entity/invoicing/dunningCase/dunningCaseReducer.d.ts +0 -12
  82. package/lib/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -35
  83. package/lib/entity/invoicing/invoice/invoiceReducer.d.ts +0 -10
  84. package/lib/entity/invoicing/invoice/invoiceReducer.js +0 -36
  85. package/lib/entity/invoicing/invoice/invoiceSelector.d.ts +0 -5
  86. package/lib/entity/invoicing/invoice/invoiceSelector.js +0 -9
  87. package/lib/entity/invoicing/invoice/invoiceState.d.ts +0 -5
  88. package/lib/entity/invoicing/invoice/invoiceState.js +0 -2
  89. package/lib/entity/invoicing/invoicingTypes.d.ts +0 -766
  90. package/lib/entity/invoicing/invoicingTypes.js +0 -15
  91. package/lib/entity/invoicing/plan/planReducer.d.ts +0 -12
  92. package/lib/entity/invoicing/plan/planReducer.js +0 -33
  93. package/lib/entity/invoicing/product/productReducer.d.ts +0 -12
  94. package/lib/entity/invoicing/product/productReducer.js +0 -33
  95. package/lib/entity/invoicing/subscription/subscriptionReducer.d.ts +0 -12
  96. package/lib/entity/invoicing/subscription/subscriptionReducer.js +0 -35
  97. package/lib/entity/invoicing/transaction/transactionReducer.d.ts +0 -12
  98. package/lib/entity/invoicing/transaction/transactionReducer.js +0 -35
  99. package/lib/esm/entity/invoicing/coupon/couponReducer.js +0 -29
  100. package/lib/esm/entity/invoicing/creditNote/creditNoteReducer.js +0 -31
  101. package/lib/esm/entity/invoicing/customer/customerReducer.js +0 -29
  102. package/lib/esm/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -31
  103. package/lib/esm/entity/invoicing/invoice/invoiceReducer.js +0 -32
  104. package/lib/esm/entity/invoicing/invoice/invoiceSelector.js +0 -4
  105. package/lib/esm/entity/invoicing/invoice/invoiceState.js +0 -1
  106. package/lib/esm/entity/invoicing/invoicingTypes.js +0 -14
  107. package/lib/esm/entity/invoicing/plan/planReducer.js +0 -29
  108. package/lib/esm/entity/invoicing/product/productReducer.js +0 -29
  109. package/lib/esm/entity/invoicing/subscription/subscriptionReducer.js +0 -31
  110. package/lib/esm/entity/invoicing/transaction/transactionReducer.js +0 -31
  111. package/lib/esm/view/invoicing/analyticsView/analyticsViewEpics.js +0 -42
  112. package/lib/esm/view/invoicing/analyticsView/analyticsViewReducer.js +0 -45
  113. package/lib/esm/view/invoicing/analyticsView/analyticsViewSelector.js +0 -10
  114. package/lib/esm/view/invoicing/approvalAction/approvalActionEpic.js +0 -28
  115. package/lib/esm/view/invoicing/approvalAction/approvalActionReducer.js +0 -36
  116. package/lib/esm/view/invoicing/approvalAction/approvalActionSelector.js +0 -5
  117. package/lib/esm/view/invoicing/approvalsView/approvalsViewEpics.js +0 -37
  118. package/lib/esm/view/invoicing/approvalsView/approvalsViewReducer.js +0 -62
  119. package/lib/esm/view/invoicing/approvalsView/approvalsViewSelector.js +0 -8
  120. package/lib/esm/view/invoicing/auditView/auditViewEpics.js +0 -46
  121. package/lib/esm/view/invoicing/auditView/auditViewReducer.js +0 -56
  122. package/lib/esm/view/invoicing/auditView/auditViewSelector.js +0 -8
  123. package/lib/esm/view/invoicing/catalogView/catalogViewEpics.js +0 -143
  124. package/lib/esm/view/invoicing/catalogView/catalogViewReducer.js +0 -162
  125. package/lib/esm/view/invoicing/catalogView/catalogViewSelector.js +0 -31
  126. package/lib/esm/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -34
  127. package/lib/esm/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -39
  128. package/lib/esm/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -6
  129. package/lib/esm/view/invoicing/couponView/couponViewEpics.js +0 -83
  130. package/lib/esm/view/invoicing/couponView/couponViewReducer.js +0 -105
  131. package/lib/esm/view/invoicing/couponView/couponViewSelector.js +0 -18
  132. package/lib/esm/view/invoicing/couponWrite/couponWriteEpic.js +0 -29
  133. package/lib/esm/view/invoicing/couponWrite/couponWriteReducer.js +0 -36
  134. package/lib/esm/view/invoicing/couponWrite/couponWriteSelector.js +0 -5
  135. package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +0 -23
  136. package/lib/esm/view/invoicing/createInvoice/createInvoiceReducer.js +0 -36
  137. package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +0 -5
  138. package/lib/esm/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -87
  139. package/lib/esm/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -105
  140. package/lib/esm/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -20
  141. package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -63
  142. package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -84
  143. package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -7
  144. package/lib/esm/view/invoicing/customerView/customerViewEpics.js +0 -71
  145. package/lib/esm/view/invoicing/customerView/customerViewReducer.js +0 -90
  146. package/lib/esm/view/invoicing/customerView/customerViewSelector.js +0 -17
  147. package/lib/esm/view/invoicing/customerWrite/customerWriteEpic.js +0 -23
  148. package/lib/esm/view/invoicing/customerWrite/customerWriteReducer.js +0 -36
  149. package/lib/esm/view/invoicing/customerWrite/customerWriteSelector.js +0 -5
  150. package/lib/esm/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -41
  151. package/lib/esm/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -73
  152. package/lib/esm/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -5
  153. package/lib/esm/view/invoicing/dataImportView/dataImportViewEpics.js +0 -41
  154. package/lib/esm/view/invoicing/dataImportView/dataImportViewReducer.js +0 -66
  155. package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +0 -6
  156. package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +0 -28
  157. package/lib/esm/view/invoicing/dunningAction/dunningActionReducer.js +0 -36
  158. package/lib/esm/view/invoicing/dunningAction/dunningActionSelector.js +0 -5
  159. package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -85
  160. package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -105
  161. package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -20
  162. package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -50
  163. package/lib/esm/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -42
  164. package/lib/esm/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -5
  165. package/lib/esm/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -20
  166. package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -34
  167. package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -9
  168. package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -1
  169. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -32
  170. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -17
  171. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -55
  172. package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +0 -90
  173. package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +0 -11
  174. package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +0 -1
  175. package/lib/esm/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -37
  176. package/lib/esm/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -33
  177. package/lib/esm/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -5
  178. package/lib/esm/view/invoicing/invoicingApiHelper.js +0 -38
  179. package/lib/esm/view/invoicing/paymentAction/paymentActionEpic.js +0 -28
  180. package/lib/esm/view/invoicing/paymentAction/paymentActionReducer.js +0 -36
  181. package/lib/esm/view/invoicing/paymentAction/paymentActionSelector.js +0 -5
  182. package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +0 -23
  183. package/lib/esm/view/invoicing/recordPayment/recordPaymentReducer.js +0 -36
  184. package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +0 -5
  185. package/lib/esm/view/invoicing/reportsView/reportsViewEpics.js +0 -28
  186. package/lib/esm/view/invoicing/reportsView/reportsViewReducer.js +0 -54
  187. package/lib/esm/view/invoicing/reportsView/reportsViewSelector.js +0 -13
  188. package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +0 -53
  189. package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +0 -69
  190. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +0 -7
  191. package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -28
  192. package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -36
  193. package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -5
  194. package/lib/esm/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -85
  195. package/lib/esm/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -90
  196. package/lib/esm/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -19
  197. package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -25
  198. package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -36
  199. package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -5
  200. package/lib/esm/view/invoicing/transactionView/transactionViewEpics.js +0 -76
  201. package/lib/esm/view/invoicing/transactionView/transactionViewReducer.js +0 -90
  202. package/lib/esm/view/invoicing/transactionView/transactionViewSelector.js +0 -19
  203. package/lib/view/invoicing/analyticsView/analyticsViewEpics.d.ts +0 -7
  204. package/lib/view/invoicing/analyticsView/analyticsViewEpics.js +0 -46
  205. package/lib/view/invoicing/analyticsView/analyticsViewReducer.d.ts +0 -22
  206. package/lib/view/invoicing/analyticsView/analyticsViewReducer.js +0 -49
  207. package/lib/view/invoicing/analyticsView/analyticsViewSelector.d.ts +0 -10
  208. package/lib/view/invoicing/analyticsView/analyticsViewSelector.js +0 -20
  209. package/lib/view/invoicing/approvalAction/approvalActionEpic.d.ts +0 -8
  210. package/lib/view/invoicing/approvalAction/approvalActionEpic.js +0 -32
  211. package/lib/view/invoicing/approvalAction/approvalActionReducer.d.ts +0 -20
  212. package/lib/view/invoicing/approvalAction/approvalActionReducer.js +0 -40
  213. package/lib/view/invoicing/approvalAction/approvalActionSelector.d.ts +0 -3
  214. package/lib/view/invoicing/approvalAction/approvalActionSelector.js +0 -9
  215. package/lib/view/invoicing/approvalsView/approvalsViewEpics.d.ts +0 -7
  216. package/lib/view/invoicing/approvalsView/approvalsViewEpics.js +0 -41
  217. package/lib/view/invoicing/approvalsView/approvalsViewReducer.d.ts +0 -33
  218. package/lib/view/invoicing/approvalsView/approvalsViewReducer.js +0 -66
  219. package/lib/view/invoicing/approvalsView/approvalsViewSelector.d.ts +0 -9
  220. package/lib/view/invoicing/approvalsView/approvalsViewSelector.js +0 -16
  221. package/lib/view/invoicing/auditView/auditViewEpics.d.ts +0 -7
  222. package/lib/view/invoicing/auditView/auditViewEpics.js +0 -50
  223. package/lib/view/invoicing/auditView/auditViewReducer.d.ts +0 -36
  224. package/lib/view/invoicing/auditView/auditViewReducer.js +0 -60
  225. package/lib/view/invoicing/auditView/auditViewSelector.d.ts +0 -9
  226. package/lib/view/invoicing/auditView/auditViewSelector.js +0 -16
  227. package/lib/view/invoicing/catalogView/catalogViewEpics.d.ts +0 -14
  228. package/lib/view/invoicing/catalogView/catalogViewEpics.js +0 -152
  229. package/lib/view/invoicing/catalogView/catalogViewReducer.d.ts +0 -76
  230. package/lib/view/invoicing/catalogView/catalogViewReducer.js +0 -166
  231. package/lib/view/invoicing/catalogView/catalogViewSelector.d.ts +0 -22
  232. package/lib/view/invoicing/catalogView/catalogViewSelector.js +0 -52
  233. package/lib/view/invoicing/catalogWrite/catalogWriteEpic.d.ts +0 -9
  234. package/lib/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -38
  235. package/lib/view/invoicing/catalogWrite/catalogWriteReducer.d.ts +0 -21
  236. package/lib/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -43
  237. package/lib/view/invoicing/catalogWrite/catalogWriteSelector.d.ts +0 -6
  238. package/lib/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -12
  239. package/lib/view/invoicing/couponView/couponViewEpics.d.ts +0 -11
  240. package/lib/view/invoicing/couponView/couponViewEpics.js +0 -90
  241. package/lib/view/invoicing/couponView/couponViewReducer.d.ts +0 -42
  242. package/lib/view/invoicing/couponView/couponViewReducer.js +0 -109
  243. package/lib/view/invoicing/couponView/couponViewSelector.d.ts +0 -14
  244. package/lib/view/invoicing/couponView/couponViewSelector.js +0 -31
  245. package/lib/view/invoicing/couponWrite/couponWriteEpic.d.ts +0 -8
  246. package/lib/view/invoicing/couponWrite/couponWriteEpic.js +0 -33
  247. package/lib/view/invoicing/couponWrite/couponWriteReducer.d.ts +0 -17
  248. package/lib/view/invoicing/couponWrite/couponWriteReducer.js +0 -40
  249. package/lib/view/invoicing/couponWrite/couponWriteSelector.d.ts +0 -4
  250. package/lib/view/invoicing/couponWrite/couponWriteSelector.js +0 -10
  251. package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +0 -8
  252. package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +0 -27
  253. package/lib/view/invoicing/createInvoice/createInvoiceReducer.d.ts +0 -34
  254. package/lib/view/invoicing/createInvoice/createInvoiceReducer.js +0 -40
  255. package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +0 -4
  256. package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +0 -10
  257. package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.d.ts +0 -11
  258. package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -94
  259. package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.d.ts +0 -43
  260. package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -109
  261. package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.d.ts +0 -14
  262. package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -33
  263. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.d.ts +0 -11
  264. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -70
  265. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.d.ts +0 -42
  266. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -88
  267. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.d.ts +0 -10
  268. package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -17
  269. package/lib/view/invoicing/customerView/customerViewEpics.d.ts +0 -10
  270. package/lib/view/invoicing/customerView/customerViewEpics.js +0 -77
  271. package/lib/view/invoicing/customerView/customerViewReducer.d.ts +0 -41
  272. package/lib/view/invoicing/customerView/customerViewReducer.js +0 -94
  273. package/lib/view/invoicing/customerView/customerViewSelector.d.ts +0 -13
  274. package/lib/view/invoicing/customerView/customerViewSelector.js +0 -29
  275. package/lib/view/invoicing/customerWrite/customerWriteEpic.d.ts +0 -8
  276. package/lib/view/invoicing/customerWrite/customerWriteEpic.js +0 -27
  277. package/lib/view/invoicing/customerWrite/customerWriteReducer.d.ts +0 -17
  278. package/lib/view/invoicing/customerWrite/customerWriteReducer.js +0 -40
  279. package/lib/view/invoicing/customerWrite/customerWriteSelector.d.ts +0 -4
  280. package/lib/view/invoicing/customerWrite/customerWriteSelector.js +0 -10
  281. package/lib/view/invoicing/dataImportAction/dataImportActionEpic.d.ts +0 -7
  282. package/lib/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -45
  283. package/lib/view/invoicing/dataImportAction/dataImportActionReducer.d.ts +0 -23
  284. package/lib/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -77
  285. package/lib/view/invoicing/dataImportAction/dataImportActionSelector.d.ts +0 -4
  286. package/lib/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -9
  287. package/lib/view/invoicing/dataImportView/dataImportViewEpics.d.ts +0 -9
  288. package/lib/view/invoicing/dataImportView/dataImportViewEpics.js +0 -47
  289. package/lib/view/invoicing/dataImportView/dataImportViewReducer.d.ts +0 -15
  290. package/lib/view/invoicing/dataImportView/dataImportViewReducer.js +0 -70
  291. package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +0 -9
  292. package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +0 -15
  293. package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +0 -8
  294. package/lib/view/invoicing/dunningAction/dunningActionEpic.js +0 -32
  295. package/lib/view/invoicing/dunningAction/dunningActionReducer.d.ts +0 -21
  296. package/lib/view/invoicing/dunningAction/dunningActionReducer.js +0 -40
  297. package/lib/view/invoicing/dunningAction/dunningActionSelector.d.ts +0 -3
  298. package/lib/view/invoicing/dunningAction/dunningActionSelector.js +0 -9
  299. package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.d.ts +0 -11
  300. package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -92
  301. package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.d.ts +0 -42
  302. package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -109
  303. package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.d.ts +0 -14
  304. package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -33
  305. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +0 -9
  306. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -55
  307. package/lib/view/invoicing/invoiceAction/invoiceActionReducer.d.ts +0 -26
  308. package/lib/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -46
  309. package/lib/view/invoicing/invoiceAction/invoiceActionSelector.d.ts +0 -3
  310. package/lib/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -9
  311. package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.d.ts +0 -8
  312. package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -24
  313. package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.d.ts +0 -11
  314. package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -38
  315. package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +0 -5
  316. package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -14
  317. package/lib/view/invoicing/invoiceDetail/invoiceDetailState.d.ts +0 -4
  318. package/lib/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -2
  319. package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.d.ts +0 -7
  320. package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -36
  321. package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.d.ts +0 -7
  322. package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -21
  323. package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.d.ts +0 -8
  324. package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -59
  325. package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +0 -22
  326. package/lib/view/invoicing/invoiceList/invoiceListReducer.js +0 -94
  327. package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +0 -11
  328. package/lib/view/invoicing/invoiceList/invoiceListSelector.js +0 -21
  329. package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +0 -25
  330. package/lib/view/invoicing/invoiceList/invoiceListState.js +0 -2
  331. package/lib/view/invoicing/invoicePdf/invoicePdfEpic.d.ts +0 -7
  332. package/lib/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -41
  333. package/lib/view/invoicing/invoicePdf/invoicePdfReducer.d.ts +0 -20
  334. package/lib/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -37
  335. package/lib/view/invoicing/invoicePdf/invoicePdfSelector.d.ts +0 -3
  336. package/lib/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -9
  337. package/lib/view/invoicing/invoicingApiHelper.d.ts +0 -22
  338. package/lib/view/invoicing/invoicingApiHelper.js +0 -44
  339. package/lib/view/invoicing/paymentAction/paymentActionEpic.d.ts +0 -8
  340. package/lib/view/invoicing/paymentAction/paymentActionEpic.js +0 -32
  341. package/lib/view/invoicing/paymentAction/paymentActionReducer.d.ts +0 -21
  342. package/lib/view/invoicing/paymentAction/paymentActionReducer.js +0 -40
  343. package/lib/view/invoicing/paymentAction/paymentActionSelector.d.ts +0 -3
  344. package/lib/view/invoicing/paymentAction/paymentActionSelector.js +0 -9
  345. package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +0 -8
  346. package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +0 -27
  347. package/lib/view/invoicing/recordPayment/recordPaymentReducer.d.ts +0 -32
  348. package/lib/view/invoicing/recordPayment/recordPaymentReducer.js +0 -40
  349. package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +0 -4
  350. package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +0 -10
  351. package/lib/view/invoicing/reportsView/reportsViewEpics.d.ts +0 -7
  352. package/lib/view/invoicing/reportsView/reportsViewEpics.js +0 -32
  353. package/lib/view/invoicing/reportsView/reportsViewReducer.d.ts +0 -20
  354. package/lib/view/invoicing/reportsView/reportsViewReducer.js +0 -58
  355. package/lib/view/invoicing/reportsView/reportsViewSelector.d.ts +0 -12
  356. package/lib/view/invoicing/reportsView/reportsViewSelector.js +0 -24
  357. package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +0 -10
  358. package/lib/view/invoicing/settingsView/settingsViewEpics.js +0 -60
  359. package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +0 -12
  360. package/lib/view/invoicing/settingsView/settingsViewReducer.js +0 -73
  361. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +0 -7
  362. package/lib/view/invoicing/settingsView/settingsViewSelector.js +0 -14
  363. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +0 -8
  364. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -32
  365. package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.d.ts +0 -21
  366. package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -40
  367. package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.d.ts +0 -3
  368. package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -9
  369. package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.d.ts +0 -10
  370. package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -91
  371. package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.d.ts +0 -44
  372. package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -94
  373. package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.d.ts +0 -13
  374. package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -31
  375. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.d.ts +0 -8
  376. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -29
  377. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.d.ts +0 -17
  378. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -40
  379. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.d.ts +0 -4
  380. package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -10
  381. package/lib/view/invoicing/transactionView/transactionViewEpics.d.ts +0 -10
  382. package/lib/view/invoicing/transactionView/transactionViewEpics.js +0 -82
  383. package/lib/view/invoicing/transactionView/transactionViewReducer.d.ts +0 -43
  384. package/lib/view/invoicing/transactionView/transactionViewReducer.js +0 -94
  385. package/lib/view/invoicing/transactionView/transactionViewSelector.d.ts +0 -13
  386. package/lib/view/invoicing/transactionView/transactionViewSelector.js +0 -31
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSubTaskEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const formatMinutesToFromHHMM_1 = require("../../../../commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM");
7
+ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
8
+ const taskReducer_1 = require("../../../../entity/task/taskReducer");
9
+ const taskSelector_1 = require("../../../../entity/task/taskSelector");
10
+ const responsePayload_1 = require("../../../../responsePayload");
11
+ const taskListReducer_1 = require("../../taskListView/taskListReducer");
12
+ const taskDetailReducer_1 = require("../taskDetailReducer");
13
+ const createSubTaskEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.createSubTask.match), (0, operators_1.mergeMap)((action) => {
14
+ const state = state$.value;
15
+ const parentTask = (0, taskSelector_1.getTaskById)(state.taskState, action.payload.parentTaskId);
16
+ const parentTaskGroupId = parentTask?.taskGroupIds[0];
17
+ const isTaskListFetched = state.taskListState.fetchState === 'Completed';
18
+ const payload = prepareSubTaskPayload(action.payload, parentTaskGroupId);
19
+ return zeniAPI
20
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload)
21
+ .pipe((0, operators_1.mergeMap)((response) => {
22
+ if ((0, responsePayload_1.isSuccessResponse)(response) &&
23
+ response.data != null &&
24
+ response.data.tasks.length > 0) {
25
+ const newTaskId = response.data.tasks[0].task_id;
26
+ const actions = [
27
+ (0, taskReducer_1.updateTasks)(response.data.tasks),
28
+ (0, taskReducer_1.appendSubTaskId)({
29
+ parentTaskId: action.payload.parentTaskId,
30
+ subTaskId: newTaskId,
31
+ }),
32
+ (0, taskDetailReducer_1.createSubTaskSuccessOrFailure)({
33
+ fetchState: 'Completed',
34
+ newTaskId,
35
+ }),
36
+ (0, snackbarReducer_1.openSnackbar)({
37
+ messageSection: 'create_sub_task',
38
+ messageText: 'success',
39
+ type: 'success',
40
+ }),
41
+ ];
42
+ if (isTaskListFetched === true && parentTaskGroupId != null) {
43
+ actions.push((0, taskListReducer_1.updateTaskListOnNewTaskCreationSuccess)({
44
+ taskGroupId: parentTaskGroupId,
45
+ task: response.data.tasks[0],
46
+ }));
47
+ }
48
+ return (0, rxjs_1.from)(actions);
49
+ }
50
+ else {
51
+ return (0, rxjs_1.of)((0, taskDetailReducer_1.createSubTaskSuccessOrFailure)({
52
+ fetchState: 'Error',
53
+ error: response.status,
54
+ }), (0, snackbarReducer_1.openSnackbar)({
55
+ messageSection: 'create_sub_task',
56
+ messageText: 'failed',
57
+ type: 'error',
58
+ variables: [
59
+ {
60
+ variableName: '_api-error_',
61
+ variableValue: response.status.message,
62
+ },
63
+ ],
64
+ }));
65
+ }
66
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, taskDetailReducer_1.createSubTaskSuccessOrFailure)({
67
+ fetchState: 'Error',
68
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Create Sub Task REST API call errored out' +
69
+ JSON.stringify(error)),
70
+ }))));
71
+ }));
72
+ exports.createSubTaskEpic = createSubTaskEpic;
73
+ const prepareSubTaskPayload = (subTask, parentTaskGroupId) => ({
74
+ name: subTask.name,
75
+ assignees: subTask.assignee,
76
+ description: subTask.description,
77
+ priority: subTask.priority,
78
+ status: subTask.status,
79
+ tags: subTask.tagIds,
80
+ time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(subTask.timeSpent),
81
+ group_assignees: subTask.groupAssignees,
82
+ parent_task_id: subTask.parentTaskId,
83
+ task_group_ids: parentTaskGroupId == null ? [] : [parentTaskGroupId],
84
+ });
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateTasks } from '../../../../entity/task/taskReducer';
4
+ import { RootState } from '../../../../reducer';
5
+ import { ZeniAPI } from '../../../../zeniAPI';
6
+ import { fetchSubTasks, updateSubTasks, updateSubTasksFetchStatus } from '../taskDetailReducer';
7
+ export type ActionType = ReturnType<typeof fetchSubTasks> | ReturnType<typeof updateTasks> | ReturnType<typeof updateSubTasks> | ReturnType<typeof updateSubTasksFetchStatus>;
8
+ export declare const fetchSubTasksEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchSubTasksEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const taskReducer_1 = require("../../../../entity/task/taskReducer");
7
+ const responsePayload_1 = require("../../../../responsePayload");
8
+ const taskDetailReducer_1 = require("../taskDetailReducer");
9
+ const fetchSubTasksEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.fetchSubTasks.match), (0, operators_1.switchMap)((action) => {
10
+ const { parentTaskId } = action.payload;
11
+ const query = JSON.stringify({
12
+ task_type: 'subtasks',
13
+ parent_task_id: parentTaskId,
14
+ });
15
+ return zeniAPI
16
+ .getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(query)}`)
17
+ .pipe((0, operators_1.mergeMap)((response) => {
18
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
19
+ const { tasks } = response.data;
20
+ return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(tasks), (0, taskDetailReducer_1.updateSubTasks)({
21
+ parentTaskId,
22
+ }));
23
+ }
24
+ else {
25
+ return (0, rxjs_1.of)((0, taskDetailReducer_1.updateSubTasksFetchStatus)({
26
+ parentTaskId,
27
+ fetchState: 'Error',
28
+ error: response.status,
29
+ }));
30
+ }
31
+ }), (0, operators_1.catchError)((error) => {
32
+ return (0, rxjs_1.of)((0, taskDetailReducer_1.updateSubTasksFetchStatus)({
33
+ parentTaskId,
34
+ fetchState: 'Error',
35
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Sub Tasks REST API call errored out' +
36
+ JSON.stringify(error)),
37
+ }));
38
+ }));
39
+ }));
40
+ exports.fetchSubTasksEpic = fetchSubTasksEpic;
@@ -6,6 +6,7 @@ import { updateTasks } from '../../../../entity/task/taskReducer';
6
6
  import { RootState } from '../../../../reducer';
7
7
  import { ZeniAPI } from '../../../../zeniAPI';
8
8
  import { fetchFileList } from '../../../fileView/fileViewReducer';
9
+ import { updateTaskListOnNewTaskCreationSuccess } from '../../taskListView/taskListReducer';
9
10
  import { fetchTaskDetail, initializeTaskToLocalStore, removeTaskDetail, updateEditTaskFetchStatus } from '../taskDetailReducer';
10
- export type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateTags> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList> | ReturnType<typeof openSnackbar>;
11
+ export type ActionType = ReturnType<typeof fetchTaskDetail> | ReturnType<typeof updateTags> | ReturnType<typeof updateEditTaskFetchStatus> | ReturnType<typeof removeTaskDetail> | ReturnType<typeof updateTasks> | ReturnType<typeof initializeTaskToLocalStore> | ReturnType<typeof fetchFileList> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateTaskListOnNewTaskCreationSuccess>;
11
12
  export declare const fetchTaskDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -10,13 +10,16 @@ const operators_1 = require("rxjs/operators");
10
10
  const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
11
11
  const tagReducer_1 = require("../../../../entity/tag/tagReducer");
12
12
  const taskReducer_1 = require("../../../../entity/task/taskReducer");
13
+ const taskSelector_1 = require("../../../../entity/task/taskSelector");
13
14
  const responsePayload_1 = require("../../../../responsePayload");
14
15
  const fileViewReducer_1 = require("../../../fileView/fileViewReducer");
16
+ const taskListReducer_1 = require("../../taskListView/taskListReducer");
15
17
  const taskDetailReducer_1 = require("../taskDetailReducer");
16
18
  const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(taskDetailReducer_1.fetchTaskDetail.match), (0, operators_1.mergeMap)((action) => {
17
19
  const { taskId, cacheOverride } = action.payload;
18
20
  const taskActions = [];
19
21
  const state = state$.value;
22
+ const isTaskListFetched = state.taskListState.fetchState === 'Completed';
20
23
  const taskDetail = (0, get_1.default)(state.taskDetailState.editTaskStateById, taskId, undefined);
21
24
  if (cacheOverride === true) {
22
25
  taskActions.push((0, taskDetailReducer_1.removeTaskDetail)(taskId));
@@ -38,6 +41,16 @@ const fetchTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
38
41
  (0, tagReducer_1.updateTags)(response.data.tasks.map((task) => task.tags).flat()),
39
42
  (0, taskDetailReducer_1.initializeTaskToLocalStore)(taskId),
40
43
  ];
44
+ if (isTaskListFetched === true) {
45
+ const taskGroupId = response.data.tasks[0].task_group_ids?.[0];
46
+ if (taskGroupId != null) {
47
+ fetchActions.push((0, taskListReducer_1.updateTaskListOnNewTaskCreationSuccess)({
48
+ taskGroupId,
49
+ task: response.data.tasks[0],
50
+ currentTaskState: (0, taskSelector_1.getTaskById)(state.taskState, taskId),
51
+ }));
52
+ }
53
+ }
41
54
  const fileIds = response.data.tasks[0].file_ids;
42
55
  if (fileIds.length > 0) {
43
56
  fetchActions.push((0, fileViewReducer_1.fetchFileList)(fileIds));
@@ -34,6 +34,7 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
34
34
  recurringStartDate: task.recurringStartDate,
35
35
  timeSpent: task.timeSpent,
36
36
  isPrivate: task.isPrivate,
37
+ taskGroupId: task.taskGroupIds[0],
37
38
  };
38
39
  const actions = [
39
40
  (0, taskDetailReducer_1.saveTaskUpdatesToLocalStore)({ taskDetailLocalData, taskId }),
@@ -15,10 +15,26 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
15
15
  const { taskId, taskGroupId } = action.payload;
16
16
  const state = state$.value;
17
17
  const isTaskListFetched = state.taskListState.fetchState === 'Completed';
18
+ // For an edit, prefer the locally-edited group (Bug 12). If absent,
19
+ // fall back to the entity's current group. For a create, use the
20
+ // taskGroupId from the action payload.
21
+ const localTaskGroupId = taskId != null
22
+ ? state.taskDetailState.editTaskStateById[taskId]?.taskDetailLocalData
23
+ .taskGroupId
24
+ : undefined;
25
+ // Distinguish three cases (PR #3101 review):
26
+ // - create (taskId == null): use the action payload group.
27
+ // - edit, group cleared (localTaskGroupId === null): send [] so
28
+ // the backend persists the cleared selection. The `??` fallback
29
+ // would resurrect the stale entity value otherwise.
30
+ // - edit, group untouched (localTaskGroupId === undefined): use
31
+ // the entity's current group.
32
+ const groupWasCleared = taskId != null && localTaskGroupId === null;
18
33
  const updatedTaskGroupId = taskId == null
19
34
  ? taskGroupId
20
- : (0, taskSelector_1.getTaskById)(state.taskState, taskId)?.taskGroupIds[0];
21
- const payload = prepareTaskPayload(state, taskId, updatedTaskGroupId);
35
+ : (localTaskGroupId ??
36
+ (0, taskSelector_1.getTaskById)(state.taskState, taskId)?.taskGroupIds[0]);
37
+ const payload = prepareTaskPayload(state, taskId, updatedTaskGroupId, groupWasCleared);
22
38
  const saveTaskApi = taskId != null
23
39
  ? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}`, payload)
24
40
  : zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks`, payload);
@@ -71,7 +87,7 @@ const saveTaskDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
71
87
  }))));
72
88
  }));
73
89
  exports.saveTaskDetailEpic = saveTaskDetailEpic;
74
- const prepareTaskPayload = (state, taskId, taskGroupId) => {
90
+ const prepareTaskPayload = (state, taskId, taskGroupId, groupWasCleared = false) => {
75
91
  const { taskDetailState, taskState } = state;
76
92
  const syncToken = taskId != null ? ((0, taskSelector_1.getTaskById)(taskState, taskId)?.syncToken ?? '') : '';
77
93
  const sourceState = taskId != null
@@ -100,7 +116,11 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
100
116
  ? (localData.recurringDaysOfWeek ?? [])
101
117
  : [],
102
118
  sync_token: syncToken,
103
- task_group_ids: taskGroupId != null ? [taskGroupId] : [],
119
+ task_group_ids: groupWasCleared
120
+ ? []
121
+ : taskGroupId != null
122
+ ? [taskGroupId]
123
+ : [],
104
124
  time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
105
125
  group_assignees: localData.groupAssignees,
106
126
  ...(taskId == null ? { is_private: localData.isPrivate ?? false } : {}),
@@ -0,0 +1,20 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../../reducer';
3
+ import { ZeniAPI } from '../../../../zeniAPI';
4
+ /**
5
+ * Fire-and-forget action — dispatched by the task-comments UI when a comment
6
+ * is created with @-mentions. The epic POSTs to task-manager's
7
+ * `/comment-mention-notification` endpoint which fans out Slack DMs to each
8
+ * mentioned internal user.
9
+ *
10
+ * Result is intentionally not captured in redux state: comment creation
11
+ * itself is owned by Liveblocks, and a network failure on the notification
12
+ * should not surface in the UI (the comment is still persisted in Liveblocks).
13
+ */
14
+ export declare const sendCommentMentionNotification: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId: string, mentionedUserIds: string[], performedById: string], {
15
+ taskId: string;
16
+ mentionedUserIds: string[];
17
+ performedById: string;
18
+ }, "taskDetailView/sendCommentMentionNotification", never, never>;
19
+ export type ActionType = ReturnType<typeof sendCommentMentionNotification>;
20
+ export declare const sendCommentMentionNotificationEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<unknown>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendCommentMentionNotificationEpic = exports.sendCommentMentionNotification = void 0;
4
+ const toolkit_1 = require("@reduxjs/toolkit");
5
+ const rxjs_1 = require("rxjs");
6
+ const operators_1 = require("rxjs/operators");
7
+ /**
8
+ * Fire-and-forget action — dispatched by the task-comments UI when a comment
9
+ * is created with @-mentions. The epic POSTs to task-manager's
10
+ * `/comment-mention-notification` endpoint which fans out Slack DMs to each
11
+ * mentioned internal user.
12
+ *
13
+ * Result is intentionally not captured in redux state: comment creation
14
+ * itself is owned by Liveblocks, and a network failure on the notification
15
+ * should not surface in the UI (the comment is still persisted in Liveblocks).
16
+ */
17
+ exports.sendCommentMentionNotification = (0, toolkit_1.createAction)('taskDetailView/sendCommentMentionNotification', (taskId, mentionedUserIds, performedById) => ({
18
+ payload: { taskId, mentionedUserIds, performedById },
19
+ }));
20
+ const sendCommentMentionNotificationEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(exports.sendCommentMentionNotification.match), (0, operators_1.mergeMap)((action) => handleSendCommentMentionNotification(action.payload, zeniAPI)));
21
+ exports.sendCommentMentionNotificationEpic = sendCommentMentionNotificationEpic;
22
+ const handleSendCommentMentionNotification = ({ taskId, mentionedUserIds, performedById, }, zeniAPI) => {
23
+ // Short-circuit when there's nothing to send. Avoids a useless round-trip
24
+ // (server would also short-circuit with a 200/no-op, but we may as well
25
+ // not enqueue the request at all).
26
+ if (mentionedUserIds.length === 0) {
27
+ return rxjs_1.EMPTY;
28
+ }
29
+ const url = `${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks/${taskId}/comment-mention-notification`;
30
+ const request$ = zeniAPI.postAndGetJSON(url, {
31
+ mentioned_user_ids: mentionedUserIds,
32
+ performed_by_id: performedById,
33
+ });
34
+ return request$.pipe((0, operators_1.mergeMap)(() => {
35
+ // Liveblocks owns the comment itself; the Slack fan-out is
36
+ // best-effort and intentionally silent. We swallow both
37
+ // non-success responses and network errors so a Slack outage
38
+ // does not pollute the dev console for every @-mention.
39
+ return rxjs_1.EMPTY;
40
+ }), (0, operators_1.catchError)(() => (0, rxjs_1.of)()));
41
+ };
@@ -3,9 +3,22 @@ import { DayOfWeek, PriorityCodeType, TaskStatusCodeType, TaskType } from '../..
3
3
  import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { RecurringDatePickerOptions, RecurringFrequencyType } from '../../common/recurringViewHelper';
5
5
  import { CommonHistoryView } from '../../spendManagement/commonHistoryView/commonHistory';
6
+ export interface CreateSubTaskPayload {
7
+ assignee: ID[];
8
+ description: string;
9
+ groupAssignees: ID[];
10
+ name: string;
11
+ parentTaskId: ID;
12
+ priority: PriorityCodeType;
13
+ status: TaskStatusCodeType;
14
+ tagIds: ID[];
15
+ timeSpent: string;
16
+ }
6
17
  export interface TaskDetailViewState {
7
18
  editTaskStateById: Record<ID, EditTaskDetail>;
8
19
  newTaskState: EditTaskDetail;
20
+ subTaskCreateStatus: FetchStateAndError;
21
+ subTaskListFetchStatusByParentId: Record<ID, FetchStateAndError>;
9
22
  taskHistoryById: Record<ID, CommonHistoryView>;
10
23
  }
11
24
  export interface EditTaskDetail {
@@ -40,6 +53,7 @@ export interface EditTaskLocalData {
40
53
  recurringStartDate?: ZeniDate;
41
54
  savedRecurringEndDate?: ZeniDate;
42
55
  savedRecurringTasksCount?: number;
56
+ taskGroupId?: ID;
43
57
  }
44
58
  export declare const initialTaskDetailLocalData: EditTaskLocalData;
45
59
  export declare const initialTaskDetail: EditTaskDetail;
@@ -1,7 +1,7 @@
1
1
  import { FetchState, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniAPIStatus } from '../../../responsePayload';
3
3
  import { HistoricEventPayload } from '../../spendManagement/commonHistoryView/commonHistoryPayload';
4
- import { EditTaskLocalData, TaskDetailViewState } from './taskDetail';
4
+ import { CreateSubTaskPayload, EditTaskLocalData, TaskDetailViewState } from './taskDetail';
5
5
  export declare const initialState: TaskDetailViewState;
6
6
  export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride: boolean, taskId?: string | undefined], {
7
7
  cacheOverride: boolean;
@@ -34,7 +34,19 @@ export declare const fetchTaskDetailPage: import("@reduxjs/toolkit").ActionCreat
34
34
  error?: ZeniAPIStatus;
35
35
  newTaskId?: ID;
36
36
  taskId?: ID;
37
- }, "taskDetailView/saveTaskSuccessOrFailure">, deleteTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId?: string | undefined], {
37
+ }, "taskDetailView/saveTaskSuccessOrFailure">, createSubTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: CreateSubTaskPayload], CreateSubTaskPayload, "taskDetailView/createSubTask", never, never>, createSubTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
38
+ fetchState: FetchState;
39
+ error?: ZeniAPIStatus;
40
+ newTaskId?: ID;
41
+ }, "taskDetailView/createSubTaskSuccessOrFailure">, resetSubTaskCreateStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"taskDetailView/resetSubTaskCreateStatus">, fetchSubTasks: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[parentTaskId: string], {
42
+ parentTaskId: string;
43
+ }, "taskDetailView/fetchSubTasks", never, never>, updateSubTasks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
+ parentTaskId: ID;
45
+ }, "taskDetailView/updateSubTasks">, updateSubTasksFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
46
+ fetchState: FetchState;
47
+ parentTaskId: ID;
48
+ error?: ZeniAPIStatus;
49
+ }, "taskDetailView/updateSubTasksFetchStatus">, deleteTask: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskId?: string | undefined], {
38
50
  taskId: string | undefined;
39
51
  }, "taskDetailView/deleteTask", never, never>, removeTaskDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "taskDetailView/removeTaskDetail">, deleteTaskSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
40
52
  fetchState: FetchState;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  var _a;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.updateDeletedTagToLocalStore = exports.updateCreatedTagToLocalStore = exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.unsnoozeTask = exports.snoozeTaskSuccessOrFailure = exports.snoozeTask = exports.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.saveTaskSuccessOrFailure = exports.archiveTaskSuccessOrFailure = exports.archiveTask = exports.saveTaskDetail = exports.discardTaskUpdatesInLocalStore = exports.saveTaskUpdatesToLocalStore = exports.updateEditTaskFetchStatus = exports.initializeTaskToLocalStore = exports.fetchTaskDetail = exports.fetchTaskDetailPage = exports.initialState = void 0;
7
+ exports.updateDeletedTagToLocalStore = exports.updateCreatedTagToLocalStore = exports.clearTaskDetail = exports.updateTaskHistoryFetchStatus = exports.updateTaskHistory = exports.fetchTaskHistory = exports.unsnoozeTask = exports.snoozeTaskSuccessOrFailure = exports.snoozeTask = exports.deleteTaskSuccessOrFailure = exports.removeTaskDetail = exports.deleteTask = exports.updateSubTasksFetchStatus = exports.updateSubTasks = exports.fetchSubTasks = exports.resetSubTaskCreateStatus = exports.createSubTaskSuccessOrFailure = exports.createSubTask = exports.saveTaskSuccessOrFailure = exports.archiveTaskSuccessOrFailure = exports.archiveTask = exports.saveTaskDetail = exports.discardTaskUpdatesInLocalStore = exports.saveTaskUpdatesToLocalStore = exports.updateEditTaskFetchStatus = exports.initializeTaskToLocalStore = exports.fetchTaskDetail = exports.fetchTaskDetailPage = exports.initialState = void 0;
8
8
  const toolkit_1 = require("@reduxjs/toolkit");
9
9
  const get_1 = __importDefault(require("lodash/get"));
10
10
  const commonHistory_1 = require("../../spendManagement/commonHistoryView/commonHistory");
@@ -13,6 +13,11 @@ const taskDetail_1 = require("./taskDetail");
13
13
  exports.initialState = {
14
14
  newTaskState: taskDetail_1.initialTaskDetail,
15
15
  editTaskStateById: {},
16
+ subTaskCreateStatus: {
17
+ fetchState: 'Not-Started',
18
+ error: undefined,
19
+ },
20
+ subTaskListFetchStatusByParentId: {},
16
21
  taskHistoryById: {},
17
22
  };
18
23
  const taskDetailView = (0, toolkit_1.createSlice)({
@@ -57,7 +62,7 @@ const taskDetailView = (0, toolkit_1.createSlice)({
57
62
  updateEditTaskFetchStatus(draft, action) {
58
63
  const { taskId, fetchState, error } = action.payload;
59
64
  draft.editTaskStateById[taskId] = {
60
- ...draft.editTaskStateById[taskId],
65
+ ...(draft.editTaskStateById[taskId] ?? taskDetail_1.initialTaskDetail),
61
66
  fetchTaskStatus: {
62
67
  fetchState,
63
68
  error: fetchState === 'Error' ? error : undefined,
@@ -325,10 +330,59 @@ const taskDetailView = (0, toolkit_1.createSlice)({
325
330
  error,
326
331
  };
327
332
  },
333
+ createSubTask: {
334
+ reducer(draft) {
335
+ draft.subTaskCreateStatus = {
336
+ fetchState: 'In-Progress',
337
+ error: undefined,
338
+ };
339
+ },
340
+ prepare(payload) {
341
+ return { payload };
342
+ },
343
+ },
344
+ createSubTaskSuccessOrFailure(draft, action) {
345
+ const { fetchState, error } = action.payload;
346
+ draft.subTaskCreateStatus = {
347
+ fetchState,
348
+ error,
349
+ };
350
+ },
351
+ resetSubTaskCreateStatus(draft) {
352
+ draft.subTaskCreateStatus = {
353
+ ...exports.initialState.subTaskCreateStatus,
354
+ };
355
+ },
356
+ fetchSubTasks: {
357
+ reducer(draft, action) {
358
+ const { parentTaskId } = action.payload;
359
+ draft.subTaskListFetchStatusByParentId[parentTaskId] = {
360
+ fetchState: 'In-Progress',
361
+ error: undefined,
362
+ };
363
+ },
364
+ prepare(parentTaskId) {
365
+ return { payload: { parentTaskId } };
366
+ },
367
+ },
368
+ updateSubTasks(draft, action) {
369
+ const { parentTaskId } = action.payload;
370
+ draft.subTaskListFetchStatusByParentId[parentTaskId] = {
371
+ fetchState: 'Completed',
372
+ error: undefined,
373
+ };
374
+ },
375
+ updateSubTasksFetchStatus(draft, action) {
376
+ const { parentTaskId, fetchState, error } = action.payload;
377
+ draft.subTaskListFetchStatusByParentId[parentTaskId] = {
378
+ fetchState,
379
+ error,
380
+ };
381
+ },
328
382
  clearTaskDetail(draft) {
329
383
  Object.assign(draft, exports.initialState);
330
384
  },
331
385
  },
332
386
  });
333
- _a = taskDetailView.actions, exports.fetchTaskDetailPage = _a.fetchTaskDetailPage, exports.fetchTaskDetail = _a.fetchTaskDetail, exports.initializeTaskToLocalStore = _a.initializeTaskToLocalStore, exports.updateEditTaskFetchStatus = _a.updateEditTaskFetchStatus, exports.saveTaskUpdatesToLocalStore = _a.saveTaskUpdatesToLocalStore, exports.discardTaskUpdatesInLocalStore = _a.discardTaskUpdatesInLocalStore, exports.saveTaskDetail = _a.saveTaskDetail, exports.archiveTask = _a.archiveTask, exports.archiveTaskSuccessOrFailure = _a.archiveTaskSuccessOrFailure, exports.saveTaskSuccessOrFailure = _a.saveTaskSuccessOrFailure, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.snoozeTask = _a.snoozeTask, exports.snoozeTaskSuccessOrFailure = _a.snoozeTaskSuccessOrFailure, exports.unsnoozeTask = _a.unsnoozeTask, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail, exports.updateCreatedTagToLocalStore = _a.updateCreatedTagToLocalStore, exports.updateDeletedTagToLocalStore = _a.updateDeletedTagToLocalStore;
387
+ _a = taskDetailView.actions, exports.fetchTaskDetailPage = _a.fetchTaskDetailPage, exports.fetchTaskDetail = _a.fetchTaskDetail, exports.initializeTaskToLocalStore = _a.initializeTaskToLocalStore, exports.updateEditTaskFetchStatus = _a.updateEditTaskFetchStatus, exports.saveTaskUpdatesToLocalStore = _a.saveTaskUpdatesToLocalStore, exports.discardTaskUpdatesInLocalStore = _a.discardTaskUpdatesInLocalStore, exports.saveTaskDetail = _a.saveTaskDetail, exports.archiveTask = _a.archiveTask, exports.archiveTaskSuccessOrFailure = _a.archiveTaskSuccessOrFailure, exports.saveTaskSuccessOrFailure = _a.saveTaskSuccessOrFailure, exports.createSubTask = _a.createSubTask, exports.createSubTaskSuccessOrFailure = _a.createSubTaskSuccessOrFailure, exports.resetSubTaskCreateStatus = _a.resetSubTaskCreateStatus, exports.fetchSubTasks = _a.fetchSubTasks, exports.updateSubTasks = _a.updateSubTasks, exports.updateSubTasksFetchStatus = _a.updateSubTasksFetchStatus, exports.deleteTask = _a.deleteTask, exports.removeTaskDetail = _a.removeTaskDetail, exports.deleteTaskSuccessOrFailure = _a.deleteTaskSuccessOrFailure, exports.snoozeTask = _a.snoozeTask, exports.snoozeTaskSuccessOrFailure = _a.snoozeTaskSuccessOrFailure, exports.unsnoozeTask = _a.unsnoozeTask, exports.fetchTaskHistory = _a.fetchTaskHistory, exports.updateTaskHistory = _a.updateTaskHistory, exports.updateTaskHistoryFetchStatus = _a.updateTaskHistoryFetchStatus, exports.clearTaskDetail = _a.clearTaskDetail, exports.updateCreatedTagToLocalStore = _a.updateCreatedTagToLocalStore, exports.updateDeletedTagToLocalStore = _a.updateDeletedTagToLocalStore;
334
388
  exports.default = taskDetailView.reducer;
@@ -2,7 +2,7 @@ import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { Class } from '../../../entity/class/classState';
4
4
  import { File } from '../../../entity/file/fileState';
5
- import { TaskPriority, TaskStatus } from '../../../entity/task/taskState';
5
+ import { Task, TaskPriority, TaskStatus } from '../../../entity/task/taskState';
6
6
  import { RootState } from '../../../reducer';
7
7
  import { ZeniDate } from '../../../zeniDayJS';
8
8
  import { UserAndRole } from '../../companyView/types/userAndRole';
@@ -14,6 +14,7 @@ export interface TaskDetailSelectorView extends SelectorView {
14
14
  deleteFileStatusById: Record<ID, FetchStateAndError | undefined>;
15
15
  files: File[];
16
16
  showTaskDetailFormFooter: boolean;
17
+ subtasks: Task[];
17
18
  taskDetailView: EditTaskDetail;
18
19
  taskHistory: HistoricEvent[];
19
20
  updateFileStatusById: Record<ID, FetchStateAndError | undefined>;
@@ -33,8 +33,13 @@ const getTaskDetail = (state, taskId) => {
33
33
  let recurringSourceTaskId = undefined;
34
34
  let snoozedUntil = undefined;
35
35
  let taskGroupId = undefined;
36
+ let subtasks = [];
36
37
  if (taskId != null && sourceTaskDetail != null) {
37
38
  const taskEntity = (0, taskSelector_1.getTaskById)(taskState, taskId);
39
+ subtasks =
40
+ taskEntity != null
41
+ ? (0, taskSelector_1.getTasksByIds)(taskState, taskEntity.subTasksIds)
42
+ : [];
38
43
  const fileIdsInEntity = taskEntity?.fileIds ?? [];
39
44
  if (taskEntity != null) {
40
45
  createdByUser = (0, userAndRole_1.getUserAndUserRole)(userState, userRoleState, addressState, taskEntity.createdBy);
@@ -45,25 +50,27 @@ const getTaskDetail = (state, taskId) => {
45
50
  taskGroupId = taskEntity.taskGroupIds[0];
46
51
  }
47
52
  if (fileIdsInEntity.length > 0) {
48
- fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
53
+ fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
49
54
  fileViewState.fetchFilesStatus,
50
55
  sourceTaskDetail.fetchTaskStatus,
51
56
  userList,
52
57
  classListState,
58
+ taskDetailState.subTaskListFetchStatusByParentId[taskId] ?? fetchStatus,
53
59
  ]);
54
60
  }
55
61
  else {
56
- fetchStatus = (0, reduceFetchState_1.reduceFetchState)([
62
+ fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
57
63
  sourceTaskDetail.fetchTaskStatus,
58
64
  userList,
59
65
  classListState,
66
+ taskDetailState.subTaskListFetchStatusByParentId[taskId] ?? fetchStatus,
60
67
  ]);
61
68
  }
62
69
  showTaskDetailFormFooter = showFormFooter(sourceTaskDetail.taskDetailLocalData, taskEntity);
63
70
  taskHistory = taskDetailState.taskHistoryById[taskId]?.historicEvents ?? [];
64
71
  }
65
72
  else if (taskId == null) {
66
- fetchStatus = (0, reduceFetchState_1.reduceFetchState)([userList, classListState]);
73
+ fetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([userList, classListState]);
67
74
  }
68
75
  const { classIds } = classListState;
69
76
  const allAccountingClasses = (0, classSelector_1.getClassesByIds)(classState, {
@@ -96,6 +103,7 @@ const getTaskDetail = (state, taskId) => {
96
103
  showTaskDetailFormFooter,
97
104
  snoozedUntil,
98
105
  taskGroupId,
106
+ subtasks,
99
107
  };
100
108
  };
101
109
  exports.getTaskDetail = getTaskDetail;
@@ -144,13 +152,16 @@ exports.allTaskPriority = [
144
152
  },
145
153
  ];
146
154
  const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
147
- if (taskDetailLocalData.name !== taskDetailInStore?.name ||
155
+ if (taskDetailInStore == null) {
156
+ return false;
157
+ }
158
+ if (taskDetailLocalData.name !== taskDetailInStore.name ||
148
159
  taskDetailLocalData.description !== taskDetailInStore.description ||
149
160
  taskDetailLocalData.priority !== taskDetailInStore.priority.code ||
150
161
  taskDetailLocalData.status !== taskDetailInStore.status.code ||
151
162
  !(0, isEqual_1.default)(taskDetailInStore.tagIds, taskDetailLocalData.tagIds) ||
152
- !(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore?.assignees ?? []) ||
153
- !(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore?.groupAssignees ?? []) ||
163
+ !(0, isEqual_1.default)(taskDetailLocalData.assignee, taskDetailInStore.assignees ?? []) ||
164
+ !(0, isEqual_1.default)(taskDetailLocalData.groupAssignees, taskDetailInStore.groupAssignees ?? []) ||
154
165
  !(0, isEqual_1.default)(taskDetailLocalData.fileIds, taskDetailInStore.fileIds ?? []) ||
155
166
  !(0, isEqual_1.default)(taskDetailLocalData.dueDate, taskDetailInStore.dueDate) ||
156
167
  !(0, isEqual_1.default)(taskDetailLocalData.type, taskDetailInStore.type) ||
@@ -158,7 +169,8 @@ const showFormFooter = (taskDetailLocalData, taskDetailInStore) => {
158
169
  !(0, isEqual_1.default)(taskDetailLocalData.recurringFrequency, taskDetailInStore.recurringFrequency) ||
159
170
  !(0, isEqual_1.default)(taskDetailLocalData.recurringDaysOfWeek, taskDetailInStore.recurringDaysOfWeek) ||
160
171
  !(0, isEqual_1.default)(taskDetailLocalData.recurringStartDate, taskDetailInStore.recurringStartDate) ||
161
- !(0, isEqual_1.default)(taskDetailLocalData.timeSpent, taskDetailInStore.timeSpent)) {
172
+ !(0, isEqual_1.default)(taskDetailLocalData.timeSpent, taskDetailInStore.timeSpent) ||
173
+ !(0, isEqual_1.default)(taskDetailLocalData.taskGroupId, taskDetailInStore.taskGroupIds[0])) {
162
174
  return true;
163
175
  }
164
176
  return false;
@@ -12,15 +12,17 @@ const fetchTaskListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, oper
12
12
  .getJSON(`${zeniAPI.apiEndPoints.taskMicroServiceBaseUrl}/1.0/task-manager/tasks?query=${encodeURIComponent(`{"task_type": "all"}`)}`)
13
13
  .pipe((0, operators_1.mergeMap)((response) => {
14
14
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
15
- const { tasks, deleted, archived, snoozed } = response.data;
15
+ const { tasks, deleted, archived, snoozed, completed } = response.data;
16
16
  const allTasks = [
17
17
  ...tasks,
18
+ ...(completed ?? []),
18
19
  ...(deleted ?? []),
19
20
  ...(archived ?? []),
20
21
  ...(snoozed ?? []),
21
22
  ];
22
23
  return (0, rxjs_1.of)((0, taskReducer_1.updateTasks)(allTasks), (0, taskListReducer_1.updateTaskList)({
23
24
  data: tasks,
25
+ completed: completed ?? [],
24
26
  deleted: deleted ?? [],
25
27
  archived: archived ?? [],
26
28
  snoozed: snoozed ?? [],
@@ -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<{