@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.
- package/lib/commonPayloadTypes/commonPayload.d.ts +0 -7
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +1 -0
- package/lib/commonStateTypes/common.d.ts +0 -2
- package/lib/commonStateTypes/common.js +1 -5
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -1
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +1 -2
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +1 -0
- package/lib/commonStateTypes/timePeriod.d.ts +0 -16
- package/lib/commonStateTypes/timePeriod.js +1 -31
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +0 -1
- package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +1 -3
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCard.d.ts +2 -16
- package/lib/entity/chargeCard/chargeCard.js +1 -18
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +5 -14
- package/lib/entity/chargeCard/chargeCardPayload.js +7 -24
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyPayload.d.ts +0 -4
- package/lib/entity/company/companyPayload.js +3 -6
- package/lib/entity/company/companyReducer.d.ts +1 -4
- package/lib/entity/company/companyReducer.js +2 -6
- package/lib/entity/company/companyStateTypes.d.ts +1 -5
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +0 -2
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -7
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -3
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -3
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +0 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -12
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -12
- package/lib/entity/tenant/clearAllEpic.js +0 -20
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +1 -2
- package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +1 -9
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +1 -7
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +2 -34
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -3
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
- package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
- package/lib/entity/transaction/transactionSelector.d.ts +0 -1
- package/lib/entity/transaction/transactionSelector.js +1 -7
- package/lib/entity/user/userPayload.d.ts +0 -1
- package/lib/entity/user/userReducer.js +8 -9
- package/lib/entity/user/userState.d.ts +0 -1
- package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +0 -1
- package/lib/entity/vendor/__mocks__/vendorStateMocks.js +1 -35
- package/lib/entity/vendor/vendorPayload.js +2 -3
- package/lib/entity/vendor/vendorState.d.ts +3 -3
- package/lib/entity/vendor/vendorType.d.ts +2 -0
- package/lib/entity/vendor/vendorType.js +4 -1
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
- package/lib/entity/vendorExpense/vendorExpenseSelector.js +0 -1
- package/lib/epic.d.ts +2 -18
- package/lib/epic.js +2 -18
- package/lib/index.d.ts +21 -65
- package/lib/index.js +28 -102
- package/lib/reducer.d.ts +1 -31
- package/lib/reducer.js +1 -31
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -7
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +1 -7
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.d.ts +0 -2
- package/lib/view/addressView/toAddressViewLocalData.js +3 -9
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
- package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +5 -10
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +7 -10
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
- package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +3 -5
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +6 -1
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +0 -4
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +0 -2
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +1 -7
- package/lib/view/companyView/types/companyView.d.ts +0 -1
- package/lib/view/dashboard/dashboardEpic.d.ts +1 -2
- package/lib/view/dashboard/dashboardEpic.js +2 -22
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -3
- package/lib/view/dashboard/dashboardReducer.js +1 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +0 -2
- package/lib/view/dashboard/dashboardSelector.js +2 -10
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +1 -8
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +1 -3
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +4 -5
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +3 -6
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +2 -3
- package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +5 -19
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +3 -8
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +57 -39
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +8 -13
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +12 -19
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +0 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +3 -4
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +0 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
- package/lib/view/settingsView/epic/updateMyProfileEpic.js +4 -6
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
- package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +2 -6
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +21 -1
- package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +0 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +1 -8
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +2 -25
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +4 -8
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +1 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +14 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +13 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +6 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +17 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +2 -8
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +15 -55
- package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.d.ts +2 -3
- package/lib/view/spendManagement/chargeCards/{issueChargeCard → chargeCardList}/issueChargeCardEpic.js +18 -35
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +6 -31
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +2 -5
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -4
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -6
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +0 -4
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
- package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/lib/view/userListView/fetchUserListByTypeEpic.js +1 -4
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
- package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +3 -34
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
- package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +5 -2
- package/package.json +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +0 -32
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -60
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +0 -12
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +0 -25
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +0 -7
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +0 -36
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +0 -38
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +0 -10
- package/lib/view/countryList/countryListReducer.d.ts +0 -17
- package/lib/view/countryList/countryListReducer.js +0 -58
- package/lib/view/countryList/countryListSelector.d.ts +0 -7
- package/lib/view/countryList/countryListSelector.js +0 -13
- package/lib/view/countryList/countryListState.d.ts +0 -12
- package/lib/view/countryList/countryListState.js +0 -2
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +0 -6
- package/lib/view/countryList/epics/fetchCountryListEpic.js +0 -19
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +0 -7
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +0 -38
- package/lib/view/countryList/payloads/countryListPayload.d.ts +0 -6
- package/lib/view/countryList/payloads/countryListPayload.js +0 -10
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +0 -11
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +0 -2
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +0 -72
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +0 -11
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -53
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +0 -11
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +0 -66
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +0 -39
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +0 -22
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +0 -59
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +0 -78
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +0 -28
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +0 -78
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +0 -58
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +0 -10
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +0 -12
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +0 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +0 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +0 -17
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +0 -66
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -97
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -11
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +0 -14
- package/lib/view/expenseAutomationView/helpers/helpers.d.ts +0 -7
- package/lib/view/expenseAutomationView/helpers/helpers.js +0 -67
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +0 -76
- package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +0 -9
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -36
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -58
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -16
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -2
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +0 -34
- package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +0 -205
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +0 -53
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +0 -245
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +0 -31
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +0 -130
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +0 -5
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +0 -45
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -34
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +0 -44
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +0 -32
- package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -28
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +0 -11
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +0 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +0 -55
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -7
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +0 -95
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -61
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +0 -53
- package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -31
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -20
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -13
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -28
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +0 -15
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +0 -8
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +0 -58
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +0 -3
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +0 -2
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +0 -16
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +0 -36
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +0 -10
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +0 -27
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +0 -5
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +0 -2
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +0 -7
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +0 -36
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +0 -6
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +0 -42
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +0 -9
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +0 -67
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +0 -26
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +0 -22
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +0 -89
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +0 -15
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +0 -30
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +0 -20
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +0 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +0 -42
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +0 -9
- package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +0 -44
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +0 -65
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -22
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -76
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -28
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +0 -23
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ignoreRecommendedJeScheduleEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const jeSchedulesReducer_1 = require("../../../../entity/jeSchedules/jeSchedulesReducer");
|
|
8
|
-
const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
|
|
9
|
-
const jeSchedulesSelector_1 = require("../../../../entity/jeSchedules/jeSchedulesSelector");
|
|
10
|
-
const jeSchedulesPayload_1 = require("../../payload/jeSchedulesPayload");
|
|
11
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
12
|
-
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
13
|
-
const ignoreRecommendedJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.ignoreRecommendedJeSchedule.match), (0, operators_1.mergeMap)((action) => {
|
|
14
|
-
const state = state$.value;
|
|
15
|
-
const { expenseAutomationViewState: { selectedPeriodByTenantId }, } = state;
|
|
16
|
-
const { scheduleType, jeScheduleTransactionKey } = action.payload;
|
|
17
|
-
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
18
|
-
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
19
|
-
const actions = [];
|
|
20
|
-
const jeScheduleTransactionState = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleTransactionKey, state);
|
|
21
|
-
const payload = Object.assign({}, (0, jeSchedulesPayload_1.prepareIgnoreSchedulePayload)(scheduleType, jeScheduleTransactionState, state));
|
|
22
|
-
const queryParam = {
|
|
23
|
-
je_schedule_type: scheduleType,
|
|
24
|
-
};
|
|
25
|
-
const ignoreScheduleApi = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/ignore/${jeScheduleTransactionState.jeScheduleId}?query=${encodeURIComponent(JSON.stringify(queryParam))}`, payload);
|
|
26
|
-
return ignoreScheduleApi.pipe((0, operators_1.mergeMap)((response) => {
|
|
27
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
28
|
-
actions.push((0, jeSchedulesReducer_1.updateJESchedules)(response.data.je_schedules), (0, jeSchedulesReducer_1.updateJESchedulesDetails)(response.data.je_schedules, response.data.scheduled_journal_entries));
|
|
29
|
-
actions.push((0, jeSchedulesViewReducer_1.ignoreRecommendedJeScheduleSuccess)(jeScheduleTransactionKey));
|
|
30
|
-
actions.push((0, jeSchedulesViewReducer_1.removeJeScheduleTransactionKey)(jeScheduleTransactionKey, selectedPeriod));
|
|
31
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
32
|
-
messageSection: 'ignore_schedule',
|
|
33
|
-
messageText: 'success',
|
|
34
|
-
type: 'success',
|
|
35
|
-
}));
|
|
36
|
-
return (0, rxjs_1.from)(actions);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const actions = [];
|
|
40
|
-
actions.push((0, jeSchedulesViewReducer_1.ignoreRecommendedJeScheduleFailure)({
|
|
41
|
-
status: response.status,
|
|
42
|
-
jeScheduleTransactionKey: jeScheduleTransactionKey,
|
|
43
|
-
}));
|
|
44
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
45
|
-
messageSection: 'ignore_schedule',
|
|
46
|
-
messageText: 'failed',
|
|
47
|
-
type: 'error',
|
|
48
|
-
variables: [
|
|
49
|
-
{
|
|
50
|
-
variableName: '_api-error_',
|
|
51
|
-
variableValue: response.status.message,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}));
|
|
55
|
-
return (0, rxjs_1.from)(actions);
|
|
56
|
-
}
|
|
57
|
-
}), (0, operators_1.catchError)((error) => {
|
|
58
|
-
const actions = [];
|
|
59
|
-
actions.push((0, jeSchedulesViewReducer_1.ignoreRecommendedJeScheduleFailure)({
|
|
60
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'ignore JE schedules REST API call errored out' +
|
|
61
|
-
JSON.stringify(error)),
|
|
62
|
-
jeScheduleTransactionKey: jeScheduleTransactionKey,
|
|
63
|
-
}));
|
|
64
|
-
actions.push((0, snackbarReducer_1.openSnackbar)({
|
|
65
|
-
messageSection: 'ignore_schedule',
|
|
66
|
-
messageText: 'failed',
|
|
67
|
-
type: 'error',
|
|
68
|
-
variables: [
|
|
69
|
-
{
|
|
70
|
-
variableName: '_api-error_',
|
|
71
|
-
variableValue: JSON.stringify(error),
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
}));
|
|
75
|
-
return (0, rxjs_1.from)(actions);
|
|
76
|
-
}));
|
|
77
|
-
}));
|
|
78
|
-
exports.ignoreRecommendedJeScheduleEpic = ignoreRecommendedJeScheduleEpic;
|
package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../../reducer';
|
|
4
|
-
import { initializeJeScheduleLocalData, updateJeScheduleLocalDataById } from '../../reducers/jeSchedulesViewReducer';
|
|
5
|
-
export declare type ActionType = ReturnType<typeof initializeJeScheduleLocalData> | ReturnType<typeof updateJeScheduleLocalDataById>;
|
|
6
|
-
export declare const initializeJeScheduleLocalDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initializeJeScheduleLocalDataEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
|
|
7
|
-
const jeSchedulesSelector_1 = require("../../../../entity/jeSchedules/jeSchedulesSelector");
|
|
8
|
-
const initializeJeScheduleLocalDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.initializeJeScheduleLocalData.match), (0, operators_1.mergeMap)((action) => {
|
|
9
|
-
const state = state$.value;
|
|
10
|
-
const actions = [];
|
|
11
|
-
const { jeScheduleTransactionKeys } = action.payload;
|
|
12
|
-
jeScheduleTransactionKeys.forEach((jeScheduleTransactionKey) => {
|
|
13
|
-
const jeScheduledTransaction = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleTransactionKey, state);
|
|
14
|
-
const initLocalData = {
|
|
15
|
-
jeScheduleType: jeScheduledTransaction.jeScheduleType,
|
|
16
|
-
jeScheduleID: jeScheduledTransaction.jeScheduleId,
|
|
17
|
-
scheduledJournalEntryID: jeScheduledTransaction.scheduledJournalEntry[0]
|
|
18
|
-
.scheduledJournalEntryID,
|
|
19
|
-
};
|
|
20
|
-
actions.push((0, jeSchedulesViewReducer_1.updateJeScheduleLocalDataById)({
|
|
21
|
-
localData: initLocalData,
|
|
22
|
-
scheduledJournalEntryID: jeScheduledTransaction.scheduledJournalEntry[0]
|
|
23
|
-
.scheduledJournalEntryID,
|
|
24
|
-
}));
|
|
25
|
-
});
|
|
26
|
-
return (0, rxjs_1.from)(actions);
|
|
27
|
-
}));
|
|
28
|
-
exports.initializeJeScheduleLocalDataEpic = initializeJeScheduleLocalDataEpic;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
-
import { RootState } from '../../../../reducer';
|
|
5
|
-
import { updateJeScheduleTransactionKeys, removeFailedJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess } from '../../reducers/jeSchedulesViewReducer';
|
|
6
|
-
import { updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
7
|
-
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
8
|
-
export declare type ActionType = ReturnType<typeof openSnackbar> | ReturnType<typeof removeFailedJeScheduleTransactionKey> | ReturnType<typeof retryJeSchedule> | ReturnType<typeof retryJeScheduleFailure> | ReturnType<typeof retryJeScheduleSuccess> | ReturnType<typeof updateJESchedules> | ReturnType<typeof updateJESchedulesDetails> | ReturnType<typeof updateJeScheduleTransactionKeys>;
|
|
9
|
-
export declare const retryJeScheduleEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.retryJeScheduleEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const jeSchedulesViewReducer_1 = require("../../reducers/jeSchedulesViewReducer");
|
|
8
|
-
const jeSchedulesPayload_1 = require("../../payload/jeSchedulesPayload");
|
|
9
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
10
|
-
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
11
|
-
const retryJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(jeSchedulesViewReducer_1.retryJeSchedule.match), (0, operators_1.switchMap)((action) => {
|
|
12
|
-
const state = state$.value;
|
|
13
|
-
const { expenseAutomationJESchedulesViewState: { jeScheduleLocalDataById }, expenseAutomationViewState: { selectedPeriodByTenantId }, } = state;
|
|
14
|
-
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
15
|
-
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
16
|
-
const { scheduledJournalEntryID, jeScheduleTransactionKey } = action.payload;
|
|
17
|
-
const jeSchedule = jeScheduleLocalDataById[scheduledJournalEntryID];
|
|
18
|
-
if (jeSchedule == null) {
|
|
19
|
-
return (0, rxjs_1.from)([]);
|
|
20
|
-
}
|
|
21
|
-
const payload = Object.assign({}, (0, jeSchedulesPayload_1.preparePayloadForRetryPosting)(jeSchedule));
|
|
22
|
-
return zeniAPI
|
|
23
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/retry_sje_posting`, payload)
|
|
24
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
25
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
26
|
-
const updateActions = [];
|
|
27
|
-
updateActions.push((0, jeSchedulesViewReducer_1.retryJeScheduleSuccess)({
|
|
28
|
-
scheduledJournalEntryID,
|
|
29
|
-
}));
|
|
30
|
-
updateActions.push((0, jeSchedulesViewReducer_1.removeFailedJeScheduleTransactionKey)(jeScheduleTransactionKey, selectedPeriod));
|
|
31
|
-
updateActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
32
|
-
messageSection: 'je_posted',
|
|
33
|
-
messageText: 'success',
|
|
34
|
-
type: 'success',
|
|
35
|
-
}));
|
|
36
|
-
return (0, rxjs_1.from)(updateActions);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const updateActions = [];
|
|
40
|
-
updateActions.push((0, jeSchedulesViewReducer_1.retryJeScheduleFailure)({
|
|
41
|
-
status: response.status,
|
|
42
|
-
scheduledJournalEntryID,
|
|
43
|
-
}));
|
|
44
|
-
updateActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
45
|
-
messageSection: 'je_posted',
|
|
46
|
-
messageText: 'failed',
|
|
47
|
-
type: 'error',
|
|
48
|
-
variables: [
|
|
49
|
-
{
|
|
50
|
-
variableName: '_api-error_',
|
|
51
|
-
variableValue: response.status.message,
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}));
|
|
55
|
-
return (0, rxjs_1.from)(updateActions);
|
|
56
|
-
}
|
|
57
|
-
}), (0, operators_1.catchError)((error) => {
|
|
58
|
-
const updateActions = [];
|
|
59
|
-
updateActions.push((0, jeSchedulesViewReducer_1.retryJeScheduleFailure)({
|
|
60
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'retry JE schedule posting REST API call errored out' +
|
|
61
|
-
JSON.stringify(error)),
|
|
62
|
-
scheduledJournalEntryID,
|
|
63
|
-
}));
|
|
64
|
-
updateActions.push((0, snackbarReducer_1.openSnackbar)({
|
|
65
|
-
messageSection: 'je_posted',
|
|
66
|
-
messageText: 'failed',
|
|
67
|
-
type: 'error',
|
|
68
|
-
variables: [
|
|
69
|
-
{
|
|
70
|
-
variableName: '_api-error_',
|
|
71
|
-
variableValue: JSON.stringify(error),
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
}));
|
|
75
|
-
return (0, rxjs_1.from)(updateActions);
|
|
76
|
-
}));
|
|
77
|
-
}));
|
|
78
|
-
exports.retryJeScheduleEpic = retryJeScheduleEpic;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
|
|
4
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { RootState } from '../../../../reducer';
|
|
6
|
-
import { fetchMissingReceipts, fetchMissingReceiptsSuccess, fetchMissingReceiptsFailure } from '../../reducers/missingReceiptsViewReducer';
|
|
7
|
-
export declare type ActionType = ReturnType<typeof fetchMissingReceipts> | ReturnType<typeof updateTransactions> | ReturnType<typeof fetchMissingReceiptsSuccess> | ReturnType<typeof fetchMissingReceiptsFailure>;
|
|
8
|
-
export declare const fetchMissingReceiptsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchMissingReceiptsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
-
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
9
|
-
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
10
|
-
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
11
|
-
const fetchMissingReceiptsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchMissingReceipts.match), (0, operators_1.switchMap)((action) => {
|
|
12
|
-
var _a;
|
|
13
|
-
const state = state$.value;
|
|
14
|
-
const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { transactionIdsBySelectedPeriod, fetchState, }, } = state;
|
|
15
|
-
const { period, cacheOverride, minimumTransactionAmount } = action.payload;
|
|
16
|
-
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
17
|
-
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
18
|
-
const transactionIds = (_a = transactionIdsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _a !== void 0 ? _a : [];
|
|
19
|
-
if (cacheOverride === true ||
|
|
20
|
-
transactionIds.length === 0 ||
|
|
21
|
-
fetchState === 'Not-Started') {
|
|
22
|
-
const queryParam = {
|
|
23
|
-
start_date: (0, timePeriod_1.toString)(period.start),
|
|
24
|
-
end_date: (0, timePeriod_1.toString)(period.end),
|
|
25
|
-
total_amount_min: minimumTransactionAmount.amount,
|
|
26
|
-
is_attachment_missing_only: true,
|
|
27
|
-
sort_by: 'transaction_date',
|
|
28
|
-
sort_order: 'desc',
|
|
29
|
-
};
|
|
30
|
-
return zeniAPI
|
|
31
|
-
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
32
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
33
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
34
|
-
const updateActions = [];
|
|
35
|
-
updateActions.push((0, transactionReducer_1.updateTransactions)(response.data.transactions, (value) => value.transaction_id));
|
|
36
|
-
updateActions.push((0, missingReceiptsViewReducer_1.fetchMissingReceiptsSuccess)({
|
|
37
|
-
transactionsPayload: response.data.transactions,
|
|
38
|
-
selectedPeriod,
|
|
39
|
-
}));
|
|
40
|
-
return (0, rxjs_1.from)(updateActions);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchMissingReceiptsFailure)({
|
|
44
|
-
status: response.status,
|
|
45
|
-
selectedPeriod,
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, missingReceiptsViewReducer_1.fetchMissingReceiptsFailure)({
|
|
49
|
-
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetch missing receipts REST API call errored out' +
|
|
50
|
-
JSON.stringify(error)),
|
|
51
|
-
selectedPeriod,
|
|
52
|
-
}))));
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
return (0, rxjs_1.from)([]);
|
|
56
|
-
}
|
|
57
|
-
}));
|
|
58
|
-
exports.fetchMissingReceiptsEpic = fetchMissingReceiptsEpic;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable } from 'redux-observable';
|
|
2
|
-
import { updateTransaction } from '../../../../entity/transaction/transactionReducer';
|
|
3
|
-
import { uploadMissingReceiptSuccess } from '../../reducers/missingReceiptsViewReducer';
|
|
4
|
-
export declare type ActionType = ReturnType<typeof uploadMissingReceiptSuccess> | ReturnType<typeof updateTransaction>;
|
|
5
|
-
export declare const uploadMissingReceiptSuccessEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<import("@reduxjs/toolkit").PayloadAction<{
|
|
6
|
-
id: string;
|
|
7
|
-
payload: import("../../../..").SupportedTransactionPayload;
|
|
8
|
-
}, string, {
|
|
9
|
-
updateType: import("../../../..").UpdateType;
|
|
10
|
-
}, never>>;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.uploadMissingReceiptSuccessEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
|
|
7
|
-
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
8
|
-
const uploadMissingReceiptSuccessEpic = (actions$) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.uploadMissingReceiptSuccess.match), (0, operators_1.mergeMap)((action) => {
|
|
9
|
-
const { transactionPayload, updateType } = action.payload;
|
|
10
|
-
return (0, rxjs_1.of)((0, transactionReducer_1.updateTransaction)(transactionPayload.transaction_id, transactionPayload, updateType));
|
|
11
|
-
}));
|
|
12
|
-
exports.uploadMissingReceiptSuccessEpic = uploadMissingReceiptSuccessEpic;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ExpenseAutomationViewState } from './expenseAutomationViewState';
|
|
2
|
-
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
|
-
import { ID } from '../../commonStateTypes/common';
|
|
4
|
-
export declare const initialState: ExpenseAutomationViewState;
|
|
5
|
-
export declare const fetchAllExpenseAutomationTabs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined, refreshViewInBackground?: boolean | undefined], {
|
|
6
|
-
cacheOverride: boolean;
|
|
7
|
-
refreshViewInBackground: boolean;
|
|
8
|
-
}, string, never, never>, updateCurrentSelectedPeriod: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, newSelectedPeriod: MonthYearPeriod], {
|
|
9
|
-
newSelectedPeriod: MonthYearPeriod;
|
|
10
|
-
tenantId: string;
|
|
11
|
-
}, string, never, never>, updateCurrentSelectedView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedView: "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights"], {
|
|
12
|
-
newSelectedView: "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
|
|
13
|
-
}, string, never, never>, clearExpenseAutomationView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, initializeSelectedPeriodForTenants: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
14
|
-
selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
|
|
15
|
-
}, string>, refreshExpenseAutomationCurrentTab: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
16
|
-
declare const _default: import("@reduxjs/toolkit").Reducer<ExpenseAutomationViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
17
|
-
export default _default;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.refreshExpenseAutomationCurrentTab = exports.initializeSelectedPeriodForTenants = exports.clearExpenseAutomationView = exports.updateCurrentSelectedView = exports.updateCurrentSelectedPeriod = exports.fetchAllExpenseAutomationTabs = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.initialState = {
|
|
7
|
-
saveStatus: { fetchState: 'Not-Started', error: undefined },
|
|
8
|
-
updateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
9
|
-
currentSelectedView: 'transaction_categorization',
|
|
10
|
-
fetchState: 'Not-Started',
|
|
11
|
-
error: undefined,
|
|
12
|
-
selectedPeriodByTenantId: {},
|
|
13
|
-
hasValidState() {
|
|
14
|
-
return this.fetchState == 'Completed';
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
const expenseAutomationView = (0, toolkit_1.createSlice)({
|
|
18
|
-
name: 'expenseAutomationView',
|
|
19
|
-
initialState: exports.initialState,
|
|
20
|
-
reducers: {
|
|
21
|
-
fetchAllExpenseAutomationTabs: {
|
|
22
|
-
reducer() {
|
|
23
|
-
//do nothing
|
|
24
|
-
},
|
|
25
|
-
prepare(
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
27
|
-
cacheOverride = false,
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
29
|
-
refreshViewInBackground = false) {
|
|
30
|
-
return {
|
|
31
|
-
payload: { cacheOverride, refreshViewInBackground },
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
|
-
refreshExpenseAutomationCurrentTab(_draft) {
|
|
37
|
-
// Do nothing
|
|
38
|
-
},
|
|
39
|
-
updateCurrentSelectedView: {
|
|
40
|
-
reducer(draft, action) {
|
|
41
|
-
draft.currentSelectedView = action.payload.newSelectedView;
|
|
42
|
-
},
|
|
43
|
-
prepare(newSelectedView) {
|
|
44
|
-
return { payload: { newSelectedView } };
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
initializeSelectedPeriodForTenants(draft, action) {
|
|
48
|
-
const { selectedPeriodByTenantId } = action.payload;
|
|
49
|
-
draft.selectedPeriodByTenantId = selectedPeriodByTenantId;
|
|
50
|
-
},
|
|
51
|
-
updateCurrentSelectedPeriod: {
|
|
52
|
-
reducer(draft, action) {
|
|
53
|
-
const { tenantId, newSelectedPeriod } = action.payload;
|
|
54
|
-
draft.selectedPeriodByTenantId[tenantId] = newSelectedPeriod;
|
|
55
|
-
},
|
|
56
|
-
prepare(tenantId, newSelectedPeriod) {
|
|
57
|
-
return { payload: { newSelectedPeriod, tenantId } };
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
clearExpenseAutomationView(draft) {
|
|
61
|
-
Object.assign(draft, exports.initialState);
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
_a = expenseAutomationView.actions, exports.fetchAllExpenseAutomationTabs = _a.fetchAllExpenseAutomationTabs, exports.updateCurrentSelectedPeriod = _a.updateCurrentSelectedPeriod, exports.updateCurrentSelectedView = _a.updateCurrentSelectedView, exports.clearExpenseAutomationView = _a.clearExpenseAutomationView, exports.initializeSelectedPeriodForTenants = _a.initializeSelectedPeriodForTenants, exports.refreshExpenseAutomationCurrentTab = _a.refreshExpenseAutomationCurrentTab;
|
|
66
|
-
exports.default = expenseAutomationView.reducer;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getExpenseAutomationView = void 0;
|
|
4
|
-
const expenseAutomationViewSelectorTypes_1 = require("./selectorTypes/expenseAutomationViewSelectorTypes");
|
|
5
|
-
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
6
|
-
const missingReceiptsSelector_1 = require("./selectors/missingReceiptsSelector");
|
|
7
|
-
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
8
|
-
const jeSchedulesViewSelector_1 = require("./selectors/jeSchedulesViewSelector");
|
|
9
|
-
const fluxAnalysisViewSelector_1 = require("./selectors/fluxAnalysisViewSelector");
|
|
10
|
-
const companyMonthEndReportViewSelector_1 = require("../companyMonthEndReportView/companyMonthEndReportViewSelector");
|
|
11
|
-
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
12
|
-
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
13
|
-
const monthEndCloseChecksViewSelector_1 = require("../monthEndCloseChecksView/monthEndCloseChecksViewSelector");
|
|
14
|
-
const isPreviousStepDisabled = (allSteps, stepIndex, auditSummary) => {
|
|
15
|
-
if (stepIndex === 0) {
|
|
16
|
-
// TODO - Jitesh update condition
|
|
17
|
-
if (auditSummary == null || auditSummary.auditScorePercentage < 75) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return allSteps[stepIndex - 1].isDisabled;
|
|
23
|
-
};
|
|
24
|
-
function getExpenseAutomationView(state) {
|
|
25
|
-
var _a;
|
|
26
|
-
const { expenseAutomationViewState, tenantState, expenseAutomationMissingReceiptsViewState, expenseAutomationTransactionsViewState, expenseAutomationJESchedulesViewState, monthEndCloseChecksState, } = state;
|
|
27
|
-
const { loggedInUser, currentTenantId } = tenantState;
|
|
28
|
-
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
29
|
-
const { currentSelectedView, selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
30
|
-
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
31
|
-
const monthEndCloseChecksView = (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
32
|
-
const missingReceipts = (0, missingReceiptsSelector_1.getExpenseAutomationMissingReceiptsView)(state);
|
|
33
|
-
const fluxAnalysis = (0, fluxAnalysisViewSelector_1.getExpenseAutomationFluxAnalysisView)(state);
|
|
34
|
-
const monthEndInsights = (0, companyMonthEndReportViewSelector_1.getCompanyMonthEndReportSelectorView)(state, currentTenant.companyId, loggedInUser);
|
|
35
|
-
const jeSchedules = (0, jeSchedulesViewSelector_1.getExpenseAutomationJESchedulesView)(state);
|
|
36
|
-
const fetchStateVariables = [
|
|
37
|
-
expenseAutomationMissingReceiptsViewState,
|
|
38
|
-
expenseAutomationJESchedulesViewState,
|
|
39
|
-
monthEndCloseChecksView,
|
|
40
|
-
];
|
|
41
|
-
let allSteps = [];
|
|
42
|
-
let auditSummary = undefined;
|
|
43
|
-
if (selectedPeriod != null) {
|
|
44
|
-
const monthYearPeriodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
|
|
45
|
-
if (currentTenantId != null) {
|
|
46
|
-
auditSummary = (_a = (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksForATenantForSelectedPeriod)(monthEndCloseChecksState, currentTenantId, selectedPeriod)) === null || _a === void 0 ? void 0 : _a.auditSummary;
|
|
47
|
-
}
|
|
48
|
-
allSteps = (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId, auditSummary);
|
|
49
|
-
allSteps.forEach((stepDetail, index, allStepsOriginal) => {
|
|
50
|
-
switch (stepDetail.step) {
|
|
51
|
-
case 'je_schedules':
|
|
52
|
-
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: jeSchedules.completionStatus });
|
|
53
|
-
return;
|
|
54
|
-
case 'missing_receipts':
|
|
55
|
-
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { completionStatus: missingReceipts.completionStatus });
|
|
56
|
-
return;
|
|
57
|
-
case 'month_end_insights':
|
|
58
|
-
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { isDisabled: auditSummary != null
|
|
59
|
-
? auditSummary.auditScorePercentage < 75 // TODO - jk - update condition
|
|
60
|
-
: true });
|
|
61
|
-
return;
|
|
62
|
-
default:
|
|
63
|
-
// TODO - Anjali, TODO - Vivek add other steps
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
allSteps.forEach((stepDetail, index, allStepsOriginal) => {
|
|
68
|
-
allStepsOriginal[index] = Object.assign(Object.assign({}, stepDetail), { isNextDisabled: index === allStepsOriginal.length - 1
|
|
69
|
-
? allStepsOriginal[0].isDisabled
|
|
70
|
-
: allStepsOriginal[index + 1].isDisabled, isPrevDisabled: isPreviousStepDisabled(allStepsOriginal, index, auditSummary) });
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)(fetchStateVariables); // Add more states
|
|
74
|
-
const reducedSaveStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
75
|
-
expenseAutomationTransactionsViewState.saveStatus, // TODO - Anjali add more states
|
|
76
|
-
]);
|
|
77
|
-
const reducedUpdateStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
78
|
-
expenseAutomationTransactionsViewState.updateStatus, // TODO - Anjali add more states
|
|
79
|
-
]);
|
|
80
|
-
return {
|
|
81
|
-
jeSchedules,
|
|
82
|
-
missingReceipts,
|
|
83
|
-
fluxAnalysis,
|
|
84
|
-
fetchState: reducedFetchStatus.fetchState,
|
|
85
|
-
error: undefined,
|
|
86
|
-
currentSelectedView,
|
|
87
|
-
saveStatus: reducedSaveStatus,
|
|
88
|
-
updateStatus: reducedUpdateStatus,
|
|
89
|
-
allSteps,
|
|
90
|
-
completionStatus: missingReceipts.completionStatus,
|
|
91
|
-
selectedPeriod,
|
|
92
|
-
auditSummary,
|
|
93
|
-
monthEndInsights,
|
|
94
|
-
monthEndCloseChecksView,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
exports.getExpenseAutomationView = getExpenseAutomationView;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FetchedState, FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { MonthYearPeriod } from '../../commonStateTypes/timePeriod';
|
|
3
|
-
export declare const EXPENSE_AUTOMATION_VIEW_TYPES: readonly ["transaction_categorization", "je_schedules", "account_recon", "missing_receipts", "flux_analysis", "month_end_insights"];
|
|
4
|
-
export declare const toExpenseAutomationViewType: (v: string) => "transaction_categorization" | "je_schedules" | "account_recon" | "missing_receipts" | "flux_analysis" | "month_end_insights";
|
|
5
|
-
export declare type ExpenseAutomationViewType = ReturnType<typeof toExpenseAutomationViewType>;
|
|
6
|
-
export interface ExpenseAutomationViewState extends FetchedState {
|
|
7
|
-
saveStatus: FetchStateAndError;
|
|
8
|
-
updateStatus: FetchStateAndError;
|
|
9
|
-
currentSelectedView: ExpenseAutomationViewType;
|
|
10
|
-
selectedPeriodByTenantId: Record<ID, MonthYearPeriod>;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toExpenseAutomationViewType = exports.EXPENSE_AUTOMATION_VIEW_TYPES = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
-
exports.EXPENSE_AUTOMATION_VIEW_TYPES = [
|
|
6
|
-
'transaction_categorization',
|
|
7
|
-
'je_schedules',
|
|
8
|
-
'account_recon',
|
|
9
|
-
'missing_receipts',
|
|
10
|
-
'flux_analysis',
|
|
11
|
-
'month_end_insights',
|
|
12
|
-
];
|
|
13
|
-
const toExpenseAutomationViewType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.EXPENSE_AUTOMATION_VIEW_TYPES);
|
|
14
|
-
exports.toExpenseAutomationViewType = toExpenseAutomationViewType;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FluxAnalysisActionQueryType, FluxAnalysisQuerySortKey, MonthBalancePayload } from '../payload/fluxAnalysisPayload';
|
|
2
|
-
import { FluxAnalysisActionType, FluxAnalysisReviewStatus, FluxAnalysisSortKey, FluxBalancesByMonth } from '../types/fluxAnalysisViewState';
|
|
3
|
-
import { CurrencyPayload } from '../../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
4
|
-
export declare const toBalancesByMonthFromPayload: (month1: MonthBalancePayload, month2: MonthBalancePayload, currency: CurrencyPayload) => FluxBalancesByMonth;
|
|
5
|
-
export declare const toVendorFluxAnalysisSortKeyPayload: (sortKey: FluxAnalysisSortKey) => FluxAnalysisQuerySortKey;
|
|
6
|
-
export declare const toVendorFluxAnalysisReviewActionPayload: (actionType: FluxAnalysisActionType) => FluxAnalysisActionQueryType;
|
|
7
|
-
export declare const toVendorFluxAnalysisStatusFromPayload: (status: string) => FluxAnalysisReviewStatus;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toVendorFluxAnalysisStatusFromPayload = exports.toVendorFluxAnalysisReviewActionPayload = exports.toVendorFluxAnalysisSortKeyPayload = exports.toBalancesByMonthFromPayload = void 0;
|
|
4
|
-
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
5
|
-
const toBalancesByMonthFromPayload = (month1, month2, currency) => {
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
|
-
return {
|
|
8
|
-
month1: {
|
|
9
|
-
balance: {
|
|
10
|
-
amount: (_b = (_a = month1.amount) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0,
|
|
11
|
-
currencyCode: currency.currency_code,
|
|
12
|
-
currencySymbol: currency.currency_symbol,
|
|
13
|
-
},
|
|
14
|
-
startDate: (0, zeniDayJS_1.date)(month1.start_date),
|
|
15
|
-
endDate: (0, zeniDayJS_1.date)(month1.end_date),
|
|
16
|
-
id: month1.id,
|
|
17
|
-
label: month1.label,
|
|
18
|
-
balanceTimeFrame: 'month',
|
|
19
|
-
type: 'default',
|
|
20
|
-
},
|
|
21
|
-
month2: {
|
|
22
|
-
balance: {
|
|
23
|
-
amount: (_d = (_c = month2.amount) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 0,
|
|
24
|
-
currencyCode: currency.currency_code,
|
|
25
|
-
currencySymbol: currency.currency_symbol,
|
|
26
|
-
},
|
|
27
|
-
startDate: (0, zeniDayJS_1.date)(month2.start_date),
|
|
28
|
-
endDate: (0, zeniDayJS_1.date)(month2.end_date),
|
|
29
|
-
id: month2.id,
|
|
30
|
-
label: month2.label,
|
|
31
|
-
type: 'default',
|
|
32
|
-
balanceTimeFrame: 'month', // setting it to 'month' as this report is always going to be for a month,
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
exports.toBalancesByMonthFromPayload = toBalancesByMonthFromPayload;
|
|
37
|
-
const toVendorFluxAnalysisSortKeyPayload = (sortKey) => {
|
|
38
|
-
switch (sortKey) {
|
|
39
|
-
case 'vendors':
|
|
40
|
-
return 'vendor_name';
|
|
41
|
-
case 'category':
|
|
42
|
-
return 'account_name';
|
|
43
|
-
case 'class':
|
|
44
|
-
return 'accounting_class_name';
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
exports.toVendorFluxAnalysisSortKeyPayload = toVendorFluxAnalysisSortKeyPayload;
|
|
48
|
-
const toVendorFluxAnalysisReviewActionPayload = (actionType) => {
|
|
49
|
-
switch (actionType) {
|
|
50
|
-
case 'review':
|
|
51
|
-
return 'mark_as_reviewed';
|
|
52
|
-
case 'unReview':
|
|
53
|
-
return 'mark_as_un_reviewed';
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
exports.toVendorFluxAnalysisReviewActionPayload = toVendorFluxAnalysisReviewActionPayload;
|
|
57
|
-
const toVendorFluxAnalysisStatusFromPayload = (status) => {
|
|
58
|
-
switch (status) {
|
|
59
|
-
case 'pending_review':
|
|
60
|
-
return 'Pending Review';
|
|
61
|
-
case 'reviewed':
|
|
62
|
-
return 'Reviewed';
|
|
63
|
-
default:
|
|
64
|
-
return 'Pending Review';
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
exports.toVendorFluxAnalysisStatusFromPayload = toVendorFluxAnalysisStatusFromPayload;
|