@zeniai/client-epic-state 4.19.81-betaRD2 → 4.19.81-betaRR0
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/tenant/tenantPayload.d.ts +0 -1
- package/lib/entity/tenant/tenantReducer.js +0 -1
- package/lib/entity/tenant/tenantSelector.d.ts +0 -1
- package/lib/entity/tenant/tenantSelector.js +1 -9
- package/lib/entity/tenant/tenantState.d.ts +0 -1
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
- package/lib/esm/entity/tenant/tenantReducer.js +0 -1
- package/lib/esm/entity/tenant/tenantSelector.js +0 -7
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/classList/fetchClassListEpic.js +2 -3
- package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -2
- package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +11 -0
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -15
- package/lib/index.d.ts +2 -2
- package/lib/index.js +29 -30
- package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
- package/lib/view/classList/fetchClassListEpic.js +1 -2
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +11 -0
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
- package/lib/view/transactionDetail/epics/saveTransactionHelper.js +1 -2
- package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -15
- package/package.json +1 -1
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
|
@@ -7,6 +7,8 @@ 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;
|
|
10
12
|
createdBy: ID;
|
|
11
13
|
deletionInfo: DeletionInfo;
|
|
12
14
|
entityApprovalId: ID;
|
|
@@ -19,8 +21,6 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
19
21
|
updateTime: ZeniDate;
|
|
20
22
|
bookCloseDate?: ZeniDate;
|
|
21
23
|
bulkProcessingDetail?: BulkProcessingDetail;
|
|
22
|
-
classId?: ID;
|
|
23
|
-
className?: string;
|
|
24
24
|
lastUpdatedByUserId?: ID;
|
|
25
25
|
recurringBillConfigId?: ID;
|
|
26
26
|
recurringBillInstance?: number;
|
|
@@ -561,7 +561,6 @@ 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,
|
|
565
564
|
bookCloseDate: payload.book_close_date != null
|
|
566
565
|
? (0, zeniDayJS_1.date)(payload.book_close_date)
|
|
567
566
|
: undefined,
|
|
@@ -85,7 +85,6 @@ 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;
|
|
89
88
|
export declare const isTenantBookkeepingEnabled: (tenant: Tenant | undefined) => boolean;
|
|
90
89
|
export declare const isOtherProductsEnabledForTenant: (tenant: Tenant | undefined) => boolean;
|
|
91
90
|
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.
|
|
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;
|
|
7
7
|
exports.getTenant = getTenant;
|
|
8
8
|
exports.getOnboardingTenantByTenantId = getOnboardingTenantByTenantId;
|
|
9
9
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -280,14 +280,6 @@ 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;
|
|
291
283
|
const isTenantBookkeepingEnabled = (tenant) => {
|
|
292
284
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
293
285
|
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;
|
|
38
39
|
isCategoryMiscategorized: boolean;
|
|
39
40
|
isClassMiscategorized: boolean;
|
|
40
|
-
class?: ClassBase;
|
|
41
41
|
customer?: CustomerBase;
|
|
42
42
|
vendor?: VendorBase;
|
|
43
43
|
}
|
|
@@ -553,7 +553,6 @@ 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,
|
|
557
556
|
bookCloseDate: payload.book_close_date != null
|
|
558
557
|
? date(payload.book_close_date)
|
|
559
558
|
: undefined,
|
|
@@ -265,13 +265,6 @@ 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
|
-
};
|
|
275
268
|
export const isTenantBookkeepingEnabled = (tenant) => {
|
|
276
269
|
// if the tenants API takes time, tenant can be non null with productSettings as null
|
|
277
270
|
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,
|
|
63
|
+
import { getCurrentTenant, 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,
|
|
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, };
|
|
426
426
|
export { toAccountType, toAccountGroupType, getAccountGroupKey, };
|
|
427
427
|
export { getClassById } from './entity/class/classSelector';
|
|
428
428
|
export { getForecast };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateClasses } from '../../entity/class/classReducer';
|
|
4
|
-
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
5
4
|
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
6
5
|
import { fetchClassList, updateClassList, updateClassListFailure, } from './classListReducer';
|
|
7
|
-
export const fetchClassListEpic = (actions$,
|
|
6
|
+
export const fetchClassListEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchClassList.match), switchMap((action) => {
|
|
8
7
|
const { isIncludeDeleted } = action.payload;
|
|
9
8
|
const queryParams = isIncludeDeleted === true
|
|
10
9
|
? `?query=${encodeURIComponent(JSON.stringify({ is_include_deleted: true }))}`
|
|
@@ -65,8 +65,7 @@ export const toTransactionUpdatesFromTransactionCategorizationLocalData = (trans
|
|
|
65
65
|
Boolean(lineItem.account?.qboId);
|
|
66
66
|
hasClassChanged =
|
|
67
67
|
Boolean(lineItem.class?.qboId) &&
|
|
68
|
-
|
|
69
|
-
lineItem.class?.qboId !== accountLine.class?.qboId;
|
|
68
|
+
lineItem.class?.qboId !== accountLine.class.qboId;
|
|
70
69
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
71
70
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
72
71
|
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 (
|
|
237
|
+
if (accountLine.class.classId === '' &&
|
|
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
|
-
|
|
467
|
+
accountLine.class.classId !== ''
|
|
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:
|
|
@@ -416,6 +416,14 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
416
416
|
transactionsWithNoSortKeyValue.push(transaction);
|
|
417
417
|
}
|
|
418
418
|
break;
|
|
419
|
+
case 'invoiceNumber':
|
|
420
|
+
if (Boolean(transaction.documentId) === true) {
|
|
421
|
+
transactionsWithSortKeyValue.push(transaction);
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
transactionsWithNoSortKeyValue.push(transaction);
|
|
425
|
+
}
|
|
426
|
+
break;
|
|
419
427
|
case 'dueDate':
|
|
420
428
|
if (currentTab === 'draft') {
|
|
421
429
|
if (Boolean(transaction.dueDate) === true) {
|
|
@@ -518,6 +526,8 @@ export const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions)
|
|
|
518
526
|
return transaction.totalAmountInUSD?.amount ?? 0;
|
|
519
527
|
case 'paymentMethod':
|
|
520
528
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
529
|
+
case 'invoiceNumber':
|
|
530
|
+
return transaction.documentId;
|
|
521
531
|
}
|
|
522
532
|
}, getColumnWiseSortOrder(sortOrder));
|
|
523
533
|
return [
|
|
@@ -415,6 +415,14 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
415
415
|
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
416
416
|
}
|
|
417
417
|
break;
|
|
418
|
+
case 'createdBy':
|
|
419
|
+
if (Boolean(reimbursement.createdBy) === true) {
|
|
420
|
+
reimbursementsWithSortKeyValue.push(reimbursement);
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
reimbursementsWithNoSortKeyValue.push(reimbursement);
|
|
424
|
+
}
|
|
425
|
+
break;
|
|
418
426
|
}
|
|
419
427
|
});
|
|
420
428
|
const getColumnWiseSortOrder = (sortOrder) => {
|
|
@@ -422,6 +430,7 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
422
430
|
case 'reportName':
|
|
423
431
|
case 'type':
|
|
424
432
|
case 'status':
|
|
433
|
+
case 'createdBy':
|
|
425
434
|
return sortOrder === 'ascending' ? 'asc' : 'desc';
|
|
426
435
|
default:
|
|
427
436
|
return sortOrder === 'ascending' ? 'desc' : 'asc';
|
|
@@ -441,6 +450,8 @@ export const getRemiListOnSort = (sortKey, sortOrder, currentTab, reimbursements
|
|
|
441
450
|
return getStatusPerTab(reimbursement);
|
|
442
451
|
case 'amount':
|
|
443
452
|
return reimbursement.amount.amount ?? 0;
|
|
453
|
+
case 'createdBy':
|
|
454
|
+
return reimbursement.createdBy.toLowerCase();
|
|
444
455
|
}
|
|
445
456
|
}, getColumnWiseSortOrder(sortOrder));
|
|
446
457
|
return [
|
|
@@ -76,8 +76,7 @@ export const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDe
|
|
|
76
76
|
Boolean(lineItem.account?.qboId);
|
|
77
77
|
hasClassChanged =
|
|
78
78
|
Boolean(lineItem.class?.qboId) &&
|
|
79
|
-
|
|
80
|
-
lineItem.class?.qboId !== accountLine.class?.qboId;
|
|
79
|
+
lineItem.class?.qboId !== accountLine.class.qboId;
|
|
81
80
|
const recommendedAccountBase = toRecommendedAccountBase(lineItem.amount.amount, lineItem.account);
|
|
82
81
|
const recommendedClassBase = toRecommendedClassBase(lineItem.amount.amount, lineItem.class);
|
|
83
82
|
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,8 +806,7 @@ 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
|
-
|
|
810
|
-
accountLineLocal.class?.qboId !== accountLine.class?.qboId;
|
|
809
|
+
accountLineLocal.class?.qboId !== accountLine.class.qboId;
|
|
811
810
|
}
|
|
812
811
|
hasDescriptionChanged =
|
|
813
812
|
transactionLocalData.lineItemById[lineId] != null
|
|
@@ -945,10 +944,10 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
945
944
|
record.isRecommendedClassSelected = false;
|
|
946
945
|
record.recommendedClass = recommendedClass;
|
|
947
946
|
record.isClassUpdateSelected = false;
|
|
948
|
-
if (recommendedClass?.qboId !== accountLine.class
|
|
947
|
+
if (recommendedClass?.qboId !== accountLine.class.qboId &&
|
|
949
948
|
Boolean(recommendedClass?.qboId)) {
|
|
950
949
|
if (accountLine.isClassMiscategorized &&
|
|
951
|
-
Boolean(accountLine.class
|
|
950
|
+
Boolean(accountLine.class.qboId) &&
|
|
952
951
|
Boolean(isVendorOrCustomerPresent)) {
|
|
953
952
|
record.retainedClass = accountLine.class;
|
|
954
953
|
record.isRetainedClassSelected = false;
|
|
@@ -961,7 +960,7 @@ export const toUpdateLineItemsToOriginalVendor = (transaction, transactionDetail
|
|
|
961
960
|
record.recommendedClass = recommendedClass;
|
|
962
961
|
record.isClassUpdateSelected = false;
|
|
963
962
|
if (accountLine.isClassMiscategorized &&
|
|
964
|
-
Boolean(accountLine.class
|
|
963
|
+
Boolean(accountLine.class.qboId) &&
|
|
965
964
|
Boolean(isVendorOrCustomerPresent)) {
|
|
966
965
|
record.retainedClass = recommendedClass;
|
|
967
966
|
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,
|
|
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';
|
|
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,
|
|
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, };
|
|
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';
|