@zeniai/client-epic-state 4.20.9-betaRR12 → 4.20.9
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -3
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountReducer.d.ts +2 -5
- package/lib/entity/account/accountReducer.js +2 -7
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +2 -5
- package/lib/entity/tenant/tenantReducer.js +2 -9
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -9
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -11
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -12
- package/lib/epic.js +1 -12
- package/lib/esm/commonStateTypes/animations.js +0 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/esm/entity/tenant/tenantReducer.js +1 -8
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/esm/epic.js +1 -12
- package/lib/esm/index.js +13 -16
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +1 -19
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/esm/view/companyView/companyViewReducer.js +1 -26
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -21
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -15
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -24
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/lib/index.d.ts +19 -26
- package/lib/index.js +32 -62
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +2 -20
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -4
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +1 -9
- package/lib/view/companyView/companyViewReducer.d.ts +1 -6
- package/lib/view/companyView/companyViewReducer.js +2 -28
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -22
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -13
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -27
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +1 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/package.json +1 -1
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -17
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -26
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -199
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -52
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -1
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -100
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -48
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -36
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -45
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -50
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -69
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +0 -7
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -21
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +0 -75
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -30
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +0 -50
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -206
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +0 -24
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -61
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +0 -38
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -2
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +0 -12
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -106
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -40
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +0 -10
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -54
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -73
|
@@ -21,13 +21,13 @@ export const fetchJeSchedulesEpic = (actions$, state$, zeniAPI) => actions$.pipe
|
|
|
21
21
|
if (isSuccessResponse(response) && response.data != null) {
|
|
22
22
|
const updateActions = [];
|
|
23
23
|
updateActions.push(updateJESchedules([
|
|
24
|
-
...response.data.
|
|
24
|
+
...response.data.draft_je_schedules,
|
|
25
25
|
...response.data.failed_je_postings.je_schedules,
|
|
26
26
|
]), updateJESchedulesDetails([...response.data.failed_je_postings.je_schedules], response.data.failed_je_postings.scheduled_journal_entries), initializeJeScheduleLocalData([
|
|
27
27
|
...response.data.failed_je_postings.je_schedules,
|
|
28
28
|
]));
|
|
29
29
|
updateActions.push(fetchJeSchedulesSuccess({
|
|
30
|
-
jeSchedules: [...response.data.
|
|
30
|
+
jeSchedules: [...response.data.draft_je_schedules],
|
|
31
31
|
failedJeSchedules: [
|
|
32
32
|
...response.data.failed_je_postings.je_schedules,
|
|
33
33
|
],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { concat, of, timer } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
4
|
import { BULK_UPLOAD_BAR_COMPLETE_HOLD_MS } from '../../helpers/bulkUploadTiming';
|
|
5
5
|
import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, updateBulkUploadProgress, } from '../../reducers/missingReceiptsViewReducer';
|
|
6
|
-
export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceipts.match),
|
|
6
|
+
export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceipts.match), mergeMap((action) => {
|
|
7
7
|
const { files } = action.payload;
|
|
8
8
|
const formData = new FormData();
|
|
9
9
|
for (const file of files) {
|
package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js
CHANGED
|
@@ -54,8 +54,7 @@ export const pollBulkUploadBatchStatusEpic = (actions$, _state$, zeniAPI) => act
|
|
|
54
54
|
const firstDelay = restoreBulkUploadMatchingState.match(action)
|
|
55
55
|
? RESTORE_FIRST_DELAY_MS
|
|
56
56
|
: FALLBACK_FIRST_DELAY_MS;
|
|
57
|
-
return timer(firstDelay, FALLBACK_POLL_INTERVAL_MS).pipe(takeUntil(merge(actions$.pipe(filter(clearBulkUpload.match)), actions$.pipe(filter(pusherBatchStatusUpdate.match), filter((action) => action.payload.batchId === batchId
|
|
58
|
-
action.payload.status === 'completed')), actions$.pipe(filter(fetchBulkUploadBatchDetailsSuccess.match), filter((action) => action.payload.batchId === batchId)), actions$.pipe(filter(bulkUploadAutomatchingTimedOut.match), filter((action) => action.payload.batchId === batchId)))), switchMap(() => zeniAPI
|
|
57
|
+
return timer(firstDelay, FALLBACK_POLL_INTERVAL_MS).pipe(takeUntil(merge(actions$.pipe(filter(clearBulkUpload.match)), actions$.pipe(filter(pusherBatchStatusUpdate.match), filter((action) => action.payload.batchId === batchId)), actions$.pipe(filter(fetchBulkUploadBatchDetailsSuccess.match), filter((action) => action.payload.batchId === batchId)), actions$.pipe(filter(bulkUploadAutomatchingTimedOut.match), filter((action) => action.payload.batchId === batchId)))), switchMap(() => zeniAPI
|
|
59
58
|
.getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${batchId}`)
|
|
60
59
|
.pipe(mergeMap((response) => {
|
|
61
60
|
/** Same batch-details URL; polls until `status` is completed (Pusher may win first). */
|
|
@@ -91,6 +91,7 @@ export function getExpenseAutomationView(state) {
|
|
|
91
91
|
const fetchStateVariables = [
|
|
92
92
|
expenseAutomationMissingReceiptsViewState,
|
|
93
93
|
expenseAutomationJESchedulesViewState,
|
|
94
|
+
monthEndCloseChecksView,
|
|
94
95
|
expenseAutomationTransactionsView,
|
|
95
96
|
expenseAutomationReconciliationViewState,
|
|
96
97
|
];
|
|
@@ -64,8 +64,8 @@ export const toTransactionUpdatesFromTransactionCategorizationLocalData = (trans
|
|
|
64
64
|
lineItem.account?.qboId !== accountLine.account.qboId &&
|
|
65
65
|
Boolean(lineItem.account?.qboId);
|
|
66
66
|
hasClassChanged =
|
|
67
|
-
(lineItem.class?.qboId
|
|
68
|
-
lineItem.class?.qboId !== accountLine.class
|
|
67
|
+
Boolean(lineItem.class?.qboId) &&
|
|
68
|
+
lineItem.class?.qboId !== accountLine.class.qboId;
|
|
69
69
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
70
70
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
71
71
|
if (entityDetails != null &&
|
package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js
CHANGED
|
@@ -234,7 +234,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
234
234
|
isPreFilled: true,
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
if (
|
|
237
|
+
if (accountLine.class.classId === '' &&
|
|
238
238
|
higherPreferenceRecommendation?.class != null) {
|
|
239
239
|
record.class = {
|
|
240
240
|
...higherPreferenceRecommendation.class,
|
|
@@ -464,7 +464,7 @@ export const setEntityRecommendationForLineIdInLocalData = (draft, transaction,
|
|
|
464
464
|
}
|
|
465
465
|
: accountLine.account;
|
|
466
466
|
record.class =
|
|
467
|
-
|
|
467
|
+
accountLine.class.classId !== ''
|
|
468
468
|
? accountLine.class
|
|
469
469
|
: recommendations?.[0]?.class
|
|
470
470
|
? {
|
|
@@ -44,9 +44,6 @@ export const initialState = {
|
|
|
44
44
|
uiState: {
|
|
45
45
|
searchString: '',
|
|
46
46
|
scrollPosition: { scrollTop: 0, scrollLeft: undefined },
|
|
47
|
-
selectedMainTab: 'pending_review',
|
|
48
|
-
sortKey: 'transactionDate',
|
|
49
|
-
sortOrder: 'descending',
|
|
50
47
|
totalCount: 0,
|
|
51
48
|
limit: 10,
|
|
52
49
|
},
|
|
@@ -368,29 +365,12 @@ const expenseAutomationJESchedulesView = createSlice({
|
|
|
368
365
|
clearJeAccountSettingsLocalData(draft) {
|
|
369
366
|
draft.accountSettings.localData = accountSettingsInitialState.localData;
|
|
370
367
|
},
|
|
371
|
-
updateJESchedulesUIState(draft, action) {
|
|
372
|
-
if (action.payload.sortKey != null) {
|
|
373
|
-
draft.uiState.sortKey = action.payload.sortKey;
|
|
374
|
-
}
|
|
375
|
-
if (action.payload.sortOrder != null) {
|
|
376
|
-
draft.uiState.sortOrder = action.payload.sortOrder;
|
|
377
|
-
}
|
|
378
|
-
if (action.payload.searchString != null) {
|
|
379
|
-
draft.uiState.searchString = action.payload.searchString;
|
|
380
|
-
}
|
|
381
|
-
if (action.payload.scrollPosition != null) {
|
|
382
|
-
draft.uiState.scrollPosition = action.payload.scrollPosition;
|
|
383
|
-
}
|
|
384
|
-
if (action.payload.selectedMainTab != null) {
|
|
385
|
-
draft.uiState.selectedMainTab = action.payload.selectedMainTab;
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
368
|
clearExpenseAutomationJESchedulesView(draft) {
|
|
389
369
|
Object.assign(draft, initialState);
|
|
390
370
|
},
|
|
391
371
|
},
|
|
392
372
|
});
|
|
393
|
-
export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure,
|
|
373
|
+
export const { clearExpenseAutomationJESchedulesView, clearJeAccountSettingsLocalData, clearJeScheduleLocalData, fetchAccountSettingsListForAccountTypes, fetchJeSchedules, fetchJeSchedulesFailure, fetchJeSchedulesPage, fetchJeSchedulesSuccess, fetchRecommendationForAccountSettings, ignoreRecommendedJeSchedule, ignoreRecommendedJeScheduleFailure, ignoreRecommendedJeScheduleSuccess, initializeAccountSettingsView, initializeJeScheduleLocalData, removeFailedJeScheduleTransactionKey, removeJeScheduleLocalDataById, removeJeScheduleTransactionKey, retryJeSchedule, retryJeScheduleFailure, retryJeScheduleSuccess, saveAccountSettings, saveAccountSettingsFailure, saveAccountSettingsLocalData, saveAccountSettingsSuccess, updateAccountSettingsListForAccountTypes, updateAccountSettingsListForAccountTypesFailure, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, updateRecommendationForAccountSettings, updateRecommendationForAccountSettingsFailure, } = expenseAutomationJESchedulesView.actions;
|
|
394
374
|
export default expenseAutomationJESchedulesView.reducer;
|
|
395
375
|
const doUpdateRecommendationForAccountSettings = (draft, payload) => {
|
|
396
376
|
const { prepaidExpensesRecommendations, fixedAssetsRecommendations, accruedExpensesRecommendations, } = mapAccountTypeRecommendationPayloadToAccountRecommendationByType(payload);
|
|
@@ -37,15 +37,7 @@ export const initialReconciliationTabsState = {
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
export const initialActionFetchState = {
|
|
40
|
-
excludeAccountFetch: {
|
|
41
|
-
fetchState: 'Not-Started',
|
|
42
|
-
error: undefined,
|
|
43
|
-
},
|
|
44
40
|
excludeFetchById: {},
|
|
45
|
-
includeAccountFetch: {
|
|
46
|
-
fetchState: 'Not-Started',
|
|
47
|
-
error: undefined,
|
|
48
|
-
},
|
|
49
41
|
reconcileFetch: {
|
|
50
42
|
fetchState: 'Not-Started',
|
|
51
43
|
error: undefined,
|
|
@@ -59,7 +51,6 @@ export const initialActionFetchState = {
|
|
|
59
51
|
export const initialState = {
|
|
60
52
|
accountReconciliationRecordsBySelectedPeriod: {},
|
|
61
53
|
accountConnectionStatusByAccountID: {},
|
|
62
|
-
excludedAccountExclusionInfo: {},
|
|
63
54
|
fetchState: 'Not-Started',
|
|
64
55
|
error: undefined,
|
|
65
56
|
selectedTab: 'review',
|
|
@@ -69,12 +60,10 @@ export const initialState = {
|
|
|
69
60
|
selectedAccountId: undefined,
|
|
70
61
|
statementUploadChosen: false,
|
|
71
62
|
reconListUIState: {
|
|
72
|
-
nodeCollapseState: {},
|
|
73
63
|
scrollPosition: {
|
|
74
64
|
scrollTop: 0,
|
|
75
65
|
},
|
|
76
66
|
},
|
|
77
|
-
excludedAccountIDs: [],
|
|
78
67
|
};
|
|
79
68
|
// Create slice with reducers
|
|
80
69
|
const expenseAutomationReconciliationView = createSlice({
|
|
@@ -143,7 +132,7 @@ const expenseAutomationReconciliationView = createSlice({
|
|
|
143
132
|
fetchReconciliationSuccess: {
|
|
144
133
|
reducer(draft, action) {
|
|
145
134
|
if (action.payload.accountId == null) {
|
|
146
|
-
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground
|
|
135
|
+
updateAllReconciliation(draft, action.payload.reconciliation.accounts, action.payload.selectedPeriod, action.payload.reconciliation.reconciliation, action.payload.refreshViewInBackground);
|
|
147
136
|
}
|
|
148
137
|
else if (action.payload.reconciliation.reconciliation.length > 0 &&
|
|
149
138
|
action.payload.reconciliation.accounts.length > 0) {
|
|
@@ -355,10 +344,6 @@ const expenseAutomationReconciliationView = createSlice({
|
|
|
355
344
|
updateReconListScrollPosition: (draft, action) => {
|
|
356
345
|
draft.reconListUIState.scrollPosition = action.payload.scrollPosition;
|
|
357
346
|
},
|
|
358
|
-
updateNodeCollapseState: (draft, action) => {
|
|
359
|
-
draft.reconListUIState.nodeCollapseState[action.payload.nodeId] =
|
|
360
|
-
action.payload.collapsed;
|
|
361
|
-
},
|
|
362
347
|
setConnectionInProgressForAccount: (draft, action) => {
|
|
363
348
|
if (draft.accountConnectionStatusByAccountID[action.payload.accountId] ==
|
|
364
349
|
null) {
|
|
@@ -436,85 +421,6 @@ const expenseAutomationReconciliationView = createSlice({
|
|
|
436
421
|
...localData,
|
|
437
422
|
};
|
|
438
423
|
},
|
|
439
|
-
excludeAccountFromReconciliation: {
|
|
440
|
-
reducer(draft) {
|
|
441
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
442
|
-
fetchState: 'In-Progress',
|
|
443
|
-
error: undefined,
|
|
444
|
-
};
|
|
445
|
-
},
|
|
446
|
-
prepare(payload) {
|
|
447
|
-
return { payload };
|
|
448
|
-
},
|
|
449
|
-
},
|
|
450
|
-
excludeAccountFromReconciliationSuccess: (draft, action) => {
|
|
451
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
452
|
-
fetchState: 'Completed',
|
|
453
|
-
error: undefined,
|
|
454
|
-
};
|
|
455
|
-
const { account, selectedPeriod } = action.payload;
|
|
456
|
-
if (account != null) {
|
|
457
|
-
if (!draft.excludedAccountIDs.includes(account.account_id)) {
|
|
458
|
-
draft.excludedAccountIDs.push(account.account_id);
|
|
459
|
-
}
|
|
460
|
-
updateExcludedAccountExclusionInfo(draft, account);
|
|
461
|
-
const monthYearPeriodId = toMonthYearPeriodId(selectedPeriod);
|
|
462
|
-
if (draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId]
|
|
463
|
-
?.accountIDs != null) {
|
|
464
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].accountIDs.filter((id) => id !== account.account_id);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
|
-
excludeAccountFromReconciliationFailure: (draft, action) => {
|
|
469
|
-
draft.actionFetchState.excludeAccountFetch = {
|
|
470
|
-
fetchState: 'Error',
|
|
471
|
-
error: action.payload.error,
|
|
472
|
-
};
|
|
473
|
-
},
|
|
474
|
-
includeAccountInReconciliation: {
|
|
475
|
-
reducer(draft) {
|
|
476
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
477
|
-
fetchState: 'In-Progress',
|
|
478
|
-
error: undefined,
|
|
479
|
-
};
|
|
480
|
-
},
|
|
481
|
-
prepare(payload) {
|
|
482
|
-
return { payload };
|
|
483
|
-
},
|
|
484
|
-
},
|
|
485
|
-
includeAccountInReconciliationSuccess: (draft, action) => {
|
|
486
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
487
|
-
fetchState: 'Completed',
|
|
488
|
-
error: undefined,
|
|
489
|
-
};
|
|
490
|
-
const { reconciliation, selectedPeriod } = action.payload;
|
|
491
|
-
if (reconciliation == null) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
const accountId = reconciliation.account_id;
|
|
495
|
-
draft.excludedAccountIDs = draft.excludedAccountIDs.filter((id) => id !== accountId);
|
|
496
|
-
delete draft.excludedAccountExclusionInfo[accountId];
|
|
497
|
-
const monthYearPeriodId = toMonthYearPeriodId(selectedPeriod);
|
|
498
|
-
const accountReconciliationRecords = draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId];
|
|
499
|
-
if (accountReconciliationRecords != null) {
|
|
500
|
-
if (!accountReconciliationRecords.accountIDs.includes(accountId)) {
|
|
501
|
-
accountReconciliationRecords.accountIDs.push(accountId);
|
|
502
|
-
}
|
|
503
|
-
// put this in a function
|
|
504
|
-
updateReconciliationByAccountIDOnIncludeAccount(draft, accountId, reconciliation, monthYearPeriodId);
|
|
505
|
-
}
|
|
506
|
-
draft.accountConnectionStatusByAccountID[accountId] = {
|
|
507
|
-
status: toBankStatusCodeType(reconciliation.bank_status.code),
|
|
508
|
-
connectionInProgress: false,
|
|
509
|
-
paymentAccountId: undefined,
|
|
510
|
-
};
|
|
511
|
-
},
|
|
512
|
-
includeAccountInReconciliationFailure: (draft, action) => {
|
|
513
|
-
draft.actionFetchState.includeAccountFetch = {
|
|
514
|
-
fetchState: 'Error',
|
|
515
|
-
error: action.payload.error,
|
|
516
|
-
};
|
|
517
|
-
},
|
|
518
424
|
updateStatementUploadChosen: (draft, action) => {
|
|
519
425
|
draft.statementUploadChosen = action.payload.statementUploadChosen;
|
|
520
426
|
},
|
|
@@ -524,38 +430,10 @@ const expenseAutomationReconciliationView = createSlice({
|
|
|
524
430
|
},
|
|
525
431
|
});
|
|
526
432
|
// Export actions
|
|
527
|
-
export const { fetchReconciliation, fetchReconciliationFailure, fetchReconciliationSuccess, saveReconciliationDetail, saveReconciliationDetailFailure, updateSelectedAccountId, setConnectionInProgressForAccount, setStatementParseInProgress, updateReconcileTabLocalData, updateReconcileTabListSortState, updateReconcileTabListScrollState, saveReconciliationDetailSuccess, updateSelectedTab, updateBalancesLocalData, initialiseLocalDataForSelectedAccountId, clearExpenseAutomationReconciliationView, updateSelectedDrawerAccountId, updateReviewTabSortState, initializeReconciliationReviewTabLocalData, updateReviewTabLocalData, saveReconciliationReview, updateSaveReconciliationReviewFetchStatus, updateReconListScrollPosition, updateAccountReconciliationLocalData, deleteAccountStatement, deleteAccountStatementSuccess, deleteAccountStatementFailure,
|
|
433
|
+
export const { fetchReconciliation, fetchReconciliationFailure, fetchReconciliationSuccess, saveReconciliationDetail, saveReconciliationDetailFailure, updateSelectedAccountId, setConnectionInProgressForAccount, setStatementParseInProgress, updateReconcileTabLocalData, updateReconcileTabListSortState, updateReconcileTabListScrollState, saveReconciliationDetailSuccess, updateSelectedTab, updateBalancesLocalData, initialiseLocalDataForSelectedAccountId, clearExpenseAutomationReconciliationView, updateSelectedDrawerAccountId, updateReviewTabSortState, initializeReconciliationReviewTabLocalData, updateReviewTabLocalData, saveReconciliationReview, updateSaveReconciliationReviewFetchStatus, updateReconListScrollPosition, updateAccountReconciliationLocalData, deleteAccountStatement, deleteAccountStatementSuccess, deleteAccountStatementFailure, uploadAccountStatement, uploadAccountStatementSuccess, uploadAccountStatementFailure, updateStatementUploadChosen, } = expenseAutomationReconciliationView.actions;
|
|
528
434
|
// Export reducer
|
|
529
435
|
export default expenseAutomationReconciliationView.reducer;
|
|
530
|
-
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground
|
|
531
|
-
draft.excludedAccountIDs = excludedAccounts.map((ea) => ea.account_id);
|
|
532
|
-
draft.excludedAccountExclusionInfo = {};
|
|
533
|
-
excludedAccounts.forEach((ea) => {
|
|
534
|
-
const { exclusion_info } = ea;
|
|
535
|
-
draft.excludedAccountExclusionInfo[ea.account_id] = {
|
|
536
|
-
bankBalance: exclusion_info.bank_balance != null
|
|
537
|
-
? {
|
|
538
|
-
amount: exclusion_info.bank_balance,
|
|
539
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
540
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
541
|
-
}
|
|
542
|
-
: undefined,
|
|
543
|
-
clearedBalance: exclusion_info.cleared_balance != null
|
|
544
|
-
? {
|
|
545
|
-
amount: exclusion_info.cleared_balance,
|
|
546
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
547
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
548
|
-
}
|
|
549
|
-
: undefined,
|
|
550
|
-
variance: exclusion_info.variance != null
|
|
551
|
-
? {
|
|
552
|
-
amount: exclusion_info.variance,
|
|
553
|
-
currencyCode: ea.currency_code ?? 'USD',
|
|
554
|
-
currencySymbol: ea.currency_symbol ?? '$',
|
|
555
|
-
}
|
|
556
|
-
: undefined,
|
|
557
|
-
};
|
|
558
|
-
});
|
|
436
|
+
function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliationData, refreshViewInBackground) {
|
|
559
437
|
draft.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)] = {
|
|
560
438
|
accountIDs: [],
|
|
561
439
|
reconciliationByAccountID: {},
|
|
@@ -593,9 +471,6 @@ function updateAllReconciliation(draft, accounts, selectedPeriod, reconciliation
|
|
|
593
471
|
? toReconciliationAccountSource(account.reconciliation_source)
|
|
594
472
|
: undefined,
|
|
595
473
|
},
|
|
596
|
-
accountDetectionReason: account?.detection_info != null && account.detection_reason != null
|
|
597
|
-
? account.detection_reason
|
|
598
|
-
: undefined,
|
|
599
474
|
};
|
|
600
475
|
accountReconciliationRecords.accountIDs.push(reconciliation.account_id);
|
|
601
476
|
});
|
|
@@ -641,42 +516,3 @@ function updateReconciliationByAccountID(draft, accounts, selectedPeriod, accoun
|
|
|
641
516
|
};
|
|
642
517
|
}
|
|
643
518
|
}
|
|
644
|
-
const updateExcludedAccountExclusionInfo = (draft, account) => {
|
|
645
|
-
draft.excludedAccountExclusionInfo[account.account_id] = {
|
|
646
|
-
bankBalance: account.bank_balance != null
|
|
647
|
-
? {
|
|
648
|
-
amount: account.bank_balance,
|
|
649
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
650
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
651
|
-
}
|
|
652
|
-
: undefined,
|
|
653
|
-
clearedBalance: account.cleared_balance != null
|
|
654
|
-
? {
|
|
655
|
-
amount: account.cleared_balance,
|
|
656
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
657
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
658
|
-
}
|
|
659
|
-
: undefined,
|
|
660
|
-
variance: account.variance != null
|
|
661
|
-
? {
|
|
662
|
-
amount: account.variance,
|
|
663
|
-
currencyCode: account.currency_code ?? 'USD',
|
|
664
|
-
currencySymbol: account.currency_symbol ?? '$',
|
|
665
|
-
}
|
|
666
|
-
: undefined,
|
|
667
|
-
};
|
|
668
|
-
};
|
|
669
|
-
const updateReconciliationByAccountIDOnIncludeAccount = (draft, accountId, reconciliation, monthYearPeriodId) => {
|
|
670
|
-
draft.accountReconciliationRecordsBySelectedPeriod[monthYearPeriodId].reconciliationByAccountID[accountId] = {
|
|
671
|
-
accountId,
|
|
672
|
-
reconciliationId: reconciliation.reconciliation_id ?? undefined,
|
|
673
|
-
transactionFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
674
|
-
refreshStatus: { fetchState: 'Not-Started', error: undefined },
|
|
675
|
-
statementDeleteStatus: { fetchState: 'Not-Started', error: undefined },
|
|
676
|
-
statementUploadStatus: { fetchState: 'Not-Started', error: undefined },
|
|
677
|
-
statementUpdateStatus: { fetchState: 'Not-Started', error: undefined },
|
|
678
|
-
statementParseInProgress: reconciliation.bank_status.code === 'parsing',
|
|
679
|
-
localData: {},
|
|
680
|
-
accountDetectionReason: undefined,
|
|
681
|
-
};
|
|
682
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
2
|
export const ALL_ACCOUNT_RECON_SECTION_IDS = ['assets', 'liabilities'];
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
|
+
const toAccountReconSectionID = (v) => stringToUnion(v, ALL_ACCOUNT_RECON_SECTION_IDS);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { reduceAnyFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
2
1
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
3
2
|
import { getAccountBase } from '../../../entity/account/accountSelector';
|
|
4
3
|
import { getClassById } from '../../../entity/class/classSelector';
|
|
@@ -7,7 +6,7 @@ import { getUserByUserId } from '../../../entity/user/userSelector';
|
|
|
7
6
|
import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
|
|
8
7
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
9
8
|
export function getExpenseAutomationFluxAnalysisView(state) {
|
|
10
|
-
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState
|
|
9
|
+
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState } = state;
|
|
11
10
|
const { fetchState, error, refreshStatus, uiState, reviewOperatingExpenseIdsByPeriod, selectedSectionIdsByPeriod, groupsBySelectedPeriod, fluxAnalysisEntities, bulkReviewStatus, currency, totalBalancesAndVariance, } = expenseAutomationFluxAnalysisViewState;
|
|
12
11
|
const fetchStateAndError = {
|
|
13
12
|
fetchState,
|
|
@@ -92,17 +91,10 @@ export function getExpenseAutomationFluxAnalysisView(state) {
|
|
|
92
91
|
},
|
|
93
92
|
};
|
|
94
93
|
const completionStatus = fluxCompletionStatus != null ? fluxCompletionStatus : 'incomplete';
|
|
95
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
96
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
97
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
98
|
-
const reducedFetchStatus = reduceAnyFetchState([
|
|
99
|
-
fetchStateAndError,
|
|
100
|
-
monthEndFetchState,
|
|
101
|
-
]);
|
|
102
94
|
return {
|
|
103
95
|
sections,
|
|
104
96
|
totalBalancesAndVariance,
|
|
105
|
-
fetchStatus:
|
|
97
|
+
fetchStatus: fetchStateAndError,
|
|
106
98
|
bulkReviewStatus,
|
|
107
99
|
reviewOperatingExpensesIds,
|
|
108
100
|
selectedSectionIds,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
|
-
import orderBy from 'lodash/orderBy';
|
|
3
|
-
import { reduceAnyFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
4
2
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
5
3
|
import { getAccountIdsForTypes } from '../../../entity/account/accountSelector';
|
|
6
4
|
import { getJEScheduledTransactionByJEScheduleTransactionKey, } from '../../../entity/jeSchedules/jeSchedulesSelector';
|
|
@@ -12,48 +10,10 @@ import { filterNestedAccountHierarchyById } from '../../scheduleView/scheduleDet
|
|
|
12
10
|
import { getAccountLabelForScheduleType, getAccountsTypesForScheduleList, } from '../../scheduleView/scheduleListView/scheduleListHelper';
|
|
13
11
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
14
12
|
import { getJEAccountSettingsView } from './jeAccountSettingsViewSelector';
|
|
15
|
-
function getJEScheduleSortAccessor(sortKey) {
|
|
16
|
-
switch (sortKey) {
|
|
17
|
-
case 'vendor':
|
|
18
|
-
return (s) => s.vendor.name?.toLowerCase();
|
|
19
|
-
case 'category':
|
|
20
|
-
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
21
|
-
case 'class':
|
|
22
|
-
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
23
|
-
case 'depCategory':
|
|
24
|
-
return (s) => s.jeCredit.account?.accountName?.toLowerCase();
|
|
25
|
-
case 'scheduleCategory':
|
|
26
|
-
return (s) => s.jeScheduleType;
|
|
27
|
-
case 'startMonth':
|
|
28
|
-
return (s) => s.startDate?.valueOf();
|
|
29
|
-
case 'type':
|
|
30
|
-
return (s) => s.baseTransaction.typeOfTransaction;
|
|
31
|
-
case 'amortizationPeriod':
|
|
32
|
-
return (s) => s.period;
|
|
33
|
-
case 'jePostingDate':
|
|
34
|
-
return (s) => s.dayOfPostingDate;
|
|
35
|
-
case 'remainingMonths':
|
|
36
|
-
return (s) => s.period;
|
|
37
|
-
case 'runningBalance':
|
|
38
|
-
return (s) => s.balanceAsOfToday?.amount;
|
|
39
|
-
case 'totalAmount':
|
|
40
|
-
return (s) => s.baseTransaction.amount.amount;
|
|
41
|
-
case 'transactionDate':
|
|
42
|
-
return (s) => s.baseTransaction.date.valueOf();
|
|
43
|
-
case 'memo':
|
|
44
|
-
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
45
|
-
default:
|
|
46
|
-
return (s) => s.startDate?.valueOf();
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
50
|
-
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
51
|
-
return orderBy(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
52
|
-
}
|
|
53
13
|
export function getExpenseAutomationJESchedulesView(state) {
|
|
54
14
|
const jeScheduledTransaction = [];
|
|
55
15
|
const failedJeScheduledTransaction = [];
|
|
56
|
-
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState,
|
|
16
|
+
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
57
17
|
const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
|
|
58
18
|
const accountSettingsView = getJEAccountSettingsView(state);
|
|
59
19
|
const currentTenant = getCurrentTenant(state);
|
|
@@ -99,33 +59,18 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
99
59
|
const jeScheduleDetails = getJEScheduledTransactionByJEScheduleTransactionKey(jeScheduleKey, state);
|
|
100
60
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
101
61
|
});
|
|
102
|
-
const
|
|
103
|
-
const
|
|
104
|
-
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
105
|
-
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
106
|
-
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
107
|
-
const unsortedResolveSchedules = [];
|
|
62
|
+
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
63
|
+
const resolveSchedules = [];
|
|
108
64
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
109
65
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
110
|
-
|
|
111
|
-
...schedule,
|
|
112
|
-
scheduledJournalEntry: journalEntry,
|
|
113
|
-
});
|
|
66
|
+
resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
|
|
114
67
|
});
|
|
115
68
|
});
|
|
116
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
117
69
|
const allSteps = monthYearPeriodId != null
|
|
118
70
|
? getAllSteps(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
119
71
|
: [];
|
|
120
72
|
const jeCompletionStatus = allSteps.find((step) => step.step === 'je_schedules')?.completionStatus;
|
|
121
73
|
const completionStatus = jeCompletionStatus != null ? jeCompletionStatus : 'incomplete';
|
|
122
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
123
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
124
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
125
|
-
const reducedFetchStatus = reduceAnyFetchState([
|
|
126
|
-
{ fetchState, error },
|
|
127
|
-
monthEndFetchState,
|
|
128
|
-
]);
|
|
129
74
|
return {
|
|
130
75
|
uncategorizedAccounts,
|
|
131
76
|
allDepreciationAccountList: filteredDepAccounts,
|
|
@@ -134,17 +79,15 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
134
79
|
allAccountList: filteredAccounts,
|
|
135
80
|
accountListNestedAccountHierarchy,
|
|
136
81
|
allClassList: allClasses,
|
|
137
|
-
completedSchedules,
|
|
138
82
|
draftSchedules,
|
|
139
|
-
ongoingSchedules,
|
|
140
83
|
resolveSchedules: resolveSchedules,
|
|
141
84
|
accountSettingsView,
|
|
142
85
|
postStatusById: postStatusById,
|
|
143
86
|
ignoreStatusById: ignoreStatusById,
|
|
144
|
-
fetchState:
|
|
87
|
+
fetchState: fetchState,
|
|
145
88
|
jeScheduleLocalDataById: jeScheduleLocalDataById,
|
|
146
89
|
uiState: uiState,
|
|
147
|
-
error:
|
|
90
|
+
error: error,
|
|
148
91
|
refreshStatus,
|
|
149
92
|
completionStatus,
|
|
150
93
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import orderBy from 'lodash/orderBy';
|
|
2
|
-
import { reduceAnyFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
3
2
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
3
|
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
5
4
|
import { getSupportedTransactionById, getSupportedTransactionsByIds, } from '../../../entity/transaction/transactionSelector';
|
|
@@ -8,7 +7,7 @@ import { getCompletedTransactionsCacheKey } from '../reducers/missingReceiptsVie
|
|
|
8
7
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
9
8
|
import { isUnmatchedTabFileStatus, } from '../types/missingReceiptsViewState';
|
|
10
9
|
export function getExpenseAutomationMissingReceiptsView(state) {
|
|
11
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
10
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
12
11
|
const currentTenant = getCurrentTenant(state);
|
|
13
12
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
14
13
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -37,7 +36,7 @@ export function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
37
36
|
transaction.lines.length > 0 &&
|
|
38
37
|
transaction.lines[0]
|
|
39
38
|
?.class != null
|
|
40
|
-
? transaction.lines[0].class
|
|
39
|
+
? transaction.lines[0].class.className.toLowerCase()
|
|
41
40
|
: null;
|
|
42
41
|
case 'vendor':
|
|
43
42
|
default:
|
|
@@ -176,16 +175,9 @@ export function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
176
175
|
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
177
176
|
};
|
|
178
177
|
});
|
|
179
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
180
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
181
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
182
|
-
const reducedFetchStatus = reduceAnyFetchState([
|
|
183
|
-
{ fetchState, error },
|
|
184
|
-
monthEndFetchState,
|
|
185
|
-
]);
|
|
186
178
|
return {
|
|
187
|
-
fetchState
|
|
188
|
-
error
|
|
179
|
+
fetchState,
|
|
180
|
+
error,
|
|
189
181
|
uploadReceiptStatusById,
|
|
190
182
|
uiState,
|
|
191
183
|
refreshStatus,
|