@zeniai/client-epic-state 4.13.15 → 4.13.17

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 (319) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +7 -0
  2. package/lib/commonStateTypes/common.d.ts +2 -0
  3. package/lib/commonStateTypes/common.js +5 -1
  4. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
  5. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
  6. package/lib/commonStateTypes/timePeriod.d.ts +16 -0
  7. package/lib/commonStateTypes/timePeriod.js +31 -1
  8. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  9. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  11. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  12. package/lib/entity/account/accountState.d.ts +1 -1
  13. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  14. package/lib/entity/chargeCard/chargeCard.d.ts +16 -2
  15. package/lib/entity/chargeCard/chargeCard.js +18 -1
  16. package/lib/entity/chargeCard/chargeCardPayload.d.ts +14 -5
  17. package/lib/entity/chargeCard/chargeCardPayload.js +24 -7
  18. package/lib/entity/class/classReducer.d.ts +4 -4
  19. package/lib/entity/class/classState.d.ts +1 -1
  20. package/lib/entity/company/companyPayload.d.ts +4 -0
  21. package/lib/entity/company/companyPayload.js +6 -3
  22. package/lib/entity/company/companyReducer.d.ts +4 -1
  23. package/lib/entity/company/companyReducer.js +6 -2
  24. package/lib/entity/company/companyStateTypes.d.ts +5 -1
  25. package/lib/entity/file/fileState.d.ts +3 -3
  26. package/lib/entity/file/fileState.js +2 -0
  27. package/lib/entity/forecast/forecastState.d.ts +1 -1
  28. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
  29. package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -1
  30. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  31. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +3 -1
  32. package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  33. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +3 -1
  34. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -0
  35. package/lib/entity/jeSchedules/jeSchedulesTypes.js +12 -1
  36. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +32 -0
  37. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +60 -0
  38. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +12 -0
  39. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +25 -0
  40. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +7 -0
  41. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +36 -0
  42. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +38 -0
  43. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +10 -0
  44. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  45. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  46. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  47. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  48. package/lib/entity/snackbar/snackbarTypes.js +5 -0
  49. package/lib/entity/tenant/clearAllEpic.d.ts +12 -2
  50. package/lib/entity/tenant/clearAllEpic.js +20 -0
  51. package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +2 -1
  52. package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +9 -1
  53. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +7 -1
  54. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +34 -2
  55. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  56. package/lib/entity/tenant/tenantReducer.js +3 -0
  57. package/lib/entity/tenant/tenantState.d.ts +1 -0
  58. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  59. package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
  60. package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
  61. package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
  62. package/lib/entity/transaction/transactionSelector.d.ts +1 -0
  63. package/lib/entity/transaction/transactionSelector.js +7 -1
  64. package/lib/entity/user/userPayload.d.ts +1 -0
  65. package/lib/entity/user/userReducer.js +9 -8
  66. package/lib/entity/user/userState.d.ts +1 -0
  67. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
  68. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +35 -1
  69. package/lib/entity/vendor/vendorPayload.js +3 -2
  70. package/lib/entity/vendor/vendorState.d.ts +3 -3
  71. package/lib/entity/vendor/vendorType.d.ts +0 -2
  72. package/lib/entity/vendor/vendorType.js +1 -4
  73. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  74. package/lib/entity/vendorExpense/vendorExpenseSelector.js +1 -0
  75. package/lib/epic.d.ts +20 -2
  76. package/lib/epic.js +20 -2
  77. package/lib/index.d.ts +65 -21
  78. package/lib/index.js +104 -28
  79. package/lib/reducer.d.ts +31 -1
  80. package/lib/reducer.js +31 -1
  81. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
  82. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
  83. package/lib/view/addressView/addressViewState.d.ts +1 -1
  84. package/lib/view/addressView/toAddressViewLocalData.d.ts +2 -0
  85. package/lib/view/addressView/toAddressViewLocalData.js +9 -3
  86. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  87. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  88. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  89. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  90. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  91. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  92. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  93. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  94. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  95. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  96. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
  97. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  98. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +10 -5
  99. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -7
  100. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
  101. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
  102. package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +5 -3
  103. package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
  104. package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
  105. package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
  106. package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
  107. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  108. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
  109. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
  110. package/lib/view/companyView/types/companyView.d.ts +1 -0
  111. package/lib/view/countryList/countryListReducer.d.ts +17 -0
  112. package/lib/view/countryList/countryListReducer.js +58 -0
  113. package/lib/view/countryList/countryListSelector.d.ts +7 -0
  114. package/lib/view/countryList/countryListSelector.js +13 -0
  115. package/lib/view/countryList/countryListState.d.ts +12 -0
  116. package/lib/view/countryList/countryListState.js +2 -0
  117. package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
  118. package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
  119. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
  120. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
  121. package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
  122. package/lib/view/countryList/payloads/countryListPayload.js +10 -0
  123. package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
  124. package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
  125. package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
  126. package/lib/view/dashboard/dashboardEpic.js +22 -2
  127. package/lib/view/dashboard/dashboardReducer.d.ts +3 -2
  128. package/lib/view/dashboard/dashboardReducer.js +2 -1
  129. package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
  130. package/lib/view/dashboard/dashboardSelector.js +10 -2
  131. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +10 -0
  132. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +73 -0
  133. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +11 -0
  134. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +55 -0
  135. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +11 -0
  136. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +72 -0
  137. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +12 -0
  138. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +77 -0
  139. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +7 -0
  140. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +22 -0
  141. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +8 -0
  142. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +59 -0
  143. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +8 -0
  144. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +78 -0
  145. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +6 -0
  146. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +28 -0
  147. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +9 -0
  148. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +78 -0
  149. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +8 -0
  150. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +58 -0
  151. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +10 -0
  152. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +12 -0
  153. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +3 -0
  154. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +2 -0
  155. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +17 -0
  156. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +66 -0
  157. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +3 -0
  158. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +100 -0
  159. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +11 -0
  160. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +14 -0
  161. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +7 -0
  162. package/lib/view/expenseAutomationView/helpers/helpers.js +67 -0
  163. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +76 -0
  164. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +9 -0
  165. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +36 -0
  166. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -0
  167. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +16 -0
  168. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -0
  169. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +47 -0
  170. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +241 -0
  171. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +53 -0
  172. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +245 -0
  173. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +31 -0
  174. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +130 -0
  175. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -0
  176. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +45 -0
  177. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +34 -0
  178. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +44 -0
  179. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +32 -0
  180. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +2 -0
  181. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +28 -0
  182. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +2 -0
  183. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +11 -0
  184. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +2 -0
  185. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +3 -0
  186. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +89 -0
  187. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +7 -0
  188. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +95 -0
  189. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +3 -0
  190. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +61 -0
  191. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +54 -0
  192. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +5 -0
  193. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +31 -0
  194. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -0
  195. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +20 -0
  196. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +13 -0
  197. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +28 -0
  198. package/lib/view/expenseAutomationView/types/transactionsViewState.js +15 -0
  199. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  200. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  201. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +8 -0
  202. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +58 -0
  203. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +3 -0
  204. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +2 -0
  205. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +16 -0
  206. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +36 -0
  207. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +10 -0
  208. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +27 -0
  209. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +5 -0
  210. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +2 -0
  211. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
  212. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
  213. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
  214. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
  215. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
  216. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  217. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  218. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  219. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  220. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  221. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  222. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  223. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  224. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -2
  225. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
  226. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
  227. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +19 -5
  228. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +8 -3
  229. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +39 -57
  230. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +13 -8
  231. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +19 -12
  232. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +1 -0
  233. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +4 -3
  234. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +2 -0
  235. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
  236. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  237. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  238. package/lib/view/settingsView/epic/updateMyProfileEpic.js +6 -4
  239. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
  240. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
  241. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
  242. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
  243. package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
  244. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
  245. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
  246. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
  247. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +42 -0
  248. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
  249. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
  250. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
  251. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
  252. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
  253. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
  254. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
  255. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
  256. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
  257. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
  258. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +3 -1
  259. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +6 -2
  260. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +2 -3
  261. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
  262. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +1 -3
  263. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +1 -2
  264. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +1 -21
  265. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +1 -3
  266. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -0
  267. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +4 -0
  268. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +8 -1
  269. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +25 -2
  270. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -0
  271. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +8 -4
  272. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -1
  273. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +11 -0
  274. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +42 -0
  275. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -14
  276. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +2 -13
  277. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -6
  278. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -17
  279. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +8 -2
  280. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +55 -15
  281. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +9 -0
  282. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +44 -0
  283. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.d.ts +3 -2
  284. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.js +35 -18
  285. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +15 -0
  286. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +65 -0
  287. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +22 -0
  288. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +77 -0
  289. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +28 -0
  290. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +23 -0
  291. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
  292. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
  293. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
  294. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
  295. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
  296. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
  297. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
  298. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
  299. package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
  300. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  301. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  302. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  303. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  304. package/lib/view/topEx/topExSelector.d.ts +1 -1
  305. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
  306. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  307. package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -1
  308. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
  309. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
  310. package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
  311. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +34 -3
  312. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
  313. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  314. package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +2 -5
  315. package/package.json +2 -2
  316. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
  317. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
  318. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
  319. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getExpenseAutomationFluxAnalysisView = void 0;
7
+ const orderBy_1 = __importDefault(require("lodash/orderBy"));
8
+ const accountSelector_1 = require("../../../entity/account/accountSelector");
9
+ const classSelector_1 = require("../../../entity/class/classSelector");
10
+ const userSelector_1 = require("../../../entity/user/userSelector");
11
+ const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
12
+ const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
13
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
14
+ function getExpenseAutomationFluxAnalysisView(state) {
15
+ const { expenseAutomationFluxAnalysisViewState } = state;
16
+ const { fetchState, error, refreshStatus, uiState, reviewOperatingExpensesIds, reviewStatusById, fluxAnalysisEntities, operatingExpenseIdsBySelectedPeriod, bulkReviewStatus, } = expenseAutomationFluxAnalysisViewState;
17
+ const fetchStateAndError = {
18
+ fetchState,
19
+ error,
20
+ };
21
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
22
+ const { selectedPeriodByTenantId } = state.expenseAutomationViewState;
23
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
24
+ const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
25
+ const operatingExpenseIdsForCurrentPeriod = monthYearPeriodId != null
26
+ ? operatingExpenseIdsBySelectedPeriod[monthYearPeriodId]
27
+ : null;
28
+ const operatingExpenses = [];
29
+ operatingExpenseIdsForCurrentPeriod === null || operatingExpenseIdsForCurrentPeriod === void 0 ? void 0 : operatingExpenseIdsForCurrentPeriod.forEach((opExId) => {
30
+ const fluxEntity = fluxAnalysisEntities.operatingExpenses.find((fluxEntity) => fluxEntity.operatingExpenseId === opExId);
31
+ if (fluxEntity != null) {
32
+ operatingExpenses.push(fluxEntity);
33
+ }
34
+ });
35
+ const operatingExpensesView = [];
36
+ operatingExpenses.forEach((operatingExpense) => {
37
+ const vendor = (0, vendorSelector_1.getVendorByVendorId)(state.vendorState, operatingExpense.vendorId);
38
+ if (vendor != null) {
39
+ operatingExpensesView.push({
40
+ operatingExpenseId: operatingExpense.operatingExpenseId,
41
+ vendor,
42
+ accountBase: operatingExpense.accountId != null
43
+ ? (0, accountSelector_1.getAccountBase)(state.accountState, operatingExpense.accountId, 'account_list')
44
+ : undefined,
45
+ classBase: operatingExpense.classId != null
46
+ ? (0, classSelector_1.getClassById)(state.classState, {
47
+ classId: operatingExpense.classId,
48
+ reportId: 'class_list',
49
+ })
50
+ : undefined,
51
+ reviewedByUser: operatingExpense.userId != null
52
+ ? (0, userSelector_1.getUserByUserId)(state.userState, operatingExpense.userId)
53
+ : undefined,
54
+ varianceAmount: operatingExpense.varianceAmount,
55
+ variancePercentage: operatingExpense.variancePercentage,
56
+ currency: operatingExpense.currency,
57
+ anomalyReason: operatingExpense.anomalyReason,
58
+ status: operatingExpense.status,
59
+ balancesByMonth: operatingExpense.balancesByMonth,
60
+ reviewStatus: reviewStatusById[operatingExpense.operatingExpenseId],
61
+ });
62
+ }
63
+ });
64
+ const sortedOperatingExpenses = (0, orderBy_1.default)(operatingExpensesView, (opEx) => {
65
+ var _a, _b;
66
+ switch (uiState.sortKey) {
67
+ case 'category':
68
+ return (_a = opEx.accountBase) === null || _a === void 0 ? void 0 : _a.accountName.toLowerCase();
69
+ case 'class':
70
+ return (_b = opEx.classBase) === null || _b === void 0 ? void 0 : _b.className.toLowerCase();
71
+ case 'vendor':
72
+ default:
73
+ return opEx.vendor.name;
74
+ }
75
+ }, uiState.sortOrder === 'ascending' ? 'asc' : 'desc');
76
+ return {
77
+ fetchStatus: fetchStateAndError,
78
+ operatingExpensesView: sortedOperatingExpenses,
79
+ bulkReviewStatus,
80
+ reviewOperatingExpensesIds,
81
+ uiState,
82
+ refreshStatus,
83
+ completionStatus: operatingExpensesView.length === 0 &&
84
+ fetchStateAndError.fetchState === 'Completed'
85
+ ? 'complete'
86
+ : 'incomplete',
87
+ };
88
+ }
89
+ exports.getExpenseAutomationFluxAnalysisView = getExpenseAutomationFluxAnalysisView;
@@ -0,0 +1,7 @@
1
+ import { RootState } from '../../../reducer';
2
+ import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
3
+ import { ExpenseAutomationJESchedulesViewSelector } from '../selectorTypes/jeSchedulesSelectorTypes';
4
+ export declare function getExpenseAutomationJESchedulesView(state: RootState): ExpenseAutomationJESchedulesViewSelector;
5
+ export interface JEScheduledTransactionWithFailedEntries extends Omit<JEScheduledTransaction, 'scheduledJournalEntry'> {
6
+ scheduledJournalEntry: ScheduledJournalEntry;
7
+ }
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExpenseAutomationJESchedulesView = void 0;
4
+ const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
5
+ const scheduleDetailLocalDataHelper_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper");
6
+ const accountSelector_1 = require("../../../entity/account/accountSelector");
7
+ const accountListSelector_1 = require("../../accountList/accountListSelector");
8
+ const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
9
+ const classListSelector_1 = require("../../classList/classListSelector");
10
+ const lodash_1 = require("lodash");
11
+ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailSelector");
12
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
13
+ const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
14
+ function getExpenseAutomationJESchedulesView(state) {
15
+ const jeScheduledTransaction = [];
16
+ const failedJeScheduledTransaction = [];
17
+ const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, } = state;
18
+ const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
19
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
20
+ const { selectedPeriodByTenantId } = expenseAutomationViewState;
21
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
22
+ const accountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)('prepaid_expenses');
23
+ const uncategorizedAccounts = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, accountTypes.accountListKey);
24
+ const scheduleDetailAccountTypes = (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)('prepaid_expenses');
25
+ const scheduleDetailAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleDetailAccountTypes);
26
+ const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'schedulesAccountList');
27
+ const filteredAccounts = allAccountList.accounts.filter((account) => scheduleDetailAccountIds.includes(account.accountId));
28
+ const depreciationCategoryIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, ['fixed_assets', 'other_assets'] // This will always be for fixed assets list
29
+ );
30
+ const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)('fixed_assets');
31
+ const fixedAssetLabelAccountIds = accountLabel != null
32
+ ? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountTypes.accountListKey, accountLabel)
33
+ : [];
34
+ const filteredDepAccounts = allAccountList.accounts.filter((account) => depreciationCategoryIds.includes(account.accountId) &&
35
+ !fixedAssetLabelAccountIds.includes(account.accountId));
36
+ const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
37
+ const allClasses = allClassList.classes.map((classData) => {
38
+ return (0, lodash_1.omit)(classData, ['accountIds', 'key']);
39
+ });
40
+ const accountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountTypes.accountListKey).filter((account) => account.accountId[0] != null &&
41
+ scheduleDetailAccountIds.includes(account.accountId[0]));
42
+ const depAccountListNestedAccountHierarchy = (0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountTypes.accountListKey);
43
+ const filteredDepAccountListNestedAccountHierarchy = (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)(depAccountListNestedAccountHierarchy, filteredDepAccounts.map((account) => account.accountId));
44
+ const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
45
+ const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
46
+ const jeScheduleTransactionKeysForSelectedPeriod = monthYearPeriodId != null
47
+ ? jeScheduleTransactionKeysByPeriod[monthYearPeriodId]
48
+ : null;
49
+ const failedJeScheduleTransactionKeysForSelectedPeriod = monthYearPeriodId != null
50
+ ? failedJeScheduleTransactionKeysByPeriod[monthYearPeriodId]
51
+ : null;
52
+ const jeScheduleTransactionKeys = jeScheduleTransactionKeysForSelectedPeriod !== null && jeScheduleTransactionKeysForSelectedPeriod !== void 0 ? jeScheduleTransactionKeysForSelectedPeriod : [];
53
+ const failedJeScheduleTransactionKeys = failedJeScheduleTransactionKeysForSelectedPeriod !== null && failedJeScheduleTransactionKeysForSelectedPeriod !== void 0 ? failedJeScheduleTransactionKeysForSelectedPeriod : [];
54
+ jeScheduleTransactionKeys.forEach((jeScheduleKey) => {
55
+ const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
56
+ jeScheduledTransaction.push(jeScheduleDetails);
57
+ });
58
+ failedJeScheduleTransactionKeys.forEach((jeScheduleKey) => {
59
+ const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
60
+ failedJeScheduledTransaction.push(jeScheduleDetails);
61
+ });
62
+ const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
63
+ const resolveSchedules = [];
64
+ failedJeScheduledTransaction.forEach((schedule) => {
65
+ schedule.scheduledJournalEntry.forEach((journalEntry) => {
66
+ resolveSchedules.push(Object.assign(Object.assign({}, schedule), { scheduledJournalEntry: journalEntry }));
67
+ });
68
+ });
69
+ return {
70
+ uncategorizedAccounts,
71
+ allDepreciationAccountList: filteredDepAccounts,
72
+ allDepreciationAccountListNestedAccountHierarchy: filteredDepAccountListNestedAccountHierarchy,
73
+ classListNestedAccountHierarchy,
74
+ allAccountList: filteredAccounts,
75
+ accountListNestedAccountHierarchy,
76
+ allClassList: allClasses,
77
+ draftSchedules,
78
+ resolveSchedules: resolveSchedules,
79
+ postStatusById: postStatusById,
80
+ ignoreStatusById: ignoreStatusById,
81
+ fetchState: fetchState,
82
+ jeScheduleLocalDataById: jeScheduleLocalDataById,
83
+ uiState: uiState,
84
+ error: error,
85
+ refreshStatus,
86
+ completionStatus: fetchState === 'Completed' &&
87
+ draftSchedules.length === 0 &&
88
+ resolveSchedules.length === 0 &&
89
+ jeScheduleTransactionKeysForSelectedPeriod != null &&
90
+ failedJeScheduleTransactionKeysForSelectedPeriod != null
91
+ ? 'complete'
92
+ : 'incomplete',
93
+ };
94
+ }
95
+ exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
@@ -0,0 +1,3 @@
1
+ import { ExpenseAutomationMissingReceiptsViewSelector } from '../selectorTypes/missingReceiptsSelectorTypes';
2
+ import { RootState } from '../../../reducer';
3
+ export declare function getExpenseAutomationMissingReceiptsView(state: RootState): ExpenseAutomationMissingReceiptsViewSelector;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getExpenseAutomationMissingReceiptsView = void 0;
7
+ const orderBy_1 = __importDefault(require("lodash/orderBy"));
8
+ const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
9
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
10
+ const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
11
+ function getExpenseAutomationMissingReceiptsView(state) {
12
+ const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, } = state;
13
+ const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
14
+ const { selectedPeriodByTenantId } = expenseAutomationViewState;
15
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
16
+ const { uploadReceiptStatusById, fetchState, error, uiState, refreshStatus, transactionIdsBySelectedPeriod, } = expenseAutomationMissingReceiptsViewState;
17
+ const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
18
+ const transactionIdsForSelectedPeriod = monthYearPeriodId != null
19
+ ? transactionIdsBySelectedPeriod[monthYearPeriodId]
20
+ : null;
21
+ const transactionIds = transactionIdsForSelectedPeriod !== null && transactionIdsForSelectedPeriod !== void 0 ? transactionIdsForSelectedPeriod : [];
22
+ const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
23
+ const sortedTransactions = (0, orderBy_1.default)(transactions, (transaction) => {
24
+ var _a, _b, _c;
25
+ switch (uiState.sortKey) {
26
+ case 'date':
27
+ return transaction.date.valueOf();
28
+ case 'amount':
29
+ return transaction.amount.amount;
30
+ case 'category':
31
+ return transaction.lines != null &&
32
+ transaction.lines.length > 0 &&
33
+ ((_a = transaction.lines[0]) === null || _a === void 0 ? void 0 : _a.account) != null
34
+ ? transaction.lines[0].account.accountName.toLowerCase()
35
+ : null;
36
+ case 'class':
37
+ return transaction.lines != null &&
38
+ transaction.lines.length > 0 &&
39
+ ((_b = transaction.lines[0]) === null || _b === void 0 ? void 0 : _b.class) != null
40
+ ? transaction.lines[0].class.className.toLowerCase()
41
+ : null;
42
+ case 'vendor':
43
+ default:
44
+ return ((_c = transaction.vendorName) !== null && _c !== void 0 ? _c : transaction.description).toLowerCase();
45
+ }
46
+ }, uiState.sortOrder === 'ascending' ? 'asc' : 'desc');
47
+ return {
48
+ fetchState,
49
+ error,
50
+ uploadReceiptStatusById,
51
+ uiState,
52
+ refreshStatus,
53
+ transactions: sortedTransactions,
54
+ completionStatus: transactionIdsForSelectedPeriod != null &&
55
+ fetchState === 'Completed' &&
56
+ transactionIds.length === 0
57
+ ? 'complete'
58
+ : 'incomplete',
59
+ };
60
+ }
61
+ exports.getExpenseAutomationMissingReceiptsView = getExpenseAutomationMissingReceiptsView;
@@ -0,0 +1,54 @@
1
+ import { Currency } from '../../../commonStateTypes/amount';
2
+ import { COABalance } from '../../../commonStateTypes/coaBalance/coaBalance';
3
+ import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
4
+ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
5
+ import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
6
+ import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
7
+ declare const toFluxAnalysisSortKey: (v: string) => "vendor" | "category" | "class";
8
+ export declare type FluxAnalysisSortKey = ReturnType<typeof toFluxAnalysisSortKey>;
9
+ export declare type FluxAnalysisActionType = 'review' | 'unreview';
10
+ export declare type FluxAnalysisReviewStatus = 'Pending Review' | 'Reviewed';
11
+ export interface FluxBalancesByMonth {
12
+ month1: COABalance;
13
+ month2: COABalance;
14
+ }
15
+ export interface FluxAnalysisEntities {
16
+ operatingExpenses: FluxAnalysisOperatingExpense[];
17
+ }
18
+ export interface FluxAnalysisOperatingExpense {
19
+ operatingExpenseId: ID;
20
+ vendorId: ID;
21
+ accountId: ID | undefined;
22
+ classId: ID | undefined;
23
+ userId: ID | undefined;
24
+ varianceAmount: number;
25
+ variancePercentage: number;
26
+ currency: Currency;
27
+ anomalyReason: string;
28
+ status: FluxAnalysisReviewStatus;
29
+ balancesByMonth?: FluxBalancesByMonth;
30
+ }
31
+ export interface FluxAnalysisViewUIState {
32
+ sortKey: FluxAnalysisSortKey;
33
+ sortOrder: SortOrder;
34
+ searchString: string;
35
+ scrollPosition: {
36
+ scrollTop: number;
37
+ scrollLeft?: number;
38
+ } | undefined;
39
+ pageToken: PageToken;
40
+ hasMore: boolean;
41
+ limit?: number;
42
+ totalCount: number;
43
+ }
44
+ export interface FluxAnalysisViewState extends FetchedState {
45
+ fluxAnalysisReportGenerated: boolean;
46
+ fluxAnalysisEntities: FluxAnalysisEntities;
47
+ operatingExpenseIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
48
+ reviewStatusById: Record<ID, FetchStateAndError>;
49
+ bulkReviewStatus: FetchStateAndError;
50
+ refreshStatus: FetchStateAndError;
51
+ uiState: FluxAnalysisViewUIState;
52
+ reviewOperatingExpensesIds: ID[];
53
+ }
54
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
4
+ const FLUX_ANALYSIS_SORT_KEYS = ['vendor', 'category', 'class'];
5
+ const toFluxAnalysisSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, FLUX_ANALYSIS_SORT_KEYS);
@@ -0,0 +1,31 @@
1
+ import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
+ import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
3
+ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
+ import { VendorBase } from '../../../entity/vendor/vendorState';
5
+ export interface JESchedulesViewUIState {
6
+ searchString: string;
7
+ scrollPosition: {
8
+ scrollTop: number;
9
+ scrollLeft?: number;
10
+ } | undefined;
11
+ limit?: number;
12
+ totalCount: number;
13
+ }
14
+ export interface JEScheduleLocalData {
15
+ jeScheduleID: ID;
16
+ scheduledJournalEntryID: ID;
17
+ jeScheduleType?: ScheduleTypes;
18
+ updatedVendor?: VendorBase;
19
+ updatedCategoryId?: ID;
20
+ updatedAccumulatedDepreciationCategoryID?: ID;
21
+ updatedClassId?: ID;
22
+ }
23
+ export interface JESchedulesViewState extends FetchedState {
24
+ jeScheduleTransactionKeysByPeriod: Record<MonthYearPeriodId, JEScheduleTransactionKey[]>;
25
+ failedJeScheduleTransactionKeysByPeriod: Record<MonthYearPeriodId, JEScheduleTransactionKey[]>;
26
+ jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
27
+ postStatusById: Record<ID, FetchStateAndError>;
28
+ ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
29
+ refreshStatus: FetchStateAndError;
30
+ uiState: JESchedulesViewUIState;
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
+ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
3
+ import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
+ export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
5
+ export declare type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
6
+ export interface MissingReceiptsViewUIState {
7
+ searchString: string;
8
+ sortKey: MissingReceiptsSortKey;
9
+ sortOrder: SortOrder;
10
+ scrollPosition: {
11
+ scrollTop: number;
12
+ scrollLeft?: number;
13
+ } | undefined;
14
+ }
15
+ export interface MissingReceiptsViewState extends FetchedState {
16
+ transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
17
+ uploadReceiptStatusById: Record<ID, FetchStateAndError>;
18
+ refreshStatus: FetchStateAndError;
19
+ uiState: MissingReceiptsViewUIState;
20
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toMissingReceiptsSortKey = void 0;
4
+ const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
+ const MISSING_RECEIPTS_SORT_KEYS = [
6
+ 'vendor',
7
+ 'date',
8
+ 'category',
9
+ 'class',
10
+ 'amount',
11
+ ];
12
+ const toMissingReceiptsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, MISSING_RECEIPTS_SORT_KEYS);
13
+ exports.toMissingReceiptsSortKey = toMissingReceiptsSortKey;
@@ -0,0 +1,28 @@
1
+ import { FetchedState, FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
+ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
3
+ import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
4
+ declare const toTransactionsSortKey: (v: string) => "name" | "date" | "vendor" | "category" | "class";
5
+ export declare type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
6
+ export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
7
+ export declare type TransactionsTab = ReturnType<typeof toTransactionsTabKey>;
8
+ interface TransactionsViewUIState {
9
+ searchString: string;
10
+ sortKey: TransactionsSortKey;
11
+ sortOrder: SortOrder;
12
+ nodeCollapseState: Record<ID, boolean>;
13
+ scrollPosition: {
14
+ scrollTop: number;
15
+ scrollLeft?: number;
16
+ } | undefined;
17
+ pageToken: PageToken;
18
+ limit?: number;
19
+ totalCount: number;
20
+ }
21
+ export interface TransactionsViewState extends FetchedState {
22
+ saveStatus: FetchStateAndError;
23
+ updateStatus: FetchStateAndError;
24
+ refreshStatus: FetchStateAndError;
25
+ uiState: TransactionsViewUIState;
26
+ selectedTab: TransactionsTab;
27
+ }
28
+ export {};
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toTransactionsTabKey = void 0;
4
+ const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
+ const TRANSACTIONS_SORT_KEYS = [
6
+ 'vendor',
7
+ 'name',
8
+ 'date',
9
+ 'category',
10
+ 'class',
11
+ ];
12
+ const toTransactionsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_SORT_KEYS);
13
+ const TRANSACTIONS_TABS = ['review', 'autoCategorized'];
14
+ const toTransactionsTabKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_TABS);
15
+ exports.toTransactionsTabKey = toTransactionsTabKey;
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
17
17
  thisPeriod: TimeframeTick;
18
18
  coaBalances: COABalance[];
19
19
  maxNumOfPeriodsToHighlight: number;
20
- }, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
+ }, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
21
  firstMonthOfFY: Month;
22
22
  isCompareModeOn: boolean;
23
23
  additionalBalances: COABalanceType[];
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
4
4
  import { ZeniAPIStatus } from '../../responsePayload';
5
5
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
6
6
  export declare const initialState: GlobalMerchantViewState;
7
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined], {
7
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | undefined], {
8
8
  merchantId: string | undefined;
9
- context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | undefined;
9
+ context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | undefined;
10
10
  }, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
11
11
  merchantId: ID;
12
12
  }, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { fetchMonthEndCloseChecks, updateMonthEndCloseChecksView } from '../monthEndCloseChecksViewReducer';
6
+ import { updateMonthEndCloseChecks } from '../../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
7
+ export declare type ActionType = ReturnType<typeof fetchMonthEndCloseChecks> | ReturnType<typeof updateMonthEndCloseChecksView> | ReturnType<typeof updateMonthEndCloseChecks>;
8
+ export declare const fetchMonthEndCloseChecksEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchMonthEndCloseChecksEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const monthEndCloseChecksViewReducer_1 = require("../monthEndCloseChecksViewReducer");
8
+ const monthEndCloseChecksReducer_1 = require("../../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
9
+ const fetchMonthEndCloseChecksEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks.match), (0, operators_1.switchMap)((action) => {
10
+ const { period, tenantId } = action.payload;
11
+ const month = period.month < 10 ? `0${period.month}` : period.month;
12
+ const queryParam = {
13
+ month_and_year: `${month}-${period.year}`,
14
+ history_month_and_year_flag: true,
15
+ };
16
+ return zeniAPI
17
+ .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/month-close/checks?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
18
+ .pipe((0, operators_1.mergeMap)((response) => {
19
+ if (response.data != null) {
20
+ const actions = [
21
+ (0, monthEndCloseChecksReducer_1.updateMonthEndCloseChecks)({
22
+ monthEndCloseChecksPayload: response.data,
23
+ tenantId,
24
+ period,
25
+ }),
26
+ (0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
27
+ tenantId,
28
+ period,
29
+ fetchState: 'Completed',
30
+ }),
31
+ ];
32
+ return (0, rxjs_1.from)(actions);
33
+ }
34
+ else {
35
+ const actions = [
36
+ (0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
37
+ tenantId,
38
+ period,
39
+ fetchState: 'Error',
40
+ error: response.status,
41
+ }),
42
+ ];
43
+ return (0, rxjs_1.from)(actions);
44
+ }
45
+ }), (0, operators_1.catchError)((error) => {
46
+ const actions = [
47
+ (0, monthEndCloseChecksViewReducer_1.updateMonthEndCloseChecksView)({
48
+ tenantId,
49
+ period,
50
+ fetchState: 'Error',
51
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Fetch Month end close checks REST API call errored out' +
52
+ JSON.stringify(error)),
53
+ }),
54
+ ];
55
+ return (0, rxjs_1.from)(actions);
56
+ }));
57
+ }));
58
+ exports.fetchMonthEndCloseChecksEpic = fetchMonthEndCloseChecksEpic;
@@ -0,0 +1,3 @@
1
+ import { MonthEndCloseChecksPayload } from '../../entity/monthEndCloseChecks/monthEndCloseChecksPayload';
2
+ import { ZeniAPIResponse } from '../../responsePayload';
3
+ export declare type FetchMonthEndCloseChecksResponse = ZeniAPIResponse<MonthEndCloseChecksPayload>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { FetchState, ID } from '../../commonStateTypes/common';
2
+ import { MonthEndCloseChecksViewState } from './monthEndCloseChecksViewState';
3
+ import { ZeniAPIStatus } from '../../responsePayload';
4
+ import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
5
+ export declare const initialState: MonthEndCloseChecksViewState;
6
+ export declare const fetchMonthEndCloseChecks: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
7
+ tenantId: ID;
8
+ period: MonthYearPeriod;
9
+ }, string>, updateMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
+ tenantId: ID;
11
+ period: MonthYearPeriod;
12
+ fetchState: FetchState;
13
+ error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
14
+ }, string>, clearAllMonthEndCloseChecksView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
15
+ declare const _default: import("@reduxjs/toolkit").Reducer<MonthEndCloseChecksViewState, import("@reduxjs/toolkit").AnyAction>;
16
+ export default _default;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearAllMonthEndCloseChecksView = exports.updateMonthEndCloseChecksView = exports.fetchMonthEndCloseChecks = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const timePeriod_1 = require("../../commonStateTypes/timePeriod");
7
+ exports.initialState = {
8
+ monthEndCloseChecksViewByTenantId: {},
9
+ };
10
+ const monthEndCloseChecksView = (0, toolkit_1.createSlice)({
11
+ name: 'monthEndCloseChecksView',
12
+ initialState: exports.initialState,
13
+ reducers: {
14
+ fetchMonthEndCloseChecks(draft, action) {
15
+ const { tenantId, period } = action.payload;
16
+ const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
17
+ draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
18
+ fetchState: 'In-Progress',
19
+ error: undefined,
20
+ } }) });
21
+ },
22
+ updateMonthEndCloseChecksView(draft, action) {
23
+ const { tenantId, period, error, fetchState } = action.payload;
24
+ const monthYearId = (0, timePeriod_1.toMonthYearPeriodId)(period);
25
+ draft.monthEndCloseChecksViewByTenantId = Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId), { [tenantId]: Object.assign(Object.assign({}, draft.monthEndCloseChecksViewByTenantId[tenantId]), { [monthYearId]: {
26
+ fetchState,
27
+ error: error,
28
+ } }) });
29
+ },
30
+ clearAllMonthEndCloseChecksView(draft) {
31
+ draft.monthEndCloseChecksViewByTenantId = {};
32
+ },
33
+ },
34
+ });
35
+ _a = monthEndCloseChecksView.actions, exports.fetchMonthEndCloseChecks = _a.fetchMonthEndCloseChecks, exports.updateMonthEndCloseChecksView = _a.updateMonthEndCloseChecksView, exports.clearAllMonthEndCloseChecksView = _a.clearAllMonthEndCloseChecksView;
36
+ exports.default = monthEndCloseChecksView.reducer;
@@ -0,0 +1,10 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
3
+ import { RootState } from '../../reducer';
4
+ import { MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
5
+ import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
6
+ export interface MonthEndCloseChecksView extends SelectorView {
7
+ monthEndCloseChecks?: MonthEndCloseChecksInfo;
8
+ selectedPeriod: MonthYearPeriod;
9
+ }
10
+ export declare const getMonthEndCloseChecksViewByTenantId: (state: RootState, tenantId: ID) => MonthEndCloseChecksView;