@zeniai/client-epic-state 5.1.15 → 5.1.16

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.
@@ -42,7 +42,7 @@ const tenantSelector = createSelector(getTenantsByCheckInDateSelector, getCurren
42
42
  export const getDashboard = createSelector(tenantSelector, getCardBalance, getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, getInsights, getCompanyPassportView, getTasksCardReport, getBillPayCardReport, getReimbursementCardReport, apAgingSelector, arAgingSelector, getZeniAccountsPromoCard, getRewardsPlanCard, getDashboardCardsOrdered, (state) => {
43
43
  const currentTenant = getCurrentTenant(state);
44
44
  return getMonthEndCloseChecksViewByTenantId(state, currentTenant.tenantId);
45
- }, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isTreasuryFeatureEnabled) => isTreasuryFeatureEnabled, (state) => state.dashboardState.isTreasuryVideoClosed, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryFeatureEnabled, isTreasuryVideoClosed) => {
45
+ }, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (state) => state.dashboardState.isTreasuryVideoClosed, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryVideoClosed) => {
46
46
  const isReimbursementFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
47
47
  .isReimbursementFeatureEnabled;
48
48
  const isBillPayFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
@@ -153,23 +153,10 @@ export const getDashboard = createSelector(tenantSelector, getCardBalance, getCa
153
153
  cardsToRemove.add('bill_pay_card');
154
154
  cardsToRemove.add('reimbursement_card');
155
155
  }
156
- const showZeniAccountsPromoCard = zeniAccountsPromoCard.isShowDepositAccountsPromo === true;
157
- if (showZeniAccountsPromoCard) {
158
- cardsToRemove.add('bill_pay_promo_card');
159
- cardsToRemove.add('reimbursement_promo_card');
160
- }
161
- else {
162
- cardsToRemove.add('zeni_accounts_promo_card');
163
- }
164
- // remove treasury promo card if its already enabled
165
- const isTreasuryTOSAccepted = tenants.currentTenant.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;
166
- if (isTreasuryTOSAccepted === true || isTreasuryFeatureEnabled === false) {
167
- cardsToRemove.add('treasury_promo_card');
168
- }
169
- // More than one promo card can't be shown on the dashboard (priority: Treasury > Accounts > Bill > Remi).
156
+ cardsToRemove.add('zeni_accounts_promo_card');
157
+ cardsToRemove.add('treasury_promo_card');
158
+ // More than one promo card can't be shown on the dashboard (priority: Bill > Remi).
170
159
  const PROMO_CARD_PRIORITY_ORDER = [
171
- 'treasury_promo_card',
172
- 'zeni_accounts_promo_card',
173
160
  'bill_pay_promo_card',
174
161
  'reimbursement_promo_card',
175
162
  ];
@@ -12,4 +12,4 @@ export interface DashboardReport extends SelectorReport {
12
12
  currentTenant?: Tenant;
13
13
  }
14
14
  export declare const getDashboard: (state: RootState, additionalExcludedReports: ReportID[], // used when reports are excluded through statsig
15
- signedInUser: LoggedInUser | undefined, isExpenseAutomationFeatureEnabledV2: boolean, isExpenseAutomationFeatureEnabled: boolean, isTreasuryFeatureEnabled: boolean) => DashboardReport;
15
+ signedInUser: LoggedInUser | undefined, isExpenseAutomationFeatureEnabledV2: boolean, isExpenseAutomationFeatureEnabled: boolean) => DashboardReport;
@@ -45,7 +45,7 @@ const tenantSelector = (0, toolkit_1.createSelector)(tenantSelector_1.getTenants
45
45
  exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard, referralSelector_1.getRewardsPlanCard, dashboardLayoutSelector_1.getDashboardCardsOrdered, (state) => {
46
46
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
47
47
  return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
48
- }, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isTreasuryFeatureEnabled) => isTreasuryFeatureEnabled, (state) => state.dashboardState.isTreasuryVideoClosed, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryFeatureEnabled, isTreasuryVideoClosed) => {
48
+ }, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (state) => state.dashboardState.isTreasuryVideoClosed, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryVideoClosed) => {
49
49
  const isReimbursementFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
50
50
  .isReimbursementFeatureEnabled;
51
51
  const isBillPayFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
@@ -156,23 +156,10 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
156
156
  cardsToRemove.add('bill_pay_card');
157
157
  cardsToRemove.add('reimbursement_card');
158
158
  }
159
- const showZeniAccountsPromoCard = zeniAccountsPromoCard.isShowDepositAccountsPromo === true;
160
- if (showZeniAccountsPromoCard) {
161
- cardsToRemove.add('bill_pay_promo_card');
162
- cardsToRemove.add('reimbursement_promo_card');
163
- }
164
- else {
165
- cardsToRemove.add('zeni_accounts_promo_card');
166
- }
167
- // remove treasury promo card if its already enabled
168
- const isTreasuryTOSAccepted = tenants.currentTenant.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;
169
- if (isTreasuryTOSAccepted === true || isTreasuryFeatureEnabled === false) {
170
- cardsToRemove.add('treasury_promo_card');
171
- }
172
- // More than one promo card can't be shown on the dashboard (priority: Treasury > Accounts > Bill > Remi).
159
+ cardsToRemove.add('zeni_accounts_promo_card');
160
+ cardsToRemove.add('treasury_promo_card');
161
+ // More than one promo card can't be shown on the dashboard (priority: Bill > Remi).
173
162
  const PROMO_CARD_PRIORITY_ORDER = [
174
- 'treasury_promo_card',
175
- 'zeni_accounts_promo_card',
176
163
  'bill_pay_promo_card',
177
164
  'reimbursement_promo_card',
178
165
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.15",
3
+ "version": "5.1.16",
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
  "module": "lib/esm/index.js",