@zeniai/client-epic-state 5.1.69 → 5.1.70-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 +11 -1
  5. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
  6. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
  7. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  8. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
  9. package/lib/epic.d.ts +5 -1
  10. package/lib/epic.js +5 -1
  11. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +2 -0
  12. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +11 -1
  13. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  14. package/lib/esm/epic.js +5 -1
  15. package/lib/esm/index.js +14 -11
  16. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +15 -2
  17. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +21 -0
  18. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
  19. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +73 -0
  20. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
  21. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
  22. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +126 -6
  23. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
  24. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +70 -0
  25. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +78 -11
  26. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +3 -6
  27. package/lib/esm/view/invoicing/couponView/couponViewEpics.js +0 -3
  28. package/lib/esm/view/invoicing/couponView/couponViewReducer.js +7 -1
  29. package/lib/esm/view/invoicing/couponView/couponViewSelector.js +27 -14
  30. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListEpic.js +7 -5
  31. package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +2 -1
  32. package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +62 -36
  33. package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +19 -15
  34. package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +10 -0
  35. package/lib/esm/view/invoicing/invoicingCreditNoteListView/epics/fetchInvoicingCreditNoteListEpic.js +0 -3
  36. package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewReducer.js +7 -1
  37. package/lib/esm/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +23 -13
  38. package/lib/esm/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +3 -2
  39. package/lib/esm/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
  40. package/lib/esm/view/invoicing/invoicingCustomerListView/epics/fetchInvoicingCustomerListEpic.js +0 -3
  41. package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.js +7 -1
  42. package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +25 -12
  43. package/lib/esm/view/invoicing/invoicingDunningCaseListView/epics/fetchInvoicingDunningCaseListEpic.js +0 -3
  44. package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.js +7 -1
  45. package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +23 -13
  46. package/lib/esm/view/invoicing/invoicingSubscriptionListView/epics/fetchInvoicingSubscriptionListEpic.js +0 -3
  47. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.js +7 -1
  48. package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +22 -12
  49. package/lib/esm/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListEpic.js +7 -5
  50. package/lib/esm/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +2 -1
  51. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +56 -25
  52. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +15 -11
  53. package/lib/esm/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +10 -0
  54. package/lib/index.d.ts +16 -13
  55. package/lib/index.js +73 -48
  56. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +14 -1
  57. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
  58. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
  59. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
  60. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
  61. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
  62. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +77 -0
  63. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
  64. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
  65. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
  66. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
  67. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -0
  68. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +38 -8
  69. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +128 -7
  70. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +25 -0
  71. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
  72. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +29 -4
  73. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +10 -0
  74. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +75 -0
  75. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +1 -0
  76. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +80 -11
  77. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +52 -6
  78. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -8
  79. package/lib/view/invoicing/couponView/couponViewEpics.js +0 -3
  80. package/lib/view/invoicing/couponView/couponViewReducer.d.ts +1 -1
  81. package/lib/view/invoicing/couponView/couponViewReducer.js +8 -2
  82. package/lib/view/invoicing/couponView/couponViewSelector.d.ts +1 -0
  83. package/lib/view/invoicing/couponView/couponViewSelector.js +27 -14
  84. package/lib/view/invoicing/couponView/couponViewState.d.ts +2 -1
  85. package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.d.ts +1 -1
  86. package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.js +7 -5
  87. package/lib/view/invoicing/invoiceList/fetchInvoiceListPageEpic.js +2 -1
  88. package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +5 -4
  89. package/lib/view/invoicing/invoiceList/invoiceListReducer.js +63 -37
  90. package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +1 -0
  91. package/lib/view/invoicing/invoiceList/invoiceListSelector.js +19 -15
  92. package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +20 -7
  93. package/lib/view/invoicing/invoiceList/invoiceListState.js +13 -1
  94. package/lib/view/invoicing/invoicingCreditNoteListView/epics/fetchInvoicingCreditNoteListEpic.js +0 -3
  95. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewReducer.d.ts +1 -1
  96. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewReducer.js +8 -2
  97. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.d.ts +1 -0
  98. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewSelector.js +23 -13
  99. package/lib/view/invoicing/invoicingCreditNoteListView/invoicingCreditNoteListViewState.d.ts +2 -1
  100. package/lib/view/invoicing/invoicingCustomerDetailView/fetchInvoicingCustomerDetailPageEpic.js +3 -2
  101. package/lib/view/invoicing/invoicingCustomerDetailView/invoicingCustomerDetailViewSelector.js +1 -1
  102. package/lib/view/invoicing/invoicingCustomerListView/epics/fetchInvoicingCustomerListEpic.js +0 -3
  103. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
  104. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.js +8 -2
  105. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.d.ts +1 -0
  106. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector.js +25 -12
  107. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +2 -1
  108. package/lib/view/invoicing/invoicingDunningCaseListView/epics/fetchInvoicingDunningCaseListEpic.js +0 -3
  109. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.d.ts +1 -1
  110. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewReducer.js +8 -2
  111. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.d.ts +1 -0
  112. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewSelector.js +23 -13
  113. package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -1
  114. package/lib/view/invoicing/invoicingSubscriptionListView/epics/fetchInvoicingSubscriptionListEpic.js +0 -3
  115. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.d.ts +1 -1
  116. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewReducer.js +8 -2
  117. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +1 -0
  118. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +22 -12
  119. package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +3 -1
  120. package/lib/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListEpic.d.ts +1 -1
  121. package/lib/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListEpic.js +7 -5
  122. package/lib/view/invoicing/invoicingTransactionListView/epics/fetchInvoicingTransactionListPageEpic.js +2 -1
  123. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.d.ts +1 -1
  124. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewReducer.js +57 -26
  125. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.d.ts +1 -0
  126. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewSelector.js +15 -11
  127. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.d.ts +18 -4
  128. package/lib/view/invoicing/invoicingTransactionListView/invoicingTransactionListViewState.js +13 -1
  129. package/package.json +1 -1
@@ -2,13 +2,16 @@ import { ID } from '../../../commonStateTypes/common';
2
2
  import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePeriod';
3
3
  import { AccountMetadataPayload } from '../../../entity/account/accountPayload';
4
4
  import { JEScheduledTransactionPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
5
- import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
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, 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<{
@@ -32,7 +35,11 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
32
35
  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
36
  }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
34
37
  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], {
38
+ }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, initializeNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
39
+ scheduleType: "fixed_assets" | "prepaid_expenses";
40
+ }], {
41
+ scheduleType: "prepaid_expenses" | "fixed_assets";
42
+ }, "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
43
  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
44
  selectedPeriod: MonthYearPeriod;
38
45
  }, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -40,7 +47,11 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
40
47
  }, "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
48
  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
49
  selectedPeriod: MonthYearPeriod;
43
- }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
50
+ }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, resetNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
51
+ scheduleType: "fixed_assets" | "prepaid_expenses";
52
+ }], {
53
+ scheduleType: "prepaid_expenses" | "fixed_assets";
54
+ }, "expenseAutomationJESchedulesView/resetNewScheduleLocalData", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
55
  jeScheduleTransactionKey: JEScheduleTransactionKey;
45
56
  scheduledJournalEntryID: ID;
46
57
  }, "expenseAutomationJESchedulesView/retryJeSchedule">, retryJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -52,17 +63,36 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
52
63
  status: ZeniAPIStatus;
53
64
  }, "expenseAutomationJESchedulesView/saveAccountSettingsFailure">, saveAccountSettingsLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
54
65
  data: Partial<AccountSettingsLocalData>;
55
- }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
66
+ }, "expenseAutomationJESchedulesView/saveAccountSettingsLocalData">, saveAccountSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveAccountSettingsSuccess">, saveNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
67
+ scheduleType: "fixed_assets" | "prepaid_expenses";
68
+ }], {
69
+ scheduleType: "prepaid_expenses" | "fixed_assets";
70
+ }, "expenseAutomationJESchedulesView/saveNewSchedule", never, never>, saveNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
71
+ status: ZeniAPIStatus;
72
+ }, "expenseAutomationJESchedulesView/saveNewScheduleFailure">, saveNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/saveNewScheduleSuccess">, searchTransactionsForNewSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[{
73
+ query: string;
74
+ scheduleType: "fixed_assets" | "prepaid_expenses";
75
+ }], {
76
+ query: string;
77
+ scheduleType: "prepaid_expenses" | "fixed_assets";
78
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewSchedule", never, never>, searchTransactionsForNewScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
79
+ status: ZeniAPIStatus;
80
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleFailure">, searchTransactionsForNewScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
81
+ searchResults: JEScheduleTransactionKey[];
82
+ }, "expenseAutomationJESchedulesView/searchTransactionsForNewScheduleSuccess">, toggleJECreatedGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJECreatedGroupCollapsed">, toggleJEPendingGroupCollapsed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/toggleJEPendingGroupCollapsed">, updateAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
56
83
  accountPayload: AccountMetadataPayload[];
57
84
  }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypes">, updateAccountSettingsListForAccountTypesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
58
85
  status: ZeniAPIStatus;
59
- }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJESchedulesUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<JESchedulesViewUIState>, "expenseAutomationJESchedulesView/updateJESchedulesUIState">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
86
+ }, "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
87
  localData: Partial<JEScheduleLocalData>;
61
88
  scheduledJournalEntryID: ID;
62
89
  }, "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], {
63
90
  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
91
  selectedPeriod: MonthYearPeriod;
65
- }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
92
+ }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
93
+ localData: Partial<NewScheduleLocalDataFixedAssets>;
94
+ scheduleType: "fixed_assets" | "prepaid_expenses";
95
+ }, "expenseAutomationJESchedulesView/updateNewScheduleLocalData">, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
66
96
  status: ZeniAPIStatus;
67
97
  }, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettingsFailure">;
68
98
  declare const _default: import("redux").Reducer<JESchedulesViewState>;
@@ -1,13 +1,14 @@
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");
11
12
  exports.accountSettingsInitialState = {
12
13
  localData: {
13
14
  selectedPrepaidExpensesAccountIds: [],
@@ -39,6 +40,20 @@ exports.accountSettingsInitialState = {
39
40
  accruedExpensesNestedAccountListHierarchy: [],
40
41
  accruedExpensesRecommendations: [],
41
42
  };
43
+ const getBaseNewScheduleLocalData = (scheduleType) => ({
44
+ scheduleType,
45
+ jeScheduleDetails: [],
46
+ });
47
+ exports.getBaseNewScheduleLocalData = getBaseNewScheduleLocalData;
48
+ exports.newScheduleInitialState = {
49
+ fixed_assets: (0, exports.getBaseNewScheduleLocalData)('fixed_assets'),
50
+ prepaid_expenses: (0, exports.getBaseNewScheduleLocalData)('prepaid_expenses'),
51
+ };
52
+ exports.searchTransactionsInitialState = {
53
+ searchResults: [],
54
+ fetchState: 'Not-Started',
55
+ error: undefined,
56
+ };
42
57
  exports.initialState = {
43
58
  jeScheduleTransactionKeysByPeriod: {},
44
59
  failedJeScheduleTransactionKeysByPeriod: {},
@@ -46,9 +61,12 @@ exports.initialState = {
46
61
  ignoreStatusById: {},
47
62
  jeScheduleLocalDataById: {},
48
63
  uiState: {
49
- searchString: '',
64
+ createdGroupCollapsed: false,
65
+ pendingGroupCollapsed: false,
50
66
  scrollPosition: { scrollTop: 0, scrollLeft: undefined },
51
- selectedMainTab: 'pending_review',
67
+ searchString: '',
68
+ selectedJETypeFilter: null,
69
+ selectedPageTab: 'schedules',
52
70
  sortKey: 'transactionDate',
53
71
  sortOrder: 'descending',
54
72
  totalCount: 0,
@@ -59,6 +77,13 @@ exports.initialState = {
59
77
  error: undefined,
60
78
  },
61
79
  accountSettings: exports.accountSettingsInitialState,
80
+ newSchedule: {
81
+ newScheduleState: exports.newScheduleInitialState,
82
+ saveStatus: { fetchState: 'Not-Started', error: undefined },
83
+ searchTransactions: exports.searchTransactionsInitialState,
84
+ fetchState: 'Not-Started',
85
+ error: undefined,
86
+ },
62
87
  fetchState: 'Not-Started',
63
88
  error: undefined,
64
89
  hasValidState() {
@@ -125,8 +150,8 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
125
150
  else {
126
151
  draft.fetchState = 'Error';
127
152
  draft.error = status;
153
+ draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
128
154
  }
129
- draft.jeScheduleTransactionKeysByPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)] = [];
130
155
  },
131
156
  retryJeSchedule(draft, action) {
132
157
  const { scheduledJournalEntryID } = action.payload;
@@ -372,6 +397,91 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
372
397
  clearJeAccountSettingsLocalData(draft) {
373
398
  draft.accountSettings.localData = exports.accountSettingsInitialState.localData;
374
399
  },
400
+ initializeNewSchedule: {
401
+ prepare({ scheduleType, }) {
402
+ return { payload: { scheduleType } };
403
+ },
404
+ reducer() {
405
+ // Purely an epic-trigger action — the epic fans out the account/class
406
+ // list fetches plus resetNewScheduleLocalData.
407
+ },
408
+ },
409
+ resetNewScheduleLocalData: {
410
+ prepare({ scheduleType, }) {
411
+ return { payload: { scheduleType } };
412
+ },
413
+ reducer(draft, action) {
414
+ const { scheduleType } = action.payload;
415
+ draft.newSchedule.newScheduleState[scheduleType] =
416
+ (0, exports.getBaseNewScheduleLocalData)(scheduleType);
417
+ },
418
+ },
419
+ updateNewScheduleLocalData(draft, action) {
420
+ const { scheduleType, localData } = action.payload;
421
+ draft.newSchedule.newScheduleState[scheduleType] = {
422
+ ...draft.newSchedule.newScheduleState[scheduleType],
423
+ ...localData,
424
+ };
425
+ },
426
+ searchTransactionsForNewSchedule: {
427
+ prepare({ query, scheduleType, }) {
428
+ return { payload: { query, scheduleType } };
429
+ },
430
+ reducer(draft, action) {
431
+ const trimmed = action.payload.query.trim();
432
+ // Cleared or too-short query: no API (see epic) — reset immediately.
433
+ if (trimmed.length < jeSchedulesViewState_1.MIN_NEW_SCHEDULE_SEARCH_LENGTH) {
434
+ draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
435
+ return;
436
+ }
437
+ draft.newSchedule.searchTransactions = {
438
+ ...draft.newSchedule.searchTransactions,
439
+ searchString: action.payload.query,
440
+ fetchState: 'In-Progress',
441
+ };
442
+ },
443
+ },
444
+ searchTransactionsForNewScheduleSuccess(draft, action) {
445
+ draft.newSchedule.searchTransactions = {
446
+ ...draft.newSchedule.searchTransactions,
447
+ searchResults: action.payload.searchResults,
448
+ fetchState: 'Completed',
449
+ error: undefined,
450
+ };
451
+ },
452
+ searchTransactionsForNewScheduleFailure(draft, action) {
453
+ draft.newSchedule.searchTransactions = {
454
+ ...draft.newSchedule.searchTransactions,
455
+ fetchState: 'Error',
456
+ error: action.payload.status,
457
+ };
458
+ },
459
+ clearSearchTransactionsForNewSchedule(draft) {
460
+ draft.newSchedule.searchTransactions = exports.searchTransactionsInitialState;
461
+ },
462
+ saveNewSchedule: {
463
+ prepare({ scheduleType, }) {
464
+ return { payload: { scheduleType } };
465
+ },
466
+ reducer(draft) {
467
+ draft.newSchedule.saveStatus = {
468
+ fetchState: 'In-Progress',
469
+ error: undefined,
470
+ };
471
+ },
472
+ },
473
+ saveNewScheduleSuccess(draft) {
474
+ draft.newSchedule.saveStatus = {
475
+ fetchState: 'Completed',
476
+ error: undefined,
477
+ };
478
+ },
479
+ saveNewScheduleFailure(draft, action) {
480
+ draft.newSchedule.saveStatus = {
481
+ fetchState: 'Error',
482
+ error: action.payload.status,
483
+ };
484
+ },
375
485
  updateJESchedulesUIState(draft, action) {
376
486
  if (action.payload.sortKey != null) {
377
487
  draft.uiState.sortKey = action.payload.sortKey;
@@ -385,16 +495,27 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
385
495
  if (action.payload.scrollPosition != null) {
386
496
  draft.uiState.scrollPosition = action.payload.scrollPosition;
387
497
  }
388
- if (action.payload.selectedMainTab != null) {
389
- draft.uiState.selectedMainTab = action.payload.selectedMainTab;
498
+ if (action.payload.selectedPageTab != null) {
499
+ draft.uiState.selectedPageTab = action.payload.selectedPageTab;
390
500
  }
391
501
  },
502
+ updateJEScheduleTypeFilter(draft, action) {
503
+ draft.uiState.selectedJETypeFilter = action.payload;
504
+ },
505
+ toggleJEPendingGroupCollapsed(draft) {
506
+ draft.uiState.pendingGroupCollapsed =
507
+ !draft.uiState.pendingGroupCollapsed;
508
+ },
509
+ toggleJECreatedGroupCollapsed(draft) {
510
+ draft.uiState.createdGroupCollapsed =
511
+ !draft.uiState.createdGroupCollapsed;
512
+ },
392
513
  clearExpenseAutomationJESchedulesView(draft) {
393
514
  Object.assign(draft, exports.initialState);
394
515
  },
395
516
  },
396
517
  });
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;
518
+ _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
519
  exports.default = expenseAutomationJESchedulesView.reducer;
399
520
  const doUpdateRecommendationForAccountSettings = (draft, payload) => {
400
521
  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 });
@@ -5,11 +5,30 @@ import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndRep
5
5
  import { AccountBase } from '../../../entity/account/accountState';
6
6
  import { ClassBase } from '../../../entity/class/classState';
7
7
  import { JEScheduledTransaction } from '../../../entity/jeSchedules/jeSchedulesSelector';
8
- import { JEScheduleTransactionKey } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
+ import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
9
9
  import { UncategorizedAccounts } from '../../accountList/accountListSelector';
10
10
  import { JEAccountSettingsView } from '../selectorTypes/jeAccountSettingsViewSelectorTypes';
11
+ import { NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
11
12
  import { JEScheduledTransactionWithFailedEntries } from '../selectors/jeSchedulesViewSelector';
12
13
  import { JEScheduleLocalData, JESchedulesViewUIState } from '../types/jeSchedulesViewState';
14
+ export interface JEKpiSummary {
15
+ aiAccountant: {
16
+ amount: number;
17
+ count: number;
18
+ };
19
+ manual: {
20
+ amount: number;
21
+ count: number;
22
+ };
23
+ needsReview: {
24
+ amount: number;
25
+ count: number;
26
+ };
27
+ total: {
28
+ amount: number;
29
+ count: number;
30
+ };
31
+ }
13
32
  export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
14
33
  accountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
15
34
  accountSettingsView: JEAccountSettingsView;
@@ -18,13 +37,19 @@ export interface ExpenseAutomationJESchedulesViewSelector extends SelectorView {
18
37
  allDepreciationAccountList: AccountBase[];
19
38
  allDepreciationAccountListNestedAccountHierarchy: NestedAccountHierarchyForReport[];
20
39
  classListNestedAccountHierarchy: NestedClassHierarchyForReport[];
21
- completedSchedules: JEScheduledTransaction[];
22
40
  completionStatus: CompletionStatusType;
23
- draftSchedules: JEScheduledTransaction[];
41
+ createdSchedules: JEScheduledTransaction[];
42
+ createdTotal: number;
24
43
  ignoreStatusById: Record<JEScheduleTransactionKey, FetchStateAndError>;
25
44
  jeScheduleLocalDataById: Record<ID, JEScheduleLocalData>;
26
- ongoingSchedules: JEScheduledTransaction[];
45
+ jeScheduleTypeCounts: {
46
+ active: Record<ScheduleTypes, number>;
47
+ ongoing: Record<ScheduleTypes, number>;
48
+ };
49
+ kpiSummary: JEKpiSummary;
50
+ newScheduleView: NewScheduleView | undefined;
27
51
  pendingReviewSchedules: (JEScheduledTransaction | JEScheduledTransactionWithFailedEntries)[];
52
+ pendingReviewTotal: number;
28
53
  postStatusById: Record<ID, FetchStateAndError>;
29
54
  refreshStatus: FetchStateAndError;
30
55
  resolveSchedules: JEScheduledTransactionWithFailedEntries[];
@@ -0,0 +1,10 @@
1
+ import { RootState } from '../../../reducer';
2
+ import { NewScheduleSearchTransactionsView, NewScheduleView } from '../selectorTypes/jeNewScheduleViewSelectorTypes';
3
+ /**
4
+ * The Base Transaction search is shared across schedule types (one search
5
+ * box, not one per prepaid_expenses/fixed_assets) — split out from
6
+ * getNewScheduleView so a consumer can read it without supplying an
7
+ * otherwise-irrelevant scheduleType.
8
+ */
9
+ export declare const getNewScheduleSearchTransactionsView: (state: RootState) => NewScheduleSearchTransactionsView;
10
+ export declare const getNewScheduleView: (state: RootState, scheduleType: "fixed_assets" | "prepaid_expenses") => NewScheduleView;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNewScheduleView = exports.getNewScheduleSearchTransactionsView = void 0;
4
+ const accountSelector_1 = require("../../../entity/account/accountSelector");
5
+ const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
6
+ const accountListSelector_1 = require("../../accountList/accountListSelector");
7
+ const classListSelector_1 = require("../../classList/classListSelector");
8
+ const scheduleDetailLocalDataHelper_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper");
9
+ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/scheduleDetailSelector");
10
+ const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
11
+ /**
12
+ * The Base Transaction search is shared across schedule types (one search
13
+ * box, not one per prepaid_expenses/fixed_assets) — split out from
14
+ * getNewScheduleView so a consumer can read it without supplying an
15
+ * otherwise-irrelevant scheduleType.
16
+ */
17
+ const getNewScheduleSearchTransactionsView = (state) => {
18
+ const { searchTransactions } = state.expenseAutomationJESchedulesViewState.newSchedule;
19
+ const searchTransactionsResults = searchTransactions.searchResults
20
+ .map((key) => (0, transactionSelector_1.getScheduleTransactionById)(state.transactionState, key))
21
+ .filter((transaction) => transaction != null);
22
+ return {
23
+ searchTransactionsResults,
24
+ searchTransactionsFetchState: {
25
+ fetchState: searchTransactions.fetchState,
26
+ error: searchTransactions.error,
27
+ },
28
+ searchTransactionsString: searchTransactions.searchString,
29
+ };
30
+ };
31
+ exports.getNewScheduleSearchTransactionsView = getNewScheduleSearchTransactionsView;
32
+ const getNewScheduleView = (state, scheduleType) => {
33
+ const { accountState, accountListState, classState, classListState } = state;
34
+ const { newSchedule } = state.expenseAutomationJESchedulesViewState;
35
+ const searchTransactionsView = (0, exports.getNewScheduleSearchTransactionsView)(state);
36
+ const accountType = (0, scheduleListHelper_1.getAccountsTypesForScheduleEpics)();
37
+ const newScheduleAccountTypes = (0, scheduleDetailLocalDataHelper_1.getAccountsTypesForScheduleDetails)(scheduleType);
38
+ const newScheduleAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, newScheduleAccountTypes);
39
+ const allAccountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, accountType.accountListKey);
40
+ const filteredAccounts = allAccountList.accounts.filter((account) => newScheduleAccountIds.includes(account.accountId));
41
+ const accountListNestedAccountHierarchy = (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), filteredAccounts.map((account) => account.accountId));
42
+ const allClassList = (0, classListSelector_1.getClassList)(classState, classListState);
43
+ const classListNestedAccountHierarchy = (0, classListSelector_1.getNestedClassListHierarchy)(classListState);
44
+ let allDepreciationAccountList;
45
+ let allDepreciationAccountListNestedAccountHierarchy;
46
+ if (scheduleType === 'fixed_assets') {
47
+ const depreciationCategoryIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, [
48
+ 'fixed_assets',
49
+ 'other_assets',
50
+ ]);
51
+ const accountLabel = (0, scheduleListHelper_1.getAccountLabelForScheduleType)('fixed_assets');
52
+ const fixedAssetLabelAccountIds = accountLabel != null
53
+ ? (0, accountListSelector_1.getAccountIdsForLabel)(accountListState, accountType.accountListKey, accountLabel)
54
+ : [];
55
+ allDepreciationAccountList = allAccountList.accounts.filter((account) => depreciationCategoryIds.includes(account.accountId) &&
56
+ !fixedAssetLabelAccountIds.includes(account.accountId));
57
+ allDepreciationAccountListNestedAccountHierarchy =
58
+ (0, scheduleDetailSelector_1.filterNestedAccountHierarchyById)((0, accountListSelector_1.getNestedAccountListHierarchy)(accountListState, accountType.accountListKey), allDepreciationAccountList.map((account) => account.accountId));
59
+ }
60
+ return {
61
+ scheduleType,
62
+ accountListNestedAccountHierarchy,
63
+ allAccountList: filteredAccounts,
64
+ allClassList: allClassList.classes,
65
+ allDepreciationAccountList,
66
+ allDepreciationAccountListNestedAccountHierarchy,
67
+ classListNestedAccountHierarchy,
68
+ newScheduleLocalData: newSchedule.newScheduleState[scheduleType],
69
+ saveStatus: newSchedule.saveStatus,
70
+ ...searchTransactionsView,
71
+ fetchState: newSchedule.fetchState,
72
+ error: newSchedule.error,
73
+ };
74
+ };
75
+ exports.getNewScheduleView = getNewScheduleView;
@@ -1,6 +1,7 @@
1
1
  import { JEScheduledTransaction, ScheduledJournalEntry } from '../../../entity/jeSchedules/jeSchedulesSelector';
2
2
  import { RootState } from '../../../reducer';
3
3
  import { ExpenseAutomationJESchedulesViewSelector } from '../selectorTypes/jeSchedulesSelectorTypes';
4
+ export declare const isAiAccountantSchedule: (schedule: JEScheduledTransaction | JEScheduledTransactionWithFailedEntries) => boolean;
4
5
  export declare function getExpenseAutomationJESchedulesView(state: RootState): ExpenseAutomationJESchedulesViewSelector;
5
6
  export interface JEScheduledTransactionWithFailedEntries extends Omit<JEScheduledTransaction, 'scheduledJournalEntry'> {
6
7
  scheduledJournalEntry: ScheduledJournalEntry;