@zeniai/client-epic-state 5.0.69-betaML2 → 5.0.69-betaML21
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/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -20
- package/lib/epic.d.ts +2 -2
- package/lib/epic.js +2 -2
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -20
- package/lib/esm/epic.js +2 -2
- package/lib/esm/index.js +1 -1
- package/lib/esm/reducer.js +1 -1
- package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +17 -1
- package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +13 -12
- package/lib/esm/view/createTransferEntry/createTransferEntryState.js +4 -4
- package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +20 -2
- package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +8 -8
- package/lib/reducer.d.ts +1 -1
- package/lib/reducer.js +1 -1
- package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +1 -1
- package/lib/view/createTransferEntry/createTransferEntryReducer.js +18 -2
- package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +8 -7
- package/lib/view/createTransferEntry/createTransferEntrySelector.js +13 -12
- package/lib/view/createTransferEntry/createTransferEntryState.d.ts +1 -1
- package/lib/view/createTransferEntry/createTransferEntryState.js +4 -4
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +20 -2
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +4 -4
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSnackbarMessageSection: (v: string) => "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" | "
|
|
1
|
+
export declare const toSnackbarMessageSection: (v: string) => "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" | "create_transfer_entry" | "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";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
3
|
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
@@ -182,7 +182,6 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
182
182
|
'treasury_update_portfolio_allocation',
|
|
183
183
|
'send_email_magic_link_to_user',
|
|
184
184
|
'complete_profile_done',
|
|
185
|
-
'convert_transaction_type',
|
|
186
185
|
'create_transfer_entry',
|
|
187
186
|
'reports_resync',
|
|
188
187
|
'invalid_phone_number',
|
|
@@ -39,6 +39,7 @@ import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView
|
|
|
39
39
|
import { clearCompanyMonthEndReportView } from '../../view/companyMonthEndReportView/companyMonthEndReportViewReducer';
|
|
40
40
|
import { clearCompanyTaskManagerView } from '../../view/companyTaskManagerView/companyTaskManagerViewReducer';
|
|
41
41
|
import { clearCompanyView } from '../../view/companyView/companyViewReducer';
|
|
42
|
+
import { clearCreateTransferEntry } from '../../view/createTransferEntry/createTransferEntryReducer';
|
|
42
43
|
import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
|
|
43
44
|
import { clearDashboard } from '../../view/dashboard/dashboardReducer';
|
|
44
45
|
import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -209,7 +210,7 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
|
|
|
209
210
|
import { clearAllVendors } from '../vendor/vendorReducer';
|
|
210
211
|
import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
|
|
211
212
|
import { clearAll } from './tenantReducer';
|
|
212
|
-
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
|
|
213
|
+
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearCreateTransferEntry> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
|
|
213
214
|
type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
214
215
|
export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
215
216
|
export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
|
|
@@ -43,6 +43,7 @@ const companyHealthMetricViewReducer_1 = require("../../view/companyHealthMetric
|
|
|
43
43
|
const companyMonthEndReportViewReducer_1 = require("../../view/companyMonthEndReportView/companyMonthEndReportViewReducer");
|
|
44
44
|
const companyTaskManagerViewReducer_1 = require("../../view/companyTaskManagerView/companyTaskManagerViewReducer");
|
|
45
45
|
const companyViewReducer_1 = require("../../view/companyView/companyViewReducer");
|
|
46
|
+
const createTransferEntryReducer_1 = require("../../view/createTransferEntry/createTransferEntryReducer");
|
|
46
47
|
const creditAgentViewReducer_1 = require("../../view/creditAgentView/creditAgentViewReducer");
|
|
47
48
|
const dashboardReducer_1 = require("../../view/dashboard/dashboardReducer");
|
|
48
49
|
const dashboardLayoutReducer_1 = require("../../view/dashboardLayout/dashboardLayoutReducer");
|
|
@@ -265,6 +266,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
265
266
|
(0, companyMonthEndReportViewReducer_1.clearCompanyMonthEndReportView)(),
|
|
266
267
|
(0, companyTaskManagerViewReducer_1.clearCompanyTaskManagerView)(),
|
|
267
268
|
(0, companyViewReducer_1.clearCompanyView)(),
|
|
269
|
+
(0, createTransferEntryReducer_1.clearCreateTransferEntry)(),
|
|
268
270
|
(0, creditAgentReducer_1.clearAllCreditAgent)(),
|
|
269
271
|
(0, creditAgentViewReducer_1.clearCreditAgentView)(),
|
|
270
272
|
(0, dashboardReducer_1.clearDashboard)(),
|
|
@@ -54,27 +54,26 @@ const toTransaction = (payload) => {
|
|
|
54
54
|
logo: (0, urlPayload_1.toURL)(payload.logo),
|
|
55
55
|
attachments: payload.attachments?.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload)),
|
|
56
56
|
qboId: payload.qbo_id,
|
|
57
|
-
...(payload.vendor_id
|
|
57
|
+
...(payload.vendor_id != null && payload.vendor_id !== ''
|
|
58
58
|
? { vendorId: payload.vendor_id }
|
|
59
59
|
: {}),
|
|
60
|
-
...(payload.vendor_name
|
|
60
|
+
...(payload.vendor_name != null && payload.vendor_name !== ''
|
|
61
61
|
? { vendorName: payload.vendor_name }
|
|
62
62
|
: {}),
|
|
63
|
-
...(payload.customer_id
|
|
63
|
+
...(payload.customer_id != null && payload.customer_id !== ''
|
|
64
64
|
? { customerId: payload.customer_id }
|
|
65
65
|
: {}),
|
|
66
|
-
...(payload.customer_name
|
|
66
|
+
...(payload.customer_name != null && payload.customer_name !== ''
|
|
67
67
|
? { customerName: payload.customer_name }
|
|
68
68
|
: {}),
|
|
69
|
-
...(payload.target_account_id
|
|
69
|
+
...(payload.target_account_id != null && payload.target_account_id !== ''
|
|
70
70
|
? { targetAccountId: payload.target_account_id }
|
|
71
71
|
: {}),
|
|
72
|
-
...(payload.target_account_integration_id
|
|
72
|
+
...(payload.target_account_integration_id != null &&
|
|
73
73
|
payload.target_account_integration_id !== ''
|
|
74
74
|
? { targetAccountIntegrationId: payload.target_account_integration_id }
|
|
75
75
|
: {}),
|
|
76
|
-
...(payload.target_account_name
|
|
77
|
-
payload.target_account_name !== ''
|
|
76
|
+
...(payload.target_account_name != null && payload.target_account_name !== ''
|
|
78
77
|
? { targetAccountName: payload.target_account_name }
|
|
79
78
|
: {}),
|
|
80
79
|
...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
|
|
@@ -84,8 +83,7 @@ const toTransaction = (payload) => {
|
|
|
84
83
|
payload.to_from_account_integration_id !== ''
|
|
85
84
|
? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
|
|
86
85
|
: {}),
|
|
87
|
-
...(payload.to_from_account_name != null &&
|
|
88
|
-
payload.to_from_account_name !== ''
|
|
86
|
+
...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
|
|
89
87
|
? { toFromAccountName: payload.to_from_account_name }
|
|
90
88
|
: {}),
|
|
91
89
|
...(payload.category_id != null && payload.category_id !== ''
|
|
@@ -112,6 +110,16 @@ const toTransaction = (payload) => {
|
|
|
112
110
|
...(payload.category_name != null && payload.category_name !== ''
|
|
113
111
|
? { categoryName: payload.category_name }
|
|
114
112
|
: {}),
|
|
113
|
+
...(payload.account_integration_id != null &&
|
|
114
|
+
payload.account_integration_id !== ''
|
|
115
|
+
? { accountIntegrationId: payload.account_integration_id }
|
|
116
|
+
: {}),
|
|
117
|
+
...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
|
|
118
|
+
? { qboAccountId: payload.qbo_account_id }
|
|
119
|
+
: {}),
|
|
120
|
+
...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
|
|
121
|
+
? { qboAccountName: payload.qbo_account_name }
|
|
122
|
+
: {}),
|
|
115
123
|
linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
|
|
116
124
|
lines,
|
|
117
125
|
account: payloadHasAccountInfo(payload)
|
|
@@ -130,16 +138,6 @@ const toTransaction = (payload) => {
|
|
|
130
138
|
recommendations: (0, exports.getRecommendationsPerLine)(payload.lines, payload.recommendations) ??
|
|
131
139
|
undefined,
|
|
132
140
|
isRecommendedTransaction: payload.is_recommended_transaction,
|
|
133
|
-
...(payload.account_integration_id != null &&
|
|
134
|
-
payload.account_integration_id !== ''
|
|
135
|
-
? { accountIntegrationId: payload.account_integration_id }
|
|
136
|
-
: {}),
|
|
137
|
-
...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
|
|
138
|
-
? { qboAccountId: payload.qbo_account_id }
|
|
139
|
-
: {}),
|
|
140
|
-
...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
|
|
141
|
-
? { qboAccountName: payload.qbo_account_name }
|
|
142
|
-
: {}),
|
|
143
141
|
};
|
|
144
142
|
};
|
|
145
143
|
exports.toTransaction = toTransaction;
|
package/lib/epic.d.ts
CHANGED
|
@@ -128,6 +128,8 @@ import { ActionType as FetchPortfolioActionType } from './view/companyView/epic/
|
|
|
128
128
|
import { ActionType as FetchSubscriptionActionType } from './view/companyView/epic/fetchSubscriptionViewEpic';
|
|
129
129
|
import { ActionType as FetchZeniUsersActionType } from './view/companyView/epic/fetchZeniUsersEpic';
|
|
130
130
|
import { ActionType as FetchParentSubsidiaryManagementActionType } from './view/companyView/parentSubsidiaryView/fetchParentSubsidiaryManagementViewEpic';
|
|
131
|
+
import { ActionType as CreateTransferEntryActionType } from './view/createTransferEntry/epics/createTransferEntryEpic';
|
|
132
|
+
import { ActionType as FetchTransferAccountsActionType } from './view/createTransferEntry/epics/fetchTransferAccountsEpic';
|
|
131
133
|
import { ActionType as FetchCardProfilesActionType } from './view/creditAgentView/epics/fetchCardProfilesEpic';
|
|
132
134
|
import { ActionType as FetchCreditAgentAccessActionType } from './view/creditAgentView/epics/fetchCreditAgentAccessEpic';
|
|
133
135
|
import { ActionType as FetchCreditAgentMacroActionType } from './view/creditAgentView/epics/fetchCreditAgentMacroEpic';
|
|
@@ -174,10 +176,8 @@ import { ActionType as SearchTransactionsForManualMatchActionType } from './view
|
|
|
174
176
|
import { ActionType as UploadMissingReceiptSuccessEpicActionType } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
|
|
175
177
|
import { ActionType as WatchBulkUploadBatchStatusActionType } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
|
|
176
178
|
import { ActionType as BackgroundRefetchReviewTabActionType } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
|
|
177
|
-
import { ActionType as CreateTransferEntryActionType } from './view/createTransferEntry/epics/createTransferEntryEpic';
|
|
178
179
|
import { ActionType as FetchExpenseAutomationTransactionCategorizationActionType } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic';
|
|
179
180
|
import { ActionType as FetchExpenseAutomationTransactionCategorizationViewActionType } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic';
|
|
180
|
-
import { ActionType as FetchTransferAccountsActionType } from './view/createTransferEntry/epics/fetchTransferAccountsEpic';
|
|
181
181
|
import { ActionType as FetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataActionType } from './view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic';
|
|
182
182
|
import { ActionType as FetchExpenseAutomationMarkTransactionAsNotMiscategorizedActionType } from './view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic';
|
|
183
183
|
import { ActionType as FetchExpenseAutomationSaveTransactionCategorizationActionType } from './view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic';
|
package/lib/epic.js
CHANGED
|
@@ -136,6 +136,8 @@ const fetchPortfolioViewEpic_1 = require("./view/companyView/epic/fetchPortfolio
|
|
|
136
136
|
const fetchSubscriptionViewEpic_1 = require("./view/companyView/epic/fetchSubscriptionViewEpic");
|
|
137
137
|
const fetchZeniUsersEpic_1 = require("./view/companyView/epic/fetchZeniUsersEpic");
|
|
138
138
|
const fetchParentSubsidiaryManagementViewEpic_1 = require("./view/companyView/parentSubsidiaryView/fetchParentSubsidiaryManagementViewEpic");
|
|
139
|
+
const createTransferEntryEpic_1 = require("./view/createTransferEntry/epics/createTransferEntryEpic");
|
|
140
|
+
const fetchTransferAccountsEpic_1 = require("./view/createTransferEntry/epics/fetchTransferAccountsEpic");
|
|
139
141
|
const fetchCardProfilesEpic_1 = require("./view/creditAgentView/epics/fetchCardProfilesEpic");
|
|
140
142
|
const fetchCreditAgentAccessEpic_1 = require("./view/creditAgentView/epics/fetchCreditAgentAccessEpic");
|
|
141
143
|
const fetchCreditAgentMacroEpic_1 = require("./view/creditAgentView/epics/fetchCreditAgentMacroEpic");
|
|
@@ -182,10 +184,8 @@ const searchTransactionsForManualMatchEpic_1 = require("./view/expenseAutomation
|
|
|
182
184
|
const uploadMissingReceiptSuccessEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic");
|
|
183
185
|
const watchBulkUploadBatchStatusEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic");
|
|
184
186
|
const backgroundRefetchReviewTabEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic");
|
|
185
|
-
const createTransferEntryEpic_1 = require("./view/createTransferEntry/epics/createTransferEntryEpic");
|
|
186
187
|
const fetchTransactionCategorizationEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic");
|
|
187
188
|
const fetchTransactionCategorizationViewEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic");
|
|
188
|
-
const fetchTransferAccountsEpic_1 = require("./view/createTransferEntry/epics/fetchTransferAccountsEpic");
|
|
189
189
|
const initializeTransactionCategorizationLocalDataEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic");
|
|
190
190
|
const markTransactionAsNotMiscategorizedEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic");
|
|
191
191
|
const saveTransactionCategorizationEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic");
|
|
@@ -179,7 +179,6 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
179
179
|
'treasury_update_portfolio_allocation',
|
|
180
180
|
'send_email_magic_link_to_user',
|
|
181
181
|
'complete_profile_done',
|
|
182
|
-
'convert_transaction_type',
|
|
183
182
|
'create_transfer_entry',
|
|
184
183
|
'reports_resync',
|
|
185
184
|
'invalid_phone_number',
|
|
@@ -40,6 +40,7 @@ import { clearCompanyHealthMetricView } from '../../view/companyHealthMetricView
|
|
|
40
40
|
import { clearCompanyMonthEndReportView } from '../../view/companyMonthEndReportView/companyMonthEndReportViewReducer';
|
|
41
41
|
import { clearCompanyTaskManagerView } from '../../view/companyTaskManagerView/companyTaskManagerViewReducer';
|
|
42
42
|
import { clearCompanyView } from '../../view/companyView/companyViewReducer';
|
|
43
|
+
import { clearCreateTransferEntry } from '../../view/createTransferEntry/createTransferEntryReducer';
|
|
43
44
|
import { clearCreditAgentView } from '../../view/creditAgentView/creditAgentViewReducer';
|
|
44
45
|
import { clearDashboard } from '../../view/dashboard/dashboardReducer';
|
|
45
46
|
import { clearDashboardLayout } from '../../view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -262,6 +263,7 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
|
|
|
262
263
|
clearCompanyMonthEndReportView(),
|
|
263
264
|
clearCompanyTaskManagerView(),
|
|
264
265
|
clearCompanyView(),
|
|
266
|
+
clearCreateTransferEntry(),
|
|
265
267
|
clearAllCreditAgent(),
|
|
266
268
|
clearCreditAgentView(),
|
|
267
269
|
clearDashboard(),
|
|
@@ -50,27 +50,26 @@ export const toTransaction = (payload) => {
|
|
|
50
50
|
logo: toURL(payload.logo),
|
|
51
51
|
attachments: payload.attachments?.map((attachmentPayload) => toAttachment(attachmentPayload)),
|
|
52
52
|
qboId: payload.qbo_id,
|
|
53
|
-
...(payload.vendor_id
|
|
53
|
+
...(payload.vendor_id != null && payload.vendor_id !== ''
|
|
54
54
|
? { vendorId: payload.vendor_id }
|
|
55
55
|
: {}),
|
|
56
|
-
...(payload.vendor_name
|
|
56
|
+
...(payload.vendor_name != null && payload.vendor_name !== ''
|
|
57
57
|
? { vendorName: payload.vendor_name }
|
|
58
58
|
: {}),
|
|
59
|
-
...(payload.customer_id
|
|
59
|
+
...(payload.customer_id != null && payload.customer_id !== ''
|
|
60
60
|
? { customerId: payload.customer_id }
|
|
61
61
|
: {}),
|
|
62
|
-
...(payload.customer_name
|
|
62
|
+
...(payload.customer_name != null && payload.customer_name !== ''
|
|
63
63
|
? { customerName: payload.customer_name }
|
|
64
64
|
: {}),
|
|
65
|
-
...(payload.target_account_id
|
|
65
|
+
...(payload.target_account_id != null && payload.target_account_id !== ''
|
|
66
66
|
? { targetAccountId: payload.target_account_id }
|
|
67
67
|
: {}),
|
|
68
|
-
...(payload.target_account_integration_id
|
|
68
|
+
...(payload.target_account_integration_id != null &&
|
|
69
69
|
payload.target_account_integration_id !== ''
|
|
70
70
|
? { targetAccountIntegrationId: payload.target_account_integration_id }
|
|
71
71
|
: {}),
|
|
72
|
-
...(payload.target_account_name
|
|
73
|
-
payload.target_account_name !== ''
|
|
72
|
+
...(payload.target_account_name != null && payload.target_account_name !== ''
|
|
74
73
|
? { targetAccountName: payload.target_account_name }
|
|
75
74
|
: {}),
|
|
76
75
|
...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
|
|
@@ -80,8 +79,7 @@ export const toTransaction = (payload) => {
|
|
|
80
79
|
payload.to_from_account_integration_id !== ''
|
|
81
80
|
? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
|
|
82
81
|
: {}),
|
|
83
|
-
...(payload.to_from_account_name != null &&
|
|
84
|
-
payload.to_from_account_name !== ''
|
|
82
|
+
...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
|
|
85
83
|
? { toFromAccountName: payload.to_from_account_name }
|
|
86
84
|
: {}),
|
|
87
85
|
...(payload.category_id != null && payload.category_id !== ''
|
|
@@ -108,6 +106,16 @@ export const toTransaction = (payload) => {
|
|
|
108
106
|
...(payload.category_name != null && payload.category_name !== ''
|
|
109
107
|
? { categoryName: payload.category_name }
|
|
110
108
|
: {}),
|
|
109
|
+
...(payload.account_integration_id != null &&
|
|
110
|
+
payload.account_integration_id !== ''
|
|
111
|
+
? { accountIntegrationId: payload.account_integration_id }
|
|
112
|
+
: {}),
|
|
113
|
+
...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
|
|
114
|
+
? { qboAccountId: payload.qbo_account_id }
|
|
115
|
+
: {}),
|
|
116
|
+
...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
|
|
117
|
+
? { qboAccountName: payload.qbo_account_name }
|
|
118
|
+
: {}),
|
|
111
119
|
linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
|
|
112
120
|
lines,
|
|
113
121
|
account: payloadHasAccountInfo(payload)
|
|
@@ -126,16 +134,6 @@ export const toTransaction = (payload) => {
|
|
|
126
134
|
recommendations: getRecommendationsPerLine(payload.lines, payload.recommendations) ??
|
|
127
135
|
undefined,
|
|
128
136
|
isRecommendedTransaction: payload.is_recommended_transaction,
|
|
129
|
-
...(payload.account_integration_id != null &&
|
|
130
|
-
payload.account_integration_id !== ''
|
|
131
|
-
? { accountIntegrationId: payload.account_integration_id }
|
|
132
|
-
: {}),
|
|
133
|
-
...(payload.qbo_account_id != null && payload.qbo_account_id !== ''
|
|
134
|
-
? { qboAccountId: payload.qbo_account_id }
|
|
135
|
-
: {}),
|
|
136
|
-
...(payload.qbo_account_name != null && payload.qbo_account_name !== ''
|
|
137
|
-
? { qboAccountName: payload.qbo_account_name }
|
|
138
|
-
: {}),
|
|
139
137
|
};
|
|
140
138
|
};
|
|
141
139
|
const payloadHasAccountInfo = (payload) => 'account_name' in payload &&
|
package/lib/esm/epic.js
CHANGED
|
@@ -134,6 +134,8 @@ import { fetchPortfolioViewEpic, } from './view/companyView/epic/fetchPortfolioV
|
|
|
134
134
|
import { fetchSubscriptionViewEpic, } from './view/companyView/epic/fetchSubscriptionViewEpic';
|
|
135
135
|
import { fetchZeniUsersEpic, } from './view/companyView/epic/fetchZeniUsersEpic';
|
|
136
136
|
import { fetchParentSubsidiaryManagementViewEpic, } from './view/companyView/parentSubsidiaryView/fetchParentSubsidiaryManagementViewEpic';
|
|
137
|
+
import { createTransferEntryEpic, } from './view/createTransferEntry/epics/createTransferEntryEpic';
|
|
138
|
+
import { fetchTransferAccountsEpic, } from './view/createTransferEntry/epics/fetchTransferAccountsEpic';
|
|
137
139
|
import { fetchCardProfilesEpic, } from './view/creditAgentView/epics/fetchCardProfilesEpic';
|
|
138
140
|
import { fetchCreditAgentAccessEpic, } from './view/creditAgentView/epics/fetchCreditAgentAccessEpic';
|
|
139
141
|
import { fetchCreditAgentMacroEpic, } from './view/creditAgentView/epics/fetchCreditAgentMacroEpic';
|
|
@@ -180,10 +182,8 @@ import { searchTransactionsForManualMatchEpic, } from './view/expenseAutomationV
|
|
|
180
182
|
import { uploadMissingReceiptSuccessEpic, } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
|
|
181
183
|
import { bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
|
|
182
184
|
import { backgroundRefetchReviewTabEpic, } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
|
|
183
|
-
import { createTransferEntryEpic, } from './view/createTransferEntry/epics/createTransferEntryEpic';
|
|
184
185
|
import { fetchTransactionCategorizationEpic as fetchExpenseAutomationTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic';
|
|
185
186
|
import { fetchTransactionCategorizationViewEpic as fetchExpenseAutomationTransactionCategorizationViewEpic, } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic';
|
|
186
|
-
import { fetchTransferAccountsEpic, } from './view/createTransferEntry/epics/fetchTransferAccountsEpic';
|
|
187
187
|
import { initializeTransactionCategorizationViewLocalDataEpic as fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, } from './view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic';
|
|
188
188
|
import { markTransactionAsNotMiscategorizedEpic as fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, } from './view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic';
|
|
189
189
|
import { saveTransactionCategorizationEpic as fetchExpenseAutomationSaveTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic';
|
package/lib/esm/index.js
CHANGED
|
@@ -155,6 +155,7 @@ import { getAllCockpitTabsFilterView, } from './view/companyView/selector/getAll
|
|
|
155
155
|
import { ALL_COCKPIT_TABS_FILE_TYPES, ALL_COCKPIT_TABS_IDS, toCockpitTabsFileTypeStrict, toCockpitTabsIDStrict, } from './view/companyView/types/cockpitTabsID';
|
|
156
156
|
import { toHealthSortKeyType, toManagementSortKeyType, toOnboardingSortKeyType, toPortfolioSortKeyType, toTaskManagerSortKeyType, } from './view/companyView/types/cockpitTypes';
|
|
157
157
|
import { toCompanyPassportLocalData, } from './view/companyView/types/companyPassport/companyPassportLocalData';
|
|
158
|
+
import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus, } from './view/createTransferEntry/createTransferEntryReducer';
|
|
158
159
|
import { fetchDashboard, updateTreasuryVideoClosed, } from './view/dashboard/dashboardReducer';
|
|
159
160
|
import { getDashboard, } from './view/dashboard/dashboardSelector';
|
|
160
161
|
import { updateDashboardLayout } from './view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -168,7 +169,6 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
|
|
|
168
169
|
import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
169
170
|
import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
170
171
|
import { deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
|
|
171
|
-
import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus, } from './view/createTransferEntry/createTransferEntryReducer';
|
|
172
172
|
import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, removeTransactionFromAllTabs, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
173
173
|
import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
|
|
174
174
|
import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
|
package/lib/esm/reducer.js
CHANGED
|
@@ -98,6 +98,7 @@ import companyHealthMetricView, { initialState as initialCompanyHealthMetricView
|
|
|
98
98
|
import companyMonthEndReportView, { initialState as initialCompanyMonthEndReportViewState, } from './view/companyMonthEndReportView/companyMonthEndReportViewReducer';
|
|
99
99
|
import companyTaskManagerView, { initialState as initialCompanyTaskManagerViewState, } from './view/companyTaskManagerView/companyTaskManagerViewReducer';
|
|
100
100
|
import companyView, { initialState as initialCompanyViewState, } from './view/companyView/companyViewReducer';
|
|
101
|
+
import createTransferEntry, { initialState as initialCreateTransferEntryState, } from './view/createTransferEntry/createTransferEntryReducer';
|
|
101
102
|
import creditAgentView, { initialState as initialCreditAgentViewState, } from './view/creditAgentView/creditAgentViewReducer';
|
|
102
103
|
import dashboard, { initialState as initialDashboardState, } from './view/dashboard/dashboardReducer';
|
|
103
104
|
import dashboardLayout, { initialState as initialDashboardLayoutState, } from './view/dashboardLayout/dashboardLayoutReducer';
|
|
@@ -107,7 +108,6 @@ import expenseAutomationJESchedulesView, { initialState as initialExpenseAutomat
|
|
|
107
108
|
import expenseAutomationMissingReceiptsView, { initialState as initialExpenseAutomationMissingReceiptsViewState, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
108
109
|
import expenseAutomationReconciliationView, { initialState as initialExpenseAutomationReconciliationViewState, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
|
|
109
110
|
import expenseAutomationTransactionsView, { initialState as initialExpenseAutomationTransactionsViewState, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
110
|
-
import createTransferEntry, { initialState as initialCreateTransferEntryState, } from './view/createTransferEntry/createTransferEntryReducer';
|
|
111
111
|
import featureNotificationView, { initialState as initialFeatureNotificationViewState, } from './view/featureNotificationView/featureNotificationViewReducer';
|
|
112
112
|
import fileView from './view/fileView/fileViewReducer';
|
|
113
113
|
import { initialFileViewState, } from './view/fileView/fileViewState';
|
|
@@ -21,8 +21,16 @@ const createTransferEntrySlice = createSlice({
|
|
|
21
21
|
prepare(payload) {
|
|
22
22
|
return { payload };
|
|
23
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
|
|
26
|
+
* fresh dispatch so a second `createTransferEntry` never inherits the
|
|
27
|
+
* previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
|
|
28
|
+
* never fired). Mirrors the host hook's `consumedReplacementRef` guard
|
|
29
|
+
* (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
|
|
30
|
+
*/
|
|
24
31
|
reducer(draft) {
|
|
25
32
|
draft.createTransferEntryStatus = 'In-Progress';
|
|
33
|
+
draft.lastTransferEntryReplacement = undefined;
|
|
26
34
|
},
|
|
27
35
|
},
|
|
28
36
|
createTransferEntrySuccess(draft) {
|
|
@@ -50,7 +58,15 @@ const createTransferEntrySlice = createSlice({
|
|
|
50
58
|
clearTransferEntryRouteReplacement(draft) {
|
|
51
59
|
draft.lastTransferEntryReplacement = undefined;
|
|
52
60
|
},
|
|
61
|
+
/**
|
|
62
|
+
* Full slice reset. Dispatched from `clearAllEpic` on tenant switch so
|
|
63
|
+
* stale per-tenant state (account-id pools, status, replacement signal)
|
|
64
|
+
* doesn't bleed across tenants.
|
|
65
|
+
*/
|
|
66
|
+
clearCreateTransferEntry(draft) {
|
|
67
|
+
Object.assign(draft, initialState);
|
|
68
|
+
},
|
|
53
69
|
},
|
|
54
70
|
});
|
|
55
|
-
export const { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, createTransferEntry, createTransferEntrySuccess, createTransferEntryFailure, resetCreateTransferEntryStatus, createTransferEntryReplacedTransaction, clearTransferEntryRouteReplacement, } = createTransferEntrySlice.actions;
|
|
71
|
+
export const { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, createTransferEntry, createTransferEntrySuccess, createTransferEntryFailure, resetCreateTransferEntryStatus, createTransferEntryReplacedTransaction, clearTransferEntryRouteReplacement, clearCreateTransferEntry, } = createTransferEntrySlice.actions;
|
|
56
72
|
export default createTransferEntrySlice.reducer;
|
|
@@ -11,13 +11,14 @@ export function getLastTransferEntryReplacement(state) {
|
|
|
11
11
|
* Shared resolver for the credit/debit dropdowns in the transfer drawer.
|
|
12
12
|
*
|
|
13
13
|
* Resolution policy (intentional):
|
|
14
|
-
* 1. Prefer the dedicated API fetch results (`
|
|
15
|
-
* pool, `
|
|
14
|
+
* 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
|
|
15
|
+
* debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
|
|
16
|
+
* pool).
|
|
16
17
|
* 2. If the dedicated fetch returns an empty list while the COA is loaded,
|
|
17
|
-
* fall back to the COA: the full account list for `
|
|
18
|
-
* COA accounts filtered to `credit_card` for `
|
|
19
|
-
* the dropdown populated for older tenants where the dedicated
|
|
20
|
-
* haven't been backfilled yet.
|
|
18
|
+
* fall back to the COA: the full account list for `transferEntryEligible`,
|
|
19
|
+
* and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
|
|
20
|
+
* This keeps the dropdown populated for older tenants where the dedicated
|
|
21
|
+
* endpoints haven't been backfilled yet.
|
|
21
22
|
*
|
|
22
23
|
* Intent — what this selector deliberately does NOT do:
|
|
23
24
|
* - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
|
|
@@ -39,10 +40,10 @@ export function getLastTransferEntryReplacement(state) {
|
|
|
39
40
|
export const getResolvedTransferAccounts = createSelector([
|
|
40
41
|
(state) => state.accountState,
|
|
41
42
|
(state) => state.accountListState,
|
|
42
|
-
(state) => state.createTransferEntryState.transferAccountsByType
|
|
43
|
-
.accountIds,
|
|
44
|
-
(state) => state.createTransferEntryState.transferAccountsByType
|
|
45
|
-
.accountIds,
|
|
43
|
+
(state) => state.createTransferEntryState.transferAccountsByType
|
|
44
|
+
.transferEntryEligible.accountIds,
|
|
45
|
+
(state) => state.createTransferEntryState.transferAccountsByType
|
|
46
|
+
.creditCardOnlyEligible.accountIds,
|
|
46
47
|
], (accountState, accountListState, transferEligibleIds, creditCardOnlyIds) => {
|
|
47
48
|
const accountList = getAccountList(accountState, accountListState, 'accountList');
|
|
48
49
|
const transferEligibleFromApi = transferEligibleIds
|
|
@@ -58,6 +59,6 @@ export const getResolvedTransferAccounts = createSelector([
|
|
|
58
59
|
.map((id) => getAccountBaseForCreditCardTransferAccounts(accountState, id))
|
|
59
60
|
.filter((account) => account != null);
|
|
60
61
|
const coaFallbackCreditCards = coaFallbackAllAccounts.filter((a) => a.accountType === 'credit_card');
|
|
61
|
-
const
|
|
62
|
-
return {
|
|
62
|
+
const creditCardTransferAccountsList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
|
|
63
|
+
return { creditCardTransferAccountsList, transferAccountsList };
|
|
63
64
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
|
|
2
2
|
export const TRANSFER_ACCOUNTS_FETCH_TYPE = [
|
|
3
|
-
'
|
|
4
|
-
'
|
|
3
|
+
'transferEntryEligible',
|
|
4
|
+
'creditCardOnlyEligible',
|
|
5
5
|
];
|
|
6
6
|
const initialTransferAccountsState = {
|
|
7
7
|
accountIds: [],
|
|
@@ -11,7 +11,7 @@ export const initialCreateTransferEntryState = {
|
|
|
11
11
|
createTransferEntryStatus: 'Not-Started',
|
|
12
12
|
lastTransferEntryReplacement: undefined,
|
|
13
13
|
transferAccountsByType: {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
transferEntryEligible: initialTransferAccountsState,
|
|
15
|
+
creditCardOnlyEligible: initialTransferAccountsState,
|
|
16
16
|
},
|
|
17
17
|
};
|
|
@@ -25,6 +25,20 @@ const failureSnackbar = () => openSnackbar({
|
|
|
25
25
|
function buildFailureActions() {
|
|
26
26
|
return [createTransferEntryFailure(), failureSnackbar()];
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Defensive guard: a BE response that returns 200 with `transaction != null`
|
|
30
|
+
* but where the body lacks a usable id/type is unsafe to seed into the store —
|
|
31
|
+
* downstream code would store under a garbage key and the host hook would try
|
|
32
|
+
* to navigate to a broken url. Treat that case as failure so the source row
|
|
33
|
+
* stays visible and the user can retry.
|
|
34
|
+
*/
|
|
35
|
+
function isWellFormedTransactionPayload(t) {
|
|
36
|
+
return (t != null &&
|
|
37
|
+
typeof t.transaction_id === 'string' &&
|
|
38
|
+
t.transaction_id !== '' &&
|
|
39
|
+
typeof t.transaction_type === 'string' &&
|
|
40
|
+
t.transaction_type !== '');
|
|
41
|
+
}
|
|
28
42
|
function buildSuccessSideEffects(sourceTransactionId) {
|
|
29
43
|
return [
|
|
30
44
|
createTransferEntrySuccess(),
|
|
@@ -104,8 +118,12 @@ export const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.
|
|
|
104
118
|
if (!isSuccessResponse(response)) {
|
|
105
119
|
return from(buildFailureActions());
|
|
106
120
|
}
|
|
107
|
-
|
|
108
|
-
|
|
121
|
+
const transaction = response.data?.transaction;
|
|
122
|
+
if (transaction != null) {
|
|
123
|
+
if (!isWellFormedTransactionPayload(transaction)) {
|
|
124
|
+
return from(buildFailureActions());
|
|
125
|
+
}
|
|
126
|
+
return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
|
|
109
127
|
}
|
|
110
128
|
return handleSuccessWithoutTransactionBody(transactionId);
|
|
111
129
|
}), catchError(() => from(buildFailureActions())));
|
|
@@ -4,18 +4,18 @@ import { updateAccounts } from '../../../entity/account/accountReducer';
|
|
|
4
4
|
import { isSuccessResponse } from '../../../responsePayload';
|
|
5
5
|
import { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure, } from '../createTransferEntryReducer';
|
|
6
6
|
const REPORT_ID_BY_TYPE = {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
transferEntryEligible: 'transfer_accounts',
|
|
8
|
+
creditCardOnlyEligible: 'credit_card_transfer_accounts',
|
|
9
9
|
};
|
|
10
10
|
const QUERY_BY_TYPE = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
transferEntryEligible: { is_only_include_transfer_accounts: true },
|
|
12
|
+
creditCardOnlyEligible: { is_include_only_credit_card_accounts: true },
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
|
-
* Pools fetched concurrently: `groupBy(kind)` keeps `
|
|
16
|
-
* `
|
|
17
|
-
* does not cancel the first. Within a single type, a fresh dispatch
|
|
18
|
-
* any in-flight request (per-group `switchMap`).
|
|
15
|
+
* Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
|
|
16
|
+
* and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
|
|
17
|
+
* of both does not cancel the first. Within a single type, a fresh dispatch
|
|
18
|
+
* supersedes any in-flight request (per-group `switchMap`).
|
|
19
19
|
*/
|
|
20
20
|
export const fetchTransferAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchAccountsForTransferFlow.match), groupBy((action) => action.payload.kind), mergeMap((group$) => group$.pipe(switchMap((action) => {
|
|
21
21
|
const { kind } = action.payload;
|