@zeniai/client-epic-state 5.2.14 → 5.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/lib/entity/accountRecon/accountReconReducer.d.ts +2 -1
  2. package/lib/entity/accountRecon/accountReconReducer.js +22 -10
  3. package/lib/entity/accountRecon/accountReconSelector.d.ts +1 -0
  4. package/lib/entity/accountRecon/accountReconSelector.js +1 -0
  5. package/lib/entity/approvalRule/approvalRuleConflict.d.ts +13 -0
  6. package/lib/entity/approvalRule/approvalRuleConflict.js +16 -1
  7. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
  8. package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
  9. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +78 -1
  10. package/lib/entity/jeSchedules/jeSchedulesPayload.js +183 -4
  11. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
  12. package/lib/entity/jeSchedules/jeSchedulesReducer.js +30 -2
  13. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +11 -2
  14. package/lib/entity/jeSchedules/jeSchedulesSelector.js +38 -3
  15. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +123 -1
  16. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +24 -1
  17. package/lib/entity/jeSchedules/jeSchedulesTypes.js +96 -1
  18. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  19. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  20. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
  21. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  22. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
  23. package/lib/epic.d.ts +10 -1
  24. package/lib/epic.js +18 -0
  25. package/lib/esm/entity/accountRecon/accountReconReducer.js +22 -10
  26. package/lib/esm/entity/accountRecon/accountReconSelector.js +1 -0
  27. package/lib/esm/entity/approvalRule/approvalRuleConflict.js +16 -1
  28. package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
  29. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +183 -5
  30. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +30 -2
  31. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +36 -2
  32. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +86 -0
  33. package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
  34. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
  35. package/lib/esm/epic.js +18 -0
  36. package/lib/esm/index.js +16 -10
  37. package/lib/esm/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +2 -2
  38. package/lib/esm/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.js +54 -0
  39. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +1 -1
  40. package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +3 -6
  41. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  42. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
  43. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +41 -5
  44. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +45 -0
  45. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
  46. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +104 -0
  47. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
  48. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +138 -0
  49. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +79 -0
  50. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +180 -0
  51. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +111 -0
  52. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +28 -0
  53. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
  54. package/lib/esm/view/expenseAutomationView/helpers/reconciliationHelpers.js +12 -0
  55. package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
  56. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +319 -29
  57. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +20 -2
  58. package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
  59. package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
  60. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +106 -0
  61. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +327 -22
  62. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -6
  63. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  64. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
  65. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
  66. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +20 -1
  67. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +20 -1
  68. package/lib/index.d.ts +18 -13
  69. package/lib/index.js +92 -47
  70. package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.d.ts +10 -2
  71. package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +1 -1
  72. package/lib/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.d.ts +9 -0
  73. package/lib/view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic.js +58 -0
  74. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +1 -1
  75. package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +3 -6
  76. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +6 -3
  77. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
  78. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +3 -2
  79. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +39 -3
  80. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +21 -0
  81. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +49 -0
  82. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
  83. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +9 -0
  84. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +108 -0
  85. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
  86. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +29 -0
  87. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +9 -0
  88. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +142 -0
  89. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
  90. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +83 -0
  91. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +13 -0
  92. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +187 -0
  93. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +65 -0
  94. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +115 -0
  95. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
  96. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +32 -0
  97. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
  98. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
  99. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +6 -0
  100. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +13 -0
  101. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  102. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +86 -3
  103. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
  104. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +4 -0
  105. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +93 -12
  106. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +321 -29
  107. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
  108. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +6 -1
  109. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +22 -4
  110. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
  111. package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +1 -0
  112. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +42 -0
  113. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
  114. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +41 -7
  115. package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
  116. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +21 -0
  117. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +112 -0
  118. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +34 -0
  119. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +335 -21
  120. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
  121. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +83 -8
  122. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  123. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  124. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  125. package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
  126. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +4 -2
  127. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
  128. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +20 -1
  129. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +3 -0
  130. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +20 -1
  131. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +3 -0
  132. package/package.json +1 -1
@@ -1,10 +1,12 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
2
  import assignWith from 'lodash/assignWith';
3
3
  import { clearAll } from '../../rootActions';
4
- import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
4
+ import { generateJEOneTimeAccrualKey } from './jeScheduleHelper';
5
+ import { getJEScheduleKey, getJEScheduleTransactionDetailKeyPayload, toJEAccruedScheduledTransaction, toJEOneTimeAccrual, toJEScheduledTransaction, toScheduledJournalEntryState, } from './jeSchedulesPayload';
5
6
  export const initialState = {
6
7
  schedulesByTransactionKey: {},
7
8
  schedulesByAccruedJEScheduleKey: {},
9
+ oneTimeAccrualsByKey: {},
8
10
  };
9
11
  const jeSchedules = createSlice({
10
12
  name: 'jeSchedules',
@@ -109,15 +111,41 @@ const jeSchedules = createSlice({
109
111
  delete draft.schedulesByAccruedJEScheduleKey[JEScheduleKey];
110
112
  },
111
113
  },
114
+ // Writes directly, unlike updateAccruedJESchedules / updateJESchedules, which are no-op
115
+ // actions whose only job is to trigger the entity fan-out epic that fetches vendors,
116
+ // accounts, classes and users. An accrual denormalizes all of those as names on the document,
117
+ // so there is nothing to fan out to.
118
+ updateJEOneTimeAccruals: {
119
+ prepare(jeOneTimeAccrualsPayload) {
120
+ return {
121
+ payload: {
122
+ jeOneTimeAccrualsPayload,
123
+ },
124
+ };
125
+ },
126
+ reducer(draft, action) {
127
+ action.payload.jeOneTimeAccrualsPayload.forEach((accrualPayload) => {
128
+ const accrual = toJEOneTimeAccrual(accrualPayload);
129
+ draft.oneTimeAccrualsByKey[generateJEOneTimeAccrualKey(accrual.accrualId)] = accrual;
130
+ });
131
+ },
132
+ },
133
+ clearAllJEScheduleTransactions(draft) {
134
+ draft.schedulesByTransactionKey = {};
135
+ },
136
+ clearAllAccruedJESchedules(draft) {
137
+ draft.schedulesByAccruedJEScheduleKey = {};
138
+ },
112
139
  },
113
140
  extraReducers: (builder) => {
114
141
  builder.addCase(clearAll, (draft) => {
115
142
  draft.schedulesByAccruedJEScheduleKey = {};
116
143
  draft.schedulesByTransactionKey = {};
144
+ draft.oneTimeAccrualsByKey = {};
117
145
  });
118
146
  },
119
147
  });
120
- export const { updateJESchedules, updateAccruedJESchedules, updateJEScheduledTransaction, updateAccruedJEScheduledTransaction, updateJESchedulesDetails, updateAccruedJESchedulesDetails, deleteJESchedulesDetails, deleteAccruedJESchedulesDetails, } = jeSchedules.actions;
148
+ export const { updateJESchedules, updateAccruedJESchedules, updateJEScheduledTransaction, updateAccruedJEScheduledTransaction, updateJESchedulesDetails, updateAccruedJESchedulesDetails, deleteJESchedulesDetails, deleteAccruedJESchedulesDetails, clearAllAccruedJESchedules, clearAllJEScheduleTransactions, updateJEOneTimeAccruals, } = jeSchedules.actions;
121
149
  export default jeSchedules.reducer;
122
150
  /**
123
151
  * Helper functions
@@ -5,18 +5,34 @@ import { getClassById } from '../class/classSelector';
5
5
  import { getScheduleTransactionById } from '../transaction/transactionSelector';
6
6
  import { getUserByUserId } from '../user/userSelector';
7
7
  import { getVendorByVendorId } from '../vendor/vendorSelector';
8
+ // Takes the slice, not RootState: an accrual denormalizes its vendor, account and class names, so
9
+ // unlike getJEAccruedScheduleByJEScheduleKey this joins nothing.
10
+ //
11
+ // Spreads the stored entity rather than rebuilding it field by field. That is deliberate — the
12
+ // accrued joiner listed every field explicitly and silently dropped jeScheduleType, which made a
13
+ // whole tab render empty while its reducer test still passed. A spread cannot lose a field.
14
+ export const getJEOneTimeAccrualByKey = (jeOneTimeAccrualKey, jeSchedulesState) => {
15
+ const accrual = recordGet(jeSchedulesState.oneTimeAccrualsByKey, jeOneTimeAccrualKey);
16
+ if (accrual == null) {
17
+ return undefined;
18
+ }
19
+ return { ...accrual, jeOneTimeAccrualKey };
20
+ };
8
21
  export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
9
22
  const { jeSchedulesState, vendorState, accountState, userState, classState } = state;
10
23
  const JEAccruedScheduleState = recordGet(jeSchedulesState.schedulesByAccruedJEScheduleKey, JEScheduleKey);
11
24
  if (JEAccruedScheduleState == null) {
12
25
  return undefined;
13
26
  }
14
- const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, memo, recurringAmount, createTime, otherAttributes, } = JEAccruedScheduleState;
27
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, memo, recurringAmount, createTime, otherAttributes, jeScheduleType, } = JEAccruedScheduleState;
15
28
  const vendorDetails = getVendorByVendorId(vendorState, vendorId);
16
29
  if (vendorDetails == null) {
17
30
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
18
31
  }
19
32
  const userDetails = updatedBy != null ? getUserByUserId(userState, updatedBy) : undefined;
33
+ // Resolved the same way the prepaid / fixed joiner does. Without it every accrued row rendered a
34
+ // hyphen under "Created by", even though the payload carries created_by.
35
+ const createdByUserDetails = createdBy != null ? getUserByUserId(userState, createdBy) : undefined;
20
36
  const accountCredit = jeCredit.accountId != null
21
37
  ? getAccountBase(accountState, jeCredit.accountId, 'account_list')
22
38
  : undefined;
@@ -35,14 +51,19 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
35
51
  reportId: 'class_list',
36
52
  })
37
53
  : undefined;
54
+ const postedCount = scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
55
+ const lifecycleTotal = period ?? scheduledJournalEntry.length;
38
56
  return {
39
57
  jeScheduleId,
40
58
  otherAttributes,
41
59
  vendor: vendorDetails,
42
60
  updatedByUser: userDetails,
61
+ createdByUser: createdByUserDetails,
43
62
  updatedAt,
44
63
  currencyCode,
45
64
  currencySymbol,
65
+ lifecycleTotal,
66
+ postedCount,
46
67
  jeCredit: {
47
68
  accountingClass: classCredit,
48
69
  account: accountCredit,
@@ -60,6 +81,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
60
81
  memo,
61
82
  createTime,
62
83
  recurringAmount,
84
+ jeScheduleType,
63
85
  jeAccruedScheduleKey: JEScheduleKey,
64
86
  balanceAsOfToday: balanceAsOfToday != null
65
87
  ? toAmount(balanceAsOfToday, currencyCode, currencySymbol)
@@ -70,7 +92,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
70
92
  export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
71
93
  const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
72
94
  const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
73
- const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
95
+ const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, createTime, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, recurringAmount, postedCount: postedCountFromServer, } = jeScheduleTransactionState;
74
96
  const vendorDetails = getVendorByVendorId(vendorState, vendorId);
75
97
  if (vendorDetails == null) {
76
98
  throw new Error(`Vendor with ${vendorId} doesn't exist`);
@@ -99,14 +121,24 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
99
121
  reportId: 'class_list',
100
122
  })
101
123
  : undefined;
124
+ // The expense-automation response carries no scheduled journal entries for these rows, so the
125
+ // filter below counts an empty array and every schedule reported 0 posted. Prefer the count the
126
+ // server derives, and keep the filter for callers that do have entries (the detail page, and
127
+ // failed postings, which come with theirs).
128
+ const postedCount = postedCountFromServer ??
129
+ scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
130
+ const lifecycleTotal = period ?? scheduledJournalEntry.length;
102
131
  return {
103
132
  jeScheduleId,
104
133
  jeScheduleType,
134
+ recurringAmount,
105
135
  jeScheduleTransactionKey: jeScheduleTransactionKey,
106
136
  vendor: vendorDetails,
107
137
  updatedByUser: userDetails,
108
138
  updatedAt: updatedAt,
109
139
  period,
140
+ lifecycleTotal,
141
+ postedCount,
110
142
  balanceAsOfToday: balanceAsOfToday != null
111
143
  ? toAmount(balanceAsOfToday, currencyCode, currencySymbol)
112
144
  : undefined,
@@ -129,7 +161,9 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
129
161
  },
130
162
  scheduledJournalEntry,
131
163
  aiSummaries,
164
+ confidenceScore,
132
165
  createdByUser: createdByUserDetails,
166
+ createTime,
133
167
  recommendations,
134
168
  };
135
169
  };
@@ -24,6 +24,92 @@ const SCHEDULE_STATUS_CODE = [
24
24
  'draft',
25
25
  ];
26
26
  export const toScheduleStatusCodeType = (v) => stringToUnion(v, SCHEDULE_STATUS_CODE);
27
+ // One-time accruals come from agent-je's Mongo `accruals` collection, not the JE schedule
28
+ // datastore, so they carry their own status vocabulary rather than SCHEDULE_STATUS_CODE.
29
+ // `posting` and `reversing` are transient claims held while a JE posts.
30
+ /**
31
+ * Mirrors agent-je's own status constants. `reverted` is the terminal state a manual revert writes
32
+ * alongside is_deleted; without it stringToUnion logs an error and passes the raw string through.
33
+ *
34
+ * There is deliberately no `ignored` member -- ignoring an accrual sets the `is_ignored` flag and
35
+ * leaves the status on `draft`.
36
+ */
37
+ const ONE_TIME_ACCRUAL_STATUS_CODE = [
38
+ 'draft',
39
+ 'posting',
40
+ 'posted',
41
+ 'posting_blocked',
42
+ 'reversing',
43
+ 'reversed',
44
+ 'reverted',
45
+ ];
46
+ export const toOneTimeAccrualStatusCodeType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_STATUS_CODE);
47
+ // Who created the accrual. This — not the creator's email — is the authoritative
48
+ // AI-vs-manual signal for the Method column.
49
+ const ONE_TIME_ACCRUAL_ORIGIN = ['agent', 'human'];
50
+ export const toOneTimeAccrualOriginType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_ORIGIN);
51
+ const ONE_TIME_ACCRUAL_AUTOMATION_TIER = ['manual', 'draft', 'auto'];
52
+ export const toOneTimeAccrualAutomationTierType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_AUTOMATION_TIER);
53
+ // How the accrual is allowed to reverse. The two are exclusive: a scheduled row reverses on
54
+ // expectedReversalDate and bills never drive it; an on_bill_match row reverses only when a bill
55
+ // is matched, which is why its lifecycle reads "Reverses on match" rather than showing a date.
56
+ const ONE_TIME_ACCRUAL_REVERSAL_POLICY = [
57
+ 'on_bill_match',
58
+ 'scheduled_date',
59
+ ];
60
+ export const toOneTimeAccrualReversalPolicyType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_REVERSAL_POLICY);
61
+ // What actually caused a reverse. Distinct from a *revert*, which soft-deletes the row and
62
+ // never sets this.
63
+ const ONE_TIME_ACCRUAL_REVERSAL_TRIGGER = [
64
+ 'bill_match',
65
+ 'scheduled_date',
66
+ 'manual_reverse',
67
+ ];
68
+ export const toOneTimeAccrualReversalTriggerType = (v) => stringToUnionStrict(v ?? '', ONE_TIME_ACCRUAL_REVERSAL_TRIGGER);
69
+ // Why a human told the AI Accountant not to accrue this month. The gateway validates against
70
+ // exactly this set, so it is a union rather than a free-text string.
71
+ const ONE_TIME_ACCRUAL_IGNORE_REASON = [
72
+ 'no_activity',
73
+ 'paused',
74
+ 'too_small',
75
+ 'need_invoice',
76
+ 'other_ignore',
77
+ ];
78
+ export const toOneTimeAccrualIgnoreReasonType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_IGNORE_REASON);
79
+ export const ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS = ONE_TIME_ACCRUAL_IGNORE_REASON;
80
+ // Why a recommended prepaid / fixed-asset schedule is being dismissed. A different set from the
81
+ // accrual ignore reasons: the gateway validates each against its own list.
82
+ const JE_SCHEDULE_IGNORE_REASON = [
83
+ 'not_needed',
84
+ 'wrong_account',
85
+ 'duplicate',
86
+ 'already_handled',
87
+ 'other_ignore',
88
+ ];
89
+ export const toJEScheduleIgnoreReasonType = (v) => stringToUnion(v, JE_SCHEDULE_IGNORE_REASON);
90
+ export const ALL_JE_SCHEDULE_IGNORE_REASONS = JE_SCHEDULE_IGNORE_REASON;
91
+ // Why a posted prepaid / fixed-asset schedule is being undone. Note `not_accrual` is accrual-only
92
+ // and rejected here, and `created_by_mistake` is schedule-only.
93
+ const JE_SCHEDULE_REVERT_REASON = [
94
+ 'amount_off',
95
+ 'wrong_period',
96
+ 'duplicate',
97
+ 'created_by_mistake',
98
+ 'other_revert',
99
+ ];
100
+ export const toJEScheduleRevertReasonType = (v) => stringToUnion(v, JE_SCHEDULE_REVERT_REASON);
101
+ export const ALL_JE_SCHEDULE_REVERT_REASONS = JE_SCHEDULE_REVERT_REASON;
102
+ // Why a posted accrual is being undone. A disjoint set from the ignore reasons — the gateway
103
+ // validates each action against its own list and rejects the other's values.
104
+ const ONE_TIME_ACCRUAL_REVERT_REASON = [
105
+ 'amount_off',
106
+ 'wrong_period',
107
+ 'not_accrual',
108
+ 'duplicate',
109
+ 'other_revert',
110
+ ];
111
+ export const toOneTimeAccrualRevertReasonType = (v) => stringToUnion(v, ONE_TIME_ACCRUAL_REVERT_REASON);
112
+ export const ALL_ONE_TIME_ACCRUAL_REVERT_REASONS = ONE_TIME_ACCRUAL_REVERT_REASON;
27
113
  const JOURNAL_ENTRY_ERROR_CODE = [
28
114
  'vendor_deleted',
29
115
  'debit_category_deleted',
@@ -116,6 +116,9 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
116
116
  'save_schedule',
117
117
  'delete_schedule',
118
118
  'ignore_schedule',
119
+ 'revert_schedule',
120
+ 'ignore_accrual',
121
+ 'revert_accrual',
119
122
  'save_task_detail',
120
123
  'fetch_task_detail',
121
124
  'delete_task',
@@ -30,5 +30,7 @@ export const toScheduleTransaction = (payload, currency_code, currency_symbol) =
30
30
  currencySymbol: currency_symbol,
31
31
  },
32
32
  description: payload.transaction_description ?? undefined,
33
+ vendorId: payload.vendor_id ?? undefined,
34
+ vendorName: payload.vendor_name ?? undefined,
33
35
  };
34
36
  };
package/lib/esm/epic.js CHANGED
@@ -172,6 +172,7 @@ import { fetchDashboardLayoutEpic, } from './view/dashboardLayout/fetchDashboard
172
172
  import { updateDashboardLayoutEpic, } from './view/dashboardLayout/updateDashboardLayoutEpic';
173
173
  import { confirmStatementMappingEpic, } from './view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic';
174
174
  import { deleteAccountStatementEpic, } from './view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic';
175
+ import { deleteCombinedStatementEpic, } from './view/expenseAutomationView/epics/accountRecon/deleteCombinedStatementEpic';
175
176
  import { excludeAccountFromReconciliationEpic, } from './view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic';
176
177
  import { fetchReconciliationViewEpic as fetchExpenseAutomationReconciliationsViewEpic, } from './view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic';
177
178
  import { includeAccountInReconciliationEpic, } from './view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic';
@@ -195,9 +196,17 @@ import { initializeAccountSettingsViewEpic, } from './view/expenseAutomationView
195
196
  import { saveAccountSettingsViewEpic, } from './view/expenseAutomationView/epics/jeSchedule/accountSettings/saveAccountSettingsViewEpic';
196
197
  import { fetchJeSchedulesPageEpic as fetchExpenseAutomationJESchedulesPageEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic';
197
198
  import { fetchJeSchedulesEpic as fetchExpenseAutomationJeSchedulesEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic';
199
+ import { fetchOneTimeAccrualEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic';
198
200
  import { ignoreRecommendedJeScheduleEpic as ignoreExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic';
199
201
  import { initializeJeScheduleLocalDataEpic as initializeExpenseAutomationJeScheduleLocalDataEpic, } from './view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic';
202
+ import { createOneTimeAccrualEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic';
203
+ import { initializeNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic';
204
+ import { saveNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic';
205
+ import { searchTransactionsForNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic';
206
+ import { oneTimeAccrualActionsEpic, } from './view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic';
200
207
  import { retryJeScheduleEpic as retryExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic';
208
+ import { revertJeScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic';
209
+ import { switchJESchedulesTabEpic as switchExpenseAutomationJESchedulesTabEpic, } from './view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic';
201
210
  import { bulkUploadMatchResultToastEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic';
202
211
  import { bulkUploadReceiptsEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic';
203
212
  import { confirmBulkUploadMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic';
@@ -783,6 +792,7 @@ const ALL_EPICS = [
783
792
  createNewSchedulesAccruedEpic,
784
793
  createNewSchedulesEpic,
785
794
  createNewTaskGroupEpic,
795
+ createOneTimeAccrualEpic,
786
796
  createPaymentInstrumentEpic,
787
797
  createSessionAndSubmitEpic,
788
798
  createSessionEpic,
@@ -798,6 +808,7 @@ const ALL_EPICS = [
798
808
  deleteBillPayApprovalRuleEpic,
799
809
  deleteCannedResponseEpic,
800
810
  deleteChatSessionEpic,
811
+ deleteCombinedStatementEpic,
801
812
  deleteConnectionEpic,
802
813
  deleteFileEpic,
803
814
  deleteFileListEpic,
@@ -1062,6 +1073,7 @@ const ALL_EPICS = [
1062
1073
  fetchOnboardingCustomerSetupViewEpic,
1063
1074
  fetchOnboardingCustomerViewEpic,
1064
1075
  fetchOnboardingViewEpic,
1076
+ fetchOneTimeAccrualEpic,
1065
1077
  fetchOpExByVendorEpic,
1066
1078
  fetchOpExByVendorReportForTimeframeEpic,
1067
1079
  fetchOpExByVendorReportSummaryEpic,
@@ -1216,6 +1228,7 @@ const ALL_EPICS = [
1216
1228
  initializeInvoicingCustomerAddressEpic,
1217
1229
  initializeInvoicingSubscriptionAddressEpic,
1218
1230
  initializeMyProfileLocalDataEpic,
1231
+ initializeNewScheduleEpic,
1219
1232
  initializeOnboardingCustomerViewUpdateDataEpic,
1220
1233
  initializeRemiSetupApproverViewUpdateDataEpic,
1221
1234
  initializeRemiToLocalStoreEpic,
@@ -1238,6 +1251,7 @@ const ALL_EPICS = [
1238
1251
  markAsCompleteScheduleDetailEpic,
1239
1252
  markTransactionAsNotMiscategorizedEpic,
1240
1253
  notifyMeForFeatureEpic,
1254
+ oneTimeAccrualActionsEpic,
1241
1255
  parallelFetchAccountTransactionListEpic,
1242
1256
  parallelFetchClassTransactionListEpic,
1243
1257
  parallelFetchEntityTransactionListEpic,
@@ -1281,6 +1295,7 @@ const ALL_EPICS = [
1281
1295
  retryExpenseAutomationJEScheduleEpic,
1282
1296
  retryInvoicingQboSyncTaskEpic,
1283
1297
  retryOrRefundBillEpic,
1298
+ revertJeScheduleEpic,
1284
1299
  reviewDraftRemisBulkActionEpic,
1285
1300
  reviewExpenseAutomationFluxAnalysisViewEpic,
1286
1301
  revokeCardInviteEpic,
@@ -1316,6 +1331,7 @@ const ALL_EPICS = [
1316
1331
  saveInvoicingSubscriptionEpic,
1317
1332
  saveMagicLinkBankAccountEpic,
1318
1333
  saveNewAddressEpic,
1334
+ saveNewScheduleEpic,
1319
1335
  saveNotificationPreferencesEpic,
1320
1336
  saveNotificationSettingsEpic,
1321
1337
  saveOAuthConnectionEpic,
@@ -1340,6 +1356,7 @@ const ALL_EPICS = [
1340
1356
  saveVendorsTabVendorEpic,
1341
1357
  scheduleTenantCreditScoreCronEpic,
1342
1358
  searchTransactionsForManualMatchEpic,
1359
+ searchTransactionsForNewScheduleEpic,
1343
1360
  seedAiCardCreationFormDraftEpic,
1344
1361
  seedAiCardPolicyFormDraftEpic,
1345
1362
  sendCompanyMonthEndReportEpic,
@@ -1363,6 +1380,7 @@ const ALL_EPICS = [
1363
1380
  submitInvoicingBrandingFormEpic,
1364
1381
  submitInvoicingQboSettingsEpic,
1365
1382
  submitQuestionEpic,
1383
+ switchExpenseAutomationJESchedulesTabEpic,
1366
1384
  syncInvoicingSubscriptionCouponsEpic,
1367
1385
  syncTabsAfterAutomatchEpic,
1368
1386
  toggleReportUIOptionForecastModeEpic,
package/lib/esm/index.js CHANGED
@@ -60,7 +60,7 @@ import { getForecast } from './entity/forecast/forecastSelector';
60
60
  import { toEntityType, } from './entity/genericEntity/entity';
61
61
  import { updateEntities } from './entity/genericEntity/entityReducer';
62
62
  import { getEntityByEntityIDs } from './entity/genericEntity/entitySelector';
63
- import { ALL_SCHEDULES_TYPES, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict, } from './entity/jeSchedules/jeSchedulesTypes';
63
+ import { ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS, ALL_ONE_TIME_ACCRUAL_REVERT_REASONS, ALL_SCHEDULES_TYPES, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict, } from './entity/jeSchedules/jeSchedulesTypes';
64
64
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
65
65
  import { updateCommentsNotifications, updateCommentsNotificationsStatuses, } from './entity/notification/notificationReducer';
66
66
  import { toNotificationModeStrict, } from './entity/notification/types/notificationTypes';
@@ -83,7 +83,7 @@ import { isTransferTransaction, } from './entity/transaction/stateTypes/otherTra
83
83
  import { toPlatformLineDetailType, } from './entity/transaction/stateTypes/transactionLine';
84
84
  import { toTransactionCategory, toTransactionType, toTransactionTypeStrict, } from './entity/transaction/stateTypes/transactionType';
85
85
  import { isVendorTransaction, isVendorTransactionWithCustomer, } from './entity/transaction/stateTypes/vendorTransaction';
86
- import { getSupportedTransactionById } from './entity/transaction/transactionSelector';
86
+ import { getScheduleTransactionById, getSupportedTransactionById, } from './entity/transaction/transactionSelector';
87
87
  import { getUserRoleByUserId, getUserRoleByUserIds, } from './entity/userRole/userRoleSelector';
88
88
  import { hasBillPayAccessible, hasBillPayFallbackAdminLevelAccess, hasChargeCardAccessible, hasReimbursementAccessible, hasReimbursementUserAccess, hasRemiFallbackAdminLevelAccess, hasTreasuryAccessible, hasZeniAccountsAccessible, isZeniSignedInUser, } from './entity/userRole/userRoleTenantAccess';
89
89
  import { getUserRoleMap, hasAICFOAccess, hasAdminLevelAccess, hasAnyCompanyRole, hasAnyFinOpRole, hasBillPayAccess, hasBillPayAdminLevelAccess, hasBookKeepingAdminLevelAccess, hasBookKeepingUserLevelAccess, hasChargeCardAccess, hasChargeCardAdminLevelAccess, hasEmployeeLevelAccess, hasFullOrAdminLevelAccess, hasInvestorBankerLevelAccess, hasInvoicingAdminLevelAccess, hasOnlyBillPayAccess, hasOnlyChargeCardAccess, hasOnlyReimbursementAccess, hasOnlyZeniAccountsAccess, hasReimbursementAccess, hasReimbursementAdminLevelAccess, hasSpendManagementAccess, hasSpendManagementAdminLevelAccess, hasSuperAdminLevelAccess, hasTreasuryAccess, hasTreasuryAdminLevelAccess, hasZeniAccountsAccess, hasZeniAccountsAdminLevelAccess, hasZeniRoleOrCompanyOfficerAccess, isFinOpsUserRoleType, isNonZeniRole, toUserRoleType, toUserRoleTypeStrict, } from './entity/userRole/userRoleType';
@@ -181,20 +181,22 @@ import uploadAccountStatementIntoDocumentAI from './view/expenseAutomationView/e
181
181
  import { fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedPeriod, updateCurrentSelectedView, } from './view/expenseAutomationView/expenseAutomationViewReducer';
182
182
  import { getExpenseAutomationView } from './view/expenseAutomationView/expenseAutomationViewSelector';
183
183
  import { toExpenseAutomationViewType, } from './view/expenseAutomationView/expenseAutomationViewState';
184
+ import { computeNewScheduleJeDetails } from './view/expenseAutomationView/helpers/newScheduleLocalDataHelper';
184
185
  import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardCreditType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, } from './view/expenseAutomationView/helpers/reconciliationHelpers';
185
186
  import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
186
187
  import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
187
- import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
188
+ import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearSearchTransactionsForNewSchedule as clearJeSearchTransactionsForNewSchedule, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, fetchOneTimeAccrual, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, ignoreOneTimeAccrual, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeNewSchedule as initializeJeNewSchedule, initializeJeScheduleLocalData, promoteOneTimeAccrual, removeJeScheduleTransactionKey, resetNewScheduleLocalData as resetJeNewScheduleLocalData, retryJeSchedule as retryExpenseAutomationJESchedule, revertJeSchedule, revertOneTimeAccrual, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, saveNewSchedule as saveJeNewSchedule, saveNewScheduleFailure as saveJeNewScheduleFailure, saveNewScheduleSuccess as saveJeNewScheduleSuccess, searchTransactionsForNewSchedule as searchJeTransactionsForNewSchedule, searchTransactionsForNewScheduleFailure as searchJeTransactionsForNewScheduleFailure, searchTransactionsForNewScheduleSuccess as searchJeTransactionsForNewScheduleSuccess, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJESchedulesUIState as updateExpenseAutomationJESchedulesUIState, updateJEScheduleTypeFilter, updateNewScheduleLocalData as updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
188
189
  import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearBulkUploadBatchDetailsForScopeChange, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markBatchDetailRefreshAttempted, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, refreshBatchDetailsForBatchId, requestMissingReceiptsTabNavigation, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
189
- import { clearStatementDateConflict, confirmStatementMapping, deleteAccountStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, parseCombinedStatement, parseStatement, parseStatementFailure, parseStatementSuccess, reparseStatement, reparseStatementFailure, reparseStatementSuccess, resetReparseStatementStatus, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, setStatementProcessingDismissedToBackground, submitCombinedStatementUpdate, submitStatementUpdate, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateParsedStatementData, updateStatementProcessingBackgroundCompletedSteps, updateStatementProcessingFailed, updateStatementUpdateLocalData, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
190
+ import { clearStatementDateConflict, confirmStatementMapping, deleteAccountStatement, deleteCombinedStatement, excludeAccountFromReconciliation, fetchReconciliation as fetchReconciliationView, includeAccountInReconciliation, parseCombinedStatement, parseStatement, parseStatementFailure, parseStatementSuccess, reparseStatement, reparseStatementFailure, reparseStatementSuccess, resetReparseStatementStatus, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, setStatementProcessingDismissedToBackground, submitCombinedStatementUpdate, submitStatementUpdate, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateNodeCollapseState, updateParsedStatementData, updateStatementProcessingBackgroundCompletedSteps, updateStatementProcessingFailed, updateStatementUpdateLocalData, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
190
191
  import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markCategoryClassRecommendationsFailureForCategorization, markTransactionAsNotMiscategorized, removeTransactionFromAllTabs, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationCompletedSubTab, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, updateTransactionFilters, updateTransactionGroup, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
191
192
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
193
+ import { getNewAccrualAccountsView as getJeNewAccrualAccountsView, getNewScheduleSearchTransactionsView as getJeNewScheduleSearchTransactionsView, getNewScheduleView as getJeNewScheduleView, } from './view/expenseAutomationView/selectors/jeNewScheduleViewSelector';
192
194
  import { getExpenseAutomationReconciliationView, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
193
195
  import { getExpenseAutomationTransactionView, getLastTransferEntryReplacement, } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
194
196
  import { applyTransactionFilters } from './view/expenseAutomationView/transactionFilterHelpers';
195
197
  import { TRANSACTION_FILTER_CATEGORIES, } from './view/expenseAutomationView/transactionFilterTypes';
196
198
  import { DEFAULT_COMPLETED_SUB_TAB, toCompletedSubTab, } from './view/expenseAutomationView/types/completedSubTab';
197
- import { toJEScheduleMainTab as toExpenseAutomationJEScheduleMainTab, toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
199
+ import { toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, toJEPageTab, } from './view/expenseAutomationView/types/jeSchedulesViewState';
198
200
  import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
199
201
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
200
202
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
@@ -483,9 +485,10 @@ export { stringToUnion, stringToUnionStrict };
483
485
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
484
486
  export {
485
487
  // Bulk Upload Types
486
- BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleMainTab, toExpenseAutomationJEScheduleSortKey, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts,
488
+ BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, toExpenseAutomationJEScheduleSortKey, toJEPageTab, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts,
487
489
  // Bulk Upload Actions
488
- bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, clearBulkUploadBatchDetailsForScopeChange, markBatchDetailRefreshAttempted, refreshBatchDetailsForBatchId, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, getLastTransferEntryReplacement, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, parseCombinedStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, updateStatementUploadChosen, submitCombinedStatementUpdate, submitStatementUpdate, clearStatementDateConflict, confirmStatementMapping, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, };
490
+ bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, restoreBulkUploadAutomatchingOnMount, restoreBulkUploadMatchingState, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, clearBulkUploadBatchDetailsForScopeChange, markBatchDetailRefreshAttempted, refreshBatchDetailsForBatchId, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, setBulkUploadUploadedFileCount, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, getLastTransferEntryReplacement, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, excludeAccountFromReconciliation, includeAccountInReconciliation, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, getLedgerAccountIdsWithStatementOverrideWarning, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, updateStatementProcessingFailed, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, deleteCombinedStatement, uploadAccountStatement, parseCombinedStatement, parseStatement, parseStatementSuccess, parseStatementFailure, reparseStatement, reparseStatementSuccess, reparseStatementFailure, resetReparseStatementStatus, updateParsedStatementData, updateNodeCollapseState, updateStatementUploadChosen, submitCombinedStatementUpdate, submitStatementUpdate, clearStatementDateConflict, confirmStatementMapping, updateStatementUpdateLocalData, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, setStatementProcessingDismissedToBackground, updateStatementProcessingBackgroundCompletedSteps, };
491
+ export { computeNewScheduleJeDetails, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchOneTimeAccrual, getJeNewAccrualAccountsView, ignoreOneTimeAccrual, promoteOneTimeAccrual, revertJeSchedule, revertOneTimeAccrual, getJeNewScheduleSearchTransactionsView, getJeNewScheduleView, };
489
492
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateTransactionFilters, updateSelectedCheckboxTransactionIds, markCategoryClassRecommendationsFailureForCategorization, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, createTransferEntry, createTransferEntryFailure, createTransferEntryReplacedTransaction, createTransferEntrySuccess, resetCreateTransferEntryStatus, clearTransferEntryRouteReplacement, fetchAccountsForTransferFlow, removeTransactionFromAllTabs, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
490
493
  export { TOP_EX_TIME_PERIODS };
491
494
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
@@ -541,7 +544,7 @@ export { toTransactionType, toTransactionTypeStrict, toTransactionCategory, };
541
544
  export { defaultVendorCurrency, updateVendors };
542
545
  export { isVendorTransaction, isVendorTransactionWithCustomer, };
543
546
  export { isTransferTransaction };
544
- export { getSupportedTransactionById, };
547
+ export { getScheduleTransactionById, getSupportedTransactionById, };
545
548
  export { updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, parallelFetchProjectTransactionList, updateTransactionListByProjectUIState, updateTransactionListByProject, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
546
549
  export { getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
547
550
  export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData, markCategoryClassRecommendationsFailureForTransactionDetail, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetSelectedCustomer, resetVendor, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, addSplitLine, deleteSplitLine, toggleSplitEditMode, };
@@ -652,9 +655,9 @@ export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPushe
652
655
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
653
656
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
654
657
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
655
- export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
658
+ export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearJeSearchTransactionsForNewSchedule, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeNewSchedule, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, resetJeNewScheduleLocalData, retryExpenseAutomationJESchedule, saveJeNewSchedule, saveJeNewScheduleFailure, saveJeNewScheduleSuccess, searchJeTransactionsForNewSchedule, searchJeTransactionsForNewScheduleFailure, searchJeTransactionsForNewScheduleSuccess, updateExpenseAutomationJESchedulesUIState, updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
656
659
  export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
657
- export { getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
660
+ export { getJEScheduleTransactionKey, ALL_JE_SCHEDULE_IGNORE_REASONS, ALL_JE_SCHEDULE_REVERT_REASONS, ALL_ONE_TIME_ACCRUAL_IGNORE_REASONS, ALL_ONE_TIME_ACCRUAL_REVERT_REASONS, ALL_SCHEDULES_TYPES, getScheduleListReport, getAccruedScheduleListReport, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, toScheduleSubTabType, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, updatedSelectedJELinkRowIndex, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, resetJELinkInLocalData, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, getVendorTabView, };
658
661
  export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
659
662
  export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, };
660
663
  export { approveVendorGlobalReview, rejectVendorGlobalReview, fetchVendorGlobalReviewView, updateSelectedGlobalMerchant, updateVendorGlobalReviewViewUIState, getVendorGlobalReviewView, getTenantMerchantByMerchantId, toVendorGlobalReviewColumnSortKeyType, updateVendorGlobalReviewViewLocalData, };
@@ -863,3 +866,6 @@ export { INVOICING_QBO_CUSTOMER_MATCHING_MODES, getInvoicingQboAccountMappingId,
863
866
  export { acceptInvoicingTerms, enableInvoicing, fetchInvoicingConfig, resetInvoicingConfigActionStates, updateInvoicingConfig, } from './view/invoicing/invoicingConfigView/invoicingConfigViewReducer';
864
867
  export { getInvoicingConfigView } from './view/invoicing/invoicingConfigView/invoicingConfigViewSelector';
865
868
  export { getInvoicingOnboardingGateView } from './view/invoicing/invoicingConfigView/invoicingConfigViewSelector';
869
+ // Accrued JE schedules are not a discriminated union member, so consumers need this guard to
870
+ // narrow a JEScheduleRow before reading baseTransaction / recurringAmount.
871
+ export { getExpenseAutomationJEOneTimeAccrualDetailView, getJEScheduleRowType, isAccruedScheduleRow, isAiAccountantSchedule, isExistingTabRow, isOneTimeAccrualRow, isRenderableOneTimeAccrual, isPendingReviewRow, } from './view/expenseAutomationView/selectors/jeSchedulesViewSelector';
@@ -3,7 +3,7 @@ import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
3
3
  import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
4
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
5
  import { isConfirmStatementMappingConflictResponse, transformConfirmStatementMappingConflictToState, transformConfirmStatementMappingPayloadToState, } from '../../payload/reconciliationPayload';
6
- import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess, } from '../../reducers/reconciliationViewReducer';
6
+ import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess, fetchReconciliation, } from '../../reducers/reconciliationViewReducer';
7
7
  function createConfirmStatementMappingErrorSnackbar(apiMessage) {
8
8
  const trimmedApiMessage = apiMessage?.trim();
9
9
  if (trimmedApiMessage != null && trimmedApiMessage !== '') {
@@ -39,7 +39,7 @@ export const confirmStatementMappingEpic = (actions$, _state$, zeniAPI) => actio
39
39
  accountId,
40
40
  selectedPeriod,
41
41
  statementUploads: transformConfirmStatementMappingPayloadToState(response.data),
42
- }));
42
+ }), fetchReconciliation(selectedPeriod, undefined, true, true));
43
43
  }
44
44
  const mappingConflict = isConfirmStatementMappingConflictResponse(response)
45
45
  ? transformConfirmStatementMappingConflictToState(response)
@@ -0,0 +1,54 @@
1
+ import { of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
+ import { updateAccountReconDeleteStatement } from '../../../../entity/accountRecon/accountReconReducer';
5
+ import { toAccountReconKey } from '../../../../entity/accountRecon/accountReconState';
6
+ import { removeFiles } from '../../../../entity/file/fileReducer';
7
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
8
+ import { resolveCombinedStatementGroupId } from '../../helpers/reconciliationHelpers';
9
+ import { deleteAccountStatementFailure, deleteAccountStatementSuccess, deleteCombinedStatement, fetchReconciliation, } from '../../reducers/reconciliationViewReducer';
10
+ export const deleteCombinedStatementEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(deleteCombinedStatement.match), switchMap((action) => {
11
+ const { accountId, selectedPeriod, fileId } = action.payload;
12
+ let combinedStatementGroupId = action.payload.combinedStatementGroupId;
13
+ if (combinedStatementGroupId === '') {
14
+ const accountRecon = state$.value.expenseAutomationReconciliationViewState
15
+ .accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)]?.reconciliationByAccountID[accountId];
16
+ combinedStatementGroupId =
17
+ resolveCombinedStatementGroupId(accountRecon);
18
+ }
19
+ if (combinedStatementGroupId === '') {
20
+ return of(deleteAccountStatementFailure({
21
+ accountId,
22
+ selectedPeriod,
23
+ error: createZeniAPIStatus('Missing Data', 'No combined statement group id found for delete'),
24
+ }));
25
+ }
26
+ const deleteUrl = `${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/combined-statement-groups/${combinedStatementGroupId}`;
27
+ return zeniAPI
28
+ .deleteAndGetJSON(deleteUrl)
29
+ .pipe(mergeMap((response) => {
30
+ if (isSuccessResponse(response) === true) {
31
+ const actions = [];
32
+ if (fileId != null && fileId !== '') {
33
+ actions.push(removeFiles([fileId]));
34
+ }
35
+ if (response.data != null) {
36
+ actions.push(updateAccountReconDeleteStatement(toAccountReconKey(accountId, selectedPeriod), {
37
+ statement_upload: response.data.statement_upload,
38
+ }));
39
+ }
40
+ actions.push(deleteAccountStatementSuccess({ accountId, selectedPeriod }), fetchReconciliation(selectedPeriod, undefined, true, true));
41
+ return of(...actions);
42
+ }
43
+ return of(deleteAccountStatementFailure({
44
+ accountId,
45
+ selectedPeriod,
46
+ error: response.status,
47
+ }));
48
+ }), catchError((error) => of(deleteAccountStatementFailure({
49
+ accountId,
50
+ selectedPeriod,
51
+ error: createZeniAPIStatus('Unexpected Error', 'Delete Combined Statement REST API call errored out ' +
52
+ (error instanceof Error ? error.message : String(error))),
53
+ }))));
54
+ }));
@@ -57,7 +57,7 @@ export const fetchReconciliationViewEpic = (actions$, state$, zeniAPI) => action
57
57
  updateActions.push(updateAccounts(response.data.accounts, 'account_reconciliation'), updateAccounts(response.data.excluded_accounts ?? [], 'excluded_account_reconciliation'), updateAllUsers({
58
58
  users: response.data.users ?? [],
59
59
  updateType: 'merge',
60
- }), updateFiles({ files: response.data.files ?? [] }), updateMultipleReconcileTransactions(allTransactionsPerRecon, 'merge'), updateAccountRecon(selectedPeriod, response.data.reconciliation));
60
+ }), updateFiles({ files: response.data.files ?? [] }), updateMultipleReconcileTransactions(allTransactionsPerRecon, 'merge'), updateAccountRecon(selectedPeriod, response.data.reconciliation, accountId == null));
61
61
  const reviewTabLocalData = prepareReviewTabLocalData(response.data.reconciliation[0]?.transactions?.review ?? []);
62
62
  if (accountId != null) {
63
63
  const selectedTransactionIds = getTransactionIdFromCheckedMatchedTransactionPayload(response.data.reconciliation[0].transactions.reconcile);
@@ -3,6 +3,7 @@ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
3
  import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
4
  import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
5
  import { mapCombinedStatementUpdateLocalDataToRequestBody } from '../../helpers/mapStatementUpdateLocalDataToRequestBody';
6
+ import { resolveCombinedStatementGroupId } from '../../helpers/reconciliationHelpers';
6
7
  import { isStatementDateConflictResponse, transformStatementDateConflictToState, transformUpdateStatementInfoPayloadToState, } from '../../payload/reconciliationPayload';
7
8
  import { submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData, } from '../../reducers/reconciliationViewReducer';
8
9
  import { getStatementUploadsFromParsedData } from '../../selectors/statementParseViewSelector';
@@ -23,12 +24,8 @@ export const updateCombinedStatementInfoEpic = (actions$, state$, zeniAPI) => ac
23
24
  error: createZeniAPIStatus('Missing Data', 'No statement update data found for combined accounts'),
24
25
  }));
25
26
  }
26
- const combinedStatementGroupId = accountRecon?.combinedStatementGroupId ??
27
- parsedStatementData.statementUpload.statementMeta
28
- .combinedStatementGroupId ??
29
- parsedStatementData.statementUpload.combinedStatementDetails
30
- ?.combinedStatementGroupId;
31
- if (combinedStatementGroupId == null || combinedStatementGroupId === '') {
27
+ const combinedStatementGroupId = resolveCombinedStatementGroupId(accountRecon);
28
+ if (combinedStatementGroupId === '') {
32
29
  return of(submitStatementUpdateFailure({
33
30
  accountId,
34
31
  selectedPeriod,