@zeniai/client-epic-state 4.10.24 → 4.10.26
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/billTransactionPayload.d.ts +3 -3
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +7 -1
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +1 -1
- package/lib/entity/company/companyPayload.js +3 -3
- package/lib/init.js +1 -1
- package/lib/view/settingsView/settingsViewHelpers.js +3 -2
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
- package/package.json +1 -1
|
@@ -11,9 +11,9 @@ export interface BillTransactionPayload extends VendorTransactionPayload {
|
|
|
11
11
|
is_recurring: boolean;
|
|
12
12
|
recurring_bill_config_id: string | null;
|
|
13
13
|
recurring_bill_instance: number | null;
|
|
14
|
-
home_currency_amount
|
|
15
|
-
home_currency_code
|
|
16
|
-
home_currency_symbol
|
|
14
|
+
home_currency_amount?: number;
|
|
15
|
+
home_currency_code?: string;
|
|
16
|
+
home_currency_symbol?: string;
|
|
17
17
|
class_id?: ID | null;
|
|
18
18
|
class_name?: string | null;
|
|
19
19
|
qbo_class_id?: ID | null;
|
|
@@ -9,7 +9,13 @@ const billTransactionState_1 = require("./billTransactionState");
|
|
|
9
9
|
const billPayConfigPayload_1 = require("../../../view/spendManagement/billPay/billPayConfig/billPayConfigPayload");
|
|
10
10
|
const toBillTransaction = (payload) => {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
12
|
-
return
|
|
12
|
+
return Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null
|
|
13
|
+
? (0, zeniDayJS_1.date)(payload.book_close_date)
|
|
14
|
+
: undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, deletionInfo: (0, exports.toDeletionInfo)(payload.deletion_info), isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined, totalAmountInUSD: payload.home_currency_amount != null &&
|
|
15
|
+
payload.home_currency_code != null &&
|
|
16
|
+
payload.home_currency_symbol != null
|
|
17
|
+
? (0, amount_1.toAmount)(payload.home_currency_amount, payload.home_currency_code, payload.home_currency_symbol)
|
|
18
|
+
: undefined });
|
|
13
19
|
};
|
|
14
20
|
exports.toBillTransaction = toBillTransaction;
|
|
15
21
|
const toBillPayInfo = (payload) => {
|
|
@@ -19,7 +19,7 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
19
19
|
isDeleted: boolean;
|
|
20
20
|
deletionInfo: DeletionInfo;
|
|
21
21
|
isRecurring: boolean;
|
|
22
|
-
totalAmountInUSD
|
|
22
|
+
totalAmountInUSD?: Amount;
|
|
23
23
|
recurringBillConfigId?: ID;
|
|
24
24
|
recurringBillInstance?: number;
|
|
25
25
|
bookCloseDate?: ZeniDate;
|
|
@@ -8,7 +8,7 @@ const zeniUrl_1 = require("../../zeniUrl");
|
|
|
8
8
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
9
9
|
const remiSetupViewState_1 = require("../../view/spendManagement/reimbursement/remiSetupView/remiSetupViewState");
|
|
10
10
|
exports.defaultParentSubsidiaryObject = {};
|
|
11
|
-
const toCompanyInfo = (payload, companyIdTenantIdMapping) => {
|
|
11
|
+
const toCompanyInfo = (payload, companyIdTenantIdMapping, companyInStore) => {
|
|
12
12
|
var _a, _b, _c, _d, _e;
|
|
13
13
|
return {
|
|
14
14
|
bookCloseDate: payload.book_close_date != null
|
|
@@ -17,7 +17,7 @@ const toCompanyInfo = (payload, companyIdTenantIdMapping) => {
|
|
|
17
17
|
companyId: payload.company_id,
|
|
18
18
|
tenantId: companyIdTenantIdMapping != null
|
|
19
19
|
? companyIdTenantIdMapping[payload.company_id]
|
|
20
|
-
:
|
|
20
|
+
: companyInStore === null || companyInStore === void 0 ? void 0 : companyInStore.companyInfo.tenantId,
|
|
21
21
|
createTime: (0, zeniDayJS_1.date)(payload.create_time),
|
|
22
22
|
updateTime: (0, zeniDayJS_1.date)(payload.update_time),
|
|
23
23
|
isZeniCOAInUse: payload.is_zeni_coa_in_use,
|
|
@@ -345,7 +345,7 @@ const toCompanyParentSubsidiaryInfo = (company, allCompanies) => {
|
|
|
345
345
|
const toCompany = (payload, companiesPayload, isUpdate, companyInStore, companyIdTenantIdMapping) => {
|
|
346
346
|
var _a, _b;
|
|
347
347
|
return {
|
|
348
|
-
companyInfo: toCompanyInfo(payload, companyIdTenantIdMapping),
|
|
348
|
+
companyInfo: toCompanyInfo(payload, companyIdTenantIdMapping, companyInStore),
|
|
349
349
|
companyLocaleInfo: toCompanyLocaleInfo(payload),
|
|
350
350
|
incInfo: toCompanyIncInfo(payload),
|
|
351
351
|
questionaire: toCompanyQuestionarie(payload, (_a = payload.currency_code) !== null && _a !== void 0 ? _a : '', (_b = payload.currency_symbol) !== null && _b !== void 0 ? _b : ''),
|
package/lib/init.js
CHANGED
|
@@ -32,7 +32,7 @@ function initialize(restEndPoints, userId, sessionId, tenantId) {
|
|
|
32
32
|
console.info(`initializing with ${JSON.stringify(restEndPoints)}`);
|
|
33
33
|
initialize3rdPartyExtensions();
|
|
34
34
|
exports.zeniAPI = new zeniAPI_1.ZeniAPIClient(restEndPoints, userId, sessionId, tenantId);
|
|
35
|
-
exports.store = (0, configureStore_1.default)(exports.zeniAPI,
|
|
35
|
+
exports.store = (0, configureStore_1.default)(exports.zeniAPI, false);
|
|
36
36
|
return exports.store;
|
|
37
37
|
}
|
|
38
38
|
exports.default = initialize;
|
|
@@ -58,10 +58,11 @@ const isBusinessVerificationTabVisible = (currentTenant, userRoleMap) => {
|
|
|
58
58
|
return false;
|
|
59
59
|
}
|
|
60
60
|
if ((0, exports.isSettingsVisible)(currentTenant)) {
|
|
61
|
-
return ((0, userRoleType_1.hasBillPayAccessible)(currentTenant, userRoleMap) ||
|
|
61
|
+
return (((0, userRoleType_1.hasBillPayAccessible)(currentTenant, userRoleMap) ||
|
|
62
62
|
(0, userRoleType_1.hasReimbursementAccessible)(currentTenant, userRoleMap) ||
|
|
63
63
|
(0, userRoleType_1.hasZeniAccountsAccessible)(currentTenant, userRoleMap) ||
|
|
64
|
-
(0, userRoleType_1.hasChargeCardAccessible)(currentTenant, userRoleMap))
|
|
64
|
+
(0, userRoleType_1.hasChargeCardAccessible)(currentTenant, userRoleMap)) &&
|
|
65
|
+
(0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false);
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
67
68
|
return false;
|
|
@@ -400,7 +400,7 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
const sortedTransactionsWithSortKeyValue = (0, orderBy_1.default)(transactionsWithSortKeyValue, (transaction) => {
|
|
403
|
-
var _a, _b;
|
|
403
|
+
var _a, _b, _c;
|
|
404
404
|
switch (sortKey) {
|
|
405
405
|
case 'name':
|
|
406
406
|
return (_a = transaction.vendor) === null || _a === void 0 ? void 0 : _a.name.toLowerCase();
|
|
@@ -413,7 +413,7 @@ const getBillListOnSort = (sortKey, sortOrder, currentTab, transactions) => {
|
|
|
413
413
|
case 'status':
|
|
414
414
|
return getStatusPerTab(transaction);
|
|
415
415
|
case 'amount':
|
|
416
|
-
return (_b = transaction.totalAmountInUSD.amount) !== null &&
|
|
416
|
+
return (_c = (_b = transaction.totalAmountInUSD) === null || _b === void 0 ? void 0 : _b.amount) !== null && _c !== void 0 ? _c : 0;
|
|
417
417
|
case 'paymentMethod':
|
|
418
418
|
return transaction.billPayInfo.billPaymentMethodType.name;
|
|
419
419
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.26",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|