@zeniai/client-epic-state 4.14.17 → 4.14.18
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.
|
@@ -32,6 +32,7 @@ export interface ChargeCardPayload {
|
|
|
32
32
|
update_time: string | null;
|
|
33
33
|
invite_update_time?: string | null;
|
|
34
34
|
card_activation_attempt_history?: CardActivationAttemptHistoryPayload[];
|
|
35
|
+
provider_card_create_time?: string | null;
|
|
35
36
|
}
|
|
36
37
|
interface CardActivationAttemptHistoryPayload {
|
|
37
38
|
user_id: string;
|
|
@@ -45,6 +45,9 @@ const mapChargeCardPayloadToChargeCard = (payload) => {
|
|
|
45
45
|
? (0, zeniDayJS_1.date)(payload.create_time)
|
|
46
46
|
: undefined,
|
|
47
47
|
cardActivationAttemptHistory: toCardActivationAttemptHistory(payload.card_activation_attempt_history),
|
|
48
|
+
providerCardCreateTime: payload.provider_card_create_time != null
|
|
49
|
+
? (0, zeniDayJS_1.date)(payload.provider_card_create_time)
|
|
50
|
+
: undefined,
|
|
48
51
|
});
|
|
49
52
|
};
|
|
50
53
|
exports.mapChargeCardPayloadToChargeCard = mapChargeCardPayloadToChargeCard;
|
|
@@ -16,7 +16,7 @@ const approvalRuleState_1 = require("../../../../entity/approvalRule/approvalRul
|
|
|
16
16
|
const spendManagementFilterHelpers_1 = require("../../spendManagementFilterHelpers");
|
|
17
17
|
const helpers_1 = require("../../helpers");
|
|
18
18
|
const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, loggedInUserId) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
20
20
|
const { billListState, billTransactionState, billPayConfigState, entityApprovalStatusState, userState, recurringBillState, billsBulkActionViewState, } = state;
|
|
21
21
|
const key = (0, billListState_1.getBillListKey)(currentTimePeriod, billListState.currentTab);
|
|
22
22
|
const pendingApprovalKey = (0, billListState_1.getBillListKey)(currentTimePeriod, 'pending_approval');
|
|
@@ -161,7 +161,8 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, logge
|
|
|
161
161
|
)) === null || _o === void 0 ? void 0 : _o.isEnabled) !== null && _p !== void 0 ? _p : false;
|
|
162
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
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
|
|
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);
|
|
165
166
|
const loweredSearchText = billListState.searchText.trim().toLowerCase();
|
|
166
167
|
transactionsView = (0, exports.getBillListOnSort)(sortKey, sortOrder, billListState.currentTab, transactionsView.filter((transaction) => {
|
|
167
168
|
var _a, _b, _c;
|
|
@@ -267,7 +268,7 @@ const getBillList = (state, currentTimePeriod, isBulkActionFeatureEnabled, logge
|
|
|
267
268
|
};
|
|
268
269
|
};
|
|
269
270
|
exports.getBillList = getBillList;
|
|
270
|
-
const getAllSubTabs = (selectedTab, isWireActive, isAchActive) => {
|
|
271
|
+
const getAllSubTabs = (selectedTab, isWireActive, isAchActive, isOfflinePaymentsActive) => {
|
|
271
272
|
switch (selectedTab) {
|
|
272
273
|
case 'draft':
|
|
273
274
|
return ['all', 'overdue'];
|
|
@@ -283,10 +284,10 @@ const getAllSubTabs = (selectedTab, isWireActive, isAchActive) => {
|
|
|
283
284
|
case 'scheduled':
|
|
284
285
|
return ['all', 'failed', 'cancelled', 'deleted'];
|
|
285
286
|
case 'paid':
|
|
286
|
-
return getAllPaidSubTabs(isWireActive, isAchActive);
|
|
287
|
+
return getAllPaidSubTabs(isWireActive, isAchActive, isOfflinePaymentsActive);
|
|
287
288
|
}
|
|
288
289
|
};
|
|
289
|
-
const getAllPaidSubTabs = (isWireActive, isAchActive) => {
|
|
290
|
+
const getAllPaidSubTabs = (isWireActive, isAchActive, isOfflinePaymentsActive) => {
|
|
290
291
|
let paidSubTabs = [];
|
|
291
292
|
if (isAchActive) {
|
|
292
293
|
paidSubTabs.push('ach');
|
|
@@ -294,8 +295,11 @@ const getAllPaidSubTabs = (isWireActive, isAchActive) => {
|
|
|
294
295
|
if (isWireActive) {
|
|
295
296
|
paidSubTabs.push('wire');
|
|
296
297
|
}
|
|
298
|
+
if (isOfflinePaymentsActive) {
|
|
299
|
+
paidSubTabs.push('offline');
|
|
300
|
+
}
|
|
297
301
|
if (paidSubTabs.length > 0) {
|
|
298
|
-
paidSubTabs = ['all', ...paidSubTabs, '
|
|
302
|
+
paidSubTabs = ['all', ...paidSubTabs, 'deleted'];
|
|
299
303
|
}
|
|
300
304
|
return paidSubTabs;
|
|
301
305
|
};
|
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.18",
|
|
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",
|