@zeniai/client-epic-state 5.0.48-betaRD4 → 5.0.48
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/project/projectPayload.d.ts +3 -3
- package/lib/entity/project/projectPayload.js +3 -3
- package/lib/entity/project/projectState.d.ts +2 -4
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +1 -1
- 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 +2 -2
- package/lib/esm/entity/project/projectPayload.js +1 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +2 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -6
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -6
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +0 -3
- 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/index.d.ts +2 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +0 -6
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +0 -3
- 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 +0 -3
- package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Project
|
|
1
|
+
import { Project } from './projectState';
|
|
2
2
|
export interface ProjectMetadataPayload {
|
|
3
3
|
accounting_provider_project_customer_id: string | null;
|
|
4
4
|
accounting_provider_project_id: string | null;
|
|
@@ -15,6 +15,6 @@ export interface ProjectBasePayload {
|
|
|
15
15
|
accounting_provider_project_id?: string | null;
|
|
16
16
|
project_name?: string;
|
|
17
17
|
}
|
|
18
|
-
export declare const toProjectBasePayload: (project:
|
|
19
|
-
export declare const
|
|
18
|
+
export declare const toProjectBasePayload: (project: Project | undefined) => ProjectBasePayload;
|
|
19
|
+
export declare const mapProjectBasePayloadToProject: (payload: ProjectBasePayload) => Project;
|
|
20
20
|
export declare const mapProjectMetadataPayloadToProject: (payload: ProjectMetadataPayload) => Project;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapProjectMetadataPayloadToProject = exports.
|
|
3
|
+
exports.mapProjectMetadataPayloadToProject = exports.mapProjectBasePayloadToProject = exports.toProjectBasePayload = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
5
|
const toProjectBasePayload = (project) => ({
|
|
6
6
|
zeni_project_id: project?.projectId ?? '',
|
|
@@ -8,14 +8,14 @@ const toProjectBasePayload = (project) => ({
|
|
|
8
8
|
project_name: project?.projectName ?? '',
|
|
9
9
|
});
|
|
10
10
|
exports.toProjectBasePayload = toProjectBasePayload;
|
|
11
|
-
const
|
|
11
|
+
const mapProjectBasePayloadToProject = (payload) => ({
|
|
12
12
|
projectId: payload.zeni_project_id,
|
|
13
13
|
projectName: payload.project_name ?? '',
|
|
14
14
|
...(payload.accounting_provider_project_id != null
|
|
15
15
|
? { accountingProviderProjectId: payload.accounting_provider_project_id }
|
|
16
16
|
: {}),
|
|
17
17
|
});
|
|
18
|
-
exports.
|
|
18
|
+
exports.mapProjectBasePayloadToProject = mapProjectBasePayloadToProject;
|
|
19
19
|
const mapProjectMetadataPayloadToProject = (payload) => ({
|
|
20
20
|
projectId: payload.zeni_project_id,
|
|
21
21
|
projectName: payload.project_name,
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
2
|
import { ZeniDate } from '../../zeniDayJS';
|
|
3
|
-
export interface
|
|
3
|
+
export interface Project {
|
|
4
4
|
projectId: ID;
|
|
5
5
|
projectName: string;
|
|
6
|
-
accountingProviderProjectId?: ID;
|
|
7
|
-
}
|
|
8
|
-
export interface Project extends ProjectBase {
|
|
9
6
|
accountingProviderProjectCustomerId?: ID;
|
|
7
|
+
accountingProviderProjectId?: ID;
|
|
10
8
|
parentCustomerAccountingProviderId?: ID;
|
|
11
9
|
startDate?: ZeniDate;
|
|
12
10
|
status?: string;
|
|
@@ -47,7 +47,7 @@ const toTransactionWithAccountAndClassLine = (payload, currency, type = 'transac
|
|
|
47
47
|
project: payload.line_detail.project != null &&
|
|
48
48
|
payload.line_detail.project.zeni_project_id != null &&
|
|
49
49
|
payload.line_detail.project.zeni_project_id !== ''
|
|
50
|
-
? (0, projectPayload_1.
|
|
50
|
+
? (0, projectPayload_1.mapProjectBasePayloadToProject)(payload.line_detail.project)
|
|
51
51
|
: undefined,
|
|
52
52
|
billable: payload.line_detail.billable_status ?? 'not_billable',
|
|
53
53
|
isCategoryMiscategorized: payload.is_category_miscategorized ?? false,
|
|
@@ -33,7 +33,6 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
33
33
|
logo?: URLPayload;
|
|
34
34
|
payment_type?: string;
|
|
35
35
|
payment_type_name?: string;
|
|
36
|
-
project_name?: string | null;
|
|
37
36
|
recipient_currency_code?: string;
|
|
38
37
|
recipient_currency_symbol?: string;
|
|
39
38
|
recipient_total_amount?: number;
|
|
@@ -50,7 +49,6 @@ export interface TransactionPayload extends TransactionIDPayload, AccountBasePay
|
|
|
50
49
|
transaction_update_time?: string;
|
|
51
50
|
vendor_id?: string | null;
|
|
52
51
|
vendor_name?: string | null;
|
|
53
|
-
zeni_project_id?: string | null;
|
|
54
52
|
}
|
|
55
53
|
type LinesWithCOTTracking = LinePayload & {
|
|
56
54
|
cot_viewing_flags?: {
|
|
@@ -101,12 +101,6 @@ const toTransaction = (payload) => {
|
|
|
101
101
|
...(payload.class_name != null && payload.class_name !== ''
|
|
102
102
|
? { className: payload.class_name }
|
|
103
103
|
: {}),
|
|
104
|
-
...(payload.zeni_project_id != null && payload.zeni_project_id !== ''
|
|
105
|
-
? { projectId: payload.zeni_project_id }
|
|
106
|
-
: {}),
|
|
107
|
-
...(payload.project_name != null && payload.project_name !== ''
|
|
108
|
-
? { projectName: payload.project_name }
|
|
109
|
-
: {}),
|
|
110
104
|
...(payload.category_name != null && payload.category_name !== ''
|
|
111
105
|
? { categoryName: payload.category_name }
|
|
112
106
|
: {}),
|
|
@@ -4,7 +4,7 @@ import { COTLineItemTracking } from '../../../commonStateTypes/recommendationBas
|
|
|
4
4
|
import { AccountBase } from '../../account/accountState';
|
|
5
5
|
import { ClassBase } from '../../class/classState';
|
|
6
6
|
import { CustomerBase } from '../../customer/customerState';
|
|
7
|
-
import {
|
|
7
|
+
import { Project } from '../../project/projectState';
|
|
8
8
|
import { VendorBase } from '../../vendor/vendorState';
|
|
9
9
|
import { TransactionID } from './transaction';
|
|
10
10
|
import { TransactionCategory, TransactionType } from './transactionType';
|
|
@@ -40,7 +40,7 @@ export interface TransactionWithAccountAndClassLine extends TransactionLineBase
|
|
|
40
40
|
isClassMiscategorized: boolean;
|
|
41
41
|
class?: ClassBase;
|
|
42
42
|
customer?: CustomerBase;
|
|
43
|
-
project?:
|
|
43
|
+
project?: Project;
|
|
44
44
|
vendor?: VendorBase;
|
|
45
45
|
}
|
|
46
46
|
export interface TransactionWithAccountAndClassLineWithCOTTracking extends TransactionWithAccountAndClassLine {
|
|
@@ -4,7 +4,7 @@ export const toProjectBasePayload = (project) => ({
|
|
|
4
4
|
accounting_provider_project_id: project?.accountingProviderProjectId ?? null,
|
|
5
5
|
project_name: project?.projectName ?? '',
|
|
6
6
|
});
|
|
7
|
-
export const
|
|
7
|
+
export const mapProjectBasePayloadToProject = (payload) => ({
|
|
8
8
|
projectId: payload.zeni_project_id,
|
|
9
9
|
projectName: payload.project_name ?? '',
|
|
10
10
|
...(payload.accounting_provider_project_id != null
|
|
@@ -2,7 +2,7 @@ import { toAmountWC } from '../../../commonStateTypes/amount';
|
|
|
2
2
|
import { mapAccountBasePayloadToAccountBase, toAccountPayload, } from '../../account/accountPayload';
|
|
3
3
|
import { mapClassBasePayloadToClassBase, toClassBasePayload, } from '../../class/classPayload';
|
|
4
4
|
import { toCustomerBase, toCustomerBasePayload, } from '../../customer/customerPayload';
|
|
5
|
-
import {
|
|
5
|
+
import { mapProjectBasePayloadToProject, toProjectBasePayload, } from '../../project/projectPayload';
|
|
6
6
|
import { mapVendorBasePayloadToVendorBase, toVendorBasePayload, } from '../../vendor/vendorPayload';
|
|
7
7
|
import { toCategorizationStatusType, toPlatformLineDetailType, } from '../stateTypes/transactionLine';
|
|
8
8
|
import { toTransactionCategory, toTransactionType, } from '../stateTypes/transactionType';
|
|
@@ -43,7 +43,7 @@ export const toTransactionWithAccountAndClassLine = (payload, currency, type = '
|
|
|
43
43
|
project: payload.line_detail.project != null &&
|
|
44
44
|
payload.line_detail.project.zeni_project_id != null &&
|
|
45
45
|
payload.line_detail.project.zeni_project_id !== ''
|
|
46
|
-
?
|
|
46
|
+
? mapProjectBasePayloadToProject(payload.line_detail.project)
|
|
47
47
|
: undefined,
|
|
48
48
|
billable: payload.line_detail.billable_status ?? 'not_billable',
|
|
49
49
|
isCategoryMiscategorized: payload.is_category_miscategorized ?? false,
|
|
@@ -97,12 +97,6 @@ export const toTransaction = (payload) => {
|
|
|
97
97
|
...(payload.class_name != null && payload.class_name !== ''
|
|
98
98
|
? { className: payload.class_name }
|
|
99
99
|
: {}),
|
|
100
|
-
...(payload.zeni_project_id != null && payload.zeni_project_id !== ''
|
|
101
|
-
? { projectId: payload.zeni_project_id }
|
|
102
|
-
: {}),
|
|
103
|
-
...(payload.project_name != null && payload.project_name !== ''
|
|
104
|
-
? { projectName: payload.project_name }
|
|
105
|
-
: {}),
|
|
106
100
|
...(payload.category_name != null && payload.category_name !== ''
|
|
107
101
|
? { categoryName: payload.category_name }
|
|
108
102
|
: {}),
|
|
@@ -4,7 +4,6 @@ import { toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
|
|
|
4
4
|
import { fetchAccountList } from '../../../accountList/accountListReducer';
|
|
5
5
|
import { fetchClassList } from '../../../classList/classListReducer';
|
|
6
6
|
import { fetchOwnerList } from '../../../ownerList/ownerListReducer';
|
|
7
|
-
import { fetchProjectList } from '../../../projectList/projectListReducer';
|
|
8
7
|
import { fetchTransactionCategorization, fetchTransactionCategorizationView, } from '../../reducers/transactionsViewReducer';
|
|
9
8
|
export const fetchTransactionCategorizationViewEpic = (actions$, state$) => actions$.pipe(filter(fetchTransactionCategorizationView.match), mergeMap((action) => {
|
|
10
9
|
const { selectedTab, cacheOverride, keepExistingListItems, pageToken, period, refreshViewInBackground, searchString, resetListItems, isUncategorizedExpenseCategoryEnabled, } = action.payload;
|
|
@@ -27,11 +26,6 @@ export const fetchTransactionCategorizationViewEpic = (actions$, state$) => acti
|
|
|
27
26
|
classList.fetchState === 'Not-Started') {
|
|
28
27
|
updateActions.push(fetchClassList());
|
|
29
28
|
}
|
|
30
|
-
const projectList = state$.value.projectListState;
|
|
31
|
-
if (projectList.hasValidState() === false &&
|
|
32
|
-
projectList.fetchState === 'Not-Started') {
|
|
33
|
-
updateActions.push(fetchProjectList());
|
|
34
|
-
}
|
|
35
29
|
const vendorOwnerList = state$.value.ownerListState;
|
|
36
30
|
if (vendorOwnerList.hasValidState() === false &&
|
|
37
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
|
}
|
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,
|
package/lib/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ import { ExternalNotificationData, NotificationActivityType, NotificationGroup,
|
|
|
103
103
|
import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
|
|
104
104
|
import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
|
|
105
105
|
import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
|
|
106
|
-
import { Project
|
|
106
|
+
import { Project } from './entity/project/projectState';
|
|
107
107
|
import { MilageReimbursementLine, OutofPocketReimbursementLine, Reimbursement, ReimbursementLine, ReimbursementTypeCode } from './entity/reimbursement/reimbursementState';
|
|
108
108
|
import { SectionAccountsViewReport } from './entity/sectionAccountsView/sectionAccountsViewSelector';
|
|
109
109
|
import { SectionClassesView as SectionClassesViewV2 } from './entity/sectionClassesViewV2/sectionClassesView';
|
|
@@ -698,7 +698,7 @@ export { updateDashboardLayout };
|
|
|
698
698
|
export { PandLWithForecastView, getPandLWithForecast, } from './view/profitAndLoss/pAndLWithForecast/pAndLWithForecastSelector';
|
|
699
699
|
export { fetchProfitAndLoss, resetProfitAndLossNodeCollapseState, updateProfitAndLossUIState, ProfitAndLossState, ProfitAndLossUIState, getProfitAndLossReport, ProfitAndLossReport, getPandLReportFetchState, fetchProfitAndLossForTimeframe, };
|
|
700
700
|
export { fetchProfitAndLossClassesView, updateProfitAndLossClassesToFilterOut, resetProfitAndLossClassesNodeCollapseState, updateProfitAndLossClassesViewUIState, updateProfitAndLossAccountViewMode, updateClassViewLayout, ProfitAndLossClassesViewUIState, ProfitAndLossClassesViewReport, getProfitAndLossClassesView, aggregateHorizontalDescendantBalances, getEmptyHorizontalSectionBalancesSlice, getProfitAndLossClassesHorizontalView, PandLReportViewSectionID, PandLReportViewCalculatedSectionID, isPandLReportViewCalculatedSectionID, isPandLReportViewSectionID, ClassViewLayout, ProfitAndLossByClassHorizontalReport, ClassColumnDefinition, HORIZONTAL_CLASS_TOTAL_BALANCE_ID, HorizontalAccountReportData, HorizontalAccountRow, HorizontalClassBalance, HorizontalSectionReport, HorizontalSectionTreeLayout, HorizontalCalculatedSection, isHorizontalAccountReportData, };
|
|
701
|
-
export { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, updateProfitAndLossProjectViewUIState, ProfitAndLossProjectViewUIState, getProfitAndLossProjectView, ProfitAndLossProjectViewReport, Project,
|
|
701
|
+
export { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectView, fetchProfitAndLossProjectView, resetProfitAndLossProjectNodeCollapseState, updateProjectViewAccountViewMode, updateProjectsToFilterOut, updateProfitAndLossProjectViewUIState, ProfitAndLossProjectViewUIState, getProfitAndLossProjectView, ProfitAndLossProjectViewReport, Project, ProjectReportWithBalances, SectionProjectViewReport, };
|
|
702
702
|
export { AccountingProviderAttachmentSelector, getAccountingProviderAttachment };
|
|
703
703
|
export { fetchUserListByType, getUserList, UserListSelectorView };
|
|
704
704
|
export { fetchAllPeopleRequiredViews, fetchPeoplePage, fetchPeople, deletePerson, resendInvite, changeZeniPersonRoles, invitePeople, inviteZeniPeople, updatePeopleUIState, peopleSaveUpdates, resetUpdateErrorMessage, peopleSaveDataInLocalStore, peopleClearDataInLocalStore, PeopleSelectorView, PeopleLocalDataView, Person, getPeople, getPeopleLocalData, PeopleState, PersonUpdateType, PeoplePageMode, ZeniPersonUserRoleType, PeopleUIState, PeopleLocalData, initializeEditPerson, };
|