@zeniai/client-epic-state 4.14.5 → 4.14.7

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 (68) hide show
  1. package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +1 -0
  2. package/lib/entity/billPay/billTransaction/billTransactionPayload.js +3 -0
  3. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +6 -3
  4. package/lib/entity/billPay/billTransaction/billTransactionState.js +18 -1
  5. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  6. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  7. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  8. package/lib/index.d.ts +11 -11
  9. package/lib/index.js +23 -15
  10. package/lib/view/bankAccountView/bankAccountViewReducer.d.ts +2 -2
  11. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  12. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  13. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  14. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  15. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +7 -4
  16. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +2 -1
  17. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -1
  18. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -1
  19. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +3 -3
  20. package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.js +1 -1
  21. package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +1 -2
  22. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -1
  23. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +1 -3
  24. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -12
  25. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +13 -12
  26. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -2
  27. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -0
  28. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +102 -65
  29. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -2
  30. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -11
  31. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +4 -1
  32. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  33. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  34. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  35. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  36. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  37. package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +1 -1
  38. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  39. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +5 -1
  40. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +22 -6
  41. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  42. package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +3 -2
  43. package/lib/view/spendManagement/billPay/billList/billListSelector.js +54 -17
  44. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  45. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  46. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +7 -2
  47. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +18 -6
  48. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +6 -0
  49. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +9 -4
  50. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +18 -4
  51. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +2 -1
  52. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -0
  53. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +8 -4
  54. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +27 -5
  55. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -2
  56. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +33 -2
  57. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +6 -1
  58. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +16 -5
  59. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +27 -13
  60. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +7 -3
  61. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +48 -28
  62. package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewReducer.d.ts +2 -2
  63. package/lib/view/spendManagement/helpers.d.ts +2 -0
  64. package/lib/view/spendManagement/helpers.js +9 -1
  65. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  66. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  67. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.d.ts +1 -1
  68. package/package.json +1 -1
@@ -13,7 +13,7 @@ export declare const resendInviteEpic: (actions$: ActionsObservable<ActionType>,
13
13
  type: string;
14
14
  } | {
15
15
  payload: {
16
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "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_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" | "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" | "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_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "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" | "transactions_reviewed" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipts_upload";
16
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "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_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" | "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_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "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" | "transactions_reviewed" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipts_upload";
17
17
  messageText: "failed" | "success" | "notification";
18
18
  type: import("../..").SnackbarMessageType;
19
19
  showStatusIcon?: boolean | undefined;
@@ -12,7 +12,7 @@ const accountListSelector_1 = require("../accountList/accountListSelector");
12
12
  const transactionDetailState_1 = require("../transactionDetail/transactionDetailState");
13
13
  const fetchEntityRecommendationsByTransactionIdEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(recommendationReducer_1.fetchEntityRecommendationsByTransactionId.match), (0, operators_1.switchMap)((action) => {
14
14
  const { entity, amount, transactionDetails, isBulkFetch, isTransactionCategorizationFlow, } = action.payload;
15
- const { expenseAutomationViewState: { selectedTransactionCategorizationTab }, } = state$.value;
15
+ const { expenseAutomationTransactionsViewState: { selectedTransactionCategorizationTab, }, } = state$.value;
16
16
  const query = {
17
17
  amount,
18
18
  transaction_id: (0, transactionDetailState_1.getActualTransactionID)(transactionDetails.transactionId.id),
@@ -18,7 +18,7 @@ export declare const saveNotificationSettingsEpic: (actions$: ActionsObservable<
18
18
  type: string;
19
19
  } | {
20
20
  payload: {
21
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "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_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" | "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" | "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_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "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" | "transactions_reviewed" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipts_upload";
21
+ messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "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_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" | "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_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "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" | "transactions_reviewed" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipts_upload";
22
22
  messageText: "failed" | "success" | "notification";
23
23
  type: import("../../..").SnackbarMessageType;
24
24
  showStatusIcon?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
1
+ import { FetchState, FetchStateAndError, ID } from '../../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { AttributeType, Criteria } from '../../../../entity/approvalRule/approvalRuleState';
4
4
  import { BankAccount } from '../../../../entity/bankAccount/bankAccount';
@@ -19,6 +19,7 @@ import { Class } from '../../../../entity/class/classState';
19
19
  import { PaymentInstrument } from '../../../../entity/paymentInstrument/paymentInstrument';
20
20
  import { RecurringBillConfig, RecurringBillData } from '../../../../entity/billPay/recurringBills/recurringBillsState';
21
21
  import { FundingAccount } from '../../commonSetup/setupViewSelector';
22
+ import { OutsideZeniPaymentLocalData } from '../editBillView/editBillViewState';
22
23
  export interface BillDetailViewSelector extends SelectorView {
23
24
  transactionDetails?: BillTransaction;
24
25
  createdBy?: User;
@@ -29,6 +30,7 @@ export interface BillDetailViewSelector extends SelectorView {
29
30
  deleteStatus: FetchStateAndError;
30
31
  cancelAndDeleteStatus: FetchStateAndError;
31
32
  cancelStatus: FetchStateAndError;
33
+ billSaveStatus: FetchState;
32
34
  approvalUpdateStatus: FetchStateAndError;
33
35
  billActivities: BillActivity[];
34
36
  filteredAttributes: AttributeType[];
@@ -47,6 +49,7 @@ export interface BillDetailViewSelector extends SelectorView {
47
49
  recurringBillInstances?: RecurringBillData[];
48
50
  recurringBillConfigDetail?: RecurringBillConfig;
49
51
  zeniAssist?: ZeniAssistForBills;
52
+ outsideZeniPaymentInfo?: OutsideZeniPaymentLocalData;
50
53
  }
51
54
  export interface StepWithStatus extends StepWithUser {
52
55
  actorsActivity: ActorActivityWithUser[];
@@ -78,3 +81,4 @@ export interface BillActivity {
78
81
  export declare const getBillActivities: (state: RootState, billId: ID, billStageCode?: "paid" | "pending_approval" | "scheduled" | "draft" | undefined) => BillActivity[];
79
82
  export declare const getBillDetailView: (state: RootState, billId: ID) => BillDetailViewSelector;
80
83
  export declare const checkApproveRejectBtnShow: (billActivities: BillActivity[], isUserAdmin: boolean, signedInUser?: LoggedInUser | undefined) => boolean;
84
+ export declare const checkShowMarkAsPaidButton: (bill: BillTransaction, isAdmin: boolean, loggedInUser?: LoggedInUser | undefined) => boolean;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.checkApproveRejectBtnShow = exports.getBillDetailView = exports.getBillActivities = void 0;
6
+ exports.checkShowMarkAsPaidButton = exports.checkApproveRejectBtnShow = exports.getBillDetailView = exports.getBillActivities = void 0;
7
7
  const get_1 = __importDefault(require("lodash/get"));
8
8
  const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
9
9
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
@@ -84,11 +84,12 @@ const getBillActivities = (state, billId, billStageCode) => {
84
84
  };
85
85
  exports.getBillActivities = getBillActivities;
86
86
  const getBillDetailView = (state, billId) => {
87
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
88
- const { bankAccountState, paymentInstrumentState, billDetailViewState, billTransactionState, paymentAccountState, userState, billPayConfigState, userRoleState, classListState, classState, commonHistoryState, realTimeApprovalState, entityApprovalStatusState, billPaySetupApproverViewState, vendorState, recurringBillState, depositAccountState, paymentAccountListState, } = state;
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
88
+ const { bankAccountState, paymentInstrumentState, billDetailViewState, billTransactionState, paymentAccountState, userState, billPayConfigState, userRoleState, classListState, classState, commonHistoryState, realTimeApprovalState, entityApprovalStatusState, billPaySetupApproverViewState, vendorState, recurringBillState, depositAccountState, paymentAccountListState, editBillDetailViewState, } = state;
89
89
  const { approverListState } = billPaySetupApproverViewState;
90
- const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
91
- const billTransactionDetails = (0, get_1.default)(billDetailViewState.billDetailById, detailKey, undefined);
90
+ const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
91
+ const billTransactionDetails = (0, get_1.default)(billDetailViewState.billDetailById, key, undefined);
92
+ const editBillDetail = (0, get_1.default)(editBillDetailViewState.editBillStateById, key, undefined);
92
93
  const transaction = billTransactionState.transactionById[billId];
93
94
  let fetchState = {
94
95
  fetchState: (_a = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.fetchState) !== null && _a !== void 0 ? _a : 'Not-Started',
@@ -189,6 +190,13 @@ const getBillDetailView = (state, billId) => {
189
190
  recurringBillInstances = recurringBillDetail === null || recurringBillDetail === void 0 ? void 0 : recurringBillDetail.recurringBillInstances;
190
191
  }
191
192
  const zeniAssist = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.zeniAssist;
193
+ const outsideZeniPaymentInfo = editBillDetail === null || editBillDetail === void 0 ? void 0 : editBillDetail.billDetailLocalData.outsideZeniPaymentLocalData;
194
+ const billSaveStatus = (_u = editBillDetail === null || editBillDetail === void 0 ? void 0 : editBillDetail.saveStatus.fetchState) !== null && _u !== void 0 ? _u : 'Not-Started';
195
+ //offline bills without approval - show created as approved date
196
+ const latestApprovedDate = (transaction === null || transaction === void 0 ? void 0 : transaction.entityApprovalId) == null &&
197
+ (transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.billPaymentStatus.code) === 'mark_as_paid'
198
+ ? transaction.createTime
199
+ : (0, helpers_1.getLatestApprovalDate)(billActivities);
192
200
  return {
193
201
  fetchState: fetchState.fetchState,
194
202
  error: fetchState.error,
@@ -202,6 +210,7 @@ const getBillDetailView = (state, billId) => {
202
210
  deleteStatus,
203
211
  cancelStatus,
204
212
  cancelAndDeleteStatus,
213
+ billSaveStatus,
205
214
  billActivities,
206
215
  allApprovers,
207
216
  filteredApprovers,
@@ -215,11 +224,12 @@ const getBillDetailView = (state, billId) => {
215
224
  approvalUpdateStatus,
216
225
  approvalType,
217
226
  paymentMethodType: paymentMethodWithBillFees,
218
- latestApprovedDate: (0, helpers_1.getLatestApprovalDate)(billActivities),
227
+ latestApprovedDate,
219
228
  isRecurring,
220
229
  recurringBillInstances,
221
230
  recurringBillConfigDetail,
222
231
  zeniAssist,
232
+ outsideZeniPaymentInfo,
223
233
  };
224
234
  };
225
235
  exports.getBillDetailView = getBillDetailView;
@@ -316,3 +326,9 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
316
326
  return isApprovalorRejectBtnVisible;
317
327
  };
318
328
  exports.checkApproveRejectBtnShow = checkApproveRejectBtnShow;
329
+ const checkShowMarkAsPaidButton = (bill, isAdmin, loggedInUser) => {
330
+ const billPaymentStatus = bill.billPayInfo.billPaymentStatus.code;
331
+ const isCreator = bill.createdBy === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userId);
332
+ return (0, helpers_1.isAwaitingMarkAsPaid)(billPaymentStatus) && (isAdmin || isCreator);
333
+ };
334
+ exports.checkShowMarkAsPaidButton = checkShowMarkAsPaidButton;
@@ -21,7 +21,7 @@ export declare const fetchBillList: import("@reduxjs/toolkit").ActionCreatorWith
21
21
  period: TimePeriod;
22
22
  tab: "paid" | "pending_approval" | "scheduled" | "draft";
23
23
  error: ZeniAPIStatus<Record<string, unknown>>;
24
- }, string, never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", string>, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"all" | "failed" | "rejected" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "awaiting_approval" | "awaiting_my_approval", string>, updateSelectedBillId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearBillList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBillDetailSaveBillCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveBillStageCode, string>, updateBillListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
24
+ }, string, never, never>, updateTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"paid" | "pending_approval" | "scheduled" | "draft", string>, updateSubTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"all" | "failed" | "offline" | "rejected" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "awaiting_approval" | "awaiting_my_approval", string>, updateSelectedBillId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearBillList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBillDetailSaveBillCode: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<SaveBillStageCode, string>, updateBillListUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
25
  uiState: Partial<BillListUIState>;
26
26
  period: TimePeriod;
27
27
  }, string>, updateSearchResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, updateFilterResult: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -5,7 +5,7 @@ import { TimePeriod } from '../../../../commonStateTypes/timePeriod';
5
5
  import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
6
6
  import { BillTransaction } from '../../../../entity/billPay/billTransaction/billTransactionState';
7
7
  import { BillBulkSelectExceptionInfoType, BillListUIState, BillPayFilters, BillPayViewSortKey, BillsSubTabType, BillTab, SaveBillStageCode } from './billListState';
8
- import { UserState } from '../../../../entity/user/userState';
8
+ import { User, UserState } from '../../../../entity/user/userState';
9
9
  import { EntityApprovalStatusState } from '../../../../entity/entityApprovalStatus/entityApprovalStatusState';
10
10
  import { SortOrder } from '../../../../commonStateTypes/selectorTypes/sortOrderTypes';
11
11
  import { Approvers } from '../../../../entity/approvalRule/approvalRuleState';
@@ -26,6 +26,7 @@ interface BillListBulkActionInfo {
26
26
  export interface BillTransactionView extends BillTransaction {
27
27
  approvers: Approvers;
28
28
  isRecurring: boolean;
29
+ createdByUser?: User;
29
30
  bulkSelectInfo?: BillBulkSelectInfo;
30
31
  recurringBillConfig?: RecurringBillConfig;
31
32
  }
@@ -46,7 +47,7 @@ export interface BillListReport extends SelectorView {
46
47
  billBulkSubmissionLimit: number;
47
48
  billListBulkActionInfo: BillListBulkActionInfo;
48
49
  }
49
- export declare const getBillList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean) => BillListReport;
50
+ export declare const getBillList: (state: RootState, currentTimePeriod: TimePeriod, isBulkActionFeatureEnabled: boolean, loggedInUserId?: string | undefined) => BillListReport;
50
51
  export declare const getApproversOrRejectors: (billTransaction: BillTransaction, entityApprovalStatusState: EntityApprovalStatusState, userState: UserState) => Approvers;
51
52
  export declare const getBillListOnSort: (sortKey: BillPayViewSortKey, sortOrder: SortOrder, currentTab: BillTab, transactions: BillTransactionView[]) => BillTransactionView[];
52
53
  export {};
@@ -15,14 +15,23 @@ const billPayConfigSelector_1 = require("../billPayConfig/billPayConfigSelector"
15
15
  const approvalRuleState_1 = require("../../../../entity/approvalRule/approvalRuleState");
16
16
  const spendManagementFilterHelpers_1 = require("../../spendManagementFilterHelpers");
17
17
  const helpers_1 = require("../../helpers");
18
- const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
18
+ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, loggedInUserId) => {
19
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
20
20
  const { billListState, billTransactionState, billPayConfigState, entityApprovalStatusState, userState, recurringBillState, billsBulkActionViewState, } = state;
21
21
  const key = (0, billListState_1.getBillListKey)(currentTimePeriod, billListState.currentTab);
22
22
  const pendingApprovalKey = (0, billListState_1.getBillListKey)(currentTimePeriod, 'pending_approval');
23
+ const scheduledKey = (0, billListState_1.getBillListKey)(currentTimePeriod, 'scheduled');
23
24
  const billPayBotEmail = (0, billPayConfigSelector_1.getBillPayConfigBotEmail)(billPayConfigState);
24
25
  const billIds = (_b = (_a = (0, get_1.default)(billListState.byBillListKey, key, undefined)) === null || _a === void 0 ? void 0 : _a.transactionIDs) !== null && _b !== void 0 ? _b : [];
25
26
  const pendingApprovalTransactionIDs = (_d = (_c = (0, get_1.default)(billListState.byBillListKey, pendingApprovalKey, undefined)) === null || _c === void 0 ? void 0 : _c.pendingApprovalTransactionIDs) !== null && _d !== void 0 ? _d : [];
27
+ let billsToBeMarkedAsPaid = [];
28
+ if (billListState.currentTab === 'pending_approval') {
29
+ const scheduledTransactionIDs = (_f = (_e = (0, get_1.default)(billListState.byBillListKey, scheduledKey, undefined)) === null || _e === void 0 ? void 0 : _e.transactionIDs) !== null && _f !== void 0 ? _f : [];
30
+ billsToBeMarkedAsPaid = scheduledTransactionIDs
31
+ .map((transactionId) => billTransactionState.transactionById[transactionId])
32
+ .filter((bill) => (0, helpers_1.isAwaitingMarkAsPaid)(bill === null || bill === void 0 ? void 0 : bill.billPayInfo.billPaymentStatus.code) &&
33
+ (bill === null || bill === void 0 ? void 0 : bill.isDeleted) === false);
34
+ }
26
35
  const billTransactionsUnsorted = billIds
27
36
  .map((transactionId) => billTransactionState.transactionById[transactionId])
28
37
  .filter((value) => {
@@ -32,7 +41,8 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
32
41
  return value != null;
33
42
  });
34
43
  const currentTabTransactions = (0, orderBy_1.default)(billTransactionsUnsorted, (value) => value.date.valueOf(), 'desc');
35
- const nonDeletedCurrentTabTransactions = currentTabTransactions.filter((tran) => !tran.isDeleted);
44
+ const nonDeletedCurrentTabTransactions = currentTabTransactions.filter((tran) => !(0, helpers_1.isAwaitingMarkAsPaid)(tran.billPayInfo.billPaymentStatus.code) &&
45
+ !tran.isDeleted);
36
46
  let transactions = [];
37
47
  switch (billListState.currentTab) {
38
48
  case 'draft':
@@ -46,13 +56,28 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
46
56
  break;
47
57
  case 'pending_approval':
48
58
  switch (billListState.currentSubTab) {
49
- case 'awaiting_my_approval':
50
- transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code === 'pending_approval' &&
59
+ case 'awaiting_my_approval': {
60
+ const billsAwaitingMyApproval = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code === 'pending_approval' &&
51
61
  pendingApprovalTransactionIDs.includes(tran.id));
62
+ const billsToBeMarkedAsPaidByMe = billsToBeMarkedAsPaid.filter((bill) => bill.createdBy === loggedInUserId);
63
+ if (billsToBeMarkedAsPaidByMe.length > 0) {
64
+ transactions = (0, orderBy_1.default)([...billsToBeMarkedAsPaidByMe, ...billsAwaitingMyApproval], (value) => value.date.valueOf(), 'desc');
65
+ }
66
+ else {
67
+ transactions = billsAwaitingMyApproval;
68
+ }
52
69
  break;
53
- case 'awaiting_approval':
54
- transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code === 'pending_approval');
70
+ }
71
+ case 'awaiting_approval': {
72
+ const billsAwaitingApproval = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code === 'pending_approval');
73
+ if (billsToBeMarkedAsPaid.length > 0) {
74
+ transactions = (0, orderBy_1.default)([...billsToBeMarkedAsPaid, ...billsAwaitingApproval], (value) => value.date.valueOf(), 'desc');
75
+ }
76
+ else {
77
+ transactions = billsAwaitingApproval;
78
+ }
55
79
  break;
80
+ }
56
81
  case 'overdue':
57
82
  transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code !== 'rejected' &&
58
83
  tran.dueDate != null &&
@@ -92,6 +117,9 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
92
117
  case 'wire':
93
118
  transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billPaymentMethodType.code === 'wire');
94
119
  break;
120
+ case 'offline':
121
+ transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billPaymentMethodType.code === 'outside-zeni');
122
+ break;
95
123
  case 'deleted':
96
124
  transactions = currentTabTransactions.filter((tran) => tran.isDeleted);
97
125
  break;
@@ -114,23 +142,25 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
114
142
  recurringBillDetail = (0, get_1.default)(recurringBillState.recurringBillDetailByConfigId, transaction.recurringBillConfigId, undefined);
115
143
  }
116
144
  const recurringBillConfig = recurringBillDetail === null || recurringBillDetail === void 0 ? void 0 : recurringBillDetail.recurringBillConfig;
145
+ const createdByUser = (0, userSelector_1.getUserByUserId)(userState, transaction.createdBy);
117
146
  return Object.assign(Object.assign({}, transaction), { approvers,
147
+ createdByUser,
118
148
  isRecurring,
119
149
  recurringBillConfig });
120
150
  });
121
151
  transactionsView = (0, spendManagementFilterHelpers_1.applyAdvancedFiltersOnList)('bill_pay', transactionsView, billListState.filters);
122
152
  const TransactionsPendingForMyApprovalLength = pendingApprovalTransactionIDs.length;
123
- const fetchState = (_f = (_e = billListState.byBillListKey[key]) === null || _e === void 0 ? void 0 : _e.fetchState) !== null && _f !== void 0 ? _f : 'Not-Started';
124
- const error = (_h = (_g = billListState.byBillListKey[key]) === null || _g === void 0 ? void 0 : _g.error) !== null && _h !== void 0 ? _h : undefined;
125
- const uiState = (_k = (_j = billListState.byBillListKey[key]) === null || _j === void 0 ? void 0 : _j.uiState) !== null && _k !== void 0 ? _k : undefined;
153
+ const fetchState = (_h = (_g = billListState.byBillListKey[key]) === null || _g === void 0 ? void 0 : _g.fetchState) !== null && _h !== void 0 ? _h : 'Not-Started';
154
+ const error = (_k = (_j = billListState.byBillListKey[key]) === null || _j === void 0 ? void 0 : _j.error) !== null && _k !== void 0 ? _k : undefined;
155
+ const uiState = (_m = (_l = billListState.byBillListKey[key]) === null || _l === void 0 ? void 0 : _l.uiState) !== null && _m !== void 0 ? _m : undefined;
126
156
  const { sortKey, sortOrder } = uiState !== null && uiState !== void 0 ? uiState : {
127
157
  sortKey: 'name',
128
158
  sortOrder: 'ascending',
129
159
  };
130
- const isWireActiveForCurrentTenant = (_m = (_l = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('wire', 'usDomestic', 'paymentAccount') //TBR
131
- )) === null || _l === void 0 ? void 0 : _l.isEnabled) !== null && _m !== void 0 ? _m : false;
132
- const isAchActiveForCurrentTenant = ((_p = (_o = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'standard', 'paymentAccount'))) === null || _o === void 0 ? void 0 : _o.isEnabled) !== null && _p !== void 0 ? _p : false) ||
133
- ((_r = (_q = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'sameDay', 'paymentAccount'))) === null || _q === void 0 ? void 0 : _q.isEnabled) !== null && _r !== void 0 ? _r : false);
160
+ const isWireActiveForCurrentTenant = (_p = (_o = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('wire', 'usDomestic', 'paymentAccount') //TBR
161
+ )) === null || _o === void 0 ? void 0 : _o.isEnabled) !== null && _p !== void 0 ? _p : false;
162
+ const isAchActiveForCurrentTenant = ((_r = (_q = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'standard', 'paymentAccount'))) === null || _q === void 0 ? void 0 : _q.isEnabled) !== null && _r !== void 0 ? _r : false) ||
163
+ ((_t = (_s = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'sameDay', 'paymentAccount'))) === null || _s === void 0 ? void 0 : _s.isEnabled) !== null && _t !== void 0 ? _t : false);
134
164
  const allSubTabs = getAllSubTabs(billListState.currentTab, isWireActiveForCurrentTenant, isAchActiveForCurrentTenant);
135
165
  const loweredSearchText = billListState.searchText.trim().toLowerCase();
136
166
  transactionsView = (0, exports.getBillListOnSort)(sortKey, sortOrder, billListState.currentTab, transactionsView.filter((transaction) => {
@@ -144,6 +174,7 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
144
174
  const bulkSubmissionFetchState = billsBulkActionViewState.bulkSubmissionFetchState.fetchState;
145
175
  let isRecurringBillInBulkActionList = false;
146
176
  let isBookClosedForAnySelectedBill = false;
177
+ let isBillAwaitingMarkAsPaidInBulkList = false;
147
178
  let billListBulkActionInfo = {
148
179
  isBulkActionAllowed: false,
149
180
  billsSelectedForBulkAction: [],
@@ -181,6 +212,9 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
181
212
  if (isBookClosedForBill) {
182
213
  isBookClosedForAnySelectedBill = true;
183
214
  }
215
+ if ((0, helpers_1.isAwaitingMarkAsPaid)(transaction.billPayInfo.billPaymentStatus.code)) {
216
+ isBillAwaitingMarkAsPaidInBulkList = true;
217
+ }
184
218
  }
185
219
  if (firstSelectableBill == null && isSelectableForBulkAction) {
186
220
  firstSelectableBill = transaction;
@@ -197,7 +231,7 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
197
231
  .length === 0;
198
232
  const allowedBulkActions = isBulkActionAllowed
199
233
  ? getAllowedBulkActions(billListState.currentTab, billListState.currentSubTab, allBulkBillsAwaitingMyApproval, (firstBillInBulkList === null || firstBillInBulkList === void 0 ? void 0 : firstBillInBulkList.billPayInfo.billPaymentStatus.code) ===
200
- 'processing', isBookClosedForAnySelectedBill, isRecurringBillInBulkActionList)
234
+ 'processing', isBookClosedForAnySelectedBill, isRecurringBillInBulkActionList, isBillAwaitingMarkAsPaidInBulkList)
201
235
  : [];
202
236
  billListBulkActionInfo = {
203
237
  isBulkActionAllowed,
@@ -261,7 +295,7 @@ const getAllPaidSubTabs = (isWireActive, isAchActive) => {
261
295
  paidSubTabs.push('wire');
262
296
  }
263
297
  if (paidSubTabs.length > 0) {
264
- paidSubTabs = ['all', ...paidSubTabs, 'deleted'];
298
+ paidSubTabs = ['all', ...paidSubTabs, 'offline', 'deleted'];
265
299
  }
266
300
  return paidSubTabs;
267
301
  };
@@ -611,7 +645,7 @@ const isBillSelectableForBulkAction = (bill, selectedTab, isBookClosedForBill, i
611
645
  }
612
646
  return result;
613
647
  };
614
- const getAllowedBulkActions = (selectedTab, selectedSubTab, isAllAwaitingMyApproval, isFirstBillProcessing, isBookClosedForAnySelectedBill, isRecurringBillInBulkActionList) => {
648
+ const getAllowedBulkActions = (selectedTab, selectedSubTab, isAllAwaitingMyApproval, isFirstBillProcessing, isBookClosedForAnySelectedBill, isRecurringBillInBulkActionList, isBillAwaitingMarkAsPaidInBulkList) => {
615
649
  switch (selectedTab) {
616
650
  case 'draft':
617
651
  return ['send_for_approval', 'delete'];
@@ -627,6 +661,9 @@ const getAllowedBulkActions = (selectedTab, selectedSubTab, isAllAwaitingMyAppro
627
661
  }
628
662
  return isBookClosedForAnySelectedBill ? [] : ['delete'];
629
663
  case 'awaiting_my_approval':
664
+ if (isBillAwaitingMarkAsPaidInBulkList) {
665
+ return ['delete'];
666
+ }
630
667
  return isBookClosedForAnySelectedBill
631
668
  ? ['approve', 'reject']
632
669
  : ['approve', 'reject', 'delete'];
@@ -35,7 +35,7 @@ export declare type SaveBillStageCode = 'draft' | 'pending_approval' | undefined
35
35
  export declare const ALL_BILL_TABS: readonly ["paid", "pending_approval", "scheduled", "draft"];
36
36
  declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
37
37
  export declare type BillTab = ReturnType<typeof toBillTabType>;
38
- declare const toBillsSubTabType: (v: string) => "all" | "failed" | "rejected" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "awaiting_approval" | "awaiting_my_approval";
38
+ declare const toBillsSubTabType: (v: string) => "all" | "failed" | "offline" | "rejected" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "awaiting_approval" | "awaiting_my_approval";
39
39
  export declare type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
40
40
  declare const toBillPaySortKeyType: (v: string) => "name" | "status" | "amount" | "dueDate" | "invoiceDate" | "paymentMethod";
41
41
  export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
@@ -35,6 +35,7 @@ const BILLS_SUB_TAB = [
35
35
  'wire',
36
36
  'awaiting_my_approval',
37
37
  'deleted',
38
+ 'offline',
38
39
  ];
39
40
  const toBillsSubTabType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILLS_SUB_TAB);
40
41
  const ALL_BILL_PAY_SORT_KEYS = [
@@ -3,13 +3,14 @@ import { Currency } from '../../../../commonStateTypes/amount';
3
3
  import { AccountBasePayload } from '../../../../entity/account/accountPayload';
4
4
  import { ClassBasePayload } from '../../../../entity/class/classPayload';
5
5
  import { ZeniAPIResponse } from '../../../../responsePayload';
6
- import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, VendorCurrency, PaymentAchSubConfigCodeType, InternationalSubConfigCodeType, BillPayConfig, InternationalWireMethodCodeType, InternationalWireMethodCodeKeyType, InternationalSubConfigCodeKeyType, BillPaymentSubConfigCodeKeyType, PaymentAchSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, AccountTypeSubConfigCodeKeyType, AccType } from './billPayConfigState';
6
+ import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType, VendorCurrency, PaymentAchSubConfigCodeType, BillPaymentOutsideZeniSubConfigCodeType, InternationalSubConfigCodeType, BillPayConfig, InternationalWireMethodCodeType, InternationalWireMethodCodeKeyType, InternationalSubConfigCodeKeyType, BillPaymentSubConfigCodeKeyType, PaymentAchSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, AccountTypeSubConfigCodeKeyType, AccType } from './billPayConfigState';
7
7
  export interface BillPayConfigPayload {
8
8
  bill_pay_bot_email: string;
9
9
  is_us_domestic_wire_enabled: boolean;
10
10
  is_same_day_ach_enabled: boolean;
11
11
  is_international_wire_enabled: boolean;
12
12
  is_international_wires_verified: boolean;
13
+ is_outside_zeni_payment_enabled: boolean;
13
14
  payment_processor: BillPayConfigPaymentProcessorPayload;
14
15
  max_bills_allowed_for_bulk_action: number;
15
16
  required_fields: {
@@ -46,15 +47,18 @@ interface CountryPayload {
46
47
  }
47
48
  interface PaymentTimeline {
48
49
  ach: Record<PaymentAchSubConfigCodeType, ConfigTimelineForAccTypePayload>;
50
+ 'outside-zeni': Record<BillPaymentOutsideZeniSubConfigCodeType, ConfigTimelineForAccTypePayload>;
49
51
  wire: Record<BillPaymentWireSubConfigCodeType, ConfigTimelineForAccTypePayload>;
50
52
  }
51
53
  interface ClassConfig {
52
54
  ach: Record<PaymentAchSubConfigCodeType, ClassBasePayload>;
53
55
  wire: Record<BillPaymentWireSubConfigCodeType, ClassBasePayload>;
56
+ 'outside-zeni': Record<BillPaymentOutsideZeniSubConfigCodeType, ClassBasePayload>;
54
57
  }
55
58
  interface AccountConfig {
56
59
  ach: Record<PaymentAchSubConfigCodeType, AccountBasePayload>;
57
60
  wire: Record<BillPaymentWireSubConfigCodeType, AccountBasePayload>;
61
+ 'outside-zeni': Record<BillPaymentOutsideZeniSubConfigCodeType, AccountBasePayload>;
58
62
  }
59
63
  interface BillPayConfigPaymentProcessorPayload {
60
64
  payment_timeline: PaymentTimeline;
@@ -73,6 +77,7 @@ interface WireConfig {
73
77
  interface FeesConfig {
74
78
  ach: Record<PaymentAchSubConfigCodeType, BillPayConfigFeeForAccTypePayload>;
75
79
  wire: WireConfig;
80
+ 'outside-zeni': Record<BillPaymentOutsideZeniSubConfigCodeType, BillPayConfigFeeForAccTypePayload>;
76
81
  }
77
82
  declare type BillPayConfigFeeForAccTypePayload = Record<AccType, BillPayConfigFeePayload>;
78
83
  interface BillPayConfigFeePayload {
@@ -101,7 +106,7 @@ export declare const getBillPaymentWireSubConfigCodeKey: (subCode: BillPaymentWi
101
106
  export declare const getInternationalSubConfigCodeKey: (subCode: InternationalSubConfigCodeType) => InternationalSubConfigCodeKeyType;
102
107
  export declare const getInternationalWireMethodCodeKey: (subCode: InternationalWireMethodCodeType) => InternationalWireMethodCodeKeyType;
103
108
  export declare const getAccountTypeSubConfigCodeKey: (subCode: AccType) => AccountTypeSubConfigCodeKeyType;
104
- export declare const mapBillPayConfigPayloadToBillPayConfig: (paymentProcessor: BillPayConfigPaymentProcessorPayload, isEnabled: boolean, isVerified: boolean, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType: AccType, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => BillPayConfig;
109
+ export declare const mapBillPayConfigPayloadToBillPayConfig: (paymentProcessor: BillPayConfigPaymentProcessorPayload, isEnabled: boolean, isVerified: boolean, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType?: "deposit_account" | "payment_account" | undefined, internationalMethod?: "usd-to-local-currency" | "usd-to-usd" | undefined, internationalSubMethod?: "swift_our" | "swift_sha" | undefined) => BillPayConfig;
105
110
  export declare const mapBillPayVendorConfigPayloadToBillPayVendorConfig: (payload: BillPayConfigPayload, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => Currency[];
106
111
  export declare const toVendorCurrency: (payload: VendorCurrencyPayload) => VendorCurrency;
107
112
  export declare type BillPayConfigResponse = ZeniAPIResponse<BillPayConfigPayload>;
@@ -11,6 +11,8 @@ const getSubCodePayload = (subCode) => {
11
11
  return 'same-day';
12
12
  case 'usDomestic':
13
13
  return 'us-domestic';
14
+ case 'outsideZeni':
15
+ return 'outside-zeni';
14
16
  default:
15
17
  return subCode;
16
18
  }
@@ -22,6 +24,8 @@ const getBillPaymentSubConfigCodeKey = (subCode) => {
22
24
  return 'sameDay';
23
25
  case 'us-domestic':
24
26
  return 'usDomestic';
27
+ case 'outside-zeni':
28
+ return 'outsideZeni';
25
29
  default:
26
30
  return subCode;
27
31
  }
@@ -80,7 +84,7 @@ const getFeeDetail = (fees, code, subCode, accType, internationalMethod, interna
80
84
  };
81
85
  let description = '';
82
86
  let internationalFee;
83
- if (code === 'ach') {
87
+ if (code === 'ach' && accType != null) {
84
88
  feeAmount = {
85
89
  amount: fees[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType].amount,
86
90
  currencyCode: fees[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
@@ -91,7 +95,7 @@ const getFeeDetail = (fees, code, subCode, accType, internationalMethod, interna
91
95
  description =
92
96
  fees[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType].description;
93
97
  }
94
- else if (subCode === 'international') {
98
+ else if (subCode === 'international' && accType != null) {
95
99
  if (internationalMethod === 'usd-to-local-currency') {
96
100
  feeAmount = {
97
101
  amount: fees.wire[subCode][accType][internationalMethod].amount,
@@ -115,7 +119,7 @@ const getFeeDetail = (fees, code, subCode, accType, internationalMethod, interna
115
119
  .description;
116
120
  }
117
121
  }
118
- else if (subCode === 'us-domestic') {
122
+ else if (subCode === 'us-domestic' && accType != null) {
119
123
  feeAmount = {
120
124
  amount: fees.wire[subCode][accType].amount,
121
125
  currencyCode: fees.wire[subCode][accType].currency_code,
@@ -134,7 +138,7 @@ const getTimelineDetail = (paymentTimeline, code, subCode, accType) => {
134
138
  value: 0,
135
139
  units: 'days',
136
140
  };
137
- if (code === 'ach') {
141
+ if (code === 'ach' && accType != null) {
138
142
  minPeriod = {
139
143
  value: paymentTimeline[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
140
144
  .min.value,
@@ -148,7 +152,7 @@ const getTimelineDetail = (paymentTimeline, code, subCode, accType) => {
148
152
  .max.units,
149
153
  };
150
154
  }
151
- else if (code === 'wire') {
155
+ else if (code === 'wire' && accType != null) {
152
156
  minPeriod = {
153
157
  value: paymentTimeline[code][(0, billPayConfigState_1.toBillPaymentWireSubMethodCodeType)(subCode)][accType].min.value,
154
158
  units: paymentTimeline[code][(0, billPayConfigState_1.toBillPaymentWireSubMethodCodeType)(subCode)][accType].min.units,
@@ -173,6 +177,10 @@ const getAccountDetail = (account, code, subCode) => {
173
177
  accountBasePayload =
174
178
  account[code][(0, billPayConfigState_1.toBillPaymentWireSubMethodCodeType)(subCode)];
175
179
  }
180
+ else if (code === 'outside-zeni') {
181
+ accountBasePayload =
182
+ account['outside-zeni'][(0, billPayConfigState_1.toBillPaymentOutsideZeniSubMethodCodeType)(subCode)];
183
+ }
176
184
  return accountBasePayload;
177
185
  };
178
186
  const getClassDetail = (classConfig, code, subCode) => {
@@ -188,6 +196,10 @@ const getClassDetail = (classConfig, code, subCode) => {
188
196
  classBasePayload =
189
197
  classConfig[code][(0, billPayConfigState_1.toBillPaymentWireSubMethodCodeType)(subCode)];
190
198
  }
199
+ else if (code === 'outside-zeni') {
200
+ classBasePayload =
201
+ classConfig['outside-zeni'][(0, billPayConfigState_1.toBillPaymentOutsideZeniSubMethodCodeType)(subCode)];
202
+ }
191
203
  return classBasePayload;
192
204
  };
193
205
  const mapBillPayConfigPayloadToBillPayConfig = (paymentProcessor, isEnabled, isVerified, code, subCode, accType, internationalMethod, internationalSubMethod) => {
@@ -197,7 +209,7 @@ const mapBillPayConfigPayloadToBillPayConfig = (paymentProcessor, isEnabled, isV
197
209
  return {
198
210
  minPeriod: minPeriod,
199
211
  maxPeriod: maxPeriod,
200
- method: (0, billPayConfigState_1.getBillPayConfigMethodKey)(code, (0, billPayConfigState_1.toBillPaymentSubConfigCodeKeyType)((0, exports.getBillPaymentSubConfigCodeKey)(subCode)), (0, exports.getAccountTypeSubConfigCodeKey)(accType), internationalMethod != null
212
+ method: (0, billPayConfigState_1.getBillPayConfigMethodKey)(code, (0, billPayConfigState_1.toBillPaymentSubConfigCodeKeyType)((0, exports.getBillPaymentSubConfigCodeKey)(subCode)), accType != null ? (0, exports.getAccountTypeSubConfigCodeKey)(accType) : undefined, internationalMethod != null
201
213
  ? (0, exports.getInternationalWireMethodCodeKey)(internationalMethod)
202
214
  : undefined, internationalSubMethod != null
203
215
  ? (0, exports.getInternationalSubConfigCodeKey)(internationalSubMethod)
@@ -84,6 +84,12 @@ const billPayConfig = (0, toolkit_1.createSlice)({
84
84
  });
85
85
  break;
86
86
  }
87
+ case 'outside-zeni': {
88
+ billPayConfigState_1.BILL_PAYMENT_OUTSIDE_ZENI_SUB_CODES.forEach((subCode) => {
89
+ draft.methodById[(0, billPayConfigState_1.getBillPayConfigMethodKey)(code, (0, billPayConfigPayload_1.getBillPaymentSubConfigCodeKey)(subCode))] = (0, billPayConfigPayload_1.mapBillPayConfigPayloadToBillPayConfig)(payload.payment_processor, payload.is_outside_zeni_payment_enabled, true, code, subCode);
90
+ });
91
+ break;
92
+ }
87
93
  }
88
94
  });
89
95
  draft.fetchState = 'Completed';
@@ -50,8 +50,8 @@ export interface ConfigPeriod {
50
50
  value: number;
51
51
  units: string;
52
52
  }
53
- export declare const BILL_PAYMENT_METHOD_CODE: readonly ["ach", "wire"];
54
- export declare const toBillPaymentMethodCodeType: (v: string) => "ach" | "wire";
53
+ export declare const BILL_PAYMENT_METHOD_CODE: readonly ["ach", "wire", "outside-zeni"];
54
+ export declare const toBillPaymentMethodCodeType: (v: string) => "ach" | "wire" | "outside-zeni";
55
55
  export declare type BillPaymentConfigCodeType = ReturnType<typeof toBillPaymentMethodCodeType>;
56
56
  export declare const PAYMENT_ACH_SUB_CODES: readonly ["standard", "same-day"];
57
57
  export declare const toPaymentAchSubMethodCodeType: (v: string) => "standard" | "same-day";
@@ -63,6 +63,11 @@ export declare const toBillPaymentWireSubMethodCodeType: (v: string) => "interna
63
63
  export declare type BillPaymentWireSubConfigCodeType = ReturnType<typeof toBillPaymentWireSubMethodCodeType>;
64
64
  declare const toBillPaymentWireSubMethodCodeKeyType: (v: string) => "usDomestic" | "international";
65
65
  export declare type BillPaymentWireSubConfigCodeKeyType = ReturnType<typeof toBillPaymentWireSubMethodCodeKeyType>;
66
+ export declare const BILL_PAYMENT_OUTSIDE_ZENI_SUB_CODES: readonly ["outside-zeni"];
67
+ export declare const toBillPaymentOutsideZeniSubMethodCodeType: (v: string) => "outside-zeni";
68
+ export declare type BillPaymentOutsideZeniSubConfigCodeType = ReturnType<typeof toBillPaymentOutsideZeniSubMethodCodeType>;
69
+ declare const toBillPaymentOutsideZeniSubMethodCodeKeyType: (v: string) => "outsideZeni";
70
+ export declare type BillPaymentOutsideZeniSubMethodCodeKeyType = ReturnType<typeof toBillPaymentOutsideZeniSubMethodCodeKeyType>;
66
71
  export declare const INTERNATIONAL_CODES: readonly ["usd-to-local-currency", "usd-to-usd"];
67
72
  declare const toInternationalWireMethodCodeType: (v: string) => "usd-to-local-currency" | "usd-to-usd";
68
73
  export declare type InternationalWireMethodCodeType = ReturnType<typeof toInternationalWireMethodCodeType>;
@@ -73,8 +78,8 @@ declare const toInternationalSubMethodCodeType: (v: string) => "swift_our" | "sw
73
78
  export declare type InternationalSubConfigCodeType = ReturnType<typeof toInternationalSubMethodCodeType>;
74
79
  declare const toInternationalSubMethodCodeKeyType: (v: string) => "swiftOur" | "swiftSha";
75
80
  export declare type InternationalSubConfigCodeKeyType = ReturnType<typeof toInternationalSubMethodCodeKeyType>;
76
- export declare type BillPaymentSubConfigCodeType = PaymentAchSubConfigCodeType | BillPaymentWireSubConfigCodeType;
77
- export declare type BillPaymentSubConfigCodeKeyType = PaymentAchSubConfigCodeKeyType | BillPaymentWireSubConfigCodeKeyType;
81
+ export declare type BillPaymentSubConfigCodeType = PaymentAchSubConfigCodeType | BillPaymentWireSubConfigCodeType | BillPaymentOutsideZeniSubConfigCodeType;
82
+ export declare type BillPaymentSubConfigCodeKeyType = PaymentAchSubConfigCodeKeyType | BillPaymentWireSubConfigCodeKeyType | BillPaymentOutsideZeniSubMethodCodeKeyType;
78
83
  export declare const toBillPaymentSubConfigCodeKeyType: (v: string) => BillPaymentSubConfigCodeKeyType;
79
84
  export declare const toBillPaymentSubConfigCodeType: (v: string) => BillPaymentSubConfigCodeType;
80
85
  export declare const ACCOUNT_TYPE_CODES: readonly ["deposit_account", "payment_account"];