@zeniai/client-epic-state 4.20.9-betaRR12 → 4.20.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -3
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountReducer.d.ts +2 -5
- package/lib/entity/account/accountReducer.js +2 -7
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +0 -38
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +1 -4
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +0 -37
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/entity/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.d.ts +2 -5
- package/lib/entity/tenant/tenantReducer.js +2 -9
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +1 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -9
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -11
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/epic.d.ts +1 -12
- package/lib/epic.js +1 -12
- package/lib/esm/commonStateTypes/animations.js +0 -3
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/account/accountReducer.js +1 -6
- package/lib/esm/entity/accountRecon/accountReconPayload.js +2 -4
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +0 -78
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +1 -5
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -6
- package/lib/esm/entity/tenant/tenantReducer.js +1 -8
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -79
- package/lib/esm/epic.js +1 -12
- package/lib/esm/index.js +13 -16
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -9
- package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +1 -19
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/esm/view/companyView/companyViewReducer.js +1 -26
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +1 -21
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +3 -167
- package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +5 -15
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -24
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +4 -7
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/lib/index.d.ts +19 -26
- package/lib/index.js +32 -62
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -15
- package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -8
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +5 -18
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +2 -6
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +2 -20
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +1 -4
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +1 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +1 -9
- package/lib/view/companyView/companyViewReducer.d.ts +1 -6
- package/lib/view/companyView/companyViewReducer.js +2 -28
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +0 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +0 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +9 -4
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +1 -2
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +1 -0
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -45
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -22
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +4 -18
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -168
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +0 -2
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +2 -7
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +2 -10
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +6 -63
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +4 -12
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +9 -136
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -13
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +0 -8
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +0 -27
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -14
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +0 -3
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +3 -6
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +1 -2
- package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +1 -2
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -16
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +2 -9
- package/package.json +1 -1
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +0 -19
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -2
- package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +0 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -17
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -44
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -44
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -26
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -199
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -52
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -1
- package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -100
- package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -48
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -36
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -45
- package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -50
- package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -69
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +0 -7
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +0 -21
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +0 -10
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +0 -65
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +0 -48
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +0 -48
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +0 -75
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +0 -30
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +0 -50
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +0 -206
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +0 -24
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +0 -61
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +0 -38
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +0 -2
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +0 -12
- package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +0 -106
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +0 -40
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +0 -7
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +0 -52
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +0 -10
- package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +0 -54
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +0 -8
- package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +0 -73
|
@@ -9,12 +9,11 @@ import { getAccountsByType } from '../../../entity/account/accountSelector';
|
|
|
9
9
|
import { getAccountReconByAccountIdAndSelectedPeriod } from '../../../entity/accountRecon/accountReconSelector';
|
|
10
10
|
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
11
11
|
import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
|
|
12
|
-
import { date } from '../../../zeniDayJS';
|
|
13
12
|
import { getAccountList, getNestedAccountListHierarchy, } from '../../accountList/accountListSelector';
|
|
14
13
|
import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
|
|
15
14
|
import { initialActionFetchState, initialReconciliationTabsState, initialState, } from '../reducers/reconciliationViewReducer';
|
|
16
15
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
17
|
-
export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => 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
|
|
16
|
+
export const getExpenseAutomationReconciliationView = createSelector((state) => state, (state) => 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) => {
|
|
18
17
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
19
18
|
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
20
19
|
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
@@ -36,13 +35,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
36
35
|
}
|
|
37
36
|
return acc;
|
|
38
37
|
}, []);
|
|
39
|
-
const monthYearPeriodId = selectedPeriod != null ? toMonthYearPeriodId(selectedPeriod) : null;
|
|
40
|
-
const monthEndFetchState = monthYearPeriodId != null
|
|
41
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
|
|
42
|
-
fetchState: 'Not-Started',
|
|
43
|
-
error: undefined,
|
|
44
|
-
})
|
|
45
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
46
38
|
if (accountReconForMonthYearPeriod == null) {
|
|
47
39
|
return {
|
|
48
40
|
bankAccounts: [],
|
|
@@ -52,13 +44,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
52
44
|
classListNestedAccountHierarchy: [],
|
|
53
45
|
allAccountList: [],
|
|
54
46
|
allClassList: [],
|
|
55
|
-
fetchStatus:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
monthEndFetchState,
|
|
61
|
-
]),
|
|
47
|
+
fetchStatus: {
|
|
48
|
+
fetchState: reconciliationViewState.fetchState,
|
|
49
|
+
error: reconciliationViewState.error,
|
|
50
|
+
},
|
|
62
51
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
63
52
|
.plaidConnectionDetails,
|
|
64
53
|
completionStatus: 'incomplete',
|
|
@@ -91,30 +80,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
91
80
|
totalVariancePercentage: undefined,
|
|
92
81
|
},
|
|
93
82
|
},
|
|
94
|
-
excludedAccountReconciliationByAccountID: {},
|
|
95
|
-
excludedAccountReconciliationBySectionID: {
|
|
96
|
-
assets: {
|
|
97
|
-
sectionId: 'assets',
|
|
98
|
-
accountIDs: [],
|
|
99
|
-
totalBankBalance: undefined,
|
|
100
|
-
totalClearedBalance: undefined,
|
|
101
|
-
totalReconciledBalance: undefined,
|
|
102
|
-
totalVariance: undefined,
|
|
103
|
-
totalVariancePercentage: undefined,
|
|
104
|
-
},
|
|
105
|
-
liabilities: {
|
|
106
|
-
sectionId: 'liabilities',
|
|
107
|
-
accountIDs: [],
|
|
108
|
-
totalBankBalance: undefined,
|
|
109
|
-
totalClearedBalance: undefined,
|
|
110
|
-
totalReconciledBalance: undefined,
|
|
111
|
-
totalVariance: undefined,
|
|
112
|
-
totalVariancePercentage: undefined,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
116
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
117
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
118
83
|
};
|
|
119
84
|
}
|
|
120
85
|
const allAccountIDs = accountReconForMonthYearPeriod.accountIDs;
|
|
@@ -252,8 +217,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
252
217
|
.transactionFetchState,
|
|
253
218
|
accountListState.byReportId.accountList,
|
|
254
219
|
]),
|
|
255
|
-
accountDetectionReason: accountReconForMonthYearPeriod.reconciliationByAccountID[accountID]
|
|
256
|
-
.accountDetectionReason,
|
|
257
220
|
};
|
|
258
221
|
});
|
|
259
222
|
const accountReconciliationBySectionID = {
|
|
@@ -276,88 +239,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
276
239
|
totalVariancePercentage: liabilityTotals.variancePercentage,
|
|
277
240
|
},
|
|
278
241
|
};
|
|
279
|
-
const bankAccountIdSet = new Set(uniqueBankAccounts.map((a) => a.accountId));
|
|
280
|
-
const creditCardIdSet = new Set(uniqueCreditCards.map((a) => a.accountId));
|
|
281
|
-
const excludedAssetAccountIDs = [];
|
|
282
|
-
const excludedLiabilityAccountIDs = [];
|
|
283
|
-
reconciliationViewState.excludedAccountIDs.forEach((accountID) => {
|
|
284
|
-
const isAsset = bankAccountIdSet.has(accountID);
|
|
285
|
-
const isLiability = creditCardIdSet.has(accountID);
|
|
286
|
-
if (!isAsset && !isLiability) {
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (isAsset) {
|
|
290
|
-
excludedAssetAccountIDs.push(accountID);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
excludedLiabilityAccountIDs.push(accountID);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
const excludedAccountReconciliationBySectionID = {
|
|
297
|
-
assets: {
|
|
298
|
-
sectionId: 'assets',
|
|
299
|
-
accountIDs: excludedAssetAccountIDs,
|
|
300
|
-
},
|
|
301
|
-
liabilities: {
|
|
302
|
-
sectionId: 'liabilities',
|
|
303
|
-
accountIDs: excludedLiabilityAccountIDs,
|
|
304
|
-
},
|
|
305
|
-
};
|
|
306
|
-
const excludedAccountReconciliationByAccountID = {};
|
|
307
|
-
const accountsInState = Object.values(accountState.accountsByKey);
|
|
308
|
-
const accountsInStateMap = new Map(accountsInState.map((a) => [a.accountId, a]));
|
|
309
|
-
reconciliationViewState.excludedAccountIDs.forEach((excludedAccountID) => {
|
|
310
|
-
const account = accountsInStateMap.get(excludedAccountID);
|
|
311
|
-
const exclusionInfo = reconciliationViewState.excludedAccountExclusionInfo[excludedAccountID];
|
|
312
|
-
if (account != null) {
|
|
313
|
-
excludedAccountReconciliationByAccountID[excludedAccountID] = {
|
|
314
|
-
refreshStatus: { fetchState: 'Not-Started' },
|
|
315
|
-
statementUpdateStatus: { fetchState: 'Not-Started' },
|
|
316
|
-
statementUploadStatus: { fetchState: 'Not-Started' },
|
|
317
|
-
statementDeleteStatus: { fetchState: 'Not-Started' },
|
|
318
|
-
localData: {},
|
|
319
|
-
connectionInProgress: false,
|
|
320
|
-
statementParseInProgress: false,
|
|
321
|
-
accountConnectionStatus: 'not_connected',
|
|
322
|
-
transactionFetchState: { fetchState: 'Not-Started' },
|
|
323
|
-
accountReconEntity: {
|
|
324
|
-
account: {
|
|
325
|
-
accountId: account.accountId,
|
|
326
|
-
accountName: account.accountName,
|
|
327
|
-
accountType: account.accountType,
|
|
328
|
-
accountSubType: account.accountSubType,
|
|
329
|
-
accountDescription: account.accountDescription,
|
|
330
|
-
qboId: account.qboId,
|
|
331
|
-
coaId: account.coaId,
|
|
332
|
-
labels: account.labels,
|
|
333
|
-
},
|
|
334
|
-
currency: {
|
|
335
|
-
currencyCode: exclusionInfo?.bankBalance?.currencyCode ??
|
|
336
|
-
exclusionInfo?.clearedBalance?.currencyCode ??
|
|
337
|
-
'USD',
|
|
338
|
-
currencySymbol: exclusionInfo?.bankBalance?.currencySymbol ??
|
|
339
|
-
exclusionInfo?.clearedBalance?.currencySymbol ??
|
|
340
|
-
'$',
|
|
341
|
-
},
|
|
342
|
-
startDate: date(new Date().toDateString()),
|
|
343
|
-
endDate: date(new Date().toDateString()),
|
|
344
|
-
statementStatus: { code: 'not_found', label: 'Not Found' },
|
|
345
|
-
transactionsToReconcile: [],
|
|
346
|
-
transactionsToReview: [],
|
|
347
|
-
balance: exclusionInfo?.bankBalance,
|
|
348
|
-
clearedBalance: exclusionInfo?.clearedBalance,
|
|
349
|
-
variance: exclusionInfo?.variance,
|
|
350
|
-
variancePercentage: exclusionInfo?.variance != null &&
|
|
351
|
-
exclusionInfo?.bankBalance != null &&
|
|
352
|
-
exclusionInfo?.bankBalance.amount !== 0
|
|
353
|
-
? Math.abs((exclusionInfo.variance.amount /
|
|
354
|
-
exclusionInfo.bankBalance.amount) *
|
|
355
|
-
100)
|
|
356
|
-
: undefined,
|
|
357
|
-
},
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
242
|
const accountListNestedAccountHierarchy = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
362
243
|
const classListNestedAccountHierarchy = getNestedClassListHierarchy(classListState);
|
|
363
244
|
const accountsList = getAccountList(accountState, accountListState, 'accountList');
|
|
@@ -389,13 +270,10 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
389
270
|
bankAccounts: uniqueBankAccounts,
|
|
390
271
|
creditCards: uniqueCreditCards,
|
|
391
272
|
accountReconciliationsByAccountID: reconList,
|
|
392
|
-
fetchStatus:
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
monthEndFetchState,
|
|
398
|
-
]),
|
|
273
|
+
fetchStatus: {
|
|
274
|
+
fetchState: reconciliationViewState.fetchState,
|
|
275
|
+
error: reconciliationViewState.error,
|
|
276
|
+
},
|
|
399
277
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
400
278
|
.plaidConnectionDetails,
|
|
401
279
|
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
@@ -418,11 +296,6 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
418
296
|
allClassList: allClasses,
|
|
419
297
|
reviewTabSelectedVendorByTransactionId,
|
|
420
298
|
reconListUIState: reconciliationViewState.reconListUIState,
|
|
421
|
-
excludedAccountReconciliationBySectionID,
|
|
422
|
-
excludedAccountReconciliationByAccountID,
|
|
423
|
-
excludeAccountFetchState: reconciliationViewState.actionFetchState.excludeAccountFetch,
|
|
424
|
-
includeAccountFetchState: reconciliationViewState.actionFetchState.includeAccountFetch,
|
|
425
|
-
excludedAccountIDs: reconciliationViewState.excludedAccountIDs,
|
|
426
299
|
};
|
|
427
300
|
});
|
|
428
301
|
export const isAccountReconReport = (reportId) => {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
|
-
import { reduceAllFetchState
|
|
2
|
+
import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
-
import {
|
|
4
|
+
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
5
5
|
import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
|
|
6
6
|
import { getSupportedTransactionsByIds } from '../../../entity/transaction/transactionSelector';
|
|
7
7
|
import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts, } from '../../accountList/accountListSelector';
|
|
8
8
|
import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
|
|
9
9
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
10
10
|
export function getExpenseAutomationTransactionView(state) {
|
|
11
|
-
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState,
|
|
11
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
12
12
|
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
13
13
|
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
14
14
|
const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
|
|
@@ -41,20 +41,10 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
41
41
|
.filter((transaction) => transaction != null);
|
|
42
42
|
const transactions = getSupportedTransactionsByIds(transactionState, transactionIds);
|
|
43
43
|
const transactionsWithCOT = transactions.map((transaction) => getTransactionWithCOT(transaction));
|
|
44
|
-
const
|
|
45
|
-
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
46
|
-
: { fetchState: 'Not-Started', error: undefined };
|
|
47
|
-
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
48
|
-
const allFetchStateList = [
|
|
44
|
+
const fetchStatus = reduceAllFetchState([
|
|
49
45
|
accountList,
|
|
46
|
+
classList,
|
|
50
47
|
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
51
|
-
];
|
|
52
|
-
if (isAccountingClassesEnabled) {
|
|
53
|
-
allFetchStateList.push(classList);
|
|
54
|
-
}
|
|
55
|
-
const fetchStatus = reduceAnyFetchState([
|
|
56
|
-
reduceAllFetchState(allFetchStateList),
|
|
57
|
-
monthEndFetchState,
|
|
58
48
|
]);
|
|
59
49
|
const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
|
|
60
50
|
.uiState.totalCount;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const JE_SCHEDULE_SORT_KEYS = [
|
|
3
|
-
'vendor',
|
|
4
|
-
'category',
|
|
5
|
-
'class',
|
|
6
|
-
'depCategory',
|
|
7
|
-
'scheduleCategory',
|
|
8
|
-
'startMonth',
|
|
9
|
-
'type',
|
|
10
|
-
'amortizationPeriod',
|
|
11
|
-
'jePostingDate',
|
|
12
|
-
'remainingMonths',
|
|
13
|
-
'runningBalance',
|
|
14
|
-
'totalAmount',
|
|
15
|
-
'transactionDate',
|
|
16
|
-
'memo',
|
|
17
|
-
];
|
|
18
|
-
export const toJEScheduleSortKey = (v) => stringToUnion(v, JE_SCHEDULE_SORT_KEYS);
|
|
19
|
-
const JE_SCHEDULE_MAIN_TABS = [
|
|
20
|
-
'pending_review',
|
|
21
|
-
'ongoing',
|
|
22
|
-
'completed',
|
|
23
|
-
];
|
|
24
|
-
export const toJEScheduleMainTab = (v) => stringToUnion(v, JE_SCHEDULE_MAIN_TABS);
|
|
1
|
+
export {};
|
package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js
CHANGED
|
@@ -3,7 +3,6 @@ import { getSummationFreeRangeTotalBalance } from '../../commonStateTypes/coaBal
|
|
|
3
3
|
import { defaultCustomerCurrency } from '../../commonStateTypes/currencyHelper';
|
|
4
4
|
import { reduceFetchStateParallelTimeframes } from '../../commonStateTypes/reduceFetchState';
|
|
5
5
|
import { getSectionClassesViewReport } from '../../entity/sectionClassesViewV2/sectionClassesViewSelector';
|
|
6
|
-
import { HORIZONTAL_CLASS_TOTAL_BALANCE_ID, } from './profitAndLossClassesByClassHorizontalSelectorTypes';
|
|
7
6
|
import { enrichProfitAndLossByClassHorizontalReport } from './profitAndLossHorizontalEnrichment';
|
|
8
7
|
/** Standard class ID returned by the accounting platform for transactions without an assigned class. */
|
|
9
8
|
export const NOT_SPECIFIED_CLASS_ID = 'not_specified';
|
|
@@ -318,7 +317,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
|
|
|
318
317
|
startDate,
|
|
319
318
|
type: 'default',
|
|
320
319
|
label: col.className,
|
|
321
|
-
id: col.classId,
|
|
322
320
|
}));
|
|
323
321
|
// Add a "Total" column
|
|
324
322
|
balances.push({
|
|
@@ -328,7 +326,6 @@ function buildHeaderBalances(classColumns, timeframe, selectedPeriod, currency)
|
|
|
328
326
|
startDate,
|
|
329
327
|
type: 'default',
|
|
330
328
|
label: 'Total',
|
|
331
|
-
id: HORIZONTAL_CLASS_TOTAL_BALANCE_ID,
|
|
332
329
|
});
|
|
333
330
|
return balances;
|
|
334
331
|
}
|
|
@@ -416,14 +416,6 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
416
416
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
419
|
-
case 'invoiceNumber':
|
|
420
|
-
if (transaction.documentId != null) {
|
|
421
|
-
transactionsWithSortKeyValue.push(transaction);
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
|
-
}
|
|
426
|
-
break;
|
|
427
419
|
case 'dueDate':
|
|
428
420
|
if (currentTab === 'draft') {
|
|
429
421
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -526,8 +518,6 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
526
518
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
527
519
|
case 'paymentMethod':
|
|
528
520
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
529
|
-
case 'invoiceNumber':
|
|
530
|
-
return transaction.documentId;
|
|
531
521
|
}
|
|
532
522
|
}, getColumnWiseSortOrder(sortOrder));
|
|
533
523
|
return [
|
|
@@ -2,7 +2,6 @@ import recordGet from 'lodash/get';
|
|
|
2
2
|
import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { getContactsByIds } from '../../../../entity/billPay/contact/contactSelector';
|
|
4
4
|
import { getPaymentAccountsByPaymentAccountIds } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
5
|
-
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
6
5
|
import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
|
|
7
6
|
import { getAccountList } from '../../../accountList/accountListSelector';
|
|
8
7
|
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
@@ -74,14 +73,11 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
if (sourceBillDetail != null) {
|
|
77
|
-
|
|
76
|
+
sourceBillDetailFetchState = reduceFetchState([
|
|
78
77
|
sourceBillDetail.fetchStatus,
|
|
79
78
|
accountListState.byReportId['billPayAccountList'],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
fetchStateList.push(classListState);
|
|
83
|
-
}
|
|
84
|
-
sourceBillDetailFetchState = reduceFetchState(fetchStateList).fetchState;
|
|
79
|
+
classListState,
|
|
80
|
+
]).fetchState;
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
else {
|
|
@@ -3,7 +3,6 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
|
3
3
|
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../../commonStateTypes/reduceFetchState';
|
|
4
4
|
import { getApprovalRulesByIds } from '../../../../entity/approvalRule/approvalRuleSelector';
|
|
5
5
|
import { getClassesByIds } from '../../../../entity/class/classSelector';
|
|
6
|
-
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
7
6
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
8
7
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
9
8
|
export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -45,7 +44,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
|
|
|
45
44
|
newApprovalRuleId,
|
|
46
45
|
};
|
|
47
46
|
});
|
|
48
|
-
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (
|
|
47
|
+
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
|
|
49
48
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
50
49
|
const { approverIds, attributes } = approverListState;
|
|
51
50
|
const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
|
|
@@ -93,9 +92,10 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
|
|
|
93
92
|
allAttributes,
|
|
94
93
|
filteredAttributes,
|
|
95
94
|
billPaySetupApproverViewUpdateData,
|
|
96
|
-
approverListFetchStatus:
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
approverListFetchStatus: reduceAllFetchState([
|
|
96
|
+
approverListState.fetchStatus,
|
|
97
|
+
classListState,
|
|
98
|
+
]),
|
|
99
99
|
fetchState,
|
|
100
100
|
allAccountingClasses,
|
|
101
101
|
error,
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { concat, from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
4
3
|
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
5
4
|
import { fetchBillPayApproversDetails, fetchBillPayApproversList, } from '../billPaySetupApproverViewReducer';
|
|
6
5
|
export const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe(filter(fetchBillPayApproversDetails.match), mergeMap((action) => {
|
|
7
6
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
8
7
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
9
8
|
const { approverListState } = billPaySetupApproverViewState;
|
|
10
|
-
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
11
9
|
const actions = [];
|
|
12
10
|
if (cacheOverride === true) {
|
|
13
11
|
actions.push(fetchBillPayApproversList(cacheOverride, includeUserRoles));
|
|
14
|
-
|
|
15
|
-
actions.push(fetchClassList());
|
|
16
|
-
}
|
|
12
|
+
actions.push(fetchClassList());
|
|
17
13
|
}
|
|
18
14
|
else {
|
|
19
15
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
20
16
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
21
17
|
actions.push(fetchBillPayApproversList(true, includeUserRoles));
|
|
22
18
|
}
|
|
23
|
-
if (
|
|
24
|
-
classListState.hasValidState() === false &&
|
|
19
|
+
if (classListState.hasValidState() === false &&
|
|
25
20
|
classListState.fetchState !== 'In-Progress') {
|
|
26
21
|
actions.push(fetchClassList());
|
|
27
22
|
}
|
|
@@ -7,7 +7,6 @@ import { getCompanyByCompanyId } from '../../../../entity/company/companySelecto
|
|
|
7
7
|
import { getDepositAccountByDepositAccountId } from '../../../../entity/depositAccount/depositAccountSelector';
|
|
8
8
|
import { getPaymentAccountByPaymentAccountId, getPaymentAccountsByPaymentAccountIds, } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
9
9
|
import { getPaymentInstrumentById, getPaymentInstrumentsByIds, } from '../../../../entity/paymentInstrument/paymentInstrumentSelector';
|
|
10
|
-
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
11
10
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
12
11
|
import { getVendorByQboId, getVendorByVendorId, } from '../../../../entity/vendor/vendorSelector';
|
|
13
12
|
import { dateNow } from '../../../../zeniDayJS';
|
|
@@ -173,15 +172,12 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
173
172
|
isCancelled = sourceBillDetail.billDetailLocalData.isCancelled;
|
|
174
173
|
billStage = billPayInfo?.stage.code ?? 'draft';
|
|
175
174
|
if (billViewState != null) {
|
|
176
|
-
|
|
175
|
+
fetchState = reduceFetchState([
|
|
177
176
|
sourceBillDetail.fetchStatus,
|
|
178
177
|
accountListState.byReportId.billPayAccountList,
|
|
178
|
+
classListState,
|
|
179
179
|
billPaySetupApproverViewState,
|
|
180
|
-
];
|
|
181
|
-
if (getIsAccountingClassesEnabled(state)) {
|
|
182
|
-
fetchStateList.push(classListState);
|
|
183
|
-
}
|
|
184
|
-
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
180
|
+
]).fetchState;
|
|
185
181
|
deleteStatus = billViewState.deleteStatus;
|
|
186
182
|
billActivities = getBillActivities(state, billId, billPayInfo?.stage.code);
|
|
187
183
|
}
|
|
@@ -195,14 +191,11 @@ export const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, i
|
|
|
195
191
|
}
|
|
196
192
|
}
|
|
197
193
|
else {
|
|
198
|
-
|
|
194
|
+
fetchState = reduceFetchState([
|
|
199
195
|
accountListState.byReportId.billPayAccountList,
|
|
196
|
+
classListState,
|
|
200
197
|
billPaySetupApproverViewState,
|
|
201
|
-
];
|
|
202
|
-
if (getIsAccountingClassesEnabled(state)) {
|
|
203
|
-
newBillFetchStateList.push(classListState);
|
|
204
|
-
}
|
|
205
|
-
fetchState = reduceFetchState(newBillFetchStateList).fetchState;
|
|
198
|
+
]).fetchState;
|
|
206
199
|
}
|
|
207
200
|
if (sourceBillDetail != null && fetchState == 'Completed') {
|
|
208
201
|
const updatedRecord = sourceBillDetail.billDetailLocalData;
|
|
@@ -219,8 +219,6 @@ const getCardsBySortKey = (card, sortKey) => {
|
|
|
219
219
|
return card.cardName.toLowerCase();
|
|
220
220
|
case 'cardType':
|
|
221
221
|
return card.type.code;
|
|
222
|
-
case 'accountType':
|
|
223
|
-
return card.type.code.includes('credit') ? 'credit' : 'debit';
|
|
224
222
|
case 'status':
|
|
225
223
|
return card.status.code;
|
|
226
224
|
case 'utilisation':
|
|
@@ -2,7 +2,7 @@ import recordGet from 'lodash/get';
|
|
|
2
2
|
import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { getBankAccountByBankAccountId } from '../../../../entity/bankAccount/bankAccountSelector';
|
|
4
4
|
import { getAllCurrencies } from '../../../../entity/currency/currencySelector';
|
|
5
|
-
import { getCurrentTenant
|
|
5
|
+
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
6
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
7
7
|
import { getAccountList, getNestedAccountListHierarchy, } from '../../../accountList/accountListSelector';
|
|
8
8
|
import { getBankAccount, } from '../../../bankAccountView/bankAccountViewSelector';
|
|
@@ -63,16 +63,13 @@ export const getEditRemiDetail = (state, reimbursementId) => {
|
|
|
63
63
|
paymentTo: reimbursementInfo?.toAccount.billAccountId,
|
|
64
64
|
};
|
|
65
65
|
if (sourceRemiDetail != null) {
|
|
66
|
-
|
|
66
|
+
fetchState = reduceFetchState([
|
|
67
67
|
sourceRemiDetail.fetchStatus,
|
|
68
68
|
accountListState.byReportId.reimbursementAccountList,
|
|
69
|
+
classListState,
|
|
69
70
|
merchantListState,
|
|
70
71
|
reimbursementConfigState,
|
|
71
|
-
];
|
|
72
|
-
if (getIsAccountingClassesEnabled(state)) {
|
|
73
|
-
fetchStateList.push(classListState);
|
|
74
|
-
}
|
|
75
|
-
fetchState = reduceFetchState(fetchStateList).fetchState;
|
|
72
|
+
]).fetchState;
|
|
76
73
|
remiStage = reimbursementInfo?.stage.code ?? 'draft';
|
|
77
74
|
createdBy = getUserByUserId(userState, reimbursement?.createdBy ?? '');
|
|
78
75
|
createTime = reimbursement?.createTime;
|
|
@@ -45,7 +45,6 @@ export const getRemiList = (state, currentTimePeriod, isBulkActionFeatureEnabled
|
|
|
45
45
|
return {
|
|
46
46
|
...reimbursement,
|
|
47
47
|
submittedBy: getUserByUserId(userState, reimbursement.reimburseeUserId),
|
|
48
|
-
createdByUser: getUserByUserId(userState, reimbursement.createdBy),
|
|
49
48
|
approvers: approvers,
|
|
50
49
|
};
|
|
51
50
|
});
|
|
@@ -416,14 +415,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
416
415
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
417
416
|
}
|
|
418
417
|
break;
|
|
419
|
-
case 'createdBy':
|
|
420
|
-
if (reimbursement.createdByUser != null) {
|
|
421
|
-
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
425
|
-
}
|
|
426
|
-
break;
|
|
427
418
|
}
|
|
428
419
|
});
|
|
429
420
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -431,7 +422,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
431
422
|
case 'reportName':
|
|
432
423
|
case 'type':
|
|
433
424
|
case 'status':
|
|
434
|
-
case 'createdBy':
|
|
435
425
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
436
426
|
default:
|
|
437
427
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -451,8 +441,6 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
451
441
|
return getStatusPerTab(reimbursement);
|
|
452
442
|
case 'amount':
|
|
453
443
|
return reimbursement.amount.amount ?? 0;
|
|
454
|
-
case 'createdBy':
|
|
455
|
-
return `${reimbursement.createdByUser?.firstName ?? ''} ${reimbursement.createdByUser?.lastName ?? ''}`.toLowerCase();
|
|
456
444
|
}
|
|
457
445
|
}, getColumnWiseSortOrder(sortOrder));
|
|
458
446
|
return [
|
|
@@ -6,7 +6,7 @@ import { fetchTreasuryStatementList } from '../../treasuryStatementList/treasury
|
|
|
6
6
|
import { fetchTreasuryTaxLetterList } from '../../treasuryTaxLetterList/treasuryTaxLetterListReducer';
|
|
7
7
|
import { fetchTreasuryHistory, fetchTreasuryOverviewDetail, fetchTreasurySummaryFailure, fetchTreasurySummarySuccess, fetchTreasuryTransactionList, } from '../treasuryDetailReducer';
|
|
8
8
|
export const fetchTreasuryDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTreasuryOverviewDetail.match), switchMap((action) => {
|
|
9
|
-
const { cacheOverride
|
|
9
|
+
const { cacheOverride } = action.payload;
|
|
10
10
|
const state = state$.value;
|
|
11
11
|
const treasuryActions = [];
|
|
12
12
|
if (cacheOverride === true) {
|
|
@@ -17,7 +17,7 @@ export const fetchTreasuryDetailEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
17
17
|
treasuryActions.push(fetchTreasuryHistory());
|
|
18
18
|
treasuryActions.push(fetchTreasuryTransactionList(true));
|
|
19
19
|
}
|
|
20
|
-
else
|
|
20
|
+
else {
|
|
21
21
|
// Check treasury statement list state
|
|
22
22
|
const treasuryStatementListState = state.treasuryStatementListState;
|
|
23
23
|
if (treasuryStatementListState.hasValidState() === false &&
|
|
@@ -30,11 +30,10 @@ const treasuryDetail = createSlice({
|
|
|
30
30
|
reducer(draft) {
|
|
31
31
|
draft.fetchState = 'In-Progress';
|
|
32
32
|
},
|
|
33
|
-
prepare(cacheOverride
|
|
33
|
+
prepare(cacheOverride) {
|
|
34
34
|
return {
|
|
35
35
|
payload: {
|
|
36
36
|
cacheOverride,
|
|
37
|
-
fetchOnlySummary,
|
|
38
37
|
},
|
|
39
38
|
};
|
|
40
39
|
},
|
|
@@ -75,8 +75,8 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
|
|
|
75
75
|
lineItem.account?.qboId !== accountLine.account.qboId &&
|
|
76
76
|
Boolean(lineItem.account?.qboId);
|
|
77
77
|
hasClassChanged =
|
|
78
|
-
(lineItem.class?.qboId
|
|
79
|
-
lineItem.class?.qboId !== accountLine.class
|
|
78
|
+
Boolean(lineItem.class?.qboId) &&
|
|
79
|
+
lineItem.class?.qboId !== accountLine.class.qboId;
|
|
80
80
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
81
81
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
82
82
|
const latestRecommendedCategory = lineItem.recommendedAccount;
|