@zeniai/client-epic-state 4.19.99-betaVR3 → 4.19.100
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/coaBalance/coaBalanceType.d.ts +0 -2
- package/lib/commonStateTypes/coaBalance/coaBalanceType.js +0 -6
- package/lib/commonStateTypes/currencyHelper.d.ts +0 -3
- package/lib/commonStateTypes/currencyHelper.js +1 -6
- package/lib/commonStateTypes/reduceFetchState.d.ts +0 -9
- package/lib/commonStateTypes/reduceFetchState.js +0 -26
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountPayload.js +0 -2
- package/lib/entity/account/accountState.d.ts +0 -2
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/customer/customerState.d.ts +2 -0
- package/lib/entity/customer/customerState.js +5 -0
- package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
- package/lib/entity/depositAccount/depositAccount.js +1 -8
- 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/reimbursement/reimbursementPayload.d.ts +0 -2
- package/lib/entity/reimbursement/reimbursementPayload.js +0 -7
- package/lib/entity/reimbursement/reimbursementState.d.ts +0 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/task/taskPayload.d.ts +0 -1
- package/lib/entity/task/taskPayload.js +0 -1
- package/lib/entity/task/taskState.d.ts +0 -1
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -1
- 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 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -17
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -5
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -13
- package/lib/epic.js +1 -13
- package/lib/esm/commonStateTypes/coaBalance/coaBalanceType.js +0 -5
- package/lib/esm/commonStateTypes/currencyHelper.js +0 -5
- package/lib/esm/commonStateTypes/reduceFetchState.js +0 -25
- package/lib/esm/entity/account/accountPayload.js +0 -2
- package/lib/esm/entity/customer/customerState.js +4 -1
- package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/reimbursement/reimbursementPayload.js +0 -7
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/task/taskPayload.js +0 -1
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- 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 -17
- package/lib/esm/epic.js +1 -13
- package/lib/esm/index.js +16 -25
- package/lib/esm/reducer.js +0 -6
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/arAgingView/arAgingReport/arAgingReducer.js +1 -1
- package/lib/esm/view/arAgingView/arAgingReport/arAgingSelector.js +1 -1
- 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/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
- 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/payload/missingReceiptsPayload.js +1 -189
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -17
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
- 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 +5 -256
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +7 -14
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -18
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
- package/lib/esm/view/financeStatement/financeStatementReducer.js +8 -11
- package/lib/esm/view/financeStatement/financeStatementSelector.js +9 -24
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
- package/lib/esm/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
- package/lib/esm/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +7 -9
- 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/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -3
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
- package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +0 -11
- package/lib/esm/zeniAPI.js +2 -0
- package/lib/index.d.ts +21 -31
- package/lib/index.js +34 -102
- package/lib/reducer.d.ts +0 -6
- package/lib/reducer.js +0 -6
- 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 -18
- package/lib/view/arAgingView/arAgingReport/arAgingReducer.js +2 -2
- package/lib/view/arAgingView/arAgingReport/arAgingSelector.js +5 -5
- package/lib/view/auditReportView/auditReportViewState.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/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
- 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/missingReceiptsPayload.d.ts +0 -118
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -18
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -255
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -22
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +6 -13
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -20
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
- package/lib/view/financeStatement/financeStatementReducer.js +8 -11
- package/lib/view/financeStatement/financeStatementSelector.d.ts +0 -2
- package/lib/view/financeStatement/financeStatementSelector.js +9 -24
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.d.ts +2 -4
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +2 -7
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelector.js +29 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewState.d.ts +0 -4
- package/lib/view/profitAndLossClassesView/profitAndLossForTimeframeClassesViewEpic.js +5 -7
- package/lib/view/reportUIOptions/updateReportUIOptionCOABalancesRangeEpic.js +6 -8
- 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/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/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +0 -1
- package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +0 -1
- package/lib/view/taskManager/taskListView/taskListSelector.d.ts +0 -2
- package/lib/view/taskManager/taskListView/taskListSelector.js +1 -3
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
- package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
- package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +1 -3
- package/lib/view/userListView/fetchUserListByTypeEpic.js +0 -11
- package/lib/view/userListView/userListViewPayload.d.ts +0 -2
- package/lib/zeniAPI.js +2 -0
- package/package.json +2 -2
- package/lib/entity/userGroups/userGroupsPayload.d.ts +0 -7
- package/lib/entity/userGroups/userGroupsPayload.js +0 -10
- package/lib/entity/userGroups/userGroupsReducer.d.ts +0 -8
- package/lib/entity/userGroups/userGroupsReducer.js +0 -29
- package/lib/entity/userGroups/userGroupsSelector.d.ts +0 -4
- package/lib/entity/userGroups/userGroupsSelector.js +0 -12
- package/lib/entity/userGroups/userGroupsState.d.ts +0 -9
- package/lib/entity/userGroups/userGroupsState.js +0 -2
- package/lib/esm/entity/userGroups/userGroupsPayload.js +0 -7
- package/lib/esm/entity/userGroups/userGroupsReducer.js +0 -25
- package/lib/esm/entity/userGroups/userGroupsSelector.js +0 -8
- package/lib/esm/entity/userGroups/userGroupsState.js +0 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -80
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -317
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -9
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -282
- package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +0 -65
- package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +0 -16
- package/lib/esm/view/userGroupListView/userGroupListViewState.js +0 -1
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
- package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -86
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.d.ts +0 -13
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -321
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.d.ts +0 -111
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes.js +0 -13
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +0 -6
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -285
- package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +0 -23
- package/lib/view/userGroupListView/userGroupListViewReducer.js +0 -69
- package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +0 -7
- package/lib/view/userGroupListView/userGroupListViewSelector.js +0 -20
- package/lib/view/userGroupListView/userGroupListViewState.d.ts +0 -8
- package/lib/view/userGroupListView/userGroupListViewState.js +0 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getExpenseAutomationFluxAnalysisView = getExpenseAutomationFluxAnalysisView;
|
|
4
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
5
4
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
6
5
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
7
6
|
const classSelector_1 = require("../../../entity/class/classSelector");
|
|
@@ -10,7 +9,7 @@ const userSelector_1 = require("../../../entity/user/userSelector");
|
|
|
10
9
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
11
10
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
12
11
|
function getExpenseAutomationFluxAnalysisView(state) {
|
|
13
|
-
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState
|
|
12
|
+
const { expenseAutomationFluxAnalysisViewState, monthEndCloseChecksState } = state;
|
|
14
13
|
const { fetchState, error, refreshStatus, uiState, reviewOperatingExpenseIdsByPeriod, selectedSectionIdsByPeriod, groupsBySelectedPeriod, fluxAnalysisEntities, bulkReviewStatus, currency, totalBalancesAndVariance, } = expenseAutomationFluxAnalysisViewState;
|
|
15
14
|
const fetchStateAndError = {
|
|
16
15
|
fetchState,
|
|
@@ -95,17 +94,10 @@ function getExpenseAutomationFluxAnalysisView(state) {
|
|
|
95
94
|
},
|
|
96
95
|
};
|
|
97
96
|
const completionStatus = fluxCompletionStatus != null ? fluxCompletionStatus : 'incomplete';
|
|
98
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
99
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
100
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
101
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
102
|
-
fetchStateAndError,
|
|
103
|
-
monthEndFetchState,
|
|
104
|
-
]);
|
|
105
97
|
return {
|
|
106
98
|
sections,
|
|
107
99
|
totalBalancesAndVariance,
|
|
108
|
-
fetchStatus:
|
|
100
|
+
fetchStatus: fetchStateAndError,
|
|
109
101
|
bulkReviewStatus,
|
|
110
102
|
reviewOperatingExpensesIds,
|
|
111
103
|
selectedSectionIds,
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationJESchedulesView = getExpenseAutomationJESchedulesView;
|
|
7
7
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
9
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
10
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
11
9
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
12
10
|
const jeSchedulesSelector_1 = require("../../../entity/jeSchedules/jeSchedulesSelector");
|
|
@@ -18,48 +16,10 @@ const scheduleDetailSelector_1 = require("../../scheduleView/scheduleDetailView/
|
|
|
18
16
|
const scheduleListHelper_1 = require("../../scheduleView/scheduleListView/scheduleListHelper");
|
|
19
17
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
20
18
|
const jeAccountSettingsViewSelector_1 = require("./jeAccountSettingsViewSelector");
|
|
21
|
-
function getJEScheduleSortAccessor(sortKey) {
|
|
22
|
-
switch (sortKey) {
|
|
23
|
-
case 'vendor':
|
|
24
|
-
return (s) => s.vendor.name?.toLowerCase();
|
|
25
|
-
case 'category':
|
|
26
|
-
return (s) => s.jeDebit.account?.accountName?.toLowerCase();
|
|
27
|
-
case 'class':
|
|
28
|
-
return (s) => s.jeDebit.accountingClass?.className?.toLowerCase();
|
|
29
|
-
case 'depCategory':
|
|
30
|
-
return (s) => s.jeCredit.account?.accountName?.toLowerCase();
|
|
31
|
-
case 'scheduleCategory':
|
|
32
|
-
return (s) => s.jeScheduleType;
|
|
33
|
-
case 'startMonth':
|
|
34
|
-
return (s) => s.startDate?.valueOf();
|
|
35
|
-
case 'type':
|
|
36
|
-
return (s) => s.baseTransaction.typeOfTransaction;
|
|
37
|
-
case 'amortizationPeriod':
|
|
38
|
-
return (s) => s.period;
|
|
39
|
-
case 'jePostingDate':
|
|
40
|
-
return (s) => s.dayOfPostingDate;
|
|
41
|
-
case 'remainingMonths':
|
|
42
|
-
return (s) => s.period;
|
|
43
|
-
case 'runningBalance':
|
|
44
|
-
return (s) => s.balanceAsOfToday?.amount;
|
|
45
|
-
case 'totalAmount':
|
|
46
|
-
return (s) => s.baseTransaction.amount.amount;
|
|
47
|
-
case 'transactionDate':
|
|
48
|
-
return (s) => s.baseTransaction.date.valueOf();
|
|
49
|
-
case 'memo':
|
|
50
|
-
return (s) => s.baseTransaction.memo?.toLowerCase();
|
|
51
|
-
default:
|
|
52
|
-
return (s) => s.startDate?.valueOf();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function sortJEScheduledTransactions(transactions, sortKey, sortOrder) {
|
|
56
|
-
const accessor = getJEScheduleSortAccessor(sortKey);
|
|
57
|
-
return (0, orderBy_1.default)(transactions, [accessor], [sortOrder === 'ascending' ? 'asc' : 'desc']);
|
|
58
|
-
}
|
|
59
19
|
function getExpenseAutomationJESchedulesView(state) {
|
|
60
20
|
const jeScheduledTransaction = [];
|
|
61
21
|
const failedJeScheduledTransaction = [];
|
|
62
|
-
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState,
|
|
22
|
+
const { accountState, accountListState, classState, classListState, expenseAutomationJESchedulesViewState, expenseAutomationViewState, monthEndCloseChecksState, } = state;
|
|
63
23
|
const { jeScheduleTransactionKeysByPeriod, failedJeScheduleTransactionKeysByPeriod, jeScheduleLocalDataById, postStatusById, ignoreStatusById, uiState, error, fetchState, refreshStatus, } = expenseAutomationJESchedulesViewState;
|
|
64
24
|
const accountSettingsView = (0, jeAccountSettingsViewSelector_1.getJEAccountSettingsView)(state);
|
|
65
25
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
@@ -105,33 +65,18 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
105
65
|
const jeScheduleDetails = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleTransactionKey)(jeScheduleKey, state);
|
|
106
66
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
107
67
|
});
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const ongoingSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing'), sortKey, sortOrder);
|
|
111
|
-
const completedSchedules = sortJEScheduledTransactions(jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
112
|
-
schedule.status.code === 'marked_as_completed'), sortKey, sortOrder);
|
|
113
|
-
const unsortedResolveSchedules = [];
|
|
68
|
+
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
69
|
+
const resolveSchedules = [];
|
|
114
70
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
115
71
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
116
|
-
|
|
117
|
-
...schedule,
|
|
118
|
-
scheduledJournalEntry: journalEntry,
|
|
119
|
-
});
|
|
72
|
+
resolveSchedules.push({ ...schedule, scheduledJournalEntry: journalEntry });
|
|
120
73
|
});
|
|
121
74
|
});
|
|
122
|
-
const resolveSchedules = sortJEScheduledTransactions(unsortedResolveSchedules, sortKey, sortOrder);
|
|
123
75
|
const allSteps = monthYearPeriodId != null
|
|
124
76
|
? (0, expenseAutomationViewSelectorTypes_1.getAllSteps)(monthEndCloseChecksState, monthYearPeriodId, currentTenant.tenantId)
|
|
125
77
|
: [];
|
|
126
78
|
const jeCompletionStatus = allSteps.find((step) => step.step === 'je_schedules')?.completionStatus;
|
|
127
79
|
const completionStatus = jeCompletionStatus != null ? jeCompletionStatus : 'incomplete';
|
|
128
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
129
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
130
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
131
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
132
|
-
{ fetchState, error },
|
|
133
|
-
monthEndFetchState,
|
|
134
|
-
]);
|
|
135
80
|
return {
|
|
136
81
|
uncategorizedAccounts,
|
|
137
82
|
allDepreciationAccountList: filteredDepAccounts,
|
|
@@ -140,17 +85,15 @@ function getExpenseAutomationJESchedulesView(state) {
|
|
|
140
85
|
allAccountList: filteredAccounts,
|
|
141
86
|
accountListNestedAccountHierarchy,
|
|
142
87
|
allClassList: allClasses,
|
|
143
|
-
completedSchedules,
|
|
144
88
|
draftSchedules,
|
|
145
|
-
ongoingSchedules,
|
|
146
89
|
resolveSchedules: resolveSchedules,
|
|
147
90
|
accountSettingsView,
|
|
148
91
|
postStatusById: postStatusById,
|
|
149
92
|
ignoreStatusById: ignoreStatusById,
|
|
150
|
-
fetchState:
|
|
93
|
+
fetchState: fetchState,
|
|
151
94
|
jeScheduleLocalDataById: jeScheduleLocalDataById,
|
|
152
95
|
uiState: uiState,
|
|
153
|
-
error:
|
|
96
|
+
error: error,
|
|
154
97
|
refreshStatus,
|
|
155
98
|
completionStatus,
|
|
156
99
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RootState } from '../../../reducer';
|
|
2
|
-
import
|
|
2
|
+
import { ExpenseAutomationMissingReceiptsViewSelector } from '../selectorTypes/missingReceiptsSelectorTypes';
|
|
3
3
|
export declare function getExpenseAutomationMissingReceiptsView(state: RootState): ExpenseAutomationMissingReceiptsViewSelector;
|
|
@@ -5,16 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getExpenseAutomationMissingReceiptsView = getExpenseAutomationMissingReceiptsView;
|
|
7
7
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
8
|
-
const reduceFetchState_1 = require("../../../commonStateTypes/reduceFetchState");
|
|
9
8
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
10
9
|
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
11
10
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
12
|
-
const missingReceiptsPayload_1 = require("../payload/missingReceiptsPayload");
|
|
13
|
-
const missingReceiptsViewReducer_1 = require("../reducers/missingReceiptsViewReducer");
|
|
14
11
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
15
|
-
const missingReceiptsViewState_1 = require("../types/missingReceiptsViewState");
|
|
16
12
|
function getExpenseAutomationMissingReceiptsView(state) {
|
|
17
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
13
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
14
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
19
15
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
20
16
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -43,7 +39,7 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
43
39
|
transaction.lines.length > 0 &&
|
|
44
40
|
transaction.lines[0]
|
|
45
41
|
?.class != null
|
|
46
|
-
? transaction.lines[0].class
|
|
42
|
+
? transaction.lines[0].class.className.toLowerCase()
|
|
47
43
|
: null;
|
|
48
44
|
case 'vendor':
|
|
49
45
|
default:
|
|
@@ -57,260 +53,13 @@ function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
57
53
|
const completionStatus = missingReceiptsCompletionStatus != null
|
|
58
54
|
? missingReceiptsCompletionStatus
|
|
59
55
|
: 'incomplete';
|
|
60
|
-
const { bulkUpload, pendingMissingReceiptsTabNavigation } = expenseAutomationMissingReceiptsViewState;
|
|
61
|
-
const currentBatchStatus = bulkUpload.currentBatchId != null
|
|
62
|
-
? bulkUpload.batchStatusById[bulkUpload.currentBatchId]
|
|
63
|
-
: undefined;
|
|
64
|
-
const batchList = monthYearPeriodId != null
|
|
65
|
-
? (bulkUpload.batchListByPeriod[monthYearPeriodId] ?? [])
|
|
66
|
-
: [];
|
|
67
|
-
/**
|
|
68
|
-
* Primary "Unmatched" batch = first completed batch in platform list order, preferring the
|
|
69
|
-
* first batch that still has possible_matches/no_match work when any completed batch has such work.
|
|
70
|
-
* Batches without details yet: wait if the list row still reports unmatched work; otherwise skip
|
|
71
|
-
* so we do not block the whole tab while other rows are not fetched yet.
|
|
72
|
-
*/
|
|
73
|
-
const primaryBatchIdFromDetailsOrder = getPrimaryBatchIdFromBatchListOrder(batchList, bulkUpload.batchDetailsById, bulkUpload.failedBatchDetailIds);
|
|
74
|
-
/**
|
|
75
|
-
* During upload/matching, prefer `currentBatchId` only when its batch details are loaded,
|
|
76
|
-
* completed, and still have unmatched-tab work. Otherwise keep `primaryBatchIdFromDetailsOrder`.
|
|
77
|
-
*
|
|
78
|
-
* If we pinned to `currentBatchId` as soon as it was absent from the batch list (in-flight
|
|
79
|
-
* upload), details are often not loaded yet — `unmatchedFiles` would empty while older batches
|
|
80
|
-
* moved to "past", so the primary "Unmatched Receipts" section vanished during auto-matching.
|
|
81
|
-
*/
|
|
82
|
-
const unmatchedSectionBatchId = (() => {
|
|
83
|
-
const phase = bulkUpload.phase;
|
|
84
|
-
if (phase !== 'matching' && phase !== 'uploading') {
|
|
85
|
-
return primaryBatchIdFromDetailsOrder;
|
|
86
|
-
}
|
|
87
|
-
const currentId = bulkUpload.currentBatchId;
|
|
88
|
-
if (currentId == null) {
|
|
89
|
-
return primaryBatchIdFromDetailsOrder;
|
|
90
|
-
}
|
|
91
|
-
const currentDetails = bulkUpload.batchDetailsById[currentId];
|
|
92
|
-
if (currentDetails != null &&
|
|
93
|
-
currentDetails.status === 'completed' &&
|
|
94
|
-
batchDetailsHasUnmatchedWork(currentDetails)) {
|
|
95
|
-
return currentId;
|
|
96
|
-
}
|
|
97
|
-
return primaryBatchIdFromDetailsOrder;
|
|
98
|
-
})();
|
|
99
|
-
const completedBatchesInApiOrder = batchList.filter((batchListItem) => (0, missingReceiptsPayload_1.isBatchListStatusCompleted)(batchListItem.status));
|
|
100
|
-
const currentBatchDetails = unmatchedSectionBatchId != null
|
|
101
|
-
? bulkUpload.batchDetailsById[unmatchedSectionBatchId]
|
|
102
|
-
: undefined;
|
|
103
|
-
const resolvedFiles = currentBatchDetails?.files.map((file) => resolveBatchFile(file, currentBatchDetails.batchId, transactionState));
|
|
104
|
-
const failedIds = new Set(bulkUpload.failedBatchDetailIds);
|
|
105
|
-
const hasMoreBatchDetails = completedBatchesInApiOrder.some((batchListItem) => bulkUpload.batchDetailsById[batchListItem.batchId] == null &&
|
|
106
|
-
!failedIds.has(batchListItem.batchId));
|
|
107
|
-
const getSortValue = (file) => {
|
|
108
|
-
const matchedTransaction = file.matchedTransaction;
|
|
109
|
-
if (matchedTransaction == null) {
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
switch (bulkUpload.sortKey) {
|
|
113
|
-
case 'vendor':
|
|
114
|
-
return ((matchedTransaction.vendorName ?? matchedTransaction.description)?.toLowerCase() ?? null);
|
|
115
|
-
case 'category': {
|
|
116
|
-
const line = matchedTransaction.lines?.[0];
|
|
117
|
-
return line?.account?.accountName?.toLowerCase() ?? null;
|
|
118
|
-
}
|
|
119
|
-
case 'class': {
|
|
120
|
-
const line = matchedTransaction.lines?.[0];
|
|
121
|
-
return line?.class?.className?.toLowerCase() ?? null;
|
|
122
|
-
}
|
|
123
|
-
case 'date':
|
|
124
|
-
return matchedTransaction.date.valueOf();
|
|
125
|
-
case 'amount':
|
|
126
|
-
return matchedTransaction.amount.amount;
|
|
127
|
-
default:
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
const bulkUploadSortDirection = bulkUpload.sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
132
|
-
const matchedFiles = (0, orderBy_1.default)(resolvedFiles?.filter((resolvedFile) => resolvedFile.status === 'exact_match') ?? [], getSortValue, bulkUploadSortDirection);
|
|
133
|
-
const unmatchedFiles = (0, orderBy_1.default)(resolvedFiles?.filter((resolvedFile) => (0, missingReceiptsViewState_1.isUnmatchedTabFileStatus)(resolvedFile.status)) ?? [], getSortValue, bulkUploadSortDirection);
|
|
134
|
-
const progress = currentBatchStatus != null
|
|
135
|
-
? {
|
|
136
|
-
...currentBatchStatus.progress,
|
|
137
|
-
percentage: currentBatchStatus.progress.total > 0
|
|
138
|
-
? Math.round((currentBatchStatus.progress.processed /
|
|
139
|
-
currentBatchStatus.progress.total) *
|
|
140
|
-
100)
|
|
141
|
-
: 0,
|
|
142
|
-
}
|
|
143
|
-
: { total: 0, processed: 0, percentage: 0 };
|
|
144
|
-
const batchListFetchState = bulkUpload.batchListFetchState;
|
|
145
|
-
/**
|
|
146
|
-
* When primary batch is not resolved yet, still aggregate unmatched files from every batch
|
|
147
|
-
* that has details loaded (otherwise past is empty and receipts vanish from the UI).
|
|
148
|
-
*/
|
|
149
|
-
const pastBatches = unmatchedSectionBatchId != null
|
|
150
|
-
? batchList.filter((batchListItem) => batchListItem.batchId !== unmatchedSectionBatchId)
|
|
151
|
-
: batchList;
|
|
152
|
-
const pastUnmatchedFiles = pastBatches.flatMap((pastBatch) => {
|
|
153
|
-
const details = bulkUpload.batchDetailsById[pastBatch.batchId];
|
|
154
|
-
if (details == null) {
|
|
155
|
-
return [];
|
|
156
|
-
}
|
|
157
|
-
return details.files
|
|
158
|
-
.filter((batchFile) => (0, missingReceiptsViewState_1.isUnmatchedTabFileStatus)(batchFile.status))
|
|
159
|
-
.map((batchFile) => resolveBatchFile(batchFile, pastBatch.batchId, transactionState));
|
|
160
|
-
});
|
|
161
|
-
const completedTransactionsCacheKey = monthYearPeriodId != null
|
|
162
|
-
? (0, missingReceiptsViewReducer_1.getCompletedTransactionsCacheKey)(monthYearPeriodId, bulkUpload.sortKey, bulkUpload.sortOrder, bulkUpload.completedSubTab)
|
|
163
|
-
: undefined;
|
|
164
|
-
const completedTransactionsForPeriod = completedTransactionsCacheKey != null
|
|
165
|
-
? bulkUpload.completedTransactionsByPeriod[completedTransactionsCacheKey]
|
|
166
|
-
: undefined;
|
|
167
|
-
const completedTransactionIds = completedTransactionsForPeriod?.transactionIds ?? [];
|
|
168
|
-
const resolvedCompletedTransactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, completedTransactionIds);
|
|
169
|
-
const resolvedBatchDetails = currentBatchDetails != null && resolvedFiles != null
|
|
170
|
-
? {
|
|
171
|
-
batchId: currentBatchDetails.batchId,
|
|
172
|
-
createdAt: currentBatchDetails.createdAt,
|
|
173
|
-
files: resolvedFiles,
|
|
174
|
-
status: currentBatchDetails.status,
|
|
175
|
-
summary: currentBatchDetails.summary,
|
|
176
|
-
}
|
|
177
|
-
: undefined;
|
|
178
|
-
const manualSearchResults = bulkUpload.manualSearch.results.map((result) => {
|
|
179
|
-
const transaction = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, result.transactionId);
|
|
180
|
-
return {
|
|
181
|
-
...result,
|
|
182
|
-
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
183
|
-
};
|
|
184
|
-
});
|
|
185
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
186
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
187
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
188
|
-
const reducedFetchStatus = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
189
|
-
{ fetchState, error },
|
|
190
|
-
monthEndFetchState,
|
|
191
|
-
]);
|
|
192
56
|
return {
|
|
193
|
-
fetchState
|
|
194
|
-
error
|
|
57
|
+
fetchState,
|
|
58
|
+
error,
|
|
195
59
|
uploadReceiptStatusById,
|
|
196
60
|
uiState,
|
|
197
61
|
refreshStatus,
|
|
198
62
|
transactions: sortedTransactions,
|
|
199
63
|
completionStatus,
|
|
200
|
-
pendingMissingReceiptsTabNavigation: pendingMissingReceiptsTabNavigation ?? null,
|
|
201
|
-
bulkUpload: {
|
|
202
|
-
phase: bulkUpload.phase,
|
|
203
|
-
uploadStatus: bulkUpload.uploadStatus,
|
|
204
|
-
batchStatus: currentBatchStatus,
|
|
205
|
-
batchDetails: resolvedBatchDetails,
|
|
206
|
-
completedSubTab: bulkUpload.completedSubTab,
|
|
207
|
-
completedTransactions: {
|
|
208
|
-
fetchState: completedTransactionsForPeriod?.fetchState ?? {
|
|
209
|
-
fetchState: 'Not-Started',
|
|
210
|
-
error: undefined,
|
|
211
|
-
},
|
|
212
|
-
nextPageToken: completedTransactionsForPeriod?.nextPageToken ?? null,
|
|
213
|
-
totalCount: completedTransactionsForPeriod?.totalCount ?? 0,
|
|
214
|
-
transactions: resolvedCompletedTransactions,
|
|
215
|
-
},
|
|
216
|
-
matchedFiles,
|
|
217
|
-
unmatchedFiles,
|
|
218
|
-
progress,
|
|
219
|
-
currentResultsTab: bulkUpload.currentResultsTab,
|
|
220
|
-
sortKey: bulkUpload.sortKey,
|
|
221
|
-
sortOrder: bulkUpload.sortOrder,
|
|
222
|
-
batchList,
|
|
223
|
-
batchListFetchState,
|
|
224
|
-
pastBatches,
|
|
225
|
-
pastUnmatchedFiles,
|
|
226
|
-
confirmMatchStatus: bulkUpload.confirmMatchStatus,
|
|
227
|
-
manualSearchUiResetKey: bulkUpload.manualSearchUiResetKey,
|
|
228
|
-
hasMoreBatchDetails,
|
|
229
|
-
batchDetailsPaginationState: bulkUpload.batchDetailsPaginationState,
|
|
230
|
-
manualSearch: {
|
|
231
|
-
...bulkUpload.manualSearch,
|
|
232
|
-
results: manualSearchResults,
|
|
233
|
-
},
|
|
234
|
-
uploadProgress: bulkUpload.uploadProgress,
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
function batchDetailsHasUnmatchedWork(details) {
|
|
239
|
-
return details.files.some((file) => (0, missingReceiptsViewState_1.isUnmatchedTabFileStatus)(file.status));
|
|
240
|
-
}
|
|
241
|
-
/** List row summary before batch details load — aligns with unmatched / possible-match work. */
|
|
242
|
-
function batchListItemHasUnmatchedWork(batch) {
|
|
243
|
-
return batch.noMatchCount > 0 || batch.possibleMatchesCount > 0;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* `batchList` must match platform order (same sequence as the bulk-upload batches API). Picks the
|
|
247
|
-
* primary batch for the top "Unmatched" section. Skips failed detail fetches.
|
|
248
|
-
*
|
|
249
|
-
* If details are not loaded for an earlier list row but that row reports no unmatched work, we
|
|
250
|
-
* skip it so later rows with loaded details can be primary (avoids an empty tab when the first
|
|
251
|
-
* fetch page only loaded later batches). If the list reports unmatched work but details are still
|
|
252
|
-
* loading, we wait (undefined) so primary order stays correct once details arrive.
|
|
253
|
-
*/
|
|
254
|
-
function getPrimaryBatchIdFromBatchListOrder(batchListInPlatformOrder, batchDetailsById, failedBatchDetailIds) {
|
|
255
|
-
const failedIds = new Set(failedBatchDetailIds);
|
|
256
|
-
const anyCompletedBatchHasUnmatchedWork = batchListInPlatformOrder.some((batch) => {
|
|
257
|
-
if (failedIds.has(batch.batchId)) {
|
|
258
|
-
return false;
|
|
259
|
-
}
|
|
260
|
-
const details = batchDetailsById[batch.batchId];
|
|
261
|
-
if (details != null &&
|
|
262
|
-
details.status === 'completed' &&
|
|
263
|
-
batchDetailsHasUnmatchedWork(details)) {
|
|
264
|
-
return true;
|
|
265
|
-
}
|
|
266
|
-
return details == null && batchListItemHasUnmatchedWork(batch);
|
|
267
|
-
});
|
|
268
|
-
for (const batch of batchListInPlatformOrder) {
|
|
269
|
-
if (failedIds.has(batch.batchId)) {
|
|
270
|
-
continue;
|
|
271
|
-
}
|
|
272
|
-
const details = batchDetailsById[batch.batchId];
|
|
273
|
-
if (details == null) {
|
|
274
|
-
if (batchListItemHasUnmatchedWork(batch)) {
|
|
275
|
-
return undefined;
|
|
276
|
-
}
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
if (details.status !== 'completed') {
|
|
280
|
-
continue;
|
|
281
|
-
}
|
|
282
|
-
if (anyCompletedBatchHasUnmatchedWork) {
|
|
283
|
-
if (batchDetailsHasUnmatchedWork(details)) {
|
|
284
|
-
return batch.batchId;
|
|
285
|
-
}
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
return batch.batchId;
|
|
289
|
-
}
|
|
290
|
-
return undefined;
|
|
291
|
-
}
|
|
292
|
-
function resolveBatchFile(file, batchId, transactionState) {
|
|
293
|
-
const matchedTransaction = file.matchedTransactionId != null
|
|
294
|
-
? (0, transactionSelector_1.getSupportedTransactionById)(transactionState, file.matchedTransactionId)
|
|
295
|
-
: undefined;
|
|
296
|
-
const candidates = file.candidates
|
|
297
|
-
?.map((ref) => {
|
|
298
|
-
const transaction = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, ref.transactionId);
|
|
299
|
-
return transaction != null
|
|
300
|
-
? { transaction, matchScore: ref.matchScore }
|
|
301
|
-
: undefined;
|
|
302
|
-
})
|
|
303
|
-
.filter((candidate) => candidate != null);
|
|
304
|
-
return {
|
|
305
|
-
attachmentId: file.attachmentId,
|
|
306
|
-
batchId,
|
|
307
|
-
fileDownloadUrl: file.fileDownloadUrl,
|
|
308
|
-
fileId: file.fileId,
|
|
309
|
-
filename: file.filename,
|
|
310
|
-
filePreviewUrl: file.filePreviewUrl,
|
|
311
|
-
status: file.status,
|
|
312
|
-
matchedTransaction,
|
|
313
|
-
candidates: candidates != null && candidates.length > 0 ? candidates : undefined,
|
|
314
|
-
matchSource: file.matchSource,
|
|
315
64
|
};
|
|
316
65
|
}
|
|
@@ -19,7 +19,7 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
19
19
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
20
20
|
const reconciliationViewReducer_1 = require("../reducers/reconciliationViewReducer");
|
|
21
21
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
22
|
-
exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state
|
|
22
|
+
exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((state) => state, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.expenseAutomationReconciliationViewState, (state) => state.expenseAutomationViewState, (state) => state.plaidAccountViewState, (state) => state.accountListState, (state) => state.accountState, (state) => state.classListState, (state) => state.classState, (state) => state.monthEndCloseChecksState, (state) => state.vendorState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState) => {
|
|
23
23
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
24
24
|
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
25
25
|
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
@@ -41,13 +41,6 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
41
41
|
}
|
|
42
42
|
return acc;
|
|
43
43
|
}, []);
|
|
44
|
-
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
45
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
46
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
|
|
47
|
-
fetchState: 'Not-Started',
|
|
48
|
-
error: undefined,
|
|
49
|
-
})
|
|
50
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
51
44
|
if (accountReconForMonthYearPeriod == null) {
|
|
52
45
|
return {
|
|
53
46
|
bankAccounts: [],
|
|
@@ -57,13 +50,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
57
50
|
classListNestedAccountHierarchy: [],
|
|
58
51
|
allAccountList: [],
|
|
59
52
|
allClassList: [],
|
|
60
|
-
fetchStatus:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
monthEndFetchState,
|
|
66
|
-
]),
|
|
53
|
+
fetchStatus: {
|
|
54
|
+
fetchState: reconciliationViewState.fetchState,
|
|
55
|
+
error: reconciliationViewState.error,
|
|
56
|
+
},
|
|
67
57
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
68
58
|
.plaidConnectionDetails,
|
|
69
59
|
completionStatus: 'incomplete',
|
|
@@ -286,13 +276,10 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
286
276
|
bankAccounts: uniqueBankAccounts,
|
|
287
277
|
creditCards: uniqueCreditCards,
|
|
288
278
|
accountReconciliationsByAccountID: reconList,
|
|
289
|
-
fetchStatus:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
monthEndFetchState,
|
|
295
|
-
]),
|
|
279
|
+
fetchStatus: {
|
|
280
|
+
fetchState: reconciliationViewState.fetchState,
|
|
281
|
+
error: reconciliationViewState.error,
|
|
282
|
+
},
|
|
296
283
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
297
284
|
.plaidConnectionDetails,
|
|
298
285
|
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
@@ -14,9 +14,9 @@ const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
|
14
14
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
15
15
|
const expenseAutomationViewSelectorTypes_1 = require("../selectorTypes/expenseAutomationViewSelectorTypes");
|
|
16
16
|
function getExpenseAutomationTransactionView(state) {
|
|
17
|
-
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
17
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
18
18
|
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
19
|
-
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData,
|
|
19
|
+
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
20
20
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(accountState, accountListState, 'accountList');
|
|
21
21
|
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
22
22
|
const classList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
@@ -47,16 +47,10 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
47
47
|
.filter((transaction) => transaction != null);
|
|
48
48
|
const transactions = (0, transactionSelector_1.getSupportedTransactionsByIds)(transactionState, transactionIds);
|
|
49
49
|
const transactionsWithCOT = transactions.map((transaction) => (0, transactionHelper_1.getTransactionWithCOT)(transaction));
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(0, reduceFetchState_1.reduceAllFetchState)([
|
|
55
|
-
accountList,
|
|
56
|
-
classList,
|
|
57
|
-
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
58
|
-
]),
|
|
59
|
-
monthEndFetchState,
|
|
50
|
+
const fetchStatus = (0, reduceFetchState_1.reduceAllFetchState)([
|
|
51
|
+
accountList,
|
|
52
|
+
classList,
|
|
53
|
+
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
60
54
|
]);
|
|
61
55
|
const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
|
|
62
56
|
.uiState.totalCount;
|
|
@@ -106,7 +100,6 @@ function getExpenseAutomationTransactionView(state) {
|
|
|
106
100
|
completionStatus,
|
|
107
101
|
totalCountByTab,
|
|
108
102
|
fetchStateByTransactionTabs: fetchStateByTab,
|
|
109
|
-
uploadReceiptStatusById,
|
|
110
103
|
selectedTransactionId,
|
|
111
104
|
selectedTransactionLineId,
|
|
112
105
|
};
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import { NestedAccountHierarchyForReport } from '../../../commonStateTypes/accountView/nestedAccountID';
|
|
2
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
3
3
|
import { Recommendation } from '../../../commonStateTypes/recommendationBase';
|
|
4
|
-
import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
5
4
|
import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
6
5
|
import { AccountBase } from '../../../entity/account/accountState';
|
|
7
6
|
import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
|
|
8
7
|
import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
9
|
-
export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
|
|
10
|
-
export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
|
|
11
8
|
export interface JESchedulesViewUIState {
|
|
12
9
|
scrollPosition: {
|
|
13
10
|
scrollTop: number;
|
|
14
11
|
scrollLeft?: number;
|
|
15
12
|
} | undefined;
|
|
16
13
|
searchString: string;
|
|
17
|
-
sortKey: JEScheduleSortKey;
|
|
18
|
-
sortOrder: SortOrder;
|
|
19
14
|
totalCount: number;
|
|
20
15
|
limit?: number;
|
|
21
16
|
}
|
|
@@ -1,22 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toJEScheduleSortKey = void 0;
|
|
4
|
-
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
|
-
const JE_SCHEDULE_SORT_KEYS = [
|
|
6
|
-
'vendor',
|
|
7
|
-
'category',
|
|
8
|
-
'class',
|
|
9
|
-
'depCategory',
|
|
10
|
-
'scheduleCategory',
|
|
11
|
-
'startMonth',
|
|
12
|
-
'type',
|
|
13
|
-
'amortizationPeriod',
|
|
14
|
-
'jePostingDate',
|
|
15
|
-
'remainingMonths',
|
|
16
|
-
'runningBalance',
|
|
17
|
-
'totalAmount',
|
|
18
|
-
'transactionDate',
|
|
19
|
-
'memo',
|
|
20
|
-
];
|
|
21
|
-
const toJEScheduleSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, JE_SCHEDULE_SORT_KEYS);
|
|
22
|
-
exports.toJEScheduleSortKey = toJEScheduleSortKey;
|