@zeniai/client-epic-state 4.19.17-betaRR1 → 4.19.17

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.
@@ -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
- if (isChargeCardEnabled || creditAccountLimit === -1) {
73
+ else if (isChargeCardEnabled || creditAccountLimit === -1) {
74
74
  cardsToRemove.add('zeni_promo_card');
75
75
  isZeniPromoCardOn4thPosition = false;
76
76
  }
@@ -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 { isDebitCardFlagEnabled, companyId } = action.payload;
16
+ const { 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(isDebitCardFlagEnabled, tenant),
60
+ selectedProducts: getSelectedProducts(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 = (isDebitCardFlagEnabled, tenant) => {
109
+ const getSelectedProducts = (tenant) => {
110
110
  if (tenant == null) {
111
111
  return [];
112
112
  }
113
- const isBankingOnly = (0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, tenant);
113
+ const isBankingOnly = (0, tenantSelector_1.isTenantBankingOnly)(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,8 +30,7 @@ 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<[isDebitCardFlagEnabled: boolean, companyId?: string | undefined], {
34
- isDebitCardFlagEnabled: boolean;
33
+ }, "onboardingCockpitView/updateOnboardingEmailGroupOnFailure", never, never>, initializeOnboardingCustomerViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId?: string | undefined], {
35
34
  companyId: string | undefined;
36
35
  }, "onboardingCockpitView/initializeOnboardingCustomerViewUpdateData", never, never>, saveOnboardingCustomerViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[newOnboardingCustomer: Partial<NewOnboardingCustomer>], {
37
36
  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(isDebitCardFlagEnabled, companyId) {
134
- return { payload: { isDebitCardFlagEnabled, companyId } };
133
+ prepare(companyId) {
134
+ return { payload: { 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[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
6
- export declare const isApprovalRulesTabVisible: (userRole: UserRoleType[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined, userRoleMap?: RoleMap) => boolean;
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;
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[], isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined) => boolean;
11
+ export declare const isIntegrationsTabVisible: (userRole: UserRoleType[], 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, isDebitCardFlagEnabled: boolean, currentTenant: CurrentTenant | undefined) => boolean;
17
+ export declare const isNotificationsTabVisible: (notificationSettings: NotificationSettingsData, signedInUseEmail: string, 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, isDebitCardFlagEnabled, currentTenant, userRoleMap) => {
7
+ const isAccountingTabVisible = (userRole, currentTenant, userRoleMap) => {
8
8
  if (currentTenant == null) {
9
9
  return false;
10
10
  }
@@ -13,7 +13,7 @@ const isAccountingTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant,
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)(isDebitCardFlagEnabled, currentTenant) === false &&
16
+ (0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
17
17
  (0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
18
18
  }
19
19
  else {
@@ -21,7 +21,7 @@ const isAccountingTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant,
21
21
  }
22
22
  };
23
23
  exports.isAccountingTabVisible = isAccountingTabVisible;
24
- const isApprovalRulesTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant, userRoleMap) => {
24
+ const isApprovalRulesTabVisible = (userRole, 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, isDebitCardFlagEnabled, currentTena
33
33
  (0, userRoleType_1.hasReimbursementAccessible)(currentTenant, userRoleMap) ||
34
34
  ((isBillPayTOSAccepted || isReimbursementTOSAccepted) &&
35
35
  (0, userRoleType_1.hasFullOrAdminLevelAccess)(userRole))) &&
36
- (0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) === false &&
36
+ (0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
37
37
  (0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
38
38
  }
39
39
  else {
@@ -97,14 +97,13 @@ const isCompanyDetailsTabVisible = (userRole, currentTenant, userRoleMap) => {
97
97
  }
98
98
  };
99
99
  exports.isCompanyDetailsTabVisible = isCompanyDetailsTabVisible;
100
- const isIntegrationsTabVisible = (userRole, isDebitCardFlagEnabled, currentTenant) => {
100
+ const isIntegrationsTabVisible = (userRole, 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)(isDebitCardFlagEnabled, currentTenant) ||
107
- (0, tenantSelector_1.isTenantCardsOnly)(currentTenant)));
106
+ !((0, tenantSelector_1.isTenantBankingOnly)(currentTenant) || (0, tenantSelector_1.isTenantCardsOnly)(currentTenant)));
108
107
  }
109
108
  else {
110
109
  return false;
@@ -156,14 +155,14 @@ const isMonthEndNotificationsSectionVisibleOnSettingsPage = (monthEndInsightsNot
156
155
  monthEndInsightsNotificationSettings.recipientEmailIds.includes(signedInUseEmail));
157
156
  };
158
157
  exports.isMonthEndNotificationsSectionVisibleOnSettingsPage = isMonthEndNotificationsSectionVisibleOnSettingsPage;
159
- const isNotificationsTabVisible = (notificationSettings, signedInUseEmail, isDebitCardFlagEnabled, currentTenant) => {
158
+ const isNotificationsTabVisible = (notificationSettings, signedInUseEmail, currentTenant) => {
160
159
  if (currentTenant == null) {
161
160
  return false;
162
161
  }
163
162
  const { reminderNotificationSettings, monthEndInsightsNotificationSettings } = notificationSettings;
164
163
  return (((0, exports.isRemindersSectionVisibleOnSettingsPage)(reminderNotificationSettings) ||
165
164
  (0, exports.isMonthEndNotificationsSectionVisibleOnSettingsPage)(monthEndInsightsNotificationSettings, signedInUseEmail)) &&
166
- (0, tenantSelector_1.isTenantBankingOnly)(isDebitCardFlagEnabled, currentTenant) === false &&
165
+ (0, tenantSelector_1.isTenantBankingOnly)(currentTenant) === false &&
167
166
  (0, tenantSelector_1.isTenantCardsOnly)(currentTenant) === false);
168
167
  };
169
168
  exports.isNotificationsTabVisible = isNotificationsTabVisible;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.17-betaRR1",
3
+ "version": "4.19.17",
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",