@zeniai/client-epic-state 4.13.11 → 4.13.13

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 (318) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +0 -7
  2. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
  3. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +1 -0
  4. package/lib/commonStateTypes/common.d.ts +0 -2
  5. package/lib/commonStateTypes/common.js +1 -5
  6. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -1
  7. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -2
  8. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
  9. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +1 -0
  10. package/lib/commonStateTypes/timePeriod.d.ts +0 -16
  11. package/lib/commonStateTypes/timePeriod.js +1 -31
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +0 -1
  13. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +1 -3
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  15. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
  16. package/lib/entity/account/accountState.d.ts +1 -1
  17. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  18. package/lib/entity/chargeCard/chargeCard.d.ts +2 -16
  19. package/lib/entity/chargeCard/chargeCard.js +1 -18
  20. package/lib/entity/chargeCard/chargeCardPayload.d.ts +5 -14
  21. package/lib/entity/chargeCard/chargeCardPayload.js +7 -24
  22. package/lib/entity/class/classReducer.d.ts +4 -4
  23. package/lib/entity/class/classState.d.ts +1 -1
  24. package/lib/entity/company/companyPayload.d.ts +0 -4
  25. package/lib/entity/company/companyPayload.js +3 -6
  26. package/lib/entity/company/companyReducer.d.ts +1 -4
  27. package/lib/entity/company/companyReducer.js +2 -6
  28. package/lib/entity/company/companyStateTypes.d.ts +1 -5
  29. package/lib/entity/file/fileState.d.ts +3 -3
  30. package/lib/entity/file/fileState.js +0 -2
  31. package/lib/entity/forecast/forecastState.d.ts +1 -1
  32. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
  33. package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -7
  34. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  35. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -3
  36. package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
  37. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -3
  38. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -2
  39. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -12
  40. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  41. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  42. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  43. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  44. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  45. package/lib/entity/tenant/clearAllEpic.d.ts +2 -12
  46. package/lib/entity/tenant/clearAllEpic.js +0 -20
  47. package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +1 -2
  48. package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +1 -9
  49. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +1 -7
  50. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +2 -34
  51. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  52. package/lib/entity/tenant/tenantReducer.js +0 -3
  53. package/lib/entity/tenant/tenantState.d.ts +0 -1
  54. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  55. package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
  56. package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
  57. package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
  58. package/lib/entity/transaction/transactionSelector.d.ts +0 -1
  59. package/lib/entity/transaction/transactionSelector.js +1 -7
  60. package/lib/entity/user/userPayload.d.ts +0 -1
  61. package/lib/entity/user/userReducer.js +8 -9
  62. package/lib/entity/user/userState.d.ts +0 -1
  63. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +0 -1
  64. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +1 -35
  65. package/lib/entity/vendor/vendorPayload.js +2 -3
  66. package/lib/entity/vendor/vendorState.d.ts +3 -3
  67. package/lib/entity/vendor/vendorType.d.ts +2 -0
  68. package/lib/entity/vendor/vendorType.js +4 -1
  69. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  70. package/lib/entity/vendorExpense/vendorExpenseSelector.js +0 -1
  71. package/lib/epic.d.ts +2 -18
  72. package/lib/epic.js +2 -18
  73. package/lib/index.d.ts +21 -65
  74. package/lib/index.js +28 -102
  75. package/lib/reducer.d.ts +1 -31
  76. package/lib/reducer.js +1 -31
  77. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -7
  78. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +1 -7
  79. package/lib/view/addressView/addressViewState.d.ts +1 -1
  80. package/lib/view/addressView/toAddressViewLocalData.d.ts +0 -2
  81. package/lib/view/addressView/toAddressViewLocalData.js +3 -9
  82. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  83. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  84. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  85. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  86. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  87. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  88. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  89. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  90. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  91. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  92. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
  93. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  94. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +5 -10
  95. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +7 -10
  96. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
  97. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
  98. package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +3 -5
  99. package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
  100. package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
  101. package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +6 -1
  102. package/lib/view/companyView/selectorHelpers/getCompanyView.js +0 -4
  103. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  104. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +0 -2
  105. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +1 -7
  106. package/lib/view/companyView/types/companyView.d.ts +0 -1
  107. package/lib/view/dashboard/dashboardEpic.d.ts +1 -2
  108. package/lib/view/dashboard/dashboardEpic.js +2 -22
  109. package/lib/view/dashboard/dashboardReducer.d.ts +2 -3
  110. package/lib/view/dashboard/dashboardReducer.js +1 -2
  111. package/lib/view/dashboard/dashboardSelector.d.ts +0 -2
  112. package/lib/view/dashboard/dashboardSelector.js +2 -10
  113. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  114. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  115. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +1 -8
  116. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +1 -3
  117. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -5
  118. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -2
  119. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -6
  120. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  121. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  122. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  123. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  124. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  125. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  126. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  127. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  128. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -3
  129. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
  130. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
  131. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +5 -19
  132. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +3 -8
  133. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +57 -39
  134. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +8 -13
  135. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +12 -19
  136. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +0 -1
  137. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +3 -4
  138. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +0 -2
  139. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  140. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  141. package/lib/view/settingsView/epic/updateMyProfileEpic.js +4 -6
  142. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -1
  143. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
  144. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
  145. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
  146. package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +1 -2
  147. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +1 -3
  148. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +2 -6
  149. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +3 -2
  150. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
  151. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +3 -1
  152. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +2 -1
  153. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +21 -1
  154. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +3 -1
  155. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -1
  156. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +0 -4
  157. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +1 -8
  158. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +2 -25
  159. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -1
  160. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +4 -8
  161. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +1 -2
  162. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +14 -1
  163. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +13 -2
  164. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +6 -3
  165. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +17 -2
  166. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +2 -8
  167. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +15 -55
  168. package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.d.ts +2 -3
  169. package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.js +18 -35
  170. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
  171. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +6 -31
  172. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
  173. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -5
  174. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -4
  175. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
  176. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
  177. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -4
  178. package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
  179. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  180. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  181. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  182. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  183. package/lib/view/topEx/topExSelector.d.ts +1 -1
  184. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
  185. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  186. package/lib/view/userListView/fetchUserListByTypeEpic.js +1 -4
  187. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
  188. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
  189. package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
  190. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +3 -34
  191. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
  192. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  193. package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +5 -2
  194. package/package.json +1 -1
  195. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -32
  196. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -60
  197. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +0 -12
  198. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +0 -25
  199. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +0 -7
  200. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +0 -36
  201. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +0 -38
  202. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +0 -10
  203. package/lib/view/countryList/countryListReducer.d.ts +0 -17
  204. package/lib/view/countryList/countryListReducer.js +0 -58
  205. package/lib/view/countryList/countryListSelector.d.ts +0 -7
  206. package/lib/view/countryList/countryListSelector.js +0 -13
  207. package/lib/view/countryList/countryListState.d.ts +0 -12
  208. package/lib/view/countryList/countryListState.js +0 -2
  209. package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +0 -6
  210. package/lib/view/countryList/epics/fetchCountryListEpic.js +0 -19
  211. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +0 -7
  212. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +0 -38
  213. package/lib/view/countryList/payloads/countryListPayload.d.ts +0 -6
  214. package/lib/view/countryList/payloads/countryListPayload.js +0 -10
  215. package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +0 -11
  216. package/lib/view/countryList/payloads/nationalityCountryListPayload.js +0 -2
  217. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +0 -10
  218. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +0 -72
  219. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +0 -11
  220. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -53
  221. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +0 -11
  222. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +0 -66
  223. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +0 -7
  224. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +0 -39
  225. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +0 -7
  226. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -22
  227. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +0 -8
  228. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +0 -59
  229. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +0 -8
  230. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +0 -78
  231. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +0 -6
  232. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +0 -28
  233. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +0 -9
  234. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +0 -78
  235. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +0 -8
  236. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +0 -58
  237. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +0 -10
  238. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +0 -12
  239. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +0 -3
  240. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +0 -2
  241. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +0 -17
  242. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +0 -66
  243. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +0 -3
  244. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -97
  245. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -11
  246. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +0 -14
  247. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +0 -7
  248. package/lib/view/expenseAutomationView/helpers/helpers.js +0 -67
  249. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +0 -76
  250. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +0 -9
  251. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -36
  252. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -58
  253. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -16
  254. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -2
  255. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +0 -34
  256. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +0 -205
  257. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +0 -53
  258. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +0 -245
  259. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +0 -31
  260. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +0 -130
  261. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +0 -5
  262. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -45
  263. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -34
  264. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +0 -44
  265. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +0 -32
  266. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +0 -2
  267. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -28
  268. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +0 -2
  269. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +0 -11
  270. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +0 -2
  271. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +0 -3
  272. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +0 -55
  273. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -7
  274. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +0 -95
  275. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +0 -3
  276. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -61
  277. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +0 -53
  278. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +0 -5
  279. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -31
  280. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -2
  281. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -20
  282. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -13
  283. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -28
  284. package/lib/view/expenseAutomationView/types/transactionsViewState.js +0 -15
  285. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +0 -8
  286. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +0 -58
  287. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +0 -3
  288. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +0 -2
  289. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +0 -16
  290. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +0 -36
  291. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +0 -10
  292. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +0 -27
  293. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +0 -5
  294. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +0 -2
  295. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +0 -7
  296. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +0 -36
  297. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +0 -6
  298. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +0 -42
  299. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +0 -9
  300. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +0 -67
  301. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +0 -26
  302. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +0 -22
  303. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +0 -22
  304. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -89
  305. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +0 -15
  306. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +0 -30
  307. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +0 -20
  308. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +0 -2
  309. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +0 -11
  310. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +0 -42
  311. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +0 -9
  312. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +0 -44
  313. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +0 -15
  314. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +0 -65
  315. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -22
  316. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -76
  317. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -28
  318. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -23
@@ -1,10 +1,12 @@
1
1
  import { Amount } from '../../../../commonStateTypes/amount';
2
2
  import { FetchedState, FetchStateAndError, ID } from '../../../../commonStateTypes/common';
3
+ import { CreditLimitFrequencyCodeType } from '../../../../entity/chargeCard/chargeCard';
3
4
  import { SpendManagementUIState } from '../../billPay/billList/billListState';
4
5
  export interface ChargeCardListState extends FetchedState {
5
6
  cardIds: ID[];
6
7
  uiState: ChargeCardListUIState;
7
8
  creditAccount: CreditAccount;
9
+ issueChargeCard: IssueChargeCard;
8
10
  searchText: string;
9
11
  unAssignedCredits?: Amount;
10
12
  resendCardInvite: ResendRevokeCardInvite;
@@ -17,6 +19,16 @@ export interface ResendRevokeCardInvite {
17
19
  export interface ChargeCardListUIState extends SpendManagementUIState {
18
20
  sortKey: ChargeCardViewSortKey;
19
21
  }
22
+ export interface IssueChargeCard {
23
+ localData: ChargeCardLocalData;
24
+ saveStatus: FetchStateAndError;
25
+ }
26
+ export interface ChargeCardLocalData {
27
+ userIds: ID[];
28
+ cardName: string;
29
+ amount?: Amount;
30
+ frequency: CreditLimitFrequencyCodeType;
31
+ }
20
32
  export interface CreditAccount extends FetchStateAndError {
21
33
  id: ID;
22
34
  status: CreditAccountStatusType;
@@ -27,8 +39,9 @@ export interface CreditAccount extends FetchStateAndError {
27
39
  cashback?: Amount;
28
40
  }
29
41
  export declare const initialCreditAcc: CreditAccount;
42
+ export declare const initialIssueChargeCard: IssueChargeCard;
30
43
  export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
31
- export declare const toChargeCardSortKeyType: (v: string) => "status" | "owner" | "limit" | "department" | "cardName" | "utilisation";
44
+ export declare const toChargeCardSortKeyType: (v: string) => "owner" | "department" | "cardName" | "utilisation" | "limit";
32
45
  export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
33
46
  export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
34
47
  export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toCreditAccountStatusType = exports.toCashbackSortKeyType = exports.ALL_CASHBACK_SORT_KEYS = exports.toChargeCardSortKeyType = exports.initialResendRevokeCardInvite = exports.initialCreditAcc = void 0;
3
+ exports.toCreditAccountStatusType = exports.toCashbackSortKeyType = exports.ALL_CASHBACK_SORT_KEYS = exports.toChargeCardSortKeyType = exports.initialResendRevokeCardInvite = exports.initialIssueChargeCard = exports.initialCreditAcc = void 0;
4
4
  const stringToUnion_1 = require("../../../../commonStateTypes/stringToUnion");
5
5
  exports.initialCreditAcc = {
6
6
  fetchState: 'Not-Started',
@@ -33,6 +33,18 @@ exports.initialCreditAcc = {
33
33
  currencySymbol: '$',
34
34
  },
35
35
  };
36
+ exports.initialIssueChargeCard = {
37
+ localData: {
38
+ userIds: [],
39
+ cardName: '',
40
+ amount: undefined,
41
+ frequency: 'monthly',
42
+ },
43
+ saveStatus: {
44
+ fetchState: 'Not-Started',
45
+ error: undefined,
46
+ },
47
+ };
36
48
  exports.initialResendRevokeCardInvite = {
37
49
  cardId: undefined,
38
50
  saveStatus: {
@@ -44,7 +56,6 @@ const ALL_CHARGE_CARD_SORT_KEYS = [
44
56
  'owner',
45
57
  'cardName',
46
58
  'department',
47
- 'status',
48
59
  'utilisation',
49
60
  'limit',
50
61
  ];
@@ -1,7 +1,7 @@
1
1
  import { ZeniAPIStatus } from '../../../../responsePayload';
2
2
  import { ChargeCardListPayload, CreditAccountPayload } from './chargeCardListPayload';
3
- import { ChargeCardListState, ChargeCardListUIState } from './chargeCardList';
4
- import { ID } from '../../../../commonStateTypes/common';
3
+ import { ChargeCardListState, ChargeCardListUIState, ChargeCardLocalData } from './chargeCardList';
4
+ import { FetchState, ID } from '../../../../commonStateTypes/common';
5
5
  export declare const initialState: ChargeCardListState;
6
6
  export declare const fetchChargeCardListPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[doFetchCreditAccountsAndCashback: boolean, cacheOverride?: any], {
7
7
  doFetchCreditAccountsAndCashback: boolean;
@@ -9,7 +9,10 @@ export declare const fetchChargeCardListPage: import("@reduxjs/toolkit").ActionC
9
9
  }, string, never, never>, fetchCreditAccount: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateCreditAccount: import("@reduxjs/toolkit").ActionCreatorWithPayload<CreditAccountPayload[], string>, updateCreditAccountFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, fetchChargeCardList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateChargeCardList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  chargeCardListPayload: ChargeCardListPayload;
11
11
  keepExistingListItems?: boolean | undefined;
12
- }, string>, updateChargeCardListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, updateSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, updateChargeCardListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
+ }, string>, updateChargeCardListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, issueChargeCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateChargeCardLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChargeCardLocalData, string>, issueChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
+ fetchState: FetchState;
14
+ error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
15
+ }, string>, resetIssueChargeCardForm: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, updateChargeCardListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
16
  uiState: Partial<ChargeCardListUIState>;
14
17
  }, string>, clearChargeCardList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resendCardInvite: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cardId: string], {
15
18
  cardId: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.revokeCardInviteFailure = exports.revokeCardInviteSuccess = exports.revokeCardInvite = exports.resendCardInviteFailure = exports.resendCardInviteSuccess = exports.resendCardInvite = exports.clearChargeCardList = exports.updateChargeCardListUIState = exports.updateSearchText = exports.updateChargeCardListFailure = exports.updateChargeCardList = exports.fetchChargeCardList = exports.updateCreditAccountFailure = exports.updateCreditAccount = exports.fetchCreditAccount = exports.fetchChargeCardListPage = exports.initialState = void 0;
4
+ exports.revokeCardInviteFailure = exports.revokeCardInviteSuccess = exports.revokeCardInvite = exports.resendCardInviteFailure = exports.resendCardInviteSuccess = exports.resendCardInvite = exports.clearChargeCardList = exports.updateChargeCardListUIState = exports.updateSearchText = exports.resetIssueChargeCardForm = exports.issueChargeCardSuccessOrFailure = exports.updateChargeCardLocalStore = exports.issueChargeCard = exports.updateChargeCardListFailure = exports.updateChargeCardList = exports.fetchChargeCardList = exports.updateCreditAccountFailure = exports.updateCreditAccount = exports.fetchCreditAccount = exports.fetchChargeCardListPage = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const chargeCardList_1 = require("./chargeCardList");
7
7
  const amount_1 = require("../../../../commonStateTypes/amount");
@@ -15,6 +15,7 @@ exports.initialState = {
15
15
  hasValidState() {
16
16
  return this.fetchState == 'Completed';
17
17
  },
18
+ issueChargeCard: chargeCardList_1.initialIssueChargeCard,
18
19
  uiState: {
19
20
  sortKey: 'owner',
20
21
  sortOrder: 'ascending',
@@ -70,6 +71,20 @@ const chargeCardList = (0, toolkit_1.createSlice)({
70
71
  draft.fetchState = 'Error';
71
72
  draft.error = action.payload;
72
73
  },
74
+ issueChargeCard(draft) {
75
+ draft.issueChargeCard.saveStatus.fetchState = 'In-Progress';
76
+ draft.issueChargeCard.saveStatus.error = undefined;
77
+ },
78
+ updateChargeCardLocalStore(draft, action) {
79
+ draft.issueChargeCard.localData = action.payload;
80
+ },
81
+ resetIssueChargeCardForm(draft) {
82
+ draft.issueChargeCard = Object.assign({}, exports.initialState.issueChargeCard);
83
+ },
84
+ issueChargeCardSuccessOrFailure(draft, action) {
85
+ draft.issueChargeCard.saveStatus.fetchState = action.payload.fetchState;
86
+ draft.issueChargeCard.saveStatus.error = action.payload.error;
87
+ },
73
88
  updateSearchText(draft, action) {
74
89
  draft.searchText = action.payload;
75
90
  },
@@ -128,7 +143,7 @@ const chargeCardList = (0, toolkit_1.createSlice)({
128
143
  },
129
144
  },
130
145
  });
131
- _a = chargeCardList.actions, exports.fetchChargeCardListPage = _a.fetchChargeCardListPage, exports.fetchCreditAccount = _a.fetchCreditAccount, exports.updateCreditAccount = _a.updateCreditAccount, exports.updateCreditAccountFailure = _a.updateCreditAccountFailure, exports.fetchChargeCardList = _a.fetchChargeCardList, exports.updateChargeCardList = _a.updateChargeCardList, exports.updateChargeCardListFailure = _a.updateChargeCardListFailure, exports.updateSearchText = _a.updateSearchText, exports.updateChargeCardListUIState = _a.updateChargeCardListUIState, exports.clearChargeCardList = _a.clearChargeCardList, exports.resendCardInvite = _a.resendCardInvite, exports.resendCardInviteSuccess = _a.resendCardInviteSuccess, exports.resendCardInviteFailure = _a.resendCardInviteFailure, exports.revokeCardInvite = _a.revokeCardInvite, exports.revokeCardInviteSuccess = _a.revokeCardInviteSuccess, exports.revokeCardInviteFailure = _a.revokeCardInviteFailure;
146
+ _a = chargeCardList.actions, exports.fetchChargeCardListPage = _a.fetchChargeCardListPage, exports.fetchCreditAccount = _a.fetchCreditAccount, exports.updateCreditAccount = _a.updateCreditAccount, exports.updateCreditAccountFailure = _a.updateCreditAccountFailure, exports.fetchChargeCardList = _a.fetchChargeCardList, exports.updateChargeCardList = _a.updateChargeCardList, exports.updateChargeCardListFailure = _a.updateChargeCardListFailure, exports.issueChargeCard = _a.issueChargeCard, exports.updateChargeCardLocalStore = _a.updateChargeCardLocalStore, exports.issueChargeCardSuccessOrFailure = _a.issueChargeCardSuccessOrFailure, exports.resetIssueChargeCardForm = _a.resetIssueChargeCardForm, exports.updateSearchText = _a.updateSearchText, exports.updateChargeCardListUIState = _a.updateChargeCardListUIState, exports.clearChargeCardList = _a.clearChargeCardList, exports.resendCardInvite = _a.resendCardInvite, exports.resendCardInviteSuccess = _a.resendCardInviteSuccess, exports.resendCardInviteFailure = _a.resendCardInviteFailure, exports.revokeCardInvite = _a.revokeCardInvite, exports.revokeCardInviteSuccess = _a.revokeCardInviteSuccess, exports.revokeCardInviteFailure = _a.revokeCardInviteFailure;
132
147
  exports.default = chargeCardList.reducer;
133
148
  // helper
134
149
  const toCreditAccount = (payload) => ({
@@ -7,7 +7,7 @@ import { Class, ClassBase } from '../../../../entity/class/classState';
7
7
  import { User } from '../../../../entity/user/userState';
8
8
  import { UserRole } from '../../../../entity/userRole/userRoleState';
9
9
  import { RootState } from '../../../../reducer';
10
- import { ChargeCardListUIState, CreditAccount, ResendRevokeCardInvite } from './chargeCardList';
10
+ import { ChargeCardListUIState, CreditAccount, IssueChargeCard, ResendRevokeCardInvite } from './chargeCardList';
11
11
  import { Person } from '../../../people/peopleSelectorTypes';
12
12
  import { ChargeCardConfigState } from '../chargeCardConfig/chargeCardConfigState';
13
13
  export interface ChargeCardWithUser extends ChargeCard {
@@ -18,14 +18,12 @@ export interface ChargeCardWithUser extends ChargeCard {
18
18
  department?: ClassBase;
19
19
  mailingAddress?: Address;
20
20
  }
21
- export interface ChargeCardWithUserAndShippingAddress extends ChargeCardWithUser {
22
- shippingAddress?: Address;
23
- }
24
21
  export interface ChargeCardListSelectorView extends SelectorView {
25
22
  totalCashback: Amount;
26
23
  cards: ChargeCardWithUser[];
27
24
  creditAccount: CreditAccount;
28
25
  chargeCardConfig: ChargeCardConfigState;
26
+ issueChargeCard: IssueChargeCard;
29
27
  userList: Person[];
30
28
  allAccountingClasses: Class[];
31
29
  issueCardPageFetchState: FetchStateAndError;
@@ -35,10 +33,6 @@ export interface ChargeCardListSelectorView extends SelectorView {
35
33
  revokeCardInvite: ResendRevokeCardInvite;
36
34
  unAssignedCredits?: Amount;
37
35
  }
38
- export interface ChargeCardListWithShippingAddressSelectorView extends SelectorView {
39
- cards: ChargeCardWithUserAndShippingAddress[];
40
- }
41
36
  export declare const getChargeCardListView: (state: RootState, includeCreditAccountAndCashbackInfo: boolean) => ChargeCardListSelectorView;
42
- export declare const getMyChargeCardListWithShippingAddress: (state: RootState) => ChargeCardListWithShippingAddressSelectorView;
43
37
  export declare const anyCardOnHold: (cards: ChargeCardWithUser[]) => boolean;
44
38
  export declare const getCreditAccount: (state: RootState) => CreditAccount;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getCreditAccount = exports.anyCardOnHold = exports.getMyChargeCardListWithShippingAddress = exports.getChargeCardListView = void 0;
6
+ exports.getCreditAccount = exports.anyCardOnHold = exports.getChargeCardListView = void 0;
7
7
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
8
8
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
9
9
  const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
@@ -79,8 +79,6 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
79
79
  return card.cardName.toLowerCase();
80
80
  case 'department':
81
81
  return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className.toLowerCase()) !== null && _d !== void 0 ? _d : '';
82
- case 'status':
83
- return card.status.code;
84
82
  case 'utilisation':
85
83
  return card.limit.amount - card.available.amount;
86
84
  case 'limit':
@@ -88,7 +86,19 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
88
86
  return card.limit.amount;
89
87
  }
90
88
  };
91
- const cardsInOrder = (0, orderBy_1.default)(chargeCardsWithUserFiltered, (person) => getCardsBySortKey(person, sortKey), sortOrder);
89
+ let inviteAcceptedCards = [];
90
+ let inviteNotAcceptedCards = [];
91
+ chargeCardsWithUserFiltered.forEach((card) => {
92
+ if (card.status.code !== 'request_on_hold') {
93
+ inviteAcceptedCards.push(card);
94
+ }
95
+ else {
96
+ inviteNotAcceptedCards.push(card);
97
+ }
98
+ });
99
+ inviteAcceptedCards = (0, orderBy_1.default)(inviteAcceptedCards, (person) => getCardsBySortKey(person, sortKey), sortOrder);
100
+ inviteNotAcceptedCards = (0, orderBy_1.default)(inviteNotAcceptedCards, (person) => getCardsBySortKey(person, sortKey), sortOrder);
101
+ const cardsInOrder = [...inviteAcceptedCards, ...inviteNotAcceptedCards];
92
102
  const userListSelectorView = (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'cardHolderCandidate');
93
103
  const userList = userListSelectorView.users;
94
104
  const fetchState = includeCreditAccountAndCashbackInfo === true
@@ -117,6 +127,7 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
117
127
  unAssignedCredits: chargeCardListState.unAssignedCredits,
118
128
  creditAccount: chargeCardListState.creditAccount,
119
129
  chargeCardConfig: chargeCardConfigState,
130
+ issueChargeCard: chargeCardListState.issueChargeCard,
120
131
  userList,
121
132
  allAccountingClasses,
122
133
  issueCardPageFetchState,
@@ -128,57 +139,6 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
128
139
  };
129
140
  };
130
141
  exports.getChargeCardListView = getChargeCardListView;
131
- const getMyChargeCardListWithShippingAddress = (state) => {
132
- var _a, _b;
133
- const { tenantState, addressState, chargeCardListState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, } = state;
134
- const userId = (_b = (_a = tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
135
- const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
136
- const chargeCardsWithUserAndShippingAddress = [];
137
- cards
138
- .filter((chargeCard) => chargeCard.cardHolderUserId === userId)
139
- .forEach((chargeCard) => {
140
- const cardHolderUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardHolderUserId);
141
- const cardCreatedByUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardCreaterUserId);
142
- const cardHolderUserRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, chargeCard.cardHolderUserId);
143
- const department = cardHolderUserRole != null
144
- ? (0, classSelector_1.getClassById)(classState, {
145
- classId: cardHolderUserRole.accountingClassIDs[0],
146
- reportId: 'class_list',
147
- })
148
- : undefined;
149
- const mailingAddress = chargeCard.mailingAddressId != null
150
- ? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.mailingAddressId)
151
- : undefined;
152
- const billingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.billingAddressId);
153
- const shippingAddress = chargeCard.shippingAddressId != null
154
- ? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.shippingAddressId)
155
- : undefined;
156
- if (cardCreatedByUser == null ||
157
- cardHolderUser == null ||
158
- cardHolderUserRole == null ||
159
- billingAddress == null) {
160
- console.error(`Cannot find details for card ${chargeCard.cardName} id ${chargeCard.id} - Created by ${cardCreatedByUser === null || cardCreatedByUser === void 0 ? void 0 : cardCreatedByUser.firstName}, for ${cardHolderUser === null || cardHolderUser === void 0 ? void 0 : cardHolderUser.firstName} with role ${cardHolderUserRole} and billing address in ${billingAddress === null || billingAddress === void 0 ? void 0 : billingAddress.country}.`);
161
- }
162
- else {
163
- chargeCardsWithUserAndShippingAddress.push(Object.assign(Object.assign({}, chargeCard), { cardHolderUser,
164
- cardCreatedByUser, cardHolderRoles: cardHolderUserRole, billingAddress,
165
- department,
166
- mailingAddress,
167
- shippingAddress }));
168
- }
169
- });
170
- const fetchState = (0, reduceFetchState_1.reduceFetchState)([
171
- chargeCardListState,
172
- chargeCardConfigState,
173
- ]).fetchState;
174
- return {
175
- fetchState,
176
- error: chargeCardListState.error,
177
- cards: chargeCardsWithUserAndShippingAddress,
178
- version: '1.0',
179
- };
180
- };
181
- exports.getMyChargeCardListWithShippingAddress = getMyChargeCardListWithShippingAddress;
182
142
  const anyCardOnHold = (cards) => {
183
143
  return cards.reduce((prevValue, currentValue) => {
184
144
  return (prevValue === true && currentValue.status.code === 'request_on_hold');
@@ -6,8 +6,7 @@ import { updateChargeCards } from '../../../../entity/chargeCard/chargeCardReduc
6
6
  import { updateAllUsers } from '../../../../entity/user/userReducer';
7
7
  import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
8
8
  import { updateAddresses } from '../../../../entity/address/addressReducer';
9
+ import { issueChargeCard, issueChargeCardSuccessOrFailure, updateChargeCardList } from './chargeCardListReducer';
9
10
  import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
10
- import { issueChargeCards, issueChargeCardSuccessOrFailure } from './issueChargeCardReducer';
11
- import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
12
- export declare type ActionType = ReturnType<typeof issueChargeCards> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
11
+ export declare type ActionType = ReturnType<typeof issueChargeCard> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
13
12
  export declare const issueChargeCardEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -8,39 +8,22 @@ const chargeCardReducer_1 = require("../../../../entity/chargeCard/chargeCardRed
8
8
  const userReducer_1 = require("../../../../entity/user/userReducer");
9
9
  const userRoleReducer_1 = require("../../../../entity/userRole/userRoleReducer");
10
10
  const addressReducer_1 = require("../../../../entity/address/addressReducer");
11
+ const chargeCardListReducer_1 = require("./chargeCardListReducer");
11
12
  const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
12
- const issueChargeCardReducer_1 = require("./issueChargeCardReducer");
13
- const chargeCardListReducer_1 = require("../chargeCardList/chargeCardListReducer");
14
- const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(issueChargeCardReducer_1.issueChargeCards.match), (0, operators_1.switchMap)(() => {
13
+ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardListReducer_1.issueChargeCard.match), (0, operators_1.switchMap)(() => {
14
+ var _a, _b, _c, _d;
15
15
  const state = state$.value;
16
- const localData = state.issueChargeCardState.localData;
17
- const payload = localData.map((data) => {
18
- var _a, _b, _c, _d, _e, _f, _g, _h;
19
- if (data.cardType === 'business_physical_credit_card') {
20
- return {
21
- card_holder_user_ids: data.physicalCard.userIds != null
22
- ? [data.physicalCard.userIds]
23
- : [],
24
- card_name: data.physicalCard.cardName,
25
- credit_limit: (_b = (_a = data.physicalCard.amount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
26
- currency_code: (_d = (_c = data.physicalCard.amount) === null || _c === void 0 ? void 0 : _c.currencyCode) !== null && _d !== void 0 ? _d : 'USD',
27
- credit_limit_frequency: { code: data.physicalCard.frequency },
28
- card_type: data.cardType,
29
- shipping_address_type: data.physicalCard.addressType,
30
- shipping_address_id: data.physicalCard.addressId,
31
- };
32
- }
33
- else {
34
- return {
35
- card_holder_user_ids: data.virtualCard.userIds,
36
- card_name: data.virtualCard.cardName,
37
- credit_limit: (_f = (_e = data.virtualCard.amount) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : 0,
38
- currency_code: (_h = (_g = data.virtualCard.amount) === null || _g === void 0 ? void 0 : _g.currencyCode) !== null && _h !== void 0 ? _h : 'USD',
39
- credit_limit_frequency: { code: data.virtualCard.frequency },
40
- card_type: data.cardType,
41
- };
42
- }
43
- });
16
+ const localData = state.chargeCardListState.issueChargeCard.localData;
17
+ const payload = [
18
+ {
19
+ card_holder_user_ids: localData.userIds,
20
+ card_name: localData.cardName,
21
+ credit_limit: (_b = (_a = localData.amount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
22
+ currency_code: (_d = (_c = localData.amount) === null || _c === void 0 ? void 0 : _c.currencyCode) !== null && _d !== void 0 ? _d : 'USD',
23
+ credit_limit_frequency: { code: localData.frequency },
24
+ card_type: 'business_virtual_credit_card',
25
+ },
26
+ ];
44
27
  return zeniAPI
45
28
  .postAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards`, { cards: payload })
46
29
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -49,7 +32,7 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
49
32
  actions.push((0, chargeCardReducer_1.updateChargeCards)(response.data.cards), (0, userReducer_1.updateAllUsers)({ users: response.data.users }), (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles), (0, chargeCardListReducer_1.updateChargeCardList)({
50
33
  chargeCardListPayload: response.data,
51
34
  keepExistingListItems: true,
52
- }), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({ fetchState: 'Completed' }));
35
+ }), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({ fetchState: 'Completed' }));
53
36
  const cardHolderIds = response.data.cards.map((card) => card.holder_user_id);
54
37
  const names = response.data.users
55
38
  .filter((user) => cardHolderIds.includes(user.user_id))
@@ -62,20 +45,20 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
62
45
  variables: [
63
46
  {
64
47
  variableName: '_user-name_',
65
- variableValue: names,
48
+ variableValue: names !== null && names !== void 0 ? names : '',
66
49
  },
67
50
  ],
68
51
  }));
69
52
  return (0, rxjs_1.from)(actions);
70
53
  }
71
54
  else {
72
- return (0, rxjs_1.of)((0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({
55
+ return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
73
56
  fetchState: 'Error',
74
57
  error: response.status,
75
58
  }));
76
59
  }
77
60
  }), (0, operators_1.catchError)((error) => {
78
- return (0, rxjs_1.of)((0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({
61
+ return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
79
62
  fetchState: 'Error',
80
63
  error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Issue Charge Card REST API call errored out' +
81
64
  JSON.stringify(error)),
@@ -16,6 +16,6 @@ import { CompanyDetailsVerificationPayload, CompanyOfficerVerificationPayload, N
16
16
  import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData } from '../../setupViewState';
17
17
  export declare type ActionType = ReturnType<typeof updateBusinessVerificationDetails> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof updateSelectedCompanyOfficer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateBusinessVerificationDetailsSuccess> | ReturnType<typeof updateBusinessVerificationDetailsFailure>;
18
18
  export declare const updateBusinessVerificationDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
19
- export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined, registeredAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
19
+ export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
20
20
  export declare const toBusinessVerificationPrimaryContactDataPayload: (primaryContact: PrimaryContactLocalData, isNewPrimaryContactUser: boolean) => Partial<PrimaryContactVerificationPayload>;
21
21
  export declare const toBusinessVerificationOfficerDataPayload: (companyOfficer: CompanyOfficerLocalData, isSubmittingAdditionalDocuments: boolean, companyOfficerAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyOfficerVerificationPayload> | Partial<NewCompanyOfficerVerificationPayload>;
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.toBusinessVerificationOfficerDataPayload = exports.toBusinessVerificationPrimaryContactDataPayload = exports.toBusinessVerificationCompanyDataPayload = exports.updateBusinessVerificationDetailsEpic = void 0;
7
4
  const rxjs_1 = require("rxjs");
@@ -18,10 +15,8 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
18
15
  const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
19
16
  const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
20
17
  const setupViewReducer_1 = require("../../setupViewReducer");
21
- const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
22
- const isEqual_1 = __importDefault(require("lodash/isEqual"));
23
18
  const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
24
- var _a, _b, _c, _d;
19
+ var _a, _b, _c;
25
20
  const { companyId, officerType, setupViewType, sendForVerification, fromBillListScreen, isSubmittingAdditionalDocuments, } = action.payload;
26
21
  const { setupViewState } = state$.value;
27
22
  const companyLocalData = setupViewState.companyDetails.localData;
@@ -31,15 +26,14 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
31
26
  const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
32
27
  const { newAddressState } = state$.value.addressViewState;
33
28
  const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
34
- const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
35
29
  const addressType = officerType
36
30
  .toLowerCase()
37
31
  .concat('_address');
38
- const companyOfficerAddressToCreate = (_c = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _c === void 0 ? void 0 : _c.addressToCreate;
32
+ const companyOfficerAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _b === void 0 ? void 0 : _b.addressToCreate;
39
33
  const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
40
34
  (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
41
- ((_d = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _d === void 0 ? void 0 : _d.user.email);
42
- const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate, registeredAddressToCreate);
35
+ ((_c = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _c === void 0 ? void 0 : _c.user.email);
36
+ const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
43
37
  const primary_contact_user = primaryContactLocalData != null &&
44
38
  Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
45
39
  ? (0, exports.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
@@ -110,7 +104,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
110
104
  }
111
105
  }));
112
106
  exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
113
- const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData, registeredAddressData) => {
107
+ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData) => {
114
108
  const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, } = companyLocalData;
115
109
  const company = {
116
110
  is_ready_for_verification: sendForVerification,
@@ -119,19 +113,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
119
113
  const companyAddressPayload = companyAddressData != null
120
114
  ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(companyAddressData)
121
115
  : undefined;
122
- const registeredAddressPayload = registeredAddressData != null
123
- ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(registeredAddressData)
124
- : undefined;
125
- if ((0, isEqual_1.default)(companyAddressData != null
126
- ? (0, addressViewSelector_1.getFormattedAddress)(companyAddressData)
127
- : companyAddressData, registeredAddressData != null
128
- ? (0, addressViewSelector_1.getFormattedAddress)(registeredAddressData)
129
- : registeredAddressData)) {
130
- company['is_registered_address_same_as_company_address'] = true;
131
- }
132
- else {
133
- company['is_registered_address_same_as_company_address'] = false;
134
- }
135
116
  if (companyDescription != null) {
136
117
  company['company_description'] = companyDescription;
137
118
  }
@@ -156,9 +137,6 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
156
137
  if (companyAddressPayload != null) {
157
138
  company['address'] = companyAddressPayload;
158
139
  }
159
- if (registeredAddressPayload != null) {
160
- company['registered_address'] = registeredAddressPayload;
161
- }
162
140
  if (typeOfIncorporation != null) {
163
141
  company['company_inc_type'] = typeOfIncorporation;
164
142
  }
@@ -185,7 +163,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
185
163
  };
186
164
  exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
187
165
  const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
188
- const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, nationalityCountryCode, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
166
+ const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
189
167
  const company_officer = {
190
168
  first_name: firstName,
191
169
  last_name: lastName,
@@ -216,9 +194,6 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
216
194
  if (birthday != null) {
217
195
  company_officer['birthday'] = birthday.format('YYYY-MM-DD');
218
196
  }
219
- if (nationalityCountryCode != null) {
220
- company_officer['nationality_country_code'] = nationalityCountryCode;
221
- }
222
197
  if (userPhone != null) {
223
198
  company_officer['phone'] = userPhone;
224
199
  }
@@ -5,8 +5,8 @@ import { Company } from '../../../../../entity/company/companyStateTypes';
5
5
  import { clearSetupViewDataInLocalStore, saveSetupViewDataInLocalStore, updateSetupViewLocalStoreData } from '../../setupViewReducer';
6
6
  import { SetupViewLocalData } from '../../setupViewState';
7
7
  import { UserRole } from '../../../../../entity/userRole/userRoleState';
8
- import { newAddressInLocalStore, resetNewAddressDataInLocalStoreForAddressTypes } from '../../../../addressView/addressViewReducer';
9
- export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressDataInLocalStoreForAddressTypes> | ReturnType<typeof newAddressInLocalStore>;
8
+ import { newAddressInLocalStore, resetNewAddressesInLocalStore } from '../../../../addressView/addressViewReducer';
9
+ export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressesInLocalStore> | ReturnType<typeof newAddressInLocalStore>;
10
10
  export declare const updateSetupViewLocalStoreDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
11
11
  /**
12
12
  * Helpers
@@ -29,8 +29,7 @@ const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0
29
29
  const fetchActions = [];
30
30
  if (company != null) {
31
31
  const setupViewLocalData = toSetupViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
32
- fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData));
33
- fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
32
+ fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData), (0, addressViewReducer_1.resetNewAddressesInLocalStore)());
34
33
  }
35
34
  if (companyView != null) {
36
35
  const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
@@ -91,7 +90,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
91
90
  }
92
91
  const officers = companyOfficers.map((user, index) => {
93
92
  var _a, _b, _c, _d, _e;
94
- const { userId, firstName, lastName, birthday, email, nationalityCountryCode, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
93
+ const { userId, firstName, lastName, birthday, email, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
95
94
  const userRole = userRoles.find((userRole) => userRole.userId === userId);
96
95
  return {
97
96
  officerType: `Officer_${index + 1}`,
@@ -100,7 +99,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
100
99
  lastName,
101
100
  birthday,
102
101
  email,
103
- nationalityCountryCode,
104
102
  phone: userPhone,
105
103
  isPhoneVerified,
106
104
  ssn,
@@ -124,7 +122,6 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
124
122
  firstName: '',
125
123
  lastName: '',
126
124
  email: '',
127
- nationalityCountryCode: undefined,
128
125
  fileIds: [],
129
126
  isSelectedForVerification: false,
130
127
  additionalDocumentTypesRequestedForVerification: [],
@@ -16,7 +16,6 @@ import { DepositAccount } from '../../../entity/depositAccount/depositAccount';
16
16
  import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
17
17
  import { Amount } from '../../../commonStateTypes/amount';
18
18
  import { BalanceChange } from '../../../commonStateTypes/balance';
19
- import { Country } from '../../countryList/countryListState';
20
19
  export interface SetupView {
21
20
  allFundingAccounts: FundingAccount[];
22
21
  allBankAccounts: AccountBase[];
@@ -73,7 +72,6 @@ export interface CompanyDetails {
73
72
  incDate?: ZeniDate;
74
73
  syncToken?: string;
75
74
  addressStatus?: NewAddressData;
76
- registeredAddressStatus?: NewAddressData;
77
75
  primaryContactLocalData?: PrimaryContactLocalData;
78
76
  typeOfIncorporation?: string;
79
77
  }
@@ -82,9 +80,8 @@ interface CompanyAndOfficerLocalData {
82
80
  companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
83
81
  }
84
82
  export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
85
- updateStatus: FetchStateAndError;
86
- allNationalityCountries: Country[];
87
83
  companyView?: CompanyView;
84
+ updateStatus: FetchStateAndError;
88
85
  }
89
86
  export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
90
87
  export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
@@ -82,7 +82,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
82
82
  return primaryFundingAccount;
83
83
  }
84
84
  function getBusinessVerificationDetails(state, companyId) {
85
- const { setupViewState, countryListState } = state;
85
+ const { setupViewState } = state;
86
86
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
87
87
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
88
88
  const { companyDetailsLocalData, companyOfficerLocalData } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
@@ -90,18 +90,16 @@ function getBusinessVerificationDetails(state, companyId) {
90
90
  companyOfficerUpdateStatus,
91
91
  primaryContactDetails,
92
92
  });
93
- const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
94
93
  return {
95
94
  companyDetailsLocalData,
96
95
  companyOfficerLocalData,
97
96
  companyView,
98
97
  updateStatus,
99
- allNationalityCountries,
100
98
  };
101
99
  }
102
100
  exports.getBusinessVerificationDetails = getBusinessVerificationDetails;
103
101
  const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetails) => {
104
- var _a, _b;
102
+ var _a;
105
103
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails } = companyAndIdentityDetails;
106
104
  const { fileState, addressViewState } = state;
107
105
  const { localData: primaryContactLocalData } = primaryContactDetails;
@@ -117,7 +115,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
117
115
  updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
118
116
  });
119
117
  const companyAddress = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.company_address;
120
- const registeredCompanyAddress = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b.company_registered_address;
121
118
  companyDetailsLocalData = {
122
119
  companyId,
123
120
  companyDescription,
@@ -132,7 +129,6 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
132
129
  deleteFileStatusById,
133
130
  updateFileStatusById,
134
131
  addressStatus: companyAddress,
135
- registeredAddressStatus: registeredCompanyAddress,
136
132
  primaryContactLocalData,
137
133
  typeOfIncorporation,
138
134
  };
@@ -35,7 +35,6 @@ export interface CompanyOfficerLocalData {
35
35
  firstName: string;
36
36
  lastName: string;
37
37
  email: string;
38
- nationalityCountryCode?: string;
39
38
  ssn?: string;
40
39
  phone?: string;
41
40
  isPhoneVerified?: boolean;