@zeniai/client-epic-state 5.2.11-beta0ND → 5.2.11-betaAM2
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/invoicing/invoicingCommonPayload.d.ts +29 -27
- package/lib/entity/invoicing/invoicingCommonPayload.js +75 -37
- package/lib/entity/invoicing/product/productPayload.d.ts +0 -10
- package/lib/entity/invoicing/product/productPayload.js +2 -14
- package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +1 -0
- package/lib/entity/jeSchedules/jeScheduleHelper.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +97 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +209 -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 +140 -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 +15 -3
- package/lib/epic.js +31 -12
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +73 -33
- package/lib/esm/entity/invoicing/product/productPayload.js +2 -14
- package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +6 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +209 -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 +27 -8
- package/lib/esm/index.js +23 -14
- package/lib/esm/reducer.js +3 -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 +180 -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 +319 -29
- 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/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +9 -25
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +1 -6
- package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +0 -40
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +92 -0
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +1 -25
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +0 -41
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -16
- 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 +29 -22
- package/lib/index.js +116 -56
- package/lib/reducer.d.ts +1 -0
- package/lib/reducer.js +3 -0
- package/lib/rootStateTypes.d.ts +2 -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 +187 -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 +86 -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 +93 -12
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +321 -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/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 +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +1 -12
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +9 -25
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +1 -6
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +1 -10
- package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +1 -43
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +12 -0
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +99 -0
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +1 -4
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +2 -26
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +0 -35
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +1 -43
- package/lib/view/invoicing/settingsView/settingsViewState.d.ts +0 -8
- package/lib/view/recommendation/recommendationPayload.d.ts +0 -34
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -2
- package/lib/view/recommendation/recommendationReducer.js +2 -17
- 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/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +0 -27
- package/lib/esm/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +0 -19
- package/lib/esm/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +0 -19
- package/lib/esm/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +0 -39
- package/lib/esm/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +0 -25
- package/lib/esm/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +0 -48
- package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +0 -52
- package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +0 -31
- package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +0 -23
- package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +0 -23
- package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.d.ts +0 -6
- package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +0 -43
- package/lib/view/invoicing/settingsView/epics/settingsViewActionType.d.ts +0 -5
- package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.d.ts +0 -11
- package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +0 -29
- package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.d.ts +0 -34
- package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +0 -53
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +0 -7
- package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +0 -56
- /package/lib/esm/view/{invoicing/settingsView/epics/settingsViewActionType.js → expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js} +0 -0
- /package/lib/view/{invoicing/settingsView/epics/settingsViewActionType.js → expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js} +0 -0
package/lib/epic.js
CHANGED
|
@@ -188,6 +188,11 @@ const updateCombinedStatementInfoEpic_1 = require("./view/expenseAutomationView/
|
|
|
188
188
|
const updateReconcileTabLocalDataEpic_1 = require("./view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic");
|
|
189
189
|
const updateStatementInfoEpic_1 = require("./view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic");
|
|
190
190
|
const uploadAccountStatementEpic_1 = require("./view/expenseAutomationView/epics/accountRecon/uploadAccountStatementEpic");
|
|
191
|
+
const fetchActualMatchingEpic_1 = require("./view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic");
|
|
192
|
+
const fetchActualMatchingPageEpic_1 = require("./view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic");
|
|
193
|
+
const matchAndReverseAccrualsEpic_1 = require("./view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic");
|
|
194
|
+
const searchMatchAccrualsEpic_1 = require("./view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic");
|
|
195
|
+
const searchMatchTransactionsEpic_1 = require("./view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic");
|
|
191
196
|
const fetchAllExpenseAutomationTabsEpic_1 = require("./view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic");
|
|
192
197
|
const refreshExpenseAutomationCurrentTabEpic_1 = require("./view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic");
|
|
193
198
|
const fetchFluxAnalysisViewEpic_1 = require("./view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic");
|
|
@@ -198,9 +203,17 @@ const initializeAccountSettingsViewEpic_1 = require("./view/expenseAutomationVie
|
|
|
198
203
|
const saveAccountSettingsViewEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/accountSettings/saveAccountSettingsViewEpic");
|
|
199
204
|
const fetchJeSchedulePageEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic");
|
|
200
205
|
const fetchJeSchedulesEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic");
|
|
206
|
+
const fetchOneTimeAccrualEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic");
|
|
201
207
|
const ignoreRecommendedJeScheduleEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic");
|
|
202
208
|
const initializeJeScheduleLocalDataEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic");
|
|
209
|
+
const createOneTimeAccrualEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic");
|
|
210
|
+
const initializeNewScheduleEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic");
|
|
211
|
+
const saveNewScheduleEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic");
|
|
212
|
+
const searchTransactionsForNewScheduleEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic");
|
|
213
|
+
const oneTimeAccrualActionsEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic");
|
|
203
214
|
const retryJeSchedulesEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic");
|
|
215
|
+
const revertJeScheduleEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic");
|
|
216
|
+
const switchJESchedulesTabEpic_1 = require("./view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic");
|
|
204
217
|
const bulkUploadMatchResultToastEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic");
|
|
205
218
|
const bulkUploadReceiptsEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic");
|
|
206
219
|
const confirmBulkUploadMatchEpic_1 = require("./view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic");
|
|
@@ -313,12 +326,8 @@ const issueCreditNoteEpic_1 = require("./view/invoicing/issueCreditNote/issueCre
|
|
|
313
326
|
const paymentActionEpic_1 = require("./view/invoicing/paymentAction/paymentActionEpic");
|
|
314
327
|
const promotionalCreditActionEpic_1 = require("./view/invoicing/promotionalCreditAction/promotionalCreditActionEpic");
|
|
315
328
|
const recordPaymentEpic_1 = require("./view/invoicing/recordPayment/recordPaymentEpic");
|
|
316
|
-
const connectInvoicingStripeEpic_1 = require("./view/invoicing/settingsView/epics/connectInvoicingStripeEpic");
|
|
317
|
-
const disconnectInvoicingStripeEpic_1 = require("./view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic");
|
|
318
|
-
const fetchInvoicingSettingsEpic_1 = require("./view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic");
|
|
319
|
-
const saveInvoicingSettingsEpic_1 = require("./view/invoicing/settingsView/epics/saveInvoicingSettingsEpic");
|
|
320
|
-
const submitInvoicingQboSettingsEpic_1 = require("./view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic");
|
|
321
329
|
const invoicingBrandingFormEpics_1 = require("./view/invoicing/settingsView/invoicingBrandingFormEpics");
|
|
330
|
+
const settingsViewEpics_1 = require("./view/invoicing/settingsView/settingsViewEpics");
|
|
322
331
|
const subscriptionActionEpic_1 = require("./view/invoicing/subscriptionAction/subscriptionActionEpic");
|
|
323
332
|
const fetchMonthClosePerformanceTrendEpic_1 = require("./view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic");
|
|
324
333
|
const fetchMonthEndCloseChecksEpic_1 = require("./view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic");
|
|
@@ -393,7 +402,6 @@ const fetchEntityRecommendationsByTransactionIdEpic_1 = require("./view/recommen
|
|
|
393
402
|
const fetchEntityRecommendationsForLineUpdateEpic_1 = require("./view/recommendation/fetchEntityRecommendationsForLineUpdateEpic");
|
|
394
403
|
const fetchRecommendationByEntityIdEpic_1 = require("./view/recommendation/fetchRecommendationByEntityIdEpic");
|
|
395
404
|
const fetchRecommendationByEntityNameEpic_1 = require("./view/recommendation/fetchRecommendationByEntityNameEpic");
|
|
396
|
-
const submitRecommendationFeedbackEpic_1 = require("./view/recommendation/submitRecommendationFeedbackEpic");
|
|
397
405
|
const fetchReferralsEpic_1 = require("./view/referralView/epics/fetchReferralsEpic");
|
|
398
406
|
const fetchRewardsPlanEpic_1 = require("./view/referralView/epics/fetchRewardsPlanEpic");
|
|
399
407
|
const resendReferralInviteEpic_1 = require("./view/referralView/epics/resendReferralInviteEpic");
|
|
@@ -767,7 +775,7 @@ const ALL_EPICS = [
|
|
|
767
775
|
confirmBulkUploadMatchEpic_1.confirmBulkUploadMatchEpic,
|
|
768
776
|
confirmCardSetupIntentEpic_1.confirmCardSetupIntentEpic,
|
|
769
777
|
confirmStatementMappingEpic_1.confirmStatementMappingEpic,
|
|
770
|
-
|
|
778
|
+
settingsViewEpics_1.connectInvoicingStripeEpic,
|
|
771
779
|
convertAmountToHomeCurrencyEpic_1.convertAmountToHomeCurrencyEpic,
|
|
772
780
|
createAddressEpic_1.createAddressEpic,
|
|
773
781
|
createAutoTransferRuleEpic_1.createAutoTransferRuleEpic,
|
|
@@ -787,6 +795,7 @@ const ALL_EPICS = [
|
|
|
787
795
|
createNewSchedulesAccruedEpic_1.createNewSchedulesAccruedEpic,
|
|
788
796
|
createNewSchedulesEpic_1.createNewSchedulesEpic,
|
|
789
797
|
createNewTaskGroupEpic_1.createNewTaskGroupEpic,
|
|
798
|
+
createOneTimeAccrualEpic_1.createOneTimeAccrualEpic,
|
|
790
799
|
createInternationalPaymentInstrumentEpic_1.createPaymentInstrumentEpic,
|
|
791
800
|
createSessionAndSubmitEpic_1.createSessionAndSubmitEpic,
|
|
792
801
|
createSessionEpic_1.createSessionEpic,
|
|
@@ -819,7 +828,7 @@ const ALL_EPICS = [
|
|
|
819
828
|
deleteTransactionAttachmentEpic_1.deleteTransactionAttachmentEpic,
|
|
820
829
|
deleteUserBankAccountEpic_1.deleteUserBankAccountEpic,
|
|
821
830
|
disableAccountingProjectsEpic_1.disableAccountingProjectsEpic,
|
|
822
|
-
|
|
831
|
+
settingsViewEpics_1.disconnectInvoicingStripeEpic,
|
|
823
832
|
dismissCapitalizationOnboardingEpic_1.dismissCapitalizationOnboardingEpic,
|
|
824
833
|
doMagicLinkSignInEpic_1.doMagicLinkSignInEpic,
|
|
825
834
|
signInUserEpic_1.doSignInEpic,
|
|
@@ -958,6 +967,8 @@ const ALL_EPICS = [
|
|
|
958
967
|
fetchEntityRecommendationsByTransactionIdEpic_1.fetchEntityRecommendationsByTransactionIdEpic,
|
|
959
968
|
fetchEntityRecommendationsForLineUpdateEpic_1.fetchEntityRecommendationsForLineUpdateEpic,
|
|
960
969
|
fetchExcludedResourcesEpic_1.fetchExcludedResourcesEpic,
|
|
970
|
+
fetchActualMatchingEpic_1.fetchActualMatchingEpic,
|
|
971
|
+
fetchActualMatchingPageEpic_1.fetchActualMatchingPageEpic,
|
|
961
972
|
fetchFluxAnalysisViewEpic_1.fetchFluxAnalysisViewEpic,
|
|
962
973
|
initializeTransactionCategorizationLocalDataEpic_1.initializeTransactionCategorizationViewLocalDataEpic,
|
|
963
974
|
fetchJeSchedulesEpic_1.fetchJeSchedulesEpic,
|
|
@@ -1028,7 +1039,7 @@ const ALL_EPICS = [
|
|
|
1028
1039
|
customerPaymentMethodEpic_1.fetchInvoicingPlaidLinkTokenEpic,
|
|
1029
1040
|
fetchInvoicingQboConnectionEpic_1.fetchInvoicingQboConnectionEpic,
|
|
1030
1041
|
fetchInvoicingQboSyncHealthEpic_1.fetchInvoicingQboSyncHealthEpic,
|
|
1031
|
-
|
|
1042
|
+
settingsViewEpics_1.fetchInvoicingSettingsEpic,
|
|
1032
1043
|
fetchInvoicingSubscriptionCountsEpic_1.fetchInvoicingSubscriptionCountsEpic,
|
|
1033
1044
|
invoicingSubscriptionDetailViewEpics_1.fetchInvoicingSubscriptionDetailEpic,
|
|
1034
1045
|
fetchInvoicingSubscriptionFormPageEpic_1.fetchInvoicingSubscriptionFormPageEpic,
|
|
@@ -1066,6 +1077,7 @@ const ALL_EPICS = [
|
|
|
1066
1077
|
fetchOnboardingCustomerSetupViewEpic_1.fetchOnboardingCustomerSetupViewEpic,
|
|
1067
1078
|
fetchOnboardingCustomerViewEpic_1.fetchOnboardingCustomerViewEpic,
|
|
1068
1079
|
fetchOnboardingViewEpic_1.fetchOnboardingViewEpic,
|
|
1080
|
+
fetchOneTimeAccrualEpic_1.fetchOneTimeAccrualEpic,
|
|
1069
1081
|
fetchOpExByVendorReportEpic_1.fetchOpExByVendorEpic,
|
|
1070
1082
|
fetchOpExByVendorReportForTimeframeEpic_1.fetchOpExByVendorReportForTimeframeEpic,
|
|
1071
1083
|
fetchOpExByVendorReportSummaryEpic_1.fetchOpExByVendorReportSummaryEpic,
|
|
@@ -1220,6 +1232,7 @@ const ALL_EPICS = [
|
|
|
1220
1232
|
initializeInvoicingCustomerAddressEpic_1.initializeInvoicingCustomerAddressEpic,
|
|
1221
1233
|
initializeInvoicingSubscriptionAddressEpic_1.initializeInvoicingSubscriptionAddressEpic,
|
|
1222
1234
|
initializeMyProfileLocalDataEpic_1.initializeMyProfileLocalDataEpic,
|
|
1235
|
+
initializeNewScheduleEpic_1.initializeNewScheduleEpic,
|
|
1223
1236
|
initializeOnboardingCustomerViewUpdateDataEpic_1.initializeOnboardingCustomerViewUpdateDataEpic,
|
|
1224
1237
|
initializeRemiSetupApproverViewUpdateDataEpic_1.initializeRemiSetupApproverViewUpdateDataEpic,
|
|
1225
1238
|
initializeRemiToLocalStoreEpic_1.initializeRemiToLocalStoreEpic,
|
|
@@ -1241,7 +1254,9 @@ const ALL_EPICS = [
|
|
|
1241
1254
|
lockChargeCardsEpic_1.lockChargeCardsEpic,
|
|
1242
1255
|
markAsCompleteScheduleDetailEpic_1.markAsCompleteScheduleDetailEpic,
|
|
1243
1256
|
markTransactionAsNotMiscategorizedEpic_2.markTransactionAsNotMiscategorizedEpic,
|
|
1257
|
+
matchAndReverseAccrualsEpic_1.matchAndReverseAccrualsEpic,
|
|
1244
1258
|
notifyMeForFeatureEpic_1.notifyMeForFeatureEpic,
|
|
1259
|
+
oneTimeAccrualActionsEpic_1.oneTimeAccrualActionsEpic,
|
|
1245
1260
|
parallelFetchAccountTransactionListEpic_1.parallelFetchAccountTransactionListEpic,
|
|
1246
1261
|
parallelFetchClassTransactionListEpic_1.parallelFetchClassTransactionListEpic,
|
|
1247
1262
|
parallelFetchEntityTransactionListEpic_1.parallelFetchEntityTransactionListEpic,
|
|
@@ -1285,6 +1300,7 @@ const ALL_EPICS = [
|
|
|
1285
1300
|
retryJeSchedulesEpic_1.retryJeScheduleEpic,
|
|
1286
1301
|
retryInvoicingQboSyncTaskEpic_1.retryInvoicingQboSyncTaskEpic,
|
|
1287
1302
|
retryOrRefundBillEpic_1.retryOrRefundBillEpic,
|
|
1303
|
+
revertJeScheduleEpic_1.revertJeScheduleEpic,
|
|
1288
1304
|
reviewDraftRemisBulkActionEpic_ts_1.reviewDraftRemisBulkActionEpic,
|
|
1289
1305
|
reviewFluxAnalysisEpic_1.reviewFluxAnalysisViewEpic,
|
|
1290
1306
|
revokeCardInviteEpic_1.revokeCardInviteEpic,
|
|
@@ -1316,10 +1332,11 @@ const ALL_EPICS = [
|
|
|
1316
1332
|
saveInvoicingCouponEpic_1.saveInvoicingCouponEpic,
|
|
1317
1333
|
saveInvoicingCustomerEpic_1.saveInvoicingCustomerEpic,
|
|
1318
1334
|
customerPaymentMethodEpic_1.saveInvoicingPaymentMethodEpic,
|
|
1319
|
-
|
|
1335
|
+
settingsViewEpics_1.saveInvoicingSettingsEpic,
|
|
1320
1336
|
saveInvoicingSubscriptionEpic_1.saveInvoicingSubscriptionEpic,
|
|
1321
1337
|
saveMagicLinkBankAccountEpic_1.saveMagicLinkBankAccountEpic,
|
|
1322
1338
|
saveNewAddressEpic_1.saveNewAddressEpic,
|
|
1339
|
+
saveNewScheduleEpic_1.saveNewScheduleEpic,
|
|
1323
1340
|
saveNotificationPreferencesEpic_1.saveNotificationPreferencesEpic,
|
|
1324
1341
|
saveNotificationSettingsEpic_1.saveNotificationSettingsEpic,
|
|
1325
1342
|
saveOAuthConnectionEpic_1.saveOAuthConnectionEpic,
|
|
@@ -1343,7 +1360,10 @@ const ALL_EPICS = [
|
|
|
1343
1360
|
saveVendorFirstReviewViewEpic_1.saveVendorFirstReviewViewEpic,
|
|
1344
1361
|
saveVendorsTabVendorEpic_1.saveVendorsTabVendorEpic,
|
|
1345
1362
|
scheduleTenantCreditScoreCronEpic_1.scheduleTenantCreditScoreCronEpic,
|
|
1363
|
+
searchMatchAccrualsEpic_1.searchMatchAccrualsEpic,
|
|
1364
|
+
searchMatchTransactionsEpic_1.searchMatchTransactionsEpic,
|
|
1346
1365
|
searchTransactionsForManualMatchEpic_1.searchTransactionsForManualMatchEpic,
|
|
1366
|
+
searchTransactionsForNewScheduleEpic_1.searchTransactionsForNewScheduleEpic,
|
|
1347
1367
|
seedAiCardCreationFormDraftEpic_1.seedAiCardCreationFormDraftEpic,
|
|
1348
1368
|
seedAiCardPolicyFormDraftEpic_1.seedAiCardPolicyFormDraftEpic,
|
|
1349
1369
|
sendCompanyMonthEndReportEpic_1.sendCompanyMonthEndReportEpic,
|
|
@@ -1365,9 +1385,8 @@ const ALL_EPICS = [
|
|
|
1365
1385
|
submitFeedbackEpic_1.submitFeedbackEpic,
|
|
1366
1386
|
submitIntlVerificationEpic_1.submitIntlVerificationEpic,
|
|
1367
1387
|
invoicingBrandingFormEpics_1.submitInvoicingBrandingFormEpic,
|
|
1368
|
-
submitInvoicingQboSettingsEpic_1.submitInvoicingQboSettingsEpic,
|
|
1369
1388
|
submitQuestionEpic_1.submitQuestionEpic,
|
|
1370
|
-
|
|
1389
|
+
switchJESchedulesTabEpic_1.switchJESchedulesTabEpic,
|
|
1371
1390
|
syncInvoicingSubscriptionCouponsEpic_1.syncInvoicingSubscriptionCouponsEpic,
|
|
1372
1391
|
syncTabsAfterAutomatchEpic_1.syncTabsAfterAutomatchEpic,
|
|
1373
1392
|
toggleReportUIOptionForecastModeEpic_1.toggleReportUIOptionForecastModeEpic,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { toAccountPayload } from '../account/accountPayload';
|
|
2
1
|
export const INVOICING_DUNNING_ACTIONS = [
|
|
3
2
|
'email_only',
|
|
4
3
|
'email_and_retry',
|
|
@@ -130,46 +129,87 @@ export function toInvoicingQboCustomerMatchingMode(value) {
|
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
131
|
/**
|
|
133
|
-
* The
|
|
134
|
-
*
|
|
135
|
-
*
|
|
132
|
+
* The id for one mapping slot, from whichever shape the backend sent. The object
|
|
133
|
+
* form wins when present; a blank id in either is treated as unset so the picker
|
|
134
|
+
* shows its placeholder rather than selecting nothing.
|
|
136
135
|
*/
|
|
137
|
-
|
|
136
|
+
function readInvoicingQboMappedAccountId(mappedAccount, legacyAccountId) {
|
|
137
|
+
// `qbo_id` first: the pickers key their options on the QuickBooks id, so an
|
|
138
|
+
// internal `account_id` would not select anything even when it is the same
|
|
139
|
+
// account. Both are read because the mapping arrives either way depending on
|
|
140
|
+
// how it was saved.
|
|
141
|
+
const candidates = [
|
|
142
|
+
mappedAccount?.qbo_id,
|
|
143
|
+
mappedAccount?.account_id,
|
|
144
|
+
legacyAccountId,
|
|
145
|
+
];
|
|
146
|
+
return candidates.find((candidate) => candidate != null && candidate !== '');
|
|
147
|
+
}
|
|
138
148
|
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* the older `deposit_account_id` resolves to the same mapping.
|
|
149
|
+
* Read one account-mapping dropdown value by its config `code` (the codes in
|
|
150
|
+
* `qbo_account_mapping_kind_options` match the `account_mappings` field names).
|
|
142
151
|
*/
|
|
143
|
-
export const toInvoicingQboAccountMappingSlot = (code) => code.replace(/_id$/, '');
|
|
144
|
-
/** Read one account-mapping dropdown value by its config `code`. */
|
|
145
152
|
export function getInvoicingQboAccountMappingId(accountMappings, code) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
switch (code) {
|
|
154
|
+
case 'deposit_account_id':
|
|
155
|
+
return readInvoicingQboMappedAccountId(accountMappings?.deposit_account, accountMappings?.deposit_account_id);
|
|
156
|
+
case 'default_income_account_id':
|
|
157
|
+
return readInvoicingQboMappedAccountId(accountMappings?.default_income_account, accountMappings?.default_income_account_id);
|
|
158
|
+
case 'discounts_account_id':
|
|
159
|
+
return readInvoicingQboMappedAccountId(accountMappings?.discounts_account, accountMappings?.discounts_account_id);
|
|
160
|
+
case 'rounding_account_id':
|
|
161
|
+
return readInvoicingQboMappedAccountId(accountMappings?.rounding_account, accountMappings?.rounding_account_id);
|
|
162
|
+
case 'write_off_account_id':
|
|
163
|
+
return readInvoicingQboMappedAccountId(accountMappings?.write_off_account, accountMappings?.write_off_account_id);
|
|
164
|
+
default:
|
|
165
|
+
return undefined;
|
|
152
166
|
}
|
|
153
|
-
return firstSelectableInvoicingId([slot?.qbo_id, slot?.account_id]);
|
|
154
167
|
}
|
|
155
168
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* id that resolves to no account is sent as it stands rather than dropped, so a
|
|
159
|
-
* save never silently unsets a mapping it could not expand.
|
|
169
|
+
* Return a copy of the account mappings with the dropdown slot named by
|
|
170
|
+
* `code` set to `accountId`. Unknown codes leave the mappings unchanged.
|
|
160
171
|
*/
|
|
161
|
-
export
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
export function withInvoicingQboAccountMappingId(accountMappings, code, accountId) {
|
|
173
|
+
// Both slots are written together. Setting only the bare id would leave the
|
|
174
|
+
// object shape behind, and the reader prefers it — so the selection just made
|
|
175
|
+
// would read back as whatever was mapped before. The object is dropped rather
|
|
176
|
+
// than rebuilt: only the id is known here, not the name that came with it.
|
|
177
|
+
const base = accountMappings ?? {};
|
|
178
|
+
switch (code) {
|
|
179
|
+
case 'deposit_account_id':
|
|
180
|
+
return {
|
|
181
|
+
...base,
|
|
182
|
+
deposit_account: undefined,
|
|
183
|
+
deposit_account_id: accountId,
|
|
184
|
+
};
|
|
185
|
+
case 'default_income_account_id':
|
|
186
|
+
return {
|
|
187
|
+
...base,
|
|
188
|
+
default_income_account: undefined,
|
|
189
|
+
default_income_account_id: accountId,
|
|
190
|
+
};
|
|
191
|
+
case 'discounts_account_id':
|
|
192
|
+
return {
|
|
193
|
+
...base,
|
|
194
|
+
discounts_account: undefined,
|
|
195
|
+
discounts_account_id: accountId,
|
|
196
|
+
};
|
|
197
|
+
case 'rounding_account_id':
|
|
198
|
+
return {
|
|
199
|
+
...base,
|
|
200
|
+
rounding_account: undefined,
|
|
201
|
+
rounding_account_id: accountId,
|
|
202
|
+
};
|
|
203
|
+
case 'write_off_account_id':
|
|
204
|
+
return {
|
|
205
|
+
...base,
|
|
206
|
+
write_off_account: undefined,
|
|
207
|
+
write_off_account_id: accountId,
|
|
208
|
+
};
|
|
209
|
+
default:
|
|
210
|
+
return base;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
173
213
|
export function toInvoicingQboAccountMappingKindOption(option) {
|
|
174
214
|
return {
|
|
175
215
|
accountTypes: option.account_types,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { toAmount } from '../../../commonStateTypes/amount';
|
|
2
2
|
import { defaultCustomerCurrency } from '../../../commonStateTypes/currencyHelper';
|
|
3
3
|
import { date } from '../../../zeniDayJS';
|
|
4
|
-
import { firstSelectableInvoicingId } from '../invoicingCommonPayload';
|
|
5
4
|
// ── Payload → State mappers (snake_case wire shape → camelCase domain shape) ──
|
|
6
5
|
export const mapInvoicingPlanTierPayloadToState = (payload, currencyCode, currencySymbol) => ({
|
|
7
6
|
price: toAmount(payload.price, currencyCode, currencySymbol),
|
|
@@ -11,22 +10,11 @@ export const mapInvoicingPlanTierPayloadToState = (payload, currencyCode, curren
|
|
|
11
10
|
pricingType: payload.pricing_type,
|
|
12
11
|
});
|
|
13
12
|
const mapInvoicingAccountingDetailPayloadToState = (payload) => ({
|
|
14
|
-
|
|
15
|
-
// documents: the form's pickers are keyed on it, so reading the internal id
|
|
16
|
-
// would leave the field blank over a mapping that exists.
|
|
17
|
-
accountingCategory1: firstSelectableInvoicingId([
|
|
18
|
-
payload.accounting_class?.qbo_id,
|
|
19
|
-
payload.accounting_class?.accounting_class_id,
|
|
20
|
-
payload.accounting_category_1,
|
|
21
|
-
]),
|
|
13
|
+
accountingCategory1: payload.accounting_category_1,
|
|
22
14
|
accountingCategory2: payload.accounting_category_2,
|
|
23
15
|
accountingCategory3: payload.accounting_category_3,
|
|
24
16
|
accountingCategory4: payload.accounting_category_4,
|
|
25
|
-
accountingCode:
|
|
26
|
-
payload.account?.qbo_id,
|
|
27
|
-
payload.account?.account_id,
|
|
28
|
-
payload.accounting_code,
|
|
29
|
-
]),
|
|
17
|
+
accountingCode: payload.accounting_code,
|
|
30
18
|
sku: payload.sku,
|
|
31
19
|
});
|
|
32
20
|
export const mapInvoicingProductPayloadToState = (payload) => {
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export function generateJEScheduleKey(jeScheduleId, jeScheduleType) {
|
|
2
2
|
return `${jeScheduleId}_${jeScheduleType}`;
|
|
3
3
|
}
|
|
4
|
+
// Suffixed rather than using the bare Mongo _id so the key is a distinct type from
|
|
5
|
+
// JEScheduleKey / JEScheduleTransactionKey and the three cannot be passed interchangeably.
|
|
6
|
+
// The unsuffixed id stays on the entity as `accrualId` for callers that need it.
|
|
7
|
+
export function generateJEOneTimeAccrualKey(accrualId) {
|
|
8
|
+
return `${accrualId}_one_time_accrual`;
|
|
9
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { toAmount } from '../../commonStateTypes/amount';
|
|
2
2
|
import { LAST_SCHEDULE_DAY_OF_MONTH, MAX_SCHEDULE_DAY_OF_MONTH, MIN_SCHEDULE_DAY_OF_MONTH, toScheduleDaysOfMonth, } from '../../commonStateTypes/timePeriod';
|
|
3
3
|
import { date } from '../../zeniDayJS';
|
|
4
|
+
import { toZeniUrl } from '../../zeniUrl';
|
|
4
5
|
import { toTransactionID, } from '../transaction/payloadTypes/transactionIDPayload';
|
|
5
6
|
import { generateJEScheduleKey } from './jeScheduleHelper';
|
|
6
|
-
import { getJEScheduleTransactionKey, toJournalEntryErrorCodeType, toScheduleJournalEntryStatusCodeType, toScheduleStatusCodeType, toScheduleTypesTypeStrict, } from './jeSchedulesTypes';
|
|
7
|
+
import { getJEScheduleTransactionKey, toJournalEntryErrorCodeType, toOneTimeAccrualAutomationTierType, toOneTimeAccrualOriginType, toOneTimeAccrualReversalPolicyType, toOneTimeAccrualReversalTriggerType, toOneTimeAccrualStatusCodeType, toScheduleJournalEntryStatusCodeType, toScheduleStatusCodeType, toScheduleTypesTypeStrict, } from './jeSchedulesTypes';
|
|
8
|
+
const USD_CURRENCY_CODE = 'USD';
|
|
7
9
|
export function toScheduledJournalEntryState(payload, currency_code, currency_symbol) {
|
|
8
10
|
return {
|
|
9
11
|
status: {
|
|
@@ -202,6 +204,43 @@ function toJEScheduleAISummaries(payload) {
|
|
|
202
204
|
: undefined,
|
|
203
205
|
};
|
|
204
206
|
}
|
|
207
|
+
if (payload.starting_month != null) {
|
|
208
|
+
result.startingMonth = {
|
|
209
|
+
confidence: payload.starting_month.confidence,
|
|
210
|
+
reasoning: payload.starting_month.reasoning,
|
|
211
|
+
cot: Array.isArray(payload.starting_month.cot)
|
|
212
|
+
? payload.starting_month.cot
|
|
213
|
+
: undefined,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
if (payload.end_date != null) {
|
|
217
|
+
result.endDate = {
|
|
218
|
+
confidence: payload.end_date.confidence,
|
|
219
|
+
reasoning: payload.end_date.reasoning,
|
|
220
|
+
cot: Array.isArray(payload.end_date.cot)
|
|
221
|
+
? payload.end_date.cot
|
|
222
|
+
: undefined,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (payload.posting_start_date != null) {
|
|
226
|
+
result.postingStartDate = {
|
|
227
|
+
confidence: payload.posting_start_date.confidence,
|
|
228
|
+
reasoning: payload.posting_start_date.reasoning,
|
|
229
|
+
cot: Array.isArray(payload.posting_start_date.cot)
|
|
230
|
+
? payload.posting_start_date.cot
|
|
231
|
+
: undefined,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
if (payload.schedule_summary != null) {
|
|
235
|
+
result.scheduleSummary = {
|
|
236
|
+
confidence: payload.schedule_summary.confidence,
|
|
237
|
+
reasoning: payload.schedule_summary.reasoning,
|
|
238
|
+
reasoningLong: payload.schedule_summary.reasoning_long,
|
|
239
|
+
cot: Array.isArray(payload.schedule_summary.cot)
|
|
240
|
+
? payload.schedule_summary.cot
|
|
241
|
+
: undefined,
|
|
242
|
+
};
|
|
243
|
+
}
|
|
205
244
|
return Object.keys(result).length > 0 ? result : undefined;
|
|
206
245
|
}
|
|
207
246
|
function toJEScheduleRecommendations(payload) {
|
|
@@ -248,9 +287,18 @@ export function toJEScheduledTransaction(payload) {
|
|
|
248
287
|
startDate: payload.start_date != null ? date(payload.start_date) : undefined,
|
|
249
288
|
endDate: payload.end_date != null ? date(payload.end_date) : undefined,
|
|
250
289
|
period: payload.period != null ? Number(payload.period) : undefined,
|
|
290
|
+
recurringAmount: payload.recurring_amount != null
|
|
291
|
+
? {
|
|
292
|
+
amount: payload.recurring_amount,
|
|
293
|
+
currencyCode: payload.currency_code,
|
|
294
|
+
currencySymbol: payload.currency_symbol,
|
|
295
|
+
}
|
|
296
|
+
: undefined,
|
|
297
|
+
postedCount: payload.posted_count ?? undefined,
|
|
251
298
|
updatedByUserID: payload.updated_by.user_id,
|
|
252
299
|
balanceAsOfToday: payload.balance ?? undefined,
|
|
253
300
|
updatedAt: payload.updated_at != null ? date(payload.updated_at) : undefined,
|
|
301
|
+
createTime: payload.create_time != null ? date(payload.create_time) : undefined,
|
|
254
302
|
jeCredit: {
|
|
255
303
|
accountId: payload.je_credit_account_id ?? undefined,
|
|
256
304
|
accountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
@@ -275,6 +323,7 @@ export function toJEScheduledTransaction(payload) {
|
|
|
275
323
|
: {},
|
|
276
324
|
scheduledJournalEntry: [],
|
|
277
325
|
aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
|
|
326
|
+
confidenceScore: payload.confidence_score ?? undefined,
|
|
278
327
|
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
279
328
|
recommendations: toJEScheduleRecommendations(payload.recommendations),
|
|
280
329
|
};
|
|
@@ -306,6 +355,9 @@ export function toJEAccruedScheduledTransaction(payload) {
|
|
|
306
355
|
endDate: payload.end_date != null ? date(payload.end_date) : undefined,
|
|
307
356
|
period: payload.period != null ? Number(payload.period) : undefined,
|
|
308
357
|
updatedByUserID: payload.updated_by.user_id,
|
|
358
|
+
// The accrued joiner resolves createdByUserID into the "Created by" cell. Without this the
|
|
359
|
+
// payload's created_by was dropped here and every accrued row rendered a hyphen.
|
|
360
|
+
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
309
361
|
balanceAsOfToday: payload.balance ?? undefined,
|
|
310
362
|
updatedAt: payload.updated_at != null ? date(payload.updated_at) : undefined,
|
|
311
363
|
jeCredit: {
|
|
@@ -332,3 +384,159 @@ export function toJEAccruedScheduledTransaction(payload) {
|
|
|
332
384
|
jeScheduleType: toScheduleTypesTypeStrict(payload.je_schedule_type),
|
|
333
385
|
};
|
|
334
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Reads the months in the order the snapshot gives them rather than deriving a range: a vendor that
|
|
389
|
+
* skipped a month has no entry for it, so filling gaps would invent history that was never billed.
|
|
390
|
+
*/
|
|
391
|
+
function toJEOneTimeAccrualMonthlyTotals(snapshot, currencyCode) {
|
|
392
|
+
const monthlyTotals = snapshot.monthly_totals;
|
|
393
|
+
if (monthlyTotals == null) {
|
|
394
|
+
return [];
|
|
395
|
+
}
|
|
396
|
+
const months = snapshot.sorted_months ?? Object.keys(monthlyTotals).sort();
|
|
397
|
+
return months
|
|
398
|
+
.filter((month) => monthlyTotals[month] != null)
|
|
399
|
+
.map((month) => ({
|
|
400
|
+
month,
|
|
401
|
+
amount: toOneTimeAccrualAmount(monthlyTotals[month], currencyCode),
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
function toJEOneTimeAccrualProfileSnapshot(payload, currencyCode) {
|
|
405
|
+
if (payload == null) {
|
|
406
|
+
return undefined;
|
|
407
|
+
}
|
|
408
|
+
const billingPattern = payload.billing_pattern;
|
|
409
|
+
return {
|
|
410
|
+
monthlyTotals: toJEOneTimeAccrualMonthlyTotals(payload, currencyCode),
|
|
411
|
+
billingPattern: billingPattern != null
|
|
412
|
+
? {
|
|
413
|
+
frequency: billingPattern.frequency ?? undefined,
|
|
414
|
+
monthsOfHistory: billingPattern.months_of_history ?? undefined,
|
|
415
|
+
consistencyScore: billingPattern.consistency_score ?? undefined,
|
|
416
|
+
billingLagDays: billingPattern.billing_lag_days ?? undefined,
|
|
417
|
+
typicalBillDay: billingPattern.typical_bill_day ?? undefined,
|
|
418
|
+
avgAmount: billingPattern.avg_amount != null
|
|
419
|
+
? toOneTimeAccrualAmount(billingPattern.avg_amount, currencyCode)
|
|
420
|
+
: undefined,
|
|
421
|
+
lastBillAmount: billingPattern.last_bill_amount != null
|
|
422
|
+
? toOneTimeAccrualAmount(billingPattern.last_bill_amount, currencyCode)
|
|
423
|
+
: undefined,
|
|
424
|
+
lastBillDate: billingPattern.last_bill_date != null
|
|
425
|
+
? date(billingPattern.last_bill_date)
|
|
426
|
+
: undefined,
|
|
427
|
+
}
|
|
428
|
+
: undefined,
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
function toJEOneTimeAccrualAiSuggestion(payload, currencyCode) {
|
|
432
|
+
if (payload == null) {
|
|
433
|
+
return undefined;
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
memo: payload.memo ?? undefined,
|
|
437
|
+
jeDebitAccountName: payload.je_debit_account_name ?? undefined,
|
|
438
|
+
jeCreditAccountName: payload.je_credit_account_name ?? undefined,
|
|
439
|
+
estimatedAmount: payload.estimated_amount != null
|
|
440
|
+
? toOneTimeAccrualAmount(payload.estimated_amount, currencyCode)
|
|
441
|
+
: undefined,
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function toJEOneTimeAccrualCleared(payload, currencyCode) {
|
|
445
|
+
if (payload == null) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
return {
|
|
449
|
+
matchedTransactionIntegrationId: payload.matched_transaction_integration_id ?? undefined,
|
|
450
|
+
matchedTransactionId: payload.matched_transaction_id ?? undefined,
|
|
451
|
+
matchedTransactionType: payload.matched_transaction_type ?? undefined,
|
|
452
|
+
matchedLineId: payload.matched_line_id ?? undefined,
|
|
453
|
+
consumedLineIds: payload.consumed_line_ids ?? undefined,
|
|
454
|
+
matchedAmount: payload.matched_amount != null
|
|
455
|
+
? toOneTimeAccrualAmount(payload.matched_amount, currencyCode)
|
|
456
|
+
: undefined,
|
|
457
|
+
reversedAt: payload.reversed_at != null ? date(payload.reversed_at) : undefined,
|
|
458
|
+
matchTier: payload.match_tier ?? undefined,
|
|
459
|
+
matchShape: payload.match_shape ?? undefined,
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function toJEOneTimeAccrualMatchSuggestion(payload, currencyCode) {
|
|
463
|
+
if (payload == null) {
|
|
464
|
+
return undefined;
|
|
465
|
+
}
|
|
466
|
+
return {
|
|
467
|
+
resolution: payload.resolution ?? undefined,
|
|
468
|
+
matchedTransactionIntegrationId: payload.matched_transaction_integration_id ?? undefined,
|
|
469
|
+
matchedTransactionId: payload.matched_transaction_id ?? undefined,
|
|
470
|
+
matchedTransactionType: payload.matched_transaction_type ?? undefined,
|
|
471
|
+
matchedAmount: payload.matched_amount != null
|
|
472
|
+
? toOneTimeAccrualAmount(payload.matched_amount, currencyCode)
|
|
473
|
+
: undefined,
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
export function toJEOneTimeAccrual(payload) {
|
|
477
|
+
return {
|
|
478
|
+
accrualId: payload._id,
|
|
479
|
+
vendorId: payload.vendor_id,
|
|
480
|
+
vendorName: payload.vendor_name,
|
|
481
|
+
serviceMonth: payload.service_month,
|
|
482
|
+
accrualStatus: toOneTimeAccrualStatusCodeType(payload.status),
|
|
483
|
+
origin: toOneTimeAccrualOriginType(payload.origin),
|
|
484
|
+
automationTier: payload.automation_tier != null
|
|
485
|
+
? toOneTimeAccrualAutomationTierType(payload.automation_tier)
|
|
486
|
+
: undefined,
|
|
487
|
+
estimatedAmount: toOneTimeAccrualAmount(payload.estimated_amount, payload.currency),
|
|
488
|
+
memo: payload.memo ?? '',
|
|
489
|
+
profileSnapshot: toJEOneTimeAccrualProfileSnapshot(payload.profile_snapshot, payload.currency),
|
|
490
|
+
aiSuggestion: toJEOneTimeAccrualAiSuggestion(payload.ai_suggestion, payload.currency),
|
|
491
|
+
cleared: toJEOneTimeAccrualCleared(payload.cleared, payload.currency),
|
|
492
|
+
matchSuggestion: toJEOneTimeAccrualMatchSuggestion(payload.match_suggestion, payload.currency),
|
|
493
|
+
// Exclusive by contract: a scheduled row reverses on expectedReversalDate and bills never
|
|
494
|
+
// drive it, so the two never need reconciling. Defaulting to on_bill_match matches the
|
|
495
|
+
// create path's default when the field is absent on an older document.
|
|
496
|
+
reversalPolicy: toOneTimeAccrualReversalPolicyType(payload.reversal_policy ?? 'on_bill_match'),
|
|
497
|
+
reversalTrigger: toOneTimeAccrualReversalTriggerType(payload.reversal_trigger ?? undefined),
|
|
498
|
+
expectedReversalDate: payload.expected_reversal_date != null
|
|
499
|
+
? date(payload.expected_reversal_date)
|
|
500
|
+
: undefined,
|
|
501
|
+
postingDate: payload.posting_date != null ? date(payload.posting_date) : undefined,
|
|
502
|
+
actualPostDate: payload.actual_post_date != null
|
|
503
|
+
? date(payload.actual_post_date)
|
|
504
|
+
: undefined,
|
|
505
|
+
actualReversalPostDate: payload.actual_reversal_post_date != null
|
|
506
|
+
? date(payload.actual_reversal_post_date)
|
|
507
|
+
: undefined,
|
|
508
|
+
jeDebitAccountId: payload.je_debit_account_id ?? undefined,
|
|
509
|
+
jeDebitAccountName: payload.je_debit_account_name ?? undefined,
|
|
510
|
+
jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
|
|
511
|
+
jeDebitAccountingClassName: payload.je_debit_accounting_class_name ?? undefined,
|
|
512
|
+
jeCreditAccountId: payload.je_credit_account_id ?? undefined,
|
|
513
|
+
jeCreditAccountName: payload.je_credit_account_name ?? undefined,
|
|
514
|
+
jeCreditAccountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
515
|
+
jeCreditAccountingClassName: payload.je_credit_accounting_class_name ?? undefined,
|
|
516
|
+
transactionId: payload.transaction_id ?? undefined,
|
|
517
|
+
transactionIntegrationId: payload.transaction_integration_id ?? undefined,
|
|
518
|
+
reversalTransactionId: payload.reversal_transaction_id ?? undefined,
|
|
519
|
+
createdBy: toJEOneTimeAccrualCreator(payload.created_by_user),
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
// The accrual wire format carries a currency CODE but no symbol, so the symbol has to be derived.
|
|
523
|
+
// Only USD has a known glyph today (the create path is USD-only); anything else falls back to the
|
|
524
|
+
// code, which reads correctly as "EUR 1,200" rather than silently rendering a wrong "$".
|
|
525
|
+
function toOneTimeAccrualAmount(amount, currencyCode) {
|
|
526
|
+
const code = currencyCode ?? USD_CURRENCY_CODE;
|
|
527
|
+
return toAmount(amount, code, code === USD_CURRENCY_CODE ? '$' : code);
|
|
528
|
+
}
|
|
529
|
+
function toJEOneTimeAccrualCreator(payload) {
|
|
530
|
+
if (payload == null) {
|
|
531
|
+
return undefined;
|
|
532
|
+
}
|
|
533
|
+
return {
|
|
534
|
+
userId: payload.user_id,
|
|
535
|
+
email: payload.email ?? undefined,
|
|
536
|
+
firstName: payload.first_name ?? undefined,
|
|
537
|
+
lastName: payload.last_name ?? undefined,
|
|
538
|
+
photo: payload.photo?.original != null
|
|
539
|
+
? toZeniUrl(payload.photo.original)
|
|
540
|
+
: undefined,
|
|
541
|
+
};
|
|
542
|
+
}
|
|
@@ -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 {
|
|
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
|