@zeniai/client-epic-state 4.11.52 → 4.11.53

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.
@@ -3,7 +3,7 @@ import { FetchStateAndError, ID } from '../../commonStateTypes/common';
3
3
  import { MyBankConnectionsView, BankConnectionsSetupView, MyProfileSelectorView, NotificationSettingsSelectorView, IntegrationsView, BillingView } from './types/settingsViewSelectorTypes';
4
4
  import { NotificationSettings } from './settingsViewState';
5
5
  export declare function getApprovalRuleViewDetails(state: RootState): FetchStateAndError;
6
- export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID, isAccountEnabled: boolean, isCardEnabled: boolean): BankConnectionsSetupView;
6
+ export declare function getBankConnectionsSetupViewDetails(state: RootState, companyId: ID, isBillPayEnabled: boolean, isRemiEnabled: boolean, isAccountEnabled: boolean, isCardEnabled: boolean): BankConnectionsSetupView;
7
7
  export declare function getBillingAccountsViewDetails(state: RootState, companyId: ID): BillingView;
8
8
  export declare function getMyBankConnectionsDetails(state: RootState, userId: ID): MyBankConnectionsView;
9
9
  export declare function getIntegrationsView(state: RootState, companyId: ID): IntegrationsView;
@@ -33,7 +33,7 @@ function getApprovalRuleViewDetails(state) {
33
33
  };
34
34
  }
35
35
  exports.getApprovalRuleViewDetails = getApprovalRuleViewDetails;
36
- function getBankConnectionsSetupViewDetails(state, companyId, isAccountEnabled, isCardEnabled) {
36
+ function getBankConnectionsSetupViewDetails(state, companyId, isBillPayEnabled, isRemiEnabled, isAccountEnabled, isCardEnabled) {
37
37
  var _a, _b, _c, _d, _e, _f;
38
38
  const { accountState, settingsViewState, paymentAccountState, depositAccountState, depositAccountListState, paymentAccountListState, } = state;
39
39
  const { bankConnection } = settingsViewState;
@@ -58,10 +58,13 @@ function getBankConnectionsSetupViewDetails(state, companyId, isAccountEnabled,
58
58
  const allFundingAccounts = fetchState.fetchState === 'Completed'
59
59
  ? (0, setupViewSelector_1.getAllFundingAccounts)(depositAccounts, paymentAccounts, false)
60
60
  : [];
61
- const primaryAccountsProductWise = [
62
- Object.assign({ productType: 'bill_pay' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'bill_pay_setup')),
63
- Object.assign({ productType: 'reimbursement' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'reimbursement', 'reimbursement_setup')),
64
- ];
61
+ const primaryAccountsProductWise = [];
62
+ if (isBillPayEnabled) {
63
+ primaryAccountsProductWise.push(Object.assign({ productType: 'bill_pay' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'bill_pay', 'bill_pay_setup')));
64
+ }
65
+ if (isRemiEnabled) {
66
+ primaryAccountsProductWise.push(Object.assign({ productType: 'reimbursement' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'reimbursement', 'reimbursement_setup')));
67
+ }
65
68
  if (isAccountEnabled) {
66
69
  primaryAccountsProductWise.push(Object.assign({ productType: 'zeni_accounts' }, (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'zeni_accounts', 'account_setup')));
67
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.52",
3
+ "version": "4.11.53",
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",