@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
@@ -1,39 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- export const initialState = {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- data: undefined,
6
- savedItemId: undefined,
7
- savedKind: undefined,
8
- hasValidState() {
9
- return this.fetchState === 'Completed';
10
- },
11
- };
12
- const catalogWrite = createSlice({
13
- name: 'invoicingCatalogWrite',
14
- initialState,
15
- reducers: {
16
- saveInvoicingCatalogItem(draft, action) {
17
- draft.fetchState = 'In-Progress';
18
- draft.error = undefined;
19
- draft.savedItemId = undefined;
20
- draft.savedKind = action.payload.kind;
21
- draft.data = action.payload.data;
22
- },
23
- saveInvoicingCatalogItemSuccess(draft, action) {
24
- draft.fetchState = 'Completed';
25
- draft.error = undefined;
26
- draft.savedItemId = action.payload.itemId;
27
- draft.savedKind = action.payload.kind;
28
- },
29
- saveInvoicingCatalogItemFailure(draft, action) {
30
- draft.fetchState = 'Error';
31
- draft.error = action.payload;
32
- },
33
- resetInvoicingCatalogWrite(draft) {
34
- Object.assign(draft, initialState);
35
- },
36
- },
37
- });
38
- export const { saveInvoicingCatalogItem, saveInvoicingCatalogItemSuccess, saveInvoicingCatalogItemFailure, resetInvoicingCatalogWrite, } = catalogWrite.actions;
39
- export default catalogWrite.reducer;
@@ -1,6 +0,0 @@
1
- export const getInvoicingCatalogWriteState = (state) => ({
2
- fetchState: state.invoicingCatalogWriteState.fetchState,
3
- error: state.invoicingCatalogWriteState.error,
4
- });
5
- export const getSavedInvoicingCatalogItemId = (state) => state.invoicingCatalogWriteState.savedItemId;
6
- export const getSavedInvoicingCatalogItemKind = (state) => state.invoicingCatalogWriteState.savedKind;
@@ -1,83 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, switchMap } from 'rxjs/operators';
3
- import { updateInvoicingCoupons } from '../../../entity/invoicing/coupon/couponReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
- import { INVOICING_LIST_PAGE_SIZE, applyListSortParams, invoicingBaseUrl, withQuery, } from '../invoicingApiHelper';
6
- import { fetchInvoicingCouponCounts, fetchInvoicingCouponDetail, fetchInvoicingCouponKPIs, fetchInvoicingCouponList, updateInvoicingCouponCounts, updateInvoicingCouponCountsFailure, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure, updateInvoicingCouponKPIs, updateInvoicingCouponKPIsFailure, updateInvoicingCouponList, updateInvoicingCouponListFailure, } from './couponViewReducer';
7
- const buildQuery = (filters, cursor, sort) => {
8
- const params = new URLSearchParams();
9
- if (filters.status != null && filters.status.length > 0) {
10
- params.set('status', filters.status);
11
- }
12
- if (filters.search != null && filters.search.length > 0) {
13
- params.set('search', filters.search);
14
- }
15
- params.set('limit', String(INVOICING_LIST_PAGE_SIZE));
16
- if (cursor != null) {
17
- params.set('cursor', cursor);
18
- }
19
- applyListSortParams(params, sort);
20
- return params;
21
- };
22
- export const fetchInvoicingCouponListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponList.match), switchMap((action) => {
23
- const { filters, cursor, keepExistingListItems, sort } = action.payload;
24
- const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/discounts`, buildQuery(filters, cursor, sort));
25
- return zeniAPI
26
- .getJSON(apiUrl)
27
- .pipe(switchMap((response) => {
28
- if (isSuccessResponse(response)) {
29
- const items = response.data?.items ?? [];
30
- return [
31
- updateInvoicingCoupons(items, 'merge'),
32
- updateInvoicingCouponList({
33
- ids: items.map((item) => item.id),
34
- nextCursor: response.data?.next_cursor ?? null,
35
- keepExistingListItems,
36
- }),
37
- ];
38
- }
39
- return of(updateInvoicingCouponListFailure(response.status));
40
- }), catchError((error) => of(updateInvoicingCouponListFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount list REST API call errored out ' +
41
- JSON.stringify(error))))));
42
- }));
43
- export const fetchInvoicingCouponCountsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponCounts.match), switchMap(() => {
44
- const { filters } = state$.value.invoicingCouponViewState;
45
- const params = new URLSearchParams();
46
- if (filters.search != null && filters.search.length > 0) {
47
- params.set('search', filters.search);
48
- }
49
- const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/discounts/counts`, params);
50
- return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
51
- if (isSuccessResponse(response) && response.data != null) {
52
- return of(updateInvoicingCouponCounts(response.data));
53
- }
54
- return of(updateInvoicingCouponCountsFailure(response.status));
55
- }), catchError((error) => of(updateInvoicingCouponCountsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount counts REST API call errored out ' +
56
- JSON.stringify(error))))));
57
- }));
58
- export const fetchInvoicingCouponKPIsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponKPIs.match), switchMap(() => {
59
- const apiUrl = `${invoicingBaseUrl(zeniAPI)}/discounts/kpis`;
60
- return zeniAPI
61
- .getJSON(apiUrl)
62
- .pipe(switchMap((response) => {
63
- if (isSuccessResponse(response) && response.data != null) {
64
- return of(updateInvoicingCouponKPIs(response.data));
65
- }
66
- return of(updateInvoicingCouponKPIsFailure(response.status));
67
- }), catchError((error) => of(updateInvoicingCouponKPIsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount KPIs REST API call errored out ' +
68
- JSON.stringify(error))))));
69
- }));
70
- export const fetchInvoicingCouponDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCouponDetail.match), switchMap((action) => {
71
- const { id } = action.payload;
72
- const apiUrl = `${invoicingBaseUrl(zeniAPI)}/discounts/${id}`;
73
- return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
74
- if (isSuccessResponse(response) && response.data != null) {
75
- return [
76
- updateInvoicingCoupons([response.data], 'merge'),
77
- updateInvoicingCouponDetail({ id: response.data.id }),
78
- ];
79
- }
80
- return of(updateInvoicingCouponDetailFailure(response.status));
81
- }), catchError((error) => of(updateInvoicingCouponDetailFailure(createZeniAPIStatus('Unexpected Error', 'Fetch discount detail REST API call errored out ' +
82
- JSON.stringify(error))))));
83
- }));
@@ -1,105 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- export const initialState = {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- ids: [],
6
- nextCursor: null,
7
- filters: {},
8
- counts: { all: 0 },
9
- countsFetchState: { fetchState: 'Not-Started', error: undefined },
10
- kpis: undefined,
11
- kpisFetchState: { fetchState: 'Not-Started', error: undefined },
12
- detailId: undefined,
13
- detailFetchState: { fetchState: 'Not-Started', error: undefined },
14
- hasValidState() {
15
- return this.fetchState === 'Completed';
16
- },
17
- };
18
- const couponView = createSlice({
19
- name: 'invoicingCouponView',
20
- initialState,
21
- reducers: {
22
- fetchInvoicingCouponList: {
23
- reducer(draft, action) {
24
- if (!action.payload.keepExistingListItems) {
25
- draft.ids = [];
26
- draft.nextCursor = null;
27
- }
28
- draft.filters = action.payload.filters;
29
- draft.sort = action.payload.sort;
30
- draft.fetchState = 'In-Progress';
31
- draft.error = undefined;
32
- },
33
- prepare(payload) {
34
- return {
35
- payload: {
36
- filters: payload.filters ?? {},
37
- cursor: payload.cursor,
38
- keepExistingListItems: payload.keepExistingListItems ?? false,
39
- sort: payload.sort,
40
- },
41
- };
42
- },
43
- },
44
- updateInvoicingCouponList(draft, action) {
45
- draft.ids = action.payload.keepExistingListItems
46
- ? [...new Set([...draft.ids, ...action.payload.ids])]
47
- : action.payload.ids;
48
- draft.nextCursor = action.payload.nextCursor;
49
- draft.fetchState = 'Completed';
50
- draft.error = undefined;
51
- },
52
- updateInvoicingCouponListFailure(draft, action) {
53
- draft.fetchState = 'Error';
54
- draft.error = action.payload;
55
- },
56
- fetchInvoicingCouponCounts(draft) {
57
- draft.countsFetchState.fetchState = 'In-Progress';
58
- draft.countsFetchState.error = undefined;
59
- },
60
- updateInvoicingCouponCounts(draft, action) {
61
- draft.counts = action.payload;
62
- draft.countsFetchState.fetchState = 'Completed';
63
- draft.countsFetchState.error = undefined;
64
- },
65
- updateInvoicingCouponCountsFailure(draft, action) {
66
- draft.countsFetchState.fetchState = 'Error';
67
- draft.countsFetchState.error = action.payload;
68
- },
69
- fetchInvoicingCouponKPIs(draft) {
70
- draft.kpisFetchState.fetchState = 'In-Progress';
71
- draft.kpisFetchState.error = undefined;
72
- },
73
- updateInvoicingCouponKPIs(draft, action) {
74
- draft.kpis = action.payload;
75
- draft.kpisFetchState.fetchState = 'Completed';
76
- draft.kpisFetchState.error = undefined;
77
- },
78
- updateInvoicingCouponKPIsFailure(draft, action) {
79
- draft.kpisFetchState.fetchState = 'Error';
80
- draft.kpisFetchState.error = action.payload;
81
- },
82
- updateInvoicingCouponFilters(draft, action) {
83
- draft.filters = action.payload;
84
- },
85
- fetchInvoicingCouponDetail(draft, action) {
86
- draft.detailId = action.payload.id;
87
- draft.detailFetchState.fetchState = 'In-Progress';
88
- draft.detailFetchState.error = undefined;
89
- },
90
- updateInvoicingCouponDetail(draft, action) {
91
- draft.detailId = action.payload.id;
92
- draft.detailFetchState.fetchState = 'Completed';
93
- draft.detailFetchState.error = undefined;
94
- },
95
- updateInvoicingCouponDetailFailure(draft, action) {
96
- draft.detailFetchState.fetchState = 'Error';
97
- draft.detailFetchState.error = action.payload;
98
- },
99
- clearInvoicingCouponView(draft) {
100
- Object.assign(draft, initialState);
101
- },
102
- },
103
- });
104
- export const { fetchInvoicingCouponList, updateInvoicingCouponList, updateInvoicingCouponListFailure, fetchInvoicingCouponCounts, updateInvoicingCouponCounts, updateInvoicingCouponCountsFailure, fetchInvoicingCouponKPIs, updateInvoicingCouponKPIs, updateInvoicingCouponKPIsFailure, updateInvoicingCouponFilters, fetchInvoicingCouponDetail, updateInvoicingCouponDetail, updateInvoicingCouponDetailFailure, clearInvoicingCouponView, } = couponView.actions;
105
- export default couponView.reducer;
@@ -1,18 +0,0 @@
1
- export const getInvoicingCouponListItems = (state) => state.invoicingCouponViewState.ids
2
- .map((id) => state.invoicingCouponState.couponByID[id])
3
- .filter((item) => item != null);
4
- export const getInvoicingCouponListFetchState = (state) => ({
5
- fetchState: state.invoicingCouponViewState.fetchState,
6
- error: state.invoicingCouponViewState.error,
7
- });
8
- export const getInvoicingCouponListNextCursor = (state) => state.invoicingCouponViewState.nextCursor;
9
- export const getInvoicingCouponListHasMore = (state) => state.invoicingCouponViewState.nextCursor != null;
10
- export const getInvoicingCouponListFilters = (state) => state.invoicingCouponViewState.filters;
11
- export const getInvoicingCouponCounts = (state) => state.invoicingCouponViewState.counts;
12
- export const getInvoicingCouponKPIs = (state) => state.invoicingCouponViewState.kpis;
13
- export const getInvoicingCouponById = (state, id) => state.invoicingCouponState.couponByID[id];
14
- export const getInvoicingCouponDetail = (state) => {
15
- const id = state.invoicingCouponViewState.detailId;
16
- return id != null ? state.invoicingCouponState.couponByID[id] : undefined;
17
- };
18
- export const getInvoicingCouponDetailFetchState = (state) => state.invoicingCouponViewState.detailFetchState;
@@ -1,29 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { updateInvoicingCoupons } from '../../../entity/invoicing/coupon/couponReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
- import { invoicingBaseUrl } from '../invoicingApiHelper';
6
- import { saveInvoicingCoupon, saveInvoicingCouponFailure, saveInvoicingCouponSuccess, } from './couponWriteReducer';
7
- export const saveInvoicingCouponEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(saveInvoicingCoupon.match), mergeMap((action) => {
8
- const { data, id } = action.payload;
9
- const baseUrl = invoicingBaseUrl(zeniAPI);
10
- const path = id != null
11
- ? `${baseUrl}/discounts/${encodeURIComponent(id)}`
12
- : `${baseUrl}/discounts`;
13
- const request$ = id != null
14
- ? zeniAPI.putAndGetJSON(path, {
15
- ...data,
16
- })
17
- : zeniAPI.postAndGetJSON(path, {
18
- ...data,
19
- });
20
- return request$.pipe(mergeMap((response) => {
21
- if (isSuccessResponse(response) && response.data != null) {
22
- return [
23
- updateInvoicingCoupons([response.data], 'merge'),
24
- saveInvoicingCouponSuccess({ couponId: response.data.id }),
25
- ];
26
- }
27
- return of(saveInvoicingCouponFailure(response.status));
28
- }), catchError((error) => of(saveInvoicingCouponFailure(createZeniAPIStatus('Unexpected Error', 'Save coupon REST API call errored out ' + JSON.stringify(error))))));
29
- }));
@@ -1,36 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- export const initialState = {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- data: undefined,
6
- savedCouponId: undefined,
7
- hasValidState() {
8
- return this.fetchState === 'Completed';
9
- },
10
- };
11
- const couponWrite = createSlice({
12
- name: 'invoicingCouponWrite',
13
- initialState,
14
- reducers: {
15
- saveInvoicingCoupon(draft, action) {
16
- draft.fetchState = 'In-Progress';
17
- draft.error = undefined;
18
- draft.savedCouponId = undefined;
19
- draft.data = action.payload.data;
20
- },
21
- saveInvoicingCouponSuccess(draft, action) {
22
- draft.fetchState = 'Completed';
23
- draft.error = undefined;
24
- draft.savedCouponId = action.payload.couponId;
25
- },
26
- saveInvoicingCouponFailure(draft, action) {
27
- draft.fetchState = 'Error';
28
- draft.error = action.payload;
29
- },
30
- resetInvoicingCouponWrite(draft) {
31
- Object.assign(draft, initialState);
32
- },
33
- },
34
- });
35
- export const { saveInvoicingCoupon, saveInvoicingCouponSuccess, saveInvoicingCouponFailure, resetInvoicingCouponWrite, } = couponWrite.actions;
36
- export default couponWrite.reducer;
@@ -1,5 +0,0 @@
1
- export const getInvoicingCouponWriteState = (state) => ({
2
- fetchState: state.invoicingCouponWriteState.fetchState,
3
- error: state.invoicingCouponWriteState.error,
4
- });
5
- export const getSavedInvoicingCouponId = (state) => state.invoicingCouponWriteState.savedCouponId;
@@ -1,23 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, mergeMap } from 'rxjs/operators';
3
- import { updateInvoices } from '../../../entity/invoicing/invoice/invoiceReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
- import { invoicingBaseUrl } from '../invoicingApiHelper';
6
- import { createInvoice, createInvoiceFailure, createInvoiceSuccess, } from './createInvoiceReducer';
7
- export const createInvoiceEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(createInvoice.match), mergeMap((action) => {
8
- const apiUrl = `${invoicingBaseUrl(zeniAPI)}/invoices`;
9
- return zeniAPI
10
- .postAndGetJSON(apiUrl, {
11
- ...action.payload,
12
- })
13
- .pipe(mergeMap((response) => {
14
- if (isSuccessResponse(response) && response.data != null) {
15
- return [
16
- updateInvoices([response.data], 'merge'),
17
- createInvoiceSuccess({ invoiceId: response.data.id }),
18
- ];
19
- }
20
- return of(createInvoiceFailure(response.status));
21
- }), catchError((error) => of(createInvoiceFailure(createZeniAPIStatus('Unexpected Error', 'Create invoice REST API call errored out ' +
22
- JSON.stringify(error))))));
23
- }));
@@ -1,36 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- export const initialState = {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- createdInvoiceId: undefined,
6
- request: undefined,
7
- hasValidState() {
8
- return this.fetchState === 'Completed';
9
- },
10
- };
11
- const createInvoiceSlice = createSlice({
12
- name: 'invoicingCreateInvoice',
13
- initialState,
14
- reducers: {
15
- createInvoice(draft, action) {
16
- draft.fetchState = 'In-Progress';
17
- draft.error = undefined;
18
- draft.createdInvoiceId = undefined;
19
- draft.request = action.payload;
20
- },
21
- createInvoiceSuccess(draft, action) {
22
- draft.fetchState = 'Completed';
23
- draft.error = undefined;
24
- draft.createdInvoiceId = action.payload.invoiceId;
25
- },
26
- createInvoiceFailure(draft, action) {
27
- draft.fetchState = 'Error';
28
- draft.error = action.payload;
29
- },
30
- resetCreateInvoice(draft) {
31
- Object.assign(draft, initialState);
32
- },
33
- },
34
- });
35
- export const { createInvoice, createInvoiceSuccess, createInvoiceFailure, resetCreateInvoice, } = createInvoiceSlice.actions;
36
- export default createInvoiceSlice.reducer;
@@ -1,5 +0,0 @@
1
- export const getCreateInvoiceFetchState = (state) => ({
2
- fetchState: state.invoicingCreateInvoiceState.fetchState,
3
- error: state.invoicingCreateInvoiceState.error,
4
- });
5
- export const getCreatedInvoiceId = (state) => state.invoicingCreateInvoiceState.createdInvoiceId;
@@ -1,87 +0,0 @@
1
- import { of } from 'rxjs';
2
- import { catchError, filter, switchMap } from 'rxjs/operators';
3
- import { updateInvoicingCreditNotes } from '../../../entity/invoicing/creditNote/creditNoteReducer';
4
- import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
- import { INVOICING_LIST_PAGE_SIZE, applyListSortParams, invoicingBaseUrl, withQuery, } from '../invoicingApiHelper';
6
- import { fetchInvoicingCreditNoteCounts, fetchInvoicingCreditNoteDetail, fetchInvoicingCreditNoteKPIs, fetchInvoicingCreditNoteList, updateInvoicingCreditNoteCounts, updateInvoicingCreditNoteCountsFailure, updateInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetailFailure, updateInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIsFailure, updateInvoicingCreditNoteList, updateInvoicingCreditNoteListFailure, } from './creditNoteViewReducer';
7
- const buildQuery = (filters, cursor, sort) => {
8
- const params = new URLSearchParams();
9
- if (filters.status != null && filters.status.length > 0) {
10
- params.set('status', filters.status);
11
- }
12
- if (filters.customerId != null) {
13
- params.set('customer_id', filters.customerId);
14
- }
15
- if (filters.search != null && filters.search.length > 0) {
16
- params.set('search', filters.search);
17
- }
18
- params.set('limit', String(INVOICING_LIST_PAGE_SIZE));
19
- if (cursor != null) {
20
- params.set('cursor', cursor);
21
- }
22
- applyListSortParams(params, sort);
23
- return params;
24
- };
25
- export const fetchInvoicingCreditNoteListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteList.match), switchMap((action) => {
26
- const { filters, cursor, keepExistingListItems, sort } = action.payload;
27
- const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/credits`, buildQuery(filters, cursor, sort));
28
- return zeniAPI
29
- .getJSON(apiUrl)
30
- .pipe(switchMap((response) => {
31
- if (isSuccessResponse(response)) {
32
- const items = response.data?.items ?? [];
33
- return [
34
- updateInvoicingCreditNotes(items, 'merge'),
35
- updateInvoicingCreditNoteList({
36
- ids: items.map((item) => item.id),
37
- nextCursor: response.data?.next_cursor ?? null,
38
- keepExistingListItems,
39
- }),
40
- ];
41
- }
42
- return of(updateInvoicingCreditNoteListFailure(response.status));
43
- }), catchError((error) => of(updateInvoicingCreditNoteListFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note list REST API call errored out ' +
44
- JSON.stringify(error))))));
45
- }));
46
- export const fetchInvoicingCreditNoteCountsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteCounts.match), switchMap(() => {
47
- const { filters } = state$.value.invoicingCreditNoteViewState;
48
- const params = new URLSearchParams();
49
- if (filters.search != null && filters.search.length > 0) {
50
- params.set('search', filters.search);
51
- }
52
- if (filters.customerId != null) {
53
- params.set('customer_id', filters.customerId);
54
- }
55
- const apiUrl = withQuery(`${invoicingBaseUrl(zeniAPI)}/credits/counts`, params);
56
- return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
57
- if (isSuccessResponse(response) && response.data != null) {
58
- return of(updateInvoicingCreditNoteCounts(response.data));
59
- }
60
- return of(updateInvoicingCreditNoteCountsFailure(response.status));
61
- }), catchError((error) => of(updateInvoicingCreditNoteCountsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note counts REST API call errored out ' +
62
- JSON.stringify(error))))));
63
- }));
64
- export const fetchInvoicingCreditNoteKPIsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteKPIs.match), switchMap(() => {
65
- const apiUrl = `${invoicingBaseUrl(zeniAPI)}/credits/kpis`;
66
- return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
67
- if (isSuccessResponse(response) && response.data != null) {
68
- return of(updateInvoicingCreditNoteKPIs(response.data));
69
- }
70
- return of(updateInvoicingCreditNoteKPIsFailure(response.status));
71
- }), catchError((error) => of(updateInvoicingCreditNoteKPIsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note KPIs REST API call errored out ' +
72
- JSON.stringify(error))))));
73
- }));
74
- export const fetchInvoicingCreditNoteDetailEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingCreditNoteDetail.match), switchMap((action) => {
75
- const { id } = action.payload;
76
- const apiUrl = `${invoicingBaseUrl(zeniAPI)}/credits/${id}`;
77
- return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
78
- if (isSuccessResponse(response) && response.data != null) {
79
- return [
80
- updateInvoicingCreditNotes([response.data], 'merge'),
81
- updateInvoicingCreditNoteDetail({ id: response.data.id }),
82
- ];
83
- }
84
- return of(updateInvoicingCreditNoteDetailFailure(response.status));
85
- }), catchError((error) => of(updateInvoicingCreditNoteDetailFailure(createZeniAPIStatus('Unexpected Error', 'Fetch credit note detail REST API call errored out ' +
86
- JSON.stringify(error))))));
87
- }));
@@ -1,105 +0,0 @@
1
- import { createSlice } from '@reduxjs/toolkit';
2
- export const initialState = {
3
- fetchState: 'Not-Started',
4
- error: undefined,
5
- ids: [],
6
- nextCursor: null,
7
- filters: {},
8
- counts: { all: 0 },
9
- countsFetchState: { fetchState: 'Not-Started', error: undefined },
10
- kpis: undefined,
11
- kpisFetchState: { fetchState: 'Not-Started', error: undefined },
12
- detailId: undefined,
13
- detailFetchState: { fetchState: 'Not-Started', error: undefined },
14
- hasValidState() {
15
- return this.fetchState === 'Completed';
16
- },
17
- };
18
- const creditNoteView = createSlice({
19
- name: 'invoicingCreditNoteView',
20
- initialState,
21
- reducers: {
22
- fetchInvoicingCreditNoteList: {
23
- reducer(draft, action) {
24
- if (!action.payload.keepExistingListItems) {
25
- draft.ids = [];
26
- draft.nextCursor = null;
27
- }
28
- draft.filters = action.payload.filters;
29
- draft.sort = action.payload.sort;
30
- draft.fetchState = 'In-Progress';
31
- draft.error = undefined;
32
- },
33
- prepare(payload) {
34
- return {
35
- payload: {
36
- filters: payload.filters ?? {},
37
- cursor: payload.cursor,
38
- keepExistingListItems: payload.keepExistingListItems ?? false,
39
- sort: payload.sort,
40
- },
41
- };
42
- },
43
- },
44
- updateInvoicingCreditNoteList(draft, action) {
45
- draft.ids = action.payload.keepExistingListItems
46
- ? [...new Set([...draft.ids, ...action.payload.ids])]
47
- : action.payload.ids;
48
- draft.nextCursor = action.payload.nextCursor;
49
- draft.fetchState = 'Completed';
50
- draft.error = undefined;
51
- },
52
- updateInvoicingCreditNoteListFailure(draft, action) {
53
- draft.fetchState = 'Error';
54
- draft.error = action.payload;
55
- },
56
- fetchInvoicingCreditNoteCounts(draft) {
57
- draft.countsFetchState.fetchState = 'In-Progress';
58
- draft.countsFetchState.error = undefined;
59
- },
60
- updateInvoicingCreditNoteCounts(draft, action) {
61
- draft.counts = action.payload;
62
- draft.countsFetchState.fetchState = 'Completed';
63
- draft.countsFetchState.error = undefined;
64
- },
65
- updateInvoicingCreditNoteCountsFailure(draft, action) {
66
- draft.countsFetchState.fetchState = 'Error';
67
- draft.countsFetchState.error = action.payload;
68
- },
69
- fetchInvoicingCreditNoteKPIs(draft) {
70
- draft.kpisFetchState.fetchState = 'In-Progress';
71
- draft.kpisFetchState.error = undefined;
72
- },
73
- updateInvoicingCreditNoteKPIs(draft, action) {
74
- draft.kpis = action.payload;
75
- draft.kpisFetchState.fetchState = 'Completed';
76
- draft.kpisFetchState.error = undefined;
77
- },
78
- updateInvoicingCreditNoteKPIsFailure(draft, action) {
79
- draft.kpisFetchState.fetchState = 'Error';
80
- draft.kpisFetchState.error = action.payload;
81
- },
82
- updateInvoicingCreditNoteFilters(draft, action) {
83
- draft.filters = action.payload;
84
- },
85
- fetchInvoicingCreditNoteDetail(draft, action) {
86
- draft.detailId = action.payload.id;
87
- draft.detailFetchState.fetchState = 'In-Progress';
88
- draft.detailFetchState.error = undefined;
89
- },
90
- updateInvoicingCreditNoteDetail(draft, action) {
91
- draft.detailId = action.payload.id;
92
- draft.detailFetchState.fetchState = 'Completed';
93
- draft.detailFetchState.error = undefined;
94
- },
95
- updateInvoicingCreditNoteDetailFailure(draft, action) {
96
- draft.detailFetchState.fetchState = 'Error';
97
- draft.detailFetchState.error = action.payload;
98
- },
99
- clearInvoicingCreditNoteView(draft) {
100
- Object.assign(draft, initialState);
101
- },
102
- },
103
- });
104
- export const { fetchInvoicingCreditNoteList, updateInvoicingCreditNoteList, updateInvoicingCreditNoteListFailure, fetchInvoicingCreditNoteCounts, updateInvoicingCreditNoteCounts, updateInvoicingCreditNoteCountsFailure, fetchInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIs, updateInvoicingCreditNoteKPIsFailure, updateInvoicingCreditNoteFilters, fetchInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetail, updateInvoicingCreditNoteDetailFailure, clearInvoicingCreditNoteView, } = creditNoteView.actions;
105
- export default creditNoteView.reducer;
@@ -1,20 +0,0 @@
1
- export const getInvoicingCreditNoteListItems = (state) => state.invoicingCreditNoteViewState.ids
2
- .map((id) => state.invoicingCreditNoteState.creditNoteByID[id])
3
- .filter((item) => item != null);
4
- export const getInvoicingCreditNoteListFetchState = (state) => ({
5
- fetchState: state.invoicingCreditNoteViewState.fetchState,
6
- error: state.invoicingCreditNoteViewState.error,
7
- });
8
- export const getInvoicingCreditNoteListNextCursor = (state) => state.invoicingCreditNoteViewState.nextCursor;
9
- export const getInvoicingCreditNoteListHasMore = (state) => state.invoicingCreditNoteViewState.nextCursor != null;
10
- export const getInvoicingCreditNoteListFilters = (state) => state.invoicingCreditNoteViewState.filters;
11
- export const getInvoicingCreditNoteCounts = (state) => state.invoicingCreditNoteViewState.counts;
12
- export const getInvoicingCreditNoteKPIs = (state) => state.invoicingCreditNoteViewState.kpis;
13
- export const getInvoicingCreditNoteById = (state, id) => state.invoicingCreditNoteState.creditNoteByID[id];
14
- export const getInvoicingCreditNoteDetail = (state) => {
15
- const id = state.invoicingCreditNoteViewState.detailId;
16
- return id != null
17
- ? state.invoicingCreditNoteState.creditNoteByID[id]
18
- : undefined;
19
- };
20
- export const getInvoicingCreditNoteDetailFetchState = (state) => state.invoicingCreditNoteViewState.detailFetchState;