@zeniai/client-epic-state 5.0.64-betaML1 → 5.0.64-betaSS1
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/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/entity/account/accountSelector.d.ts +0 -9
- package/lib/entity/account/accountSelector.js +1 -14
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- 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/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -4
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -2
- package/lib/esm/entity/account/accountSelector.js +0 -11
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -10
- package/lib/esm/epic.js +1 -3
- package/lib/esm/index.js +7 -6
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +6 -0
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +11 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -8
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +113 -78
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -31
- package/lib/esm/view/expenseAutomationView/types/completedSubTab.js +17 -0
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -2
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +0 -5
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -24
- package/lib/index.d.ts +6 -5
- package/lib/index.js +39 -45
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.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/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +2 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +6 -0
- 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/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -7
- 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 +10 -23
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +114 -79
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +15 -4
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -32
- 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 +32 -15
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -6
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -10
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -6
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -23
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -81
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -30
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/transactionCategorization/createTransferEntryEpic.js +0 -85
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransferAccountsEpic.js +0 -34
package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js
CHANGED
|
@@ -7,6 +7,7 @@ const transactionReducer_1 = require("../../../../entity/transaction/transaction
|
|
|
7
7
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
8
|
const missingReceiptsPayload_1 = require("../../payload/missingReceiptsPayload");
|
|
9
9
|
const missingReceiptsViewReducer_1 = require("../../reducers/missingReceiptsViewReducer");
|
|
10
|
+
const completedSubTab_1 = require("../../types/completedSubTab");
|
|
10
11
|
const transactionsViewState_1 = require("../../types/transactionsViewState");
|
|
11
12
|
const rollingCalendarDateRangeInclusive_1 = require("../../helpers/rollingCalendarDateRangeInclusive");
|
|
12
13
|
/**
|
|
@@ -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),
|
|
@@ -5,6 +5,6 @@ import { fetchAccountList } from '../../../accountList/accountListReducer';
|
|
|
5
5
|
import { fetchClassList } from '../../../classList/classListReducer';
|
|
6
6
|
import { fetchOwnerList } from '../../../ownerList/ownerListReducer';
|
|
7
7
|
import { fetchProjectList } from '../../../projectList/projectListReducer';
|
|
8
|
-
import { fetchTransactionCategorization, fetchTransactionCategorizationView
|
|
9
|
-
export type ActionType = ReturnType<typeof fetchTransactionCategorizationView> | ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchOwnerList> | ReturnType<typeof
|
|
8
|
+
import { fetchTransactionCategorization, fetchTransactionCategorizationView } from '../../reducers/transactionsViewReducer';
|
|
9
|
+
export type ActionType = ReturnType<typeof fetchTransactionCategorizationView> | ReturnType<typeof fetchTransactionCategorization> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchOwnerList> | ReturnType<typeof fetchProjectList>;
|
|
10
10
|
export declare const fetchTransactionCategorizationViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
|
|
@@ -26,13 +26,6 @@ const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pi
|
|
|
26
26
|
accountList.fetchState === 'Not-Started') {
|
|
27
27
|
updateActions.push((0, accountListReducer_1.fetchAccountList)('accountList', true));
|
|
28
28
|
}
|
|
29
|
-
const { transferAccounts, creditCardAccountsForTransfer, } = state$.value.expenseAutomationTransactionsViewState;
|
|
30
|
-
if (transferAccounts.fetchState === 'Not-Started') {
|
|
31
|
-
updateActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
|
|
32
|
-
}
|
|
33
|
-
if (creditCardAccountsForTransfer.fetchState === 'Not-Started') {
|
|
34
|
-
updateActions.push((0, transactionsViewReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
|
|
35
|
-
}
|
|
36
29
|
const classList = state$.value.classListState;
|
|
37
30
|
if (classList.hasValidState() === false &&
|
|
38
31
|
classList.fetchState === 'Not-Started') {
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
38
38
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
39
39
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
40
40
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
41
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "
|
|
41
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
|
|
42
42
|
messageText: "notification" | "failed" | "success";
|
|
43
43
|
type: "error" | "success" | "info";
|
|
44
44
|
variables: {
|
|
@@ -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,
|
|
@@ -13,7 +13,7 @@ import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
|
13
13
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
14
14
|
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
15
15
|
import { UpdateTransactionCategorizationResponsePayload } from '../payload/transactionCategorizationPayload';
|
|
16
|
-
import { SupportedTransactionCategorization, TransactionSaveUpdates, TransactionsTab, TransactionsTabViewState, TransactionsViewState, TransactionsViewUIState
|
|
16
|
+
import { SupportedTransactionCategorization, TransactionSaveUpdates, TransactionsTab, TransactionsTabViewState, TransactionsViewState, TransactionsViewUIState } from '../types/transactionsViewState';
|
|
17
17
|
export declare const initialTransactionTabViewState: TransactionsTabViewState;
|
|
18
18
|
export declare const initialState: TransactionsViewState;
|
|
19
19
|
export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", period: TimePeriod, cacheOverride?: any, keepExistingListItems?: any, searchString?: string | undefined, pageToken?: PageToken | undefined, refreshViewInBackground?: any, resetListItems?: boolean | undefined, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
|
|
@@ -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;
|
|
@@ -164,26 +170,7 @@ export declare const fetchTransactionCategorization: import("@reduxjs/toolkit").
|
|
|
164
170
|
}, "expenseAutomationTransactionsView/syncTransactionCategorizationFromDetailSave", never, never>, backgroundRefetchReviewTab: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, isUncategorizedExpenseCategoryEnabled?: boolean | undefined], {
|
|
165
171
|
period: TimePeriod;
|
|
166
172
|
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
167
|
-
}, "expenseAutomationTransactionsView/backgroundRefetchReviewTab", never, never>,
|
|
168
|
-
kind: TransferAccountsFetchKind;
|
|
169
|
-
}, "expenseAutomationTransactionsView/fetchAccountsForTransferFlow">, updateAccountsForTransferFlow: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
170
|
-
accountIds: ID[];
|
|
171
|
-
kind: TransferAccountsFetchKind;
|
|
172
|
-
}, "expenseAutomationTransactionsView/updateAccountsForTransferFlow">, updateAccountsForTransferFlowFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
173
|
-
kind: TransferAccountsFetchKind;
|
|
174
|
-
}, "expenseAutomationTransactionsView/updateAccountsForTransferFlowFailure">, createTransferEntry: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string, creditAccountIntegrationId: string, debitAccountIntegrationId: string, memo: string, transactionType: string, sourceTransactionType: string], {
|
|
175
|
-
transactionId: string;
|
|
176
|
-
creditAccountIntegrationId: string;
|
|
177
|
-
debitAccountIntegrationId: string;
|
|
178
|
-
memo: string;
|
|
179
|
-
transactionType: string;
|
|
180
|
-
sourceTransactionType: string;
|
|
181
|
-
}, "expenseAutomationTransactionsView/createTransferEntry", never, never>, createTransferEntrySuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationTransactionsView/createTransferEntrySuccess">, createTransferEntryFailure: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationTransactionsView/createTransferEntryFailure">, resetCreateTransferEntryStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationTransactionsView/resetCreateTransferEntryStatus">, createTransferEntryReplacedTransaction: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[previousTransactionId: TransactionID, newTransactionId: TransactionID], {
|
|
182
|
-
newTransactionId: TransactionID;
|
|
183
|
-
previousTransactionId: TransactionID;
|
|
184
|
-
}, "expenseAutomationTransactionsView/createTransferEntryReplacedTransaction", never, never>, acknowledgeTransferEntryRouteReplacement: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationTransactionsView/acknowledgeTransferEntryRouteReplacement">, removeTransactionFromAllTabs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string], {
|
|
185
|
-
transactionId: string;
|
|
186
|
-
}, "expenseAutomationTransactionsView/removeTransactionFromAllTabs", never, never>, updateTransactionCategorizationUploadReceiptState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, fetchStatus: FetchStateAndError], {
|
|
173
|
+
}, "expenseAutomationTransactionsView/backgroundRefetchReviewTab", never, never>, updateTransactionCategorizationUploadReceiptState: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedTab: "review" | "autoCategorized", transactionId: string, fetchStatus: FetchStateAndError], {
|
|
187
174
|
selectedTab: "review" | "autoCategorized";
|
|
188
175
|
transactionId: string;
|
|
189
176
|
fetchStatus: FetchStateAndError;
|
|
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.uploadTransactionCategorizationReceiptSuccess = exports.updateTransactionCategorizationUploadReceiptState = exports.
|
|
7
|
+
exports.uploadTransactionCategorizationReceiptSuccess = exports.updateTransactionCategorizationUploadReceiptState = exports.backgroundRefetchReviewTab = exports.syncTransactionCategorizationFromDetailSave = exports.updateSelectedTransactionId = exports.setEntityRecommendationForLineIdsForCategorization = exports.clearExpenseAutomationTransactionsView = exports.clearExpenseAutomationTransactionsViewPerTabView = exports.updateSelectedCheckboxTransactionIds = exports.fetchTransactionCategorizationView = exports.resetOtherTabsFetchState = exports.fetchTransactionCategorizationSuccess = exports.updateParentTotalCountForTab = exports.updateTotalCountForTransactionCategorization = exports.setAllItemsToCategoryClassInLocalDataForCategorization = exports.updateSelectedCustomerForTransaction = exports.updateSelectedVendorForTransaction = exports.updateStatusForTransactionNotMiscategorizedUpdateForCategorization = exports.markTransactionAsNotMiscategorized = exports.updateTransactionCategorizationSaveStatus = exports.updateTransactionCategorizationCompletedSubTab = exports.updateCurrentSelectedTransactionCategorizationTab = exports.updateTransactionCategorization = exports.saveTransactionCategorization = exports.fetchTransactionCategorizationFailure = exports.saveTransactionCategorizationLocalData = exports.initializeTransactionCategorizationViewLocalData = exports.updateTransactionCategorizationUIState = exports.fetchTransactionCategorization = exports.initialState = exports.initialTransactionTabViewState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
11
11
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
12
12
|
const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
|
|
13
13
|
const transactionCategorizationLocalDataHelper_1 = require("../helpers/transactionCategorizationLocalDataHelper");
|
|
14
|
-
const
|
|
14
|
+
const completedSubTab_1 = require("../types/completedSubTab");
|
|
15
15
|
exports.initialTransactionTabViewState = {
|
|
16
16
|
saveStatus: {
|
|
17
17
|
fetchState: 'Not-Started',
|
|
@@ -49,22 +49,68 @@ exports.initialTransactionTabViewState = {
|
|
|
49
49
|
selectedTransactionLineId: undefined,
|
|
50
50
|
};
|
|
51
51
|
exports.initialState = {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
autoCategorizedSubTabCache: {},
|
|
53
|
+
parentTotalCountByTab: {
|
|
54
|
+
review: {},
|
|
55
|
+
autoCategorized: {},
|
|
56
56
|
},
|
|
57
|
-
lastTransferEntryReplacement: undefined,
|
|
58
57
|
selectedTransactionCategorizationTab: 'review',
|
|
58
|
+
selectedTransactionCategorizationCompletedSubTab: completedSubTab_1.DEFAULT_COMPLETED_SUB_TAB,
|
|
59
59
|
transactionCategorizationView: {
|
|
60
60
|
review: { ...exports.initialTransactionTabViewState },
|
|
61
61
|
autoCategorized: { ...exports.initialTransactionTabViewState },
|
|
62
62
|
},
|
|
63
|
-
transferAccounts: {
|
|
64
|
-
accountIds: [],
|
|
65
|
-
fetchState: 'Not-Started',
|
|
66
|
-
},
|
|
67
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Capture the autoCategorized tab's current paginated dataset for a sub-tab.
|
|
66
|
+
* The mid-flight `'In-Progress'` state is normalised to `'Completed'` because
|
|
67
|
+
* the in-flight request is cancelled by `switchMap` in the fetch epic when the
|
|
68
|
+
* sub-tab changes — restoring `'In-Progress'` later would leave the UI stuck
|
|
69
|
+
* showing a phantom loading state with no fetch actually running. Length-zero
|
|
70
|
+
* datasets degrade to `'Not-Started'` so the next visit triggers a fresh
|
|
71
|
+
* fetch from page 1 instead of short-circuiting on stale empty caches.
|
|
72
|
+
*
|
|
73
|
+
* Snapshot scope (deliberately narrow):
|
|
74
|
+
* - Captured: `pageToken`, `totalCount`, `transactionIdsBySelectedPeriod`,
|
|
75
|
+
* `fetchState`, `error`. These are the keys the fetch epic's cache check
|
|
76
|
+
* reads to decide whether to short-circuit a sub-tab revisit.
|
|
77
|
+
* - Intentionally NOT captured (left in place on `autoCat` and inherited by
|
|
78
|
+
* the incoming sub-tab):
|
|
79
|
+
* - `uiState.searchString`, `uiState.sortKey`, `uiState.sortOrder`,
|
|
80
|
+
* `uiState.scrollPosition`, `uiState.nodeCollapseState`,
|
|
81
|
+
* `uiState.limit` — search and sort are user-applied preferences that
|
|
82
|
+
* persist across sub-tabs by design (a search query stays active when
|
|
83
|
+
* the user toggles between Manual / AI Accountant).
|
|
84
|
+
* - `selectedCheckBoxTransactionIds` — selection state is intentionally
|
|
85
|
+
* cleared at the action source (the fetch epic / save flow), not
|
|
86
|
+
* by the snapshot path. Carrying selection across sub-tabs is safe
|
|
87
|
+
* because every sub-tab change goes through a fetch round-trip that
|
|
88
|
+
* reconciles selection against the new row IDs.
|
|
89
|
+
* - `transactionReviewLocalDataById`, `transactionIdsWithUnsavedData`,
|
|
90
|
+
* `uploadReceiptStatusById`, `saveStatus`, `refreshStatus`,
|
|
91
|
+
* `markAsNotMiscategorizedStatus` — these are per-row / per-flight
|
|
92
|
+
* caches that are write-through global state, not sub-tab-scoped.
|
|
93
|
+
*
|
|
94
|
+
* If the contract changes (e.g. selection should reset on every sub-tab
|
|
95
|
+
* switch), update both this comment and the snapshot return shape together.
|
|
96
|
+
*/
|
|
97
|
+
function snapshotAutoCategorizedTab(autoCat) {
|
|
98
|
+
const transactionIdsBySelectedPeriod = {
|
|
99
|
+
...autoCat.transactionIdsBySelectedPeriod,
|
|
100
|
+
};
|
|
101
|
+
const hasAnyLoadedRows = Object.values(transactionIdsBySelectedPeriod).some((ids) => ids.length > 0);
|
|
102
|
+
let normalisedFetchState = autoCat.fetchState;
|
|
103
|
+
if (normalisedFetchState === 'In-Progress') {
|
|
104
|
+
normalisedFetchState = hasAnyLoadedRows ? 'Completed' : 'Not-Started';
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
error: autoCat.error,
|
|
108
|
+
fetchState: normalisedFetchState,
|
|
109
|
+
pageToken: autoCat.uiState.pageToken,
|
|
110
|
+
totalCount: { ...autoCat.uiState.totalCount },
|
|
111
|
+
transactionIdsBySelectedPeriod,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
68
114
|
const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
69
115
|
name: 'expenseAutomationTransactionsView',
|
|
70
116
|
initialState: exports.initialState,
|
|
@@ -278,6 +324,48 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
278
324
|
return { payload: { newSelectedTab } };
|
|
279
325
|
},
|
|
280
326
|
},
|
|
327
|
+
updateTransactionCategorizationCompletedSubTab: {
|
|
328
|
+
reducer(draft, action) {
|
|
329
|
+
const { newSubTab } = action.payload;
|
|
330
|
+
const previousSubTab = draft.selectedTransactionCategorizationCompletedSubTab;
|
|
331
|
+
if (previousSubTab === newSubTab) {
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
const autoCat = draft.transactionCategorizationView.autoCategorized;
|
|
335
|
+
// Snapshot the outgoing sub-tab so a future revisit can short-circuit
|
|
336
|
+
// the fetch epic (mirrors the parent-tab "don't refetch what's
|
|
337
|
+
// already cached" behaviour). Period-scoped data is preserved as-is
|
|
338
|
+
// because the snapshot itself is keyed only by sub-tab; the active
|
|
339
|
+
// tab's per-period maps remain the source of truth while live.
|
|
340
|
+
draft.autoCategorizedSubTabCache[previousSubTab] =
|
|
341
|
+
snapshotAutoCategorizedTab(autoCat);
|
|
342
|
+
const cached = draft.autoCategorizedSubTabCache[newSubTab];
|
|
343
|
+
if (cached != null) {
|
|
344
|
+
autoCat.uiState.pageToken = cached.pageToken;
|
|
345
|
+
autoCat.uiState.totalCount = { ...cached.totalCount };
|
|
346
|
+
autoCat.transactionIdsBySelectedPeriod = {
|
|
347
|
+
...cached.transactionIdsBySelectedPeriod,
|
|
348
|
+
};
|
|
349
|
+
autoCat.fetchState = cached.fetchState;
|
|
350
|
+
autoCat.error = cached.error;
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
// Sub-tab has never been visited — clear the active slot so the
|
|
354
|
+
// view-epic's `fetchState === 'Not-Started' || transactionIds.length
|
|
355
|
+
// === 0` cache check falls through and triggers a fresh page-1
|
|
356
|
+
// fetch for the new dataset.
|
|
357
|
+
autoCat.uiState.pageToken = null;
|
|
358
|
+
autoCat.uiState.totalCount = {};
|
|
359
|
+
autoCat.transactionIdsBySelectedPeriod = {};
|
|
360
|
+
autoCat.fetchState = 'Not-Started';
|
|
361
|
+
autoCat.error = undefined;
|
|
362
|
+
}
|
|
363
|
+
draft.selectedTransactionCategorizationCompletedSubTab = newSubTab;
|
|
364
|
+
},
|
|
365
|
+
prepare(newSubTab) {
|
|
366
|
+
return { payload: { newSubTab } };
|
|
367
|
+
},
|
|
368
|
+
},
|
|
281
369
|
updateTransactionCategorization: {
|
|
282
370
|
reducer(draft, action) {
|
|
283
371
|
const selectedTab = action.payload.selectedTab;
|
|
@@ -715,6 +803,10 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
715
803
|
const { selectedTab, selectedPeriod, totalCount } = action.payload;
|
|
716
804
|
draft.transactionCategorizationView[selectedTab].uiState.totalCount[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = totalCount;
|
|
717
805
|
},
|
|
806
|
+
updateParentTotalCountForTab(draft, action) {
|
|
807
|
+
const { selectedTab, selectedPeriod, parentTotalCount } = action.payload;
|
|
808
|
+
draft.parentTotalCountByTab[selectedTab][(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = parentTotalCount;
|
|
809
|
+
},
|
|
718
810
|
updateSelectedCheckboxTransactionIds(draft, action) {
|
|
719
811
|
const selectedTab = action.payload.selectedTab;
|
|
720
812
|
const transactionIds = action.payload.transactionIds;
|
|
@@ -725,6 +817,16 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
725
817
|
draft.transactionCategorizationView[selectedTab] = {
|
|
726
818
|
...exports.initialTransactionTabViewState,
|
|
727
819
|
};
|
|
820
|
+
draft.parentTotalCountByTab[selectedTab] = {};
|
|
821
|
+
// The per-sub-tab snapshot cache lives at the slice root and is
|
|
822
|
+
// exclusively populated by the autoCategorized tab's sub-tab switching
|
|
823
|
+
// (see updateTransactionCategorizationCompletedSubTab). When that tab
|
|
824
|
+
// is reset, leaving stale snapshots behind would short-circuit the
|
|
825
|
+
// next sub-tab visit with phantom row IDs / page tokens that no longer
|
|
826
|
+
// correspond to anything in state — drop them in lockstep.
|
|
827
|
+
if (selectedTab === 'autoCategorized') {
|
|
828
|
+
draft.autoCategorizedSubTabCache = {};
|
|
829
|
+
}
|
|
728
830
|
},
|
|
729
831
|
clearExpenseAutomationTransactionsView(draft) {
|
|
730
832
|
Object.assign(draft, exports.initialState);
|
|
@@ -819,74 +921,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
819
921
|
};
|
|
820
922
|
},
|
|
821
923
|
},
|
|
822
|
-
fetchAccountsForTransferFlow(draft, action) {
|
|
823
|
-
const slice = action.payload.kind === 'credit_card_only'
|
|
824
|
-
? draft.creditCardAccountsForTransfer
|
|
825
|
-
: draft.transferAccounts;
|
|
826
|
-
slice.fetchState = 'In-Progress';
|
|
827
|
-
},
|
|
828
|
-
updateAccountsForTransferFlow(draft, action) {
|
|
829
|
-
const slice = action.payload.kind === 'credit_card_only'
|
|
830
|
-
? draft.creditCardAccountsForTransfer
|
|
831
|
-
: draft.transferAccounts;
|
|
832
|
-
slice.fetchState = 'Completed';
|
|
833
|
-
slice.accountIds = action.payload.accountIds;
|
|
834
|
-
},
|
|
835
|
-
updateAccountsForTransferFlowFailure(draft, action) {
|
|
836
|
-
const slice = action.payload.kind === 'credit_card_only'
|
|
837
|
-
? draft.creditCardAccountsForTransfer
|
|
838
|
-
: draft.transferAccounts;
|
|
839
|
-
slice.fetchState = 'Error';
|
|
840
|
-
},
|
|
841
|
-
createTransferEntry: {
|
|
842
|
-
prepare(transactionId, creditAccountIntegrationId, debitAccountIntegrationId, memo, transactionType, sourceTransactionType) {
|
|
843
|
-
return {
|
|
844
|
-
payload: {
|
|
845
|
-
transactionId,
|
|
846
|
-
creditAccountIntegrationId,
|
|
847
|
-
debitAccountIntegrationId,
|
|
848
|
-
memo,
|
|
849
|
-
transactionType,
|
|
850
|
-
sourceTransactionType,
|
|
851
|
-
},
|
|
852
|
-
};
|
|
853
|
-
},
|
|
854
|
-
reducer(draft) {
|
|
855
|
-
draft.createTransferEntryStatus = 'In-Progress';
|
|
856
|
-
},
|
|
857
|
-
},
|
|
858
|
-
createTransferEntrySuccess(draft) {
|
|
859
|
-
draft.createTransferEntryStatus = 'Completed';
|
|
860
|
-
},
|
|
861
|
-
createTransferEntryFailure(draft) {
|
|
862
|
-
draft.createTransferEntryStatus = 'Error';
|
|
863
|
-
},
|
|
864
|
-
resetCreateTransferEntryStatus(draft) {
|
|
865
|
-
draft.createTransferEntryStatus = 'Not-Started';
|
|
866
|
-
},
|
|
867
|
-
createTransferEntryReplacedTransaction: {
|
|
868
|
-
prepare(previousTransactionId, newTransactionId) {
|
|
869
|
-
return { payload: { newTransactionId, previousTransactionId } };
|
|
870
|
-
},
|
|
871
|
-
reducer(draft, action) {
|
|
872
|
-
draft.lastTransferEntryReplacement = action.payload;
|
|
873
|
-
},
|
|
874
|
-
},
|
|
875
|
-
acknowledgeTransferEntryRouteReplacement(draft) {
|
|
876
|
-
draft.lastTransferEntryReplacement = undefined;
|
|
877
|
-
},
|
|
878
|
-
removeTransactionFromAllTabs: {
|
|
879
|
-
prepare(transactionId) {
|
|
880
|
-
return { payload: { transactionId } };
|
|
881
|
-
},
|
|
882
|
-
reducer(draft, action) {
|
|
883
|
-
const { transactionId } = action.payload;
|
|
884
|
-
for (const tab of transactionsViewState_1.TRANSACTIONS_TABS) {
|
|
885
|
-
(0, transactionCategorizationLocalDataHelper_1.removeTransactionFromTabView)(draft.transactionCategorizationView[tab], transactionId);
|
|
886
|
-
}
|
|
887
|
-
},
|
|
888
|
-
},
|
|
889
924
|
},
|
|
890
925
|
});
|
|
891
|
-
_a = expenseAutomationTransactionsView.actions, exports.fetchTransactionCategorization = _a.fetchTransactionCategorization, exports.updateTransactionCategorizationUIState = _a.updateTransactionCategorizationUIState, exports.initializeTransactionCategorizationViewLocalData = _a.initializeTransactionCategorizationViewLocalData, exports.saveTransactionCategorizationLocalData = _a.saveTransactionCategorizationLocalData, exports.fetchTransactionCategorizationFailure = _a.fetchTransactionCategorizationFailure, exports.saveTransactionCategorization = _a.saveTransactionCategorization, exports.updateTransactionCategorization = _a.updateTransactionCategorization, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab, exports.updateTransactionCategorizationSaveStatus = _a.updateTransactionCategorizationSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.updateStatusForTransactionNotMiscategorizedUpdateForCategorization = _a.updateStatusForTransactionNotMiscategorizedUpdateForCategorization, exports.updateSelectedVendorForTransaction = _a.updateSelectedVendorForTransaction, exports.updateSelectedCustomerForTransaction = _a.updateSelectedCustomerForTransaction, exports.setAllItemsToCategoryClassInLocalDataForCategorization = _a.setAllItemsToCategoryClassInLocalDataForCategorization, exports.updateTotalCountForTransactionCategorization = _a.updateTotalCountForTransactionCategorization, exports.fetchTransactionCategorizationSuccess = _a.fetchTransactionCategorizationSuccess, exports.resetOtherTabsFetchState = _a.resetOtherTabsFetchState, exports.fetchTransactionCategorizationView = _a.fetchTransactionCategorizationView, exports.updateSelectedCheckboxTransactionIds = _a.updateSelectedCheckboxTransactionIds, exports.clearExpenseAutomationTransactionsViewPerTabView = _a.clearExpenseAutomationTransactionsViewPerTabView, exports.clearExpenseAutomationTransactionsView = _a.clearExpenseAutomationTransactionsView, exports.setEntityRecommendationForLineIdsForCategorization = _a.setEntityRecommendationForLineIdsForCategorization, exports.updateSelectedTransactionId = _a.updateSelectedTransactionId, exports.syncTransactionCategorizationFromDetailSave = _a.syncTransactionCategorizationFromDetailSave, exports.backgroundRefetchReviewTab = _a.backgroundRefetchReviewTab, exports.
|
|
926
|
+
_a = expenseAutomationTransactionsView.actions, exports.fetchTransactionCategorization = _a.fetchTransactionCategorization, exports.updateTransactionCategorizationUIState = _a.updateTransactionCategorizationUIState, exports.initializeTransactionCategorizationViewLocalData = _a.initializeTransactionCategorizationViewLocalData, exports.saveTransactionCategorizationLocalData = _a.saveTransactionCategorizationLocalData, exports.fetchTransactionCategorizationFailure = _a.fetchTransactionCategorizationFailure, exports.saveTransactionCategorization = _a.saveTransactionCategorization, exports.updateTransactionCategorization = _a.updateTransactionCategorization, exports.updateCurrentSelectedTransactionCategorizationTab = _a.updateCurrentSelectedTransactionCategorizationTab, exports.updateTransactionCategorizationCompletedSubTab = _a.updateTransactionCategorizationCompletedSubTab, exports.updateTransactionCategorizationSaveStatus = _a.updateTransactionCategorizationSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.updateStatusForTransactionNotMiscategorizedUpdateForCategorization = _a.updateStatusForTransactionNotMiscategorizedUpdateForCategorization, exports.updateSelectedVendorForTransaction = _a.updateSelectedVendorForTransaction, exports.updateSelectedCustomerForTransaction = _a.updateSelectedCustomerForTransaction, exports.setAllItemsToCategoryClassInLocalDataForCategorization = _a.setAllItemsToCategoryClassInLocalDataForCategorization, exports.updateTotalCountForTransactionCategorization = _a.updateTotalCountForTransactionCategorization, exports.updateParentTotalCountForTab = _a.updateParentTotalCountForTab, exports.fetchTransactionCategorizationSuccess = _a.fetchTransactionCategorizationSuccess, exports.resetOtherTabsFetchState = _a.resetOtherTabsFetchState, exports.fetchTransactionCategorizationView = _a.fetchTransactionCategorizationView, exports.updateSelectedCheckboxTransactionIds = _a.updateSelectedCheckboxTransactionIds, exports.clearExpenseAutomationTransactionsViewPerTabView = _a.clearExpenseAutomationTransactionsViewPerTabView, exports.clearExpenseAutomationTransactionsView = _a.clearExpenseAutomationTransactionsView, exports.setEntityRecommendationForLineIdsForCategorization = _a.setEntityRecommendationForLineIdsForCategorization, exports.updateSelectedTransactionId = _a.updateSelectedTransactionId, exports.syncTransactionCategorizationFromDetailSave = _a.syncTransactionCategorizationFromDetailSave, exports.backgroundRefetchReviewTab = _a.backgroundRefetchReviewTab, exports.updateTransactionCategorizationUploadReceiptState = _a.updateTransactionCategorizationUploadReceiptState, exports.uploadTransactionCategorizationReceiptSuccess = _a.uploadTransactionCategorizationReceiptSuccess;
|
|
892
927
|
exports.default = expenseAutomationTransactionsView.reducer;
|
|
@@ -2,7 +2,8 @@ import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonSta
|
|
|
2
2
|
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
3
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { SupportedTransaction } from '../../../entity/transaction/transactionState';
|
|
5
|
-
import type {
|
|
5
|
+
import type { CompletedSubTab } from '../types/completedSubTab';
|
|
6
|
+
import type { BatchFileStatus, BatchListItem, BatchStatus, BulkUploadPhase, BulkUploadResultsTab, BulkUploadSortKey, ManualSearchState, MatchSource, MissingReceiptsViewUIState } from '../types/missingReceiptsViewState';
|
|
6
7
|
export interface CompletedTransactionsSelectorData {
|
|
7
8
|
fetchState: FetchStateAndError;
|
|
8
9
|
nextPageToken: string | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
|
|
3
|
-
import { CompletionStatusType,
|
|
3
|
+
import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
4
4
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
6
6
|
import { ClassBase } from '../../../entity/class/classState';
|
|
7
7
|
import { SupportedTransactionWithCOT } from '../../../entity/transaction/transactionState';
|
|
8
8
|
import { UncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
9
9
|
import { ProjectListSelectorView } from '../../projectList/projectListSelector';
|
|
10
|
+
import { CompletedSubTab } from '../types/completedSubTab';
|
|
10
11
|
import { TransactionReviewLocalData, TransactionsTab, TransactionsViewUIState } from '../types/transactionsViewState';
|
|
11
12
|
export interface TransactionReviewLocalDataSelectorView {
|
|
12
13
|
transactionId: ID;
|
|
@@ -18,20 +19,30 @@ export interface ExpenseAutomationTransactionViewSelector extends SelectorView {
|
|
|
18
19
|
classHierarchyList: NestedClassHierarchyForReport[];
|
|
19
20
|
classList: ClassBase[];
|
|
20
21
|
completionStatus: CompletionStatusType;
|
|
21
|
-
createTransferEntryStatus: FetchState;
|
|
22
|
-
creditCardAccountsForTransferList: AccountBase[];
|
|
23
22
|
fetchStateByTransactionTabs: Record<TransactionsTab, FetchStateAndError>;
|
|
24
23
|
isAccountingProjectsEnabled: boolean;
|
|
25
24
|
markAsNotMiscategorizedStatus: FetchStateAndError;
|
|
25
|
+
/**
|
|
26
|
+
* Parent tab badge counts, sourced from the listing response's
|
|
27
|
+
* `parent_tab_total_count`. Used exclusively to drive the navbar / tab
|
|
28
|
+
* strip badge labels — every other count consumer (pagination, in-list
|
|
29
|
+
* "showing X of Y", save flows) keeps reading {@link totalCountByTab}.
|
|
30
|
+
*/
|
|
31
|
+
parentTabTotalCountByTab: Record<TransactionsTab, number>;
|
|
26
32
|
projectList: ProjectListSelectorView;
|
|
27
33
|
refreshStatus: FetchStateAndError;
|
|
28
34
|
saveStatus: FetchStateAndError;
|
|
29
35
|
selectedCheckBoxTransactionIds: ID[];
|
|
36
|
+
selectedTransactionCategorizationCompletedSubTab: CompletedSubTab;
|
|
37
|
+
/**
|
|
38
|
+
* Per-(sub-)tab counts mirroring `total_count` from the listing response.
|
|
39
|
+
* Powers pagination via `InfiniteLoader.itemCount`, in-list count copy,
|
|
40
|
+
* and the `resetTransactionCategorizationLocalData` round-trip.
|
|
41
|
+
*/
|
|
30
42
|
totalCountByTab: Record<TransactionsTab, number>;
|
|
31
43
|
transactionIdsWithUnsavedData: ID[];
|
|
32
44
|
transactionLocalData: TransactionReviewLocalDataSelectorView[];
|
|
33
45
|
transactions: SupportedTransactionWithCOT[];
|
|
34
|
-
transferAccounts: AccountBase[];
|
|
35
46
|
uiState: TransactionsViewUIState;
|
|
36
47
|
uncategorizedAccounts: UncategorizedAccounts;
|
|
37
48
|
uploadReceiptStatusById: Record<ID, FetchStateAndError>;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { RootState } from '../../../reducer';
|
|
2
2
|
import { ExpenseAutomationTransactionViewSelector } from '../selectorTypes/transactionsViewSelectorTypes';
|
|
3
|
-
import { TransferEntryRouteReplacement } from '../types/transactionsViewState';
|
|
4
|
-
export declare function getLastTransferEntryReplacement(state: RootState): TransferEntryRouteReplacement | undefined;
|
|
5
3
|
export declare function getExpenseAutomationTransactionView(state: RootState): ExpenseAutomationTransactionViewSelector;
|