@zeniai/client-epic-state 4.9.52 → 4.9.54

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.
@@ -5,3 +5,4 @@ export declare const getControllersUserIds: (controllers: User[]) => ID[];
5
5
  export declare const getFirstControllerEmail: (controllers: User[]) => ID[];
6
6
  export declare const getFirstControllerId: (controllerUserIds: ID[]) => ID[];
7
7
  export declare const getControllersName: (controllers: User[]) => string[];
8
+ export declare const getFirstControllerIdFromControllers: (controllers: User[]) => ID[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getControllersName = exports.getFirstControllerId = exports.getFirstControllerEmail = exports.getControllersUserIds = exports.getControllersEmails = void 0;
3
+ exports.getFirstControllerIdFromControllers = exports.getControllersName = exports.getFirstControllerId = exports.getFirstControllerEmail = exports.getControllersUserIds = exports.getControllersEmails = void 0;
4
4
  const getControllersEmails = (controllers) => {
5
5
  return controllers
6
6
  .map((controller) => controller.email)
@@ -35,3 +35,11 @@ const getControllersName = (controllers) => {
35
35
  return controllers.map((controller) => `${controller.firstName} ${controller.lastName}`);
36
36
  };
37
37
  exports.getControllersName = getControllersName;
38
+ const getFirstControllerIdFromControllers = (controllers) => {
39
+ const controllerUserIds = controllers.map((controller) => controller.userId);
40
+ if (controllerUserIds.length === 0) {
41
+ return [];
42
+ }
43
+ return [controllerUserIds[0]];
44
+ };
45
+ exports.getFirstControllerIdFromControllers = getFirstControllerIdFromControllers;
@@ -181,6 +181,7 @@ export interface CompanyManagementUserRolePayload {
181
181
  user_email?: null;
182
182
  is_ap_analyst?: boolean;
183
183
  is_controller?: boolean;
184
+ is_customer_success_manager?: boolean | null;
184
185
  is_preparer?: boolean;
185
186
  is_reviewer?: boolean;
186
187
  is_tax_lead?: boolean;
@@ -222,6 +223,7 @@ export interface CompanyManagementInfoPayload {
222
223
  tax_lead_user_ids: string[];
223
224
  reviewer_user_ids: string[];
224
225
  preparer_user_ids: string[];
226
+ customer_success_manager_user_ids: string[];
225
227
  ap_analyst_user_ids: string[];
226
228
  users?: CompanyManagementUserRolePayload[];
227
229
  customer_satisfaction?: UpdateCustomerSatisfactionPayload;
@@ -297,6 +297,7 @@ const toCompanyManagementInfo = (payload) => {
297
297
  taxLeadUserIds: payload.tax_lead_user_ids,
298
298
  reviewerUserIds: payload.reviewer_user_ids,
299
299
  preparerUserIds: payload.preparer_user_ids,
300
+ customerSuccessManagerUserIds: payload.customer_success_manager_user_ids,
300
301
  apAnalystUserIds: payload.ap_analyst_user_ids,
301
302
  receiverEmails: payload.receiver_emails,
302
303
  });
@@ -104,6 +104,7 @@ export interface CompanyManagementInfo {
104
104
  reviewerUserIds: ID[];
105
105
  preparerUserIds: ID[];
106
106
  apAnalystUserIds: ID[];
107
+ customerSuccessManagerUserIds: ID[];
107
108
  users?: CompanyManagementUserRole[];
108
109
  customerSatisfaction?: CustomerSatisfactionInfo;
109
110
  }
@@ -24,6 +24,7 @@ interface TenantPayload {
24
24
  is_investor: boolean;
25
25
  is_company_officer: boolean;
26
26
  is_controller: boolean;
27
+ is_customer_success_manager: boolean;
27
28
  is_ap_analyst: boolean;
28
29
  is_preparer: boolean;
29
30
  is_reviewer: boolean;
@@ -42,6 +42,7 @@ export interface UserRolePayload {
42
42
  is_investor: boolean;
43
43
  is_company_officer: boolean;
44
44
  is_controller: boolean;
45
+ is_customer_success_manager: boolean;
45
46
  is_ap_analyst: boolean;
46
47
  is_preparer: boolean;
47
48
  is_reviewer: boolean;
@@ -23,6 +23,9 @@ function getUserRoles(userRolePayload) {
23
23
  if (userRolePayload.is_controller === true) {
24
24
  roles.push('controller');
25
25
  }
26
+ if (userRolePayload.is_customer_success_manager === true) {
27
+ roles.push('customer_success_manager');
28
+ }
26
29
  if (userRolePayload.is_tax_lead === true) {
27
30
  roles.push('tax_lead');
28
31
  }
@@ -1,12 +1,12 @@
1
1
  import { CurrentTenant, TenantView } from '../tenant/tenantSelector';
2
2
  import { LoggedInUser } from '../tenant/tenantState';
3
- export declare const FINOPS_USER_ROLES: readonly ["controller", "tax_lead", "ap_analyst", "preparer", "reviewer"];
4
- export declare const toFinOpsUserRoleTypeStrict: (v?: string | undefined) => "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | undefined;
5
- export declare const toFinOpsUserRoleType: (v: string) => "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer";
3
+ export declare const FINOPS_USER_ROLES: readonly ["controller", "tax_lead", "ap_analyst", "preparer", "reviewer", "customer_success_manager"];
4
+ export declare const toFinOpsUserRoleTypeStrict: (v?: string | undefined) => "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager" | undefined;
5
+ export declare const toFinOpsUserRoleType: (v: string) => "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager";
6
6
  export declare type FinOpsUserRoleType = ReturnType<typeof toFinOpsUserRoleType>;
7
- export declare const ALL_USER_ROLES: readonly ["admin", "full", "lite", "investor_or_banker", "company_officer", "employee", "bill_pay_admin", "bill_pay_analyst", "bill_pay_approver", "reimbursement_admin", "deposit_accounts_admin", "deposit_accounts_analyst", "charge_card_admin", "charge_card_user", "controller", "tax_lead", "ap_analyst", "preparer", "reviewer"];
8
- export declare const toUserRoleTypeStrict: (v?: string | undefined) => "full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | undefined;
9
- export declare const toUserRoleType: (v: string) => "full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer";
7
+ export declare const ALL_USER_ROLES: readonly ["admin", "full", "lite", "investor_or_banker", "company_officer", "employee", "bill_pay_admin", "bill_pay_analyst", "bill_pay_approver", "reimbursement_admin", "deposit_accounts_admin", "deposit_accounts_analyst", "charge_card_admin", "charge_card_user", "controller", "tax_lead", "ap_analyst", "preparer", "reviewer", "customer_success_manager"];
8
+ export declare const toUserRoleTypeStrict: (v?: string | undefined) => "full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager" | undefined;
9
+ export declare const toUserRoleType: (v: string) => "full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager";
10
10
  export declare type UserRoleType = ReturnType<typeof toUserRoleType>;
11
11
  export declare type RoleMap = Record<string, boolean>;
12
12
  export declare const isFinOpsUserRoleType: (userRole: UserRoleType) => boolean;
@@ -36,7 +36,7 @@ export declare const hasChargeCardAdminLevelAccess: (userRoleMap?: RoleMap | und
36
36
  export declare const hasZeniAccountsAdminLevelAccess: (userRoleMap?: RoleMap | undefined) => boolean;
37
37
  export declare const hasSpendManagementAccess: (userRoleMap?: RoleMap | undefined) => boolean;
38
38
  export declare const hasSpendManagementAdminLevelAccess: (userRoleMap: RoleMap) => boolean;
39
- export declare const hasAnyCompanyRole: (userRole?: ("full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer")[] | undefined) => boolean;
39
+ export declare const hasAnyCompanyRole: (userRole?: ("full" | "admin" | "lite" | "investor_or_banker" | "company_officer" | "employee" | "bill_pay_admin" | "bill_pay_analyst" | "bill_pay_approver" | "reimbursement_admin" | "deposit_accounts_admin" | "deposit_accounts_analyst" | "charge_card_admin" | "charge_card_user" | "controller" | "tax_lead" | "ap_analyst" | "preparer" | "reviewer" | "customer_success_manager")[] | undefined) => boolean;
40
40
  export declare const hasAnyFinOpRole: (userRoleMap?: RoleMap | undefined) => boolean;
41
41
  export declare const hasAnyAdminLevelAccess: (userRoleMap?: RoleMap | undefined) => boolean;
42
42
  export declare const hasFullOrAdminLevelAccess: (userRoles: UserRoleType[]) => boolean;
@@ -8,6 +8,7 @@ exports.FINOPS_USER_ROLES = [
8
8
  'ap_analyst',
9
9
  'preparer',
10
10
  'reviewer',
11
+ 'customer_success_manager',
11
12
  ];
12
13
  const toFinOpsUserRoleTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v !== null && v !== void 0 ? v : '', exports.FINOPS_USER_ROLES);
13
14
  exports.toFinOpsUserRoleTypeStrict = toFinOpsUserRoleTypeStrict;
@@ -168,11 +169,7 @@ const hasOnlyBillPayAccess = (userRoleMap) => {
168
169
  exports.hasOnlyBillPayAccess = hasOnlyBillPayAccess;
169
170
  const hasZeniRoleOrCompanyOfficerAccess = (role) => {
170
171
  const zeniRolesWithCompanyOfficer = [
171
- 'controller',
172
- 'ap_analyst',
173
- 'preparer',
174
- 'reviewer',
175
- 'tax_lead',
172
+ ...exports.FINOPS_USER_ROLES,
176
173
  'company_officer',
177
174
  ];
178
175
  return zeniRolesWithCompanyOfficer.includes(role);
@@ -389,6 +386,7 @@ const hasAnyFinOpRole = (userRoleMap) => {
389
386
  return false;
390
387
  }
391
388
  if (userRoleMap.controller ||
389
+ userRoleMap.customer_success_manager ||
392
390
  userRoleMap.tax_lead ||
393
391
  userRoleMap.ap_analyst ||
394
392
  userRoleMap.preparer ||
@@ -140,11 +140,13 @@ const removeDuplicatesFromCompaniesArray = (companies) => {
140
140
  });
141
141
  };
142
142
  const getCategoryValueForCompany = (key, company) => {
143
- const controllerIds = (0, companyHelper_1.getControllersUserIds)(company.controllers);
144
- const firstControllerId = (0, companyHelper_1.getFirstControllerId)(controllerIds);
143
+ const firstControllerId = (0, companyHelper_1.getFirstControllerIdFromControllers)(company.controllers);
144
+ const customerSuccessManagerIds = (0, companyHelper_1.getFirstControllerId)(company.managegmentInfo.customerSuccessManagerUserIds);
145
145
  switch (key) {
146
146
  case 'controller':
147
147
  return firstControllerId;
148
+ case 'customerSuccessManager':
149
+ return customerSuccessManagerIds;
148
150
  case 'lastReportSent':
149
151
  return company.managegmentInfo.lastReportSentDate != null
150
152
  ? company.managegmentInfo.lastReportSentDate
@@ -303,6 +305,9 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
303
305
  case 'controller':
304
306
  companiesWithSortKeyValues.push(company);
305
307
  break;
308
+ case 'customerSuccessManager':
309
+ companiesWithSortKeyValues.push(company);
310
+ break;
306
311
  case 'companyName':
307
312
  companiesWithSortKeyValues.push(company);
308
313
  break;
@@ -335,6 +340,8 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
335
340
  return (_f = company.companyHealthMetric.netPromoterScore) !== null && _f !== void 0 ? _f : 0;
336
341
  case 'controller':
337
342
  return company.managegmentInfo.controllerUserIds.length;
343
+ case 'customerSuccessManager':
344
+ return company.managegmentInfo.customerSuccessManagerUserIds.length;
338
345
  default:
339
346
  case 'companyName':
340
347
  return company.companyInfo.name;
@@ -214,6 +214,15 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
214
214
  else
215
215
  companiesWithNoSortKeyValue.push(company);
216
216
  break;
217
+ case 'customerSuccessManager':
218
+ if (company.company.company.managegmentInfo
219
+ .customerSuccessManagerUserIds[0] != null) {
220
+ companiesWithSortKeyValue.push(company);
221
+ }
222
+ else {
223
+ companiesWithNoSortKeyValue.push(company);
224
+ }
225
+ break;
217
226
  case 'reviewer':
218
227
  if (company.company.company.managegmentInfo.reviewerUserIds[0] != null)
219
228
  companiesWithSortKeyValue.push(company);
@@ -318,6 +327,9 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, companies, userS
318
327
  case 'controller':
319
328
  primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.controllerUserIds[0]).toLowerCase();
320
329
  break;
330
+ case 'customerSuccessManager':
331
+ primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.customerSuccessManagerUserIds[0]).toLowerCase();
332
+ break;
321
333
  case 'reviewer':
322
334
  primarySortValue = (0, userSelector_1.getUserNameById)(userState, managegmentInfo.reviewerUserIds[0]).toLowerCase();
323
335
  break;
@@ -74,6 +74,9 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
74
74
  const apAnalystUserIds = [...updatedManagegmentInfo.apAnalystUserIds];
75
75
  const preparerUserIds = [...updatedManagegmentInfo.preparerUserIds];
76
76
  const taxLeadUserIds = [...updatedManagegmentInfo.taxLeadUserIds];
77
+ const customerSuccessManagerUserIds = [
78
+ ...updatedManagegmentInfo.customerSuccessManagerUserIds,
79
+ ];
77
80
  if ((updatesInProgress === null || updatesInProgress === void 0 ? void 0 : updatesInProgress.status.fetchState) != 'Error') {
78
81
  (_a = updatedManagegmentInfo.users) === null || _a === void 0 ? void 0 : _a.forEach((user) => {
79
82
  switch (user.role) {
@@ -87,6 +90,16 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
87
90
  }
88
91
  break;
89
92
  }
93
+ case 'customer_success_manager': {
94
+ const userIndex = customerSuccessManagerUserIds.findIndex((customerSuccessManager) => customerSuccessManager === user.userId);
95
+ if (userIndex >= 0) {
96
+ customerSuccessManagerUserIds.splice(userIndex, 1);
97
+ }
98
+ else {
99
+ customerSuccessManagerUserIds.push(user.userId);
100
+ }
101
+ break;
102
+ }
90
103
  case 'reviewer': {
91
104
  const userIndex = reviewerUserIds.findIndex((reviewer) => reviewer === user.userId);
92
105
  if (userIndex >= 0) {
@@ -133,6 +146,9 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
133
146
  const controllers = controllerUserIds
134
147
  .map((userId) => (0, userAndRole_1.getUserAndUserRole)(state.userState, state.userRoleState, state.addressState, userId))
135
148
  .filter((value) => value != null);
149
+ const customerSuccessManagers = customerSuccessManagerUserIds
150
+ .map((userId) => (0, userAndRole_1.getUserAndUserRole)(state.userState, state.userRoleState, state.addressState, userId))
151
+ .filter((value) => value != null);
136
152
  const taxLeads = taxLeadUserIds
137
153
  .map((userId) => (0, userAndRole_1.getUserAndUserRole)(state.userState, state.userRoleState, state.addressState, userId))
138
154
  .filter((value) => value != null);
@@ -158,6 +174,7 @@ function getCompanyView(state, companyId, subscriptionIdsOfCompany, mergePending
158
174
  companyOfficers,
159
175
  companyContact,
160
176
  controllers,
177
+ customerSuccessManagers,
161
178
  taxLeads,
162
179
  reviewers,
163
180
  preparers,
@@ -4,21 +4,21 @@ import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscripti
4
4
  import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
5
5
  import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
6
6
  export declare const ALL_PORTFOLIO_SORT_KEYS: readonly ["companyName", "cashBalance", "runway", "expenses", "revenues", "netIncome"];
7
- export declare const ALL_MANAGEMENT_SORT_KEYS: readonly ["companyName", "task", "status", "group", "plans", "controller", "reviewer", "preparer", "apAnalyst", "reportSent", "taxStatus", "taxLead", "monthlyRecurringRevenue", "annualRecurringRevenue", "notes", "satisfaction", "bookCloseDate"];
7
+ export declare const ALL_MANAGEMENT_SORT_KEYS: readonly ["companyName", "task", "status", "group", "plans", "controller", "customerSuccessManager", "reviewer", "preparer", "apAnalyst", "reportSent", "taxStatus", "taxLead", "monthlyRecurringRevenue", "annualRecurringRevenue", "notes", "satisfaction", "bookCloseDate"];
8
8
  export declare const ALL_ONBOARDING_SORT_KEYS: readonly ["companyName", "bankAccountLinked", "qboLinked", "identityVerified", "businessVerified", "groupCreated", "customerCreated", "enroller", "notes", "invite"];
9
- export declare const ALL_HEALTH_SORT_KEYS: readonly ["companyName", "issues", "productVerticals", "runway", "churnProbability", "netPromoterScore", "controller", "lastReportSent", "subscriptionDate", "renewalDate"];
9
+ export declare const ALL_HEALTH_SORT_KEYS: readonly ["companyName", "issues", "productVerticals", "runway", "churnProbability", "netPromoterScore", "controller", "customerSuccessManager", "lastReportSent", "subscriptionDate", "renewalDate"];
10
10
  export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "cashBalance" | "netIncome" | "companyName" | "revenues";
11
- export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "companyName" | "monthlyRecurringRevenue" | "annualRecurringRevenue" | "taxStatus" | "plans" | "notes" | "task" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
11
+ export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "companyName" | "monthlyRecurringRevenue" | "annualRecurringRevenue" | "taxStatus" | "plans" | "notes" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
12
12
  export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "identityVerified" | "businessVerified" | "bankAccountLinked" | "qboLinked" | "groupCreated" | "customerCreated" | "notes" | "enroller" | "invite";
13
- export declare const toHealthSortKeyType: (v: string) => "runway" | "controller" | "companyName" | "netPromoterScore" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate";
13
+ export declare const toHealthSortKeyType: (v: string) => "runway" | "controller" | "companyName" | "customerSuccessManager" | "netPromoterScore" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate";
14
14
  export declare type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
15
15
  export declare type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
16
16
  export declare type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
17
17
  export declare type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;
18
- export declare type ManagementViewFilterCategoryField = 'controllerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
18
+ export declare type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
19
19
  export declare type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
20
20
  export declare type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
21
- export declare type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'churnProbabilityPercentage' | 'controller' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate';
21
+ export declare type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'churnProbabilityPercentage' | 'controller' | 'customerSuccessManager' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate';
22
22
  export interface CockpitFilterCategory {
23
23
  field?: ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
24
24
  matchingOperator: 'equal' | 'not-equal';
@@ -17,6 +17,7 @@ exports.ALL_MANAGEMENT_SORT_KEYS = [
17
17
  'group',
18
18
  'plans',
19
19
  'controller',
20
+ 'customerSuccessManager',
20
21
  'reviewer',
21
22
  'preparer',
22
23
  'apAnalyst',
@@ -49,6 +50,7 @@ exports.ALL_HEALTH_SORT_KEYS = [
49
50
  'churnProbability',
50
51
  'netPromoterScore',
51
52
  'controller',
53
+ 'customerSuccessManager',
52
54
  'lastReportSent',
53
55
  'subscriptionDate',
54
56
  'renewalDate',
@@ -16,6 +16,7 @@ export interface CompanyView {
16
16
  companyOfficers: UserAndRole[];
17
17
  companyContact?: UserAndRole;
18
18
  controllers: UserAndRole[];
19
+ customerSuccessManagers: UserAndRole[];
19
20
  taxLeads: UserAndRole[];
20
21
  reviewers: UserAndRole[];
21
22
  preparers: UserAndRole[];
@@ -40,14 +40,14 @@ const getChargeCardListView = (state, includeCreditAccount) => {
40
40
  const sortKey = chargeCardListState.uiState.sortKey;
41
41
  const sortOrder = (0, sortOrderPayload_1.getSortOrder)(chargeCardListState.uiState.sortOrder);
42
42
  const cardsInOrder = (0, orderBy_1.default)(cards, (card) => {
43
- var _a, _b, _c, _d;
43
+ var _a, _b, _c, _d, _e;
44
44
  switch (sortKey) {
45
45
  case 'owner':
46
- return (_b = (_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName) !== null && _b !== void 0 ? _b : '';
46
+ return ((_c = `${(_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName.toLowerCase()} ${(_b = card.cardHolderUser) === null || _b === void 0 ? void 0 : _b.lastName.toLowerCase()}`) !== null && _c !== void 0 ? _c : '');
47
47
  case 'cardName':
48
48
  return card.cardName;
49
49
  case 'department':
50
- return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className) !== null && _d !== void 0 ? _d : '';
50
+ return (_e = (_d = card.department) === null || _d === void 0 ? void 0 : _d.className) !== null && _e !== void 0 ? _e : '';
51
51
  case 'utilisation':
52
52
  return card.limit.amount - card.available.amount;
53
53
  case 'limit':
@@ -70,6 +70,7 @@ const isVendorsTabVisible = (roleMap) => {
70
70
  roleMap.lite ||
71
71
  roleMap.ap_analyst ||
72
72
  roleMap.controller ||
73
+ roleMap.customer_success_manager ||
73
74
  roleMap.reviewer ||
74
75
  roleMap.tax_lead ||
75
76
  roleMap.preparer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.9.52",
3
+ "version": "4.9.54",
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",
@@ -79,7 +79,7 @@
79
79
  "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
80
80
  "find-dead-code": "ts-prune | grep -v '(used in module)'",
81
81
  "find-unused-exports": "ts-unused-exports ./tsconfig.json",
82
- "build": "concurrently --kill-others-on-fail \"eslint . --ext .js,.jsx,.ts,.tsx\" \"tsc\" \"jest --config jest.config.json\"",
82
+ "build": "concurrently --kill-others-on-fail \"eslint . --ext .js,.jsx,.ts,.tsx\" \"tsc\"",
83
83
  "onlybuild": "concurrently --kill-others-on-fail \"eslint . --ext .js,.jsx,.ts,.tsx\" \"tsc\"",
84
84
  "format": "prettier --write --ignore-unknown \"src/**/*\"",
85
85
  "version": "git add -A src",