@zeniai/client-epic-state 4.19.99-betaRD2 → 4.19.99-betaRD21
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/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +9 -6
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +36 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -2
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -2
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +26 -2
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +1 -3
- package/lib/entity/tenant/clearAllEpic.js +0 -4
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
- package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
- package/lib/entity/userRole/userRoleType.d.ts +2 -2
- package/lib/epic.d.ts +1 -5
- package/lib/epic.js +1 -5
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +36 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -2
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -4
- package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
- package/lib/esm/epic.js +1 -5
- package/lib/esm/index.js +0 -7
- package/lib/esm/reducer.js +0 -6
- 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 +4 -3
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +13 -3
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +11 -3
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +12 -6
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -0
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -8
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +144 -63
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/lib/index.d.ts +2 -10
- package/lib/index.js +2 -30
- package/lib/reducer.d.ts +0 -6
- package/lib/reducer.js +0 -6
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +5 -6
- 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 +4 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +13 -3
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +11 -3
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +22 -9
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +11 -5
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +1 -0
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -8
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +144 -63
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
- package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
- package/package.json +1 -1
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +0 -44
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -53
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +0 -9
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -40
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +0 -47
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -54
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +0 -52
- package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -36
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +0 -47
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +0 -36
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +0 -50
- package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +0 -30
- package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +0 -2
- package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +0 -145
- package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +0 -72
- package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +0 -11
- package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -26
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -27
- package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -37
- package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -39
- package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +0 -31
- package/lib/view/aiAccountantView/aiAccountantViewPayload.js +0 -8
- package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +0 -27
- package/lib/view/aiAccountantView/aiAccountantViewReducer.js +0 -149
- package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +0 -13
- package/lib/view/aiAccountantView/aiAccountantViewSelector.js +0 -78
- package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +0 -26
- package/lib/view/aiAccountantView/aiAccountantViewState.js +0 -13
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +0 -20
- package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +0 -30
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +0 -23
- package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +0 -31
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +0 -26
- package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +0 -41
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +0 -15
- package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +0 -43
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import orderBy from 'lodash/orderBy';
|
|
2
|
+
import { reduceAnyFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
2
3
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
3
4
|
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
4
5
|
import { getSupportedTransactionById, getSupportedTransactionsByIds, } from '../../../entity/transaction/transactionSelector';
|
|
@@ -7,7 +8,7 @@ import { getCompletedTransactionsCacheKey } from '../reducers/missingReceiptsVie
|
|
|
7
8
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
8
9
|
import { isUnmatchedTabFileStatus, } from '../types/missingReceiptsViewState';
|
|
9
10
|
export function getExpenseAutomationMissingReceiptsView(state) {
|
|
10
|
-
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, } = state;
|
|
11
|
+
const { expenseAutomationMissingReceiptsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = state;
|
|
11
12
|
const currentTenant = getCurrentTenant(state);
|
|
12
13
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
13
14
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
@@ -175,9 +176,16 @@ export function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
175
176
|
vendorLogo: result.vendorLogo ?? transaction?.logo?.href,
|
|
176
177
|
};
|
|
177
178
|
});
|
|
179
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
180
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
181
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
182
|
+
const reducedFetchStatus = reduceAnyFetchState([
|
|
183
|
+
{ fetchState, error },
|
|
184
|
+
monthEndFetchState,
|
|
185
|
+
]);
|
|
178
186
|
return {
|
|
179
|
-
fetchState,
|
|
180
|
-
error,
|
|
187
|
+
fetchState: reducedFetchStatus.fetchState,
|
|
188
|
+
error: reducedFetchStatus.error,
|
|
181
189
|
uploadReceiptStatusById,
|
|
182
190
|
uiState,
|
|
183
191
|
refreshStatus,
|
|
@@ -13,7 +13,7 @@ import { getAccountList, getNestedAccountListHierarchy, } from '../../accountLis
|
|
|
13
13
|
import { getClassList, getNestedClassListHierarchy, } from '../../classList/classListSelector';
|
|
14
14
|
import { initialActionFetchState, initialReconciliationTabsState, initialState, } from '../reducers/reconciliationViewReducer';
|
|
15
15
|
import { getAllSteps } from '../selectorTypes/expenseAutomationViewSelectorTypes';
|
|
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) => {
|
|
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) => state.monthEndCloseChecksViewState, (state, currentTenant, reconciliationViewState, expenseAutomationViewState, plaidAccountViewState, accountListState, accountState, classListState, classState, monthEndCloseChecksState, vendorState, monthEndCloseChecksViewState) => {
|
|
17
17
|
const { selectedPeriodByTenantId } = expenseAutomationViewState;
|
|
18
18
|
const reconcileTabUiState = reconciliationViewState.reconTabsState.reconcile.uiState;
|
|
19
19
|
const reviewTabUiState = reconciliationViewState.reconTabsState.review.uiState;
|
|
@@ -35,6 +35,13 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
35
35
|
}
|
|
36
36
|
return acc;
|
|
37
37
|
}, []);
|
|
38
|
+
const monthYearPeriodId = selectedPeriod != null ? toMonthYearPeriodId(selectedPeriod) : null;
|
|
39
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
40
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? {
|
|
41
|
+
fetchState: 'Not-Started',
|
|
42
|
+
error: undefined,
|
|
43
|
+
})
|
|
44
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
38
45
|
if (accountReconForMonthYearPeriod == null) {
|
|
39
46
|
return {
|
|
40
47
|
bankAccounts: [],
|
|
@@ -44,10 +51,13 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
44
51
|
classListNestedAccountHierarchy: [],
|
|
45
52
|
allAccountList: [],
|
|
46
53
|
allClassList: [],
|
|
47
|
-
fetchStatus:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
fetchStatus: reduceAnyFetchState([
|
|
55
|
+
{
|
|
56
|
+
fetchState: reconciliationViewState.fetchState,
|
|
57
|
+
error: reconciliationViewState.error,
|
|
58
|
+
},
|
|
59
|
+
monthEndFetchState,
|
|
60
|
+
]),
|
|
51
61
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
52
62
|
.plaidConnectionDetails,
|
|
53
63
|
completionStatus: 'incomplete',
|
|
@@ -270,10 +280,13 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
270
280
|
bankAccounts: uniqueBankAccounts,
|
|
271
281
|
creditCards: uniqueCreditCards,
|
|
272
282
|
accountReconciliationsByAccountID: reconList,
|
|
273
|
-
fetchStatus:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
283
|
+
fetchStatus: reduceAnyFetchState([
|
|
284
|
+
{
|
|
285
|
+
fetchState: reconciliationViewState.fetchState,
|
|
286
|
+
error: reconciliationViewState.error,
|
|
287
|
+
},
|
|
288
|
+
monthEndFetchState,
|
|
289
|
+
]),
|
|
277
290
|
plaidConnectionDetails: plaidAccountViewState['expense_automation_reconcile']
|
|
278
291
|
.plaidConnectionDetails,
|
|
279
292
|
reconciliationTabsState: reconciliationViewState.reconTabsState,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import omit from 'lodash/omit';
|
|
2
|
-
import { reduceAllFetchState } from '../../../commonStateTypes/reduceFetchState';
|
|
2
|
+
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../commonStateTypes/reduceFetchState';
|
|
3
3
|
import { toMonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
4
4
|
import { getCurrentTenant } from '../../../entity/tenant/tenantSelector';
|
|
5
5
|
import { getTransactionWithCOT } from '../../../entity/transaction/transactionHelper';
|
|
@@ -8,7 +8,7 @@ import { getAccountList, getNestedAccountListHierarchy, getUncategorizedAccounts
|
|
|
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, } = state;
|
|
11
|
+
const { accountState, classState, classListState, accountListState, expenseAutomationTransactionsViewState, expenseAutomationViewState, transactionState, monthEndCloseChecksState, monthEndCloseChecksViewState, } = 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,10 +41,16 @@ 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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const monthEndFetchState = monthYearPeriodId != null
|
|
45
|
+
? (monthEndCloseChecksViewState.monthEndCloseChecksViewByTenantId[currentTenant.tenantId]?.[monthYearPeriodId] ?? { fetchState: 'Not-Started', error: undefined })
|
|
46
|
+
: { fetchState: 'Not-Started', error: undefined };
|
|
47
|
+
const fetchStatus = reduceAnyFetchState([
|
|
48
|
+
reduceAllFetchState([
|
|
49
|
+
accountList,
|
|
50
|
+
classList,
|
|
51
|
+
expenseAutomationTransactionsViewState.transactionCategorizationView[selectedTransactionCategorizationTab],
|
|
52
|
+
]),
|
|
53
|
+
monthEndFetchState,
|
|
48
54
|
]);
|
|
49
55
|
const totalCountByReview = expenseAutomationTransactionsViewState.transactionCategorizationView.review
|
|
50
56
|
.uiState.totalCount;
|
package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js
CHANGED
|
@@ -49,16 +49,11 @@ export const getProfitAndLossClassesHorizontalView = (filter, accountState, clas
|
|
|
49
49
|
const calculatedSections = {};
|
|
50
50
|
let reportCurrency = defaultCustomerCurrency;
|
|
51
51
|
if (fetchState.fetchState === 'Completed' && selectedPeriod != null) {
|
|
52
|
-
// Get section reports using existing selector infrastructure
|
|
53
|
-
const sectionReports = {};
|
|
54
|
-
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
55
|
-
sectionReports[sectionId] = getSectionClassesViewReport(accountState, classState, sectionsState, { reportId, sectionId }, filter);
|
|
56
|
-
});
|
|
57
52
|
reportCurrency =
|
|
58
53
|
profitAndLossClassesViewState.currency ?? defaultCustomerCurrency;
|
|
59
|
-
//
|
|
54
|
+
// Fetch each section and pivot class→account to account→class in one pass
|
|
60
55
|
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
61
|
-
const sectionReport =
|
|
56
|
+
const sectionReport = getSectionClassesViewReport(accountState, classState, sectionsState, { reportId, sectionId }, filter);
|
|
62
57
|
if (sectionReport != null) {
|
|
63
58
|
sections[sectionId] = pivotSectionToHorizontal(sectionReport, classColumns, SECTION_TITLES[sectionId] ?? sectionId, reportCurrency);
|
|
64
59
|
}
|
|
@@ -261,7 +256,7 @@ function sumBalancesInSlice(balances) {
|
|
|
261
256
|
if (balances.length === 0) {
|
|
262
257
|
return 0;
|
|
263
258
|
}
|
|
264
|
-
const summed = getSummationFreeRangeTotalBalance(
|
|
259
|
+
const summed = getSummationFreeRangeTotalBalance(balances);
|
|
265
260
|
return summed?.balance.amount ?? 0;
|
|
266
261
|
}
|
|
267
262
|
/**
|
|
@@ -25,30 +25,31 @@ function enrichHorizontalSection(report, section) {
|
|
|
25
25
|
return total?.balance.amount ?? 0;
|
|
26
26
|
});
|
|
27
27
|
section.sectionHeaderBalancesSlice = buildHorizontalClassColumnBalancesSlice(report, classAmounts, section.sectionTotal.amount);
|
|
28
|
-
const
|
|
28
|
+
const parentIndices = computeHorizontalAccountParentIndices(section.accounts);
|
|
29
|
+
const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(parentIndices);
|
|
29
30
|
const childrenRecord = {};
|
|
30
31
|
childrenRowIndicesByParent.forEach((childIndices, parentIndex) => {
|
|
31
32
|
childrenRecord[parentIndex] = childIndices;
|
|
32
33
|
});
|
|
33
34
|
section.treeLayout = {
|
|
34
35
|
rootAccountRowIndices: section.accounts
|
|
35
|
-
.map((_, i) =>
|
|
36
|
+
.map((_, i) => (parentIndices[i] === -1 ? i : -1))
|
|
36
37
|
.filter((i) => i >= 0),
|
|
37
38
|
childrenRowIndicesByParent: childrenRecord,
|
|
38
39
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
const siblingsPerRow = buildSiblingIndicesPerRow(section.accounts, parentIndices);
|
|
41
|
+
const hasChildFlags = computeHorizontalHasChildFlags(parentIndices);
|
|
42
|
+
for (let accountIndex = 0; accountIndex < section.accounts.length; accountIndex++) {
|
|
43
|
+
const row = section.accounts[accountIndex];
|
|
44
|
+
// Same column order as `report.classColumns` (see `pivotSectionToHorizontal`).
|
|
45
|
+
const classRowAmounts = row.classBalances.map((classBalance) => classBalance.balance.amount);
|
|
45
46
|
row.accountReportData = {
|
|
46
47
|
accountId: row.accountId,
|
|
47
48
|
accountName: row.accountName,
|
|
48
49
|
accountType: row.accountType,
|
|
49
50
|
depth: row.depth,
|
|
50
51
|
balancesInTimeframe: buildHorizontalClassColumnBalancesSlice(report, classRowAmounts, row.rowTotal.amount),
|
|
51
|
-
horizontalTreeView:
|
|
52
|
+
horizontalTreeView: buildHorizontalTreeViewFromPrecomputed(section.accounts, accountIndex, parentIndices, siblingsPerRow, hasChildFlags),
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -80,9 +81,9 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
80
81
|
return emptySlice;
|
|
81
82
|
}
|
|
82
83
|
const { startDate, endDate } = report.selectedPeriod;
|
|
83
|
-
const balances = report.classColumns.map((col,
|
|
84
|
+
const balances = report.classColumns.map((col, columnIndex) => ({
|
|
84
85
|
balance: {
|
|
85
|
-
amount: classAmounts[
|
|
86
|
+
amount: classAmounts[columnIndex] ?? 0,
|
|
86
87
|
currencyCode,
|
|
87
88
|
currencySymbol,
|
|
88
89
|
},
|
|
@@ -120,64 +121,157 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
120
121
|
},
|
|
121
122
|
};
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Parent index per DFS row — O(n). Matches the scan in the former
|
|
126
|
+
* `findHorizontalAccountParentIndex` (depth <= 2 rows have no parent).
|
|
127
|
+
*/
|
|
128
|
+
function computeHorizontalAccountParentIndices(rows) {
|
|
129
|
+
const accountRowCount = rows.length;
|
|
130
|
+
const parentIndex = new Array(accountRowCount).fill(-1);
|
|
131
|
+
const stack = [];
|
|
132
|
+
for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
|
|
133
|
+
const accountRow = rows[rowIndex];
|
|
134
|
+
if (accountRow == null) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const depth = accountRow.depth;
|
|
138
|
+
while (stack.length > 0) {
|
|
139
|
+
const topIndex = stack[stack.length - 1];
|
|
140
|
+
if (topIndex == null) {
|
|
141
|
+
break;
|
|
133
142
|
}
|
|
134
|
-
|
|
143
|
+
const topRow = rows[topIndex];
|
|
144
|
+
if (topRow == null) {
|
|
145
|
+
stack.pop();
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if (topRow.depth < depth) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
stack.pop();
|
|
152
|
+
}
|
|
153
|
+
if (depth <= 2) {
|
|
154
|
+
parentIndex[rowIndex] = -1;
|
|
155
|
+
}
|
|
156
|
+
else if (stack.length === 0) {
|
|
157
|
+
parentIndex[rowIndex] = -1;
|
|
135
158
|
}
|
|
159
|
+
else {
|
|
160
|
+
const peek = stack[stack.length - 1];
|
|
161
|
+
if (peek == null) {
|
|
162
|
+
parentIndex[rowIndex] = -1;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
const parentRow = rows[peek];
|
|
166
|
+
parentIndex[rowIndex] =
|
|
167
|
+
parentRow != null && parentRow.depth === depth - 1 ? peek : -1;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
stack.push(rowIndex);
|
|
136
171
|
}
|
|
137
|
-
return
|
|
172
|
+
return parentIndex;
|
|
138
173
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
for (let
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
174
|
+
/** Sibling row indices (same parent + depth), in traversal order — O(n). */
|
|
175
|
+
function buildSiblingIndicesPerRow(rows, parentIndices) {
|
|
176
|
+
const accountRowCount = rows.length;
|
|
177
|
+
const keyToIndices = new Map();
|
|
178
|
+
for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
|
|
179
|
+
const parentRowIndex = parentIndices[rowIndex];
|
|
180
|
+
const accountRow = rows[rowIndex];
|
|
181
|
+
if (parentRowIndex == null || accountRow == null) {
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
185
|
+
let siblingGroup = keyToIndices.get(key);
|
|
186
|
+
if (siblingGroup == null) {
|
|
187
|
+
siblingGroup = [];
|
|
188
|
+
keyToIndices.set(key, siblingGroup);
|
|
148
189
|
}
|
|
190
|
+
siblingGroup.push(rowIndex);
|
|
149
191
|
}
|
|
150
|
-
|
|
192
|
+
const siblingsPerRow = new Array(accountRowCount);
|
|
193
|
+
for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
|
|
194
|
+
const parentRowIndex = parentIndices[rowIndex];
|
|
195
|
+
const accountRow = rows[rowIndex];
|
|
196
|
+
if (parentRowIndex == null || accountRow == null) {
|
|
197
|
+
siblingsPerRow[rowIndex] = [rowIndex];
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
201
|
+
const group = keyToIndices.get(key);
|
|
202
|
+
siblingsPerRow[rowIndex] = group != null ? group : [rowIndex];
|
|
203
|
+
}
|
|
204
|
+
return siblingsPerRow;
|
|
151
205
|
}
|
|
152
|
-
function
|
|
153
|
-
|
|
154
|
-
|
|
206
|
+
function computeHorizontalHasChildFlags(parentIndices) {
|
|
207
|
+
const rowCount = parentIndices.length;
|
|
208
|
+
const flags = new Array(rowCount).fill(false);
|
|
209
|
+
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
210
|
+
const parentRowIndex = parentIndices[rowIndex];
|
|
211
|
+
if (parentRowIndex != null &&
|
|
212
|
+
parentRowIndex >= 0 &&
|
|
213
|
+
parentRowIndex < rowCount) {
|
|
214
|
+
flags[parentRowIndex] = true;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return flags;
|
|
155
218
|
}
|
|
156
|
-
function
|
|
157
|
-
const
|
|
219
|
+
function buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags) {
|
|
220
|
+
const chain = [];
|
|
158
221
|
let walkRowIndex = currentRowIndex;
|
|
159
222
|
while (walkRowIndex >= 0) {
|
|
160
|
-
|
|
161
|
-
|
|
223
|
+
chain.unshift(walkRowIndex);
|
|
224
|
+
const parentRowIndex = parentIndices[walkRowIndex];
|
|
225
|
+
if (parentRowIndex == null) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
walkRowIndex = parentRowIndex;
|
|
162
229
|
}
|
|
163
|
-
return
|
|
164
|
-
const
|
|
230
|
+
return chain.map((rowIndex) => {
|
|
231
|
+
const accountRow = dfsOrderedAccountRows[rowIndex];
|
|
232
|
+
const siblingIndices = siblingsPerRow[rowIndex];
|
|
233
|
+
const hasChild = hasChildFlags[rowIndex];
|
|
234
|
+
if (accountRow == null || siblingIndices == null) {
|
|
235
|
+
return {
|
|
236
|
+
depth: 0,
|
|
237
|
+
hasSibling: false,
|
|
238
|
+
hasChildren: hasChild === true,
|
|
239
|
+
isLastNode: true,
|
|
240
|
+
name: '',
|
|
241
|
+
};
|
|
242
|
+
}
|
|
165
243
|
return {
|
|
166
|
-
depth:
|
|
244
|
+
depth: accountRow.depth - 2,
|
|
167
245
|
hasSibling: siblingIndices.length > 1,
|
|
168
|
-
hasChildren:
|
|
246
|
+
hasChildren: hasChild === true,
|
|
169
247
|
isLastNode: rowIndex === siblingIndices[siblingIndices.length - 1],
|
|
170
|
-
name:
|
|
248
|
+
name: accountRow.accountName,
|
|
171
249
|
};
|
|
172
250
|
});
|
|
173
251
|
}
|
|
174
|
-
function
|
|
252
|
+
function buildHorizontalTreeViewFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags) {
|
|
253
|
+
const siblingIndices = siblingsPerRow[currentRowIndex];
|
|
254
|
+
const accountRow = dfsOrderedAccountRows[currentRowIndex];
|
|
255
|
+
const hasChildrenFlag = hasChildFlags[currentRowIndex];
|
|
256
|
+
const treeDepth = accountRow != null ? Math.max(0, accountRow.depth - 2) : 0;
|
|
257
|
+
const hasChildren = hasChildrenFlag === true;
|
|
258
|
+
const siblings = siblingIndices ?? [currentRowIndex];
|
|
259
|
+
return {
|
|
260
|
+
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags),
|
|
261
|
+
treeDepth,
|
|
262
|
+
hasChildren,
|
|
263
|
+
hasSiblings: siblings.length > 1,
|
|
264
|
+
isLeaf: !hasChildren,
|
|
265
|
+
isLastNode: currentRowIndex === siblings[siblings.length - 1],
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function buildHorizontalAccountChildIndicesByParent(parentIndices) {
|
|
175
269
|
const childIndicesByParentRowIndex = new Map();
|
|
176
|
-
for (let rowIndex = 0; rowIndex <
|
|
177
|
-
const parentRowIndex =
|
|
178
|
-
if (parentRowIndex >= 0) {
|
|
270
|
+
for (let rowIndex = 0; rowIndex < parentIndices.length; rowIndex++) {
|
|
271
|
+
const parentRowIndex = parentIndices[rowIndex];
|
|
272
|
+
if (parentRowIndex != null && parentRowIndex >= 0) {
|
|
179
273
|
let childRowIndices = childIndicesByParentRowIndex.get(parentRowIndex);
|
|
180
|
-
if (childRowIndices
|
|
274
|
+
if (childRowIndices == null) {
|
|
181
275
|
childRowIndices = [];
|
|
182
276
|
childIndicesByParentRowIndex.set(parentRowIndex, childRowIndices);
|
|
183
277
|
}
|
|
@@ -186,16 +280,3 @@ function buildHorizontalAccountChildIndicesByParent(dfsOrderedAccountRows) {
|
|
|
186
280
|
}
|
|
187
281
|
return childIndicesByParentRowIndex;
|
|
188
282
|
}
|
|
189
|
-
function buildHorizontalTreeView(dfsOrderedAccountRows, currentRowIndex) {
|
|
190
|
-
const treeDepth = Math.max(0, dfsOrderedAccountRows[currentRowIndex].depth - 2);
|
|
191
|
-
const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, currentRowIndex);
|
|
192
|
-
const hasChildren = horizontalAccountHasChildRows(dfsOrderedAccountRows, currentRowIndex);
|
|
193
|
-
return {
|
|
194
|
-
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex),
|
|
195
|
-
treeDepth,
|
|
196
|
-
hasChildren,
|
|
197
|
-
hasSiblings: siblingIndices.length > 1,
|
|
198
|
-
isLeaf: !hasChildren,
|
|
199
|
-
isLastNode: currentRowIndex === siblingIndices[siblingIndices.length - 1],
|
|
200
|
-
};
|
|
201
|
-
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import recordGet from 'lodash/get';
|
|
2
2
|
import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
3
|
+
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
3
4
|
import { toTransactionTypeStrict } from '../../entity/transaction/stateTypes/transactionType';
|
|
4
5
|
import { getTransactionWithCOT } from '../../entity/transaction/transactionHelper';
|
|
5
6
|
import { getSupportedTransactionById } from '../../entity/transaction/transactionSelector';
|
|
@@ -51,9 +52,14 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
const accountsList = getAccountList(accountState, accountListState, 'accountList');
|
|
54
|
-
const
|
|
55
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
56
|
+
const classList = isAccountingClassesEnabled
|
|
57
|
+
? getClassList(classState, classListState)
|
|
58
|
+
: { classes: [], nestedClassHierarchy: [], fetchState: 'Completed', error: undefined, version: 0 };
|
|
55
59
|
const accountsHierarchyList = getNestedAccountListHierarchy(accountListState, 'accountList');
|
|
56
|
-
const classHierarchyList =
|
|
60
|
+
const classHierarchyList = isAccountingClassesEnabled
|
|
61
|
+
? getNestedClassListHierarchy(classListState)
|
|
62
|
+
: [];
|
|
57
63
|
const transactionDetailAnyUpdateStatus = reduceUpdateFetchStates(transactionDetail);
|
|
58
64
|
const vendors = getVendorsByVendorIds(vendorState, vendorListState.vendorIds);
|
|
59
65
|
return {
|
|
@@ -71,6 +77,7 @@ export const getTransactionDetail = (state, transactionId, fetchLinkedTransactio
|
|
|
71
77
|
classHierarchyList,
|
|
72
78
|
accountsHierarchyList,
|
|
73
79
|
classList: classList,
|
|
80
|
+
isAccountingClassesEnabled,
|
|
74
81
|
isUpdateNotAllowed: transactionDetail?.isUpdateNotAllowed,
|
|
75
82
|
transactionDetailLocalData: transactionDetail?.transactionDetailLocalData ??
|
|
76
83
|
initialSupportedTransactionDetail.transactionDetailLocalData,
|
package/lib/index.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ import { TrendChangeType } from './entity/insights/insightPayload';
|
|
|
92
92
|
import { Insight } from './entity/insights/insightState';
|
|
93
93
|
import { InsightSummary } from './entity/insights/insightSummary';
|
|
94
94
|
import { JEAccruedSchedule, JEScheduledTransaction, ScheduledJournalEntry } from './entity/jeSchedules/jeSchedulesSelector';
|
|
95
|
-
import {
|
|
95
|
+
import { JEScheduleAISummaries, JEScheduleFieldRecommendation } from './entity/jeSchedules/jeSchedulesState';
|
|
96
96
|
import { ALL_SCHEDULES_TYPES, JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleJournalEntryStatusCodeType, ScheduleStatusCodeType, ScheduleTransactionID, ScheduleTypes, getJEScheduleTransactionKey, toScheduleTypesType, toScheduleTypesTypeStrict } from './entity/jeSchedules/jeSchedulesTypes';
|
|
97
97
|
import { Merchant } from './entity/merchant/merchant';
|
|
98
98
|
import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, MonthCloseCheckMetrics, MonthEndAuditSummary, MonthEndCloseCheck, MonthEndCloseCheckFrequency } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
@@ -832,7 +832,7 @@ export { fetchApAgingDetail, AgingReportInvoice, ApAgingDetail, getApAgingDetail
|
|
|
832
832
|
export { LinkBillExpenseKey };
|
|
833
833
|
export { clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchExpenseAutomationJESchedulesPage, ignoreExpenseAutomationJESchedule, initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryExpenseAutomationJESchedule, updateExpenseAutomationJESchedulesUIState, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, };
|
|
834
834
|
export { createNewSchedulesAccrued, deleteScheduleAccruedDetail, cancelScheduleAccruedJournalEntry, fetchScheduleAccruedDetails, fetchScheduleAccruedDetailsPage, resetJEAccruedLinkInLocalData, saveScheduleAccruedDetails, updateAmountsInScheduleAccruedDetail, updatedJEAccruedLinkWithRecommendedLocalData, updatedJELinkInLocalDataAccruedExpenses, fetchRecommendedTransactionRowIndex, clearSelectedJELinkRowIndex, updateLinkBillExpenseLocalData, updateScheduleAccruedDetailsLocalData, updateSelectedJEAccruedScheduleKey, resetSelectedJEAccruedScheduleKey, resetAccruedDetailNewScheduleState, };
|
|
835
|
-
export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule,
|
|
835
|
+
export { JEScheduleKey, JEScheduleTransactionKey, ScheduleTransactionID, getJEScheduleTransactionKey, ALL_SCHEDULES_TYPES, JEScheduledTransaction, JEAccruedSchedule, JEScheduleAISummaries, JEScheduleFieldRecommendation, ScheduleTypes, ScheduleJournalEntryStatusCodeType, ScheduleListReport, ScheduleAccruedListReport, getScheduleListReport, getAccruedScheduleListReport, ScheduleSubTabType, ScheduleListSortKey, fetchScheduleList, fetchAccruedScheduleList, fetchDownloadSchedules, fetchSchedulesAccount, updateScheduleListLocalData, getFetchStateForScheduleAccountList, toScheduleTypesType, toScheduleTypesTypeStrict, toScheduleListTabsFileTypeStrict, ScheduleListLocalData, ScheduleDetailsLocalDataFixedAssets, ScheduleDetailsLocalDataAccruedExpenses, ScheduleDetailsView, ScheduleAccruedDetailsView, LinkBillExpenseView, LinkBillExpenseLocalData, JEScheduleDetailsLocalData, ScheduleDetailsLocalData, toScheduleSubTabType, ScheduleStatusCodeType, JournalEntryErrorCodeType, ScheduleTransaction, updateScheduleListSubTab, updateScheduleListSearchText, updateScheduleListScrollState, updateScheduleListSortState, ScheduleDetailSortKey, ScheduledJournalEntry, updateSelectedJEScheduleKey, fetchScheduleDetails, getScheduleDetailsView, getAccruedScheduleDetailsView, fetchScheduleDetailsPage, saveScheduleDetails, deleteScheduleDetail, createNewSchedules, updateScheduleDetailsLocalData, JETransactionLink, updateScheduleListDownloadState, updateAccruedJEScheduleAccruedByListKey, DownloadJEScheduleTabOptions, updatedSelectedJELinkRowIndex, ScheduleListTabsFileType, getQBOUrlForLink, getThirdPartyIDFromQBOURL, updatedJELinkInLocalData, updateAmountsInScheduleDetail, ScheduleDetailUIState, resetJELinkInLocalData, JEScheduledTransactionWithBalance, JEScheduleWithBalance, JELinkType, updatedJELinkWithRecommendedLocalData, getFetchStateForScheduleListByType, getDefaultSelectedTimeframeForScheduleType, markAsCompleteScheduleDetail, resetMarkAsCompleteStatus, fetchVendorTabView, updateVendorTabViewTab, VendorTabViewTabType, getVendorTabView, VendorTabViewSelectorView, };
|
|
836
836
|
export { GlobalMerchant, GlobalMerchantBase, TenantMerchant };
|
|
837
837
|
export { ReviewStatus, VendorTransactionAttachment, VendorTransactionAttachmentPayload, VendorFirstReviewViewSelectorView, VendorFirstReviewViewLocalData, VendorFirstReviewSelectorView, VendorFirstReviewSelectorAttachmentView, VendorFirstReviewViewUIState, VendorFirstReviewViewColumnKey, GlobalMerchantAutoCompleteView, VendorReviewRowCurrentSelection, toVendorFirstReviewViewColumnKeyType, RecommendedNonExistingGlobalMerchant, getGlobalMerchantAutoCompleteResults, VendorReviewRecommendationViewState, GlobalMerchantType, getVendorFirstReviewView, getVendorFirstReviewAttachmentView, fetchVendorFirstReviewView, fetchVendorFirstReviewAttachments, updateVendorFirstReviewViewScrollYOffset, resetVendorFirstReviewLocalData, updateVendorFirstReviewViewPageToken, clearRecentlySavedErroredVendorData, saveVendorFirstReviewView, updateVendorFirstReviewViewLocalData, updateVendorFirstReviewSortUiState, fetchGlobalMerchantAutoCompleteView, clearGlobalMerchantAutoCompleteResults, GlobalVendorReviewRowCurrentSelection, FirstReviewPageCurrentSelectionByColumn, updateReviewVendorDetailLocalData, saveVendorDetailsView, getVendorDetailSelectorView, FirstReviewVendorDetailSelectorView, VendorViewLocalData, };
|
|
838
838
|
export { fetchGlobalMerchantRecommendation, createGlobalMerchant, updateCreateGlobalMerchantLocalData, clearGlobalMerchantView, getGlobalMerchantView, GlobalMerchantViewSelectorView, GlobalMerchantViewState, NewGlobalMerchantData, NewGlobalMerchantCurrentSelection, };
|
|
@@ -855,14 +855,6 @@ export { Country };
|
|
|
855
855
|
export { InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData, FieldValueType, fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData, getIntlWireVerificationView, InternationalWireVerificationView, };
|
|
856
856
|
export { fetchExpressPayInitialDetails, updateExpressPayFormLocalData, submitExpressPay, resetExpressPayLocalData, ExpressPayFormLocalData, ExpressPayView, getExpressPayView, };
|
|
857
857
|
export { acceptTreasuryTerms, fetchTreasurySetupView, clearTreasurySetupView, fetchTreasuryFunds, updatePortfolioAllocation, fetchPortfolioAllocation, updateFundAllocationLocalData, updateTreasuryVideoViewed, FundAllocationOption, FundComposition, FundData, TreasurySetupView, getTreasurySetupViewDetails, getTreasuryFundsMaximumYield, };
|
|
858
|
-
export { AiAccountantCustomer, AiAccountantCustomerState, AiAccountantEnrollment, AiAccountantEnrollmentStatus, AiAccountantJob, AiAccountantJobStatus, AiAccountantOperationType, toAiAccountantEnrollmentStatus, toAiAccountantJobStatus, toAiAccountantOperationType, } from './entity/aiAccountantCustomer/aiAccountantCustomerState';
|
|
859
|
-
export { AiAccountantCustomerPayload, AiAccountantEnrollmentPayload, AiAccountantJobPayload, toAiAccountantCustomer, toAiAccountantEnrollment, toAiAccountantJob, } from './entity/aiAccountantCustomer/aiAccountantCustomerPayload';
|
|
860
|
-
export { AiAccountantCancelOnboardingResponse, AiAccountantCancelOnboardingResponseData, AiAccountantCustomersResponse, AiAccountantCustomersResponseData, AiAccountantJobsResponse, AiAccountantJobsResponseData, AiAccountantTriggerJobResponse, AiAccountantTriggerJobResponseData, } from './view/aiAccountantView/aiAccountantViewPayload';
|
|
861
|
-
export { clearAllAiAccountantCustomers, updateAiAccountantCustomers, updateAiAccountantCustomer, updateAiAccountantJobs, } from './entity/aiAccountantCustomer/aiAccountantCustomerReducer';
|
|
862
|
-
export { AiAccountantCustomerView, AiAccountantEnrollmentView, AiAccountantJobView, getAiAccountantCustomers, getAiAccountantJobsByTenantId, } from './entity/aiAccountantCustomer/aiAccountantCustomerSelector';
|
|
863
|
-
export { AiAccountantCustomerViewState, AiAccountantFilterCategoryField, AiAccountantSortKey, AiAccountantUIState, AiAccountantViewState, } from './view/aiAccountantView/aiAccountantViewState';
|
|
864
|
-
export { cancelAiAccountantOnboarding, clearAiAccountantView, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
|
|
865
|
-
export { AiAccountantCockpitView, getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
|
|
866
858
|
export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, clearInput, setSession, clearAiCfoView, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
|
|
867
859
|
export { AiCfoViewState, AiCfoViewUIState, SuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewState';
|
|
868
860
|
export { FetchSuggestedQuestionsResponse, SuggestedQuestionsDataPayload, } from './view/aiCfoView/aiCfoViewPayload';
|
package/lib/index.js
CHANGED
|
@@ -67,9 +67,8 @@ exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = expor
|
|
|
67
67
|
exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = void 0;
|
|
68
68
|
exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = void 0;
|
|
69
69
|
exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = exports.toRecurringFrequency = exports.getRecurringEndDateFromCount = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = void 0;
|
|
70
|
-
exports.
|
|
71
|
-
exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.toAiCfoVisualization =
|
|
72
|
-
exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getTreasuryTaxLetters = void 0;
|
|
70
|
+
exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = void 0;
|
|
71
|
+
exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.toAiCfoVisualization = void 0;
|
|
73
72
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
74
73
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
75
74
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -2057,33 +2056,6 @@ Object.defineProperty(exports, "updateReportUIOptionIsCompareModeOn", { enumerab
|
|
|
2057
2056
|
Object.defineProperty(exports, "toggleReportUIOptionForecastMode", { enumerable: true, get: function () { return reportUIOptionsReducer_1.toggleReportUIOptionForecastMode; } });
|
|
2058
2057
|
Object.defineProperty(exports, "updateReportUIOptionThisPeriod", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionThisPeriod; } });
|
|
2059
2058
|
Object.defineProperty(exports, "updateReportUIOptionCOABalancesRange", { enumerable: true, get: function () { return reportUIOptionsReducer_1.updateReportUIOptionCOABalancesRange; } });
|
|
2060
|
-
// ── AI Accountant Entity ──
|
|
2061
|
-
var aiAccountantCustomerState_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerState");
|
|
2062
|
-
Object.defineProperty(exports, "toAiAccountantEnrollmentStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.toAiAccountantEnrollmentStatus; } });
|
|
2063
|
-
Object.defineProperty(exports, "toAiAccountantJobStatus", { enumerable: true, get: function () { return aiAccountantCustomerState_1.toAiAccountantJobStatus; } });
|
|
2064
|
-
Object.defineProperty(exports, "toAiAccountantOperationType", { enumerable: true, get: function () { return aiAccountantCustomerState_1.toAiAccountantOperationType; } });
|
|
2065
|
-
var aiAccountantCustomerPayload_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerPayload");
|
|
2066
|
-
Object.defineProperty(exports, "toAiAccountantCustomer", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantCustomer; } });
|
|
2067
|
-
Object.defineProperty(exports, "toAiAccountantEnrollment", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantEnrollment; } });
|
|
2068
|
-
Object.defineProperty(exports, "toAiAccountantJob", { enumerable: true, get: function () { return aiAccountantCustomerPayload_1.toAiAccountantJob; } });
|
|
2069
|
-
var aiAccountantCustomerReducer_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerReducer");
|
|
2070
|
-
Object.defineProperty(exports, "clearAllAiAccountantCustomers", { enumerable: true, get: function () { return aiAccountantCustomerReducer_1.clearAllAiAccountantCustomers; } });
|
|
2071
|
-
Object.defineProperty(exports, "updateAiAccountantCustomers", { enumerable: true, get: function () { return aiAccountantCustomerReducer_1.updateAiAccountantCustomers; } });
|
|
2072
|
-
Object.defineProperty(exports, "updateAiAccountantCustomer", { enumerable: true, get: function () { return aiAccountantCustomerReducer_1.updateAiAccountantCustomer; } });
|
|
2073
|
-
Object.defineProperty(exports, "updateAiAccountantJobs", { enumerable: true, get: function () { return aiAccountantCustomerReducer_1.updateAiAccountantJobs; } });
|
|
2074
|
-
var aiAccountantCustomerSelector_1 = require("./entity/aiAccountantCustomer/aiAccountantCustomerSelector");
|
|
2075
|
-
Object.defineProperty(exports, "getAiAccountantCustomers", { enumerable: true, get: function () { return aiAccountantCustomerSelector_1.getAiAccountantCustomers; } });
|
|
2076
|
-
Object.defineProperty(exports, "getAiAccountantJobsByTenantId", { enumerable: true, get: function () { return aiAccountantCustomerSelector_1.getAiAccountantJobsByTenantId; } });
|
|
2077
|
-
var aiAccountantViewReducer_1 = require("./view/aiAccountantView/aiAccountantViewReducer");
|
|
2078
|
-
Object.defineProperty(exports, "cancelAiAccountantOnboarding", { enumerable: true, get: function () { return aiAccountantViewReducer_1.cancelAiAccountantOnboarding; } });
|
|
2079
|
-
Object.defineProperty(exports, "clearAiAccountantView", { enumerable: true, get: function () { return aiAccountantViewReducer_1.clearAiAccountantView; } });
|
|
2080
|
-
Object.defineProperty(exports, "fetchAiAccountantCustomers", { enumerable: true, get: function () { return aiAccountantViewReducer_1.fetchAiAccountantCustomers; } });
|
|
2081
|
-
Object.defineProperty(exports, "fetchAiAccountantJobs", { enumerable: true, get: function () { return aiAccountantViewReducer_1.fetchAiAccountantJobs; } });
|
|
2082
|
-
Object.defineProperty(exports, "setSelectedTenantIdsForJobTrigger", { enumerable: true, get: function () { return aiAccountantViewReducer_1.setSelectedTenantIdsForJobTrigger; } });
|
|
2083
|
-
Object.defineProperty(exports, "triggerAiAccountantJob", { enumerable: true, get: function () { return aiAccountantViewReducer_1.triggerAiAccountantJob; } });
|
|
2084
|
-
Object.defineProperty(exports, "updateAiAccountantUIState", { enumerable: true, get: function () { return aiAccountantViewReducer_1.updateAiAccountantUIState; } });
|
|
2085
|
-
var aiAccountantViewSelector_1 = require("./view/aiAccountantView/aiAccountantViewSelector");
|
|
2086
|
-
Object.defineProperty(exports, "getAiAccountantCockpitView", { enumerable: true, get: function () { return aiAccountantViewSelector_1.getAiAccountantCockpitView; } });
|
|
2087
2059
|
var aiCfoViewReducer_1 = require("./view/aiCfoView/aiCfoViewReducer");
|
|
2088
2060
|
Object.defineProperty(exports, "fetchChatSessionsForUser", { enumerable: true, get: function () { return aiCfoViewReducer_1.fetchChatSessionsForUser; } });
|
|
2089
2061
|
Object.defineProperty(exports, "createSession", { enumerable: true, get: function () { return aiCfoViewReducer_1.createSession; } });
|