@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
|
@@ -12,149 +12,7 @@ export interface MissingReceiptsViewUIState {
|
|
|
12
12
|
sortKey: MissingReceiptsSortKey;
|
|
13
13
|
sortOrder: SortOrder;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Minimum trimmed query length before manual-match search calls the expense-automation API.
|
|
17
|
-
* Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
|
|
18
|
-
*/
|
|
19
|
-
export declare const MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
|
|
20
|
-
export declare const toBatchStatusValue: (v: string) => "pending" | "processing" | "completed";
|
|
21
|
-
export type BatchStatusValue = ReturnType<typeof toBatchStatusValue>;
|
|
22
|
-
/** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
|
|
23
|
-
export declare const BATCH_FILE_STATUSES: readonly ["exact_match", "possible_matches", "no_match", "failed"];
|
|
24
|
-
export declare const toBatchFileStatus: (v: string) => "failed" | "exact_match" | "possible_matches" | "no_match";
|
|
25
|
-
export type BatchFileStatus = ReturnType<typeof toBatchFileStatus>;
|
|
26
|
-
/** True for files that belong in the Unmatched tab (possible matches or no match). */
|
|
27
|
-
export declare function isUnmatchedTabFileStatus(status: BatchFileStatus): boolean;
|
|
28
|
-
export declare const toBulkUploadPhase: (v: string) => "completed" | "idle" | "uploading" | "matching";
|
|
29
|
-
export type BulkUploadPhase = ReturnType<typeof toBulkUploadPhase>;
|
|
30
|
-
export declare const toBulkUploadResultsTab: (v: string) => "completed" | "unmatched";
|
|
31
|
-
export type BulkUploadResultsTab = ReturnType<typeof toBulkUploadResultsTab>;
|
|
32
|
-
export declare const toMissingReceiptsTab: (v: string) => "completed" | "unmatched" | "missing";
|
|
33
|
-
export type MissingReceiptsTab = ReturnType<typeof toMissingReceiptsTab>;
|
|
34
|
-
export declare const toCompletedSubTab: (v: string) => "all" | "manual" | "ai_accountant";
|
|
35
|
-
export type CompletedSubTab = ReturnType<typeof toCompletedSubTab>;
|
|
36
|
-
export declare const toMatchSource: (v: string) => "manual" | "ai";
|
|
37
|
-
export type MatchSource = ReturnType<typeof toMatchSource>;
|
|
38
|
-
export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
|
|
39
|
-
export type BulkUploadSortKey = ReturnType<typeof toBulkUploadSortKey>;
|
|
40
|
-
export interface CandidateRef {
|
|
41
|
-
matchScore: number;
|
|
42
|
-
transactionId: ID;
|
|
43
|
-
}
|
|
44
|
-
export interface MatchCandidate {
|
|
45
|
-
amount: number;
|
|
46
|
-
currencyCode: string;
|
|
47
|
-
matchScore: number;
|
|
48
|
-
transactionDate: string;
|
|
49
|
-
transactionId: ID;
|
|
50
|
-
transactionType: string;
|
|
51
|
-
vendorName: string;
|
|
52
|
-
vendorLogo?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface BatchFile {
|
|
55
|
-
attachmentId: ID;
|
|
56
|
-
fileDownloadUrl: string | null;
|
|
57
|
-
fileId: ID;
|
|
58
|
-
filename: string;
|
|
59
|
-
filePreviewUrl: string | null;
|
|
60
|
-
status: BatchFileStatus;
|
|
61
|
-
candidates?: CandidateRef[];
|
|
62
|
-
matchedTransactionId?: ID;
|
|
63
|
-
matchSource?: MatchSource;
|
|
64
|
-
}
|
|
65
|
-
export interface BatchSummary {
|
|
66
|
-
failed: number;
|
|
67
|
-
matched: number;
|
|
68
|
-
noMatch: number;
|
|
69
|
-
possibleMatches: number;
|
|
70
|
-
total: number;
|
|
71
|
-
}
|
|
72
|
-
export interface BatchStatus {
|
|
73
|
-
batchId: ID;
|
|
74
|
-
progress: {
|
|
75
|
-
processed: number;
|
|
76
|
-
total: number;
|
|
77
|
-
};
|
|
78
|
-
status: BatchStatusValue;
|
|
79
|
-
}
|
|
80
|
-
export interface BatchDetails {
|
|
81
|
-
batchId: ID;
|
|
82
|
-
createdAt: string;
|
|
83
|
-
files: BatchFile[];
|
|
84
|
-
status: BatchStatusValue;
|
|
85
|
-
summary: BatchSummary;
|
|
86
|
-
}
|
|
87
|
-
export interface BatchListItem {
|
|
88
|
-
batchId: ID;
|
|
89
|
-
createdAt: string;
|
|
90
|
-
failedCount: number;
|
|
91
|
-
matchedCount: number;
|
|
92
|
-
noMatchCount: number;
|
|
93
|
-
possibleMatchesCount: number;
|
|
94
|
-
status: string;
|
|
95
|
-
totalFiles: number;
|
|
96
|
-
}
|
|
97
|
-
export interface ManualSearchResult {
|
|
98
|
-
amount: number;
|
|
99
|
-
currencyCode: string;
|
|
100
|
-
entityId: string;
|
|
101
|
-
memo: string;
|
|
102
|
-
transactionDate: string;
|
|
103
|
-
transactionId: ID;
|
|
104
|
-
transactionType: string;
|
|
105
|
-
vendorName: string;
|
|
106
|
-
/** Present when API/merged transaction state supplies a logo URL. */
|
|
107
|
-
vendorLogo?: string;
|
|
108
|
-
}
|
|
109
|
-
export interface ManualSearchState {
|
|
110
|
-
fetchState: FetchStateAndError;
|
|
111
|
-
/** True while appending the next page (initial search uses fetchState only). */
|
|
112
|
-
isLoadingMore: boolean;
|
|
113
|
-
nextPageToken: string | null;
|
|
114
|
-
pageSize: number;
|
|
115
|
-
results: ManualSearchResult[];
|
|
116
|
-
searchQuery: string;
|
|
117
|
-
totalCount: number;
|
|
118
|
-
}
|
|
119
|
-
/** Same union as {@link CompletedSubTab} — used for completed-transactions API `match_type`. */
|
|
120
|
-
export type CompletedTransactionsMatchType = CompletedSubTab;
|
|
121
|
-
export interface CompletedTransactionsState {
|
|
122
|
-
fetchState: FetchStateAndError;
|
|
123
|
-
nextPageToken: string | null;
|
|
124
|
-
totalCount: number;
|
|
125
|
-
transactionIds: ID[];
|
|
126
|
-
}
|
|
127
|
-
export interface BulkUploadState {
|
|
128
|
-
batchDetailsById: Record<ID, BatchDetails>;
|
|
129
|
-
batchDetailsPaginationState: FetchStateAndError;
|
|
130
|
-
batchListByPeriod: Record<MonthYearPeriodId, BatchListItem[]>;
|
|
131
|
-
batchListFetchState: FetchStateAndError;
|
|
132
|
-
batchStatusById: Record<ID, BatchStatus>;
|
|
133
|
-
completedSubTab: CompletedSubTab;
|
|
134
|
-
completedTransactionsByPeriod: Record<string, CompletedTransactionsState>;
|
|
135
|
-
confirmMatchStatus: FetchStateAndError;
|
|
136
|
-
currentResultsTab: BulkUploadResultsTab;
|
|
137
|
-
failedBatchDetailIds: ID[];
|
|
138
|
-
/**
|
|
139
|
-
* Incremented when manual search Redux state is cleared so Unmatched `ManualSearchInput`
|
|
140
|
-
* instances remount and drop local query text.
|
|
141
|
-
*/
|
|
142
|
-
manualSearch: ManualSearchState;
|
|
143
|
-
manualSearchUiResetKey: number;
|
|
144
|
-
phase: BulkUploadPhase;
|
|
145
|
-
sortKey: BulkUploadSortKey;
|
|
146
|
-
sortOrder: SortOrder;
|
|
147
|
-
uploadProgress: number;
|
|
148
|
-
uploadStatus: FetchStateAndError;
|
|
149
|
-
currentBatchId?: ID;
|
|
150
|
-
}
|
|
151
15
|
export interface MissingReceiptsViewState extends FetchedState {
|
|
152
|
-
bulkUpload: BulkUploadState;
|
|
153
|
-
/**
|
|
154
|
-
* When set, the app shell should switch the Missing Receipts sub-tab (e.g. to Unmatched)
|
|
155
|
-
* once, then clear via `clearMissingReceiptsTabNavigation`.
|
|
156
|
-
*/
|
|
157
|
-
pendingMissingReceiptsTabNavigation: BulkUploadResultsTab | null;
|
|
158
16
|
refreshStatus: FetchStateAndError;
|
|
159
17
|
transactionIdsBySelectedPeriod: Record<MonthYearPeriodId, ID[]>;
|
|
160
18
|
uiState: MissingReceiptsViewUIState;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.isUnmatchedTabFileStatus = isUnmatchedTabFileStatus;
|
|
3
|
+
exports.toMissingReceiptsSortKey = void 0;
|
|
5
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
6
5
|
const MISSING_RECEIPTS_SORT_KEYS = [
|
|
7
6
|
'vendor',
|
|
@@ -12,55 +11,3 @@ const MISSING_RECEIPTS_SORT_KEYS = [
|
|
|
12
11
|
];
|
|
13
12
|
const toMissingReceiptsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, MISSING_RECEIPTS_SORT_KEYS);
|
|
14
13
|
exports.toMissingReceiptsSortKey = toMissingReceiptsSortKey;
|
|
15
|
-
// -- Bulk Receipt Upload Types --
|
|
16
|
-
/**
|
|
17
|
-
* Minimum trimmed query length before manual-match search calls the expense-automation API.
|
|
18
|
-
* Kept in sync with `ManualSearchInput` in web-components (fires search only when length ≥ this).
|
|
19
|
-
*/
|
|
20
|
-
exports.MIN_MANUAL_TRANSACTION_SEARCH_LENGTH = 2;
|
|
21
|
-
const BATCH_STATUS_VALUES = ['pending', 'processing', 'completed'];
|
|
22
|
-
const toBatchStatusValue = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BATCH_STATUS_VALUES);
|
|
23
|
-
exports.toBatchStatusValue = toBatchStatusValue;
|
|
24
|
-
/** Canonical batch file statuses (API ingress may use aliases; see `parseBatchFileStatus`). */
|
|
25
|
-
exports.BATCH_FILE_STATUSES = [
|
|
26
|
-
'exact_match',
|
|
27
|
-
'possible_matches',
|
|
28
|
-
'no_match',
|
|
29
|
-
'failed',
|
|
30
|
-
];
|
|
31
|
-
const toBatchFileStatus = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase().replace(/-/g, '_'), exports.BATCH_FILE_STATUSES);
|
|
32
|
-
exports.toBatchFileStatus = toBatchFileStatus;
|
|
33
|
-
const UNMATCHED_TAB_FILE_STATUSES = ['possible_matches', 'no_match'];
|
|
34
|
-
/** True for files that belong in the Unmatched tab (possible matches or no match). */
|
|
35
|
-
function isUnmatchedTabFileStatus(status) {
|
|
36
|
-
return UNMATCHED_TAB_FILE_STATUSES.includes(status);
|
|
37
|
-
}
|
|
38
|
-
const BULK_UPLOAD_PHASES = [
|
|
39
|
-
'idle',
|
|
40
|
-
'uploading',
|
|
41
|
-
'matching',
|
|
42
|
-
'completed',
|
|
43
|
-
];
|
|
44
|
-
const toBulkUploadPhase = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_PHASES);
|
|
45
|
-
exports.toBulkUploadPhase = toBulkUploadPhase;
|
|
46
|
-
const BULK_UPLOAD_RESULTS_TABS = ['completed', 'unmatched'];
|
|
47
|
-
const toBulkUploadResultsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_RESULTS_TABS);
|
|
48
|
-
exports.toBulkUploadResultsTab = toBulkUploadResultsTab;
|
|
49
|
-
const MISSING_RECEIPTS_TABS = ['missing', 'completed', 'unmatched'];
|
|
50
|
-
const toMissingReceiptsTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MISSING_RECEIPTS_TABS);
|
|
51
|
-
exports.toMissingReceiptsTab = toMissingReceiptsTab;
|
|
52
|
-
const COMPLETED_SUB_TABS = ['all', 'ai_accountant', 'manual'];
|
|
53
|
-
const toCompletedSubTab = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), COMPLETED_SUB_TABS);
|
|
54
|
-
exports.toCompletedSubTab = toCompletedSubTab;
|
|
55
|
-
const MATCH_SOURCES = ['ai', 'manual'];
|
|
56
|
-
const toMatchSource = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), MATCH_SOURCES);
|
|
57
|
-
exports.toMatchSource = toMatchSource;
|
|
58
|
-
const BULK_UPLOAD_SORT_KEYS = [
|
|
59
|
-
'amount',
|
|
60
|
-
'category',
|
|
61
|
-
'class',
|
|
62
|
-
'date',
|
|
63
|
-
'vendor',
|
|
64
|
-
];
|
|
65
|
-
const toBulkUploadSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v.trim().toLowerCase(), BULK_UPLOAD_SORT_KEYS);
|
|
66
|
-
exports.toBulkUploadSortKey = toBulkUploadSortKey;
|
|
@@ -15,7 +15,7 @@ import { VendorBase } from '../../../entity/vendor/vendorState';
|
|
|
15
15
|
import { ZeniDate } from '../../../zeniDayJS';
|
|
16
16
|
import { EntityRecommendationKey } from '../../recommendation/recommendationState';
|
|
17
17
|
import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
|
|
18
|
-
export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class" | "
|
|
18
|
+
export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class" | "memo" | "transaction_type";
|
|
19
19
|
export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
|
|
20
20
|
export declare const TRANSACTIONS_TABS: readonly ["review", "autoCategorized"];
|
|
21
21
|
export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
|
|
@@ -97,7 +97,6 @@ export interface TransactionsTabViewState extends FetchedState {
|
|
|
97
97
|
transactionIdsWithUnsavedData: ID[];
|
|
98
98
|
transactionReviewLocalDataById: Record<ID | TransactionDetailKey, SupportedTransactionCategorization>;
|
|
99
99
|
uiState: TransactionsViewUIState;
|
|
100
|
-
uploadReceiptStatusById: Record<ID, FetchStateAndError>;
|
|
101
100
|
selectedTransactionId?: ID;
|
|
102
101
|
selectedTransactionLineId?: ID;
|
|
103
102
|
}
|
|
@@ -7,11 +7,10 @@ const TRANSACTIONS_SORT_KEYS = [
|
|
|
7
7
|
'vendor',
|
|
8
8
|
'amount',
|
|
9
9
|
'transaction_type',
|
|
10
|
-
'payment_account',
|
|
11
10
|
'date',
|
|
12
11
|
'category',
|
|
13
12
|
'class',
|
|
14
|
-
'
|
|
13
|
+
'memo',
|
|
15
14
|
];
|
|
16
15
|
const toTransactionsSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, TRANSACTIONS_SORT_KEYS);
|
|
17
16
|
exports.toTransactionsSortKey = toTransactionsSortKey;
|
|
@@ -48,20 +48,19 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
48
48
|
updateFinanceStatementThisPeriod(draft, action) {
|
|
49
49
|
const { firstMonthOfFY, coaBalances, maxNumOfPeriodsToHighlight } = action.payload;
|
|
50
50
|
const { timeframe, selectedCOABalancesRange } = draft;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, safeCoaBalances);
|
|
51
|
+
if (coaBalances.length > 0) {
|
|
52
|
+
const prevThisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
|
|
54
53
|
if (prevThisPeriod != null) {
|
|
55
54
|
const selectedCoaBalancesRangeWithThisPeriod = {
|
|
56
55
|
...selectedCOABalancesRange,
|
|
57
56
|
thisPeriod: prevThisPeriod,
|
|
58
57
|
};
|
|
59
|
-
const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod,
|
|
58
|
+
const newThisPeriod = (0, thisPeriodHelpers_1.getMatchingThisPeriod)(action.payload.firstMonthOfFY, timeframe, action.payload.thisPeriod, coaBalances);
|
|
60
59
|
if (newThisPeriod != null) {
|
|
61
60
|
const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
|
|
62
61
|
firstMonthOfFY,
|
|
63
62
|
thisPeriod: newThisPeriod,
|
|
64
|
-
coaBalances
|
|
63
|
+
coaBalances,
|
|
65
64
|
timeframe,
|
|
66
65
|
maxNumOfPeriodsToSelect: maxNumOfPeriodsToHighlight,
|
|
67
66
|
currentSelection: {
|
|
@@ -80,9 +79,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
80
79
|
draft.selectedReportId = action.payload;
|
|
81
80
|
},
|
|
82
81
|
updateFinanceStatementAdditionalBalancesSelection(draft, action) {
|
|
83
|
-
const { firstMonthOfFY, additionalBalances
|
|
84
|
-
const safeCoaBalances = coaBalances != null ? coaBalances : [];
|
|
85
|
-
const additionalBalances = additionalBalancesPayload ?? [];
|
|
82
|
+
const { firstMonthOfFY, additionalBalances, coaBalances, maxNumOfPeriodsToHighlight, } = action.payload;
|
|
86
83
|
let tempAdditionalBalances = [...additionalBalances];
|
|
87
84
|
if (additionalBalances.includes('this_period_vs_last_period') ||
|
|
88
85
|
additionalBalances.includes('this_period_vs_last_period_percent')) {
|
|
@@ -98,8 +95,8 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
98
95
|
draft.isAdditionalBalancesShown =
|
|
99
96
|
additionalBalances.length != 0 ? true : false;
|
|
100
97
|
const { timeframe, selectedCOABalancesRange } = draft;
|
|
101
|
-
if (
|
|
102
|
-
const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange,
|
|
98
|
+
if (coaBalances.length > 0) {
|
|
99
|
+
const thisPeriod = (0, thisPeriodHelpers_1.extractThisPeriod)(action.payload.firstMonthOfFY, timeframe, selectedCOABalancesRange, coaBalances);
|
|
103
100
|
if (thisPeriod != null) {
|
|
104
101
|
const selectedCoaBalancesRangeWithThisPeriod = {
|
|
105
102
|
...selectedCOABalancesRange,
|
|
@@ -108,7 +105,7 @@ const financeStatement = (0, toolkit_1.createSlice)({
|
|
|
108
105
|
const selectionRanges = (0, getSelectedAndHighlightedRanges_1.getSelectedAndHighlightedRangesForThisPeriod)({
|
|
109
106
|
firstMonthOfFY,
|
|
110
107
|
thisPeriod: thisPeriod,
|
|
111
|
-
coaBalances
|
|
108
|
+
coaBalances,
|
|
112
109
|
timeframe,
|
|
113
110
|
maxNumOfPeriodsToHighlight: maxNumOfPeriodsToHighlight,
|
|
114
111
|
currentSelection: {
|
|
@@ -8,7 +8,6 @@ import { RootState } from '../../reducer';
|
|
|
8
8
|
import { BalanceSheetReport } from '../balanceSheet/balanceSheetSelectorTypes';
|
|
9
9
|
import { CashFlowReport } from '../cashFlow/cashFlowSelectorTypes';
|
|
10
10
|
import { ProfitAndLossReport } from '../profitAndLoss/profitAndLossSelector';
|
|
11
|
-
import { ProfitAndLossByClassHorizontalReport } from '../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
|
|
12
11
|
import { ProfitAndLossClassesViewReport } from '../profitAndLossClassesView/profitAndLossClassesViewSelectorTypes';
|
|
13
12
|
export interface FinanceStatementReport extends SelectorReport {
|
|
14
13
|
allTimeframeTicks: TimeframeTickWithMetaData[];
|
|
@@ -19,7 +18,6 @@ export interface FinanceStatementReport extends SelectorReport {
|
|
|
19
18
|
downloadState: FetchState;
|
|
20
19
|
filter: COABalancesFilter;
|
|
21
20
|
isCompareModeOn: boolean;
|
|
22
|
-
profitAndLossByClassHorizontalReport: ProfitAndLossByClassHorizontalReport;
|
|
23
21
|
profitAndLossByClassReport: ProfitAndLossClassesViewReport;
|
|
24
22
|
profitAndLossReport: ProfitAndLossReport;
|
|
25
23
|
reportFormat: ReportFormat;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFinanceStatement = void 0;
|
|
4
4
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
-
const coaBalanceType_1 = require("../../commonStateTypes/coaBalance/coaBalanceType");
|
|
6
5
|
const coaBalancesFilter_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilter");
|
|
7
6
|
const coaBalancesFilterClassesView_1 = require("../../commonStateTypes/coaBalance/coaBalancesFilterClassesView");
|
|
8
7
|
const dataAvailable_1 = require("../../commonStateTypes/dataAvailable");
|
|
@@ -12,7 +11,6 @@ const thisPeriodHelpers_1 = require("../../commonStateTypes/viewAndReport/thisPe
|
|
|
12
11
|
const balanceSheetSelector_1 = require("../balanceSheet/balanceSheetSelector");
|
|
13
12
|
const cashFlowSelector_1 = require("../cashFlow/cashFlowSelector");
|
|
14
13
|
const profitAndLossSelector_1 = require("../profitAndLoss/profitAndLossSelector");
|
|
15
|
-
const profitAndLossClassesByClassHorizontalSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector");
|
|
16
14
|
const profitAndLossClassesViewSelector_1 = require("../profitAndLossClassesView/profitAndLossClassesViewSelector");
|
|
17
15
|
function getDateRangeForFinanceReports(profitAndLossState, balanceSheetState, cashFlowState) {
|
|
18
16
|
const datesSorted = [
|
|
@@ -47,11 +45,11 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
47
45
|
if (dataAvailable != null) {
|
|
48
46
|
const noFilter = (0, coaBalancesFilter_1.newBalancesFilterForDateRange)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable, 'ascending_date', []);
|
|
49
47
|
const profitAndLossForTimeframeTicks = (0, profitAndLossSelector_1.getProfitAndLossReport)(noFilter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
if (profitAndLossForTimeframeTicks.sections.expenses != null) {
|
|
49
|
+
balancesInTimeframe =
|
|
50
|
+
profitAndLossForTimeframeTicks.sections.expenses.balances.length > 0
|
|
51
|
+
? profitAndLossForTimeframeTicks.sections['expenses'].balances
|
|
52
|
+
: profitAndLossForTimeframeTicks.sections['income'].balances;
|
|
55
53
|
allTimeframeTicks = balancesInTimeframe.map((balance) => (0, timeframeTick_1.toTimeframeTick)(balance));
|
|
56
54
|
}
|
|
57
55
|
}
|
|
@@ -59,22 +57,12 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
59
57
|
if (thisPeriod == null && balancesInTimeframe.length > 0) {
|
|
60
58
|
thisPeriod = (0, timeframeTick_1.toTimeframeTick)(balancesInTimeframe[balancesInTimeframe.length - 1]);
|
|
61
59
|
}
|
|
62
|
-
const
|
|
60
|
+
const filter = (0, coaBalancesFilter_1.newBalancesFilter)(firstMonthOfFY, financeStatementState.timeframe, Math.min((0, dataAvailable_1.getNumberOfPeriods)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', financeStatementState.isAdditionalBalancesShown === true
|
|
63
61
|
? financeStatementState.selectedAdditionalBalances
|
|
64
|
-
: [];
|
|
65
|
-
const useHorizontalClassesLayout = profitAndLossClassesViewState.uiState.classViewLayout ===
|
|
66
|
-
'horizontal' &&
|
|
67
|
-
financeStatementState.selectedReportId === 'profit_and_loss_by_classes';
|
|
68
|
-
const additionalBalancesForFilter = useHorizontalClassesLayout
|
|
69
|
-
? (0, coaBalanceType_1.stripCompareAdditionalBalanceTypes)(rawAdditionalBalances)
|
|
70
|
-
: rawAdditionalBalances;
|
|
71
|
-
const filter = (0, coaBalancesFilter_1.newBalancesFilter)(firstMonthOfFY, financeStatementState.timeframe, Math.min((0, dataAvailable_1.getNumberOfPeriods)(firstMonthOfFY, financeStatementState.timeframe, dataAvailable) ?? financeStatementState.selectedCOABalancesRange.numberOfPeriods, financeStatementState.selectedCOABalancesRange.numberOfPeriods), thisPeriod, 'ascending_date', additionalBalancesForFilter);
|
|
62
|
+
: []);
|
|
72
63
|
const profitAndLossReport = (0, profitAndLossSelector_1.getProfitAndLossReport)(filter, undefined, accountState, accountGroupState, sectionAccountsViewState, profitAndLossState, forecastState);
|
|
73
64
|
const classFilter = (0, coaBalancesFilterClassesView_1.newBalancesFilterClassesView)(filter.firstMonthOfFY, filter.timeframe, filter.balancesRange.numberOfPeriods, filter.balancesRange.thisPeriod, filter.balancesRange.orderBy, filter.additionalBalances, profitAndLossClassesViewState.uiState.classesToFilterOut);
|
|
74
65
|
const profitAndLossByClassReport = (0, profitAndLossClassesViewSelector_1.getProfitAndLossClassesView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState);
|
|
75
|
-
const profitAndLossByClassHorizontalReport = (0, profitAndLossClassesByClassHorizontalSelector_1.getProfitAndLossClassesHorizontalView)(classFilter, accountState, classState, sectionsState, profitAndLossClassesViewState, profitAndLossClassesViewState.uiState.classViewLayout === 'horizontal'
|
|
76
|
-
? thisPeriod
|
|
77
|
-
: undefined);
|
|
78
66
|
const balanceSheetReport = (0, balanceSheetSelector_1.getBalanceSheet)(filter, accountState, accountGroupState, sectionAccountsViewState, balanceSheetState);
|
|
79
67
|
const cashFlowReport = (0, cashFlowSelector_1.getCashFlow)(filter, accountState, accountGroupState, sectionAccountsViewState, cashFlowState);
|
|
80
68
|
const allReports = [
|
|
@@ -122,15 +110,12 @@ exports.getFinanceStatement = (0, toolkit_1.createSelector)((state) => state.acc
|
|
|
122
110
|
dataAvailable,
|
|
123
111
|
profitAndLossReport,
|
|
124
112
|
profitAndLossByClassReport,
|
|
125
|
-
profitAndLossByClassHorizontalReport,
|
|
126
113
|
balanceSheetReport,
|
|
127
114
|
cashFlowReport,
|
|
128
115
|
filter,
|
|
129
116
|
selectedReportId: financeStatementState.selectedReportId,
|
|
130
117
|
downloadState: financeStatementState.downloadState,
|
|
131
|
-
isCompareModeOn:
|
|
132
|
-
|
|
133
|
-
: financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
|
|
134
|
-
financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
|
|
118
|
+
isCompareModeOn: financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period') ||
|
|
119
|
+
financeStatementState.selectedAdditionalBalances.includes('this_period_vs_last_period_percent'),
|
|
135
120
|
};
|
|
136
121
|
});
|
|
@@ -2,7 +2,7 @@ import { NestedClassID } from '../../commonStateTypes/classesView/nestedClassID'
|
|
|
2
2
|
import { AccountViewMode, ID } from '../../commonStateTypes/common';
|
|
3
3
|
import { ZeniAPIStatus, ZeniReportData } from '../../responsePayload';
|
|
4
4
|
import { ProfitAndLossClassesViewPayload } from './profitAndLossClassesViewPayload';
|
|
5
|
-
import {
|
|
5
|
+
import { ProfitAndLossClassesViewState } from './profitAndLossClassesViewState';
|
|
6
6
|
export declare const initialState: ProfitAndLossClassesViewState;
|
|
7
7
|
export declare const fetchProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: boolean | undefined], {
|
|
8
8
|
cacheOverride: boolean;
|
|
@@ -30,8 +30,6 @@ export declare const fetchProfitAndLossClassesView: import("@reduxjs/toolkit").A
|
|
|
30
30
|
};
|
|
31
31
|
}, "profitAndLossClassesView/updateProfitAndLossClassesViewUIState">, updateAccountViewMode: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
32
32
|
viewMode: AccountViewMode;
|
|
33
|
-
}, "profitAndLossClassesView/updateAccountViewMode">,
|
|
34
|
-
classViewLayout: ClassViewLayout;
|
|
35
|
-
}, "profitAndLossClassesView/updateClassViewLayout">, resetProfitAndLossClassesNodeCollapseState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/resetProfitAndLossClassesNodeCollapseState">, clearProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/clearProfitAndLossClassesView">;
|
|
33
|
+
}, "profitAndLossClassesView/updateAccountViewMode">, resetProfitAndLossClassesNodeCollapseState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/resetProfitAndLossClassesNodeCollapseState">, clearProfitAndLossClassesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"profitAndLossClassesView/clearProfitAndLossClassesView">;
|
|
36
34
|
declare const _default: import("redux").Reducer<ProfitAndLossClassesViewState>;
|
|
37
35
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearProfitAndLossClassesView = exports.resetProfitAndLossClassesNodeCollapseState = exports.
|
|
4
|
+
exports.clearProfitAndLossClassesView = exports.resetProfitAndLossClassesNodeCollapseState = exports.updateAccountViewMode = exports.updateProfitAndLossClassesViewUIState = exports.updateClassesToFilterOut = exports.updateProfitAndLossForTimeframeClassesViewFailure = exports.updateProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossForTimeframeClassesView = exports.fetchProfitAndLossClassesView = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const viewAndReportPayloadv2_1 = require("../../commonPayloadTypes/v2/viewAndReportPayloadv2");
|
|
7
7
|
const getNestedClassIDHierarchyForReport_1 = require("../../commonStateTypes/classesView/getNestedClassIDHierarchyForReport");
|
|
@@ -27,7 +27,6 @@ exports.initialState = {
|
|
|
27
27
|
nodeCollapseState: {},
|
|
28
28
|
scrollPosition: undefined,
|
|
29
29
|
accountViewMode: 'account_group',
|
|
30
|
-
classViewLayout: 'vertical',
|
|
31
30
|
classesToFilterOut: [],
|
|
32
31
|
},
|
|
33
32
|
firstMonthOfFY: 1,
|
|
@@ -99,9 +98,6 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
|
|
|
99
98
|
updateAccountViewMode(draft, action) {
|
|
100
99
|
draft.uiState.accountViewMode = action.payload.viewMode;
|
|
101
100
|
},
|
|
102
|
-
updateClassViewLayout(draft, action) {
|
|
103
|
-
draft.uiState.classViewLayout = action.payload.classViewLayout;
|
|
104
|
-
},
|
|
105
101
|
resetProfitAndLossClassesNodeCollapseState(draft) {
|
|
106
102
|
draft.uiState.nodeCollapseState = {};
|
|
107
103
|
},
|
|
@@ -110,11 +106,10 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
|
|
|
110
106
|
},
|
|
111
107
|
},
|
|
112
108
|
});
|
|
113
|
-
_a = profitAndLossClassesView.actions, exports.fetchProfitAndLossClassesView = _a.fetchProfitAndLossClassesView, exports.fetchProfitAndLossForTimeframeClassesView = _a.fetchProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesView = _a.updateProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesViewFailure = _a.updateProfitAndLossForTimeframeClassesViewFailure, exports.updateClassesToFilterOut = _a.updateClassesToFilterOut, exports.updateProfitAndLossClassesViewUIState = _a.updateProfitAndLossClassesViewUIState, exports.updateAccountViewMode = _a.updateAccountViewMode, exports.
|
|
109
|
+
_a = profitAndLossClassesView.actions, exports.fetchProfitAndLossClassesView = _a.fetchProfitAndLossClassesView, exports.fetchProfitAndLossForTimeframeClassesView = _a.fetchProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesView = _a.updateProfitAndLossForTimeframeClassesView, exports.updateProfitAndLossForTimeframeClassesViewFailure = _a.updateProfitAndLossForTimeframeClassesViewFailure, exports.updateClassesToFilterOut = _a.updateClassesToFilterOut, exports.updateProfitAndLossClassesViewUIState = _a.updateProfitAndLossClassesViewUIState, exports.updateAccountViewMode = _a.updateAccountViewMode, exports.resetProfitAndLossClassesNodeCollapseState = _a.resetProfitAndLossClassesNodeCollapseState, exports.clearProfitAndLossClassesView = _a.clearProfitAndLossClassesView;
|
|
114
110
|
exports.default = profitAndLossClassesView.reducer;
|
|
115
111
|
const doUpdatedProfitAndLossClassesView = (draft, timeframe, pandLReport) => {
|
|
116
112
|
const report = (0, viewAndReportPayloadv2_1.mapReportPayloadV2ToReportV2)(pandLReport.report);
|
|
117
|
-
draft.currency = report.currency;
|
|
118
113
|
draft.dataAvailable = report.dataAvailable;
|
|
119
114
|
draft.firstMonthOfFY = report.firstMonthOfFY;
|
|
120
115
|
draft.bookCloseDate = report.bookCloseDate;
|
|
@@ -4,7 +4,6 @@ exports.getProfitAndLossClassesView = exports.profitAndLossIdsInOrder = void 0;
|
|
|
4
4
|
const getDifferenceOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getDifferenceOfBalancesGroupedByPeriod");
|
|
5
5
|
const getSumOfBalancesGroupedByPeriod_1 = require("../../commonStateTypes/coaBalance/classBalances/getSumOfBalancesGroupedByPeriod");
|
|
6
6
|
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
7
|
-
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
8
7
|
const sectionClassesViewSelector_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewSelector");
|
|
9
8
|
const profitAndLossClassesViewSelectorTypes_1 = require("./profitAndLossClassesViewSelectorTypes");
|
|
10
9
|
exports.profitAndLossIdsInOrder = [
|
|
@@ -19,7 +18,7 @@ exports.profitAndLossIdsInOrder = [
|
|
|
19
18
|
'netIncome',
|
|
20
19
|
];
|
|
21
20
|
const getProfitAndLossClassesView = (filter, accountState, classState, sectionsState, profitAndLossClassesViewState) => {
|
|
22
|
-
const fetchState = (
|
|
21
|
+
const fetchState = reduceFetchState([
|
|
23
22
|
profitAndLossClassesViewState.fetchState.month,
|
|
24
23
|
profitAndLossClassesViewState.fetchState.quarter,
|
|
25
24
|
profitAndLossClassesViewState.fetchState.year,
|
|
@@ -69,3 +68,31 @@ const getProfitAndLossClassesView = (filter, accountState, classState, sectionsS
|
|
|
69
68
|
};
|
|
70
69
|
};
|
|
71
70
|
exports.getProfitAndLossClassesView = getProfitAndLossClassesView;
|
|
71
|
+
function reduceFetchState(fetchStateList) {
|
|
72
|
+
const isAnyProgress = fetchStateList.reduce((prevValue, currentValue) => {
|
|
73
|
+
return prevValue === true || currentValue.fetchState === 'In-Progress';
|
|
74
|
+
}, false);
|
|
75
|
+
const isAllCompleted = fetchStateList.reduce((prevValue, currentValue) => {
|
|
76
|
+
return prevValue === true && currentValue.fetchState === 'Completed';
|
|
77
|
+
}, true);
|
|
78
|
+
const isAnyError = fetchStateList.reduce((prevValue, currentValue) => {
|
|
79
|
+
return prevValue === true || currentValue.fetchState === 'Error';
|
|
80
|
+
}, false);
|
|
81
|
+
const error = fetchStateList.reduce((prevValue, currentValue) => {
|
|
82
|
+
return prevValue ?? currentValue.error;
|
|
83
|
+
}, undefined);
|
|
84
|
+
let fetchState = 'Not-Started';
|
|
85
|
+
if (isAnyProgress) {
|
|
86
|
+
fetchState = 'In-Progress';
|
|
87
|
+
}
|
|
88
|
+
else if (isAllCompleted) {
|
|
89
|
+
fetchState = 'Completed';
|
|
90
|
+
}
|
|
91
|
+
else if (isAnyError) {
|
|
92
|
+
fetchState = 'Error';
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
fetchState,
|
|
96
|
+
error,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { Currency } from '../../commonStateTypes/amount';
|
|
2
1
|
import { NestedClassHierarchyForReport, NestedClassID } from '../../commonStateTypes/classesView/nestedClassID';
|
|
3
2
|
import { AccountViewMode, FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
4
3
|
import { Report } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
-
export type ClassViewLayout = 'vertical' | 'horizontal';
|
|
6
4
|
export interface ProfitAndLossClassesViewUIState {
|
|
7
5
|
accountViewMode: AccountViewMode;
|
|
8
6
|
classesToFilterOut: NestedClassID[];
|
|
9
|
-
classViewLayout: ClassViewLayout;
|
|
10
7
|
nodeCollapseState: Record<ID, boolean>;
|
|
11
8
|
scrollPosition: {
|
|
12
9
|
scrollTop: number;
|
|
@@ -21,5 +18,4 @@ export interface ProfitAndLossClassesViewState extends Report {
|
|
|
21
18
|
year: FetchStateAndError;
|
|
22
19
|
};
|
|
23
20
|
uiState: ProfitAndLossClassesViewUIState;
|
|
24
|
-
currency?: Currency;
|
|
25
21
|
}
|
|
@@ -27,13 +27,11 @@ const fetchProfitAndLossForTimeframeClassesViewEpic = (actions$, _, zeniAPI) =>
|
|
|
27
27
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
28
28
|
if (response.data != null && (0, responsePayload_1.isSuccessResponse)(response)) {
|
|
29
29
|
const actions = [];
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, '
|
|
33
|
-
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, '
|
|
34
|
-
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, '
|
|
35
|
-
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', report.other_expenses, report.classes, report.accounts, currency));
|
|
36
|
-
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', report.other_income, report.classes, report.accounts, currency));
|
|
30
|
+
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'cogs', 'profit_and_loss_by_classes', response.data.report.cogs, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
31
|
+
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'expenses', 'profit_and_loss_by_classes', response.data.report.expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
32
|
+
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'income', 'profit_and_loss_by_classes', response.data.report.income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
33
|
+
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'otherExpenses', 'profit_and_loss_by_classes', response.data.report.other_expenses, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
34
|
+
actions.push((0, sectionClassesViewReducer_1.updateSectionClassesView)(action.payload.timeframe, 'otherIncome', 'profit_and_loss_by_classes', response.data.report.other_income, response.data.report.classes, response.data.report.accounts, response.data.report.currency));
|
|
37
35
|
actions.push((0, profitAndLossClassesViewReducer_1.updateProfitAndLossForTimeframeClassesView)({
|
|
38
36
|
timeframe: action.payload.timeframe,
|
|
39
37
|
report: response.data,
|
|
@@ -11,13 +11,9 @@ const opExReducer_1 = require("../opEx/opExReducer");
|
|
|
11
11
|
const revenueReducer_1 = require("../revenue/revenueReducer");
|
|
12
12
|
const reportUIOptionsReducer_1 = require("./reportUIOptionsReducer");
|
|
13
13
|
const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange.match), (0, operators_1.switchMap)((action) => {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const numberOfPeriodsFromSelection = selectedRange.numberOfPeriods;
|
|
18
|
-
const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true
|
|
19
|
-
? numberOfPeriodsFromSelection
|
|
20
|
-
: 1;
|
|
14
|
+
const thisPeriod = action.payload.selectedCOABalancesRange.thisPeriod;
|
|
15
|
+
const orderBy = action.payload.selectedCOABalancesRange.orderBy;
|
|
16
|
+
const highlightedNoOfPeriods = state$.value.reportUIOptionsState.isCompareModeOn === true ? 4 : 1;
|
|
21
17
|
const highlightedCOABalancesRange = action.payload.highlightedCOABalancesRange == null && thisPeriod != null
|
|
22
18
|
? {
|
|
23
19
|
numberOfPeriods: highlightedNoOfPeriods,
|
|
@@ -69,7 +65,9 @@ const updateReportUIOptionCOABalancesRangeEpic = (actions$, state$) => actions$.
|
|
|
69
65
|
thisPeriod: action.payload.highlightedCOABalancesRange != null
|
|
70
66
|
? action.payload.highlightedCOABalancesRange.thisPeriod
|
|
71
67
|
: thisPeriod,
|
|
72
|
-
numberOfPeriods:
|
|
68
|
+
numberOfPeriods: state$.value.reportUIOptionsState.isCompareModeOn === true
|
|
69
|
+
? 4
|
|
70
|
+
: financeStatementReducer_1.initialFinanceStatementState.maxNumOfPeriodsToHighlight,
|
|
73
71
|
orderBy,
|
|
74
72
|
}));
|
|
75
73
|
}));
|
|
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
|
|
|
7
7
|
export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
|
|
8
8
|
export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
|
|
9
9
|
export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
|
|
10
|
-
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "
|
|
10
|
+
declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
|
|
11
11
|
export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
|
|
12
12
|
export interface DownloadJEScheduleTabOptions {
|
|
13
13
|
categoryId: ID;
|
|
@@ -424,14 +424,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
424
424
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
425
|
}
|
|
426
426
|
break;
|
|
427
|
-
case 'invoiceNumber':
|
|
428
|
-
if (transaction.documentId != null) {
|
|
429
|
-
transactionsWithSortKeyValue.push(transaction);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
transactionsWithNoSortKeyValue.push(transaction);
|
|
433
|
-
}
|
|
434
|
-
break;
|
|
435
427
|
case 'dueDate':
|
|
436
428
|
if (currentTab === 'draft') {
|
|
437
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -534,8 +526,6 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
534
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
535
527
|
case 'paymentMethod':
|
|
536
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
537
|
-
case 'invoiceNumber':
|
|
538
|
-
return transaction.documentId;
|
|
539
529
|
}
|
|
540
530
|
}, getColumnWiseSortOrder(sortOrder));
|
|
541
531
|
return [
|
|
@@ -37,7 +37,7 @@ declare const toBillTabType: (v: string) => "paid" | "pending_approval" | "sched
|
|
|
37
37
|
export type BillTab = ReturnType<typeof toBillTabType>;
|
|
38
38
|
declare const toBillsSubTabType: (v: string) => "rejected" | "failed" | "ach" | "wire" | "cancelled" | "deleted" | "overdue" | "all" | "awaiting_approval" | "awaiting_my_approval" | "offline";
|
|
39
39
|
export type BillsSubTabType = ReturnType<typeof toBillsSubTabType>;
|
|
40
|
-
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "
|
|
40
|
+
declare const toBillPaySortKeyType: (v: string) => "amount" | "status" | "name" | "dueDate" | "paymentMethod" | "invoiceDate";
|
|
41
41
|
export declare type BillPayViewSortKey = ReturnType<typeof toBillPaySortKeyType>;
|
|
42
42
|
export interface BillPayFilters {
|
|
43
43
|
categories: BillPayFilterCategory[];
|
|
@@ -47,7 +47,6 @@ const ALL_BILL_PAY_SORT_KEYS = [
|
|
|
47
47
|
'invoiceDate',
|
|
48
48
|
'name',
|
|
49
49
|
'paymentMethod',
|
|
50
|
-
'invoiceNumber',
|
|
51
50
|
];
|
|
52
51
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
52
|
const toBillPaySortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_BILL_PAY_SORT_KEYS);
|