@zeniai/client-epic-state 5.2.10 → 5.2.11-betaAM1
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.
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +86 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +172 -0
- package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +11 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +38 -3
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +101 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +24 -1
- package/lib/entity/jeSchedules/jeSchedulesTypes.js +88 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +2 -0
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +2 -0
- package/lib/epic.d.ts +14 -1
- package/lib/epic.js +26 -0
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +172 -1
- package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +30 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +36 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +78 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +2 -0
- package/lib/esm/epic.js +26 -0
- package/lib/esm/index.js +19 -9
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +6 -2
- package/lib/esm/view/companyMonthEndReportView/companyMonthEndReportViewState.js +4 -0
- package/lib/esm/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +10 -6
- package/lib/esm/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +9 -5
- package/lib/esm/view/companyMonthEndReportView/monthEndTemplateData.js +32 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +46 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +7 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +50 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +30 -10
- package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +9 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +41 -5
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +45 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +104 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +136 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +79 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +157 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +111 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +33 -0
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +22 -7
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +140 -0
- package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +35 -0
- package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +55 -0
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +260 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +314 -29
- package/lib/esm/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +162 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +106 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +297 -22
- package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +22 -0
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -5
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/lib/index.d.ts +25 -14
- package/lib/index.js +119 -51
- package/lib/reducer.d.ts +1 -0
- package/lib/reducer.js +3 -0
- package/lib/rootStateTypes.d.ts +2 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewPayload.d.ts +8 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +6 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +6 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.d.ts +2 -0
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.js +4 -0
- package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +10 -6
- package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +9 -5
- package/lib/view/companyMonthEndReportView/monthEndTemplateData.d.ts +16 -0
- package/lib/view/companyMonthEndReportView/monthEndTemplateData.js +36 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +50 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.d.ts +5 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +11 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +54 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +30 -10
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +9 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +9 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +3 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +39 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +21 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +49 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +14 -2
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +108 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +29 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +140 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +83 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +13 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +164 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +65 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +115 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +7 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +37 -0
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +22 -7
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +36 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +145 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +66 -0
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +40 -0
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +72 -3
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -1
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +53 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +264 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +91 -12
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +316 -29
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +58 -0
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeAccountSettingsViewSelectorTypes.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +42 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +36 -7
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +9 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +172 -0
- package/lib/view/expenseAutomationView/selectors/jeAccountSettingsViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +21 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +112 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +34 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +305 -21
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +76 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +27 -0
- package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +83 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +11 -7
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
- package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +7 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +4 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +5 -3
- package/package.json +1 -1
package/lib/esm/epic.js
CHANGED
|
@@ -185,6 +185,11 @@ import { updateCombinedStatementInfoEpic, } from './view/expenseAutomationView/e
|
|
|
185
185
|
import { updateReconcileTabLocalDataEpic as updateExpenseAutomationReconciliationBalanceLocalDataEpic, } from './view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic';
|
|
186
186
|
import { updateStatementInfoEpic, } from './view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic';
|
|
187
187
|
import { uploadAccountStatementEpic, } from './view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic';
|
|
188
|
+
import { fetchActualMatchingEpic as fetchExpenseAutomationActualMatchingEpic, } from './view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic';
|
|
189
|
+
import { fetchActualMatchingPageEpic as fetchExpenseAutomationActualMatchingPageEpic, } from './view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic';
|
|
190
|
+
import { matchAndReverseAccrualsEpic, } from './view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic';
|
|
191
|
+
import { searchMatchAccrualsEpic, } from './view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic';
|
|
192
|
+
import { searchMatchTransactionsEpic, } from './view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic';
|
|
188
193
|
import { fetchAllExpenseAutomationTabsEpic, } from './view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic';
|
|
189
194
|
import { refreshExpenseAutomationCurrentTabEpic, } from './view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic';
|
|
190
195
|
import { fetchFluxAnalysisViewEpic as fetchExpenseAutomationFluxAnalysisViewEpic, } from './view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic';
|
|
@@ -195,9 +200,17 @@ import { initializeAccountSettingsViewEpic, } from './view/expenseAutomationView
|
|
|
195
200
|
import { saveAccountSettingsViewEpic, } from './view/expenseAutomationView/epics/jeSchedule/accountSettings/saveAccountSettingsViewEpic';
|
|
196
201
|
import { fetchJeSchedulesPageEpic as fetchExpenseAutomationJESchedulesPageEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic';
|
|
197
202
|
import { fetchJeSchedulesEpic as fetchExpenseAutomationJeSchedulesEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic';
|
|
203
|
+
import { fetchOneTimeAccrualEpic, } from './view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic';
|
|
198
204
|
import { ignoreRecommendedJeScheduleEpic as ignoreExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic';
|
|
199
205
|
import { initializeJeScheduleLocalDataEpic as initializeExpenseAutomationJeScheduleLocalDataEpic, } from './view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic';
|
|
206
|
+
import { createOneTimeAccrualEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic';
|
|
207
|
+
import { initializeNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic';
|
|
208
|
+
import { saveNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic';
|
|
209
|
+
import { searchTransactionsForNewScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic';
|
|
210
|
+
import { oneTimeAccrualActionsEpic, } from './view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic';
|
|
200
211
|
import { retryJeScheduleEpic as retryExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic';
|
|
212
|
+
import { revertJeScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic';
|
|
213
|
+
import { switchJESchedulesTabEpic as switchExpenseAutomationJESchedulesTabEpic, } from './view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic';
|
|
201
214
|
import { bulkUploadMatchResultToastEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic';
|
|
202
215
|
import { bulkUploadReceiptsEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic';
|
|
203
216
|
import { confirmBulkUploadMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic';
|
|
@@ -779,6 +792,7 @@ const ALL_EPICS = [
|
|
|
779
792
|
createNewSchedulesAccruedEpic,
|
|
780
793
|
createNewSchedulesEpic,
|
|
781
794
|
createNewTaskGroupEpic,
|
|
795
|
+
createOneTimeAccrualEpic,
|
|
782
796
|
createPaymentInstrumentEpic,
|
|
783
797
|
createSessionAndSubmitEpic,
|
|
784
798
|
createSessionEpic,
|
|
@@ -950,6 +964,8 @@ const ALL_EPICS = [
|
|
|
950
964
|
fetchEntityRecommendationsByTransactionIdEpic,
|
|
951
965
|
fetchEntityRecommendationsForLineUpdateEpic,
|
|
952
966
|
fetchExcludedResourcesEpic,
|
|
967
|
+
fetchExpenseAutomationActualMatchingEpic,
|
|
968
|
+
fetchExpenseAutomationActualMatchingPageEpic,
|
|
953
969
|
fetchExpenseAutomationFluxAnalysisViewEpic,
|
|
954
970
|
fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic,
|
|
955
971
|
fetchExpenseAutomationJeSchedulesEpic,
|
|
@@ -1058,6 +1074,7 @@ const ALL_EPICS = [
|
|
|
1058
1074
|
fetchOnboardingCustomerSetupViewEpic,
|
|
1059
1075
|
fetchOnboardingCustomerViewEpic,
|
|
1060
1076
|
fetchOnboardingViewEpic,
|
|
1077
|
+
fetchOneTimeAccrualEpic,
|
|
1061
1078
|
fetchOpExByVendorEpic,
|
|
1062
1079
|
fetchOpExByVendorReportForTimeframeEpic,
|
|
1063
1080
|
fetchOpExByVendorReportSummaryEpic,
|
|
@@ -1212,6 +1229,7 @@ const ALL_EPICS = [
|
|
|
1212
1229
|
initializeInvoicingCustomerAddressEpic,
|
|
1213
1230
|
initializeInvoicingSubscriptionAddressEpic,
|
|
1214
1231
|
initializeMyProfileLocalDataEpic,
|
|
1232
|
+
initializeNewScheduleEpic,
|
|
1215
1233
|
initializeOnboardingCustomerViewUpdateDataEpic,
|
|
1216
1234
|
initializeRemiSetupApproverViewUpdateDataEpic,
|
|
1217
1235
|
initializeRemiToLocalStoreEpic,
|
|
@@ -1233,7 +1251,9 @@ const ALL_EPICS = [
|
|
|
1233
1251
|
lockChargeCardsEpic,
|
|
1234
1252
|
markAsCompleteScheduleDetailEpic,
|
|
1235
1253
|
markTransactionAsNotMiscategorizedEpic,
|
|
1254
|
+
matchAndReverseAccrualsEpic,
|
|
1236
1255
|
notifyMeForFeatureEpic,
|
|
1256
|
+
oneTimeAccrualActionsEpic,
|
|
1237
1257
|
parallelFetchAccountTransactionListEpic,
|
|
1238
1258
|
parallelFetchClassTransactionListEpic,
|
|
1239
1259
|
parallelFetchEntityTransactionListEpic,
|
|
@@ -1277,6 +1297,7 @@ const ALL_EPICS = [
|
|
|
1277
1297
|
retryExpenseAutomationJEScheduleEpic,
|
|
1278
1298
|
retryInvoicingQboSyncTaskEpic,
|
|
1279
1299
|
retryOrRefundBillEpic,
|
|
1300
|
+
revertJeScheduleEpic,
|
|
1280
1301
|
reviewDraftRemisBulkActionEpic,
|
|
1281
1302
|
reviewExpenseAutomationFluxAnalysisViewEpic,
|
|
1282
1303
|
revokeCardInviteEpic,
|
|
@@ -1312,6 +1333,7 @@ const ALL_EPICS = [
|
|
|
1312
1333
|
saveInvoicingSubscriptionEpic,
|
|
1313
1334
|
saveMagicLinkBankAccountEpic,
|
|
1314
1335
|
saveNewAddressEpic,
|
|
1336
|
+
saveNewScheduleEpic,
|
|
1315
1337
|
saveNotificationPreferencesEpic,
|
|
1316
1338
|
saveNotificationSettingsEpic,
|
|
1317
1339
|
saveOAuthConnectionEpic,
|
|
@@ -1335,7 +1357,10 @@ const ALL_EPICS = [
|
|
|
1335
1357
|
saveVendorFirstReviewViewEpic,
|
|
1336
1358
|
saveVendorsTabVendorEpic,
|
|
1337
1359
|
scheduleTenantCreditScoreCronEpic,
|
|
1360
|
+
searchMatchAccrualsEpic,
|
|
1361
|
+
searchMatchTransactionsEpic,
|
|
1338
1362
|
searchTransactionsForManualMatchEpic,
|
|
1363
|
+
searchTransactionsForNewScheduleEpic,
|
|
1339
1364
|
seedAiCardCreationFormDraftEpic,
|
|
1340
1365
|
seedAiCardPolicyFormDraftEpic,
|
|
1341
1366
|
sendCompanyMonthEndReportEpic,
|
|
@@ -1358,6 +1383,7 @@ const ALL_EPICS = [
|
|
|
1358
1383
|
submitIntlVerificationEpic,
|
|
1359
1384
|
submitInvoicingBrandingFormEpic,
|
|
1360
1385
|
submitQuestionEpic,
|
|
1386
|
+
switchExpenseAutomationJESchedulesTabEpic,
|
|
1361
1387
|
syncInvoicingSubscriptionCouponsEpic,
|
|
1362
1388
|
syncTabsAfterAutomatchEpic,
|
|
1363
1389
|
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,24 +181,28 @@ 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';
|
|
187
|
+
import { clearActualMatchingView as clearExpenseAutomationActualMatchingView, clearMatchNewModal, closeMatchNewModal, fetchActualMatching as fetchExpenseAutomationActualMatching, fetchActualMatchingPage as fetchExpenseAutomationActualMatchingPage, matchAndReverseAccruals, openMatchNewModal, searchMatchAccruals, searchMatchTransactions, updateActualMatchingUIState as updateExpenseAutomationActualMatchingUIState, } from './view/expenseAutomationView/reducers/actualMatchingViewReducer';
|
|
186
188
|
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';
|
|
189
|
+
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
190
|
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
191
|
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
192
|
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
193
|
import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
|
|
194
|
+
import { getNewAccrualAccountsView as getJeNewAccrualAccountsView, getNewScheduleSearchTransactionsView as getJeNewScheduleSearchTransactionsView, getNewScheduleView as getJeNewScheduleView, } from './view/expenseAutomationView/selectors/jeNewScheduleViewSelector';
|
|
192
195
|
import { getExpenseAutomationReconciliationView, getLedgerAccountsForCombinedStatementMapping, getReparseStatementStatusByAccountId, getUnavailableLedgerAccountIds, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
|
|
193
196
|
import { getExpenseAutomationTransactionView, getLastTransferEntryReplacement, } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
|
|
194
197
|
import { applyTransactionFilters } from './view/expenseAutomationView/transactionFilterHelpers';
|
|
195
198
|
import { TRANSACTION_FILTER_CATEGORIES, } from './view/expenseAutomationView/transactionFilterTypes';
|
|
199
|
+
import { MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toActualMatchingSortKey as toExpenseAutomationActualMatchingSortKey, toMatchAndReverseResultStatus, } from './view/expenseAutomationView/types/actualMatchingViewState';
|
|
196
200
|
import { DEFAULT_COMPLETED_SUB_TAB, toCompletedSubTab, } from './view/expenseAutomationView/types/completedSubTab';
|
|
197
|
-
import {
|
|
198
|
-
import { toJEScheduleMainTab as toExpenseAutomationJEScheduleMainTab, toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, } from './view/expenseAutomationView/types/jeSchedulesViewState';
|
|
201
|
+
import { ALL_JE_PAGE_TABS, toJEScheduleSortKey as toExpenseAutomationJEScheduleSortKey, toJEPageTab, } from './view/expenseAutomationView/types/jeSchedulesViewState';
|
|
199
202
|
import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
|
|
200
203
|
import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
|
|
201
204
|
import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
|
|
205
|
+
import { DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, } from './view/expenseAutomationView/types/transactionGroup';
|
|
202
206
|
import { toTransactionsTabKey as toExpenseAutomationTransactionsTabKey, toTransactionsSortKey, } from './view/expenseAutomationView/types/transactionsViewState';
|
|
203
207
|
import { fetchRegisteredInterests, notifyMeForFeature, } from './view/featureNotificationView/featureNotificationViewReducer';
|
|
204
208
|
import { getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, } from './view/featureNotificationView/featureNotificationViewSelector';
|
|
@@ -483,9 +487,10 @@ export { stringToUnion, stringToUnionStrict };
|
|
|
483
487
|
export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
|
|
484
488
|
export {
|
|
485
489
|
// 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,
|
|
490
|
+
BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, DEFAULT_COMPLETED_SUB_TAB, DEFAULT_TRANSACTION_GROUP, TRANSACTION_GROUPS, toTransactionGroup, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, ALL_JE_PAGE_TABS, MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, toExpenseAutomationJEScheduleSortKey, toExpenseAutomationActualMatchingSortKey, toJEPageTab, toMatchAndReverseResultStatus, toggleJECreatedGroupCollapsed, toggleJEPendingGroupCollapsed, updateJEScheduleTypeFilter, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationCompletedSubTab, updateTransactionGroup, fetchExpenseAutomationMissingReceipts,
|
|
487
491
|
// Bulk Upload Actions
|
|
488
492
|
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, 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, };
|
|
493
|
+
export { computeNewScheduleJeDetails, createOneTimeAccrual, createOneTimeAccrualFailure, createOneTimeAccrualSuccess, fetchOneTimeAccrual, getJeNewAccrualAccountsView, ignoreOneTimeAccrual, promoteOneTimeAccrual, revertJeSchedule, revertOneTimeAccrual, getJeNewScheduleSearchTransactionsView, getJeNewScheduleView, };
|
|
489
494
|
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
495
|
export { TOP_EX_TIME_PERIODS };
|
|
491
496
|
export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
|
|
@@ -541,7 +546,7 @@ export { toTransactionType, toTransactionTypeStrict, toTransactionCategory, };
|
|
|
541
546
|
export { defaultVendorCurrency, updateVendors };
|
|
542
547
|
export { isVendorTransaction, isVendorTransactionWithCustomer, };
|
|
543
548
|
export { isTransferTransaction };
|
|
544
|
-
export { getSupportedTransactionById, };
|
|
549
|
+
export { getScheduleTransactionById, getSupportedTransactionById, };
|
|
545
550
|
export { updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, parallelFetchProjectTransactionList, updateTransactionListByProjectUIState, updateTransactionListByProject, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
|
|
546
551
|
export { getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
|
|
547
552
|
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 +657,10 @@ export { updateChargeCardTransactionAttachments, updateChargeCardStatusFromPushe
|
|
|
652
657
|
export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
|
|
653
658
|
export { fetchApAging, getApAgingReport, updateApAgingUIState, };
|
|
654
659
|
export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
|
|
655
|
-
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
660
|
+
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, clearJeSearchTransactionsForNewSchedule, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeNewSchedule, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, resetJeNewScheduleLocalData, retryExpenseAutomationJESchedule, saveJeNewSchedule, saveJeNewScheduleFailure, saveJeNewScheduleSuccess, searchJeTransactionsForNewSchedule, searchJeTransactionsForNewScheduleFailure, searchJeTransactionsForNewScheduleSuccess, updateExpenseAutomationJESchedulesUIState, updateJeNewScheduleLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
661
|
+
export { clearExpenseAutomationActualMatchingView, closeMatchNewModal, clearMatchNewModal, fetchExpenseAutomationActualMatching, fetchExpenseAutomationActualMatchingPage, matchAndReverseAccruals, openMatchNewModal, searchMatchAccruals, searchMatchTransactions, updateExpenseAutomationActualMatchingUIState, };
|
|
656
662
|
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, };
|
|
663
|
+
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
664
|
export { toVendorFirstReviewViewColumnKeyType, getGlobalMerchantAutoCompleteResults, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, };
|
|
659
665
|
export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, };
|
|
660
666
|
export { approveVendorGlobalReview, rejectVendorGlobalReview, fetchVendorGlobalReviewView, updateSelectedGlobalMerchant, updateVendorGlobalReviewViewUIState, getVendorGlobalReviewView, getTenantMerchantByMerchantId, toVendorGlobalReviewColumnSortKeyType, updateVendorGlobalReviewViewLocalData, };
|
|
@@ -862,3 +868,7 @@ export { INVOICING_QBO_CUSTOMER_MATCHING_MODES, getInvoicingQboAccountMappingId,
|
|
|
862
868
|
export { acceptInvoicingTerms, enableInvoicing, fetchInvoicingConfig, resetInvoicingConfigActionStates, updateInvoicingConfig, } from './view/invoicing/invoicingConfigView/invoicingConfigViewReducer';
|
|
863
869
|
export { getInvoicingConfigView } from './view/invoicing/invoicingConfigView/invoicingConfigViewSelector';
|
|
864
870
|
export { getInvoicingOnboardingGateView } from './view/invoicing/invoicingConfigView/invoicingConfigViewSelector';
|
|
871
|
+
// Accrued JE schedules are not a discriminated union member, so consumers need this guard to
|
|
872
|
+
// narrow a JEScheduleRow before reading baseTransaction / recurringAmount.
|
|
873
|
+
export { getExpenseAutomationJEOneTimeAccrualDetailView, getJEScheduleRowType, isAccruedScheduleRow, isAiAccountantSchedule, isExistingTabRow, isOneTimeAccrualRow, isRenderableOneTimeAccrual, isPendingReviewRow, } from './view/expenseAutomationView/selectors/jeSchedulesViewSelector';
|
|
874
|
+
export { getActualMatchingAmount, getActualMatchingReversalDate, getExpenseAutomationActualMatchingView, isAutoReversedAccrual, isPendingReviewAccrual, } from './view/expenseAutomationView/selectors/actualMatchingViewSelector';
|
package/lib/esm/reducer.js
CHANGED
|
@@ -116,6 +116,7 @@ import creditAgentView, { initialState as initialCreditAgentViewState, } from '.
|
|
|
116
116
|
import dashboard, { initialState as initialDashboardState, } from './view/dashboard/dashboardReducer';
|
|
117
117
|
import dashboardLayout, { initialState as initialDashboardLayoutState, } from './view/dashboardLayout/dashboardLayoutReducer';
|
|
118
118
|
import expenseAutomationView, { initialState as initialExpenseAutomationViewState, } from './view/expenseAutomationView/expenseAutomationViewReducer';
|
|
119
|
+
import expenseAutomationActualMatchingView, { initialState as initialExpenseAutomationActualMatchingViewState, } from './view/expenseAutomationView/reducers/actualMatchingViewReducer';
|
|
119
120
|
import expenseAutomationFluxAnalysisView, { initialState as initialExpenseAutomationFluxAnalysisViewState, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
|
|
120
121
|
import expenseAutomationJESchedulesView, { initialState as initialExpenseAutomationJESchedulesViewState, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
|
|
121
122
|
import expenseAutomationMissingReceiptsView, { initialState as initialExpenseAutomationMissingReceiptsViewState, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
@@ -429,6 +430,7 @@ const initialViewsState = {
|
|
|
429
430
|
entityAutoCompleteState: initialEntityAutoCompleteState,
|
|
430
431
|
entityRecommendationState: initialEntityRecommendationState,
|
|
431
432
|
expenseAutomationFluxAnalysisViewState: initialExpenseAutomationFluxAnalysisViewState,
|
|
433
|
+
expenseAutomationActualMatchingViewState: initialExpenseAutomationActualMatchingViewState,
|
|
432
434
|
expenseAutomationJESchedulesViewState: initialExpenseAutomationJESchedulesViewState,
|
|
433
435
|
expenseAutomationMissingReceiptsViewState: initialExpenseAutomationMissingReceiptsViewState,
|
|
434
436
|
expenseAutomationReconciliationViewState: initialExpenseAutomationReconciliationViewState,
|
|
@@ -723,6 +725,7 @@ const viewReducers = {
|
|
|
723
725
|
entityAutoCompleteState: entityAutoComplete,
|
|
724
726
|
entityRecommendationState: recommendation,
|
|
725
727
|
expenseAutomationFluxAnalysisViewState: expenseAutomationFluxAnalysisView,
|
|
728
|
+
expenseAutomationActualMatchingViewState: expenseAutomationActualMatchingView,
|
|
726
729
|
expenseAutomationJESchedulesViewState: expenseAutomationJESchedulesView,
|
|
727
730
|
expenseAutomationMissingReceiptsViewState: expenseAutomationMissingReceiptsView,
|
|
728
731
|
expenseAutomationReconciliationViewState: expenseAutomationReconciliationView,
|
|
@@ -95,7 +95,10 @@ const companyMonthEndReportView = createSlice({
|
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
97
|
saveCompanyMonthEndReport: {
|
|
98
|
-
|
|
98
|
+
// The trailing pair is an object, not two more positional optionals: both
|
|
99
|
+
// are optional and neither is a distinct type, so a swapped call would
|
|
100
|
+
// compile silently.
|
|
101
|
+
prepare(recipientEmailList, companyId, subject, isPreview, fileId, zeniRequestsHtml, options) {
|
|
99
102
|
return {
|
|
100
103
|
payload: {
|
|
101
104
|
recipientEmailList,
|
|
@@ -104,7 +107,8 @@ const companyMonthEndReportView = createSlice({
|
|
|
104
107
|
isPreview,
|
|
105
108
|
fileId,
|
|
106
109
|
zeniRequestsHtml,
|
|
107
|
-
tenantId,
|
|
110
|
+
tenantId: options?.tenantId,
|
|
111
|
+
agentInsightEdits: options?.agentInsightEdits,
|
|
108
112
|
},
|
|
109
113
|
};
|
|
110
114
|
},
|
|
@@ -18,6 +18,10 @@ export const toCompanyMonthEndReportData = (data) => {
|
|
|
18
18
|
: undefined,
|
|
19
19
|
draftUserId: data.draft_user_id,
|
|
20
20
|
zeniRequestsData: data.zeni_requests_data ?? [],
|
|
21
|
+
agentInsightsEditedBy: data.agent_insights_edited_by ?? undefined,
|
|
22
|
+
agentInsightsEditedAt: data.agent_insights_edited_at != null
|
|
23
|
+
? date(data.agent_insights_edited_at)
|
|
24
|
+
: undefined,
|
|
21
25
|
};
|
|
22
26
|
};
|
|
23
27
|
export function toMonthEndHistoricData(data) {
|
|
@@ -6,9 +6,10 @@ import { getAttachmentFileByFileId } from '../../../entity/file/fileSelector';
|
|
|
6
6
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
7
7
|
import { createZeniAPIStatus, isSuccessStatus } from '../../../responsePayload';
|
|
8
8
|
import { dateNow, getBusinessDayOfDate } from '../../../zeniDayJS';
|
|
9
|
+
import { buildMonthEndTemplateData } from '../monthEndTemplateData';
|
|
9
10
|
import { saveCompanyMonthEndReport, updateCompanyMonthEndReportDataOnSaveSuccess, updateStatusForCompanyMonthEndReportOnSaveFailure, } from '../companyMonthEndReportViewReducer';
|
|
10
11
|
export const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(saveCompanyMonthEndReport.match), mergeMap((action) => {
|
|
11
|
-
const { companyId, recipientEmailList, subject, isPreview, fileId, zeniRequestsHtml, tenantId, } = action.payload;
|
|
12
|
+
const { agentInsightEdits, companyId, recipientEmailList, subject, isPreview, fileId, zeniRequestsHtml, tenantId, } = action.payload;
|
|
12
13
|
const state = state$.value;
|
|
13
14
|
const company = state.companyState.companiesById[companyId];
|
|
14
15
|
const companyName = state.companyState.companiesById[companyId].companyInfo.name;
|
|
@@ -27,15 +28,18 @@ export const saveCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => acti
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
const payload = {
|
|
30
|
-
template_data:
|
|
31
|
-
...state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.templateData,
|
|
32
|
-
subject,
|
|
33
|
-
},
|
|
31
|
+
template_data: buildMonthEndTemplateData(state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.templateData, subject, agentInsightEdits),
|
|
34
32
|
recipient_email_list: recipientEmailList,
|
|
35
33
|
tenant_receiver_email_list: state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.tenantReceiverEmailList,
|
|
36
34
|
last_report_sent_business_day: lastReportSentBusinessDay,
|
|
37
35
|
last_report_sent_date: lastReportSentDate.format(DEFAULT_DATE_FORMAT),
|
|
38
|
-
|
|
36
|
+
// Three-way, because the server distinguishes all three: an empty string means the user
|
|
37
|
+
// cleared the box and is sent as an explicit null, a value is sent as-is, and undefined
|
|
38
|
+
// means this save was not about Zeni Requests at all — the key is omitted so the draft's
|
|
39
|
+
// existing text is left alone.
|
|
40
|
+
...(zeniRequestsHtml !== undefined && {
|
|
41
|
+
zeni_requests_html: zeniRequestsHtml === '' ? null : zeniRequestsHtml,
|
|
42
|
+
}),
|
|
39
43
|
files: filePayload,
|
|
40
44
|
};
|
|
41
45
|
const query = { is_preview: isPreview };
|
|
@@ -7,6 +7,7 @@ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
|
7
7
|
import { createZeniAPIStatus, isSuccessStatus } from '../../../responsePayload';
|
|
8
8
|
import { dateNow, getBusinessDayOfDate } from '../../../zeniDayJS';
|
|
9
9
|
import { updateMetaDataOnSendMonthEndReport } from '../../companyView/companyViewReducer';
|
|
10
|
+
import { buildMonthEndTemplateData } from '../monthEndTemplateData';
|
|
10
11
|
import { sendCompanyMonthEndReport, updateStatusForSendCompanyMonthEndReport, } from '../companyMonthEndReportViewReducer';
|
|
11
12
|
export const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(sendCompanyMonthEndReport.match), mergeMap((action) => {
|
|
12
13
|
const { companyId, fileId, tenantId } = action.payload;
|
|
@@ -31,15 +32,18 @@ export const sendCompanyMonthEndReportEpic = (actions$, state$, zeniAPI) => acti
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
const payload = {
|
|
34
|
-
template_data:
|
|
35
|
-
...state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.templateData,
|
|
36
|
-
subject,
|
|
37
|
-
},
|
|
35
|
+
template_data: buildMonthEndTemplateData(state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.templateData, subject),
|
|
38
36
|
recipient_email_list: recipientEmailList,
|
|
39
37
|
tenant_receiver_email_list: state.companyMonthEndReportViewState.monthEndReportDataByCompanyId[companyId].companyMonthEndReportData.tenantReceiverEmailList,
|
|
40
38
|
last_report_sent_business_day: lastReportSentBusinessDay,
|
|
41
39
|
last_report_sent_date: lastReportSentDate.format(DEFAULT_DATE_FORMAT),
|
|
42
|
-
|
|
40
|
+
// Three-way, because the server distinguishes all three: an empty string means the user
|
|
41
|
+
// cleared the box and is sent as an explicit null, a value is sent as-is, and undefined
|
|
42
|
+
// means this save was not about Zeni Requests at all — the key is omitted so the draft's
|
|
43
|
+
// existing text is left alone.
|
|
44
|
+
...(zeniRequestsHtml !== undefined && {
|
|
45
|
+
zeni_requests_html: zeniRequestsHtml === '' ? null : zeniRequestsHtml,
|
|
46
|
+
}),
|
|
43
47
|
files: filePayload,
|
|
44
48
|
};
|
|
45
49
|
return zeniAPI
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The AI CFO (V2) month-end email renders its subject line from this merge var
|
|
3
|
+
* rather than from the generic `subject` key, so a subject typed in the cockpit
|
|
4
|
+
* has to be written here too or the sent email keeps the AI's original subject.
|
|
5
|
+
*/
|
|
6
|
+
export const AGENT_INSIGHTS_SUBJECT_KEY = 'agent_insights_subject';
|
|
7
|
+
/**
|
|
8
|
+
* Build the `template_data` sent to the month-end email endpoint.
|
|
9
|
+
*
|
|
10
|
+
* Controller edits to the AI-generated insight fields are merged over the
|
|
11
|
+
* template data held in the store. The server sanitizes and persists whichever
|
|
12
|
+
* `agent_insights_*` keys are present, and the send path renders from the
|
|
13
|
+
* persisted draft — so only a save (`is_preview: false`) makes an edit stick.
|
|
14
|
+
*/
|
|
15
|
+
export const buildMonthEndTemplateData = (templateData, subject, agentInsightEdits) => {
|
|
16
|
+
const merged = {
|
|
17
|
+
...templateData,
|
|
18
|
+
...agentInsightEdits,
|
|
19
|
+
subject,
|
|
20
|
+
};
|
|
21
|
+
// Only for AI CFO drafts (the key is absent on legacy ones), never over an
|
|
22
|
+
// explicit edit to the field itself, and never with an empty value — on send
|
|
23
|
+
// the subject comes from store state and can be absent, which must not blank
|
|
24
|
+
// the AI's subject line.
|
|
25
|
+
if (AGENT_INSIGHTS_SUBJECT_KEY in merged &&
|
|
26
|
+
agentInsightEdits?.[AGENT_INSIGHTS_SUBJECT_KEY] == null &&
|
|
27
|
+
subject != null &&
|
|
28
|
+
subject !== '') {
|
|
29
|
+
merged[AGENT_INSIGHTS_SUBJECT_KEY] = subject;
|
|
30
|
+
}
|
|
31
|
+
return merged;
|
|
32
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { from, of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, takeUntil } from 'rxjs/operators';
|
|
3
|
+
import { updateJEOneTimeAccruals } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
|
+
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
5
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
6
|
+
import { clearAll } from '../../../../rootActions';
|
|
7
|
+
import { toServiceMonthFromPeriod, } from '../../payload/actualMatchingPayload';
|
|
8
|
+
import { fetchActualMatching, fetchActualMatchingFailure, fetchActualMatchingSuccess, } from '../../reducers/actualMatchingViewReducer';
|
|
9
|
+
export const fetchActualMatchingEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchActualMatching.match), mergeMap((action) => {
|
|
10
|
+
const state = state$.value;
|
|
11
|
+
const { period, refreshViewInBackground } = action.payload;
|
|
12
|
+
const currentTenant = getCurrentTenant(state);
|
|
13
|
+
const selectedPeriod = state.expenseAutomationViewState
|
|
14
|
+
.selectedPeriodByTenantId[currentTenant.tenantId] ?? {
|
|
15
|
+
month: period.start.month,
|
|
16
|
+
year: period.start.year,
|
|
17
|
+
};
|
|
18
|
+
const serviceMonth = toServiceMonthFromPeriod(period);
|
|
19
|
+
return zeniAPI
|
|
20
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals?service_month=${encodeURIComponent(serviceMonth)}&view=actual_matching`)
|
|
21
|
+
.pipe(mergeMap((response) => {
|
|
22
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
23
|
+
const accruals = response.data.accruals ?? [];
|
|
24
|
+
const updateActions = [];
|
|
25
|
+
if (accruals.length > 0) {
|
|
26
|
+
updateActions.push(updateJEOneTimeAccruals(accruals));
|
|
27
|
+
}
|
|
28
|
+
updateActions.push(fetchActualMatchingSuccess({
|
|
29
|
+
accruals,
|
|
30
|
+
selectedPeriod,
|
|
31
|
+
refreshViewInBackground,
|
|
32
|
+
}));
|
|
33
|
+
return from(updateActions);
|
|
34
|
+
}
|
|
35
|
+
return of(fetchActualMatchingFailure({
|
|
36
|
+
status: response.status,
|
|
37
|
+
selectedPeriod,
|
|
38
|
+
refreshViewInBackground,
|
|
39
|
+
}));
|
|
40
|
+
}), catchError((error) => of(fetchActualMatchingFailure({
|
|
41
|
+
status: createZeniAPIStatus('Unexpected Error', 'fetch actual matching REST API call errored out' +
|
|
42
|
+
JSON.stringify(error)),
|
|
43
|
+
selectedPeriod,
|
|
44
|
+
refreshViewInBackground,
|
|
45
|
+
}))), takeUntil(actions$.pipe(filter(clearAll.match))));
|
|
46
|
+
}));
|
package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { fetchActualMatching, fetchActualMatchingPage, } from '../../reducers/actualMatchingViewReducer';
|
|
4
|
+
export const fetchActualMatchingPageEpic = (actions$) => actions$.pipe(filter(fetchActualMatchingPage.match), mergeMap((action) => {
|
|
5
|
+
const { period, refreshViewInBackground } = action.payload;
|
|
6
|
+
return of(fetchActualMatching(period, refreshViewInBackground));
|
|
7
|
+
}));
|
package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { from, of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap, takeUntil } from 'rxjs/operators';
|
|
3
|
+
import { convertToPeriod, toAbsoluteDay, } from '../../../../commonStateTypes/timePeriod';
|
|
4
|
+
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
5
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
6
|
+
import { clearAll } from '../../../../rootActions';
|
|
7
|
+
import { toMatchAndReverseResult, } from '../../payload/actualMatchingPayload';
|
|
8
|
+
import { clearMatchNewModal, fetchActualMatching, matchAndReverseAccruals, matchAndReverseAccrualsFailure, matchAndReverseAccrualsSuccess, } from '../../reducers/actualMatchingViewReducer';
|
|
9
|
+
function refreshActualMatchingList(state) {
|
|
10
|
+
const selectedMonthYear = state.expenseAutomationViewState.selectedPeriodByTenantId[getCurrentTenant(state).tenantId];
|
|
11
|
+
if (selectedMonthYear == null) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
const period = convertToPeriod(selectedMonthYear);
|
|
15
|
+
const start = toAbsoluteDay(period.start);
|
|
16
|
+
const end = toAbsoluteDay(period.end);
|
|
17
|
+
if (start == null || end == null) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
return [fetchActualMatching({ start, end }, true)];
|
|
21
|
+
}
|
|
22
|
+
export const matchAndReverseAccrualsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(matchAndReverseAccruals.match), mergeMap((action) => {
|
|
23
|
+
const { transactionId, transactionIntegrationId, transactionType, lineId, accrualIds, } = action.payload;
|
|
24
|
+
const body = {
|
|
25
|
+
transaction_id: transactionId,
|
|
26
|
+
transaction_integration_id: transactionIntegrationId,
|
|
27
|
+
transaction_type: transactionType,
|
|
28
|
+
line_id: lineId,
|
|
29
|
+
accrual_ids: accrualIds,
|
|
30
|
+
};
|
|
31
|
+
return zeniAPI
|
|
32
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals/match-and-reverse`, body)
|
|
33
|
+
.pipe(mergeMap((response) => {
|
|
34
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
35
|
+
const results = (response.data.results ?? []).map(toMatchAndReverseResult);
|
|
36
|
+
const successActions = [
|
|
37
|
+
matchAndReverseAccrualsSuccess({ results }),
|
|
38
|
+
];
|
|
39
|
+
const anyReversed = results.some((result) => result.status === 'reversed');
|
|
40
|
+
if (anyReversed) {
|
|
41
|
+
successActions.push(...refreshActualMatchingList(state$.value), clearMatchNewModal());
|
|
42
|
+
}
|
|
43
|
+
return from(successActions);
|
|
44
|
+
}
|
|
45
|
+
return of(matchAndReverseAccrualsFailure({ status: response.status }));
|
|
46
|
+
}), catchError((error) => of(matchAndReverseAccrualsFailure({
|
|
47
|
+
status: createZeniAPIStatus('Unexpected Error', 'Match and reverse accruals REST API call errored out' +
|
|
48
|
+
JSON.stringify(error)),
|
|
49
|
+
}))), takeUntil(actions$.pipe(filter(clearAll.match))));
|
|
50
|
+
}));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { from, merge, of } from 'rxjs';
|
|
2
|
+
import { catchError, debounceTime, filter, mergeMap, switchMap, } from 'rxjs/operators';
|
|
3
|
+
import { updateJEOneTimeAccruals } from '../../../../entity/jeSchedules/jeSchedulesReducer';
|
|
4
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
5
|
+
import { searchMatchAccruals, searchMatchAccrualsFailure, searchMatchAccrualsSuccess, } from '../../reducers/actualMatchingViewReducer';
|
|
6
|
+
import { MATCH_ACCRUAL_SEARCH_LIMIT, MATCH_SEARCH_DEBOUNCE_MS, } from '../../types/actualMatchingViewState';
|
|
7
|
+
export const searchMatchAccrualsEpic = (actions$, _state$, zeniAPI) => {
|
|
8
|
+
const searchActions$ = actions$.pipe(filter(searchMatchAccruals.match));
|
|
9
|
+
const pagination$ = searchActions$.pipe(filter((action) => action.payload.pageToken != null));
|
|
10
|
+
const newSearchDebounced$ = searchActions$.pipe(filter((action) => action.payload.pageToken == null), debounceTime(MATCH_SEARCH_DEBOUNCE_MS));
|
|
11
|
+
return merge(pagination$, newSearchDebounced$).pipe(switchMap((action) => {
|
|
12
|
+
const { query, pageToken } = action.payload;
|
|
13
|
+
const offset = pageToken != null && pageToken.length > 0 ? Number(pageToken) : 0;
|
|
14
|
+
const searchText = encodeURIComponent(query);
|
|
15
|
+
const limit = MATCH_ACCRUAL_SEARCH_LIMIT;
|
|
16
|
+
return zeniAPI
|
|
17
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals?status=posted&reversal_policy=on_bill_match&search_text=${searchText}&limit=${limit}&offset=${offset}`)
|
|
18
|
+
.pipe(mergeMap((response) => {
|
|
19
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
20
|
+
const accruals = response.data.accruals ?? [];
|
|
21
|
+
const append = pageToken != null;
|
|
22
|
+
const nextOffset = offset + accruals.length;
|
|
23
|
+
const total = response.data.total ?? nextOffset;
|
|
24
|
+
const nextPageToken = nextOffset < total ? String(nextOffset) : null;
|
|
25
|
+
const actionsOut = [];
|
|
26
|
+
if (accruals.length > 0) {
|
|
27
|
+
actionsOut.push(updateJEOneTimeAccruals(accruals));
|
|
28
|
+
}
|
|
29
|
+
actionsOut.push(searchMatchAccrualsSuccess({
|
|
30
|
+
append,
|
|
31
|
+
nextPageToken,
|
|
32
|
+
results: accruals,
|
|
33
|
+
}));
|
|
34
|
+
return from(actionsOut);
|
|
35
|
+
}
|
|
36
|
+
return of(searchMatchAccrualsFailure({
|
|
37
|
+
error: response.status,
|
|
38
|
+
}));
|
|
39
|
+
}), catchError((error) => of(searchMatchAccrualsFailure({
|
|
40
|
+
error: createZeniAPIStatus('Unexpected Error', 'Search match accruals REST API call errored out' +
|
|
41
|
+
JSON.stringify(error)),
|
|
42
|
+
}))));
|
|
43
|
+
}));
|
|
44
|
+
};
|
package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { from, merge, of } from 'rxjs';
|
|
2
|
+
import { catchError, debounceTime, filter, mergeMap, switchMap, } from 'rxjs/operators';
|
|
3
|
+
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
|
+
import { toActualMatchingTransactionSearchResult, } from '../../payload/actualMatchingPayload';
|
|
5
|
+
import { openMatchNewModal, searchMatchAccruals, searchMatchTransactions, searchMatchTransactionsFailure, searchMatchTransactionsSuccess, } from '../../reducers/actualMatchingViewReducer';
|
|
6
|
+
import { MATCH_SEARCH_DEBOUNCE_MS, MATCH_TRANSACTION_SEARCH_PAGE_SIZE, } from '../../types/actualMatchingViewState';
|
|
7
|
+
export const searchMatchTransactionsEpic = (actions$, _state$, zeniAPI) => {
|
|
8
|
+
const openModal$ = actions$.pipe(filter(openMatchNewModal.match), mergeMap(() => from([
|
|
9
|
+
searchMatchTransactions({ query: '' }),
|
|
10
|
+
searchMatchAccruals({ query: '' }),
|
|
11
|
+
])));
|
|
12
|
+
const searchActions$ = actions$.pipe(filter(searchMatchTransactions.match));
|
|
13
|
+
const pagination$ = searchActions$.pipe(filter((action) => action.payload.pageToken != null));
|
|
14
|
+
const newSearchDebounced$ = searchActions$.pipe(filter((action) => action.payload.pageToken == null), debounceTime(MATCH_SEARCH_DEBOUNCE_MS));
|
|
15
|
+
const search$ = merge(pagination$, newSearchDebounced$).pipe(switchMap((action) => {
|
|
16
|
+
const { query, pageToken } = action.payload;
|
|
17
|
+
const queryParam = {
|
|
18
|
+
search_text: query,
|
|
19
|
+
page_size: MATCH_TRANSACTION_SEARCH_PAGE_SIZE,
|
|
20
|
+
...(pageToken != null ? { page_token: pageToken } : {}),
|
|
21
|
+
};
|
|
22
|
+
return zeniAPI
|
|
23
|
+
.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/accruals/match-transaction-search?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
24
|
+
.pipe(mergeMap((response) => {
|
|
25
|
+
if (isSuccessResponse(response) && response.data != null) {
|
|
26
|
+
const { transactions, next_page_token } = response.data;
|
|
27
|
+
const append = pageToken != null;
|
|
28
|
+
const results = (transactions ?? []).map(toActualMatchingTransactionSearchResult);
|
|
29
|
+
return of(searchMatchTransactionsSuccess({
|
|
30
|
+
append,
|
|
31
|
+
nextPageToken: next_page_token ?? null,
|
|
32
|
+
results,
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
return of(searchMatchTransactionsFailure({
|
|
36
|
+
error: response.status,
|
|
37
|
+
}));
|
|
38
|
+
}), catchError((error) => of(searchMatchTransactionsFailure({
|
|
39
|
+
error: createZeniAPIStatus('Unexpected Error', 'Search match transactions REST API call errored out' +
|
|
40
|
+
JSON.stringify(error)),
|
|
41
|
+
}))));
|
|
42
|
+
}));
|
|
43
|
+
return merge(openModal$, search$);
|
|
44
|
+
};
|