@zeniai/client-epic-state 4.19.19 → 4.19.20-beta0ND
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/company/companyPayload.d.ts +2 -0
- package/lib/entity/company/companyPayload.js +3 -1
- package/lib/entity/company/companyStateTypes.d.ts +2 -0
- package/lib/entity/tenant/tenantSelector.d.ts +1 -1
- package/lib/entity/tenant/tenantSelector.js +6 -4
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/dashboard/dashboardSelector.js +1 -1
- package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +4 -4
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.d.ts +2 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +2 -2
- package/lib/view/settingsView/settingsViewHelpers.d.ts +4 -4
- package/lib/view/settingsView/settingsViewHelpers.js +9 -8
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +1 -1
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
70
70
|
cardsToRemove.add('card_balance');
|
|
71
71
|
isZeniPromoCardOn4thPosition = false;
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
if (isChargeCardEnabled || creditAccountLimit === -1) {
|
|
74
74
|
cardsToRemove.add('zeni_promo_card');
|
|
75
75
|
isZeniPromoCardOn4thPosition = false;
|
|
76
76
|
}
|
package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js
CHANGED
|
@@ -13,7 +13,7 @@ const addressViewReducer_1 = require("../../../addressView/addressViewReducer");
|
|
|
13
13
|
const onboardingCockpitViewReducer_1 = require("../onboardingCockpitViewReducer");
|
|
14
14
|
const initializeOnboardingCustomerViewUpdateDataEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(onboardingCockpitViewReducer_1.initializeOnboardingCustomerViewUpdateData.match), (0, operators_1.mergeMap)((action) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
|
-
const { companyId } = action.payload;
|
|
16
|
+
const { isDebitCardFlagEnabled, companyId } = action.payload;
|
|
17
17
|
const fetchActions = [];
|
|
18
18
|
if (companyId != null) {
|
|
19
19
|
const onboardingCustomerInfo = (0, onboardingCustomerSelector_1.getOnboardingCustomersByCompanyId)(state$.value.onboardingCustomerState, companyId);
|
|
@@ -57,7 +57,7 @@ const initializeOnboardingCustomerViewUpdateDataEpic = (actions$, state$) => act
|
|
|
57
57
|
accountingConnectionCreationMode: ((_b = company.company.companyOnboardingInfo.onboardingInfo) === null || _b === void 0 ? void 0 : _b.accountingConnectionCreationMode) != null
|
|
58
58
|
? (0, companyStateTypes_1.toAccountingConnectionCreationModeStrict)((_c = company.company.companyOnboardingInfo.onboardingInfo) === null || _c === void 0 ? void 0 : _c.accountingConnectionCreationMode)
|
|
59
59
|
: undefined,
|
|
60
|
-
selectedProducts: getSelectedProducts(tenant),
|
|
60
|
+
selectedProducts: getSelectedProducts(isDebitCardFlagEnabled, tenant),
|
|
61
61
|
};
|
|
62
62
|
if (onboardingCustomerId != null) {
|
|
63
63
|
const onboardingCustomerDetails = (0, userSelector_1.getUserByUserId)(state$.value.userState, onboardingCustomerId);
|
|
@@ -106,11 +106,11 @@ const initializeOnboardingCustomerViewUpdateDataEpic = (actions$, state$) => act
|
|
|
106
106
|
return (0, rxjs_1.from)(fetchActions);
|
|
107
107
|
}));
|
|
108
108
|
exports.initializeOnboardingCustomerViewUpdateDataEpic = initializeOnboardingCustomerViewUpdateDataEpic;
|
|
109
|
-
const getSelectedProducts = (tenant) => {
|
|
109
|
+
const getSelectedProducts = (isDebitCardFlagEnabled, tenant) => {
|
|
110
110
|
if (tenant == null) {
|
|
111
111
|
return [];
|
|
112
112
|
}
|
|
113
|
-
const isBankingOnly = (0, tenantSelector_1.isTenantBankingOnly)(tenant);
|
|
113
|
+
const isBankingOnly = (0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, tenant);
|
|
114
114
|
const isBookkeepingEnabled = (0, tenantSelector_1.isTenantBookkeepingEnabled)(tenant);
|
|
115
115
|
const isOtherProductsEnabled = (0, tenantSelector_1.isOtherProductsEnabledForTenant)(tenant);
|
|
116
116
|
const isCardsEnabled = (0, tenantSelector_1.isTenantCardsOnly)(tenant);
|
|
@@ -30,7 +30,8 @@ export declare const fetchCompanyOnboardingView: import("@reduxjs/toolkit").Acti
|
|
|
30
30
|
onboardingEmailGroup: OnboardingEmailGroupPayload;
|
|
31
31
|
}, "onboardingCockpitView/updateOnboardingEmailGroupOnSuccess", never, never>, updateOnboardingEmailGroupOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], {
|
|
32
32
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
33
|
-
}, "onboardingCockpitView/updateOnboardingEmailGroupOnFailure", never, never>, initializeOnboardingCustomerViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId?: string | undefined], {
|
|
33
|
+
}, "onboardingCockpitView/updateOnboardingEmailGroupOnFailure", never, never>, initializeOnboardingCustomerViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isDebitCardFlagEnabled: boolean, companyId?: string | undefined], {
|
|
34
|
+
isDebitCardFlagEnabled: boolean;
|
|
34
35
|
companyId: string | undefined;
|
|
35
36
|
}, "onboardingCockpitView/initializeOnboardingCustomerViewUpdateData", never, never>, saveOnboardingCustomerViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newOnboardingCustomer: Partial<NewOnboardingCustomer>], {
|
|
36
37
|
newOnboardingCustomer: Partial<NewOnboardingCustomer>;
|
|
@@ -130,8 +130,8 @@ const onboardingCockpitView = (0, toolkit_1.createSlice)({
|
|
|
130
130
|
reducer(draft) {
|
|
131
131
|
draft.customerLocalStoreInitState = 'In-Progress';
|
|
132
132
|
},
|
|
133
|
-
prepare(companyId) {
|
|
134
|
-
return { payload: { companyId } };
|
|
133
|
+
prepare(isDebitCardFlagEnabled, companyId) {
|
|
134
|
+
return { payload: { isDebitCardFlagEnabled, companyId } };
|
|
135
135
|
},
|
|
136
136
|
},
|
|
137
137
|
saveOnboardingCustomerViewUpdateData: {
|
|
@@ -2,16 +2,16 @@ import { CurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
|
2
2
|
import { LoggedInUser } from '../../entity/tenant/tenantState';
|
|
3
3
|
import { RoleMap, UserRoleType } from '../../entity/userRole/userRoleType';
|
|
4
4
|
import { MonthEndInsightsNotificationSettingsData, NotificationSettingsData, ReminderNotificationSettingsData } from './settingsViewState';
|
|
5
|
-
export declare const isAccountingTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
6
|
-
export declare const isApprovalRulesTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
5
|
+
export declare const isAccountingTabVisible: (userRole: UserRoleType[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
6
|
+
export declare const isApprovalRulesTabVisible: (userRole: UserRoleType[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
7
7
|
export declare const isBillingTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined) => boolean;
|
|
8
8
|
export declare const isBankConnectionsTabVisible: (currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
9
9
|
export declare const isBusinessVerificationTabVisible: (currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
10
10
|
export declare const isCompanyDetailsTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
11
|
-
export declare const isIntegrationsTabVisible: (userRole: UserRoleType[], currentTenant: CurrentTenant | undefined) => boolean;
|
|
11
|
+
export declare const isIntegrationsTabVisible: (userRole: UserRoleType[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined) => boolean;
|
|
12
12
|
export declare const isSettingsVisible: (currentTenant: CurrentTenant | undefined) => boolean;
|
|
13
13
|
export declare const isMyBankConnectionsTabVisible: (currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
|
|
14
14
|
export declare const isPerformanceTabVisible: (userRole: UserRoleType[], loggedInUser?: LoggedInUser) => boolean;
|
|
15
15
|
export declare const isRemindersSectionVisibleOnSettingsPage: (reminderNotificationSettings: ReminderNotificationSettingsData) => boolean;
|
|
16
16
|
export declare const isMonthEndNotificationsSectionVisibleOnSettingsPage: (monthEndInsightsNotificationSettings: MonthEndInsightsNotificationSettingsData, signedInUseEmail: string) => boolean;
|
|
17
|
-
export declare const isNotificationsTabVisible: (notificationSettings: NotificationSettingsData, signedInUseEmail: string, currentTenant: CurrentTenant | undefined) => boolean;
|
|
17
|
+
export declare const isNotificationsTabVisible: (notificationSettings: NotificationSettingsData, signedInUseEmail: string, isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined) => boolean;
|
|
@@ -4,7 +4,7 @@ exports.isNotificationsTabVisible = exports.isMonthEndNotificationsSectionVisibl
|
|
|
4
4
|
const tenantSelector_1 = require("../../entity/tenant/tenantSelector");
|
|
5
5
|
const userRoleType_1 = require("../../entity/userRole/userRoleType");
|
|
6
6
|
const vendorListSelector_1 = require("../vendorList/vendorListSelector");
|
|
7
|
-
const isAccountingTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
7
|
+
const isAccountingTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant, userRoleMap) => {
|
|
8
8
|
if (currentTenant == null) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
@@ -13,7 +13,7 @@ const isAccountingTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
|
13
13
|
(0, userRoleType_1.hasBillPayAccessible)(currentTenant, userRoleMap) ||
|
|
14
14
|
(0, userRoleType_1.hasReimbursementAccessible)(currentTenant, userRoleMap) ||
|
|
15
15
|
(0, userRoleType_1.hasFullOrAdminLevelAccess)(userRole)) &&
|
|
16
|
-
(0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
|
|
16
|
+
(0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) === false &&
|
|
17
17
|
(0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
@@ -21,7 +21,7 @@ const isAccountingTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
exports.isAccountingTabVisible = isAccountingTabVisible;
|
|
24
|
-
const isApprovalRulesTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
24
|
+
const isApprovalRulesTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant, userRoleMap) => {
|
|
25
25
|
var _a, _b;
|
|
26
26
|
if (currentTenant == null || userRoleMap == null) {
|
|
27
27
|
return false;
|
|
@@ -33,7 +33,7 @@ const isApprovalRulesTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
|
33
33
|
(0, userRoleType_1.hasReimbursementAccessible)(currentTenant, userRoleMap) ||
|
|
34
34
|
((isBillPayTOSAccepted || isReimbursementTOSAccepted) &&
|
|
35
35
|
(0, userRoleType_1.hasFullOrAdminLevelAccess)(userRole))) &&
|
|
36
|
-
(0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
|
|
36
|
+
(0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) === false &&
|
|
37
37
|
(0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
|
|
38
38
|
}
|
|
39
39
|
else {
|
|
@@ -97,13 +97,14 @@ const isCompanyDetailsTabVisible = (userRole, currentTenant, userRoleMap) => {
|
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
exports.isCompanyDetailsTabVisible = isCompanyDetailsTabVisible;
|
|
100
|
-
const isIntegrationsTabVisible = (userRole, currentTenant) => {
|
|
100
|
+
const isIntegrationsTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant) => {
|
|
101
101
|
if (currentTenant == null) {
|
|
102
102
|
return false;
|
|
103
103
|
}
|
|
104
104
|
if ((0, exports.isSettingsVisible)(currentTenant)) {
|
|
105
105
|
return ((0, userRoleType_1.hasFullOrAdminLevelAccess)(userRole) &&
|
|
106
|
-
!((0, tenantSelector_1.isTenantBankingOnly)(currentTenant) ||
|
|
106
|
+
!((0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) ||
|
|
107
|
+
(0, tenantSelector_1.isTenantCardsOnly)(currentTenant)));
|
|
107
108
|
}
|
|
108
109
|
else {
|
|
109
110
|
return false;
|
|
@@ -155,14 +156,14 @@ const isMonthEndNotificationsSectionVisibleOnSettingsPage = (monthEndInsightsNot
|
|
|
155
156
|
monthEndInsightsNotificationSettings.recipientEmailIds.includes(signedInUseEmail));
|
|
156
157
|
};
|
|
157
158
|
exports.isMonthEndNotificationsSectionVisibleOnSettingsPage = isMonthEndNotificationsSectionVisibleOnSettingsPage;
|
|
158
|
-
const isNotificationsTabVisible = (notificationSettings, signedInUseEmail, currentTenant) => {
|
|
159
|
+
const isNotificationsTabVisible = (notificationSettings, signedInUseEmail, isDebitCardFlagEnabled, currentTenant) => {
|
|
159
160
|
if (currentTenant == null) {
|
|
160
161
|
return false;
|
|
161
162
|
}
|
|
162
163
|
const { reminderNotificationSettings, monthEndInsightsNotificationSettings } = notificationSettings;
|
|
163
164
|
return (((0, exports.isRemindersSectionVisibleOnSettingsPage)(reminderNotificationSettings) ||
|
|
164
165
|
(0, exports.isMonthEndNotificationsSectionVisibleOnSettingsPage)(monthEndInsightsNotificationSettings, signedInUseEmail)) &&
|
|
165
|
-
(0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
|
|
166
|
+
(0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) === false &&
|
|
166
167
|
(0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
|
|
167
168
|
};
|
|
168
169
|
exports.isNotificationsTabVisible = isNotificationsTabVisible;
|
|
@@ -110,7 +110,7 @@ const getBillDetailView = (state, billId) => {
|
|
|
110
110
|
const previousBillsView = (0, previousBillsSelector_1.getPreviousBills)(state, (_e = (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : '');
|
|
111
111
|
//don't include current bill
|
|
112
112
|
previousBills = Object.assign(Object.assign({}, previousBillsView), { bills: previousBillsView.bills.filter((bill) => bill.id !== billId) });
|
|
113
|
-
fetchState = (0, reduceFetchState_1.reduceFetchState)([billTransactionDetails
|
|
113
|
+
fetchState = (0, reduceFetchState_1.reduceFetchState)([billTransactionDetails]);
|
|
114
114
|
}
|
|
115
115
|
const realTimeApprovalkey = (0, realTimeApprovalState_1.getEntityRealTimeApprovalDetailKey)(billId, 'bill_pay');
|
|
116
116
|
const { approverIds, attributes } = approverListState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.20-beta0ND",
|
|
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",
|