@zeniai/client-epic-state 5.0.69-betaML12 → 5.0.69-betaML2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  3. package/lib/entity/transaction/payloadTypes/transactionPayload.js +20 -18
  4. package/lib/epic.d.ts +2 -2
  5. package/lib/epic.js +2 -2
  6. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  7. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +20 -18
  8. package/lib/esm/epic.js +2 -2
  9. package/lib/esm/index.js +1 -1
  10. package/lib/esm/reducer.js +1 -1
  11. package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +0 -8
  12. package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +12 -13
  13. package/lib/esm/view/createTransferEntry/createTransferEntryState.js +4 -4
  14. package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +2 -20
  15. package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
  16. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
  17. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
  18. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
  19. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +4 -4
  20. package/lib/index.d.ts +1 -1
  21. package/lib/index.js +8 -8
  22. package/lib/reducer.d.ts +1 -1
  23. package/lib/reducer.js +1 -1
  24. package/lib/view/createTransferEntry/createTransferEntryReducer.js +0 -8
  25. package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +7 -8
  26. package/lib/view/createTransferEntry/createTransferEntrySelector.js +12 -13
  27. package/lib/view/createTransferEntry/createTransferEntryState.d.ts +1 -1
  28. package/lib/view/createTransferEntry/createTransferEntryState.js +4 -4
  29. package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +2 -20
  30. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +4 -4
  31. package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +8 -8
  32. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -5
  33. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  34. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -1
  35. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -2
  36. package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -1
  37. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +8 -8
  38. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -1
  39. package/lib/view/transactionDetail/transactionDetailSelector.js +3 -3
  40. 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" | "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";
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" | "convert_transaction_type" | "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,6 +182,7 @@ 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',
185
186
  'create_transfer_entry',
186
187
  'reports_resync',
187
188
  'invalid_phone_number',
@@ -54,26 +54,27 @@ 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 != null && payload.vendor_id !== ''
57
+ ...(payload.vendor_id !== null && payload.vendor_id !== ''
58
58
  ? { vendorId: payload.vendor_id }
59
59
  : {}),
60
- ...(payload.vendor_name != null && payload.vendor_name !== ''
60
+ ...(payload.vendor_name !== null && payload.vendor_name !== ''
61
61
  ? { vendorName: payload.vendor_name }
62
62
  : {}),
63
- ...(payload.customer_id != null && payload.customer_id !== ''
63
+ ...(payload.customer_id !== null && payload.customer_id !== ''
64
64
  ? { customerId: payload.customer_id }
65
65
  : {}),
66
- ...(payload.customer_name != null && payload.customer_name !== ''
66
+ ...(payload.customer_name !== null && payload.customer_name !== ''
67
67
  ? { customerName: payload.customer_name }
68
68
  : {}),
69
- ...(payload.target_account_id != null && 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 != null &&
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 != null && payload.target_account_name !== ''
76
+ ...(payload.target_account_name !== null &&
77
+ payload.target_account_name !== ''
77
78
  ? { targetAccountName: payload.target_account_name }
78
79
  : {}),
79
80
  ...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
@@ -83,7 +84,8 @@ const toTransaction = (payload) => {
83
84
  payload.to_from_account_integration_id !== ''
84
85
  ? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
85
86
  : {}),
86
- ...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
87
+ ...(payload.to_from_account_name != null &&
88
+ payload.to_from_account_name !== ''
87
89
  ? { toFromAccountName: payload.to_from_account_name }
88
90
  : {}),
89
91
  ...(payload.category_id != null && payload.category_id !== ''
@@ -110,16 +112,6 @@ const toTransaction = (payload) => {
110
112
  ...(payload.category_name != null && payload.category_name !== ''
111
113
  ? { categoryName: payload.category_name }
112
114
  : {}),
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
- : {}),
123
115
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
124
116
  lines,
125
117
  account: payloadHasAccountInfo(payload)
@@ -138,6 +130,16 @@ const toTransaction = (payload) => {
138
130
  recommendations: (0, exports.getRecommendationsPerLine)(payload.lines, payload.recommendations) ??
139
131
  undefined,
140
132
  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
+ : {}),
141
143
  };
142
144
  };
143
145
  exports.toTransaction = toTransaction;
package/lib/epic.d.ts CHANGED
@@ -128,8 +128,6 @@ 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';
133
131
  import { ActionType as FetchCardProfilesActionType } from './view/creditAgentView/epics/fetchCardProfilesEpic';
134
132
  import { ActionType as FetchCreditAgentAccessActionType } from './view/creditAgentView/epics/fetchCreditAgentAccessEpic';
135
133
  import { ActionType as FetchCreditAgentMacroActionType } from './view/creditAgentView/epics/fetchCreditAgentMacroEpic';
@@ -176,8 +174,10 @@ import { ActionType as SearchTransactionsForManualMatchActionType } from './view
176
174
  import { ActionType as UploadMissingReceiptSuccessEpicActionType } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
177
175
  import { ActionType as WatchBulkUploadBatchStatusActionType } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
178
176
  import { ActionType as BackgroundRefetchReviewTabActionType } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
177
+ import { ActionType as CreateTransferEntryActionType } from './view/createTransferEntry/epics/createTransferEntryEpic';
179
178
  import { ActionType as FetchExpenseAutomationTransactionCategorizationActionType } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic';
180
179
  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,8 +136,6 @@ 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");
141
139
  const fetchCardProfilesEpic_1 = require("./view/creditAgentView/epics/fetchCardProfilesEpic");
142
140
  const fetchCreditAgentAccessEpic_1 = require("./view/creditAgentView/epics/fetchCreditAgentAccessEpic");
143
141
  const fetchCreditAgentMacroEpic_1 = require("./view/creditAgentView/epics/fetchCreditAgentMacroEpic");
@@ -184,8 +182,10 @@ const searchTransactionsForManualMatchEpic_1 = require("./view/expenseAutomation
184
182
  const uploadMissingReceiptSuccessEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic");
185
183
  const watchBulkUploadBatchStatusEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic");
186
184
  const backgroundRefetchReviewTabEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic");
185
+ const createTransferEntryEpic_1 = require("./view/createTransferEntry/epics/createTransferEntryEpic");
187
186
  const fetchTransactionCategorizationEpic_1 = require("./view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic");
188
187
  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,6 +179,7 @@ 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',
182
183
  'create_transfer_entry',
183
184
  'reports_resync',
184
185
  'invalid_phone_number',
@@ -50,26 +50,27 @@ 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 != null && payload.vendor_id !== ''
53
+ ...(payload.vendor_id !== null && payload.vendor_id !== ''
54
54
  ? { vendorId: payload.vendor_id }
55
55
  : {}),
56
- ...(payload.vendor_name != null && payload.vendor_name !== ''
56
+ ...(payload.vendor_name !== null && payload.vendor_name !== ''
57
57
  ? { vendorName: payload.vendor_name }
58
58
  : {}),
59
- ...(payload.customer_id != null && payload.customer_id !== ''
59
+ ...(payload.customer_id !== null && payload.customer_id !== ''
60
60
  ? { customerId: payload.customer_id }
61
61
  : {}),
62
- ...(payload.customer_name != null && payload.customer_name !== ''
62
+ ...(payload.customer_name !== null && payload.customer_name !== ''
63
63
  ? { customerName: payload.customer_name }
64
64
  : {}),
65
- ...(payload.target_account_id != null && 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 != null &&
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 != null && payload.target_account_name !== ''
72
+ ...(payload.target_account_name !== null &&
73
+ payload.target_account_name !== ''
73
74
  ? { targetAccountName: payload.target_account_name }
74
75
  : {}),
75
76
  ...(payload.to_from_account_id != null && payload.to_from_account_id !== ''
@@ -79,7 +80,8 @@ export const toTransaction = (payload) => {
79
80
  payload.to_from_account_integration_id !== ''
80
81
  ? { toFromAccountIntegrationId: payload.to_from_account_integration_id }
81
82
  : {}),
82
- ...(payload.to_from_account_name != null && payload.to_from_account_name !== ''
83
+ ...(payload.to_from_account_name != null &&
84
+ payload.to_from_account_name !== ''
83
85
  ? { toFromAccountName: payload.to_from_account_name }
84
86
  : {}),
85
87
  ...(payload.category_id != null && payload.category_id !== ''
@@ -106,16 +108,6 @@ export const toTransaction = (payload) => {
106
108
  ...(payload.category_name != null && payload.category_name !== ''
107
109
  ? { categoryName: payload.category_name }
108
110
  : {}),
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
- : {}),
119
111
  linkedTransactions: payload.linked_transactions?.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
120
112
  lines,
121
113
  account: payloadHasAccountInfo(payload)
@@ -134,6 +126,16 @@ export const toTransaction = (payload) => {
134
126
  recommendations: getRecommendationsPerLine(payload.lines, payload.recommendations) ??
135
127
  undefined,
136
128
  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
+ : {}),
137
139
  };
138
140
  };
139
141
  const payloadHasAccountInfo = (payload) => 'account_name' in payload &&
package/lib/esm/epic.js CHANGED
@@ -134,8 +134,6 @@ 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';
139
137
  import { fetchCardProfilesEpic, } from './view/creditAgentView/epics/fetchCardProfilesEpic';
140
138
  import { fetchCreditAgentAccessEpic, } from './view/creditAgentView/epics/fetchCreditAgentAccessEpic';
141
139
  import { fetchCreditAgentMacroEpic, } from './view/creditAgentView/epics/fetchCreditAgentMacroEpic';
@@ -182,8 +180,10 @@ import { searchTransactionsForManualMatchEpic, } from './view/expenseAutomationV
182
180
  import { uploadMissingReceiptSuccessEpic, } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
183
181
  import { bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
184
182
  import { backgroundRefetchReviewTabEpic, } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
183
+ import { createTransferEntryEpic, } from './view/createTransferEntry/epics/createTransferEntryEpic';
185
184
  import { fetchTransactionCategorizationEpic as fetchExpenseAutomationTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic';
186
185
  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,7 +155,6 @@ 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';
159
158
  import { fetchDashboard, updateTreasuryVideoClosed, } from './view/dashboard/dashboardReducer';
160
159
  import { getDashboard, } from './view/dashboard/dashboardSelector';
161
160
  import { updateDashboardLayout } from './view/dashboardLayout/dashboardLayoutReducer';
@@ -169,6 +168,7 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
169
168
  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';
170
169
  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';
171
170
  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';
@@ -98,7 +98,6 @@ 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';
102
101
  import creditAgentView, { initialState as initialCreditAgentViewState, } from './view/creditAgentView/creditAgentViewReducer';
103
102
  import dashboard, { initialState as initialDashboardState, } from './view/dashboard/dashboardReducer';
104
103
  import dashboardLayout, { initialState as initialDashboardLayoutState, } from './view/dashboardLayout/dashboardLayoutReducer';
@@ -108,6 +107,7 @@ import expenseAutomationJESchedulesView, { initialState as initialExpenseAutomat
108
107
  import expenseAutomationMissingReceiptsView, { initialState as initialExpenseAutomationMissingReceiptsViewState, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
109
108
  import expenseAutomationReconciliationView, { initialState as initialExpenseAutomationReconciliationViewState, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
110
109
  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,16 +21,8 @@ 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
- */
31
24
  reducer(draft) {
32
25
  draft.createTransferEntryStatus = 'In-Progress';
33
- draft.lastTransferEntryReplacement = undefined;
34
26
  },
35
27
  },
36
28
  createTransferEntrySuccess(draft) {
@@ -11,14 +11,13 @@ 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 (`transferEntryEligible` for the
15
- * debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
16
- * pool).
14
+ * 1. Prefer the dedicated API fetch results (`transfer_eligible` for the debit
15
+ * pool, `credit_card_only` for the credit-card-payment credit pool).
17
16
  * 2. If the dedicated fetch returns an empty list while the COA is loaded,
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.
17
+ * fall back to the COA: the full account list for `transfer_eligible`, and
18
+ * COA accounts filtered to `credit_card` for `credit_card_only`. This keeps
19
+ * the dropdown populated for older tenants where the dedicated endpoints
20
+ * haven't been backfilled yet.
22
21
  *
23
22
  * Intent — what this selector deliberately does NOT do:
24
23
  * - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
@@ -40,10 +39,10 @@ export function getLastTransferEntryReplacement(state) {
40
39
  export const getResolvedTransferAccounts = createSelector([
41
40
  (state) => state.accountState,
42
41
  (state) => state.accountListState,
43
- (state) => state.createTransferEntryState.transferAccountsByType
44
- .transferEntryEligible.accountIds,
45
- (state) => state.createTransferEntryState.transferAccountsByType
46
- .creditCardOnlyEligible.accountIds,
42
+ (state) => state.createTransferEntryState.transferAccountsByType.transfer_eligible
43
+ .accountIds,
44
+ (state) => state.createTransferEntryState.transferAccountsByType.credit_card_only
45
+ .accountIds,
47
46
  ], (accountState, accountListState, transferEligibleIds, creditCardOnlyIds) => {
48
47
  const accountList = getAccountList(accountState, accountListState, 'accountList');
49
48
  const transferEligibleFromApi = transferEligibleIds
@@ -59,6 +58,6 @@ export const getResolvedTransferAccounts = createSelector([
59
58
  .map((id) => getAccountBaseForCreditCardTransferAccounts(accountState, id))
60
59
  .filter((account) => account != null);
61
60
  const coaFallbackCreditCards = coaFallbackAllAccounts.filter((a) => a.accountType === 'credit_card');
62
- const creditCardTransferAccountsList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
63
- return { creditCardTransferAccountsList, transferAccountsList };
61
+ const creditCardAccountsForTransferList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
62
+ return { creditCardAccountsForTransferList, transferAccountsList };
64
63
  });
@@ -1,7 +1,7 @@
1
1
  /** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
2
2
  export const TRANSFER_ACCOUNTS_FETCH_TYPE = [
3
- 'transferEntryEligible',
4
- 'creditCardOnlyEligible',
3
+ 'transfer_eligible',
4
+ 'credit_card_only',
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
- transferEntryEligible: initialTransferAccountsState,
15
- creditCardOnlyEligible: initialTransferAccountsState,
14
+ transfer_eligible: initialTransferAccountsState,
15
+ credit_card_only: initialTransferAccountsState,
16
16
  },
17
17
  };
@@ -25,20 +25,6 @@ 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
- }
42
28
  function buildSuccessSideEffects(sourceTransactionId) {
43
29
  return [
44
30
  createTransferEntrySuccess(),
@@ -118,12 +104,8 @@ export const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.
118
104
  if (!isSuccessResponse(response)) {
119
105
  return from(buildFailureActions());
120
106
  }
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);
107
+ if (response.data?.transaction != null) {
108
+ return handleSuccessWithTransactionBody(response.data.transaction, response.data.vendors, previousTransactionId, transactionId);
127
109
  }
128
110
  return handleSuccessWithoutTransactionBody(transactionId);
129
111
  }), 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
- transferEntryEligible: 'transfer_accounts',
8
- creditCardOnlyEligible: 'credit_card_transfer_accounts',
7
+ transfer_eligible: 'transfer_accounts',
8
+ credit_card_only: 'credit_card_transfer_accounts',
9
9
  };
10
10
  const QUERY_BY_TYPE = {
11
- transferEntryEligible: { is_only_include_transfer_accounts: true },
12
- creditCardOnlyEligible: { is_include_only_credit_card_accounts: true },
11
+ transfer_eligible: { is_only_include_transfer_accounts: true },
12
+ credit_card_only: { is_include_only_credit_card_accounts: true },
13
13
  };
14
14
  /**
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`).
15
+ * Pools fetched concurrently: `groupBy(kind)` keeps `transfer_eligible` and
16
+ * `credit_card_only` in their own streams so a back-to-back dispatch of both
17
+ * does not cancel the first. Within a single type, a fresh dispatch supersedes
18
+ * 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;
@@ -24,12 +24,12 @@ export const fetchTransactionCategorizationViewEpic = (actions$, state$) => acti
24
24
  accountList.fetchState === 'Not-Started') {
25
25
  updateActions.push(fetchAccountList('accountList', true));
26
26
  }
27
- const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
28
- if (transferEntryEligible.fetchState === 'Not-Started') {
29
- updateActions.push(fetchAccountsForTransferFlow({ kind: 'transferEntryEligible' }));
27
+ const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
28
+ if (transfer_eligible.fetchState === 'Not-Started') {
29
+ updateActions.push(fetchAccountsForTransferFlow({ kind: 'transfer_eligible' }));
30
30
  }
31
- if (creditCardOnlyEligible.fetchState === 'Not-Started') {
32
- updateActions.push(fetchAccountsForTransferFlow({ kind: 'creditCardOnlyEligible' }));
31
+ if (credit_card_only.fetchState === 'Not-Started') {
32
+ updateActions.push(fetchAccountsForTransferFlow({ kind: 'credit_card_only' }));
33
33
  }
34
34
  const classList = state$.value.classListState;
35
35
  if (classList.hasValidState() === false &&
@@ -107,7 +107,7 @@ export function getExpenseAutomationTransactionView(state) {
107
107
  : [];
108
108
  const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
109
109
  const completionStatus = transactionCompletionStatus ?? 'incomplete';
110
- const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
110
+ const { transferAccountsList, creditCardAccountsForTransferList } = getResolvedTransferAccounts(state);
111
111
  return {
112
112
  version: 0,
113
113
  fetchState: fetchStatus.fetchState,
@@ -136,7 +136,7 @@ export function getExpenseAutomationTransactionView(state) {
136
136
  uploadReceiptStatusById,
137
137
  selectedTransactionId,
138
138
  selectedTransactionLineId,
139
- creditCardTransferAccountsList,
139
+ creditCardAccountsForTransferList,
140
140
  transferAccounts: transferAccountsList,
141
141
  selectedTransactionCategorizationCompletedSubTab,
142
142
  };
@@ -11,9 +11,9 @@ import { updateVendors } from '../../../entity/vendor/vendorReducer';
11
11
  import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
12
12
  import { fetchAccountList } from '../../accountList/accountListReducer';
13
13
  import { fetchClassList } from '../../classList/classListReducer';
14
+ import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
14
15
  import { getInitializedTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper';
15
16
  import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
16
- import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
17
17
  import { fetchOwnerList } from '../../ownerList/ownerListReducer';
18
18
  import { fetchProjectList } from '../../projectList/projectListReducer';
19
19
  import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState, } from '../transactionDetailReducer';
@@ -37,14 +37,14 @@ export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions
37
37
  transactionActions.push(fetchAccountList('accountList'));
38
38
  }
39
39
  if (isCreateTransferEntryFromExpenseEnabled === true) {
40
- const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
41
- if (transferEntryEligible.fetchState !== 'In-Progress' &&
42
- transferEntryEligible.fetchState !== 'Completed') {
43
- transactionActions.push(fetchAccountsForTransferFlow({ kind: 'transferEntryEligible' }));
40
+ const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
41
+ if (transfer_eligible.fetchState !== 'In-Progress' &&
42
+ transfer_eligible.fetchState !== 'Completed') {
43
+ transactionActions.push(fetchAccountsForTransferFlow({ kind: 'transfer_eligible' }));
44
44
  }
45
- if (creditCardOnlyEligible.fetchState !== 'In-Progress' &&
46
- creditCardOnlyEligible.fetchState !== 'Completed') {
47
- transactionActions.push(fetchAccountsForTransferFlow({ kind: 'creditCardOnlyEligible' }));
45
+ if (credit_card_only.fetchState !== 'In-Progress' &&
46
+ credit_card_only.fetchState !== 'Completed') {
47
+ transactionActions.push(fetchAccountsForTransferFlow({ kind: 'credit_card_only' }));
48
48
  }
49
49
  }
50
50
  const classList = state$.value.classListState;
@@ -1,14 +1,14 @@
1
1
  import recordGet from 'lodash/get';
2
2
  import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
3
- import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../entity/tenant/tenantSelector';
3
+ import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled } from '../../entity/tenant/tenantSelector';
4
4
  import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
5
5
  import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
6
6
  import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
7
7
  import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
8
8
  import { dateNow } from '../../zeniDayJS';
9
9
  import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
10
- import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
11
10
  import { getResolvedTransferAccounts } from '../createTransferEntry/createTransferEntrySelector';
11
+ import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
12
12
  import { getProjectList, } from '../projectList/projectListSelector';
13
13
  import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
14
14
  export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
@@ -79,7 +79,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
79
79
  : [];
80
80
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
81
81
  const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
82
- const { transferAccountsList, creditCardTransferAccountsList } = getResolvedTransferAccounts(state);
82
+ const { transferAccountsList, creditCardAccountsForTransferList } = getResolvedTransferAccounts(state);
83
83
  return {
84
84
  reportId: 'transaction_detail',
85
85
  reportTitle: 'Transaction Detail',
@@ -97,7 +97,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
97
97
  classList: classList,
98
98
  isAccountingClassesEnabled,
99
99
  createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
100
- creditCardTransferAccountsList,
100
+ creditCardAccountsForTransferList,
101
101
  transferAccounts: transferAccountsList,
102
102
  isAccountingProjectsEnabled,
103
103
  projectList,
package/lib/index.d.ts CHANGED
@@ -260,7 +260,6 @@ import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData }
260
260
  import { PortfolioUIState } from './view/companyView/types/companyPortfolioViewState';
261
261
  import { CompanyView } from './view/companyView/types/companyView';
262
262
  import { UserAndRole } from './view/companyView/types/userAndRole';
263
- import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus } from './view/createTransferEntry/createTransferEntryReducer';
264
263
  import { fetchDashboard, updateTreasuryVideoClosed } from './view/dashboard/dashboardReducer';
265
264
  import { DashboardReport, getDashboard } from './view/dashboard/dashboardSelector';
266
265
  import { updateDashboardLayout } from './view/dashboardLayout/dashboardLayoutReducer';
@@ -275,6 +274,7 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
275
274
  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';
276
275
  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';
277
276
  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';
277
+ import { clearTransferEntryRouteReplacement, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, fetchAccountsForTransferFlow, resetCreateTransferEntryStatus } from './view/createTransferEntry/createTransferEntryReducer';
278
278
  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';
279
279
  import { ExpenseAutomationStepDetails, ExpenseAutomationViewSelector } from './view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes';
280
280
  import { ExpenseAutomationFluxAnalysisViewSelector, FluxAnalysisOperatingExpenseView, FluxAnalysisSectionType, FluxAnalysisVendorView, FluxAnalysisViewSectionReport, FluxVendorAccountsAndClassesView } from './view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes';
package/lib/index.js CHANGED
@@ -717,14 +717,6 @@ Object.defineProperty(exports, "toPortfolioSortKeyType", { enumerable: true, get
717
717
  Object.defineProperty(exports, "toTaskManagerSortKeyType", { enumerable: true, get: function () { return cockpitTypes_1.toTaskManagerSortKeyType; } });
718
718
  const companyPassportLocalData_1 = require("./view/companyView/types/companyPassport/companyPassportLocalData");
719
719
  Object.defineProperty(exports, "toCompanyPassportLocalData", { enumerable: true, get: function () { return companyPassportLocalData_1.toCompanyPassportLocalData; } });
720
- const createTransferEntryReducer_1 = require("./view/createTransferEntry/createTransferEntryReducer");
721
- Object.defineProperty(exports, "clearTransferEntryRouteReplacement", { enumerable: true, get: function () { return createTransferEntryReducer_1.clearTransferEntryRouteReplacement; } });
722
- Object.defineProperty(exports, "createTransferEntry", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntry; } });
723
- Object.defineProperty(exports, "createTransferEntryFailure", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryFailure; } });
724
- Object.defineProperty(exports, "createTransferEntryReplacedTransaction", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryReplacedTransaction; } });
725
- Object.defineProperty(exports, "createTransferEntrySuccess", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntrySuccess; } });
726
- Object.defineProperty(exports, "fetchAccountsForTransferFlow", { enumerable: true, get: function () { return createTransferEntryReducer_1.fetchAccountsForTransferFlow; } });
727
- Object.defineProperty(exports, "resetCreateTransferEntryStatus", { enumerable: true, get: function () { return createTransferEntryReducer_1.resetCreateTransferEntryStatus; } });
728
720
  const dashboardReducer_1 = require("./view/dashboard/dashboardReducer");
729
721
  Object.defineProperty(exports, "fetchDashboard", { enumerable: true, get: function () { return dashboardReducer_1.fetchDashboard; } });
730
722
  Object.defineProperty(exports, "updateTreasuryVideoClosed", { enumerable: true, get: function () { return dashboardReducer_1.updateTreasuryVideoClosed; } });
@@ -841,6 +833,14 @@ Object.defineProperty(exports, "updateExpenseAutomationSelectedDrawerAccountId",
841
833
  Object.defineProperty(exports, "updateNodeCollapseState", { enumerable: true, get: function () { return reconciliationViewReducer_1.updateNodeCollapseState; } });
842
834
  Object.defineProperty(exports, "updateStatementUploadChosen", { enumerable: true, get: function () { return reconciliationViewReducer_1.updateStatementUploadChosen; } });
843
835
  Object.defineProperty(exports, "uploadAccountStatement", { enumerable: true, get: function () { return reconciliationViewReducer_1.uploadAccountStatement; } });
836
+ const createTransferEntryReducer_1 = require("./view/createTransferEntry/createTransferEntryReducer");
837
+ Object.defineProperty(exports, "clearTransferEntryRouteReplacement", { enumerable: true, get: function () { return createTransferEntryReducer_1.clearTransferEntryRouteReplacement; } });
838
+ Object.defineProperty(exports, "createTransferEntry", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntry; } });
839
+ Object.defineProperty(exports, "createTransferEntryFailure", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryFailure; } });
840
+ Object.defineProperty(exports, "createTransferEntryReplacedTransaction", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntryReplacedTransaction; } });
841
+ Object.defineProperty(exports, "createTransferEntrySuccess", { enumerable: true, get: function () { return createTransferEntryReducer_1.createTransferEntrySuccess; } });
842
+ Object.defineProperty(exports, "fetchAccountsForTransferFlow", { enumerable: true, get: function () { return createTransferEntryReducer_1.fetchAccountsForTransferFlow; } });
843
+ Object.defineProperty(exports, "resetCreateTransferEntryStatus", { enumerable: true, get: function () { return createTransferEntryReducer_1.resetCreateTransferEntryStatus; } });
844
844
  const transactionsViewReducer_1 = require("./view/expenseAutomationView/reducers/transactionsViewReducer");
845
845
  Object.defineProperty(exports, "backgroundRefetchReviewTab", { enumerable: true, get: function () { return transactionsViewReducer_1.backgroundRefetchReviewTab; } });
846
846
  Object.defineProperty(exports, "clearExpenseAutomationTransactionsView", { enumerable: true, get: function () { return transactionsViewReducer_1.clearExpenseAutomationTransactionsView; } });
package/lib/reducer.d.ts CHANGED
@@ -97,11 +97,11 @@ import { CompanyHealthMetricView } from './view/companyHealthMetricView/companyH
97
97
  import { CompanyMonthEndReportViewState } from './view/companyMonthEndReportView/companyMonthEndReportViewState';
98
98
  import { CompanyTaskManagerViewState } from './view/companyTaskManagerView/companyTaskManagerViewState';
99
99
  import { CompanyViewState } from './view/companyView/companyViewState';
100
- import { CreateTransferEntryState } from './view/createTransferEntry/createTransferEntryState';
101
100
  import { CreditAgentViewState } from './view/creditAgentView/creditAgentViewState';
102
101
  import { DashboardState } from './view/dashboard/dashboardState';
103
102
  import { DashboardLayoutState } from './view/dashboardLayout/dashboardLayoutState';
104
103
  import { ExpenseAutomationViewState } from './view/expenseAutomationView/expenseAutomationViewState';
104
+ import { CreateTransferEntryState } from './view/createTransferEntry/createTransferEntryState';
105
105
  import { FluxAnalysisViewState as ExpenseAutomationFluxAnalysisViewState } from './view/expenseAutomationView/types/fluxAnalysisViewState';
106
106
  import { JESchedulesViewState as ExpenseAutomationJESchedulesViewState } from './view/expenseAutomationView/types/jeSchedulesViewState';
107
107
  import { MissingReceiptsViewState as ExpenseAutomationMissingReceiptsViewState } from './view/expenseAutomationView/types/missingReceiptsViewState';
package/lib/reducer.js CHANGED
@@ -137,7 +137,6 @@ const companyHealthMetricViewReducer_1 = __importStar(require("./view/companyHea
137
137
  const companyMonthEndReportViewReducer_1 = __importStar(require("./view/companyMonthEndReportView/companyMonthEndReportViewReducer"));
138
138
  const companyTaskManagerViewReducer_1 = __importStar(require("./view/companyTaskManagerView/companyTaskManagerViewReducer"));
139
139
  const companyViewReducer_1 = __importStar(require("./view/companyView/companyViewReducer"));
140
- const createTransferEntryReducer_1 = __importStar(require("./view/createTransferEntry/createTransferEntryReducer"));
141
140
  const creditAgentViewReducer_1 = __importStar(require("./view/creditAgentView/creditAgentViewReducer"));
142
141
  const dashboardReducer_1 = __importStar(require("./view/dashboard/dashboardReducer"));
143
142
  const dashboardLayoutReducer_1 = __importStar(require("./view/dashboardLayout/dashboardLayoutReducer"));
@@ -147,6 +146,7 @@ const jeSchedulesViewReducer_1 = __importStar(require("./view/expenseAutomationV
147
146
  const missingReceiptsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/missingReceiptsViewReducer"));
148
147
  const reconciliationViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/reconciliationViewReducer"));
149
148
  const transactionsViewReducer_1 = __importStar(require("./view/expenseAutomationView/reducers/transactionsViewReducer"));
149
+ const createTransferEntryReducer_1 = __importStar(require("./view/createTransferEntry/createTransferEntryReducer"));
150
150
  const featureNotificationViewReducer_1 = __importStar(require("./view/featureNotificationView/featureNotificationViewReducer"));
151
151
  const fileViewReducer_1 = __importDefault(require("./view/fileView/fileViewReducer"));
152
152
  const fileViewState_1 = require("./view/fileView/fileViewState");
@@ -25,16 +25,8 @@ const createTransferEntrySlice = (0, toolkit_1.createSlice)({
25
25
  prepare(payload) {
26
26
  return { payload };
27
27
  },
28
- /**
29
- * Defense-in-depth: clear any stale `lastTransferEntryReplacement` on a
30
- * fresh dispatch so a second `createTransferEntry` never inherits the
31
- * previous run's replacement signal (e.g. if the prior `timer(0)` cleanup
32
- * never fired). Mirrors the host hook's `consumedReplacementRef` guard
33
- * (see `useTransferEntryRouteReplacement` in zeni-web-app-ui).
34
- */
35
28
  reducer(draft) {
36
29
  draft.createTransferEntryStatus = 'In-Progress';
37
- draft.lastTransferEntryReplacement = undefined;
38
30
  },
39
31
  },
40
32
  createTransferEntrySuccess(draft) {
@@ -7,14 +7,13 @@ export declare function getLastTransferEntryReplacement(state: RootState): Trans
7
7
  * Shared resolver for the credit/debit dropdowns in the transfer drawer.
8
8
  *
9
9
  * Resolution policy (intentional):
10
- * 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
11
- * debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
12
- * pool).
10
+ * 1. Prefer the dedicated API fetch results (`transfer_eligible` for the debit
11
+ * pool, `credit_card_only` for the credit-card-payment credit pool).
13
12
  * 2. If the dedicated fetch returns an empty list while the COA is loaded,
14
- * fall back to the COA: the full account list for `transferEntryEligible`,
15
- * and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
16
- * This keeps the dropdown populated for older tenants where the dedicated
17
- * endpoints haven't been backfilled yet.
13
+ * fall back to the COA: the full account list for `transfer_eligible`, and
14
+ * COA accounts filtered to `credit_card` for `credit_card_only`. This keeps
15
+ * the dropdown populated for older tenants where the dedicated endpoints
16
+ * haven't been backfilled yet.
18
17
  *
19
18
  * Intent — what this selector deliberately does NOT do:
20
19
  * - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
@@ -34,6 +33,6 @@ export declare function getLastTransferEntryReplacement(state: RootState): Trans
34
33
  * unrelated state change.
35
34
  */
36
35
  export declare const getResolvedTransferAccounts: (state: RootState) => {
37
- creditCardTransferAccountsList: AccountBase[];
36
+ creditCardAccountsForTransferList: AccountBase[];
38
37
  transferAccountsList: AccountBase[];
39
38
  };
@@ -16,14 +16,13 @@ function getLastTransferEntryReplacement(state) {
16
16
  * Shared resolver for the credit/debit dropdowns in the transfer drawer.
17
17
  *
18
18
  * Resolution policy (intentional):
19
- * 1. Prefer the dedicated API fetch results (`transferEntryEligible` for the
20
- * debit pool, `creditCardOnlyEligible` for the credit-card-payment credit
21
- * pool).
19
+ * 1. Prefer the dedicated API fetch results (`transfer_eligible` for the debit
20
+ * pool, `credit_card_only` for the credit-card-payment credit pool).
22
21
  * 2. If the dedicated fetch returns an empty list while the COA is loaded,
23
- * fall back to the COA: the full account list for `transferEntryEligible`,
24
- * and COA accounts filtered to `credit_card` for `creditCardOnlyEligible`.
25
- * This keeps the dropdown populated for older tenants where the dedicated
26
- * endpoints haven't been backfilled yet.
22
+ * fall back to the COA: the full account list for `transfer_eligible`, and
23
+ * COA accounts filtered to `credit_card` for `credit_card_only`. This keeps
24
+ * the dropdown populated for older tenants where the dedicated endpoints
25
+ * haven't been backfilled yet.
27
26
  *
28
27
  * Intent — what this selector deliberately does NOT do:
29
28
  * - Does NOT distinguish "fetch in-flight" / "fetch errored" / "fetch returned
@@ -45,10 +44,10 @@ function getLastTransferEntryReplacement(state) {
45
44
  exports.getResolvedTransferAccounts = (0, toolkit_1.createSelector)([
46
45
  (state) => state.accountState,
47
46
  (state) => state.accountListState,
48
- (state) => state.createTransferEntryState.transferAccountsByType
49
- .transferEntryEligible.accountIds,
50
- (state) => state.createTransferEntryState.transferAccountsByType
51
- .creditCardOnlyEligible.accountIds,
47
+ (state) => state.createTransferEntryState.transferAccountsByType.transfer_eligible
48
+ .accountIds,
49
+ (state) => state.createTransferEntryState.transferAccountsByType.credit_card_only
50
+ .accountIds,
52
51
  ], (accountState, accountListState, transferEligibleIds, creditCardOnlyIds) => {
53
52
  const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
54
53
  const transferEligibleFromApi = transferEligibleIds
@@ -64,6 +63,6 @@ exports.getResolvedTransferAccounts = (0, toolkit_1.createSelector)([
64
63
  .map((id) => (0, accountSelector_1.getAccountBaseForCreditCardTransferAccounts)(accountState, id))
65
64
  .filter((account) => account != null);
66
65
  const coaFallbackCreditCards = coaFallbackAllAccounts.filter((a) => a.accountType === 'credit_card');
67
- const creditCardTransferAccountsList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
68
- return { creditCardTransferAccountsList, transferAccountsList };
66
+ const creditCardAccountsForTransferList = creditCardFromApi.length > 0 ? creditCardFromApi : coaFallbackCreditCards;
67
+ return { creditCardAccountsForTransferList, transferAccountsList };
69
68
  });
@@ -1,7 +1,7 @@
1
1
  import { FetchState, ID } from '../../commonStateTypes/common';
2
2
  import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
3
3
  /** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
4
- export declare const TRANSFER_ACCOUNTS_FETCH_TYPE: readonly ["transferEntryEligible", "creditCardOnlyEligible"];
4
+ export declare const TRANSFER_ACCOUNTS_FETCH_TYPE: readonly ["transfer_eligible", "credit_card_only"];
5
5
  export type TransferAccountsFetchType = (typeof TRANSFER_ACCOUNTS_FETCH_TYPE)[number];
6
6
  export interface TransferAccountsState {
7
7
  accountIds: ID[];
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initialCreateTransferEntryState = exports.TRANSFER_ACCOUNTS_FETCH_TYPE = void 0;
4
4
  /** Which pool `fetchAccountsForTransferFlow` / transfer-flow epic should load. */
5
5
  exports.TRANSFER_ACCOUNTS_FETCH_TYPE = [
6
- 'transferEntryEligible',
7
- 'creditCardOnlyEligible',
6
+ 'transfer_eligible',
7
+ 'credit_card_only',
8
8
  ];
9
9
  const initialTransferAccountsState = {
10
10
  accountIds: [],
@@ -14,7 +14,7 @@ exports.initialCreateTransferEntryState = {
14
14
  createTransferEntryStatus: 'Not-Started',
15
15
  lastTransferEntryReplacement: undefined,
16
16
  transferAccountsByType: {
17
- transferEntryEligible: initialTransferAccountsState,
18
- creditCardOnlyEligible: initialTransferAccountsState,
17
+ transfer_eligible: initialTransferAccountsState,
18
+ credit_card_only: initialTransferAccountsState,
19
19
  },
20
20
  };
@@ -28,20 +28,6 @@ const failureSnackbar = () => (0, snackbarReducer_1.openSnackbar)({
28
28
  function buildFailureActions() {
29
29
  return [(0, createTransferEntryReducer_1.createTransferEntryFailure)(), failureSnackbar()];
30
30
  }
31
- /**
32
- * Defensive guard: a BE response that returns 200 with `transaction != null`
33
- * but where the body lacks a usable id/type is unsafe to seed into the store —
34
- * downstream code would store under a garbage key and the host hook would try
35
- * to navigate to a broken url. Treat that case as failure so the source row
36
- * stays visible and the user can retry.
37
- */
38
- function isWellFormedTransactionPayload(t) {
39
- return (t != null &&
40
- typeof t.transaction_id === 'string' &&
41
- t.transaction_id !== '' &&
42
- typeof t.transaction_type === 'string' &&
43
- t.transaction_type !== '');
44
- }
45
31
  function buildSuccessSideEffects(sourceTransactionId) {
46
32
  return [
47
33
  (0, createTransferEntryReducer_1.createTransferEntrySuccess)(),
@@ -121,12 +107,8 @@ const createTransferEntryEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
121
107
  if (!(0, responsePayload_1.isSuccessResponse)(response)) {
122
108
  return (0, rxjs_1.from)(buildFailureActions());
123
109
  }
124
- const transaction = response.data?.transaction;
125
- if (transaction != null) {
126
- if (!isWellFormedTransactionPayload(transaction)) {
127
- return (0, rxjs_1.from)(buildFailureActions());
128
- }
129
- return handleSuccessWithTransactionBody(transaction, response.data?.vendors, previousTransactionId, transactionId);
110
+ if (response.data?.transaction != null) {
111
+ return handleSuccessWithTransactionBody(response.data.transaction, response.data.vendors, previousTransactionId, transactionId);
130
112
  }
131
113
  return handleSuccessWithoutTransactionBody(transactionId);
132
114
  }), (0, operators_1.catchError)(() => (0, rxjs_1.from)(buildFailureActions())));
@@ -6,9 +6,9 @@ import { ZeniAPI } from '../../../zeniAPI';
6
6
  import { fetchAccountsForTransferFlow, updateAccountsForTransferFlow, updateAccountsForTransferFlowFailure } from '../createTransferEntryReducer';
7
7
  export type ActionType = ReturnType<typeof fetchAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlow> | ReturnType<typeof updateAccountsForTransferFlowFailure> | ReturnType<typeof updateAccounts>;
8
8
  /**
9
- * Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
10
- * and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
11
- * of both does not cancel the first. Within a single type, a fresh dispatch
12
- * supersedes any in-flight request (per-group `switchMap`).
9
+ * Pools fetched concurrently: `groupBy(kind)` keeps `transfer_eligible` and
10
+ * `credit_card_only` in their own streams so a back-to-back dispatch of both
11
+ * does not cancel the first. Within a single type, a fresh dispatch supersedes
12
+ * any in-flight request (per-group `switchMap`).
13
13
  */
14
14
  export declare const fetchTransferAccountsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,18 +7,18 @@ const accountReducer_1 = require("../../../entity/account/accountReducer");
7
7
  const responsePayload_1 = require("../../../responsePayload");
8
8
  const createTransferEntryReducer_1 = require("../createTransferEntryReducer");
9
9
  const REPORT_ID_BY_TYPE = {
10
- transferEntryEligible: 'transfer_accounts',
11
- creditCardOnlyEligible: 'credit_card_transfer_accounts',
10
+ transfer_eligible: 'transfer_accounts',
11
+ credit_card_only: 'credit_card_transfer_accounts',
12
12
  };
13
13
  const QUERY_BY_TYPE = {
14
- transferEntryEligible: { is_only_include_transfer_accounts: true },
15
- creditCardOnlyEligible: { is_include_only_credit_card_accounts: true },
14
+ transfer_eligible: { is_only_include_transfer_accounts: true },
15
+ credit_card_only: { is_include_only_credit_card_accounts: true },
16
16
  };
17
17
  /**
18
- * Pools fetched concurrently: `groupBy(kind)` keeps `transferEntryEligible`
19
- * and `creditCardOnlyEligible` in their own streams so a back-to-back dispatch
20
- * of both does not cancel the first. Within a single type, a fresh dispatch
21
- * supersedes any in-flight request (per-group `switchMap`).
18
+ * Pools fetched concurrently: `groupBy(kind)` keeps `transfer_eligible` and
19
+ * `credit_card_only` in their own streams so a back-to-back dispatch of both
20
+ * does not cancel the first. Within a single type, a fresh dispatch supersedes
21
+ * any in-flight request (per-group `switchMap`).
22
22
  */
23
23
  const fetchTransferAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(createTransferEntryReducer_1.fetchAccountsForTransferFlow.match), (0, operators_1.groupBy)((action) => action.payload.kind), (0, operators_1.mergeMap)((group$) => group$.pipe((0, operators_1.switchMap)((action) => {
24
24
  const { kind } = action.payload;
@@ -27,12 +27,12 @@ const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pi
27
27
  accountList.fetchState === 'Not-Started') {
28
28
  updateActions.push((0, accountListReducer_1.fetchAccountList)('accountList', true));
29
29
  }
30
- const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
31
- if (transferEntryEligible.fetchState === 'Not-Started') {
32
- updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transferEntryEligible' }));
30
+ const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
31
+ if (transfer_eligible.fetchState === 'Not-Started') {
32
+ updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
33
33
  }
34
- if (creditCardOnlyEligible.fetchState === 'Not-Started') {
35
- updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'creditCardOnlyEligible' }));
34
+ if (credit_card_only.fetchState === 'Not-Started') {
35
+ updateActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
36
36
  }
37
37
  const classList = state$.value.classListState;
38
38
  if (classList.hasValidState() === false &&
@@ -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" | "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";
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" | "convert_transaction_type" | "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";
42
42
  messageText: "notification" | "failed" | "success";
43
43
  type: "error" | "success" | "info";
44
44
  variables: {
@@ -20,7 +20,7 @@ export interface ExpenseAutomationTransactionViewSelector extends SelectorView {
20
20
  classList: ClassBase[];
21
21
  completionStatus: CompletionStatusType;
22
22
  createTransferEntryStatus: FetchState;
23
- creditCardTransferAccountsList: AccountBase[];
23
+ creditCardAccountsForTransferList: AccountBase[];
24
24
  fetchStateByTransactionTabs: Record<TransactionsTab, FetchStateAndError>;
25
25
  isAccountingProjectsEnabled: boolean;
26
26
  markAsNotMiscategorizedStatus: FetchStateAndError;
@@ -115,7 +115,7 @@ function getExpenseAutomationTransactionView(state) {
115
115
  : [];
116
116
  const transactionCompletionStatus = allSteps.find((step) => step.step === 'transaction_categorization')?.completionStatus;
117
117
  const completionStatus = transactionCompletionStatus ?? 'incomplete';
118
- const { transferAccountsList, creditCardTransferAccountsList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
118
+ const { transferAccountsList, creditCardAccountsForTransferList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
119
119
  return {
120
120
  version: 0,
121
121
  fetchState: fetchStatus.fetchState,
@@ -144,7 +144,7 @@ function getExpenseAutomationTransactionView(state) {
144
144
  uploadReceiptStatusById,
145
145
  selectedTransactionId,
146
146
  selectedTransactionLineId,
147
- creditCardTransferAccountsList,
147
+ creditCardAccountsForTransferList,
148
148
  transferAccounts: transferAccountsList,
149
149
  selectedTransactionCategorizationCompletedSubTab,
150
150
  };
@@ -6,8 +6,8 @@ import { RootState } from '../../../reducer';
6
6
  import { ZeniAPI } from '../../../zeniAPI';
7
7
  import { fetchAccountList } from '../../accountList/accountListReducer';
8
8
  import { fetchClassList } from '../../classList/classListReducer';
9
- import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
10
9
  import { fetchAccountsForTransferFlow } from '../../createTransferEntry/createTransferEntryReducer';
10
+ import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
11
11
  import { fetchOwnerList } from '../../ownerList/ownerListReducer';
12
12
  import { fetchProjectList } from '../../projectList/projectListReducer';
13
13
  import { updateSortUiState } from '../../vendorList/vendorListReducer';
@@ -17,9 +17,9 @@ const vendorReducer_1 = require("../../../entity/vendor/vendorReducer");
17
17
  const responsePayload_1 = require("../../../responsePayload");
18
18
  const accountListReducer_1 = require("../../accountList/accountListReducer");
19
19
  const classListReducer_1 = require("../../classList/classListReducer");
20
+ const createTransferEntryReducer_1 = require("../../createTransferEntry/createTransferEntryReducer");
20
21
  const transactionVendorLocalDataHelper_1 = require("../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper");
21
22
  const transactionVendorViewReducer_1 = require("../../commonVendorView/transactionVendorView/transactionVendorViewReducer");
22
- const createTransferEntryReducer_1 = require("../../createTransferEntry/createTransferEntryReducer");
23
23
  const ownerListReducer_1 = require("../../ownerList/ownerListReducer");
24
24
  const projectListReducer_1 = require("../../projectList/projectListReducer");
25
25
  const transactionDetailReducer_1 = require("../transactionDetailReducer");
@@ -43,14 +43,14 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
43
43
  transactionActions.push((0, accountListReducer_1.fetchAccountList)('accountList'));
44
44
  }
45
45
  if (isCreateTransferEntryFromExpenseEnabled === true) {
46
- const { transferEntryEligible, creditCardOnlyEligible } = state$.value.createTransferEntryState.transferAccountsByType;
47
- if (transferEntryEligible.fetchState !== 'In-Progress' &&
48
- transferEntryEligible.fetchState !== 'Completed') {
49
- transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transferEntryEligible' }));
46
+ const { transfer_eligible, credit_card_only } = state$.value.createTransferEntryState.transferAccountsByType;
47
+ if (transfer_eligible.fetchState !== 'In-Progress' &&
48
+ transfer_eligible.fetchState !== 'Completed') {
49
+ transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'transfer_eligible' }));
50
50
  }
51
- if (creditCardOnlyEligible.fetchState !== 'In-Progress' &&
52
- creditCardOnlyEligible.fetchState !== 'Completed') {
53
- transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'creditCardOnlyEligible' }));
51
+ if (credit_card_only.fetchState !== 'In-Progress' &&
52
+ credit_card_only.fetchState !== 'Completed') {
53
+ transactionActions.push((0, createTransferEntryReducer_1.fetchAccountsForTransferFlow)({ kind: 'credit_card_only' }));
54
54
  }
55
55
  }
56
56
  const classList = state$.value.classListState;
@@ -20,7 +20,7 @@ export interface TransactionDetailReport extends SelectorView {
20
20
  classList: ClassListSelectorView;
21
21
  createTransferEntryStatus: FetchState;
22
22
  /** Resolved credit-card pool for credit_card_payment transfer drawer. */
23
- creditCardTransferAccountsList: AccountBase[];
23
+ creditCardAccountsForTransferList: AccountBase[];
24
24
  deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
25
25
  isAccountingClassesEnabled: boolean;
26
26
  isAccountingProjectsEnabled: boolean;
@@ -14,8 +14,8 @@ const transactionSelector_1 = require("../../entity/transaction/transactionSelec
14
14
  const vendorSelector_1 = require("../../entity/vendor/vendorSelector");
15
15
  const zeniDayJS_1 = require("../../zeniDayJS");
16
16
  const accountListSelector_1 = require("../accountList/accountListSelector");
17
- const classListSelector_1 = require("../classList/classListSelector");
18
17
  const createTransferEntrySelector_1 = require("../createTransferEntry/createTransferEntrySelector");
18
+ const classListSelector_1 = require("../classList/classListSelector");
19
19
  const projectListSelector_1 = require("../projectList/projectListSelector");
20
20
  const transactionDetailState_1 = require("./transactionDetailState");
21
21
  const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
@@ -86,7 +86,7 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
86
86
  : [];
87
87
  const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
88
88
  const vendors = (0, vendorSelector_1.getVendorsByVendorIds)(vendorState, vendorListState.vendorIds);
89
- const { transferAccountsList, creditCardTransferAccountsList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
89
+ const { transferAccountsList, creditCardAccountsForTransferList } = (0, createTransferEntrySelector_1.getResolvedTransferAccounts)(state);
90
90
  return {
91
91
  reportId: 'transaction_detail',
92
92
  reportTitle: 'Transaction Detail',
@@ -104,7 +104,7 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
104
104
  classList: classList,
105
105
  isAccountingClassesEnabled,
106
106
  createTransferEntryStatus: createTransferEntryState.createTransferEntryStatus,
107
- creditCardTransferAccountsList,
107
+ creditCardAccountsForTransferList,
108
108
  transferAccounts: transferAccountsList,
109
109
  isAccountingProjectsEnabled,
110
110
  projectList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.69-betaML12",
3
+ "version": "5.0.69-betaML2",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",