@zeniai/client-epic-state 5.0.70 → 5.0.71-betaAK1
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/commonStateTypes/amount.d.ts +1 -0
- package/lib/commonStateTypes/amount.js +3 -1
- package/lib/commonStateTypes/cacheOverrideFetchReducer.d.ts +17 -0
- package/lib/commonStateTypes/cacheOverrideFetchReducer.js +20 -0
- package/lib/commonStateTypes/pusherActions.d.ts +11 -0
- package/lib/commonStateTypes/pusherActions.js +6 -0
- package/lib/coreEpics.js +1 -1
- package/lib/entity/account/accountSelector.d.ts +1 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/account/subAccountSelector.d.ts +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCardReducer.d.ts +19 -2
- package/lib/entity/chargeCard/chargeCardReducer.js +35 -2
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +14 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +36 -2
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/entity/tenant/SessionManager.js +6 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
- package/lib/entity/tenant/tenantReducer.js +6 -1
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventPayload.d.ts +11 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventPayload.js +23 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventReducer.d.ts +6 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventReducer.js +31 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventSelector.d.ts +4 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventSelector.js +16 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventState.d.ts +13 -0
- package/lib/entity/upcomingPaymentEvent/upcomingPaymentEventState.js +2 -0
- package/lib/epic.d.ts +13 -10
- package/lib/epic.js +14 -11
- package/lib/esm/commonStateTypes/amount.js +1 -0
- package/lib/esm/commonStateTypes/cacheOverrideFetchReducer.js +16 -0
- package/lib/esm/commonStateTypes/pusherActions.js +3 -0
- package/lib/esm/coreEpics.js +1 -1
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +1 -3
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +1 -2
- package/lib/esm/entity/chargeCard/chargeCardReducer.js +34 -1
- package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +35 -1
- package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +1 -1
- package/lib/esm/entity/tenant/SessionManager.js +4 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +6 -2
- package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +6 -2
- package/lib/esm/entity/tenant/tenantReducer.js +6 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +3 -1
- package/lib/esm/entity/upcomingPaymentEvent/upcomingPaymentEventPayload.js +19 -0
- package/lib/esm/entity/upcomingPaymentEvent/upcomingPaymentEventReducer.js +27 -0
- package/lib/esm/entity/upcomingPaymentEvent/upcomingPaymentEventSelector.js +11 -0
- package/lib/esm/entity/upcomingPaymentEvent/upcomingPaymentEventState.js +1 -0
- package/lib/esm/epic.js +14 -11
- package/lib/esm/index.js +19 -13
- package/lib/esm/reducer.js +8 -2
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +1 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +11 -1
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +127 -1
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +17 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/esm/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +1 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +82 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +93 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +14 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +6 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +42 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchUpcomingPaymentEventsEpic.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +26 -9
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
- package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
- package/lib/esm/view/spendManagement/commonHistoryView/commonHistoryPayload.js +1 -0
- package/lib/esm/view/taskManager/cannedResponsesView/epics/fetchCannedResponsesEpic.js +1 -1
- package/lib/esm/view/taskManager/cannedResponsesView/epics/saveCannedResponseEpic.js +1 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/unsnoozeTaskEpic.js +1 -1
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +7 -1
- package/lib/index.d.ts +22 -15
- package/lib/index.js +77 -58
- package/lib/reducer.d.ts +8 -2
- package/lib/reducer.js +8 -2
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +2 -2
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +1 -1
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +2 -5
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +2 -5
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +4 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +8 -6
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +10 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +21 -0
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +9 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +128 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +14 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -1
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +10 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.js +21 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +41 -2
- package/lib/view/financeStatement/financeStatementSelector.js +1 -1
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +1 -1
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +10 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +2 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +20 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +86 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +20 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +98 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +21 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +17 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +5 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +10 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +46 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchUpcomingPaymentEventsEpic.d.ts +8 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchUpcomingPaymentEventsEpic.js +26 -0
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +55 -18
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +16 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailPageEpic.js +5 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +18 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +27 -10
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +9 -6
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryReducer.js +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/fetchChargeCardPaymentPageEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailReducer.js +7 -3
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -0
- package/lib/view/spendManagement/commonHistoryView/commonHistoryPayload.d.ts +1 -0
- package/lib/view/spendManagement/commonHistoryView/commonHistoryPayload.js +1 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +7 -1
- package/lib/view/zeniOAuthView/zeniOAuthSelector.d.ts +1 -1
- package/package.json +9 -4
package/lib/reducer.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { AccountGroupState } from './entity/accountGroup/accountGroupState';
|
|
|
3
3
|
import { AccountReconState } from './entity/accountRecon/accountReconState';
|
|
4
4
|
import { AddressState } from './entity/address/addressState';
|
|
5
5
|
import { AiAccountantCustomerState } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
|
6
|
-
import { CreditAgentEntityState } from './entity/creditAgent/creditAgentState';
|
|
7
6
|
import { AiCfoState } from './entity/aiCfo/aiCfoState';
|
|
8
7
|
import { ApprovalRuleState } from './entity/approvalRule/approvalRuleState';
|
|
9
8
|
import { BankAccountState } from './entity/bankAccount/bankAccount';
|
|
@@ -19,6 +18,7 @@ import { CompanyState } from './entity/company/companyState';
|
|
|
19
18
|
import { CompanyHealthState } from './entity/companyHealthMetric/companyHealthMetricState';
|
|
20
19
|
import { ConnectedAccountState } from './entity/connectedAccount/connectedAccount';
|
|
21
20
|
import { CountryListState } from './entity/countryList/countryListState';
|
|
21
|
+
import { CreditAgentEntityState } from './entity/creditAgent/creditAgentState';
|
|
22
22
|
import { CurrencyState } from './entity/currency/currency';
|
|
23
23
|
import { CustomerState } from './entity/customer/customerState';
|
|
24
24
|
import { CustomerIncomeState } from './entity/customerIncome/customerIncomeTrendState';
|
|
@@ -60,6 +60,7 @@ import { TenantState } from './entity/tenant/tenantState';
|
|
|
60
60
|
import { ToastNotificationState } from './entity/toastNotification/toastNotificationState';
|
|
61
61
|
import { TransactionState } from './entity/transaction/transactionState';
|
|
62
62
|
import { TransactionActivityLogState } from './entity/transactionActivityLog/transactionActivityLogState';
|
|
63
|
+
import { UpcomingPaymentEventState } from './entity/upcomingPaymentEvent/upcomingPaymentEventState';
|
|
63
64
|
import { UserState } from './entity/user/userState';
|
|
64
65
|
import { UserGroupsState } from './entity/userGroups/userGroupsState';
|
|
65
66
|
import { UserRoleState } from './entity/userRole/userRoleState';
|
|
@@ -106,8 +107,8 @@ import { JESchedulesViewState as ExpenseAutomationJESchedulesViewState } from '.
|
|
|
106
107
|
import { MissingReceiptsViewState as ExpenseAutomationMissingReceiptsViewState } from './view/expenseAutomationView/types/missingReceiptsViewState';
|
|
107
108
|
import { ReconciliationViewState as ExpenseAutomationReconciliationViewState } from './view/expenseAutomationView/types/reconciliationViewState';
|
|
108
109
|
import { TransactionsViewState as ExpenseAutomationTransactionsViewState } from './view/expenseAutomationView/types/transactionsViewState';
|
|
109
|
-
import { FileViewState } from './view/fileView/fileViewState';
|
|
110
110
|
import { FeatureNotificationViewState } from './view/featureNotificationView/featureNotificationViewState';
|
|
111
|
+
import { FileViewState } from './view/fileView/fileViewState';
|
|
111
112
|
import { FinanceStatementState } from './view/financeStatement/financeStatementState';
|
|
112
113
|
import { ForecastListState } from './view/forecastList/forecastListState';
|
|
113
114
|
import { GlobalMerchantAutoCompleteState } from './view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewState';
|
|
@@ -155,6 +156,7 @@ import { InternationalWireVerificationState } from './view/spendManagement/billP
|
|
|
155
156
|
import { MagicLinkViewState } from './view/spendManagement/billPay/magicLinkView/magicLinkViewState';
|
|
156
157
|
import { PreviousBillsState } from './view/spendManagement/billPay/previousBills/previousBillsState';
|
|
157
158
|
import { WiseRedirectState } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectState';
|
|
159
|
+
import { CashManagementOverviewState } from './view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState';
|
|
158
160
|
import { CardUserOnboardingState } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState';
|
|
159
161
|
import { CashbackDetailState } from './view/spendManagement/chargeCards/cashbackDetail/cashbackDetailState';
|
|
160
162
|
import { ChargeCardConfigState } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState';
|
|
@@ -284,6 +286,7 @@ type EntitiesState = {
|
|
|
284
286
|
toastNotificationState: ToastNotificationState;
|
|
285
287
|
transactionActivityLogState: TransactionActivityLogState;
|
|
286
288
|
transactionState: TransactionState;
|
|
289
|
+
upcomingPaymentEventState: UpcomingPaymentEventState;
|
|
287
290
|
userGroupsState: UserGroupsState;
|
|
288
291
|
userRoleState: UserRoleState;
|
|
289
292
|
userState: UserState;
|
|
@@ -323,6 +326,7 @@ type ViewsState = {
|
|
|
323
326
|
cashBalanceState: CashBalanceState;
|
|
324
327
|
cashFlowState: CashFlowState;
|
|
325
328
|
cashInCashOutState: CashInCashOutState;
|
|
329
|
+
cashManagementOverviewState: CashManagementOverviewState;
|
|
326
330
|
cashPositionState: CashPositionState;
|
|
327
331
|
chargeCardConfigState: ChargeCardConfigState;
|
|
328
332
|
chargeCardDetailState: ChargeCardDetailState;
|
|
@@ -483,6 +487,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
483
487
|
cashBalanceState: CashBalanceState;
|
|
484
488
|
cashFlowState: CashFlowState;
|
|
485
489
|
cashInCashOutState: CashInCashOutState;
|
|
490
|
+
cashManagementOverviewState: CashManagementOverviewState;
|
|
486
491
|
cashPositionState: CashPositionState;
|
|
487
492
|
chargeCardConfigState: ChargeCardConfigState;
|
|
488
493
|
chargeCardDetailState: ChargeCardDetailState;
|
|
@@ -672,6 +677,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
672
677
|
toastNotificationState: ToastNotificationState;
|
|
673
678
|
transactionActivityLogState: TransactionActivityLogState;
|
|
674
679
|
transactionState: TransactionState;
|
|
680
|
+
upcomingPaymentEventState: UpcomingPaymentEventState;
|
|
675
681
|
userGroupsState: UserGroupsState;
|
|
676
682
|
userRoleState: UserRoleState;
|
|
677
683
|
userState: UserState;
|
package/lib/reducer.js
CHANGED
|
@@ -43,7 +43,6 @@ const accountGroupReducer_1 = __importStar(require("./entity/accountGroup/accoun
|
|
|
43
43
|
const accountReconReducer_1 = __importStar(require("./entity/accountRecon/accountReconReducer"));
|
|
44
44
|
const addressReducer_1 = __importStar(require("./entity/address/addressReducer"));
|
|
45
45
|
const aiAccountantCustomerReducer_1 = __importStar(require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer"));
|
|
46
|
-
const creditAgentReducer_1 = __importStar(require("./entity/creditAgent/creditAgentReducer"));
|
|
47
46
|
const aiCfoReducer_1 = __importStar(require("./entity/aiCfo/aiCfoReducer"));
|
|
48
47
|
const approvalRuleReducer_1 = __importStar(require("./entity/approvalRule/approvalRuleReducer"));
|
|
49
48
|
const bankAccountReducer_1 = __importStar(require("./entity/bankAccount/bankAccountReducer"));
|
|
@@ -59,6 +58,7 @@ const companyReducer_1 = __importStar(require("./entity/company/companyReducer")
|
|
|
59
58
|
const companyHealthMetricReducer_1 = __importStar(require("./entity/companyHealthMetric/companyHealthMetricReducer"));
|
|
60
59
|
const connectedAccountReducer_1 = __importStar(require("./entity/connectedAccount/connectedAccountReducer"));
|
|
61
60
|
const countryListReducer_1 = __importStar(require("./entity/countryList/countryListReducer"));
|
|
61
|
+
const creditAgentReducer_1 = __importStar(require("./entity/creditAgent/creditAgentReducer"));
|
|
62
62
|
const currencyReducer_1 = __importStar(require("./entity/currency/currencyReducer"));
|
|
63
63
|
const customerReducer_1 = __importStar(require("./entity/customer/customerReducer"));
|
|
64
64
|
const customerIncomeTrendReducer_1 = __importStar(require("./entity/customerIncome/customerIncomeTrendReducer"));
|
|
@@ -100,6 +100,7 @@ const tenantReducer_1 = __importStar(require("./entity/tenant/tenantReducer"));
|
|
|
100
100
|
const toastNotificationReducer_1 = __importStar(require("./entity/toastNotification/toastNotificationReducer"));
|
|
101
101
|
const transactionReducer_1 = __importStar(require("./entity/transaction/transactionReducer"));
|
|
102
102
|
const transactionActivityLogReducer_1 = __importStar(require("./entity/transactionActivityLog/transactionActivityLogReducer"));
|
|
103
|
+
const upcomingPaymentEventReducer_1 = __importStar(require("./entity/upcomingPaymentEvent/upcomingPaymentEventReducer"));
|
|
103
104
|
const userReducer_1 = __importStar(require("./entity/user/userReducer"));
|
|
104
105
|
const userGroupsReducer_1 = __importStar(require("./entity/userGroups/userGroupsReducer"));
|
|
105
106
|
const userRoleReducer_1 = __importStar(require("./entity/userRole/userRoleReducer"));
|
|
@@ -146,9 +147,9 @@ const jeSchedulesViewReducer_1 = __importStar(require("./view/expenseAutomationV
|
|
|
146
147
|
const missingReceiptsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/missingReceiptsViewReducer"));
|
|
147
148
|
const reconciliationViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/reconciliationViewReducer"));
|
|
148
149
|
const transactionsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/transactionsViewReducer"));
|
|
150
|
+
const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
|
|
149
151
|
const fileViewReducer_1 = __importDefault(require("./view/fileView/fileViewReducer"));
|
|
150
152
|
const fileViewState_1 = require("./view/fileView/fileViewState");
|
|
151
|
-
const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
|
|
152
153
|
const financeStatementReducer_1 = __importStar(require("./view/financeStatement/financeStatementReducer"));
|
|
153
154
|
const forecastListReducer_1 = __importStar(require("./view/forecastList/forecastListReducer"));
|
|
154
155
|
const globalMerchantAutoCompleteViewReducer_1 = __importStar(require("./view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewReducer"));
|
|
@@ -196,6 +197,7 @@ const internationalWireVerificationReducer_1 = __importStar(require("./view/spen
|
|
|
196
197
|
const magicLinkViewReducer_1 = __importStar(require("./view/spendManagement/billPay/magicLinkView/magicLinkViewReducer"));
|
|
197
198
|
const previousBillsReducer_1 = __importStar(require("./view/spendManagement/billPay/previousBills/previousBillsReducer"));
|
|
198
199
|
const wiseRedirectReducer_1 = __importStar(require("./view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer"));
|
|
200
|
+
const cashManagementOverviewReducer_1 = __importStar(require("./view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer"));
|
|
199
201
|
const cardUserOnboardingReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer"));
|
|
200
202
|
const cashbackDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer"));
|
|
201
203
|
const chargeCardConfigReducer_1 = __importStar(require("./view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer"));
|
|
@@ -326,6 +328,7 @@ const initialEntitiesState = {
|
|
|
326
328
|
toastNotificationState: toastNotificationReducer_1.initialState,
|
|
327
329
|
transactionActivityLogState: transactionActivityLogReducer_1.initialState,
|
|
328
330
|
transactionState: transactionReducer_1.initialState,
|
|
331
|
+
upcomingPaymentEventState: upcomingPaymentEventReducer_1.initialState,
|
|
329
332
|
userGroupsState: userGroupsReducer_1.initialState,
|
|
330
333
|
userRoleState: userRoleReducer_1.initialState,
|
|
331
334
|
userState: userReducer_1.initialState,
|
|
@@ -365,6 +368,7 @@ const initialViewsState = {
|
|
|
365
368
|
cashBalanceState: cashBalanceReducer_1.initialState,
|
|
366
369
|
cashFlowState: cashFlowReducer_1.initialState,
|
|
367
370
|
cashInCashOutState: cashInCashOutReducer_1.initialState,
|
|
371
|
+
cashManagementOverviewState: cashManagementOverviewReducer_1.initialState,
|
|
368
372
|
cashPositionState: cashPositionReducer_1.initialState,
|
|
369
373
|
chargeCardConfigState: chargeCardConfigReducer_1.initialState,
|
|
370
374
|
chargeCardDetailState: chargeCardDetailReducer_1.initialState,
|
|
@@ -562,6 +566,7 @@ const entityReducers = {
|
|
|
562
566
|
toastNotificationState: toastNotificationReducer_1.default,
|
|
563
567
|
transactionActivityLogState: transactionActivityLogReducer_1.default,
|
|
564
568
|
transactionState: transactionReducer_1.default,
|
|
569
|
+
upcomingPaymentEventState: upcomingPaymentEventReducer_1.default,
|
|
565
570
|
userGroupsState: userGroupsReducer_1.default,
|
|
566
571
|
userRoleState: userRoleReducer_1.default,
|
|
567
572
|
userState: userReducer_1.default,
|
|
@@ -600,6 +605,7 @@ const viewReducers = {
|
|
|
600
605
|
cashBalanceState: cashBalanceReducer_1.default,
|
|
601
606
|
cashFlowState: cashFlowReducer_1.default,
|
|
602
607
|
cashInCashOutState: cashInCashOutReducer_1.default,
|
|
608
|
+
cashManagementOverviewState: cashManagementOverviewReducer_1.default,
|
|
603
609
|
cashPositionState: cashPositionReducer_1.default,
|
|
604
610
|
chargeCardConfigState: chargeCardConfigReducer_1.default,
|
|
605
611
|
chargeCardDetailState: chargeCardDetailReducer_1.default,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ZeniAPIResponse } from '../../responsePayload';
|
|
2
|
-
export { AiAccountantCustomerPayload, AiAccountantEnrollmentPayload, AiAccountantJobPayload, toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
3
1
|
import type { AiAccountantCustomerPayload, AiAccountantJobPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
4
2
|
import { UserPayload } from '../../entity/user/userPayload';
|
|
3
|
+
import { ZeniAPIResponse } from '../../responsePayload';
|
|
4
|
+
export { AiAccountantCustomerPayload, AiAccountantEnrollmentPayload, AiAccountantJobPayload, toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
5
5
|
export interface AiAccountantCustomersResponseData {
|
|
6
6
|
customers: AiAccountantCustomerPayload[];
|
|
7
7
|
users: UserPayload[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AiAccountantCustomerPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
2
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { AiAccountantCustomerPayload } from '../../entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
3
3
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
4
4
|
import { AiAccountantUIState, AiAccountantViewState } from './aiAccountantViewState';
|
|
5
5
|
export declare const initialAiAccountantViewState: AiAccountantViewState;
|
|
@@ -10,9 +10,7 @@ const aiAccountantViewReducer_1 = require("../aiAccountantViewReducer");
|
|
|
10
10
|
const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiAccountantViewReducer_1.fetchAiAccountantCustomers.match), (0, operators_1.switchMap)(() => {
|
|
11
11
|
const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
|
|
12
12
|
const url = `${base}/ai-accountant/customers`;
|
|
13
|
-
return zeniAPI
|
|
14
|
-
.getJSON(url)
|
|
15
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
+
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
16
14
|
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
17
15
|
const customers = response.data?.customers ?? [];
|
|
18
16
|
const users = response.data?.users ?? [];
|
|
@@ -25,7 +23,6 @@ const fetchAiAccountantCustomersEpic = (actions$, _, zeniAPI) => actions$.pipe((
|
|
|
25
23
|
else {
|
|
26
24
|
return (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)(response.status));
|
|
27
25
|
}
|
|
28
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant customers fetch failed: ' +
|
|
29
|
-
JSON.stringify(error))))));
|
|
26
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantCustomersFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant customers fetch failed: ' + JSON.stringify(error))))));
|
|
30
27
|
}));
|
|
31
28
|
exports.fetchAiAccountantCustomersEpic = fetchAiAccountantCustomersEpic;
|
|
@@ -23,9 +23,7 @@ const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
23
23
|
}
|
|
24
24
|
const base = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/cockpit-panels`;
|
|
25
25
|
const url = `${base}/ai-accountant/jobs?${params.toString()}`;
|
|
26
|
-
return zeniAPI
|
|
27
|
-
.getJSON(url)
|
|
28
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
26
|
+
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
29
27
|
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
30
28
|
const jobs = response.data?.jobs ?? [];
|
|
31
29
|
const users = response.data?.users ?? [];
|
|
@@ -44,8 +42,7 @@ const fetchAiAccountantJobsEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
44
42
|
}
|
|
45
43
|
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiAccountantViewReducer_1.updateAiAccountantJobsFailure)({
|
|
46
44
|
tenantId,
|
|
47
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant jobs fetch failed: ' +
|
|
48
|
-
JSON.stringify(error)),
|
|
45
|
+
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'AI Accountant jobs fetch failed: ' + JSON.stringify(error)),
|
|
49
46
|
}))));
|
|
50
47
|
}));
|
|
51
48
|
exports.fetchAiAccountantJobsEpic = fetchAiAccountantJobsEpic;
|
|
@@ -54,7 +54,10 @@ const triggerAiAccountantJobEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
54
54
|
messageText: 'failed',
|
|
55
55
|
type: 'error',
|
|
56
56
|
variables: [
|
|
57
|
-
{
|
|
57
|
+
{
|
|
58
|
+
variableName: '__reason__',
|
|
59
|
+
variableValue: 'Unexpected error',
|
|
60
|
+
},
|
|
58
61
|
],
|
|
59
62
|
}),
|
|
60
63
|
])));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FetchState } from '../../commonStateTypes/common';
|
|
1
2
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
2
3
|
import { Company } from '../../entity/company/companyStateTypes';
|
|
3
4
|
import { Tag } from '../../entity/tag/tagState';
|
|
@@ -5,7 +6,6 @@ import { Task } from '../../entity/task/taskState';
|
|
|
5
6
|
import { User } from '../../entity/user/userState';
|
|
6
7
|
import { RootState } from '../../reducer';
|
|
7
8
|
import { CompanyTaskManagerViewUIState, TaskManagerMetrics } from './companyTaskManagerViewState';
|
|
8
|
-
import { FetchState } from '../../commonStateTypes/common';
|
|
9
9
|
export interface TaskWithCompanyDetail {
|
|
10
10
|
assignees: User[];
|
|
11
11
|
company: Company;
|
|
@@ -7,7 +7,7 @@ const tagSelector_1 = require("../../entity/tag/tagSelector");
|
|
|
7
7
|
const taskSelector_1 = require("../../entity/task/taskSelector");
|
|
8
8
|
const userSelector_1 = require("../../entity/user/userSelector");
|
|
9
9
|
exports.getCompanyTaskManagerView = (0, toolkit_1.createSelector)((state) => state.companyTaskManagerViewState, (state) => state.companyState, (state) => state.userState, (state) => state.taskState, (state) => state.tagState, (companyTaskManagerViewState, companyState, userState, taskState, tagState) => {
|
|
10
|
-
const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState } = companyTaskManagerViewState;
|
|
10
|
+
const { taskIds, uiState, fetchState, error, totalTaskCount, metrics, metricsFetchState, } = companyTaskManagerViewState;
|
|
11
11
|
const tasksList = [];
|
|
12
12
|
taskIds.forEach((taskId) => {
|
|
13
13
|
const task = (0, taskSelector_1.getTaskById)(taskState, taskId);
|
|
@@ -6,10 +6,10 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
7
|
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
8
8
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
9
|
-
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
10
|
-
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
11
9
|
const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
|
|
12
10
|
const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
|
|
11
|
+
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
12
|
+
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
13
13
|
const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchBulkUploadBatches.match), (0, operators_1.switchMap)((action) => {
|
|
14
14
|
const { cacheOverride } = action.payload;
|
|
15
15
|
const state = state$.value;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js
CHANGED
|
@@ -8,6 +8,7 @@ const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
|
8
8
|
const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
|
|
9
9
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
10
|
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
11
|
+
const completedSubTab_1 = require("../../types/completedSubTab");
|
|
11
12
|
const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(missingReceiptsViewReducer_1.fetchCompletedTransactions.match), (0, operators_1.switchMap)((action) => {
|
|
12
13
|
const state = state$.value;
|
|
13
14
|
const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
|
|
@@ -42,7 +43,7 @@ const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
42
43
|
if (sortOrder != null) {
|
|
43
44
|
queryPayload.sort_order = sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
44
45
|
}
|
|
45
|
-
if (completedSubTab !==
|
|
46
|
+
if (completedSubTab !== completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB) {
|
|
46
47
|
queryPayload.match_type = completedSubTab;
|
|
47
48
|
}
|
|
48
49
|
const encodedQuery = encodeURIComponent(JSON.stringify(queryPayload));
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.restoreBulkUploadAutomatchingOnMountEpic = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
|
+
const tenantSelector_1 = require("../../../../entity/tenant/tenantSelector");
|
|
6
8
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
8
|
-
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
9
9
|
const bulkUploadTiming_1 = require("../../helpers/bulkUploadTiming");
|
|
10
10
|
const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
12
|
+
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
13
13
|
/**
|
|
14
14
|
* On missing-receipts entry / period switch, hydrate the automatching banner for the logged-in
|
|
15
15
|
* user without relying on UI-driven list fetches (the Missing tab does not fetch the batch list
|
|
@@ -52,10 +52,12 @@ const restoreBulkUploadAutomatchingOnMountEpic = (actions$, state$, zeniAPI) =>
|
|
|
52
52
|
bulkUpload.batchListFetchState.fetchState === 'Completed';
|
|
53
53
|
const listSource = alreadyCached
|
|
54
54
|
? (0, rxjs_1.of)(null)
|
|
55
|
-
: zeniAPI
|
|
55
|
+
: zeniAPI
|
|
56
|
+
.getJSON(listUrl)
|
|
57
|
+
.pipe((0, operators_1.catchError)(() => (0, rxjs_1.of)(null)));
|
|
56
58
|
return listSource.pipe((0, operators_1.mergeMap)((listResponse) => {
|
|
57
59
|
const batchList = alreadyCached
|
|
58
|
-
? bulkUpload.batchListByPeriod[periodId] ?? []
|
|
60
|
+
? (bulkUpload.batchListByPeriod[periodId] ?? [])
|
|
59
61
|
: listResponse != null &&
|
|
60
62
|
(0, responsePayload_1.isSuccessResponse)(listResponse) &&
|
|
61
63
|
listResponse.data != null
|
package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js
CHANGED
|
@@ -5,10 +5,11 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const transactionReducer_1 = require("../../../../entity/transaction/transactionReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
+
const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
|
|
8
9
|
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
9
10
|
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
11
|
+
const completedSubTab_1 = require("../../types/completedSubTab");
|
|
10
12
|
const transactionsViewState_1 = require("../../types/transactionsViewState");
|
|
11
|
-
const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
|
|
12
13
|
/**
|
|
13
14
|
* `auto_categorized` for manual transaction search (Unmatched).
|
|
14
15
|
* Backend contract TBD — align with `fetchTransactionCategorizationEpic` (`selectedTab === 'autoCategorized'`)
|
|
@@ -49,6 +50,11 @@ const searchTransactionsForManualMatchEpic = (actions$, state$, zeniAPI) => {
|
|
|
49
50
|
page_token: pageToken ?? null,
|
|
50
51
|
page_size: manualSearch.pageSize,
|
|
51
52
|
search_text: query,
|
|
53
|
+
// Manual search ignores the Completed sub-tab axis — always span the
|
|
54
|
+
// default sentinel so the receipt-matching UX returns results
|
|
55
|
+
// regardless of where the transaction would otherwise be bucketed on
|
|
56
|
+
// the Completed tab.
|
|
57
|
+
sub_tab: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
|
|
52
58
|
};
|
|
53
59
|
return zeniAPI
|
|
54
60
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -3,6 +3,6 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
|
|
4
4
|
import { RootState } from '../../../../reducer';
|
|
5
5
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
6
|
-
import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState } from '../../reducers/transactionsViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof updateTransactions> | ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof fetchTransactionCategorizationFailure> | ReturnType<typeof updateTransactionCategorizationUIState> | ReturnType<typeof updateTotalCountForTransactionCategorization> | ReturnType<typeof fetchTransactionCategorizationSuccess> | ReturnType<typeof resetOtherTabsFetchState>;
|
|
6
|
+
import { fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationSuccess, initializeTransactionCategorizationViewLocalData, resetOtherTabsFetchState, updateParentTotalCountForTab, updateTotalCountForTransactionCategorization, updateTransactionCategorizationUIState } from '../../reducers/transactionsViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof updateTransactions> | ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof fetchTransactionCategorizationFailure> | ReturnType<typeof updateTransactionCategorizationUIState> | ReturnType<typeof updateTotalCountForTransactionCategorization> | ReturnType<typeof updateParentTotalCountForTab> | ReturnType<typeof fetchTransactionCategorizationSuccess> | ReturnType<typeof resetOtherTabsFetchState>;
|
|
8
8
|
export declare const fetchTransactionCategorizationEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -9,6 +9,7 @@ const transactionReducer_1 = require("../../../../entity/transaction/transaction
|
|
|
9
9
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
10
|
const transactionCategorizationLocalDataHelper_1 = require("../../helpers/transactionCategorizationLocalDataHelper");
|
|
11
11
|
const transactionsViewReducer_1 = require("../../reducers/transactionsViewReducer");
|
|
12
|
+
const completedSubTab_1 = require("../../types/completedSubTab");
|
|
12
13
|
const transactionsViewState_1 = require("../../types/transactionsViewState");
|
|
13
14
|
const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(transactionsViewReducer_1.fetchTransactionCategorization.match), (0, operators_1.switchMap)((action) => {
|
|
14
15
|
const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationTransactionsViewState, } = state$.value;
|
|
@@ -26,6 +27,9 @@ const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => action
|
|
|
26
27
|
page_token: pageToken,
|
|
27
28
|
page_size: 25,
|
|
28
29
|
search_text: uiState.searchString,
|
|
30
|
+
sub_tab: selectedTab === 'autoCategorized'
|
|
31
|
+
? expenseAutomationTransactionsViewState.selectedTransactionCategorizationCompletedSubTab
|
|
32
|
+
: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
|
|
29
33
|
};
|
|
30
34
|
return zeniAPI
|
|
31
35
|
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/expense-automation/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
@@ -48,6 +52,12 @@ const fetchTransactionCategorizationEpic = (actions$, state$, zeniAPI) => action
|
|
|
48
52
|
selectedTab,
|
|
49
53
|
totalCount: response.data.total_count,
|
|
50
54
|
}));
|
|
55
|
+
updateActions.push((0, transactionsViewReducer_1.updateParentTotalCountForTab)({
|
|
56
|
+
selectedPeriod,
|
|
57
|
+
selectedTab,
|
|
58
|
+
parentTotalCount: response.data.parent_tab_total_count ??
|
|
59
|
+
response.data.total_count,
|
|
60
|
+
}));
|
|
51
61
|
updateActions.push((0, transactionsViewReducer_1.resetOtherTabsFetchState)({
|
|
52
62
|
refreshViewInBackground,
|
|
53
63
|
tabs: transactionsViewState_1.TRANSACTIONS_TABS.filter((tab) => selectedTab !== tab),
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { ID } from '../../../commonStateTypes/common';
|
|
|
2
2
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
3
3
|
import { UncategorizedAccountTypes } from '../../../entity/account/accountState';
|
|
4
4
|
import { ClassBase } from '../../../entity/class/classState';
|
|
5
|
-
import { ProjectBase } from '../../../entity/project/projectState';
|
|
6
5
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
6
|
+
import { ProjectBase } from '../../../entity/project/projectState';
|
|
7
7
|
import { RecommendationWithCOTByLineId } from '../../../entity/transaction/stateTypes/transaction';
|
|
8
8
|
import { SupportedTransactionPayload, SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
|
|
9
9
|
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
@@ -2,6 +2,7 @@ import { EntityRecommendationPayload } from '../../../commonPayloadTypes/recomme
|
|
|
2
2
|
import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
|
|
3
3
|
import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
|
|
4
4
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
5
|
+
import { CompletedSubTab } from '../types/completedSubTab';
|
|
5
6
|
export interface TransactionCategorizationQueryPayload {
|
|
6
7
|
auto_categorized: boolean;
|
|
7
8
|
end_date: string | null;
|
|
@@ -11,12 +12,32 @@ export interface TransactionCategorizationQueryPayload {
|
|
|
11
12
|
sort_by: string;
|
|
12
13
|
sort_order: string;
|
|
13
14
|
start_date: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Required. For the Completed (`auto_categorized=true`) listing, scopes the
|
|
17
|
+
* returned page + `total_count` to one of the Completed sub-tabs. For the
|
|
18
|
+
* Review listing it is forced to `'all'` to preserve parent-tab semantics
|
|
19
|
+
* on the backend.
|
|
20
|
+
*/
|
|
21
|
+
sub_tab: CompletedSubTab;
|
|
14
22
|
}
|
|
15
23
|
export interface TransactionCategorizationPayload {
|
|
16
24
|
next_page_token: string | null;
|
|
17
25
|
query: TransactionCategorizationQueryPayload;
|
|
18
26
|
total_count: number;
|
|
19
27
|
transactions: SupportedTransactionPayload[];
|
|
28
|
+
/**
|
|
29
|
+
* Count of transactions for the entire parent tab (Review or Completed),
|
|
30
|
+
* regardless of which sub-tab the listing was scoped to. Used solely to
|
|
31
|
+
* drive the parent tab badge counts on the UI; pagination, list-level
|
|
32
|
+
* counts, and sub-tab chips continue to consume {@link total_count}.
|
|
33
|
+
*
|
|
34
|
+
* Optional at the wire boundary so that any version-skew scenario
|
|
35
|
+
* (delayed BE rollout, cached SW response, hotfix without the BE change)
|
|
36
|
+
* deserializes cleanly. Consumers are expected to fall back to
|
|
37
|
+
* {@link total_count} when this is absent — see
|
|
38
|
+
* `fetchTransactionCategorizationEpic` for the canonical fallback.
|
|
39
|
+
*/
|
|
40
|
+
parent_tab_total_count?: number;
|
|
20
41
|
}
|
|
21
42
|
export type TransactionCategorizationResponse = ZeniAPIResponse<TransactionCategorizationPayload>;
|
|
22
43
|
export interface EntityRelatedUpdatesPayload {
|
|
@@ -6,7 +6,8 @@ import type { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
|
6
6
|
import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
|
|
7
7
|
import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
|
|
8
8
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
9
|
-
import { type
|
|
9
|
+
import { type CompletedSubTab } from '../types/completedSubTab';
|
|
10
|
+
import { type BatchDetails, type BatchListItem, type BatchStatus, type BulkUploadResultsTab, type BulkUploadSortKey, type BulkUploadState, type ManualSearchResult, type MissingReceiptsViewState, type MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
10
11
|
export declare const getCompletedTransactionsCacheKey: (periodId: MonthYearPeriodId, sortKey: BulkUploadSortKey | undefined, sortOrder: SortOrder | undefined, subTab: CompletedSubTab) => string;
|
|
11
12
|
export declare const initialBulkUploadState: BulkUploadState;
|
|
12
13
|
export declare const initialState: MissingReceiptsViewState;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.fetchCompletedTransactionsFailure = exports.fetchCompletedTransactionsSuccess = exports.fetchCompletedTransactions = exports.acknowledgeBulkUploadConfirmMatchComplete = exports.clearManualSearchResults = exports.searchTransactionsForManualMatchFailure = exports.searchTransactionsForManualMatchSuccess = exports.searchTransactionsForManualMatch = exports.clearBulkUpload = exports.setBulkUploadSortConfig = exports.setBulkUploadCompletedSubTab = exports.setBulkUploadResultsTab = exports.confirmBulkUploadMatchFailure = exports.confirmBulkUploadMatchSuccess = exports.confirmBulkUploadMatch = exports.fetchBulkUploadBatchesFailure = exports.fetchBulkUploadBatchesSuccess = exports.fetchBulkUploadBatches = exports.fetchMoreBatchDetailsFailure = exports.fetchMoreBatchDetailsComplete = exports.fetchMoreBatchDetails = exports.setInitialBatchDetailsLoading = exports.batchDetailFetchFailed = exports.storeBatchDetails = exports.fetchBulkUploadBatchDetailsFailure = exports.fetchBulkUploadBatchDetailsSuccess = exports.clearMissingReceiptsTabNavigation = exports.requestMissingReceiptsTabNavigation = exports.pusherBatchStatusUpdate = exports.bulkUploadAutomatchingTimedOut = exports.restoreBulkUploadMatchingState = exports.bulkUploadReceiptsFailure = exports.bulkUploadReceiptsSuccess = exports.setBulkUploadUploadedFileCount = exports.updateBulkUploadProgress = exports.bulkUploadReceipts = exports.clearExpenseAutomationMissingReceiptsView = exports.markMissingReceiptAsDone = exports.updateMissingReceiptsUIState = exports.updateMissingReceiptUploadState = exports.uploadMissingReceiptSuccess = exports.fetchMissingReceiptsFailure = exports.fetchMissingReceiptsSuccess = exports.fetchMissingReceipts = exports.restoreBulkUploadAutomatchingOnMount = exports.fetchBulkUploadBatchDetails = exports.initialState = exports.initialBulkUploadState = exports.getCompletedTransactionsCacheKey = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
7
|
+
const completedSubTab_1 = require("../types/completedSubTab");
|
|
7
8
|
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
8
9
|
const getCompletedTransactionsCacheKey = (periodId, sortKey, sortOrder, subTab) => {
|
|
9
10
|
const sortKeyPart = sortKey ?? 'none';
|
|
@@ -17,7 +18,7 @@ exports.initialBulkUploadState = {
|
|
|
17
18
|
batchListByPeriod: {},
|
|
18
19
|
batchListFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
19
20
|
batchStatusById: {},
|
|
20
|
-
completedSubTab:
|
|
21
|
+
completedSubTab: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
|
|
21
22
|
completedTransactionsByPeriod: {},
|
|
22
23
|
confirmMatchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
23
24
|
currentBatchId: undefined,
|
|
@@ -4,9 +4,9 @@ import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePerio
|
|
|
4
4
|
import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
6
6
|
import { ClassBase } from '../../../entity/class/classState';
|
|
7
|
-
import { ProjectBase } from '../../../entity/project/projectState';
|
|
8
7
|
import { CustomerBase } from '../../../entity/customer/customerState';
|
|
9
8
|
import { Entity } from '../../../entity/genericEntity/entity';
|
|
9
|
+
import { ProjectBase } from '../../../entity/project/projectState';
|
|
10
10
|
import { RecommendationWithCOTByLineId, TransactionID } from '../../../entity/transaction/stateTypes/transaction';
|
|
11
11
|
import { SupportedTransaction, SupportedTransactionPayload, SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
|
|
12
12
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
@@ -65,7 +65,9 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
65
65
|
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
66
66
|
}, "expenseAutomationTransactionsView/updateTransactionCategorization", never, never>, updateCurrentSelectedTransactionCategorizationTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSelectedTab: "review" | "autoCategorized"], {
|
|
67
67
|
newSelectedTab: "review" | "autoCategorized";
|
|
68
|
-
}, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>,
|
|
68
|
+
}, "expenseAutomationTransactionsView/updateCurrentSelectedTransactionCategorizationTab", never, never>, updateTransactionCategorizationCompletedSubTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newSubTab: "all" | "manual" | "ai_accountant"], {
|
|
69
|
+
newSubTab: "all" | "manual" | "ai_accountant";
|
|
70
|
+
}, "expenseAutomationTransactionsView/updateTransactionCategorizationCompletedSubTab", never, never>, updateTransactionCategorizationSaveStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", fetchState: FetchState, error?: ZeniAPIStatus<Record<string, unknown>> | undefined], {
|
|
69
71
|
selectedTab: "review" | "autoCategorized";
|
|
70
72
|
fetchState: FetchState;
|
|
71
73
|
error: ZeniAPIStatus<Record<string, unknown>> | undefined;
|
|
@@ -120,7 +122,11 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
120
122
|
selectedPeriod: MonthYearPeriod;
|
|
121
123
|
selectedTab: TransactionsTab;
|
|
122
124
|
totalCount: number;
|
|
123
|
-
}, "expenseAutomationTransactionsView/updateTotalCountForTransactionCategorization">,
|
|
125
|
+
}, "expenseAutomationTransactionsView/updateTotalCountForTransactionCategorization">, updateParentTotalCountForTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
126
|
+
parentTotalCount: number;
|
|
127
|
+
selectedPeriod: MonthYearPeriod;
|
|
128
|
+
selectedTab: TransactionsTab;
|
|
129
|
+
}, "expenseAutomationTransactionsView/updateParentTotalCountForTab">, fetchTransactionCategorizationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
124
130
|
selectedTab: TransactionsTab;
|
|
125
131
|
status: ZeniAPIStatus;
|
|
126
132
|
refreshViewInBackground?: boolean;
|