@zeniai/client-epic-state 4.14.14 → 4.14.16

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 (86) hide show
  1. package/lib/commonStateTypes/reimbursementTypeCode.d.ts +2 -0
  2. package/lib/commonStateTypes/reimbursementTypeCode.js +5 -0
  3. package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +1 -0
  4. package/lib/entity/billPay/billTransaction/billTransactionPayload.js +3 -0
  5. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +6 -3
  6. package/lib/entity/billPay/billTransaction/billTransactionState.js +18 -1
  7. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  8. package/lib/entity/snackbar/snackbarTypes.js +4 -0
  9. package/lib/entity/tenant/epic/signInUserEpic.d.ts +1 -0
  10. package/lib/entity/tenant/epic/signInUserEpic.js +15 -9
  11. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  12. package/lib/entity/tenant/tenantReducer.js +5 -4
  13. package/lib/entity/tenant/tenantState.d.ts +2 -0
  14. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  15. package/lib/index.d.ts +14 -13
  16. package/lib/index.js +26 -15
  17. package/lib/view/bankAccountView/bankAccountViewReducer.d.ts +2 -2
  18. package/lib/view/billPayCard/fetchBillPayCardEpic.js +1 -0
  19. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  20. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  21. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  22. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  23. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +7 -4
  24. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +2 -1
  25. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +2 -2
  26. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +2 -1
  27. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +1 -1
  28. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +1 -1
  29. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +3 -3
  30. package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscatgorizedEpic.js +76 -27
  31. package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +1 -2
  32. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +3 -2
  33. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +1 -3
  34. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -12
  35. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +13 -12
  36. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +0 -2
  37. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +3 -0
  38. package/lib/view/expenseAutomationView/helpers/helpers.js +4 -1
  39. package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +1 -2
  40. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -10
  41. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +6 -2
  42. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -3
  43. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +102 -65
  44. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -2
  45. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +20 -11
  46. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +4 -1
  47. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  48. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  49. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  50. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  51. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  52. package/lib/view/recommendation/fetchEntityRecommendationsByTransactionIdEpic.js +1 -1
  53. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  54. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +9 -2
  55. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +35 -8
  56. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  57. package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +3 -2
  58. package/lib/view/spendManagement/billPay/billList/billListSelector.js +55 -18
  59. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
  60. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  61. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +7 -2
  62. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +18 -6
  63. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +6 -0
  64. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +9 -4
  65. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +18 -4
  66. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +2 -1
  67. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -0
  68. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +8 -4
  69. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +26 -5
  70. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -2
  71. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +36 -3
  72. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +6 -1
  73. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +6 -7
  74. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +16 -5
  75. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +27 -13
  76. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +7 -3
  77. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +48 -28
  78. package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewReducer.d.ts +2 -2
  79. package/lib/view/spendManagement/helpers.d.ts +2 -0
  80. package/lib/view/spendManagement/helpers.js +9 -1
  81. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.d.ts +6 -1
  82. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.js +12 -2
  83. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  84. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  85. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.d.ts +1 -1
  86. 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" | "transaction_reviewed" | "transaction_reviewed_failed" | "transactions_reviewed_failed" | "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" | "transaction_reviewed" | "transaction_reviewed_failed" | "transactions_reviewed_failed" | "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[];
@@ -77,4 +80,8 @@ export interface BillActivity {
77
80
  }
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
- export declare const checkApproveRejectBtnShow: (billActivities: BillActivity[], isUserAdmin: boolean, signedInUser?: LoggedInUser | undefined) => boolean;
83
+ export declare const checkApproveRejectBtnShow: (billActivities: BillActivity[], isUserAdmin: boolean, signedInUser?: LoggedInUser | undefined) => {
84
+ isApprovalorRejectBtnVisible: boolean;
85
+ isMarkAsPaidBtnVisible: boolean;
86
+ };
87
+ export declare const checkShowMarkAsPaidButton: (bill: BillTransaction, isAdmin: boolean, loggedInUser?: LoggedInUser | undefined) => boolean;
@@ -3,8 +3,9 @@ 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
+ const findLastIndex_1 = __importDefault(require("lodash/findLastIndex"));
8
9
  const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
9
10
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
10
11
  const approvalRuleSelector_1 = require("../../../../entity/approvalRule/approvalRuleSelector");
@@ -84,11 +85,12 @@ const getBillActivities = (state, billId, billStageCode) => {
84
85
  };
85
86
  exports.getBillActivities = getBillActivities;
86
87
  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;
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
89
+ const { bankAccountState, paymentInstrumentState, billDetailViewState, billTransactionState, paymentAccountState, userState, billPayConfigState, userRoleState, classListState, classState, commonHistoryState, realTimeApprovalState, entityApprovalStatusState, billPaySetupApproverViewState, vendorState, recurringBillState, depositAccountState, paymentAccountListState, editBillDetailViewState, } = state;
89
90
  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);
91
+ const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId !== null && billId !== void 0 ? billId : '');
92
+ const billTransactionDetails = (0, get_1.default)(billDetailViewState.billDetailById, key, undefined);
93
+ const editBillDetail = (0, get_1.default)(editBillDetailViewState.editBillStateById, key, undefined);
92
94
  const transaction = billTransactionState.transactionById[billId];
93
95
  let fetchState = {
94
96
  fetchState: (_a = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.fetchState) !== null && _a !== void 0 ? _a : 'Not-Started',
@@ -189,6 +191,13 @@ const getBillDetailView = (state, billId) => {
189
191
  recurringBillInstances = recurringBillDetail === null || recurringBillDetail === void 0 ? void 0 : recurringBillDetail.recurringBillInstances;
190
192
  }
191
193
  const zeniAssist = billTransactionDetails === null || billTransactionDetails === void 0 ? void 0 : billTransactionDetails.zeniAssist;
194
+ const outsideZeniPaymentInfo = editBillDetail === null || editBillDetail === void 0 ? void 0 : editBillDetail.billDetailLocalData.outsideZeniPaymentLocalData;
195
+ const billSaveStatus = (_u = editBillDetail === null || editBillDetail === void 0 ? void 0 : editBillDetail.saveStatus.fetchState) !== null && _u !== void 0 ? _u : 'Not-Started';
196
+ //offline bills without approval - show created as approved date
197
+ const latestApprovedDate = (transaction === null || transaction === void 0 ? void 0 : transaction.entityApprovalId) == null &&
198
+ (transaction === null || transaction === void 0 ? void 0 : transaction.billPayInfo.billPaymentStatus.code) === 'mark_as_paid'
199
+ ? transaction.createTime
200
+ : (0, helpers_1.getLatestApprovalDate)(billActivities);
192
201
  return {
193
202
  fetchState: fetchState.fetchState,
194
203
  error: fetchState.error,
@@ -202,6 +211,7 @@ const getBillDetailView = (state, billId) => {
202
211
  deleteStatus,
203
212
  cancelStatus,
204
213
  cancelAndDeleteStatus,
214
+ billSaveStatus,
205
215
  billActivities,
206
216
  allApprovers,
207
217
  filteredApprovers,
@@ -215,17 +225,19 @@ const getBillDetailView = (state, billId) => {
215
225
  approvalUpdateStatus,
216
226
  approvalType,
217
227
  paymentMethodType: paymentMethodWithBillFees,
218
- latestApprovedDate: (0, helpers_1.getLatestApprovalDate)(billActivities),
228
+ latestApprovedDate,
219
229
  isRecurring,
220
230
  recurringBillInstances,
221
231
  recurringBillConfigDetail,
222
232
  zeniAssist,
233
+ outsideZeniPaymentInfo,
223
234
  };
224
235
  };
225
236
  exports.getBillDetailView = getBillDetailView;
226
237
  const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) => {
227
238
  var _a, _b;
228
239
  let isApprovalorRejectBtnVisible = false;
240
+ let isMarkAsPaidBtnVisible = false;
229
241
  let rejectedId = -1;
230
242
  const stepsWithStatusData = billActivities[0].stepsWithStatus;
231
243
  const { areApprovalsSerialized, isAdminFallbackApprover, currentPendingStepIndex, } = billActivities[0];
@@ -249,13 +261,18 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
249
261
  stepsWithStatusData[rejectedId],
250
262
  ];
251
263
  }
252
- return false;
264
+ return {
265
+ isApprovalorRejectBtnVisible: false,
266
+ isMarkAsPaidBtnVisible: false,
267
+ };
253
268
  }
254
269
  if (areApprovalsSerialized === true) {
255
270
  if (currentPendingStepIndex != null &&
256
271
  currentPendingStepIndex > -1 &&
257
272
  stepsWithStatusData.length > 0) {
258
273
  const pendingStep = stepsWithStatusData[currentPendingStepIndex];
274
+ const lastApprovalStepIndex = (0, findLastIndex_1.default)(stepsWithStatusData, (step) => step.action === 'require_approval');
275
+ const isLastApprovalStep = lastApprovalStepIndex === currentPendingStepIndex;
259
276
  if (pendingStep.action === 'require_approval') {
260
277
  let isAllActivitiesPending = true;
261
278
  for (const actorActivity of pendingStep.actorsActivity) {
@@ -268,6 +285,7 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
268
285
  if (((_a = actorActivity.actor) === null || _a === void 0 ? void 0 : _a.userId) === (signedInUser === null || signedInUser === void 0 ? void 0 : signedInUser.userId) &&
269
286
  isAllActivitiesPending) {
270
287
  isApprovalorRejectBtnVisible = true;
288
+ isMarkAsPaidBtnVisible = isLastApprovalStep;
271
289
  }
272
290
  // admin will be fallback approver if vendor-owner/manager are not assigned any user id
273
291
  if (actorActivity.type === 'attribute' &&
@@ -277,6 +295,7 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
277
295
  isAdminFallbackApprover === true &&
278
296
  isUserAdmin === true) {
279
297
  isApprovalorRejectBtnVisible = true;
298
+ isMarkAsPaidBtnVisible = isLastApprovalStep;
280
299
  }
281
300
  }
282
301
  }
@@ -296,6 +315,7 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
296
315
  if (((_b = actorActivity.actor) === null || _b === void 0 ? void 0 : _b.userId) === (signedInUser === null || signedInUser === void 0 ? void 0 : signedInUser.userId) &&
297
316
  isAllActivitiesPending) {
298
317
  isApprovalorRejectBtnVisible = true;
318
+ isMarkAsPaidBtnVisible = true;
299
319
  }
300
320
  // admin will be fallback approver if vendor-owner/manager are not assigned any user id
301
321
  else if (actorActivity.type === 'attribute' &&
@@ -305,6 +325,7 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
305
325
  isAdminFallbackApprover === true &&
306
326
  isUserAdmin === true) {
307
327
  isApprovalorRejectBtnVisible = true;
328
+ isMarkAsPaidBtnVisible = true;
308
329
  }
309
330
  }
310
331
  }
@@ -313,6 +334,12 @@ const checkApproveRejectBtnShow = (billActivities, isUserAdmin, signedInUser) =>
313
334
  }
314
335
  }
315
336
  }
316
- return isApprovalorRejectBtnVisible;
337
+ return { isApprovalorRejectBtnVisible, isMarkAsPaidBtnVisible };
317
338
  };
318
339
  exports.checkApproveRejectBtnShow = checkApproveRejectBtnShow;
340
+ const checkShowMarkAsPaidButton = (bill, isAdmin, loggedInUser) => {
341
+ const billPaymentStatus = bill.billPayInfo.billPaymentStatus.code;
342
+ const isCreator = bill.createdBy === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userId);
343
+ return (0, helpers_1.isAwaitingMarkAsPaid)(billPaymentStatus) && (isAdmin || isCreator);
344
+ };
345
+ 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,22 @@ 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':
70
+ }
71
+ case 'awaiting_approval': {
54
72
  transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code === 'pending_approval');
55
73
  break;
74
+ }
56
75
  case 'overdue':
57
76
  transactions = nonDeletedCurrentTabTransactions.filter((tran) => tran.billPayInfo.billStatus.code !== 'rejected' &&
58
77
  tran.dueDate != null &&
@@ -64,8 +83,14 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled) => {
64
83
  case 'deleted':
65
84
  transactions = currentTabTransactions.filter((tran) => tran.isDeleted);
66
85
  break;
67
- default:
68
- transactions = nonDeletedCurrentTabTransactions;
86
+ default: {
87
+ if (billsToBeMarkedAsPaid.length > 0) {
88
+ transactions = (0, orderBy_1.default)([...billsToBeMarkedAsPaid, ...nonDeletedCurrentTabTransactions], (value) => value.date.valueOf(), 'desc');
89
+ }
90
+ else {
91
+ transactions = nonDeletedCurrentTabTransactions;
92
+ }
93
+ }
69
94
  }
70
95
  break;
71
96
  case 'scheduled':
@@ -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>;