@zeniai/client-epic-state 4.19.81-betaJK1 → 4.19.81-betaRD2
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.
Potentially problematic release.
This version of @zeniai/client-epic-state might be problematic. Click here for more details.
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +2 -2
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.js +1 -0
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +9 -1
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/esm/entity/tenant/tenantReducer.js +1 -0
- package/lib/esm/entity/tenant/tenantSelector.js +7 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/classList/fetchClassListEpic.js +3 -2
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -1
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -1
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +15 -14
- package/lib/index.d.ts +2 -2
- package/lib/index.js +30 -29
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +2 -1
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -1
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -1
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +15 -14
- package/package.json +1 -1
|
@@ -7,8 +7,6 @@ import { VendorTransaction } from '../../transaction/stateTypes/vendorTransactio
|
|
|
7
7
|
export interface BillTransaction extends VendorTransaction {
|
|
8
8
|
billPayInfo: BillPayInfo;
|
|
9
9
|
candidateVendorName: string;
|
|
10
|
-
classId: ID;
|
|
11
|
-
className: string;
|
|
12
10
|
createdBy: ID;
|
|
13
11
|
deletionInfo: DeletionInfo;
|
|
14
12
|
entityApprovalId: ID;
|
|
@@ -21,6 +19,8 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
21
19
|
updateTime: ZeniDate;
|
|
22
20
|
bookCloseDate?: ZeniDate;
|
|
23
21
|
bulkProcessingDetail?: BulkProcessingDetail;
|
|
22
|
+
classId?: ID;
|
|
23
|
+
className?: string;
|
|
24
24
|
lastUpdatedByUserId?: ID;
|
|
25
25
|
recurringBillConfigId?: ID;
|
|
26
26
|
recurringBillInstance?: number;
|
|
@@ -561,6 +561,7 @@ function mapTenantsPayloadToState(tenantsPayload, userTenantPayload) {
|
|
|
561
561
|
function mapTenantPayloadToTenant(payload, userTenantPayload) {
|
|
562
562
|
const tenant = {
|
|
563
563
|
accountingClassIDs: payload.accounting_class_ids,
|
|
564
|
+
isAccountingClassesEnabled: payload.is_accounting_classes_enabled ?? true,
|
|
564
565
|
bookCloseDate: payload.book_close_date != null
|
|
565
566
|
? (0, zeniDayJS_1.date)(payload.book_close_date)
|
|
566
567
|
: undefined,
|
|
@@ -85,6 +85,7 @@ export declare const getCurrentTenantExternalConnections: (tenantState: TenantSt
|
|
|
85
85
|
export declare const toTenantCoreDetailsView: (tenantsBaseView: TenantBaseView[]) => TenantCoreDetailsView[];
|
|
86
86
|
export declare const isTenantBankingOnly: (isDebitCardFlagEnabled: boolean, tenant: Tenant | undefined) => boolean;
|
|
87
87
|
export declare const isTenantCardsOnly: (tenant: Tenant | undefined) => boolean;
|
|
88
|
+
export declare const getIsAccountingClassesEnabled: (state: RootState) => boolean;
|
|
88
89
|
export declare const isTenantBookkeepingEnabled: (tenant: Tenant | undefined) => boolean;
|
|
89
90
|
export declare const isOtherProductsEnabledForTenant: (tenant: Tenant | undefined) => boolean;
|
|
90
91
|
export declare const isTenantTreasuryEnabled: (tenant: Tenant | undefined) => boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
6
|
+
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.getIsAccountingClassesEnabled = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
7
7
|
exports.getTenant = getTenant;
|
|
8
8
|
exports.getOnboardingTenantByTenantId = getOnboardingTenantByTenantId;
|
|
9
9
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -280,6 +280,14 @@ const isTenantCardsOnly = (tenant) => {
|
|
|
280
280
|
: false;
|
|
281
281
|
};
|
|
282
282
|
exports.isTenantCardsOnly = isTenantCardsOnly;
|
|
283
|
+
const getIsAccountingClassesEnabled = (state) => {
|
|
284
|
+
const { currentTenantId, tenantsById } = state.tenantState;
|
|
285
|
+
if (currentTenantId == null) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
return tenantsById[currentTenantId]?.isAccountingClassesEnabled ?? true;
|
|
289
|
+
};
|
|
290
|
+
exports.getIsAccountingClassesEnabled = getIsAccountingClassesEnabled;
|
|
283
291
|
const isTenantBookkeepingEnabled = (tenant) => {
|
|
284
292
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
285
293
|
return tenant != null && tenant.productSettings != null
|
|
@@ -35,9 +35,9 @@ export interface LinkedTransactionLine extends TransactionLineBase {
|
|
|
35
35
|
export interface TransactionWithAccountAndClassLine extends TransactionLineBase {
|
|
36
36
|
account: AccountBase;
|
|
37
37
|
billable: BillableStatus;
|
|
38
|
-
class: ClassBase;
|
|
39
38
|
isCategoryMiscategorized: boolean;
|
|
40
39
|
isClassMiscategorized: boolean;
|
|
40
|
+
class?: ClassBase;
|
|
41
41
|
customer?: CustomerBase;
|
|
42
42
|
vendor?: VendorBase;
|
|
43
43
|
}
|
|
@@ -553,6 +553,7 @@ function mapTenantsPayloadToState(tenantsPayload, userTenantPayload) {
|
|
|
553
553
|
function mapTenantPayloadToTenant(payload, userTenantPayload) {
|
|
554
554
|
const tenant = {
|
|
555
555
|
accountingClassIDs: payload.accounting_class_ids,
|
|
556
|
+
isAccountingClassesEnabled: payload.is_accounting_classes_enabled ?? true,
|
|
556
557
|
bookCloseDate: payload.book_close_date != null
|
|
557
558
|
? date(payload.book_close_date)
|
|
558
559
|
: undefined,
|
|
@@ -265,6 +265,13 @@ export const isTenantCardsOnly = (tenant) => {
|
|
|
265
265
|
tenant.productSettings.isSpendManagementEnabled === false
|
|
266
266
|
: false;
|
|
267
267
|
};
|
|
268
|
+
export const getIsAccountingClassesEnabled = (state) => {
|
|
269
|
+
const { currentTenantId, tenantsById } = state.tenantState;
|
|
270
|
+
if (currentTenantId == null) {
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
return tenantsById[currentTenantId]?.isAccountingClassesEnabled ?? true;
|
|
274
|
+
};
|
|
268
275
|
export const isTenantBookkeepingEnabled = (tenant) => {
|
|
269
276
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
270
277
|
return tenant != null && tenant.productSettings != null
|
package/lib/esm/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import { getSnackbar } from './entity/snackbar/snackbarSelector';
|
|
|
60
60
|
import { toPriorityCodeType, toTaskStatusCodeType, } from './entity/task/taskState';
|
|
61
61
|
import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
|
|
62
62
|
import { clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveExternalConnection as saveExternalConnectionForTenant, sendEmailMagicLinkToUser, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA, } from './entity/tenant/tenantReducer';
|
|
63
|
-
import { getCurrentTenant, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView, } from './entity/tenant/tenantSelector';
|
|
63
|
+
import { getCurrentTenant, getIsAccountingClassesEnabled, 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';
|
|
66
66
|
import { mapFileEntityToAttachment, toContentType, toContentTypeStrict, } from './entity/transaction/stateTypes/attachment';
|
|
@@ -422,7 +422,7 @@ export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsolute
|
|
|
422
422
|
export { toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
|
|
423
423
|
export { getNumberOfPeriods };
|
|
424
424
|
export { SCHEDULE_DAYS_OF_MONTH, toScheduleDaysOfMonth, toMonth, toMonthStrict, toQuarter, toQuarterStrict, };
|
|
425
|
-
export { getTenantBaseById, getCurrentTenant, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
425
|
+
export { getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
426
426
|
export { toAccountType, toAccountGroupType, getAccountGroupKey, };
|
|
427
427
|
export { getClassById } from './entity/class/classSelector';
|
|
428
428
|
export { getForecast };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap, withLatestFrom, } from 'rxjs/operators';
|
|
3
3
|
import { updateClasses } from '../../entity/class/classReducer';
|
|
4
|
+
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
4
5
|
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
5
6
|
import { fetchClassList, updateClassList, updateClassListFailure, } from './classListReducer';
|
|
6
|
-
export const fetchClassListEpic = (actions$,
|
|
7
|
+
export const fetchClassListEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchClassList.match), withLatestFrom(state$), filter(([, state]) => getIsAccountingClassesEnabled(state)), switchMap(([action]) => {
|
|
7
8
|
const { isIncludeDeleted } = action.payload;
|
|
8
9
|
const queryParams = isIncludeDeleted === true
|
|
9
10
|
? `?query=${encodeURIComponent(JSON.stringify({ is_include_deleted: true }))}`
|
|
@@ -65,7 +65,8 @@ export const toTransactionUpdatesFromTransactionCategorizationLocalData = (trans
|
|
|
65
65
|
Boolean(lineItem.account?.qboId);
|
|
66
66
|
hasClassChanged =
|
|
67
67
|
Boolean(lineItem.class?.qboId) &&
|
|
68
|
-
|
|
68
|
+
Boolean(accountLine.class?.qboId) &&
|
|
69
|
+
lineItem.class?.qboId !== accountLine.class?.qboId;
|
|
69
70
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
70
71
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
71
72
|
if (entityDetails != null &&
|
package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js
CHANGED
|
@@ -234,7 +234,7 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
234
234
|
isPreFilled: true,
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
|
-
if (accountLine.class
|
|
237
|
+
if (Boolean(accountLine.class?.classId) === false &&
|
|
238
238
|
higherPreferenceRecommendation?.class != null) {
|
|
239
239
|
record.class = {
|
|
240
240
|
...higherPreferenceRecommendation.class,
|
|
@@ -464,7 +464,7 @@ export const setEntityRecommendationForLineIdInLocalData = (draft, transaction,
|
|
|
464
464
|
}
|
|
465
465
|
: accountLine.account;
|
|
466
466
|
record.class =
|
|
467
|
-
accountLine.class
|
|
467
|
+
Boolean(accountLine.class?.classId) !== false
|
|
468
468
|
? accountLine.class
|
|
469
469
|
: recommendations?.[0]?.class
|
|
470
470
|
? {
|
|
@@ -33,7 +33,7 @@ export function getExpenseAutomationMissingReceiptsView(state) {
|
|
|
33
33
|
transaction.lines.length > 0 &&
|
|
34
34
|
transaction.lines[0]
|
|
35
35
|
?.class != null
|
|
36
|
-
? transaction.lines[0].class
|
|
36
|
+
? transaction.lines[0].class?.className.toLowerCase()
|
|
37
37
|
: null;
|
|
38
38
|
case 'vendor':
|
|
39
39
|
default:
|
|
@@ -76,7 +76,8 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
|
|
|
76
76
|
Boolean(lineItem.account?.qboId);
|
|
77
77
|
hasClassChanged =
|
|
78
78
|
Boolean(lineItem.class?.qboId) &&
|
|
79
|
-
|
|
79
|
+
Boolean(accountLine.class?.qboId) &&
|
|
80
|
+
lineItem.class?.qboId !== accountLine.class?.qboId;
|
|
80
81
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
81
82
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
82
83
|
const latestRecommendedCategory = lineItem.recommendedAccount;
|
|
@@ -140,13 +140,13 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
|
|
|
140
140
|
record.isRetainedCategorySelected = false;
|
|
141
141
|
}
|
|
142
142
|
if (Boolean(recommendedClass?.qboId) &&
|
|
143
|
-
recommendedClass?.qboId !== accountLine.class
|
|
143
|
+
recommendedClass?.qboId !== accountLine.class?.qboId) {
|
|
144
144
|
record.isRecommendedClassSelected = false;
|
|
145
145
|
record.recommendedClass = recommendedClass;
|
|
146
146
|
record.isClassUpdateSelected = false;
|
|
147
147
|
}
|
|
148
148
|
if (accountLine.isClassMiscategorized &&
|
|
149
|
-
Boolean(accountLine.class
|
|
149
|
+
Boolean(accountLine.class?.qboId) &&
|
|
150
150
|
Boolean(isVendorOrCustomerPresent)) {
|
|
151
151
|
record.retainedClass = accountLine.class;
|
|
152
152
|
record.isRetainedClassSelected = false;
|
|
@@ -336,14 +336,14 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
|
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
const updateClass = () => {
|
|
339
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
339
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
340
340
|
Boolean(recommendedClass?.qboId)) {
|
|
341
341
|
record.class = accountLine.class;
|
|
342
342
|
record.isRecommendedClassSelected = false;
|
|
343
343
|
record.recommendedClass = recommendedClass;
|
|
344
344
|
record.isClassUpdateSelected = false;
|
|
345
345
|
if (accountLine.isClassMiscategorized &&
|
|
346
|
-
Boolean(accountLine.class
|
|
346
|
+
Boolean(accountLine.class?.qboId) &&
|
|
347
347
|
Boolean(isVendorOrCustomerPresent)) {
|
|
348
348
|
record.retainedClass = accountLine.class;
|
|
349
349
|
record.isRetainedClassSelected = false;
|
|
@@ -356,7 +356,7 @@ export const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionD
|
|
|
356
356
|
record.recommendedClass = recommendedClass;
|
|
357
357
|
record.isClassUpdateSelected = false;
|
|
358
358
|
if (accountLine.isClassMiscategorized &&
|
|
359
|
-
Boolean(accountLine.class
|
|
359
|
+
Boolean(accountLine.class?.qboId) &&
|
|
360
360
|
Boolean(isVendorOrCustomerPresent)) {
|
|
361
361
|
record.retainedClass = recommendedClass;
|
|
362
362
|
record.isRetainedClassSelected = false;
|
|
@@ -650,13 +650,13 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
650
650
|
record.isRetainedCategorySelected = false;
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
653
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
654
654
|
Boolean(recommendedClass?.qboId)) {
|
|
655
655
|
record.isRecommendedClassSelected = false;
|
|
656
656
|
record.recommendedClass = recommendedClass;
|
|
657
657
|
record.isClassUpdateSelected = false;
|
|
658
658
|
if (accountLine.isClassMiscategorized &&
|
|
659
|
-
Boolean(accountLine.class
|
|
659
|
+
Boolean(accountLine.class?.qboId)) {
|
|
660
660
|
record.retainedClass = accountLine.class;
|
|
661
661
|
record.isRetainedClassSelected = false;
|
|
662
662
|
}
|
|
@@ -664,12 +664,12 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
664
664
|
else {
|
|
665
665
|
record.isRecommendedClassSelected = false;
|
|
666
666
|
record.recommendedClass = recommendedClass;
|
|
667
|
-
if (recommendedClass?.qboId === accountLine.class
|
|
667
|
+
if (recommendedClass?.qboId === accountLine.class?.qboId) {
|
|
668
668
|
record.recommendedClass = undefined;
|
|
669
669
|
}
|
|
670
670
|
record.isClassUpdateSelected = false;
|
|
671
671
|
if (accountLine.isClassMiscategorized &&
|
|
672
|
-
Boolean(accountLine.class
|
|
672
|
+
Boolean(accountLine.class?.qboId)) {
|
|
673
673
|
record.retainedClass = recommendedClass;
|
|
674
674
|
record.isRetainedClassSelected = false;
|
|
675
675
|
}
|
|
@@ -685,7 +685,7 @@ export const setEntityRecommendationForLineIdInLocalData = (transaction, transac
|
|
|
685
685
|
Boolean(recommendedAccount?.qboId) !== false) {
|
|
686
686
|
record.account = recommendedAccount;
|
|
687
687
|
}
|
|
688
|
-
if (Boolean(record.class
|
|
688
|
+
if (Boolean(record.class?.qboId) === false &&
|
|
689
689
|
Boolean(recommendedClass?.qboId) !== false) {
|
|
690
690
|
record.class = recommendedClass;
|
|
691
691
|
}
|
|
@@ -806,7 +806,8 @@ export const getChangedLineItemCountFromLocalData = (transaction, transactionLoc
|
|
|
806
806
|
accountLineLocal.account?.qboId !== accountLine.account.qboId &&
|
|
807
807
|
accountLineLocal.account?.accountId !== accountLine.account.accountId;
|
|
808
808
|
hasClassChanged =
|
|
809
|
-
|
|
809
|
+
Boolean(accountLine.class?.qboId) &&
|
|
810
|
+
accountLineLocal.class?.qboId !== accountLine.class?.qboId;
|
|
810
811
|
}
|
|
811
812
|
hasDescriptionChanged =
|
|
812
813
|
transactionLocalData.lineItemById[lineId] != null
|
|
@@ -944,10 +945,10 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
944
945
|
record.isRecommendedClassSelected = false;
|
|
945
946
|
record.recommendedClass = recommendedClass;
|
|
946
947
|
record.isClassUpdateSelected = false;
|
|
947
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
948
|
+
if (recommendedClass?.qboId !== accountLine.class?.qboId &&
|
|
948
949
|
Boolean(recommendedClass?.qboId)) {
|
|
949
950
|
if (accountLine.isClassMiscategorized &&
|
|
950
|
-
Boolean(accountLine.class
|
|
951
|
+
Boolean(accountLine.class?.qboId) &&
|
|
951
952
|
Boolean(isVendorOrCustomerPresent)) {
|
|
952
953
|
record.retainedClass = accountLine.class;
|
|
953
954
|
record.isRetainedClassSelected = false;
|
|
@@ -960,7 +961,7 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
960
961
|
record.recommendedClass = recommendedClass;
|
|
961
962
|
record.isClassUpdateSelected = false;
|
|
962
963
|
if (accountLine.isClassMiscategorized &&
|
|
963
|
-
Boolean(accountLine.class
|
|
964
|
+
Boolean(accountLine.class?.qboId) &&
|
|
964
965
|
Boolean(isVendorOrCustomerPresent)) {
|
|
965
966
|
record.retainedClass = recommendedClass;
|
|
966
967
|
record.isRetainedClassSelected = false;
|
package/lib/index.d.ts
CHANGED
|
@@ -122,7 +122,7 @@ import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
|
|
|
122
122
|
import { TaskGroupState } from './entity/taskGroup/taskGroupState';
|
|
123
123
|
import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
|
|
124
124
|
import { DoSignInPayload, clearAll, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveExternalConnection as saveExternalConnectionForTenant, sendEmailMagicLinkToUser, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
|
|
125
|
-
import { CurrentTenant, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
|
|
125
|
+
import { CurrentTenant, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getIsAccountingClassesEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
|
|
126
126
|
import { Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
|
|
127
127
|
import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
|
|
128
128
|
import { pushToastNotification } from './entity/toastNotification/toastNotificationReducer';
|
|
@@ -630,7 +630,7 @@ export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePerio
|
|
|
630
630
|
export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
|
|
631
631
|
export { getNumberOfPeriods };
|
|
632
632
|
export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
|
|
633
|
-
export { Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
633
|
+
export { Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
|
|
634
634
|
export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, };
|
|
635
635
|
export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
|
|
636
636
|
export { getClassById } from './entity/class/classSelector';
|