@zeniai/client-epic-state 4.17.94 → 4.17.95

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.
Files changed (56) hide show
  1. package/lib/commonStateTypes/accountView/getNestedAccountIDHierarchyForReport.js +2 -0
  2. package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +1 -0
  3. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  5. package/lib/entity/account/accountPayload.d.ts +1 -0
  6. package/lib/entity/account/accountPayload.js +2 -1
  7. package/lib/entity/account/accountSelector.d.ts +3 -0
  8. package/lib/entity/account/accountSelector.js +2 -0
  9. package/lib/entity/account/accountState.d.ts +2 -1
  10. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  11. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  12. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  13. package/lib/entity/class/classReducer.d.ts +4 -4
  14. package/lib/entity/class/classState.d.ts +1 -1
  15. package/lib/entity/company/companyPayload.d.ts +1 -0
  16. package/lib/entity/company/companyPayload.js +5 -4
  17. package/lib/entity/company/companyStateTypes.d.ts +1 -0
  18. package/lib/entity/forecast/forecastState.d.ts +1 -1
  19. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  20. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  21. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  22. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  23. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  24. package/lib/entity/tenant/epic/doMagicLinkSignInEpic.js +1 -1
  25. package/lib/entity/tenant/tenantReducer.d.ts +1 -1
  26. package/lib/entity/userRole/userRoleType.d.ts +1 -0
  27. package/lib/entity/userRole/userRoleType.js +16 -1
  28. package/lib/epic.d.ts +2 -1
  29. package/lib/epic.js +2 -1
  30. package/lib/index.d.ts +4 -4
  31. package/lib/index.js +28 -26
  32. package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +29 -0
  33. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +1 -0
  34. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +2 -0
  35. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  36. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  37. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  38. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  39. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  40. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  41. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  42. package/lib/view/dashboard/dashboardSelector.js +11 -8
  43. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +7 -2
  44. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  45. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  46. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  47. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +3 -1
  48. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +31 -2
  49. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.d.ts +2 -1
  50. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +3 -2
  51. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewState.d.ts +1 -0
  52. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.d.ts +11 -0
  53. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.js +48 -0
  54. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  55. package/lib/view/topEx/topExSelector.d.ts +1 -1
  56. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getCashBalance: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -21,6 +21,7 @@ export declare const getCashBalance: (state: RootState) => {
21
21
  classesViewParentId: import("../../commonStateTypes/classesView/nestedClassID").ClassesViewParentID | undefined;
22
22
  accountsViewParentId: import("../../commonStateTypes/accountView/nestedAccountID").AccountsViewParentID | undefined;
23
23
  labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
24
+ isDeleted: boolean;
24
25
  }[];
25
26
  balance: import("../..").Balance | undefined;
26
27
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
@@ -15,7 +15,7 @@ export declare const getCashInCashOut: (accountState: AccountState, accountGroup
15
15
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
16
16
  dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
17
17
  availableNumberOfPeriods: number | undefined;
18
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
18
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
19
19
  reportTitle: string;
20
20
  version: string | number | undefined;
21
21
  status: import("../..").Status | undefined;
@@ -12,7 +12,7 @@ export declare const getCashPosition: (accountState: AccountState, cashPositionS
12
12
  firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
13
13
  dataAvailable: import("../../commonStateTypes/timeframeTick").TimeframeTick | undefined;
14
14
  availableNumberOfPeriods: number | undefined;
15
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
15
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
16
16
  reportTitle: string;
17
17
  version: string | number | undefined;
18
18
  status: import("../..").Status | undefined;
@@ -1,12 +1,12 @@
1
1
  import { DashboardState } from './dashboardState';
2
2
  export declare const initialState: DashboardState;
3
- export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation")[] | undefined], {
3
+ export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[userId: string, companyId: string, tenantId: string, fetchFullReport?: any, cacheOverride?: any, excludeResources?: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card")[] | undefined], {
4
4
  userId: string;
5
5
  companyId: string;
6
6
  tenantId: string;
7
7
  fetchFullReport: any;
8
8
  cacheOverride: any;
9
- excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation")[];
9
+ excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card")[];
10
10
  }, "dashboard/fetchDashboard", never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
11
11
  declare const _default: import("redux").Reducer<DashboardState>;
12
12
  export default _default;
@@ -46,7 +46,7 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
46
46
  const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
47
47
  return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
48
48
  }, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (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) => {
49
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
49
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
50
50
  const isReimbursementFeatureEnabled = (_a = tenants.currentTenant.company) === null || _a === void 0 ? void 0 : _a.featuresActivationInfo.isReimbursementFeatureEnabled;
51
51
  const isBillPayFeatureEnabled = (_b = tenants.currentTenant.company) === null || _b === void 0 ? void 0 : _b.featuresActivationInfo.isBillPayFeatureEnabled;
52
52
  const isAdmin = Boolean((_c = tenants.currentTenant) === null || _c === void 0 ? void 0 : _c.userRole) === true
@@ -59,19 +59,22 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
59
59
  const hasTasksCardAccess = ((_k = (_j = (_h = tenants.currentTenant) === null || _h === void 0 ? void 0 : _h.excludedResources) === null || _j === void 0 ? void 0 : _j.resources) === null || _k === void 0 ? void 0 : _k.find((resource) => resource.resource === '/reports/task_card')) == null;
60
60
  let cardsCopy = [...cards];
61
61
  const cardsToRemove = new Set();
62
+ const chargeCardInfo = (_l = tenants.currentTenant.companyChargeCardInfo) === null || _l === void 0 ? void 0 : _l.info;
62
63
  if (cardBalance != null &&
63
64
  cardBalance.fetchState === 'Completed' &&
64
65
  (cardBalance.accountsInOrder.length === 0 ||
65
- ((_l = cardBalance.status) === null || _l === void 0 ? void 0 : _l.code) !== 200)) {
66
+ ((_m = cardBalance.status) === null || _m === void 0 ? void 0 : _m.code) !== 200)) {
66
67
  cardsToRemove.add('card_balance');
67
68
  }
68
- else {
69
+ if ((chargeCardInfo === null || chargeCardInfo === void 0 ? void 0 : chargeCardInfo.isChargeCardEnabled) === true ||
70
+ (chargeCardInfo === null || chargeCardInfo === void 0 ? void 0 : chargeCardInfo.chargeCardsCreditAccountLimit) === -1 ||
71
+ (chargeCardInfo === null || chargeCardInfo === void 0 ? void 0 : chargeCardInfo.isChargeCardTOSAccepted) === true) {
69
72
  cardsToRemove.add('zeni_promo_card');
70
73
  }
71
74
  if (hasTopExAccess === false) {
72
75
  cardsToRemove.add('top_expenses');
73
76
  }
74
- const connectionName = (_p = (_o = (_m = tenants.currentTenant) === null || _m === void 0 ? void 0 : _m.externalConnections) === null || _o === void 0 ? void 0 : _o.accounting[0]) === null || _p === void 0 ? void 0 : _p.connectionName;
77
+ const connectionName = (_q = (_p = (_o = tenants.currentTenant) === null || _o === void 0 ? void 0 : _o.externalConnections) === null || _p === void 0 ? void 0 : _p.accounting[0]) === null || _q === void 0 ? void 0 : _q.connectionName;
75
78
  if (connectionName === 'netsuite') {
76
79
  cardsToRemove.add('cash_in_cash_out');
77
80
  }
@@ -91,10 +94,10 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
91
94
  isEmptyTaskCardForExpenseAutomation) {
92
95
  cardsToRemove.add('task_card');
93
96
  }
94
- const isBankerOrInvestor = ((_q = tenants.currentTenant) === null || _q === void 0 ? void 0 : _q.userRole) != null &&
95
- (0, userRoleType_1.hasInvestorBankerLevelAccess)((_r = tenants.currentTenant) === null || _r === void 0 ? void 0 : _r.userRole);
96
- const hasBillPayAccess = ((_t = (_s = tenants.currentTenant.excludedResources) === null || _s === void 0 ? void 0 : _s.resources) === null || _t === void 0 ? void 0 : _t.find((resource) => resource.resource === '/bills')) == null && !isBankerOrInvestor;
97
- const hasReimbursementAccess = ((_v = (_u = tenants.currentTenant.excludedResources) === null || _u === void 0 ? void 0 : _u.resources) === null || _v === void 0 ? void 0 : _v.find((resource) => resource.resource === '/reimbursements')) == null;
97
+ const isBankerOrInvestor = ((_r = tenants.currentTenant) === null || _r === void 0 ? void 0 : _r.userRole) != null &&
98
+ (0, userRoleType_1.hasInvestorBankerLevelAccess)((_s = tenants.currentTenant) === null || _s === void 0 ? void 0 : _s.userRole);
99
+ const hasBillPayAccess = ((_u = (_t = tenants.currentTenant.excludedResources) === null || _t === void 0 ? void 0 : _t.resources) === null || _u === void 0 ? void 0 : _u.find((resource) => resource.resource === '/bills')) == null && !isBankerOrInvestor;
100
+ const hasReimbursementAccess = ((_w = (_v = tenants.currentTenant.excludedResources) === null || _v === void 0 ? void 0 : _v.resources) === null || _w === void 0 ? void 0 : _w.find((resource) => resource.resource === '/reimbursements')) == null;
98
101
  //fix for https://app.clickup.com/t/10555925/POD2-2832
99
102
  if (hasBillPayAccess &&
100
103
  hasReimbursementAccess &&
@@ -32,6 +32,8 @@ const toTransactionDetailLocalData = (transaction, selectedTab, lineItemsByTrans
32
32
  logo: transaction.logo,
33
33
  }
34
34
  : undefined;
35
+ transactionLocal.vendorUpdates = undefined;
36
+ transactionLocal.customerUpdates = undefined;
35
37
  if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
36
38
  if (transaction.vendorId != null && transaction.vendorName != null) {
37
39
  transactionLocal.selectedEntity = {
@@ -76,14 +78,17 @@ const toTransactionDetailLocalData = (transaction, selectedTab, lineItemsByTrans
76
78
  name: vendor.name,
77
79
  logo: vendor.logo,
78
80
  };
81
+ transactionLocal.vendorUpdates = {
82
+ qboId: vendorId,
83
+ id: vendorId,
84
+ name: vendor.name,
85
+ };
79
86
  }
80
87
  else {
81
88
  transactionLocal.selectedEntity = undefined;
82
89
  }
83
90
  }
84
91
  }
85
- transactionLocal.vendorUpdates = undefined;
86
- transactionLocal.customerUpdates = undefined;
87
92
  transactionLocal.lineItemById =
88
93
  transaction.lines != null && transaction.lines.length > 0
89
94
  ? buildLineItemById(transaction, uncategorizedIncomeExpense, transaction.recommendationsWithCOT)
@@ -17,7 +17,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
17
17
  firstMonthOfFY: Month;
18
18
  maxNumOfPeriodsToHighlight: number;
19
19
  thisPeriod: TimeframeTick;
20
- }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
+ }, "financeStatement/updateFinanceStatementThisPeriod">, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, "financeStatement/updateCOABalancesRange">, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card", "financeStatement/updateSelectedReportId">, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
21
  additionalBalances: COABalanceType[];
22
22
  coaBalances: COABalance[];
23
23
  firstMonthOfFY: Month;
@@ -3,9 +3,9 @@ import { ZeniAPIStatus } from '../../responsePayload';
3
3
  import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
4
4
  import { GlobalMerchantViewState, GlobalRecommendationFetchSource, NewGlobalMerchantCurrentSelection } from './globalMerchantViewState';
5
5
  export declare const initialState: GlobalMerchantViewState;
6
- export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | undefined], {
6
+ export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | undefined], {
7
7
  merchantId: string | undefined;
8
- context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | undefined;
8
+ context: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | undefined;
9
9
  }, "globalMerchantView/createGlobalMerchant", never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
10
  merchantId: ID;
11
11
  }, "globalMerchantView/createGlobalMerchantSuccess">, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getReimbursementCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;
@@ -13,6 +13,8 @@ export declare const fetchChargeCardSetupView: import("@reduxjs/toolkit").Action
13
13
  enableChargeCard: boolean;
14
14
  chargeCardSetupViewType: "charge_cards" | "debit_cards" | "charge_cards__debit_cards";
15
15
  isEarlyPayEnabled: boolean;
16
- }, "chargeCardSetupView/acceptChargeCardTerms", never, never>, acceptChargeCardTermsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/acceptChargeCardTermsSuccess">, acceptChargeCardTermsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/acceptChargeCardTermsFailure", never, never>, clearChargeCardSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/clearChargeCardSetupView">;
16
+ }, "chargeCardSetupView/acceptChargeCardTerms", never, never>, acceptChargeCardTermsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/acceptChargeCardTermsSuccess">, acceptChargeCardTermsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/acceptChargeCardTermsFailure", never, never>, expressInterestInChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string], {
17
+ companyId: string;
18
+ }, "chargeCardSetupView/expressInterestInChargeCard", never, never>, expressInterestInChargeCardSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/expressInterestInChargeCardSuccess">, expressInterestInChargeCardFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "chargeCardSetupView/expressInterestInChargeCardFailure">, clearChargeCardSetupView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"chargeCardSetupView/clearChargeCardSetupView">;
17
19
  declare const _default: import("redux").Reducer<ChargeCardSetupViewState>;
18
20
  export default _default;
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearChargeCardSetupView = exports.acceptChargeCardTermsFailure = exports.acceptChargeCardTermsSuccess = exports.acceptChargeCardTerms = exports.enableChargeCardAutoPayFailure = exports.enableChargeCardAutoPaySuccess = exports.enableChargeCardAutoPay = exports.fetchChargeCardSetupViewFailure = exports.fetchChargeCardSetupViewSuccess = exports.fetchChargeCardSetupView = exports.initialState = void 0;
4
+ exports.clearChargeCardSetupView = exports.expressInterestInChargeCardFailure = exports.expressInterestInChargeCardSuccess = exports.expressInterestInChargeCard = exports.acceptChargeCardTermsFailure = exports.acceptChargeCardTermsSuccess = exports.acceptChargeCardTerms = exports.enableChargeCardAutoPayFailure = exports.enableChargeCardAutoPaySuccess = exports.enableChargeCardAutoPay = exports.fetchChargeCardSetupViewFailure = exports.fetchChargeCardSetupViewSuccess = exports.fetchChargeCardSetupView = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  exports.initialState = {
7
7
  fetchState: 'Not-Started',
8
8
  error: undefined,
9
9
  isRefreshingViewInBackground: false,
10
+ expressInterestInChargeCardStatus: {
11
+ fetchState: 'Not-Started',
12
+ error: undefined,
13
+ },
10
14
  earlyPayFetchStatus: {
11
15
  fetchState: 'Not-Started',
12
16
  error: undefined,
@@ -117,10 +121,35 @@ const chargeCardSetupView = (0, toolkit_1.createSlice)({
117
121
  };
118
122
  },
119
123
  },
124
+ expressInterestInChargeCard: {
125
+ reducer(draft) {
126
+ draft.expressInterestInChargeCardStatus = {
127
+ fetchState: 'In-Progress',
128
+ error: undefined,
129
+ };
130
+ },
131
+ prepare(companyId) {
132
+ return {
133
+ payload: { companyId },
134
+ };
135
+ },
136
+ },
137
+ expressInterestInChargeCardSuccess(draft) {
138
+ draft.expressInterestInChargeCardStatus = {
139
+ fetchState: 'Completed',
140
+ error: undefined,
141
+ };
142
+ },
143
+ expressInterestInChargeCardFailure(draft, action) {
144
+ draft.expressInterestInChargeCardStatus = {
145
+ fetchState: 'Error',
146
+ error: action.payload,
147
+ };
148
+ },
120
149
  clearChargeCardSetupView(draft) {
121
150
  Object.assign(draft, exports.initialState);
122
151
  },
123
152
  },
124
153
  });
125
- _a = chargeCardSetupView.actions, exports.fetchChargeCardSetupView = _a.fetchChargeCardSetupView, exports.fetchChargeCardSetupViewSuccess = _a.fetchChargeCardSetupViewSuccess, exports.fetchChargeCardSetupViewFailure = _a.fetchChargeCardSetupViewFailure, exports.enableChargeCardAutoPay = _a.enableChargeCardAutoPay, exports.enableChargeCardAutoPaySuccess = _a.enableChargeCardAutoPaySuccess, exports.enableChargeCardAutoPayFailure = _a.enableChargeCardAutoPayFailure, exports.acceptChargeCardTerms = _a.acceptChargeCardTerms, exports.acceptChargeCardTermsSuccess = _a.acceptChargeCardTermsSuccess, exports.acceptChargeCardTermsFailure = _a.acceptChargeCardTermsFailure, exports.clearChargeCardSetupView = _a.clearChargeCardSetupView;
154
+ _a = chargeCardSetupView.actions, exports.fetchChargeCardSetupView = _a.fetchChargeCardSetupView, exports.fetchChargeCardSetupViewSuccess = _a.fetchChargeCardSetupViewSuccess, exports.fetchChargeCardSetupViewFailure = _a.fetchChargeCardSetupViewFailure, exports.enableChargeCardAutoPay = _a.enableChargeCardAutoPay, exports.enableChargeCardAutoPaySuccess = _a.enableChargeCardAutoPaySuccess, exports.enableChargeCardAutoPayFailure = _a.enableChargeCardAutoPayFailure, exports.acceptChargeCardTerms = _a.acceptChargeCardTerms, exports.acceptChargeCardTermsSuccess = _a.acceptChargeCardTermsSuccess, exports.acceptChargeCardTermsFailure = _a.acceptChargeCardTermsFailure, exports.expressInterestInChargeCard = _a.expressInterestInChargeCard, exports.expressInterestInChargeCardSuccess = _a.expressInterestInChargeCardSuccess, exports.expressInterestInChargeCardFailure = _a.expressInterestInChargeCardFailure, exports.clearChargeCardSetupView = _a.clearChargeCardSetupView;
126
155
  exports.default = chargeCardSetupView.reducer;
@@ -1,9 +1,10 @@
1
- import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
1
+ import { FetchState, FetchStateAndError, ID } from '../../../../commonStateTypes/common';
2
2
  import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
3
3
  import { CompanyChargeCardInfo, CompanyDebitCardInfo, CompanyLocaleInfo } from '../../../../entity/company/companyStateTypes';
4
4
  import { RootState } from '../../../../reducer';
5
5
  import { BusinessVerificationDetails, CompanyOfficersDetails, SetupView } from '../../commonSetup/setupViewSelector';
6
6
  export interface ChargeCardSetupView extends SetupView, SelectorView {
7
+ expressInterestInChargeCardFetchState: FetchState;
7
8
  isRefreshingViewInBackground: boolean;
8
9
  chargeCardTermsDetails?: {
9
10
  fetchStatus: FetchStateAndError;
@@ -14,7 +14,7 @@ function getChargeCardSetupViewDetails(state, companyId) {
14
14
  const { chargeCardSetupViewState, setupViewState } = state;
15
15
  const { chargeCardTermsDetails, isRefreshingViewInBackground } = chargeCardSetupViewState;
16
16
  const { updateStatus } = setupViewState;
17
- const { fetchState, error } = chargeCardSetupViewState;
17
+ const { fetchState, error, expressInterestInChargeCardStatus: { fetchState: expressInterestInChargeCardFetchState, }, } = chargeCardSetupViewState;
18
18
  const businessVerificationDetails = getChargeCardBusinessVerificationDetails(state, companyId);
19
19
  const selectedCompanyOfficer = (0, helpers_1.getSelectedCompanyOfficer)(businessVerificationDetails);
20
20
  return Object.assign(Object.assign({}, chargeCardSetupViewDetails), { chargeCardTermsDetails,
@@ -24,7 +24,8 @@ function getChargeCardSetupViewDetails(state, companyId) {
24
24
  error,
25
25
  updateStatus,
26
26
  selectedCompanyOfficer,
27
- isRefreshingViewInBackground });
27
+ isRefreshingViewInBackground,
28
+ expressInterestInChargeCardFetchState });
28
29
  }
29
30
  function getChargeCardBusinessVerificationDetails(state, companyId) {
30
31
  const chargeCardBusinessVerificationDetails = (0, setupViewSelector_1.getBusinessVerificationDetails)(state, companyId);
@@ -1,6 +1,7 @@
1
1
  import { FetchStateAndError, FetchedState } from '../../../../commonStateTypes/common';
2
2
  export interface ChargeCardSetupViewState extends FetchedState {
3
3
  earlyPayFetchStatus: FetchStateAndError;
4
+ expressInterestInChargeCardStatus: FetchStateAndError;
4
5
  isRefreshingViewInBackground: boolean;
5
6
  chargeCardTermsDetails?: {
6
7
  fetchStatus: FetchStateAndError;
@@ -0,0 +1,11 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateCompanies } from '../../../../../entity/company/companyReducer';
4
+ import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
5
+ import { updateAllUsers } from '../../../../../entity/user/userReducer';
6
+ import { updateUserRoles } from '../../../../../entity/userRole/userRoleReducer';
7
+ import { RootState } from '../../../../../reducer';
8
+ import { ZeniAPI } from '../../../../../zeniAPI';
9
+ import { expressInterestInChargeCard, expressInterestInChargeCardFailure, expressInterestInChargeCardSuccess } from '../chargeCardSetUpViewReducer';
10
+ export type ActionType = ReturnType<typeof expressInterestInChargeCard> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof expressInterestInChargeCardSuccess> | ReturnType<typeof expressInterestInChargeCardFailure> | ReturnType<typeof openSnackbar>;
11
+ export declare const expressInterestChargeCardEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.expressInterestChargeCardEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const companyReducer_1 = require("../../../../../entity/company/companyReducer");
7
+ const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
+ const userReducer_1 = require("../../../../../entity/user/userReducer");
9
+ const userRoleReducer_1 = require("../../../../../entity/userRole/userRoleReducer");
10
+ const responsePayload_1 = require("../../../../../responsePayload");
11
+ const chargeCardSetUpViewReducer_1 = require("../chargeCardSetUpViewReducer");
12
+ const expressInterestChargeCardEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardSetUpViewReducer_1.expressInterestInChargeCard.match), (0, operators_1.mergeMap)((action) => {
13
+ const { companyId } = action.payload;
14
+ const payload = {
15
+ is_company_interested_in_charge_card: true,
16
+ };
17
+ return zeniAPI
18
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
19
+ .pipe((0, operators_1.mergeMap)((response) => {
20
+ if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
21
+ const actions = [
22
+ (0, userReducer_1.updateAllUsers)({ users: response.data.users }),
23
+ (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles),
24
+ (0, companyReducer_1.updateCompanies)({
25
+ payload: response.data.companies,
26
+ schema: {},
27
+ }),
28
+ (0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardSuccess)(),
29
+ ];
30
+ return (0, rxjs_1.from)(actions);
31
+ }
32
+ else {
33
+ return (0, rxjs_1.of)((0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardFailure)(response.status), (0, snackbarReducer_1.openSnackbar)({
34
+ messageSection: 'charge_card_express_interest',
35
+ messageText: 'failed',
36
+ type: 'error',
37
+ variables: [
38
+ {
39
+ variableName: '_api-error_',
40
+ variableValue: response.status.message,
41
+ },
42
+ ],
43
+ }));
44
+ }
45
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Express Interest in Charge Card errored out' +
46
+ JSON.stringify(error))))));
47
+ }));
48
+ exports.expressInterestChargeCardEpic = expressInterestChargeCardEpic;
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
4
4
  import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
5
5
  import { TopExState } from './topExState';
6
6
  export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
7
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
7
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
10
  status: import("../..").Status | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.17.94",
3
+ "version": "4.17.95",
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",
@@ -31,7 +31,7 @@
31
31
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
32
32
  "@types/big.js": "^6.2.2",
33
33
  "@types/lodash": "^4.17.16",
34
- "@types/node": "^20.17.23",
34
+ "@types/node": "^20.19.0",
35
35
  "@types/url-parse": "^1.4.11",
36
36
  "@typescript-eslint/eslint-plugin": "^8.26.0",
37
37
  "@typescript-eslint/parser": "^8.26.0",
@@ -63,7 +63,7 @@
63
63
  "dayjs-business-time": "^1.0.4",
64
64
  "js-base64": "^3.6.0",
65
65
  "lodash": "^4.17.21",
66
- "pusher-js": "^8.0.3",
66
+ "pusher-js": "^8.4.0",
67
67
  "redux": "^4.0.5",
68
68
  "redux-observable": "^1.2.0",
69
69
  "rxjs": "^6.6.6",