@zeniai/client-epic-state 5.1.82 → 5.1.83-betaRD1

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 (129) hide show
  1. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +2 -0
  2. package/lib/entity/jeSchedules/jeSchedulesPayload.js +2 -0
  3. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -0
  4. package/lib/entity/jeSchedules/jeSchedulesSelector.js +13 -2
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
  6. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  7. package/lib/entity/snackbar/snackbarTypes.js +29 -0
  8. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
  9. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  10. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
  11. package/lib/epic.d.ts +5 -1
  12. package/lib/epic.js +5 -1
  13. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +2 -0
  14. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +13 -2
  15. package/lib/esm/entity/snackbar/snackbarTypes.js +29 -0
  16. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  17. package/lib/esm/epic.js +5 -1
  18. package/lib/esm/index.js +11 -5
  19. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  20. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +26 -3
  21. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +21 -0
  22. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
  23. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +73 -0
  24. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
  25. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
  26. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +157 -28
  27. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
  28. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +70 -0
  29. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +159 -22
  30. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
  31. package/lib/esm/view/invoicing/createCreditNote/createCreditNoteEpic.js +24 -4
  32. package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +24 -4
  33. package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +37 -10
  34. package/lib/esm/view/invoicing/discountAction/discountActionEpic.js +33 -9
  35. package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +35 -9
  36. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +5 -1
  37. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +32 -5
  38. package/lib/esm/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +23 -3
  39. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +24 -4
  40. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +24 -4
  41. package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +20 -3
  42. package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +60 -17
  43. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +30 -0
  44. package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +4 -29
  45. package/lib/esm/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +29 -10
  46. package/lib/esm/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +28 -5
  47. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +24 -4
  48. package/lib/esm/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +22 -14
  49. package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +46 -7
  50. package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +26 -8
  51. package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -1
  52. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +4 -1
  53. package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +41 -9
  54. package/lib/index.d.ts +15 -10
  55. package/lib/index.js +71 -50
  56. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  57. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -2
  58. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +24 -1
  59. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
  60. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
  61. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
  62. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
  63. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
  64. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +77 -0
  65. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
  66. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
  67. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
  68. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
  69. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  70. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +7 -1
  71. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +44 -10
  72. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +158 -28
  73. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +25 -0
  74. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
  75. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +34 -8
  76. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +10 -0
  77. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +75 -0
  78. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +4 -1
  79. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +161 -21
  80. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +58 -8
  81. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  82. package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.d.ts +2 -1
  83. package/lib/view/invoicing/createCreditNote/createCreditNoteEpic.js +23 -3
  84. package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +2 -1
  85. package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +23 -3
  86. package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +22 -8
  87. package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +37 -10
  88. package/lib/view/invoicing/discountAction/discountActionEpic.d.ts +2 -1
  89. package/lib/view/invoicing/discountAction/discountActionEpic.js +32 -8
  90. package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +2 -1
  91. package/lib/view/invoicing/dunningAction/dunningActionEpic.js +34 -8
  92. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.d.ts +3 -1
  93. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/catalogDetailEditPayload.js +5 -1
  94. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -1
  95. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +31 -4
  96. package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.d.ts +2 -1
  97. package/lib/view/invoicing/editInvoicingCouponDetailView/saveInvoicingCouponEpic.js +22 -2
  98. package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.d.ts +2 -1
  99. package/lib/view/invoicing/editInvoicingCustomerDetailView/saveInvoicingCustomerEpic.js +23 -3
  100. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.d.ts +2 -1
  101. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/saveInvoicingSubscriptionEpic.js +23 -3
  102. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.d.ts +2 -1
  103. package/lib/view/invoicing/editInvoicingSubscriptionDetailView/syncInvoicingSubscriptionCouponsEpic.js +19 -2
  104. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +2 -1
  105. package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +59 -16
  106. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +13 -0
  107. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
  108. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +30 -0
  109. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +11 -31
  110. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +4 -29
  111. package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +15 -0
  112. package/lib/view/invoicing/invoicingQboView/epics/invoicingQboViewActionType.d.ts +2 -1
  113. package/lib/view/invoicing/invoicingQboView/epics/retryInvoicingQboSyncTaskEpic.js +28 -9
  114. package/lib/view/invoicing/invoicingQboView/epics/startInvoicingQboBackfillEpic.js +27 -4
  115. package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.d.ts +2 -1
  116. package/lib/view/invoicing/issueCreditNote/issueCreditNoteEpic.js +23 -3
  117. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.d.ts +24 -7
  118. package/lib/view/invoicing/issueCreditNote/issueCreditNoteSelector.js +23 -16
  119. package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +2 -1
  120. package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +45 -6
  121. package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +2 -1
  122. package/lib/view/invoicing/settingsView/settingsViewEpics.js +25 -7
  123. package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +10 -1
  124. package/lib/view/invoicing/settingsView/settingsViewReducer.js +1 -1
  125. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +4 -2
  126. package/lib/view/invoicing/settingsView/settingsViewSelector.js +4 -1
  127. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +2 -1
  128. package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +40 -8
  129. package/package.json +1 -1
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
39
39
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
40
40
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
41
41
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
42
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed";
42
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
43
43
  messageText: "notification" | "failed" | "success";
44
44
  type: "error" | "success" | "info";
45
45
  variables: {
@@ -1,4 +1,4 @@
1
- import { JEScheduledTransactionPayload, ScheduledJournalEntryPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
1
+ import { JEAccruedScheduledTransactionPayload, JEScheduledTransactionPayload, ScheduledJournalEntryPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
2
2
  import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
3
3
  import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
4
  import { RootState } from '../../../reducer';
@@ -7,7 +7,9 @@ import { JESchedulePayload, SaveJESchedulePayload } from '../../scheduleView/sch
7
7
  import { JEScheduleLocalData } from '../types/jeSchedulesViewState';
8
8
  export interface ExpenseAutomationJESchedulesQueryPayload {
9
9
  end_date: string;
10
+ include_accrued: boolean;
10
11
  start_date: string;
12
+ close_period_start_date?: string;
11
13
  }
12
14
  interface ExpenseAutomationJESchedulesPayload {
13
15
  failed_je_postings: {
@@ -15,6 +17,10 @@ interface ExpenseAutomationJESchedulesPayload {
15
17
  scheduled_journal_entries: ScheduledJournalEntryPayload[];
16
18
  };
17
19
  je_schedules: JEScheduledTransactionPayload[];
20
+ accrued_je_schedules?: {
21
+ je_schedules: JEAccruedScheduledTransactionPayload[];
22
+ scheduled_journal_entries?: ScheduledJournalEntryPayload[];
23
+ };
18
24
  }
19
25
  export type ExpenseAutomationJESchedulesResponse = ZeniAPIResponse<ExpenseAutomationJESchedulesPayload>;
20
26
  export interface IgnoreDraftJESchedulePayload {
@@ -1,26 +1,32 @@
1
1
  import { ID } from '../../../commonStateTypes/common';
2
2
  import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePeriod';
3
3
  import { AccountMetadataPayload } from '../../../entity/account/accountPayload';
4
- import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
- import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
4
+ import { JEAccruedScheduledTransactionPayload, JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
+ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
6
6
  import { ZeniAPIStatus } from '../../../responsePayload';
7
7
  import { AccountTypeRecommendationPayload } from '../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload';
8
- import { AccountSettingsLocalData, AccountSettingsState, JEScheduleLocalData, JESchedulesViewState, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
8
+ import { AccountSettingsLocalData, AccountSettingsState, JEPageTab, JEScheduleLocalData, JESchedulesViewState, JESchedulesViewUIState, NewScheduleLocalData, NewScheduleLocalDataFixedAssets, SearchTransactionsState } from '../types/jeSchedulesViewState';
9
9
  export declare const accountSettingsInitialState: AccountSettingsState;
10
+ export declare const getBaseNewScheduleLocalData: (scheduleType: ScheduleTypes) => NewScheduleLocalData;
11
+ export declare const newScheduleInitialState: JESchedulesViewState['newSchedule']['newScheduleState'];
12
+ export declare const searchTransactionsInitialState: SearchTransactionsState;
10
13
  export declare const initialState: JESchedulesViewState;
11
- export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
14
+ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearExpenseAutomationJESchedulesView">, clearJeAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeAccountSettingsLocalData">, clearJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearJeScheduleLocalData">, clearSearchTransactionsForNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/clearSearchTransactionsForNewSchedule">, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
12
15
  period: TimePeriod;
13
16
  refreshViewInBackground: any;
14
17
  }, "expenseAutomationJESchedulesView/fetchJeSchedules", never, never>, fetchJeSchedulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
+ selectedPageTab: JEPageTab;
15
19
  selectedPeriod: MonthYearPeriod;
16
20
  status: ZeniAPIStatus;
17
21
  }, "expenseAutomationJESchedulesView/fetchJeSchedulesFailure">, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
18
22
  period: TimePeriod;
19
23
  refreshViewInBackground: any;
20
24
  }, "expenseAutomationJESchedulesView/fetchJeSchedulesPage", never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
+ accruedJeSchedules: JEAccruedScheduledTransactionPayload[];
21
26
  failedJeSchedules: JEScheduledTransactionPayload[];
22
27
  jeSchedules: JEScheduledTransactionPayload[];
23
28
  refreshViewInBackground: boolean;
29
+ selectedPageTab: JEPageTab;
24
30
  selectedPeriod: MonthYearPeriod;
25
31
  }, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
26
32
  jeScheduleTransactionKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
@@ -32,7 +38,11 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
32
38
  jeScheduleTransactionKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
33
39
  }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
34
40
  jeScheduleTransactionKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[];
35
- }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
41
+ }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, initializeNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
42
+ scheduleType: "fixed_assets" | "prepaid_expenses";
43
+ }], {
44
+ scheduleType: "prepaid_expenses" | "fixed_assets";
45
+ }, "expenseAutomationJESchedulesView/initializeNewSchedule", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
36
46
  failedJeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
37
47
  selectedPeriod: MonthYearPeriod;
38
48
  }, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -40,7 +50,11 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
40
50
  }, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`, selectedPeriod: MonthYearPeriod], {
41
51
  jeScheduleKey: `${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`;
42
52
  selectedPeriod: MonthYearPeriod;
43
- }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
53
+ }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, resetNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
54
+ scheduleType: "fixed_assets" | "prepaid_expenses";
55
+ }], {
56
+ scheduleType: "prepaid_expenses" | "fixed_assets";
57
+ }, "expenseAutomationJESchedulesView/resetNewScheduleLocalData", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
58
  jeScheduleTransactionKey: JEScheduleTransactionKey;
45
59
  scheduledJournalEntryID: ID;
46
60
  }, "expenseAutomationJESchedulesView/retryJeSchedule">, retryJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -52,17 +66,37 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
52
66
  status: ZeniAPIStatus;
53
67
  }, "expenseAutomationJESchedulesView/saveAccountSettingsFailure">, saveAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
54
68
  data: Partial<AccountSettingsLocalData>;
55
- }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
69
+ }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, saveNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
70
+ scheduleType: "fixed_assets" | "prepaid_expenses";
71
+ }], {
72
+ scheduleType: "prepaid_expenses" | "fixed_assets";
73
+ }, "expenseAutomationJESchedulesView/saveNewSchedule", never, never>, saveNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
74
+ status: ZeniAPIStatus;
75
+ }, "expenseAutomationJESchedulesView/saveNewScheduleFailure">, saveNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveNewScheduleSuccess">, searchTransactionsForNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
76
+ query: string;
77
+ scheduleType: "fixed_assets" | "prepaid_expenses";
78
+ }], {
79
+ query: string;
80
+ scheduleType: "prepaid_expenses" | "fixed_assets";
81
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewSchedule", never, never>, searchTransactionsForNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
82
+ status: ZeniAPIStatus;
83
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleFailure">, searchTransactionsForNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
84
+ searchResults: JEScheduleTransactionKey[];
85
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleSuccess">, toggleJECreatedGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJECreatedGroupCollapsed">, toggleJEPendingGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJEPendingGroupCollapsed">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
56
86
  accountPayload: AccountMetadataPayload[];
57
87
  }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypes">, updateAccountSettingsListForAccountTypesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
58
88
  status: ZeniAPIStatus;
59
- }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
89
+ }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJEScheduleTypeFilter: import("@reduxjs/toolkit").ActionCreatorWithPayload<"prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | null, "expenseAutomationJESchedulesView/updateJEScheduleTypeFilter">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
60
90
  localData: Partial<JEScheduleLocalData>;
61
91
  scheduledJournalEntryID: ID;
62
- }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[], selectedPeriod: MonthYearPeriod], {
92
+ }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[], selectedPeriod: MonthYearPeriod, selectedPageTab: "schedules" | "existing_schedules"], {
63
93
  jeScheduleKeys: (`${string}_bill_${string}` | `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_refund_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`)[];
64
94
  selectedPeriod: MonthYearPeriod;
65
- }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
95
+ selectedPageTab: "schedules" | "existing_schedules";
96
+ }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
97
+ localData: Partial<NewScheduleLocalDataFixedAssets>;
98
+ scheduleType: "fixed_assets" | "prepaid_expenses";
99
+ }, "expenseAutomationJESchedulesView/updateNewScheduleLocalData">, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
66
100
  status: ZeniAPIStatus;
67
101
  }, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettingsFailure">;
68
102
  declare const _default: import("redux").Reducer<JESchedulesViewState>;
@@ -1,13 +1,19 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.accountSettingsInitialState = void 0;
4
+ exports.updateRecommendationForAccountSettingsFailure = exports.updateRecommendationForAccountSettings = exports.updateNewScheduleLocalData = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateJEScheduleTypeFilter = exports.updateJESchedulesUIState = exports.updateAccountSettingsListForAccountTypesFailure = exports.updateAccountSettingsListForAccountTypes = exports.toggleJEPendingGroupCollapsed = exports.toggleJECreatedGroupCollapsed = exports.searchTransactionsForNewScheduleSuccess = exports.searchTransactionsForNewScheduleFailure = exports.searchTransactionsForNewSchedule = exports.saveNewScheduleSuccess = exports.saveNewScheduleFailure = exports.saveNewSchedule = exports.saveAccountSettingsSuccess = exports.saveAccountSettingsLocalData = exports.saveAccountSettingsFailure = exports.saveAccountSettings = exports.retryJeScheduleSuccess = exports.retryJeScheduleFailure = exports.retryJeSchedule = exports.resetNewScheduleLocalData = exports.removeJeScheduleTransactionKey = exports.removeJeScheduleLocalDataById = exports.removeFailedJeScheduleTransactionKey = exports.initializeNewSchedule = exports.initializeJeScheduleLocalData = exports.initializeAccountSettingsView = exports.ignoreRecommendedJeScheduleSuccess = exports.ignoreRecommendedJeScheduleFailure = exports.ignoreRecommendedJeSchedule = exports.fetchRecommendationForAccountSettings = exports.fetchJeSchedulesSuccess = exports.fetchJeSchedulesPage = exports.fetchJeSchedulesFailure = exports.fetchJeSchedules = exports.fetchAccountSettingsListForAccountTypes = exports.clearSearchTransactionsForNewSchedule = exports.clearJeScheduleLocalData = exports.clearJeAccountSettingsLocalData = exports.clearExpenseAutomationJESchedulesView = exports.initialState = exports.searchTransactionsInitialState = exports.newScheduleInitialState = exports.getBaseNewScheduleLocalData = exports.accountSettingsInitialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const getNestedAccountIDHierarchyForReport_1 = require("../../../commonStateTypes/accountView/getNestedAccountIDHierarchyForReport");
7
7
  const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
8
8
  const accountPayload_1 = require("../../../entity/account/accountPayload");
9
9
  const jeSchedulesPayload_1 = require("../../../entity/jeSchedules/jeSchedulesPayload");
10
10
  const accountTypeRecommendationPayload_1 = require("../../accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload");
11
+ const jeSchedulesViewState_1 = require("../types/jeSchedulesViewState");
12
+ function removeKeyFromEveryTabSlot(keysByPeriodAndTab, keyToRemove) {
13
+ for (const periodTabKey of Object.keys(keysByPeriodAndTab)) {
14
+ keysByPeriodAndTab[periodTabKey] = keysByPeriodAndTab[periodTabKey].filter((jeScheduleKey) => jeScheduleKey !== keyToRemove);
15
+ }
16
+ }
11
17
  exports.accountSettingsInitialState = {
12
18
  localData: {
13
19
  selectedPrepaidExpensesAccountIds: [],
@@ -39,16 +45,34 @@ exports.accountSettingsInitialState = {
39
45
  accruedExpensesNestedAccountListHierarchy: [],
40
46
  accruedExpensesRecommendations: [],
41
47
  };
48
+ const getBaseNewScheduleLocalData = (scheduleType) => ({
49
+ scheduleType,
50
+ jeScheduleDetails: [],
51
+ });
52
+ exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
53
+ exports.newScheduleInitialState = {
54
+ fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
55
+ prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
56
+ };
57
+ exports.searchTransactionsInitialState = {
58
+ searchResults: [],
59
+ fetchState: 'Not-Started',
60
+ error: undefined,
61
+ };
42
62
  exports.initialState = {
43
- jeScheduleTransactionKeysByPeriod: {},
44
- failedJeScheduleTransactionKeysByPeriod: {},
63
+ jeScheduleTransactionKeysByPeriodAndTab: {},
64
+ jeScheduleAccruedKeysByPeriodAndTab: {},
65
+ failedJeScheduleTransactionKeysByPeriodAndTab: {},
45
66
  postStatusById: {},
46
67
  ignoreStatusById: {},
47
68
  jeScheduleLocalDataById: {},
48
69
  uiState: {
49
- searchString: '',
70
+ createdGroupCollapsed: false,
71
+ pendingGroupCollapsed: false,
50
72
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
51
- selectedMainTab: 'pending_review',
73
+ searchString: '',
74
+ selectedJETypeFilter: null,
75
+ selectedPageTab: 'schedules',
52
76
  sortKey: 'transactionDate',
53
77
  sortOrder: 'descending',
54
78
  totalCount: 0,
@@ -59,6 +83,13 @@ exports.initialState = {
59
83
  error: undefined,
60
84
  },
61
85
  accountSettings: exports.accountSettingsInitialState,
86
+ newSchedule: {
87
+ newScheduleState: exports.newScheduleInitialState,
88
+ saveStatus: { fetchState: 'Not-Started', error: undefined },
89
+ searchTransactions: exports.searchTransactionsInitialState,
90
+ fetchState: 'Not-Started',
91
+ error: undefined,
92
+ },
62
93
  fetchState: 'Not-Started',
63
94
  error: undefined,
64
95
  hasValidState() {
@@ -103,9 +134,11 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
103
134
  },
104
135
  },
105
136
  fetchJeSchedulesSuccess(draft, action) {
106
- const { jeSchedules, selectedPeriod, failedJeSchedules, refreshViewInBackground, } = action.payload;
137
+ const { jeSchedules, selectedPeriod, selectedPageTab, failedJeSchedules, accruedJeSchedules, refreshViewInBackground, } = action.payload;
138
+ const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
107
139
  const jeScheduleTransactionKeys = jeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
108
140
  const failedJeScheduleTransactionKeys = failedJeSchedules.map((schedules) => (0, jeSchedulesPayload_1.getJEScheduleTransactionDetailKeyPayload)(schedules.base_transaction));
141
+ const jeScheduleAccruedKeys = accruedJeSchedules.map((schedule) => (0, jeSchedulesPayload_1.getJEScheduleKey)(schedule));
109
142
  if (refreshViewInBackground === true &&
110
143
  draft.refreshStatus.fetchState === 'In-Progress') {
111
144
  draft.refreshStatus = { fetchState: 'Completed', error: undefined };
@@ -114,19 +147,25 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
114
147
  draft.fetchState = 'Completed';
115
148
  draft.error = undefined;
116
149
  }
117
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleTransactionKeys;
118
- draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = failedJeScheduleTransactionKeys;
150
+ draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
151
+ jeScheduleTransactionKeys;
152
+ draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] =
153
+ jeScheduleAccruedKeys;
154
+ draft.failedJeScheduleTransactionKeysByPeriodAndTab[periodTabKey] =
155
+ failedJeScheduleTransactionKeys;
119
156
  },
120
157
  fetchJeSchedulesFailure(draft, action) {
121
- const { status, selectedPeriod } = action.payload;
158
+ const { status, selectedPeriod, selectedPageTab } = action.payload;
159
+ const periodTabKey = (0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod));
122
160
  if (draft.refreshStatus.fetchState === 'In-Progress') {
123
161
  draft.refreshStatus = { fetchState: 'Error', error: status };
124
162
  }
125
163
  else {
126
164
  draft.fetchState = 'Error';
127
165
  draft.error = status;
166
+ draft.jeScheduleTransactionKeysByPeriodAndTab[periodTabKey] = [];
167
+ draft.jeScheduleAccruedKeysByPeriodAndTab[periodTabKey] = [];
128
168
  }
129
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
130
169
  },
131
170
  retryJeSchedule(draft, action) {
132
171
  const { scheduledJournalEntryID } = action.payload;
@@ -214,17 +253,18 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
214
253
  };
215
254
  },
216
255
  updateJeScheduleTransactionKeys: {
217
- prepare(jeScheduleKeys, selectedPeriod) {
256
+ prepare(jeScheduleKeys, selectedPeriod, selectedPageTab) {
218
257
  return {
219
258
  payload: {
220
259
  jeScheduleKeys: jeScheduleKeys,
221
260
  selectedPeriod: selectedPeriod,
261
+ selectedPageTab: selectedPageTab,
222
262
  },
223
263
  };
224
264
  },
225
265
  reducer(draft, action) {
226
- const { selectedPeriod, jeScheduleKeys } = action.payload;
227
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = jeScheduleKeys;
266
+ const { selectedPeriod, selectedPageTab, jeScheduleKeys } = action.payload;
267
+ draft.jeScheduleTransactionKeysByPeriodAndTab[(0, jeSchedulesViewState_1.getJESchedulePeriodTabKey)(selectedPageTab, (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod))] = jeScheduleKeys;
228
268
  },
229
269
  },
230
270
  removeJeScheduleTransactionKey: {
@@ -237,12 +277,10 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
237
277
  };
238
278
  },
239
279
  reducer(draft, action) {
240
- const { selectedPeriod, jeScheduleKey } = action.payload;
241
- const prevData = [
242
- ...(draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] ?? []),
243
- ];
244
- const filteredKeys = prevData.filter((jeKey) => jeKey !== jeScheduleKey);
245
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = filteredKeys;
280
+ const { jeScheduleKey } = action.payload;
281
+ // Dropped from every tab's slot, not just the visible one: once a schedule is ignored or
282
+ // resolved it must not reappear when the user switches tabs and hits a cached list.
283
+ removeKeyFromEveryTabSlot(draft.jeScheduleTransactionKeysByPeriodAndTab, jeScheduleKey);
246
284
  },
247
285
  },
248
286
  removeFailedJeScheduleTransactionKey: {
@@ -255,12 +293,8 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
255
293
  };
256
294
  },
257
295
  reducer(draft, action) {
258
- const { selectedPeriod, failedJeScheduleKey } = action.payload;
259
- const prevData = [
260
- ...(draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] ?? []),
261
- ];
262
- const filteredKeys = prevData.filter((jeKey) => jeKey !== failedJeScheduleKey);
263
- draft.failedJeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = filteredKeys;
296
+ const { failedJeScheduleKey } = action.payload;
297
+ removeKeyFromEveryTabSlot(draft.failedJeScheduleTransactionKeysByPeriodAndTab, failedJeScheduleKey);
264
298
  },
265
299
  },
266
300
  initializeJeScheduleLocalData: {
@@ -372,6 +406,91 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
372
406
  clearJeAccountSettingsLocalData(draft) {
373
407
  draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
374
408
  },
409
+ initializeNewSchedule: {
410
+ prepare({ scheduleType, }) {
411
+ return { payload: { scheduleType } };
412
+ },
413
+ reducer() {
414
+ // Purely an epic-trigger action — the epic fans out the account/class
415
+ // list fetches plus resetNewScheduleLocalData.
416
+ },
417
+ },
418
+ resetNewScheduleLocalData: {
419
+ prepare({ scheduleType, }) {
420
+ return { payload: { scheduleType } };
421
+ },
422
+ reducer(draft, action) {
423
+ const { scheduleType } = action.payload;
424
+ draft.newSchedule.newScheduleState[scheduleType] =
425
+ (0, exports.getBaseNewScheduleLocalData)(scheduleType);
426
+ },
427
+ },
428
+ updateNewScheduleLocalData(draft, action) {
429
+ const { scheduleType, localData } = action.payload;
430
+ draft.newSchedule.newScheduleState[scheduleType] = {
431
+ ...draft.newSchedule.newScheduleState[scheduleType],
432
+ ...localData,
433
+ };
434
+ },
435
+ searchTransactionsForNewSchedule: {
436
+ prepare({ query, scheduleType, }) {
437
+ return { payload: { query, scheduleType } };
438
+ },
439
+ reducer(draft, action) {
440
+ const trimmed = action.payload.query.trim();
441
+ // Cleared or too-short query: no API (see epic) — reset immediately.
442
+ if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
443
+ draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
444
+ return;
445
+ }
446
+ draft.newSchedule.searchTransactions = {
447
+ ...draft.newSchedule.searchTransactions,
448
+ searchString: action.payload.query,
449
+ fetchState: 'In-Progress',
450
+ };
451
+ },
452
+ },
453
+ searchTransactionsForNewScheduleSuccess(draft, action) {
454
+ draft.newSchedule.searchTransactions = {
455
+ ...draft.newSchedule.searchTransactions,
456
+ searchResults: action.payload.searchResults,
457
+ fetchState: 'Completed',
458
+ error: undefined,
459
+ };
460
+ },
461
+ searchTransactionsForNewScheduleFailure(draft, action) {
462
+ draft.newSchedule.searchTransactions = {
463
+ ...draft.newSchedule.searchTransactions,
464
+ fetchState: 'Error',
465
+ error: action.payload.status,
466
+ };
467
+ },
468
+ clearSearchTransactionsForNewSchedule(draft) {
469
+ draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
470
+ },
471
+ saveNewSchedule: {
472
+ prepare({ scheduleType, }) {
473
+ return { payload: { scheduleType } };
474
+ },
475
+ reducer(draft) {
476
+ draft.newSchedule.saveStatus = {
477
+ fetchState: 'In-Progress',
478
+ error: undefined,
479
+ };
480
+ },
481
+ },
482
+ saveNewScheduleSuccess(draft) {
483
+ draft.newSchedule.saveStatus = {
484
+ fetchState: 'Completed',
485
+ error: undefined,
486
+ };
487
+ },
488
+ saveNewScheduleFailure(draft, action) {
489
+ draft.newSchedule.saveStatus = {
490
+ fetchState: 'Error',
491
+ error: action.payload.status,
492
+ };
493
+ },
375
494
  updateJESchedulesUIState(draft, action) {
376
495
  if (action.payload.sortKey != null) {
377
496
  draft.uiState.sortKey = action.payload.sortKey;
@@ -385,16 +504,27 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
385
504
  if (action.payload.scrollPosition != null) {
386
505
  draft.uiState.scrollPosition = action.payload.scrollPosition;
387
506
  }
388
- if (action.payload.selectedMainTab != null) {
389
- draft.uiState.selectedMainTab = action.payload.selectedMainTab;
507
+ if (action.payload.selectedPageTab != null) {
508
+ draft.uiState.selectedPageTab = action.payload.selectedPageTab;
390
509
  }
391
510
  },
511
+ updateJEScheduleTypeFilter(draft, action) {
512
+ draft.uiState.selectedJETypeFilter = action.payload;
513
+ },
514
+ toggleJEPendingGroupCollapsed(draft) {
515
+ draft.uiState.pendingGroupCollapsed =
516
+ !draft.uiState.pendingGroupCollapsed;
517
+ },
518
+ toggleJECreatedGroupCollapsed(draft) {
519
+ draft.uiState.createdGroupCollapsed =
520
+ !draft.uiState.createdGroupCollapsed;
521
+ },
392
522
  clearExpenseAutomationJESchedulesView(draft) {
393
523
  Object.assign(draft, exports.initialState);
394
524
  },
395
525
  },
396
526
  });
397
- _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
527
+ _a = expenseAutomationJESchedulesView.actions, exports.clearExpenseAutomationJESchedulesView = _a.clearExpenseAutomationJESchedulesView, exports.clearJeAccountSettingsLocalData = _a.clearJeAccountSettingsLocalData, exports.clearJeScheduleLocalData = _a.clearJeScheduleLocalData, exports.clearSearchTransactionsForNewSchedule = _a.clearSearchTransactionsForNewSchedule, exports.fetchAccountSettingsListForAccountTypes = _a.fetchAccountSettingsListForAccountTypes, exports.fetchJeSchedules = _a.fetchJeSchedules, exports.fetchJeSchedulesFailure = _a.fetchJeSchedulesFailure, exports.fetchJeSchedulesPage = _a.fetchJeSchedulesPage, exports.fetchJeSchedulesSuccess = _a.fetchJeSchedulesSuccess, exports.fetchRecommendationForAccountSettings = _a.fetchRecommendationForAccountSettings, exports.ignoreRecommendedJeSchedule = _a.ignoreRecommendedJeSchedule, exports.ignoreRecommendedJeScheduleFailure = _a.ignoreRecommendedJeScheduleFailure, exports.ignoreRecommendedJeScheduleSuccess = _a.ignoreRecommendedJeScheduleSuccess, exports.initializeAccountSettingsView = _a.initializeAccountSettingsView, exports.initializeJeScheduleLocalData = _a.initializeJeScheduleLocalData, exports.initializeNewSchedule = _a.initializeNewSchedule, exports.removeFailedJeScheduleTransactionKey = _a.removeFailedJeScheduleTransactionKey, exports.removeJeScheduleLocalDataById = _a.removeJeScheduleLocalDataById, exports.removeJeScheduleTransactionKey = _a.removeJeScheduleTransactionKey, exports.resetNewScheduleLocalData = _a.resetNewScheduleLocalData, exports.retryJeSchedule = _a.retryJeSchedule, exports.retryJeScheduleFailure = _a.retryJeScheduleFailure, exports.retryJeScheduleSuccess = _a.retryJeScheduleSuccess, exports.saveAccountSettings = _a.saveAccountSettings, exports.saveAccountSettingsFailure = _a.saveAccountSettingsFailure, exports.saveAccountSettingsLocalData = _a.saveAccountSettingsLocalData, exports.saveAccountSettingsSuccess = _a.saveAccountSettingsSuccess, exports.saveNewSchedule = _a.saveNewSchedule, exports.saveNewScheduleFailure = _a.saveNewScheduleFailure, exports.saveNewScheduleSuccess = _a.saveNewScheduleSuccess, exports.searchTransactionsForNewSchedule = _a.searchTransactionsForNewSchedule, exports.searchTransactionsForNewScheduleFailure = _a.searchTransactionsForNewScheduleFailure, exports.searchTransactionsForNewScheduleSuccess = _a.searchTransactionsForNewScheduleSuccess, exports.toggleJECreatedGroupCollapsed = _a.toggleJECreatedGroupCollapsed, exports.toggleJEPendingGroupCollapsed = _a.toggleJEPendingGroupCollapsed, exports.updateAccountSettingsListForAccountTypes = _a.updateAccountSettingsListForAccountTypes, exports.updateAccountSettingsListForAccountTypesFailure = _a.updateAccountSettingsListForAccountTypesFailure, exports.updateJESchedulesUIState = _a.updateJESchedulesUIState, exports.updateJEScheduleTypeFilter = _a.updateJEScheduleTypeFilter, exports.updateJeScheduleLocalDataById = _a.updateJeScheduleLocalDataById, exports.updateJeScheduleTransactionKeys = _a.updateJeScheduleTransactionKeys, exports.updateNewScheduleLocalData = _a.updateNewScheduleLocalData, exports.updateRecommendationForAccountSettings = _a.updateRecommendationForAccountSettings, exports.updateRecommendationForAccountSettingsFailure = _a.updateRecommendationForAccountSettingsFailure;
398
528
  exports.default = expenseAutomationJESchedulesView.reducer;
399
529
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
400
530
  const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = (0, accountTypeRecommendationPayload_1.mapAccountTypeRecommendationPayloadToAccountRecommendationByType)(payload);
@@ -0,0 +1,25 @@
1
+ import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
2
+ import { NestedClassHierarchyForReport } from '../../../commonStateTypes/classesView/nestedClassID';
3
+ import { FetchStateAndError } from '../../../commonStateTypes/common';
4
+ import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
5
+ import { AccountBase } from '../../../entity/account/accountState';
6
+ import { ClassBase } from '../../../entity/class/classState';
7
+ import { ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
+ import { ScheduleTransaction } from '../../../entity/transaction/stateTypes/scheduleTransaction';
9
+ import { NewScheduleLocalData, NewScheduleLocalDataFixedAssets } from '../types/jeSchedulesViewState';
10
+ export interface NewScheduleSearchTransactionsView {
11
+ searchTransactionsFetchState: FetchStateAndError;
12
+ searchTransactionsResults: ScheduleTransaction[];
13
+ searchTransactionsString?: string;
14
+ }
15
+ export interface NewScheduleView extends SelectorView, NewScheduleSearchTransactionsView {
16
+ accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
17
+ allAccountList: AccountBase[];
18
+ allClassList: ClassBase[];
19
+ classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
20
+ newScheduleLocalData: NewScheduleLocalData | NewScheduleLocalDataFixedAssets;
21
+ saveStatus: FetchStateAndError;
22
+ scheduleType: ScheduleTypes;
23
+ allDepreciationAccountList?: AccountBase[];
24
+ allDepreciationAccountListNestedAccountHierarchy?: NestedAccountHierarchyForReport[];
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,12 +4,30 @@ import { CompletionStatusType, FetchStateAndError, ID } from '../../../commonSta
4
4
  import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
5
5
  import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
- import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
8
- import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
7
+ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
9
8
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
10
9
  import { JEAccountSettingsView } from '../selectorTypes/jeAccountSettingsViewSelectorTypes';
11
- import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
- import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
10
+ import { NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
11
+ import { JEScheduleRow, JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
+ import { JEPageTab, JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
13
+ export interface JEKpiSummary {
14
+ aiAccountant: {
15
+ amount: number;
16
+ count: number;
17
+ };
18
+ manual: {
19
+ amount: number;
20
+ count: number;
21
+ };
22
+ needsReview: {
23
+ amount: number;
24
+ count: number;
25
+ };
26
+ total: {
27
+ amount: number;
28
+ count: number;
29
+ };
30
+ }
13
31
  export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
14
32
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
15
33
  accountSettingsView: JEAccountSettingsView;
@@ -18,16 +36,24 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
18
36
  allDepreciationAccountList: AccountBase[];
19
37
  allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
20
38
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
21
- completedSchedules: JEScheduledTransaction[];
22
39
  completionStatus: CompletionStatusType;
23
- draftSchedules: JEScheduledTransaction[];
40
+ createdSchedules: JEScheduleRow[];
41
+ createdTotal: number;
42
+ hasLoadedForSelectedTab: boolean;
24
43
  ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
25
44
  jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
26
- ongoingSchedules: JEScheduledTransaction[];
27
- pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
45
+ jeScheduleTypeCounts: {
46
+ active: Record<ScheduleTypes, number>;
47
+ ongoing: Record<ScheduleTypes, number>;
48
+ };
49
+ kpiSummary: JEKpiSummary;
50
+ newScheduleView: NewScheduleView | undefined;
51
+ pendingReviewSchedules: JEScheduleRow[];
52
+ pendingReviewTotal: number;
28
53
  postStatusById: Record<ID, FetchStateAndError>;
29
54
  refreshStatus: FetchStateAndError;
30
55
  resolveSchedules: JEScheduledTransactionWithFailedEntries[];
56
+ scheduleCountsByTab: Partial<Record<JEPageTab, number>>;
31
57
  uiState: JESchedulesViewUIState;
32
58
  uncategorizedAccounts: UncategorizedAccounts;
33
59
  }