@zeniai/client-epic-state 5.2.34 → 5.2.35-beta10MM

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 (115) hide show
  1. package/lib/entity/actualMatching/actualMatchingPayload.d.ts +31 -0
  2. package/lib/entity/actualMatching/actualMatchingPayload.js +50 -0
  3. package/lib/entity/actualMatching/actualMatchingReducer.d.ts +9 -0
  4. package/lib/entity/actualMatching/actualMatchingReducer.js +33 -0
  5. package/lib/entity/actualMatching/actualMatchingSelector.d.ts +3 -0
  6. package/lib/entity/actualMatching/actualMatchingSelector.js +6 -0
  7. package/lib/entity/actualMatching/actualMatchingState.d.ts +23 -0
  8. package/lib/entity/actualMatching/actualMatchingState.js +2 -0
  9. package/lib/entity/actualMatching/actualMatchingTypes.d.ts +1 -0
  10. package/lib/entity/actualMatching/actualMatchingTypes.js +2 -0
  11. package/lib/entity/aiCfo/aiCfoReducer.js +78 -4
  12. package/lib/entity/aiCfo/aiCfoState.d.ts +16 -0
  13. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +31 -0
  14. package/lib/entity/jeSchedules/jeSchedulesPayload.js +53 -0
  15. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +33 -0
  16. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  17. package/lib/entity/snackbar/snackbarTypes.js +2 -0
  18. package/lib/epic.d.ts +8 -1
  19. package/lib/epic.js +14 -0
  20. package/lib/esm/entity/actualMatching/actualMatchingPayload.js +46 -0
  21. package/lib/esm/entity/actualMatching/actualMatchingReducer.js +30 -0
  22. package/lib/esm/entity/actualMatching/actualMatchingSelector.js +3 -0
  23. package/lib/esm/entity/actualMatching/actualMatchingState.js +1 -0
  24. package/lib/esm/entity/actualMatching/actualMatchingTypes.js +1 -0
  25. package/lib/esm/entity/aiCfo/aiCfoReducer.js +79 -5
  26. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +53 -0
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
  28. package/lib/esm/epic.js +14 -0
  29. package/lib/esm/index.js +7 -3
  30. package/lib/esm/reducer.js +6 -0
  31. package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +44 -0
  32. package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +36 -0
  33. package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +7 -0
  34. package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +107 -0
  35. package/lib/esm/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +16 -0
  36. package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +54 -0
  37. package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +74 -0
  38. package/lib/esm/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +76 -0
  39. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
  40. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
  41. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +35 -15
  42. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
  43. package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
  44. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
  45. package/lib/esm/view/expenseAutomationView/expenseAutomationViewState.js +4 -2
  46. package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +68 -0
  47. package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +434 -0
  48. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
  49. package/lib/esm/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +1 -0
  50. package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +426 -0
  51. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
  52. package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +35 -0
  53. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
  54. package/lib/esm/view/financeStatement/financeStatementReducer.js +17 -27
  55. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
  56. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +3 -3
  57. package/lib/index.d.ts +15 -6
  58. package/lib/index.js +82 -48
  59. package/lib/reducer.d.ts +2 -0
  60. package/lib/reducer.js +6 -0
  61. package/lib/rootStateTypes.d.ts +4 -0
  62. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.d.ts +9 -0
  63. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +48 -0
  64. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.d.ts +12 -0
  65. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +40 -0
  66. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.d.ts +5 -0
  67. package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +11 -0
  68. package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.d.ts +9 -0
  69. package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +111 -0
  70. package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.d.ts +3 -0
  71. package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +19 -0
  72. package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.d.ts +9 -0
  73. package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +58 -0
  74. package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.d.ts +8 -0
  75. package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +78 -0
  76. package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.d.ts +9 -0
  77. package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +80 -0
  78. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
  79. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -1
  80. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
  81. package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +5 -1
  82. package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +34 -14
  83. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
  84. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -1
  85. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
  86. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
  87. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -1
  88. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +6 -3
  89. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  90. package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +85 -0
  91. package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +74 -0
  92. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +79 -0
  93. package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +438 -0
  94. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +6 -5
  95. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
  96. package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +87 -0
  97. package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +2 -0
  98. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +11 -0
  99. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +38 -0
  100. package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +445 -0
  101. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
  102. package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +105 -0
  103. package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +42 -0
  104. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
  105. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
  106. package/lib/view/financeStatement/financeStatementReducer.js +17 -27
  107. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.d.ts +1 -11
  108. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
  109. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +1 -2
  110. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +1 -2
  111. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +15 -1
  112. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
  113. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +1 -1
  114. package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
  115. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toServiceMonthFromPeriod = toServiceMonthFromPeriod;
4
+ exports.toActualMatchingTransactionSearchResult = toActualMatchingTransactionSearchResult;
5
+ exports.toMatchAndReverseResult = toMatchAndReverseResult;
6
+ exports.toUndoReversalResult = toUndoReversalResult;
7
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
8
+ const actualMatchingViewState_1 = require("../types/actualMatchingViewState");
9
+ function toServiceMonthFromPeriod(period) {
10
+ return (0, timePeriod_1.toString)(period.start).slice(0, 7);
11
+ }
12
+ function resolveMatchSearchAmount(payload) {
13
+ const raw = payload.total_amount ?? payload.amount;
14
+ if (typeof raw === 'number' && Number.isFinite(raw)) {
15
+ return raw;
16
+ }
17
+ if (typeof raw === 'string' && raw !== '') {
18
+ const parsed = Number(raw);
19
+ if (Number.isFinite(parsed)) {
20
+ return parsed;
21
+ }
22
+ }
23
+ return 0;
24
+ }
25
+ function resolveMatchSearchCurrencySymbol(payload, currencyCode, fallbackCurrency) {
26
+ if (payload.currency_symbol != null && payload.currency_symbol !== '') {
27
+ return payload.currency_symbol;
28
+ }
29
+ if (fallbackCurrency != null &&
30
+ currencyCode === fallbackCurrency.currencyCode) {
31
+ return fallbackCurrency.currencySymbol;
32
+ }
33
+ return currencyCode;
34
+ }
35
+ function toActualMatchingTransactionSearchResult(payload, fallbackCurrency) {
36
+ const currencyCode = payload.currency_code != null && payload.currency_code !== ''
37
+ ? payload.currency_code
38
+ : fallbackCurrency?.currencyCode ?? '';
39
+ return {
40
+ transactionId: payload.transaction_id,
41
+ transactionIntegrationId: payload.transaction_integration_id,
42
+ transactionType: (payload.transaction_type || '').toLowerCase(),
43
+ lineId: payload.line_id,
44
+ vendorId: payload.vendor_id ?? undefined,
45
+ vendorName: payload.vendor_name ?? '',
46
+ amount: resolveMatchSearchAmount(payload),
47
+ transactionDate: payload.transaction_date,
48
+ accountId: payload.account_id ?? undefined,
49
+ accountName: payload.account_name ?? undefined,
50
+ accountDescription: payload.account_description ?? undefined,
51
+ accountingClassId: payload.accounting_class_id ?? undefined,
52
+ accountingClassName: payload.accounting_class_name ?? undefined,
53
+ currencyCode,
54
+ currencySymbol: resolveMatchSearchCurrencySymbol(payload, currencyCode, fallbackCurrency),
55
+ transactionMemo: payload.transaction_memo ?? undefined,
56
+ transactionDescription: payload.transaction_description ?? undefined,
57
+ transactionTypeName: payload.transaction_type_name ?? undefined,
58
+ syncToken: payload.sync_token == null ? '' : String(payload.sync_token),
59
+ };
60
+ }
61
+ function toMatchAndReverseResult(payload) {
62
+ return {
63
+ accrualId: payload.accrual_id,
64
+ status: (0, actualMatchingViewState_1.toMatchAndReverseResultStatus)(payload.status),
65
+ reason: payload.reason ?? undefined,
66
+ };
67
+ }
68
+ function toUndoReversalResult(payload) {
69
+ return {
70
+ accrualId: payload.accrual_id,
71
+ status: (0, actualMatchingViewState_1.toUndoReversalResultStatus)(payload.status),
72
+ reason: payload.reason ?? undefined,
73
+ };
74
+ }
@@ -0,0 +1,79 @@
1
+ import { MonthYearPeriod, TimePeriod } from '../../../commonStateTypes/timePeriod';
2
+ import { ActualMatchingMatchId } from '../../../entity/actualMatching/actualMatchingTypes';
3
+ import { JEOneTimeAccrualPayload } from '../../../entity/jeSchedules/jeSchedulesPayload';
4
+ import { ZeniAPIStatus } from '../../../responsePayload';
5
+ import { ActualMatchingAccrualSearchState, ActualMatchingMatchModalState, ActualMatchingTransactionSearchResult, ActualMatchingTransactionSearchState, ActualMatchingViewState, ActualMatchingViewUIState, MatchAndReverseResult, UndoReversalResult } from '../types/actualMatchingViewState';
6
+ export declare const initialTransactionSearchState: ActualMatchingTransactionSearchState;
7
+ export declare const initialAccrualSearchState: ActualMatchingAccrualSearchState;
8
+ export declare const initialMatchModalState: ActualMatchingMatchModalState;
9
+ export declare const initialState: ActualMatchingViewState;
10
+ export declare const ackCloseMatchAfterUndo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/ackCloseMatchAfterUndo">, clearActualMatchingView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearActualMatchingView">, clearMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/clearMatchNewModal">, closeMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationActualMatchingView/closeMatchNewModal">, fetchActualMatching: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
11
+ period: TimePeriod;
12
+ refreshViewInBackground: any;
13
+ }, "expenseAutomationActualMatchingView/fetchActualMatching", never, never>, fetchActualMatchingFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
14
+ refreshViewInBackground: boolean;
15
+ selectedPeriod: MonthYearPeriod;
16
+ status: ZeniAPIStatus;
17
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingFailure">, fetchActualMatchingMatch: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matchId: string, refreshViewInBackground?: any], {
18
+ matchId: string;
19
+ refreshViewInBackground: any;
20
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingMatch", never, never>, fetchActualMatchingMatchFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
+ matchId: ActualMatchingMatchId;
22
+ refreshViewInBackground: boolean;
23
+ status: ZeniAPIStatus;
24
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingMatchFailure">, fetchActualMatchingMatchSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
+ matchId: ActualMatchingMatchId;
26
+ refreshViewInBackground: boolean;
27
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingMatchSuccess">, fetchActualMatchingPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
28
+ period: TimePeriod;
29
+ refreshViewInBackground: any;
30
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingPage", never, never>, fetchActualMatchingSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
31
+ matchIds: ActualMatchingMatchId[];
32
+ refreshViewInBackground: boolean;
33
+ selectedPeriod: MonthYearPeriod;
34
+ }, "expenseAutomationActualMatchingView/fetchActualMatchingSuccess">, matchAndReverseAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string, transactionIntegrationId: string, transactionType: string, lineIds: string[], transactionSyncToken: string, accrualIds: string[]], {
35
+ transactionId: string;
36
+ transactionIntegrationId: string;
37
+ transactionType: string;
38
+ lineIds: string[];
39
+ transactionSyncToken: string;
40
+ accrualIds: string[];
41
+ }, "expenseAutomationActualMatchingView/matchAndReverseAccruals", never, never>, matchAndReverseAccrualsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
42
+ status: ZeniAPIStatus;
43
+ }, "expenseAutomationActualMatchingView/matchAndReverseAccrualsFailure">, matchAndReverseAccrualsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
+ results: MatchAndReverseResult[];
45
+ matchId?: ActualMatchingMatchId;
46
+ }, "expenseAutomationActualMatchingView/matchAndReverseAccrualsSuccess">, openMatchNewModal: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matchId?: string | undefined], {
47
+ matchId: string | undefined;
48
+ }, "expenseAutomationActualMatchingView/openMatchNewModal", never, never>, searchMatchAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string, pageToken?: string | null | undefined], {
49
+ query: string;
50
+ pageToken: string | undefined;
51
+ }, "expenseAutomationActualMatchingView/searchMatchAccruals", never, never>, searchMatchAccrualsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
52
+ error: ZeniAPIStatus;
53
+ }, "expenseAutomationActualMatchingView/searchMatchAccrualsFailure">, searchMatchAccrualsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
54
+ append: boolean;
55
+ nextPageToken: string | null;
56
+ results: JEOneTimeAccrualPayload[];
57
+ }, "expenseAutomationActualMatchingView/searchMatchAccrualsSuccess">, searchMatchTransactions: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[query: string, pageToken?: string | null | undefined, transactionType?: string | undefined, transactionIntegrationId?: string | undefined], {
58
+ query: string;
59
+ pageToken: string | undefined;
60
+ transactionType: string | undefined;
61
+ transactionIntegrationId: string | undefined;
62
+ }, "expenseAutomationActualMatchingView/searchMatchTransactions", never, never>, searchMatchTransactionsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
63
+ error: ZeniAPIStatus;
64
+ }, "expenseAutomationActualMatchingView/searchMatchTransactionsFailure">, searchMatchTransactionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
65
+ append: boolean;
66
+ nextPageToken: string | null;
67
+ results: ActualMatchingTransactionSearchResult[];
68
+ }, "expenseAutomationActualMatchingView/searchMatchTransactionsSuccess">, undoReversalAccruals: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matchId: string, accrualIds: string[]], {
69
+ matchId: string;
70
+ accrualIds: string[];
71
+ }, "expenseAutomationActualMatchingView/undoReversalAccruals", never, never>, undoReversalAccrualsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
72
+ matchId: ActualMatchingMatchId;
73
+ status: ZeniAPIStatus;
74
+ }, "expenseAutomationActualMatchingView/undoReversalAccrualsFailure">, undoReversalAccrualsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matchId: string, results: UndoReversalResult[]], {
75
+ matchId: string;
76
+ results: UndoReversalResult[];
77
+ }, "expenseAutomationActualMatchingView/undoReversalAccrualsSuccess", never, never>, updateActualMatchingUIState: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<ActualMatchingViewUIState>, "expenseAutomationActualMatchingView/updateActualMatchingUIState">;
78
+ declare const _default: import("redux").Reducer<ActualMatchingViewState>;
79
+ export default _default;
@@ -0,0 +1,438 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.updateActualMatchingUIState = exports.undoReversalAccrualsSuccess = exports.undoReversalAccrualsFailure = exports.undoReversalAccruals = exports.searchMatchTransactionsSuccess = exports.searchMatchTransactionsFailure = exports.searchMatchTransactions = exports.searchMatchAccrualsSuccess = exports.searchMatchAccrualsFailure = exports.searchMatchAccruals = exports.openMatchNewModal = exports.matchAndReverseAccrualsSuccess = exports.matchAndReverseAccrualsFailure = exports.matchAndReverseAccruals = exports.fetchActualMatchingSuccess = exports.fetchActualMatchingPage = exports.fetchActualMatchingMatchSuccess = exports.fetchActualMatchingMatchFailure = exports.fetchActualMatchingMatch = exports.fetchActualMatchingFailure = exports.fetchActualMatching = exports.closeMatchNewModal = exports.clearMatchNewModal = exports.clearActualMatchingView = exports.ackCloseMatchAfterUndo = exports.initialState = exports.initialMatchModalState = exports.initialAccrualSearchState = exports.initialTransactionSearchState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
7
+ const jeScheduleHelper_1 = require("../../../entity/jeSchedules/jeScheduleHelper");
8
+ const rootActions_1 = require("../../../rootActions");
9
+ const actualMatchingViewState_1 = require("../types/actualMatchingViewState");
10
+ exports.initialTransactionSearchState = {
11
+ query: '',
12
+ results: [],
13
+ fetchState: 'Not-Started',
14
+ error: undefined,
15
+ nextPageToken: null,
16
+ isLoadingMore: false,
17
+ };
18
+ exports.initialAccrualSearchState = {
19
+ query: '',
20
+ results: [],
21
+ fetchState: 'Not-Started',
22
+ error: undefined,
23
+ nextPageToken: null,
24
+ isLoadingMore: false,
25
+ };
26
+ exports.initialMatchModalState = {
27
+ isOpen: false,
28
+ openedFromMatchId: undefined,
29
+ didPinPrefillTransactions: false,
30
+ pinnedTransactionResults: [],
31
+ transactionSearch: exports.initialTransactionSearchState,
32
+ accrualSearch: exports.initialAccrualSearchState,
33
+ confirmStatus: { fetchState: 'Not-Started', error: undefined },
34
+ };
35
+ exports.initialState = {
36
+ matchIdsByPeriod: {},
37
+ fetchState: 'Not-Started',
38
+ error: undefined,
39
+ refreshStatus: {
40
+ fetchState: 'Not-Started',
41
+ error: undefined,
42
+ },
43
+ detailFetchStateByMatchId: {},
44
+ detailRefreshStatusByMatchId: {},
45
+ uiState: {
46
+ sortKey: 'date',
47
+ sortOrder: 'descending',
48
+ searchString: '',
49
+ scrollPosition: { scrollTop: 0, scrollLeft: undefined },
50
+ },
51
+ matchModal: exports.initialMatchModalState,
52
+ undoReversalStatusByMatchId: {},
53
+ closeMatchAfterUndo: false,
54
+ lastMatchResultsByMatchId: {},
55
+ lastUndoResultsByMatchId: {},
56
+ hasValidState() {
57
+ return this.fetchState == 'Completed';
58
+ },
59
+ };
60
+ function pruneLastMatchResultsForUndone(draft, matchId, results) {
61
+ const undoneIds = new Set(results
62
+ .filter((result) => result.status === 'undone')
63
+ .map((result) => result.accrualId));
64
+ if (undoneIds.size === 0) {
65
+ return;
66
+ }
67
+ const existing = draft.lastMatchResultsByMatchId[matchId];
68
+ if (existing == null) {
69
+ return;
70
+ }
71
+ const kept = existing.filter((result) => !undoneIds.has(result.accrualId));
72
+ if (kept.length === 0) {
73
+ delete draft.lastMatchResultsByMatchId[matchId];
74
+ return;
75
+ }
76
+ draft.lastMatchResultsByMatchId[matchId] = kept;
77
+ }
78
+ function resetMatchModalSearches(draft) {
79
+ draft.matchModal.transactionSearch = exports.initialTransactionSearchState;
80
+ draft.matchModal.accrualSearch = exports.initialAccrualSearchState;
81
+ draft.matchModal.confirmStatus = {
82
+ fetchState: 'Not-Started',
83
+ error: undefined,
84
+ };
85
+ draft.matchModal.lastBatchResults = undefined;
86
+ draft.matchModal.openedFromMatchId = undefined;
87
+ draft.matchModal.didPinPrefillTransactions = false;
88
+ draft.matchModal.pinnedTransactionResults = [];
89
+ }
90
+ const expenseAutomationActualMatchingView = (0, toolkit_1.createSlice)({
91
+ name: 'expenseAutomationActualMatchingView',
92
+ initialState: exports.initialState,
93
+ reducers: {
94
+ fetchActualMatchingPage: {
95
+ prepare(period, refreshViewInBackground = false) {
96
+ return {
97
+ payload: {
98
+ period,
99
+ refreshViewInBackground,
100
+ },
101
+ };
102
+ },
103
+ reducer() {
104
+ // Epic-only fan-out.
105
+ },
106
+ },
107
+ fetchActualMatching: {
108
+ reducer(draft, action) {
109
+ const { refreshViewInBackground } = action.payload;
110
+ if (refreshViewInBackground) {
111
+ draft.refreshStatus = { fetchState: 'In-Progress', error: undefined };
112
+ if (draft.fetchState === 'Not-Started') {
113
+ draft.fetchState = 'In-Progress';
114
+ }
115
+ }
116
+ else {
117
+ draft.fetchState = 'In-Progress';
118
+ draft.error = undefined;
119
+ }
120
+ },
121
+ prepare(period, refreshViewInBackground = false) {
122
+ return {
123
+ payload: {
124
+ period,
125
+ refreshViewInBackground,
126
+ },
127
+ };
128
+ },
129
+ },
130
+ fetchActualMatchingSuccess(draft, action) {
131
+ const { matchIds, selectedPeriod, refreshViewInBackground } = action.payload;
132
+ const periodId = (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod);
133
+ draft.matchIdsByPeriod[periodId] = matchIds;
134
+ if (refreshViewInBackground) {
135
+ draft.refreshStatus = { fetchState: 'Completed', error: undefined };
136
+ if (draft.fetchState !== 'Completed') {
137
+ draft.fetchState = 'Completed';
138
+ draft.error = undefined;
139
+ }
140
+ }
141
+ else {
142
+ draft.fetchState = 'Completed';
143
+ draft.error = undefined;
144
+ }
145
+ },
146
+ fetchActualMatchingFailure(draft, action) {
147
+ const { status, refreshViewInBackground } = action.payload;
148
+ if (refreshViewInBackground) {
149
+ draft.refreshStatus = { fetchState: 'Error', error: status };
150
+ if (draft.fetchState !== 'Completed') {
151
+ draft.fetchState = 'Error';
152
+ draft.error = status;
153
+ }
154
+ }
155
+ else {
156
+ draft.fetchState = 'Error';
157
+ draft.error = status;
158
+ }
159
+ },
160
+ fetchActualMatchingMatch: {
161
+ prepare(matchId, refreshViewInBackground = false) {
162
+ return { payload: { matchId, refreshViewInBackground } };
163
+ },
164
+ reducer(draft, action) {
165
+ const { matchId, refreshViewInBackground } = action.payload;
166
+ if (refreshViewInBackground) {
167
+ draft.detailRefreshStatusByMatchId[matchId] = {
168
+ fetchState: 'In-Progress',
169
+ error: undefined,
170
+ };
171
+ }
172
+ else {
173
+ draft.detailFetchStateByMatchId[matchId] = {
174
+ fetchState: 'In-Progress',
175
+ error: undefined,
176
+ };
177
+ }
178
+ },
179
+ },
180
+ fetchActualMatchingMatchSuccess(draft, action) {
181
+ const { matchId, refreshViewInBackground } = action.payload;
182
+ if (refreshViewInBackground) {
183
+ draft.detailRefreshStatusByMatchId[matchId] = {
184
+ fetchState: 'Completed',
185
+ error: undefined,
186
+ };
187
+ }
188
+ else {
189
+ draft.detailFetchStateByMatchId[matchId] = {
190
+ fetchState: 'Completed',
191
+ error: undefined,
192
+ };
193
+ }
194
+ },
195
+ fetchActualMatchingMatchFailure(draft, action) {
196
+ const { matchId, refreshViewInBackground, status } = action.payload;
197
+ if (refreshViewInBackground) {
198
+ draft.detailRefreshStatusByMatchId[matchId] = {
199
+ fetchState: 'Error',
200
+ error: status,
201
+ };
202
+ }
203
+ else {
204
+ draft.detailFetchStateByMatchId[matchId] = {
205
+ fetchState: 'Error',
206
+ error: status,
207
+ };
208
+ }
209
+ },
210
+ updateActualMatchingUIState(draft, action) {
211
+ if (action.payload.sortKey != null) {
212
+ draft.uiState.sortKey = action.payload.sortKey;
213
+ }
214
+ if (action.payload.sortOrder != null) {
215
+ draft.uiState.sortOrder = action.payload.sortOrder;
216
+ }
217
+ if (action.payload.searchString != null) {
218
+ draft.uiState.searchString = action.payload.searchString;
219
+ }
220
+ if (action.payload.scrollPosition != null) {
221
+ draft.uiState.scrollPosition = action.payload.scrollPosition;
222
+ }
223
+ },
224
+ openMatchNewModal: {
225
+ prepare(matchId) {
226
+ return { payload: { matchId } };
227
+ },
228
+ reducer(draft, action) {
229
+ resetMatchModalSearches(draft);
230
+ draft.matchModal.isOpen = true;
231
+ const matchId = action.payload.matchId;
232
+ draft.matchModal.openedFromMatchId =
233
+ matchId != null && matchId !== '' ? matchId : undefined;
234
+ if (draft.matchModal.openedFromMatchId != null) {
235
+ draft.matchModal.accrualSearch.fetchState = 'Completed';
236
+ }
237
+ },
238
+ },
239
+ // Dismiss (Cancel / overlay). Store reset matches `clearMatchNewModal`;
240
+ // the actions stay distinct so confirm-success vs user-dismiss stay observable.
241
+ closeMatchNewModal(draft) {
242
+ draft.matchModal.isOpen = false;
243
+ resetMatchModalSearches(draft);
244
+ },
245
+ // Confirm-success / host reset. Same slice write as close; different action type.
246
+ clearMatchNewModal(draft) {
247
+ draft.matchModal.isOpen = false;
248
+ resetMatchModalSearches(draft);
249
+ },
250
+ searchMatchTransactions: {
251
+ reducer(draft, action) {
252
+ const { query, pageToken } = action.payload;
253
+ const isLoadMore = pageToken != null;
254
+ draft.matchModal.transactionSearch.query = query;
255
+ if (isLoadMore) {
256
+ draft.matchModal.transactionSearch.isLoadingMore = true;
257
+ }
258
+ else {
259
+ draft.matchModal.transactionSearch.isLoadingMore = false;
260
+ draft.matchModal.transactionSearch.results = [];
261
+ draft.matchModal.transactionSearch.nextPageToken = null;
262
+ draft.matchModal.transactionSearch.fetchState = 'In-Progress';
263
+ draft.matchModal.transactionSearch.error = undefined;
264
+ }
265
+ },
266
+ prepare(query, pageToken, transactionType, transactionIntegrationId) {
267
+ return {
268
+ payload: {
269
+ query,
270
+ pageToken: pageToken ?? undefined,
271
+ transactionType,
272
+ transactionIntegrationId,
273
+ },
274
+ };
275
+ },
276
+ },
277
+ searchMatchTransactionsSuccess(draft, action) {
278
+ const { append, nextPageToken, results } = action.payload;
279
+ if (append) {
280
+ const merged = [
281
+ ...draft.matchModal.transactionSearch.results,
282
+ ...results,
283
+ ];
284
+ const byKey = new Map(merged.map((result) => [
285
+ (0, actualMatchingViewState_1.actualMatchingTransactionLineKey)(result.transactionType, result.transactionIntegrationId, result.lineId),
286
+ result,
287
+ ]));
288
+ draft.matchModal.transactionSearch.results = Array.from(byKey.values());
289
+ }
290
+ else {
291
+ draft.matchModal.transactionSearch.results = results;
292
+ if (draft.matchModal.openedFromMatchId != null &&
293
+ !draft.matchModal.didPinPrefillTransactions) {
294
+ draft.matchModal.didPinPrefillTransactions = true;
295
+ draft.matchModal.pinnedTransactionResults = results;
296
+ }
297
+ }
298
+ draft.matchModal.transactionSearch.nextPageToken = nextPageToken;
299
+ draft.matchModal.transactionSearch.isLoadingMore = false;
300
+ draft.matchModal.transactionSearch.fetchState = 'Completed';
301
+ draft.matchModal.transactionSearch.error = undefined;
302
+ },
303
+ searchMatchTransactionsFailure(draft, action) {
304
+ draft.matchModal.transactionSearch.isLoadingMore = false;
305
+ draft.matchModal.transactionSearch.fetchState = 'Error';
306
+ draft.matchModal.transactionSearch.error = action.payload.error;
307
+ },
308
+ searchMatchAccruals: {
309
+ reducer(draft, action) {
310
+ const { query, pageToken } = action.payload;
311
+ const isLoadMore = pageToken != null;
312
+ draft.matchModal.accrualSearch.query = query;
313
+ if (isLoadMore) {
314
+ draft.matchModal.accrualSearch.isLoadingMore = true;
315
+ }
316
+ else {
317
+ draft.matchModal.accrualSearch.isLoadingMore = false;
318
+ draft.matchModal.accrualSearch.results = [];
319
+ draft.matchModal.accrualSearch.nextPageToken = null;
320
+ draft.matchModal.accrualSearch.fetchState = 'In-Progress';
321
+ draft.matchModal.accrualSearch.error = undefined;
322
+ }
323
+ },
324
+ prepare(query, pageToken) {
325
+ return { payload: { query, pageToken: pageToken ?? undefined } };
326
+ },
327
+ },
328
+ searchMatchAccrualsSuccess(draft, action) {
329
+ const { append, nextPageToken, results } = action.payload;
330
+ const keys = results.map((accrual) => (0, jeScheduleHelper_1.generateJEOneTimeAccrualKey)(accrual._id));
331
+ if (append) {
332
+ const merged = [...draft.matchModal.accrualSearch.results, ...keys];
333
+ draft.matchModal.accrualSearch.results = Array.from(new Set(merged));
334
+ }
335
+ else {
336
+ draft.matchModal.accrualSearch.results = keys;
337
+ }
338
+ draft.matchModal.accrualSearch.nextPageToken = nextPageToken;
339
+ draft.matchModal.accrualSearch.isLoadingMore = false;
340
+ draft.matchModal.accrualSearch.fetchState = 'Completed';
341
+ draft.matchModal.accrualSearch.error = undefined;
342
+ },
343
+ searchMatchAccrualsFailure(draft, action) {
344
+ draft.matchModal.accrualSearch.isLoadingMore = false;
345
+ draft.matchModal.accrualSearch.fetchState = 'Error';
346
+ draft.matchModal.accrualSearch.error = action.payload.error;
347
+ },
348
+ matchAndReverseAccruals: {
349
+ reducer(draft) {
350
+ draft.matchModal.confirmStatus = {
351
+ fetchState: 'In-Progress',
352
+ error: undefined,
353
+ };
354
+ },
355
+ prepare(transactionId, transactionIntegrationId, transactionType, lineIds, transactionSyncToken, accrualIds) {
356
+ return {
357
+ payload: {
358
+ transactionId,
359
+ transactionIntegrationId,
360
+ transactionType,
361
+ lineIds,
362
+ transactionSyncToken,
363
+ accrualIds,
364
+ },
365
+ };
366
+ },
367
+ },
368
+ matchAndReverseAccrualsSuccess(draft, action) {
369
+ draft.matchModal.confirmStatus = {
370
+ fetchState: 'Completed',
371
+ error: undefined,
372
+ };
373
+ draft.matchModal.lastBatchResults = action.payload.results;
374
+ if (action.payload.matchId != null) {
375
+ draft.lastMatchResultsByMatchId[action.payload.matchId] =
376
+ action.payload.results;
377
+ }
378
+ },
379
+ matchAndReverseAccrualsFailure(draft, action) {
380
+ draft.matchModal.confirmStatus = {
381
+ fetchState: 'Error',
382
+ error: action.payload.status,
383
+ };
384
+ },
385
+ undoReversalAccruals: {
386
+ reducer(draft, action) {
387
+ draft.undoReversalStatusByMatchId[action.payload.matchId] = {
388
+ fetchState: 'In-Progress',
389
+ error: undefined,
390
+ };
391
+ },
392
+ prepare(matchId, accrualIds) {
393
+ return { payload: { matchId, accrualIds } };
394
+ },
395
+ },
396
+ undoReversalAccrualsSuccess: {
397
+ reducer(draft, action) {
398
+ const { matchId, results } = action.payload;
399
+ draft.undoReversalStatusByMatchId[matchId] = {
400
+ fetchState: 'Completed',
401
+ error: undefined,
402
+ };
403
+ const allUndone = results.length > 0 &&
404
+ results.every((result) => result.status === 'undone');
405
+ draft.closeMatchAfterUndo = allUndone;
406
+ pruneLastMatchResultsForUndone(draft, matchId, results);
407
+ if (allUndone) {
408
+ delete draft.lastUndoResultsByMatchId[matchId];
409
+ }
410
+ else {
411
+ draft.lastUndoResultsByMatchId[matchId] = results;
412
+ }
413
+ },
414
+ prepare(matchId, results) {
415
+ return { payload: { matchId, results } };
416
+ },
417
+ },
418
+ ackCloseMatchAfterUndo(draft) {
419
+ draft.closeMatchAfterUndo = false;
420
+ },
421
+ undoReversalAccrualsFailure(draft, action) {
422
+ draft.undoReversalStatusByMatchId[action.payload.matchId] = {
423
+ fetchState: 'Error',
424
+ error: action.payload.status,
425
+ };
426
+ },
427
+ clearActualMatchingView(draft) {
428
+ Object.assign(draft, exports.initialState);
429
+ },
430
+ },
431
+ extraReducers: (builder) => {
432
+ builder.addCase(rootActions_1.clearAll, (draft) => {
433
+ Object.assign(draft, exports.initialState);
434
+ });
435
+ },
436
+ });
437
+ _a = expenseAutomationActualMatchingView.actions, exports.ackCloseMatchAfterUndo = _a.ackCloseMatchAfterUndo, exports.clearActualMatchingView = _a.clearActualMatchingView, exports.clearMatchNewModal = _a.clearMatchNewModal, exports.closeMatchNewModal = _a.closeMatchNewModal, exports.fetchActualMatching = _a.fetchActualMatching, exports.fetchActualMatchingFailure = _a.fetchActualMatchingFailure, exports.fetchActualMatchingMatch = _a.fetchActualMatchingMatch, exports.fetchActualMatchingMatchFailure = _a.fetchActualMatchingMatchFailure, exports.fetchActualMatchingMatchSuccess = _a.fetchActualMatchingMatchSuccess, exports.fetchActualMatchingPage = _a.fetchActualMatchingPage, exports.fetchActualMatchingSuccess = _a.fetchActualMatchingSuccess, exports.matchAndReverseAccruals = _a.matchAndReverseAccruals, exports.matchAndReverseAccrualsFailure = _a.matchAndReverseAccrualsFailure, exports.matchAndReverseAccrualsSuccess = _a.matchAndReverseAccrualsSuccess, exports.openMatchNewModal = _a.openMatchNewModal, exports.searchMatchAccruals = _a.searchMatchAccruals, exports.searchMatchAccrualsFailure = _a.searchMatchAccrualsFailure, exports.searchMatchAccrualsSuccess = _a.searchMatchAccrualsSuccess, exports.searchMatchTransactions = _a.searchMatchTransactions, exports.searchMatchTransactionsFailure = _a.searchMatchTransactionsFailure, exports.searchMatchTransactionsSuccess = _a.searchMatchTransactionsSuccess, exports.undoReversalAccruals = _a.undoReversalAccruals, exports.undoReversalAccrualsFailure = _a.undoReversalAccrualsFailure, exports.undoReversalAccrualsSuccess = _a.undoReversalAccrualsSuccess, exports.updateActualMatchingUIState = _a.updateActualMatchingUIState;
438
+ exports.default = expenseAutomationActualMatchingView.reducer;
@@ -43,17 +43,18 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
43
43
  accrualId: string;
44
44
  reason: "duplicate" | "amount_off" | "wrong_period" | "other_revert" | "not_accrual";
45
45
  note: string | undefined;
46
- }, "expenseAutomationJESchedulesView/revertOneTimeAccrual", never, never>, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any, selectedPageTab?: "schedules" | "existing_schedules" | undefined], {
46
+ }, "expenseAutomationJESchedulesView/revertOneTimeAccrual", never, never>, fetchAccountSettingsListForAccountTypes: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchAccountSettingsListForAccountTypes">, fetchJeSchedules: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any, selectedPageTab?: "schedules" | "actual_matching" | "existing_schedules" | undefined], {
47
47
  period: TimePeriod;
48
48
  refreshViewInBackground: any;
49
- selectedPageTab: "schedules" | "existing_schedules" | undefined;
49
+ selectedPageTab: "schedules" | "actual_matching" | "existing_schedules" | undefined;
50
50
  }, "expenseAutomationJESchedulesView/fetchJeSchedules", never, never>, fetchJeSchedulesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
51
51
  selectedPageTab: JEPageTab;
52
52
  selectedPeriod: MonthYearPeriod;
53
53
  status: ZeniAPIStatus;
54
- }, "expenseAutomationJESchedulesView/fetchJeSchedulesFailure">, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any], {
54
+ }, "expenseAutomationJESchedulesView/fetchJeSchedulesFailure">, fetchJeSchedulesPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[period: TimePeriod, refreshViewInBackground?: any, isAccrualEnabled?: any], {
55
55
  period: TimePeriod;
56
56
  refreshViewInBackground: any;
57
+ isAccrualEnabled: any;
57
58
  }, "expenseAutomationJESchedulesView/fetchJeSchedulesPage", never, never>, fetchJeSchedulesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
58
59
  accruedJeSchedules: JEAccruedScheduledTransactionPayload[];
59
60
  failedJeSchedules: JEScheduledTransactionPayload[];
@@ -141,10 +142,10 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
141
142
  }, "expenseAutomationJESchedulesView/updateJeOneTimeAccrualLocalData">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
142
143
  localData: Partial<JEScheduleLocalData>;
143
144
  scheduledJournalEntryID: ID;
144
- }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${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"], {
145
+ }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${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" | "actual_matching" | "existing_schedules"], {
145
146
  jeScheduleKeys: (`${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${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}`)[];
146
147
  selectedPeriod: MonthYearPeriod;
147
- selectedPageTab: "schedules" | "existing_schedules";
148
+ selectedPageTab: "schedules" | "actual_matching" | "existing_schedules";
148
149
  }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateNewScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
149
150
  localData: Partial<NewScheduleLocalDataFixedAssets>;
150
151
  scheduleType: "fixed_assets" | "prepaid_expenses";
@@ -111,11 +111,12 @@ const expenseAutomationJESchedulesView = (0, toolkit_1.createSlice)({
111
111
  initialState: exports.initialState,
112
112
  reducers: {
113
113
  fetchJeSchedulesPage: {
114
- prepare(period, refreshViewInBackground = false) {
114
+ prepare(period, refreshViewInBackground = false, isAccrualEnabled = false) {
115
115
  return {
116
116
  payload: {
117
117
  period,
118
118
  refreshViewInBackground,
119
+ isAccrualEnabled,
119
120
  },
120
121
  };
121
122
  },