@zeniai/client-epic-state 4.14.50 → 4.14.51
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.
|
@@ -13,10 +13,9 @@ const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
|
13
13
|
const helpers_1 = require("../../helpers");
|
|
14
14
|
const spendManagementFilterHelpers_1 = require("../../spendManagementFilterHelpers");
|
|
15
15
|
const billPayConfigSelector_1 = require("../billPayConfig/billPayConfigSelector");
|
|
16
|
-
const billPayConfigState_1 = require("../billPayConfig/billPayConfigState");
|
|
17
16
|
const billListState_1 = require("./billListState");
|
|
18
17
|
const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, loggedInUserId) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
18
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
20
19
|
const { billListState, billTransactionState, billPayConfigState, entityApprovalStatusState, userState, recurringBillState, billsBulkActionViewState, } = state;
|
|
21
20
|
const key = (0, billListState_1.getBillListKey)(currentTimePeriod, billListState.currentTab);
|
|
22
21
|
const pendingApprovalKey = (0, billListState_1.getBillListKey)(currentTimePeriod, 'pending_approval');
|
|
@@ -157,12 +156,7 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, logge
|
|
|
157
156
|
sortKey: 'name',
|
|
158
157
|
sortOrder: 'ascending',
|
|
159
158
|
};
|
|
160
|
-
const
|
|
161
|
-
)) === null || _o === void 0 ? void 0 : _o.isEnabled) !== null && _p !== void 0 ? _p : false;
|
|
162
|
-
const isAchActiveForCurrentTenant = ((_r = (_q = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'standard', 'paymentAccount'))) === null || _q === void 0 ? void 0 : _q.isEnabled) !== null && _r !== void 0 ? _r : false) ||
|
|
163
|
-
((_t = (_s = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('ach', 'sameDay', 'paymentAccount'))) === null || _s === void 0 ? void 0 : _s.isEnabled) !== null && _t !== void 0 ? _t : false);
|
|
164
|
-
const isOfflinePaymentsActive = (_v = (_u = (0, billPayConfigSelector_1.getBillPayConfigByKey)(billPayConfigState, (0, billPayConfigState_1.getBillPayConfigMethodKey)('outside-zeni', 'outsideZeni'))) === null || _u === void 0 ? void 0 : _u.isEnabled) !== null && _v !== void 0 ? _v : false;
|
|
165
|
-
const allSubTabs = getAllSubTabs(billListState.currentTab, isWireActiveForCurrentTenant, isAchActiveForCurrentTenant, isOfflinePaymentsActive);
|
|
159
|
+
const allSubTabs = getAllSubTabs(billListState.currentTab);
|
|
166
160
|
const loweredSearchText = billListState.searchText.trim().toLowerCase();
|
|
167
161
|
transactionsView = (0, exports.getBillListOnSort)(sortKey, sortOrder, billListState.currentTab, transactionsView.filter((transaction) => {
|
|
168
162
|
var _a, _b, _c;
|
|
@@ -268,7 +262,7 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, logge
|
|
|
268
262
|
};
|
|
269
263
|
};
|
|
270
264
|
exports.getBillList = getBillList;
|
|
271
|
-
const getAllSubTabs = (selectedTab
|
|
265
|
+
const getAllSubTabs = (selectedTab) => {
|
|
272
266
|
switch (selectedTab) {
|
|
273
267
|
case 'draft':
|
|
274
268
|
return ['all', 'overdue'];
|
|
@@ -284,25 +278,9 @@ const getAllSubTabs = (selectedTab, isWireActive, isAchActive, isOfflinePayments
|
|
|
284
278
|
case 'scheduled':
|
|
285
279
|
return ['all', 'failed', 'cancelled', 'deleted'];
|
|
286
280
|
case 'paid':
|
|
287
|
-
return
|
|
281
|
+
return ['all', 'ach', 'wire', 'offline', 'deleted'];
|
|
288
282
|
}
|
|
289
283
|
};
|
|
290
|
-
const getAllPaidSubTabs = (isWireActive, isAchActive, isOfflinePaymentsActive) => {
|
|
291
|
-
let paidSubTabs = [];
|
|
292
|
-
if (isAchActive) {
|
|
293
|
-
paidSubTabs.push('ach');
|
|
294
|
-
}
|
|
295
|
-
if (isWireActive) {
|
|
296
|
-
paidSubTabs.push('wire');
|
|
297
|
-
}
|
|
298
|
-
if (isOfflinePaymentsActive) {
|
|
299
|
-
paidSubTabs.push('offline');
|
|
300
|
-
}
|
|
301
|
-
if (paidSubTabs.length > 0) {
|
|
302
|
-
paidSubTabs = ['all', ...paidSubTabs, 'deleted'];
|
|
303
|
-
}
|
|
304
|
-
return paidSubTabs;
|
|
305
|
-
};
|
|
306
284
|
const getApproversOrRejectors = (billTransaction, entityApprovalStatusState, userState) => {
|
|
307
285
|
const approvers = {
|
|
308
286
|
users: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.51",
|
|
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",
|