@zeniai/client-epic-state 5.0.55-betaVR1 → 5.0.56
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/recommendationBase.d.ts +1 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- 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/project/projectPayload.d.ts +1 -8
- package/lib/entity/project/projectPayload.js +1 -15
- package/lib/entity/project/projectState.d.ts +2 -4
- 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/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -2
- package/lib/entity/tenant/clearAllEpic.js +0 -2
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.d.ts +16 -64
- package/lib/entity/tenant/tenantReducer.js +7 -86
- package/lib/entity/tenant/tenantState.d.ts +1 -3
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -6
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -2
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +0 -2
- package/lib/epic.d.ts +1 -4
- package/lib/epic.js +1 -5
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/esm/entity/project/projectPayload.js +0 -12
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -2
- package/lib/esm/entity/tenant/tenantReducer.js +5 -84
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -6
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +7 -13
- package/lib/esm/reducer.js +0 -3
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -8
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +0 -3
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +0 -1
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -11
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +4 -13
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -7
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +0 -1
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -44
- package/lib/esm/view/spendManagement/zeniAccounts/depositAccountDetail/depositAccountDetailSelector.js +1 -1
- package/lib/esm/view/spendManagement/zeniAccounts/depositAccountDetail/fetchDepositAccountDetailEpic.js +2 -7
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +0 -1
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -14
- package/lib/esm/view/transactionList/transactionListReducer.js +2 -83
- package/lib/esm/view/transactionList/transactionListState.js +0 -10
- package/lib/index.d.ts +9 -17
- package/lib/index.js +30 -52
- package/lib/reducer.d.ts +0 -3
- package/lib/reducer.js +0 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- 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/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -8
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +0 -3
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +0 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -11
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +4 -13
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -3
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -6
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -4
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +0 -1
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.d.ts +1 -15
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +0 -45
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/depositAccountDetail/depositAccountDetailSelector.js +1 -1
- package/lib/view/spendManagement/zeniAccounts/depositAccountDetail/fetchDepositAccountDetailEpic.js +2 -7
- 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 +0 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -13
- package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -2
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -2
- package/lib/view/transactionList/transactionListPayload.d.ts +0 -15
- package/lib/view/transactionList/transactionListReducer.d.ts +2 -25
- package/lib/view/transactionList/transactionListReducer.js +2 -83
- package/lib/view/transactionList/transactionListState.d.ts +0 -15
- package/lib/view/transactionList/transactionListState.js +1 -13
- package/package.json +2 -2
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +0 -21
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.js +0 -42
- package/lib/esm/entity/tenant/epic/saveConnectorCredentialsEpic.js +0 -38
- package/lib/esm/view/projectList/fetchProjectListEpic.js +0 -38
- package/lib/esm/view/projectList/projectListPayload.js +0 -1
- package/lib/esm/view/projectList/projectListReducer.js +0 -39
- package/lib/esm/view/projectList/projectListSelector.js +0 -9
- package/lib/esm/view/projectList/projectListState.js +0 -1
- package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +0 -113
- package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.vitest.js +0 -243
- package/lib/esm/view/transactionList/fetchTransactionListByProjectEpic.js +0 -45
- package/lib/esm/view/transactionList/parallelFetchProjectTransactionListEpic.js +0 -32
- package/lib/esm/view/transactionList/transactionListByProjectSelector.js +0 -58
- package/lib/view/projectList/fetchProjectListEpic.d.ts +0 -8
- package/lib/view/projectList/fetchProjectListEpic.js +0 -42
- package/lib/view/projectList/projectListPayload.d.ts +0 -7
- package/lib/view/projectList/projectListPayload.js +0 -2
- package/lib/view/projectList/projectListReducer.d.ts +0 -9
- package/lib/view/projectList/projectListReducer.js +0 -43
- package/lib/view/projectList/projectListSelector.d.ts +0 -8
- package/lib/view/projectList/projectListSelector.js +0 -13
- package/lib/view/projectList/projectListState.d.ts +0 -4
- package/lib/view/projectList/projectListState.js +0 -2
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +0 -73
- package/lib/view/transactionDetail/journalEntryLinesViewModel.js +0 -124
- package/lib/view/transactionDetail/journalEntryLinesViewModel.vitest.d.ts +0 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.vitest.js +0 -245
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.d.ts +0 -8
- package/lib/view/transactionList/fetchTransactionListByProjectEpic.js +0 -52
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.d.ts +0 -6
- package/lib/view/transactionList/parallelFetchProjectTransactionListEpic.js +0 -36
- package/lib/view/transactionList/transactionListByProjectSelector.d.ts +0 -22
- package/lib/view/transactionList/transactionListByProjectSelector.js +0 -66
package/lib/esm/index.js
CHANGED
|
@@ -59,7 +59,7 @@ import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
|
|
|
59
59
|
import { getSnackbar } from './entity/snackbar/snackbarSelector';
|
|
60
60
|
import { ALL_WEEK_DAYS, toDayOfWeek, toPriorityCodeType, toTaskStatusCodeType, } from './entity/task/taskState';
|
|
61
61
|
import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
|
|
62
|
-
import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, deleteConnection, saveAPIKeyConnection,
|
|
62
|
+
import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, deleteConnection, saveAPIKeyConnection, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
|
|
63
63
|
import { getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView, } from './entity/tenant/tenantSelector';
|
|
64
64
|
import { pushToastNotification } from './entity/toastNotification/toastNotificationReducer';
|
|
65
65
|
import { getLastNotificationTime, getNotifications, } from './entity/toastNotification/toastNotificationSelector';
|
|
@@ -123,8 +123,6 @@ import { fetchCashPosition, updateCashPositionCOABalancesRange, updateCashPositi
|
|
|
123
123
|
import { getCashPosition, getCashPositionForHighlightedRange, getCashPositionForSelectedRange, getCashPositionUIState, } from './view/cashPosition/cashPositionSelector';
|
|
124
124
|
import { fetchClassList } from './view/classList/classListReducer';
|
|
125
125
|
import { getClassList, } from './view/classList/classListSelector';
|
|
126
|
-
import { fetchProjectList } from './view/projectList/projectListReducer';
|
|
127
|
-
import { getProjectList, } from './view/projectList/projectListSelector';
|
|
128
126
|
import { SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toRecurringFrequency, } from './view/common/recurringViewHelper';
|
|
129
127
|
import { ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, isZeniClearingAccountReport, } from './view/common/zeniClearingAccountHelper';
|
|
130
128
|
import { clearTransactionVendorSaveStatus, resetTransactionVendorLocalData, saveTransactionVendor, saveTransactionVendorSuccessOrFailure, updateTransactionVendorLocalData, } from './view/commonVendorView/transactionVendorView/transactionVendorViewReducer';
|
|
@@ -224,7 +222,6 @@ import { fetchProfitAndLoss, fetchProfitAndLossForTimeframe, resetProfitAndLossN
|
|
|
224
222
|
import { getPandLReportFetchState, getProfitAndLossReport, } from './view/profitAndLoss/profitAndLossSelector';
|
|
225
223
|
import { getEmptyHorizontalSectionBalancesSlice } from './view/profitAndLossClassesView/horizontalSectionEmptyBalancesSlice';
|
|
226
224
|
import { getProfitAndLossClassesHorizontalView } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector';
|
|
227
|
-
import { aggregateHorizontalDescendantBalances } from './view/profitAndLossClassesView/profitAndLossHorizontalEnrichment';
|
|
228
225
|
import { HORIZONTAL_CLASS_TOTAL_BALANCE_ID, isHorizontalAccountReportData, } from './view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelectorTypes';
|
|
229
226
|
import { fetchProfitAndLossClassesView, resetProfitAndLossClassesNodeCollapseState, updateClassViewLayout, updateAccountViewMode as updateProfitAndLossAccountViewMode, updateClassesToFilterOut as updateProfitAndLossClassesToFilterOut, updateProfitAndLossClassesViewUIState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
|
|
230
227
|
import { getProfitAndLossClassesView } from './view/profitAndLossClassesView/profitAndLossClassesViewSelector';
|
|
@@ -378,16 +375,14 @@ import { getAllTopExpenses, getTop6Expenses, getTopExpenses, } from './view/topE
|
|
|
378
375
|
import { TOP_EX_TIME_PERIODS, } from './view/topEx/topExState';
|
|
379
376
|
import { getAccountingProviderAttachment, } from './view/transactionDetail/getAccountingProviderAttachmentSelector';
|
|
380
377
|
import { getChangedLineItemCountFromLocalData, isAccountUncategorized, } from './view/transactionDetail/transactionDetailLocalDataHelper';
|
|
381
|
-
import { JOURNAL_ENTRY_SORT_KEYS, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey, } from './view/transactionDetail/journalEntryLinesViewModel';
|
|
382
378
|
import { clearTransactionDetailSaveStatus, deleteTransactionAttachment, downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentFailure, downloadAccountingProviderAttachmentSuccess, fetchTransactionDetail, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, resetAllLineItemsToVendor, resetLineItemsCategoryClassInLocalData, resetSelectedCustomer, resetVendor, saveTransactionDetail, saveTransactionDetailLocalData, setAllLineItemsLocalDataIsUpdateAllChecked, setAllLineItemsToCategoryClassInLocalData, setIsVendorUpdateAllChecked, updateLatestSelectedEntity, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateSelectedCustomer, updateSelectedVendor, updateTransactionDetail, updateVendorBulkRecommendationsFetchStatus, updateVendorToAllLineItems, uploadMissingAttachmentSuccess, } from './view/transactionDetail/transactionDetailReducer';
|
|
383
379
|
import { getInitialUpdatablePeriodsForTransactionRecommendations, getTransactionDetail, getTransactionDetailForTransaction, } from './view/transactionDetail/transactionDetailSelector';
|
|
384
380
|
import { getThirdPartyIdFromTransactionId, } from './view/transactionDetail/transactionDetailState';
|
|
385
381
|
import { getTransactionListByAccount, getTransactionListUIStateByAccountKey, } from './view/transactionList/transactionListByAccountSelector';
|
|
386
382
|
import { getTransactionListUIStateByCategoryType, getTransactionsListByCategoryType, } from './view/transactionList/transactionListByCategoryTypeSelector';
|
|
387
383
|
import { getTransactionListByClass, getTransactionListUIStateByClassKey, } from './view/transactionList/transactionListByClassSelector';
|
|
388
|
-
import { getTransactionListByProject, getTransactionListUIStateByProjectKey, } from './view/transactionList/transactionListByProjectSelector';
|
|
389
384
|
import { getTransactionListByEntity, getTransactionListByEntityForSinglePeriod, } from './view/transactionList/transactionListByEntitySelector';
|
|
390
|
-
import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList,
|
|
385
|
+
import { clearTransactionList, fetchAccountTransactionList, fetchEntityTransactionList, parallelFetchAccountTransactionList, parallelFetchClassTransactionList, parallelFetchEntityTransactionList, parallelFetchTransactionListByCategoryType, updateLatestTransactionId, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, updateTransactionListByClass, updateTransactionListByClassUIState, updateTransactionListByEntity, updateTransactionListByEntityFailure, updateTransactionListUIStateByCategoryType, } from './view/transactionList/transactionListReducer';
|
|
391
386
|
import { clearTrendData, fetchExpenseTrend, fetchIncomeTrend, } from './view/trend/trendReducer';
|
|
392
387
|
import { getCurrentFiscalQuarterDateRange, getTrendForEntity, } from './view/trend/trendSelector';
|
|
393
388
|
import { clearTrendWithTransactions, fetchTransactionsForEntity, fetchTrendForEntity, updateSelectedTimeperiod, } from './view/trendWithTransactions/trendWithTransactionsReducer';
|
|
@@ -451,7 +446,7 @@ export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsolute
|
|
|
451
446
|
export { toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
|
|
452
447
|
export { getNumberOfPeriods };
|
|
453
448
|
export { SCHEDULE_DAYS_OF_MONTH, toScheduleDaysOfMonth, toMonth, toMonthStrict, toQuarter, toQuarterStrict, };
|
|
454
|
-
export { getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, sendSessionHeartbeat, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection,
|
|
449
|
+
export { getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, sendSessionHeartbeat, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveOAuthConnection, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
455
450
|
export { toAccountType, toAccountGroupType, getAccountGroupKey, };
|
|
456
451
|
export { getClassById } from './entity/class/classSelector';
|
|
457
452
|
export { getForecast };
|
|
@@ -475,7 +470,7 @@ export { fetchDashboard, getDashboard, updateTreasuryVideoClosed, };
|
|
|
475
470
|
export { updateDashboardLayout };
|
|
476
471
|
export { getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
|
|
477
472
|
export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, getProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
|
|
478
|
-
export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, getProfitAndLossClassesView,
|
|
473
|
+
export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, getProfitAndLossClassesView, getEmptyHorizontalSectionBalancesSlice, getProfitAndLossClassesHorizontalView, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, HORIZONTAL_CLASS_TOTAL_BALANCE_ID, isHorizontalAccountReportData, };
|
|
479
474
|
export { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, updateProfitAndLossProjectViewUIState, getProfitAndLossProjectView, };
|
|
480
475
|
export { getAccountingProviderAttachment };
|
|
481
476
|
export { fetchUserListByType, getUserList };
|
|
@@ -496,12 +491,12 @@ export { defaultVendorCurrency, updateVendors };
|
|
|
496
491
|
export { isVendorTransaction, isVendorTransactionWithCustomer, };
|
|
497
492
|
export { isTransferTransaction };
|
|
498
493
|
export { getSupportedTransactionById, };
|
|
499
|
-
export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass,
|
|
494
|
+
export { clearTransactionList, updateLatestTransactionId, parallelFetchAccountTransactionList, parallelFetchEntityTransactionList, fetchAccountTransactionList, updateTransactionListByAccount, updateTransactionListByAccountFailure, updateTransactionListByAccountUIState, parallelFetchClassTransactionList, updateTransactionListByClassUIState, updateTransactionListByClass, updateTransactionListUIStateByCategoryType, parallelFetchTransactionListByCategoryType, };
|
|
500
495
|
export { getTransactionListByAccount, getTransactionListUIStateByAccountKey, };
|
|
501
496
|
export { fetchEntityTransactionList, updateTransactionListByEntity, saveTransactionDetailLocalData, clearTransactionDetailSaveStatus, updateTransactionListByEntityFailure, resetLineItemsCategoryClassInLocalData, setAllLineItemsToCategoryClassInLocalData, saveTransactionDetail, setAllLineItemsLocalDataIsUpdateAllChecked, initializeTransactionDetailLocalData, removeEntityRecommendationForLineIdForTransactionDetail, updateSelectedVendor, updateSelectedCustomer, resetSelectedCustomer, resetVendor, updateLocalDataWithTransactionsUpdateWithVendorCheckbox, updateVendorToAllLineItems, resetAllLineItemsToVendor, updateLatestSelectedEntity, updateVendorBulkRecommendationsFetchStatus, setIsVendorUpdateAllChecked, };
|
|
502
497
|
export { downloadAccountingProviderAttachment, downloadAccountingProviderAttachmentSuccess, downloadAccountingProviderAttachmentFailure, fetchTransactionDetail, updateTransactionDetail, uploadMissingAttachmentSuccess, deleteTransactionAttachment, getThirdPartyIdFromTransactionId, };
|
|
503
498
|
export { getTransactionListByEntity };
|
|
504
|
-
export { getTransactionListByClass, getTransactionListUIStateByClassKey,
|
|
499
|
+
export { getTransactionListByClass, getTransactionListUIStateByClassKey, getTransactionListByEntityForSinglePeriod, };
|
|
505
500
|
export { getTransactionDetail, getTransactionDetailForTransaction, getInitialUpdatablePeriodsForTransactionRecommendations as getUpdatablePeriodsForTransactionRecommendations, };
|
|
506
501
|
export { getInsights, fetchInsightsCard, updateSelectedInsightIndex, };
|
|
507
502
|
export { fetchForecastList } from './view/forecastList/forecastListReducer';
|
|
@@ -550,7 +545,7 @@ export { fetchVendorsList, updateScrollYOffset, fetchVendorsFiling1099All, fetch
|
|
|
550
545
|
export { updateW9FormUploadFetchState, updateW9FormUploadFile, getVendorUploadDetailsByVendorId, vendorFiling1099UploadDetailsSave, vendorFiling1099UploadDetailsResetFormStatus, vendorFiling1099UploadDetailsResetLocalData, initializeVendorFiling1099UploadDetailsLocalState, updateVendor1099DetailsLocalData, updateW9FormOCRDataToLocalData, };
|
|
551
546
|
export { toOutsideZeniPaymentModeType, checkShowMarkAsPaidButton, };
|
|
552
547
|
export { toRemiSubTabType, toRemiSubTabTypeStrict, toRemiTabType, toRemiTabTypeStrict, toReimbursementTypeCode, getRemiList, getRemiDownloadList, fetchRemiList, fetchRemiListPerTab, updateRemiListTab, updateRemiListSubTab, updateRemiDetailSaveRemiCode, updateRemiListUIState, updateRemiListSearchResult, updateBillListFilterResult, updateRemiListFilterResult, REIMBURSEMENT_FILTER_CATEGORIES, REIMBURSEMENT_FILTER_CATEGORIES_RESTRICTED, updateRemiListDownloadUIState, updateBillListDownloadUIState, updateBillsBulkActionList, removeBillFromBulkActionList, clearAllBillsFromBulkActionList, getBillsBulkReviewView, validateBillsBulkAction, approveOrRejectBillsBulkAction, cancelOrDeleteBillsBulkAction, submitDraftBillsBulkAction, autoReviewPendingApprovalBills, incrementBulkActionProcessedCount, getBillsBulkOperationProgress, clearBillPayBulkActionView, isBillConditionallyValid, getRemisBulkReviewView, getRemisBulkOperationProgress, updateRemisBulkActionList, removeRemiFromBulkActionList, clearAllRemisFromBulkActionList, reviewDraftRemisBulkAction, approveOrRejectRemisBulkAction, cancelOrDeleteRemisBulkAction, submitDraftRemisBulkAction, autoReviewPendingApprovalRemis, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, updateOutsideZeniPaymentLocalData, discardOutsideZeniPaymentLocalData, checkIfCreatorIsApprover, };
|
|
553
|
-
export { getClassList, fetchClassList,
|
|
548
|
+
export { getClassList, fetchClassList, };
|
|
554
549
|
export { fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, getBillDetailView, checkApproveRejectBtnShowForBill, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, getEditBillDetail, getReviewPageBillDetail, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, updateBillListUIState, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, toPaymentToOption, convertAmountToHomeCurrency, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
|
|
555
550
|
export { hideCreatedByFilter, };
|
|
556
551
|
export { fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, };
|
|
@@ -573,7 +568,6 @@ export { getNextNthWorkingDay, getPreviousNthWorkingDay, isHolidayToday, filterD
|
|
|
573
568
|
export { fetchCompanyOnboardingView, fetchQBOConnectionPool, updateQBOConnectionPoolExternalConnection, fetchOnboardingCompletedCompanies, saveOnboardingCustomerCompletedStatus, toProductType, toProductTypeStrict, getOnboardingCockpitView, getNewOnboardingCustomerView, getOnboardingEmailGroup, initializeOnboardingCustomerViewUpdateData, clearOnboardingCustomerViewUpdateData, saveOnboardingCustomerViewUpdateData, updateOnboardingCustomerListUIState, updateCustomerCreationStatus, updateStatusAfterOnboardingCompleted, saveOnboardingCustomerViewUpdates, saveOnboardingCustomerNotes, saveOnboardingCustomerDataInLocalStore, updateOnboardingCustomerDataInLocalStore, resetNewOnboardedCustomerId, sendOnboardingCustomerViewInvite, retryBankAccountConnectionForOnboarding, };
|
|
574
569
|
export { getTransactionsListByCategoryType, getTransactionListUIStateByCategoryType, };
|
|
575
570
|
export { getChangedLineItemCountFromLocalData, isAccountUncategorized };
|
|
576
|
-
export { JOURNAL_ENTRY_SORT_KEYS, filterJournalEntryLinesExcludingLinked, journalEntryDefaultSortConfig, journalEntryTotalsByPostingSide, sortJournalEntryLines, sumJournalEntryAmounts, toJournalEntrySortKey, };
|
|
577
571
|
export { openSnackbar, closeSnackbar, getSnackbar, };
|
|
578
572
|
export { getSpendManagementEffectiveListPeriod, getSelectedCompanyOfficer, showBillPayPromoPage, showReimbursementPromoPage, getActualPaymentDate, isVerifiedStatusCode, isVerifiedPaymentAccountProviderStatusCode, isBulkProcessing, getBillListUniqueType, getRemiListUniqueType, getBulkOperationSuffix, toAccountsPromoConfig, toSameDayAchDisablementConfig, isPaymentMethodOutsideZeni, isAwaitingMarkAsPaid, checkIfLowBalance, };
|
|
579
573
|
export { canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent, };
|
package/lib/esm/reducer.js
CHANGED
|
@@ -130,7 +130,6 @@ import people, { initialState as initialPeopleState, } from './view/people/peopl
|
|
|
130
130
|
import profitAndLoss, { initialState as initialProfitAndLossState, } from './view/profitAndLoss/profitAndLossReducer';
|
|
131
131
|
import profitAndLossClassesView, { initialState as initialProfitAndLossClassesViewState, } from './view/profitAndLossClassesView/profitAndLossClassesViewReducer';
|
|
132
132
|
import profitAndLossProjectView, { initialState as initialProfitAndLossProjectViewState, } from './view/profitAndLossProjectView/profitAndLossProjectViewReducer';
|
|
133
|
-
import projectList, { initialState as initialProjectListState, } from './view/projectList/projectListReducer';
|
|
134
133
|
import recommendation, { initialState as initialEntityRecommendationState, } from './view/recommendation/recommendationReducer';
|
|
135
134
|
import referralView, { initialState as initialReferralViewState, } from './view/referralView/referralReducer';
|
|
136
135
|
import reimbursementCard, { initialState as initialReimbursementCardState, } from './view/reimbursementCard/reimbursementCardReducer';
|
|
@@ -391,7 +390,6 @@ const initialViewsState = {
|
|
|
391
390
|
profitAndLossClassesViewState: initialProfitAndLossClassesViewState,
|
|
392
391
|
profitAndLossProjectViewState: initialProfitAndLossProjectViewState,
|
|
393
392
|
profitAndLossState: initialProfitAndLossState,
|
|
394
|
-
projectListState: initialProjectListState,
|
|
395
393
|
realTimeApprovalState: initialRealTimeApprovalState,
|
|
396
394
|
referralViewState: initialReferralViewState,
|
|
397
395
|
reimbursementCardState: initialReimbursementCardState,
|
|
@@ -627,7 +625,6 @@ const viewReducers = {
|
|
|
627
625
|
profitAndLossClassesViewState: profitAndLossClassesView,
|
|
628
626
|
profitAndLossProjectViewState: profitAndLossProjectView,
|
|
629
627
|
profitAndLossState: profitAndLoss,
|
|
630
|
-
projectListState: projectList,
|
|
631
628
|
realTimeApprovalState: realTimeApproval,
|
|
632
629
|
referralViewState: referralView,
|
|
633
630
|
reimbursementCardState: reimbursementCard,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
|
|
4
|
-
import { getIsAccountingProjectsEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
5
4
|
import { fetchAccountList } from '../../../accountList/accountListReducer';
|
|
6
5
|
import { fetchClassList } from '../../../classList/classListReducer';
|
|
7
6
|
import { fetchOwnerList } from '../../../ownerList/ownerListReducer';
|
|
8
|
-
import { fetchProjectList } from '../../../projectList/projectListReducer';
|
|
9
7
|
import { fetchTransactionCategorization, fetchTransactionCategorizationView, } from '../../reducers/transactionsViewReducer';
|
|
10
8
|
export const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pipe(filter(fetchTransactionCategorizationView.match), mergeMap((action) => {
|
|
11
9
|
const { selectedTab, cacheOverride, keepExistingListItems, pageToken, period, refreshViewInBackground, searchString, resetListItems, isUncategorizedExpenseCategoryEnabled, } = action.payload;
|
|
@@ -28,12 +26,6 @@ export const fetchTransactionCategorizationViewEpic = (actions$, state$) => acti
|
|
|
28
26
|
classList.fetchState === 'Not-Started') {
|
|
29
27
|
updateActions.push(fetchClassList());
|
|
30
28
|
}
|
|
31
|
-
const projectList = state$.value.projectListState;
|
|
32
|
-
if (getIsAccountingProjectsEnabled(state$.value) &&
|
|
33
|
-
projectList.hasValidState() === false &&
|
|
34
|
-
projectList.fetchState === 'Not-Started') {
|
|
35
|
-
updateActions.push(fetchProjectList());
|
|
36
|
-
}
|
|
37
29
|
const vendorOwnerList = state$.value.ownerListState;
|
|
38
30
|
if (vendorOwnerList.hasValidState() === false &&
|
|
39
31
|
vendorOwnerList.fetchState === 'Not-Started') {
|
|
@@ -110,9 +110,6 @@ const toTransactionUpdatePayload = (updates, detail, transactionId, cotTrackingB
|
|
|
110
110
|
if (lineUpdates.class != null) {
|
|
111
111
|
lineToBeUpdated.class = lineUpdates.class;
|
|
112
112
|
}
|
|
113
|
-
if (lineUpdates.project != null) {
|
|
114
|
-
lineToBeUpdated.project = lineUpdates.project;
|
|
115
|
-
}
|
|
116
113
|
if (lineUpdates.account != null) {
|
|
117
114
|
lineToBeUpdated.account = lineUpdates.account;
|
|
118
115
|
}
|
|
@@ -41,7 +41,6 @@ export const toTransactionUpdatesFromTransactionCategorizationLocalData = (trans
|
|
|
41
41
|
lineDescription: lineItem.lineDescription,
|
|
42
42
|
class: lineItem.class,
|
|
43
43
|
account: lineItem.account,
|
|
44
|
-
project: lineItem.project,
|
|
45
44
|
recommendation: convertCOTRecommendationsToRegular(lineItem.recommendationsWithCOT),
|
|
46
45
|
};
|
|
47
46
|
if (line.type === 'journal_entry_transaction_line' ||
|
package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js
CHANGED
|
@@ -183,7 +183,6 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
183
183
|
const lineId = line.id;
|
|
184
184
|
record.account = accountLine.account;
|
|
185
185
|
record.class = accountLine.class;
|
|
186
|
-
record.project = accountLine.project;
|
|
187
186
|
record.vendor =
|
|
188
187
|
accountLine.vendor != null
|
|
189
188
|
? {
|
|
@@ -306,7 +305,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
306
305
|
});
|
|
307
306
|
return lineItemData;
|
|
308
307
|
};
|
|
309
|
-
export const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase,
|
|
308
|
+
export const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) => {
|
|
310
309
|
let newLineItems = {};
|
|
311
310
|
let selectedCheckBoxTransactionIds = draft.selectedCheckBoxTransactionIds;
|
|
312
311
|
let similarTransactionUpdated = false;
|
|
@@ -326,7 +325,7 @@ export const toSetAllLineItemsToCategoryClass = (draft, transaction, transaction
|
|
|
326
325
|
const record = {
|
|
327
326
|
...transactionDetailLocalData.lineItemById[lineId],
|
|
328
327
|
};
|
|
329
|
-
// if the line is the one that is being updated, then set the account
|
|
328
|
+
// if the line is the one that is being updated, then set the account and class
|
|
330
329
|
if (transactionId === record.transactionId &&
|
|
331
330
|
transactionLineId === lineId) {
|
|
332
331
|
if (selectedAccount != null) {
|
|
@@ -335,9 +334,6 @@ export const toSetAllLineItemsToCategoryClass = (draft, transaction, transaction
|
|
|
335
334
|
if (selectedClassBase != null) {
|
|
336
335
|
record.class = selectedClassBase;
|
|
337
336
|
}
|
|
338
|
-
if (selectedProjectBase != null) {
|
|
339
|
-
record.project = selectedProjectBase;
|
|
340
|
-
}
|
|
341
337
|
const isClassSatisfied = isAccountingClassesEnabled === false || record.class != null;
|
|
342
338
|
if (isClassSatisfied && record.account != null) {
|
|
343
339
|
if (selectedCheckBoxTransactionIds.length < MAX_SELECTION_LIMIT &&
|
|
@@ -389,10 +385,6 @@ export const toSetAllLineItemsToCategoryClass = (draft, transaction, transaction
|
|
|
389
385
|
selectedCheckBoxTransactionIds.push(transaction.id);
|
|
390
386
|
}
|
|
391
387
|
}
|
|
392
|
-
// Project intentionally does NOT propagate to other rows of
|
|
393
|
-
// the same vendor: each line can carry a different project,
|
|
394
|
-
// and auto-filling siblings (the way class does) leads to
|
|
395
|
-
// unexpected bulk selection.
|
|
396
388
|
}
|
|
397
389
|
}
|
|
398
390
|
if (line.type === 'transaction_with_product_or_service_line') {
|
|
@@ -522,7 +514,6 @@ export const setEntityRecommendationForLineIdInLocalData = (draft, transaction,
|
|
|
522
514
|
...newLineItem,
|
|
523
515
|
class: matchingRecord.class,
|
|
524
516
|
account: matchingRecord.account,
|
|
525
|
-
project: matchingRecord.project,
|
|
526
517
|
lineEntity: matchingRecord.lineEntity,
|
|
527
518
|
};
|
|
528
519
|
}
|
|
@@ -282,7 +282,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
282
282
|
},
|
|
283
283
|
setAllItemsToCategoryClassInLocalDataForCategorization: {
|
|
284
284
|
reducer(draft, action) {
|
|
285
|
-
const { vendorId, customerId, selectedAccount, selectedClassBase,
|
|
285
|
+
const { vendorId, customerId, selectedAccount, selectedClassBase, transactions, transactionId, lineId, selectedTab, uncategorizedAccounts, isAccountingClassesEnabled, isUncategorizedExpenseCategoryEnabled, } = action.payload;
|
|
286
286
|
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
287
287
|
.transactionReviewLocalDataById, transactionId, undefined);
|
|
288
288
|
const existingAccount = transactionLocalData?.transactionReviewLocalData.lineItemById[lineId]
|
|
@@ -296,7 +296,6 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
296
296
|
...transactionLocalData.transactionReviewLocalData.lineItemById[lineId],
|
|
297
297
|
account: selectedAccount,
|
|
298
298
|
class: selectedClassBase,
|
|
299
|
-
project: selectedProjectBase,
|
|
300
299
|
},
|
|
301
300
|
},
|
|
302
301
|
};
|
|
@@ -325,16 +324,9 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
325
324
|
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
326
325
|
.transactionReviewLocalDataById, transaction.id, undefined);
|
|
327
326
|
if (transactionLocalData != null) {
|
|
328
|
-
const
|
|
329
|
-
const existingProjectId = transactionLocalData.transactionReviewLocalData.lineItemById[lineId]?.project?.projectId;
|
|
330
|
-
const updatedItem = existingAccount?.accountId !== selectedAccount?.accountId
|
|
327
|
+
const { localData, similarTransactionUpdated } = toSetAllLineItemsToCategoryClass(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, existingAccount?.accountId !== selectedAccount?.accountId
|
|
331
328
|
? 'category'
|
|
332
|
-
:
|
|
333
|
-
? 'class'
|
|
334
|
-
: existingProjectId !== selectedProjectBase?.projectId
|
|
335
|
-
? 'project'
|
|
336
|
-
: 'class';
|
|
337
|
-
const { localData, similarTransactionUpdated } = toSetAllLineItemsToCategoryClass(draft.transactionCategorizationView[selectedTab], transaction, transactionId, lineId, transactionLocalData.transactionReviewLocalData, updatedItem, uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase, selectedProjectBase, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
329
|
+
: 'class', uncategorizedAccounts, selectedTab, vendorId, customerId, selectedAccount, selectedClassBase, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
338
330
|
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
|
|
339
331
|
transactionId: transaction.id,
|
|
340
332
|
transactionReviewLocalData: localData,
|
|
@@ -353,7 +345,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
353
345
|
...dirtyIds,
|
|
354
346
|
]);
|
|
355
347
|
},
|
|
356
|
-
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase, lineEntity, recommendations, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled
|
|
348
|
+
prepare(selectedTab, transactionId, lineId, transactions, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase, lineEntity, recommendations, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled) {
|
|
357
349
|
return {
|
|
358
350
|
payload: {
|
|
359
351
|
selectedTab,
|
|
@@ -365,7 +357,6 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
365
357
|
lineEntity,
|
|
366
358
|
selectedAccount,
|
|
367
359
|
selectedClassBase,
|
|
368
|
-
selectedProjectBase,
|
|
369
360
|
recommendations,
|
|
370
361
|
uncategorizedAccounts,
|
|
371
362
|
isAccountingClassesEnabled,
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
2
|
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
|
-
import {
|
|
4
|
+
import { getIsAccountingClassesEnabled, 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
|
-
import { getProjectList } from '../../projectList/projectListSelector';
|
|
10
9
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
11
10
|
export function getExpenseAutomationTransactionView(state) {
|
|
12
|
-
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState,
|
|
11
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
13
12
|
const { selectedTransactionCategorizationTab } = expenseAutomationTransactionsViewState;
|
|
14
13
|
const { uiState, refreshStatus, saveStatus, markAsNotMiscategorizedStatus, transactionIdsBySelectedPeriod, transactionReviewLocalDataById, selectedCheckBoxTransactionIds, transactionIdsWithUnsavedData, uploadReceiptStatusById, selectedTransactionId, selectedTransactionLineId, } = expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab];
|
|
15
14
|
const uncategorizedIncomeExpense = getUncategorizedAccounts(accountState, accountListState, 'accountList');
|
|
@@ -18,8 +17,6 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
18
17
|
const allClasses = classList.classes.map((classData) => {
|
|
19
18
|
return omit(classData, ['accountIds', 'key']);
|
|
20
19
|
});
|
|
21
|
-
const projectList = getProjectList(projectState, projectListState);
|
|
22
|
-
const isAccountingProjectsEnabled = getIsAccountingProjectsEnabled(state);
|
|
23
20
|
const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
24
21
|
const classHierarchyList = getNestedClassListHierarchy(classListState);
|
|
25
22
|
const currentTenant = getCurrentTenant(state);
|
|
@@ -99,8 +96,6 @@ export function getExpenseAutomationTransactionView(state) {
|
|
|
99
96
|
classList: allClasses,
|
|
100
97
|
accountsHierarchyList,
|
|
101
98
|
classHierarchyList,
|
|
102
|
-
isAccountingProjectsEnabled,
|
|
103
|
-
projectList,
|
|
104
99
|
transactionLocalData,
|
|
105
100
|
uiState,
|
|
106
101
|
refreshStatus,
|
|
@@ -115,50 +115,6 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
115
115
|
},
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
/**
|
|
119
|
-
* Sum balances across descendant accounts (recursive).
|
|
120
|
-
*
|
|
121
|
-
* Parent rows in the horizontal pivot only carry their own direct postings
|
|
122
|
-
* (zero for "container" accounts), so callers rendering "Total {parent}" rows
|
|
123
|
-
* must aggregate from descendants to get the real per-class totals.
|
|
124
|
-
*
|
|
125
|
-
* Returns one `COABalance` per class column + total (same shape as the
|
|
126
|
-
* enriched `balancesInTimeframe.balances`), with `amount` summed and `type`
|
|
127
|
-
* set to `default_with_null_balance` for zeros. Returns `[]` when no
|
|
128
|
-
* descendants have enriched data.
|
|
129
|
-
*/
|
|
130
|
-
export function aggregateHorizontalDescendantBalances(accounts, childIndices, childrenByParent) {
|
|
131
|
-
let template;
|
|
132
|
-
const sums = new Map();
|
|
133
|
-
const walk = (idx) => {
|
|
134
|
-
const childRow = accounts[idx];
|
|
135
|
-
const childBalances = childRow?.accountReportData?.balancesInTimeframe.balances;
|
|
136
|
-
if (childBalances != null) {
|
|
137
|
-
if (template == null) {
|
|
138
|
-
template = childBalances;
|
|
139
|
-
}
|
|
140
|
-
childBalances.forEach((b, i) => {
|
|
141
|
-
sums.set(i, (sums.get(i) ?? 0) + (b.balance.amount ?? 0));
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
// Always recurse — a missing intermediate node should not prune its
|
|
145
|
-
// descendants from the aggregate.
|
|
146
|
-
const grandChildren = childrenByParent[idx] ?? [];
|
|
147
|
-
grandChildren.forEach(walk);
|
|
148
|
-
};
|
|
149
|
-
childIndices.forEach(walk);
|
|
150
|
-
if (template == null) {
|
|
151
|
-
return [];
|
|
152
|
-
}
|
|
153
|
-
return template.map((tpl, i) => {
|
|
154
|
-
const amount = sums.get(i) ?? 0;
|
|
155
|
-
return {
|
|
156
|
-
...tpl,
|
|
157
|
-
balance: { ...tpl.balance, amount },
|
|
158
|
-
type: amount === 0 ? 'default_with_null_balance' : 'default',
|
|
159
|
-
};
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
118
|
/**
|
|
163
119
|
* Parent index per DFS row — O(n). Matches the scan in the former
|
|
164
120
|
* `findHorizontalAccountParentIndex` (depth <= 2 rows have no parent).
|
|
@@ -30,7 +30,7 @@ export const getDepositAccountDetail = (state, depositAccountId) => {
|
|
|
30
30
|
const zeniAccountDetail = zeniAccountDetailState.depositAccountDetailById[depositAccountId];
|
|
31
31
|
const depositAccount = getDepositAccountByDepositAccountId(depositAccountState, depositAccountId);
|
|
32
32
|
const zeniAccountsConfig = getZeniAccountsConfigDetail(state);
|
|
33
|
-
const transactionListView = getDepositAccountTransactionList(state, depositAccountId);
|
|
33
|
+
const transactionListView = getDepositAccountTransactionList(state, depositAccountId, 5);
|
|
34
34
|
let accountUpdateStatus = {
|
|
35
35
|
editName: {
|
|
36
36
|
fetchState: 'Not-Started',
|
|
@@ -16,7 +16,7 @@ export const fetchDepositAccountDetailEpic = (actions$, state$) => actions$.pipe
|
|
|
16
16
|
zeniAccountActions.push(fetchPaymentAccountList());
|
|
17
17
|
zeniAccountActions.push(fetchZeniAccountsConfig());
|
|
18
18
|
zeniAccountActions.push(fetchDepositAccount(depositAccountId));
|
|
19
|
-
zeniAccountActions.push(fetchDepositAccountTransactionList(depositAccountId, true));
|
|
19
|
+
zeniAccountActions.push(fetchDepositAccountTransactionList(depositAccountId, true, 5));
|
|
20
20
|
zeniAccountActions.push(fetchAccountHistory(depositAccountId));
|
|
21
21
|
}
|
|
22
22
|
else {
|
|
@@ -37,12 +37,7 @@ export const fetchDepositAccountDetailEpic = (actions$, state$) => actions$.pipe
|
|
|
37
37
|
targetZeniAccountAccount.fetchState !== 'In-Progress')) {
|
|
38
38
|
zeniAccountActions.push(fetchDepositAccount(depositAccountId));
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
if (transactionList == null ||
|
|
42
|
-
(transactionList.fetchState !== 'Completed' &&
|
|
43
|
-
transactionList.fetchState !== 'In-Progress')) {
|
|
44
|
-
zeniAccountActions.push(fetchDepositAccountTransactionList(depositAccountId, false));
|
|
45
|
-
}
|
|
40
|
+
zeniAccountActions.push(fetchDepositAccountTransactionList(depositAccountId, false, 5));
|
|
46
41
|
const zeniAccountsConfig = state.zeniAccountsConfigState;
|
|
47
42
|
if (zeniAccountsConfig.hasValidState() === false &&
|
|
48
43
|
zeniAccountsConfig.fetchState !== 'In-Progress') {
|
|
@@ -51,7 +51,6 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
|
|
|
51
51
|
lineDescription: lineItem.lineDescription,
|
|
52
52
|
class: lineItem.class,
|
|
53
53
|
account: lineItem.account,
|
|
54
|
-
project: lineItem.project,
|
|
55
54
|
recommendation: convertCOTRecommendationsToRegular(lineItem.recommendationsWithCOT),
|
|
56
55
|
};
|
|
57
56
|
if (line.type === 'journal_entry_transaction_line' ||
|
|
@@ -14,7 +14,6 @@ import { fetchClassList } from '../../classList/classListReducer';
|
|
|
14
14
|
import { getInitializedTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorLocalDataHelper';
|
|
15
15
|
import { updateTransactionVendorLocalData } from '../../commonVendorView/transactionVendorView/transactionVendorViewReducer';
|
|
16
16
|
import { fetchOwnerList } from '../../ownerList/ownerListReducer';
|
|
17
|
-
import { fetchProjectList } from '../../projectList/projectListReducer';
|
|
18
17
|
import { fetchTransactionDetail, initializeTransactionDetailLocalData, removeTransactionDetail, updateTransactionDetailFetchState, } from '../transactionDetailReducer';
|
|
19
18
|
import { getAllLinkedTransactions, getTransactionDetailKey, } from '../transactionDetailState';
|
|
20
19
|
export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchTransactionDetail.match), mergeMap((action) => {
|
|
@@ -40,11 +39,6 @@ export const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions
|
|
|
40
39
|
classList.fetchState !== 'In-Progress') {
|
|
41
40
|
transactionActions.push(fetchClassList());
|
|
42
41
|
}
|
|
43
|
-
const projectList = state$.value.projectListState;
|
|
44
|
-
if (projectList.hasValidState() === false &&
|
|
45
|
-
projectList.fetchState !== 'In-Progress') {
|
|
46
|
-
transactionActions.push(fetchProjectList());
|
|
47
|
-
}
|
|
48
42
|
transactionActions.push(updateTransactionDetailFetchState(transactionId, 'In-Progress'));
|
|
49
43
|
const query = { transaction_type: transactionId.type };
|
|
50
44
|
const getTransactionDetail$ = zeniAPI
|
|
@@ -181,9 +181,6 @@ const toTransactionUpdatePayload = (updates, detail, cotTransactionTracking, ven
|
|
|
181
181
|
if (lineUpdates.account != null) {
|
|
182
182
|
lineTobeUpdated.account = lineUpdates.account;
|
|
183
183
|
}
|
|
184
|
-
if (lineUpdates.project != null) {
|
|
185
|
-
lineTobeUpdated.project = lineUpdates.project;
|
|
186
|
-
}
|
|
187
184
|
if (lineUpdates.customer != null) {
|
|
188
185
|
lineTobeUpdated.customer = lineUpdates.customer;
|
|
189
186
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import recordGet from 'lodash/get';
|
|
2
2
|
import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
3
|
-
import { getIsAccountingClassesEnabled
|
|
3
|
+
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
4
4
|
import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
|
|
5
5
|
import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
|
|
6
6
|
import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
|
|
@@ -8,10 +8,9 @@ import { getVendorsByVendorIds } from '../../entity/vendor/vendorSelector';
|
|
|
8
8
|
import { dateNow } from '../../zeniDayJS';
|
|
9
9
|
import { getAccountList, getNestedAccountListHierarchy, } from '../accountList/accountListSelector';
|
|
10
10
|
import { getClassList, getNestedClassListHierarchy, } from '../classList/classListSelector';
|
|
11
|
-
import { getProjectList, } from '../projectList/projectListSelector';
|
|
12
11
|
import { getAllLinkedTransactions, getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
|
|
13
12
|
export const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = true) => {
|
|
14
|
-
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState,
|
|
13
|
+
const { transactionDetailState, transactionState, vendorState, vendorListState, accountState, classState, classListState, accountListState, } = state;
|
|
15
14
|
const detailKey = getTransactionDetailKey(transactionId);
|
|
16
15
|
const transactionDetail = recordGet(transactionDetailState.transactionDetailById, detailKey);
|
|
17
16
|
let fetchState = {
|
|
@@ -57,15 +56,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
57
56
|
const classList = isAccountingClassesEnabled
|
|
58
57
|
? getClassList(classState, classListState)
|
|
59
58
|
: { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
|
|
60
|
-
const isAccountingProjectsEnabled = getIsAccountingProjectsEnabled(state);
|
|
61
|
-
const projectList = isAccountingProjectsEnabled
|
|
62
|
-
? getProjectList(projectState, projectListState)
|
|
63
|
-
: {
|
|
64
|
-
projects: [],
|
|
65
|
-
fetchState: 'Completed',
|
|
66
|
-
error: undefined,
|
|
67
|
-
version: 0,
|
|
68
|
-
};
|
|
69
59
|
const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
70
60
|
const classHierarchyList = isAccountingClassesEnabled
|
|
71
61
|
? getNestedClassListHierarchy(classListState)
|
|
@@ -88,8 +78,6 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
88
78
|
accountsHierarchyList,
|
|
89
79
|
classList: classList,
|
|
90
80
|
isAccountingClassesEnabled,
|
|
91
|
-
isAccountingProjectsEnabled,
|
|
92
|
-
projectList,
|
|
93
81
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
|
94
82
|
transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
|
|
95
83
|
initialSupportedTransactionDetail.transactionDetailLocalData,
|