@zeniai/client-epic-state 4.19.86-betaRD8 → 4.19.86-betaSS1
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/jeSchedules/jeSchedulesPayload.d.ts +35 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +44 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -1
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +13 -0
- 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/jeSchedules/jeSchedulesPayload.js +44 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -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/commonVendorView/vendorView/vendorViewSelector.js +4 -13
- package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +1 -4
- 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/jeSchedulesViewSelector.js +5 -0
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +1 -2
- package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +14 -15
- package/lib/index.d.ts +4 -3
- 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/commonVendorView/vendorView/vendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +4 -13
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +1 -4
- package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +1 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +5 -0
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -1
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -7
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +2 -7
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +6 -13
- 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;
|
|
@@ -13,6 +13,39 @@ export interface JEScheduleOtherAttributesPayload {
|
|
|
13
13
|
asset_id?: string | null;
|
|
14
14
|
starting_balance?: number | null;
|
|
15
15
|
}
|
|
16
|
+
export interface JEScheduleAISummaryFieldPayload {
|
|
17
|
+
confidence: number;
|
|
18
|
+
reasoning: string;
|
|
19
|
+
predicted_value?: number | string;
|
|
20
|
+
}
|
|
21
|
+
export interface JEScheduleAISummariesPayload {
|
|
22
|
+
credit_account?: JEScheduleAISummaryFieldPayload;
|
|
23
|
+
credit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
24
|
+
debit_account?: JEScheduleAISummaryFieldPayload;
|
|
25
|
+
debit_accounting_class?: JEScheduleAISummaryFieldPayload;
|
|
26
|
+
period?: JEScheduleAISummaryFieldPayload;
|
|
27
|
+
posting_date?: JEScheduleAISummaryFieldPayload;
|
|
28
|
+
}
|
|
29
|
+
export interface JEScheduleRecommendationsPayload {
|
|
30
|
+
amortization_days?: number | null;
|
|
31
|
+
amortization_months_estimate?: number | null;
|
|
32
|
+
credit_account_confidence?: number;
|
|
33
|
+
credit_account_id?: string | null;
|
|
34
|
+
credit_accounting_class_id?: string | null;
|
|
35
|
+
credit_class_confidence?: number;
|
|
36
|
+
debit_account_confidence?: number;
|
|
37
|
+
debit_account_id?: string | null;
|
|
38
|
+
debit_accounting_class_id?: string | null;
|
|
39
|
+
debit_class_confidence?: number;
|
|
40
|
+
end_date?: string | null;
|
|
41
|
+
je_schedule_type?: string | null;
|
|
42
|
+
period?: number | null;
|
|
43
|
+
period_confidence?: number;
|
|
44
|
+
posting_date?: string | null;
|
|
45
|
+
similar_transactions?: unknown[];
|
|
46
|
+
start_date?: string | null;
|
|
47
|
+
starting_month?: string | null;
|
|
48
|
+
}
|
|
16
49
|
export interface JEScheduledTransactionPayload {
|
|
17
50
|
balance: number | null;
|
|
18
51
|
base_transaction: ScheduleTransactionPayload;
|
|
@@ -35,7 +68,9 @@ export interface JEScheduledTransactionPayload {
|
|
|
35
68
|
status: StatusCodeWithLabelPayload;
|
|
36
69
|
updated_by: UserPayload;
|
|
37
70
|
vendor: VendorPayload;
|
|
71
|
+
ai_summaries?: JEScheduleAISummariesPayload;
|
|
38
72
|
end_date?: string | null;
|
|
73
|
+
recommendations?: JEScheduleRecommendationsPayload;
|
|
39
74
|
updated_at?: string | null;
|
|
40
75
|
}
|
|
41
76
|
export interface JEAccruedScheduledTransactionPayload extends Omit<JEScheduledTransactionPayload, 'base_transaction' | 'je_schedule_id' | 'je_schedule_type'> {
|
|
@@ -144,6 +144,49 @@ function toJEScheduleOtherAttributes(payload) {
|
|
|
144
144
|
assetId: payload.asset_id ?? undefined,
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
+
function toJEScheduleAIRecommendations(payload) {
|
|
148
|
+
if (payload == null) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
const result = {};
|
|
152
|
+
if (payload.debit_account != null) {
|
|
153
|
+
result.debitAccount = {
|
|
154
|
+
confidence: payload.debit_account.confidence,
|
|
155
|
+
reasoning: payload.debit_account.reasoning,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
if (payload.credit_account != null) {
|
|
159
|
+
result.creditAccount = {
|
|
160
|
+
confidence: payload.credit_account.confidence,
|
|
161
|
+
reasoning: payload.credit_account.reasoning,
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
if (payload.debit_accounting_class != null) {
|
|
165
|
+
result.debitClass = {
|
|
166
|
+
confidence: payload.debit_accounting_class.confidence,
|
|
167
|
+
reasoning: payload.debit_accounting_class.reasoning,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
if (payload.credit_accounting_class != null) {
|
|
171
|
+
result.creditClass = {
|
|
172
|
+
confidence: payload.credit_accounting_class.confidence,
|
|
173
|
+
reasoning: payload.credit_accounting_class.reasoning,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
if (payload.period != null) {
|
|
177
|
+
result.period = {
|
|
178
|
+
confidence: payload.period.confidence,
|
|
179
|
+
reasoning: payload.period.reasoning,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
if (payload.posting_date != null) {
|
|
183
|
+
result.postingDate = {
|
|
184
|
+
confidence: payload.posting_date.confidence,
|
|
185
|
+
reasoning: payload.posting_date.reasoning,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
189
|
+
}
|
|
147
190
|
function toJEScheduledTransaction(payload) {
|
|
148
191
|
return {
|
|
149
192
|
jeScheduleId: payload.je_schedule_id ?? undefined,
|
|
@@ -185,6 +228,7 @@ function toJEScheduledTransaction(payload) {
|
|
|
185
228
|
? toJEScheduleOtherAttributes(payload.other_attributes)
|
|
186
229
|
: {},
|
|
187
230
|
scheduledJournalEntry: [],
|
|
231
|
+
aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
|
|
188
232
|
};
|
|
189
233
|
}
|
|
190
234
|
function toJEAccruedScheduledTransaction(payload) {
|
|
@@ -9,7 +9,7 @@ import { ScheduleTransaction } from '../transaction/stateTypes/scheduleTransacti
|
|
|
9
9
|
import { TransactionID } from '../transaction/stateTypes/transaction';
|
|
10
10
|
import { User } from '../user/userState';
|
|
11
11
|
import { Vendor } from '../vendor/vendorState';
|
|
12
|
-
import { JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
12
|
+
import { JEScheduleAIRecommendations, JEScheduleOtherAttributes, ScheduleJournalStatusCode, ScheduleStatus } from './jeSchedulesState';
|
|
13
13
|
import { JEScheduleKey, JEScheduleTransactionKey, JournalEntryErrorCodeType, ScheduleTypes } from './jeSchedulesTypes';
|
|
14
14
|
export interface ScheduledJournalEntry {
|
|
15
15
|
error: JournalEntryErrorCodeType[];
|
|
@@ -59,6 +59,7 @@ export interface JEScheduledTransaction {
|
|
|
59
59
|
scheduledJournalEntry: ScheduledJournalEntry[];
|
|
60
60
|
status: ScheduleStatus;
|
|
61
61
|
vendor: Vendor;
|
|
62
|
+
aiRecommendations?: JEScheduleAIRecommendations;
|
|
62
63
|
balanceAsOfToday?: Amount;
|
|
63
64
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
64
65
|
endDate?: ZeniDate;
|
|
@@ -77,7 +77,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
|
|
|
77
77
|
const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
78
78
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
79
79
|
const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
80
|
-
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
|
|
80
|
+
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
|
|
81
81
|
const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
82
82
|
if (vendorDetails == null) {
|
|
83
83
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
@@ -134,6 +134,7 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
134
134
|
account: accountDebit,
|
|
135
135
|
},
|
|
136
136
|
scheduledJournalEntry,
|
|
137
|
+
aiRecommendations,
|
|
137
138
|
};
|
|
138
139
|
};
|
|
139
140
|
exports.getJEScheduledTransactionByJEScheduleTransactionKey = getJEScheduledTransactionByJEScheduleTransactionKey;
|
|
@@ -13,6 +13,18 @@ export interface ScheduleJournalStatusCode {
|
|
|
13
13
|
code: ScheduleJournalEntryStatusCodeType;
|
|
14
14
|
label: string;
|
|
15
15
|
}
|
|
16
|
+
export interface JEScheduleFieldRecommendation {
|
|
17
|
+
confidence: number;
|
|
18
|
+
reasoning: string;
|
|
19
|
+
}
|
|
20
|
+
export interface JEScheduleAIRecommendations {
|
|
21
|
+
creditAccount?: JEScheduleFieldRecommendation;
|
|
22
|
+
creditClass?: JEScheduleFieldRecommendation;
|
|
23
|
+
debitAccount?: JEScheduleFieldRecommendation;
|
|
24
|
+
debitClass?: JEScheduleFieldRecommendation;
|
|
25
|
+
period?: JEScheduleFieldRecommendation;
|
|
26
|
+
postingDate?: JEScheduleFieldRecommendation;
|
|
27
|
+
}
|
|
16
28
|
export interface JEScheduleOtherAttributes {
|
|
17
29
|
assetId?: string;
|
|
18
30
|
startingBalance?: Amount;
|
|
@@ -57,6 +69,7 @@ export interface JEScheduledTransactionState {
|
|
|
57
69
|
scheduledJournalEntry: ScheduledJournalEntryState[];
|
|
58
70
|
status: ScheduleStatus;
|
|
59
71
|
vendorId: ID;
|
|
72
|
+
aiRecommendations?: JEScheduleAIRecommendations;
|
|
60
73
|
balanceAsOfToday?: number;
|
|
61
74
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
62
75
|
endDate?: ZeniDate;
|
|
@@ -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
|
}
|
|
@@ -134,6 +134,49 @@ function toJEScheduleOtherAttributes(payload) {
|
|
|
134
134
|
assetId: payload.asset_id ?? undefined,
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
|
+
function toJEScheduleAIRecommendations(payload) {
|
|
138
|
+
if (payload == null) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const result = {};
|
|
142
|
+
if (payload.debit_account != null) {
|
|
143
|
+
result.debitAccount = {
|
|
144
|
+
confidence: payload.debit_account.confidence,
|
|
145
|
+
reasoning: payload.debit_account.reasoning,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (payload.credit_account != null) {
|
|
149
|
+
result.creditAccount = {
|
|
150
|
+
confidence: payload.credit_account.confidence,
|
|
151
|
+
reasoning: payload.credit_account.reasoning,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
if (payload.debit_accounting_class != null) {
|
|
155
|
+
result.debitClass = {
|
|
156
|
+
confidence: payload.debit_accounting_class.confidence,
|
|
157
|
+
reasoning: payload.debit_accounting_class.reasoning,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (payload.credit_accounting_class != null) {
|
|
161
|
+
result.creditClass = {
|
|
162
|
+
confidence: payload.credit_accounting_class.confidence,
|
|
163
|
+
reasoning: payload.credit_accounting_class.reasoning,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
if (payload.period != null) {
|
|
167
|
+
result.period = {
|
|
168
|
+
confidence: payload.period.confidence,
|
|
169
|
+
reasoning: payload.period.reasoning,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
if (payload.posting_date != null) {
|
|
173
|
+
result.postingDate = {
|
|
174
|
+
confidence: payload.posting_date.confidence,
|
|
175
|
+
reasoning: payload.posting_date.reasoning,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
179
|
+
}
|
|
137
180
|
export function toJEScheduledTransaction(payload) {
|
|
138
181
|
return {
|
|
139
182
|
jeScheduleId: payload.je_schedule_id ?? undefined,
|
|
@@ -175,6 +218,7 @@ export function toJEScheduledTransaction(payload) {
|
|
|
175
218
|
? toJEScheduleOtherAttributes(payload.other_attributes)
|
|
176
219
|
: {},
|
|
177
220
|
scheduledJournalEntry: [],
|
|
221
|
+
aiRecommendations: toJEScheduleAIRecommendations(payload.ai_summaries),
|
|
178
222
|
};
|
|
179
223
|
}
|
|
180
224
|
export function toJEAccruedScheduledTransaction(payload) {
|
|
@@ -70,7 +70,7 @@ export const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
|
|
|
70
70
|
export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
71
71
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
72
72
|
const jeScheduleTransactionState = recordGet(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
73
|
-
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, } = jeScheduleTransactionState;
|
|
73
|
+
const { period, updatedByUserID: updatedBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiRecommendations, } = jeScheduleTransactionState;
|
|
74
74
|
const vendorDetails = getVendorByVendorId(vendorState, vendorId);
|
|
75
75
|
if (vendorDetails == null) {
|
|
76
76
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
@@ -127,5 +127,6 @@ export const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTr
|
|
|
127
127
|
account: accountDebit,
|
|
128
128
|
},
|
|
129
129
|
scheduledJournalEntry,
|
|
130
|
+
aiRecommendations,
|
|
130
131
|
};
|
|
131
132
|
};
|
|
@@ -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 }))}`
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { reduceAnyFetchState, reduceFetchState, } from '../../../commonStateTypes/reduceFetchState';
|
|
2
|
-
import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
|
|
3
2
|
import { getAccountBase } from '../../../entity/account/accountSelector';
|
|
4
3
|
import { getAddressByAddressId } from '../../../entity/address/addressSelector';
|
|
5
4
|
import { getBankAccountsByBankAccountIds } from '../../../entity/bankAccount/bankAccountSelector';
|
|
@@ -61,17 +60,13 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
61
60
|
?.vendorDetailLocalData,
|
|
62
61
|
supportedCountries: billPayConfigState.vendor.supportedCountries,
|
|
63
62
|
};
|
|
64
|
-
|
|
65
|
-
const editFetchStateList = [
|
|
63
|
+
fetchState = reduceFetchState([
|
|
66
64
|
accountList,
|
|
65
|
+
classList,
|
|
67
66
|
vendorTypeListState,
|
|
68
67
|
vendorViewState.editVendorStateById[vendorIdFromUrl]?.fetchStatus ??
|
|
69
68
|
vendorViewInitialState.newVendorState.fetchStatus,
|
|
70
|
-
];
|
|
71
|
-
if (isAccountingClassesEnabled) {
|
|
72
|
-
editFetchStateList.push(classList);
|
|
73
|
-
}
|
|
74
|
-
fetchState = reduceFetchState(editFetchStateList);
|
|
69
|
+
]);
|
|
75
70
|
}
|
|
76
71
|
else {
|
|
77
72
|
const basicVendorDetails = getBasicVendorDetailsForNewVendor(state, vendorViewState.newVendorState);
|
|
@@ -100,14 +95,11 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
100
95
|
if (tentativeName != null) {
|
|
101
96
|
entityRecommendations = getRecommendationsForEntity(state, tentativeName, 'vendor');
|
|
102
97
|
}
|
|
103
|
-
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
104
98
|
const fetchStateList = [
|
|
105
99
|
{ fetchState: accountList.fetchState, error: accountList.error },
|
|
100
|
+
{ fetchState: classList.fetchState, error: classList.error },
|
|
106
101
|
vendorTypeListState,
|
|
107
102
|
];
|
|
108
|
-
if (isAccountingClassesEnabled) {
|
|
109
|
-
fetchStateList.push({ fetchState: classList.fetchState, error: classList.error });
|
|
110
|
-
}
|
|
111
103
|
if (entityRecommendations != null &&
|
|
112
104
|
entityRecommendations.recommendations != null &&
|
|
113
105
|
entityRecommendations.recommendations.length > 0) {
|
|
@@ -152,7 +144,6 @@ export const getVendorView = (state, vendorIdFromUrl) => {
|
|
|
152
144
|
fetchState: fetchState.fetchState,
|
|
153
145
|
hasWireTransfer,
|
|
154
146
|
hasInternationalWireTransfer,
|
|
155
|
-
isAccountingClassesEnabled: getIsAccountingClassesEnabled(state),
|
|
156
147
|
deleteFileStatusById,
|
|
157
148
|
updateFileStatusById,
|
|
158
149
|
loggedInUserVerification,
|
|
@@ -3,7 +3,6 @@ import { getStartOfAndEndOfTimeframeForFY } from '../../../commonStateTypes/fisc
|
|
|
3
3
|
import { reduceAnyFetchState, reduceFetchState, } from '../../../commonStateTypes/reduceFetchState';
|
|
4
4
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
5
5
|
import { getAccountBase } from '../../../entity/account/accountSelector';
|
|
6
|
-
import { getIsAccountingClassesEnabled } from '../../../entity/tenant/tenantSelector';
|
|
7
6
|
import { getAddressByAddressId } from '../../../entity/address/addressSelector';
|
|
8
7
|
import { getContactsByIds } from '../../../entity/billPay/contact/contactSelector';
|
|
9
8
|
import { getClassById } from '../../../entity/class/classSelector';
|
|
@@ -21,7 +20,6 @@ const ALL_VENDOR_DETAIL_TABS_TYPES = [
|
|
|
21
20
|
export const toVendorDetailTabsType = (v) => stringToUnion(v, ALL_VENDOR_DETAIL_TABS_TYPES);
|
|
22
21
|
export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
23
22
|
const { accountListState, accountState, classListState, classState, vendorState, userState, vendorsTabVendorViewState, vendorTypeListState, addressState, addressViewState, contactState, } = state;
|
|
24
|
-
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state);
|
|
25
23
|
const accountList = getAccountList(accountState, accountListState, 'accountList');
|
|
26
24
|
const classList = getClassList(classState, classListState);
|
|
27
25
|
const ownerList = getUsersByUserIds(state.userState, state.ownerListState.ownerIds);
|
|
@@ -53,7 +51,7 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
|
53
51
|
}
|
|
54
52
|
fetchState = reduceFetchState([
|
|
55
53
|
accountList,
|
|
56
|
-
|
|
54
|
+
classList,
|
|
57
55
|
vendorTypeListState,
|
|
58
56
|
vendorsTabVendorViewState.vendorStateById[vendorIdFromUrl]?.fetchStatus ?? {
|
|
59
57
|
fetchState: 'Not-Started',
|
|
@@ -64,7 +62,6 @@ export const getVendorsTabVendorView = (state, vendorIdFromUrl) => {
|
|
|
64
62
|
return {
|
|
65
63
|
accountList: accountList,
|
|
66
64
|
classList: classList,
|
|
67
|
-
isAccountingClassesEnabled,
|
|
68
65
|
vendorTypeList: vendorTypeList,
|
|
69
66
|
accountsHierarchyList,
|
|
70
67
|
classHierarchyList,
|
|
@@ -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
|
? {
|
|
@@ -60,6 +60,9 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
60
60
|
failedJeScheduledTransaction.push(jeScheduleDetails);
|
|
61
61
|
});
|
|
62
62
|
const draftSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'draft');
|
|
63
|
+
const ongoingSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'ongoing');
|
|
64
|
+
const completedSchedules = jeScheduledTransaction.filter((schedule) => schedule.status.code === 'completed' ||
|
|
65
|
+
schedule.status.code === 'marked_as_completed');
|
|
63
66
|
const resolveSchedules = [];
|
|
64
67
|
failedJeScheduledTransaction.forEach((schedule) => {
|
|
65
68
|
schedule.scheduledJournalEntry.forEach((journalEntry) => {
|
|
@@ -79,7 +82,9 @@ export function getExpenseAutomationJESchedulesView(state) {
|
|
|
79
82
|
allAccountList: filteredAccounts,
|
|
80
83
|
accountListNestedAccountHierarchy,
|
|
81
84
|
allClassList: allClasses,
|
|
85
|
+
completedSchedules,
|
|
82
86
|
draftSchedules,
|
|
87
|
+
ongoingSchedules,
|
|
83
88
|
resolveSchedules: resolveSchedules,
|
|
84
89
|
accountSettingsView,
|
|
85
90
|
postStatusById: postStatusById,
|
|
@@ -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:
|
|
@@ -3,7 +3,6 @@ import { reduceFetchState } from '../../../../commonStateTypes/reduceFetchState'
|
|
|
3
3
|
import { getContactsByIds } from '../../../../entity/billPay/contact/contactSelector';
|
|
4
4
|
import { getPaymentAccountsByPaymentAccountIds } from '../../../../entity/paymentAccount/paymentAccountSelector';
|
|
5
5
|
import { getVendorByVendorId } from '../../../../entity/vendor/vendorSelector';
|
|
6
|
-
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
7
6
|
import { getAccountList } from '../../../accountList/accountListSelector';
|
|
8
7
|
import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
|
|
9
8
|
import { getAllDepositAccounts } from '../../zeniAccounts/depositAccountList/depositAccountListSelector';
|
|
@@ -74,14 +73,11 @@ export const getReviewPageBillDetail = (state, billId) => {
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
if (sourceBillDetail != null) {
|
|
77
|
-
|
|
76
|
+
sourceBillDetailFetchState = reduceFetchState([
|
|
78
77
|
sourceBillDetail.fetchStatus,
|
|
79
78
|
accountListState.byReportId['billPayAccountList'],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
fetchStateList.push(classListState);
|
|
83
|
-
}
|
|
84
|
-
sourceBillDetailFetchState = reduceFetchState(fetchStateList).fetchState;
|
|
79
|
+
classListState,
|
|
80
|
+
]).fetchState;
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
else {
|
|
@@ -3,7 +3,6 @@ import cloneDeep from 'lodash/cloneDeep';
|
|
|
3
3
|
import { reduceAllFetchState, reduceAnyFetchState, } from '../../../../commonStateTypes/reduceFetchState';
|
|
4
4
|
import { getApprovalRulesByIds } from '../../../../entity/approvalRule/approvalRuleSelector';
|
|
5
5
|
import { getClassesByIds } from '../../../../entity/class/classSelector';
|
|
6
|
-
import { getIsAccountingClassesEnabled } from '../../../../entity/tenant/tenantSelector';
|
|
7
6
|
import { getUserByUserId } from '../../../../entity/user/userSelector';
|
|
8
7
|
import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
|
|
9
8
|
export const getBillPaySetupApproverView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (billPaySetupApproverViewState, approvalRuleState, userState) => {
|
|
@@ -45,7 +44,7 @@ export const getBillPaySetupApproverView = createSelector((state) => state.billP
|
|
|
45
44
|
newApprovalRuleId,
|
|
46
45
|
};
|
|
47
46
|
});
|
|
48
|
-
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (
|
|
47
|
+
export const getBillPaySetupApproverUpdateDataView = createSelector((state) => state.billPaySetupApproverViewState, (state) => state.approvalRuleState, (state) => state.userState, (state) => state.classState, (state) => state.classListState, (state) => state.userRoleState, (billPaySetupApproverViewState, approvalRuleState, userState, classState, classListState, userRoleState) => {
|
|
49
48
|
const { affectedEntityIds, approvalRuleIds, approverListState, billPaySetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = billPaySetupApproverViewState;
|
|
50
49
|
const { approverIds, attributes } = approverListState;
|
|
51
50
|
const allApprovalRules = getApprovalRulesByIds(approvalRuleState, approvalRuleIds);
|
|
@@ -93,9 +92,10 @@ export const getBillPaySetupApproverUpdateDataView = createSelector((state) => s
|
|
|
93
92
|
allAttributes,
|
|
94
93
|
filteredAttributes,
|
|
95
94
|
billPaySetupApproverViewUpdateData,
|
|
96
|
-
approverListFetchStatus:
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
approverListFetchStatus: reduceAllFetchState([
|
|
96
|
+
approverListState.fetchStatus,
|
|
97
|
+
classListState,
|
|
98
|
+
]),
|
|
99
99
|
fetchState,
|
|
100
100
|
allAccountingClasses,
|
|
101
101
|
error,
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { concat, from } from 'rxjs';
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
4
3
|
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
5
4
|
import { fetchBillPayApproversDetails, fetchBillPayApproversList, } from '../billPaySetupApproverViewReducer';
|
|
6
5
|
export const fetchBillPayApproversDetailsEpic = (actions$, state$) => actions$.pipe(filter(fetchBillPayApproversDetails.match), mergeMap((action) => {
|
|
7
6
|
const { cacheOverride, includeUserRoles } = action.payload;
|
|
8
7
|
const { billPaySetupApproverViewState, classListState } = state$.value;
|
|
9
8
|
const { approverListState } = billPaySetupApproverViewState;
|
|
10
|
-
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
11
9
|
const actions = [];
|
|
12
10
|
if (cacheOverride === true) {
|
|
13
11
|
actions.push(fetchBillPayApproversList(cacheOverride, includeUserRoles));
|
|
14
|
-
|
|
15
|
-
actions.push(fetchClassList());
|
|
16
|
-
}
|
|
12
|
+
actions.push(fetchClassList());
|
|
17
13
|
}
|
|
18
14
|
else {
|
|
19
15
|
if (billPaySetupApproverViewState.hasValidState() === false &&
|
|
20
16
|
approverListState.fetchStatus.fetchState !== 'In-Progress') {
|
|
21
17
|
actions.push(fetchBillPayApproversList(true, includeUserRoles));
|
|
22
18
|
}
|
|
23
|
-
if (
|
|
24
|
-
classListState.hasValidState() === false &&
|
|
19
|
+
if (classListState.hasValidState() === false &&
|
|
25
20
|
classListState.fetchState !== 'In-Progress') {
|
|
26
21
|
actions.push(fetchClassList());
|
|
27
22
|
}
|