@zeniai/client-epic-state 4.11.42 → 4.11.44

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.
@@ -69,8 +69,8 @@ interface TenantPayload {
69
69
  }
70
70
  interface LoggedInUserPayload {
71
71
  user_id: ID;
72
- first_name: string;
73
- last_name: string;
72
+ first_name: string | null;
73
+ last_name: string | null;
74
74
  photo: URLPayload;
75
75
  }
76
76
  interface UserData {
@@ -401,11 +401,12 @@ function mapTenantPayloadToUser(payload) {
401
401
  return user;
402
402
  }
403
403
  function mapLoggedInUserPayloadToLoggedInUser(payload, zeniSessionId) {
404
+ var _a, _b;
404
405
  return {
405
406
  userId: payload.user_id,
406
407
  zeniSessionId: zeniSessionId,
407
- firstName: payload.first_name.trim(),
408
- lastName: payload.last_name.trim(),
408
+ firstName: (_a = payload.first_name) === null || _a === void 0 ? void 0 : _a.trim(),
409
+ lastName: (_b = payload.last_name) === null || _b === void 0 ? void 0 : _b.trim(),
409
410
  photo: (0, urlPayload_1.toURL)(payload.photo),
410
411
  };
411
412
  }
@@ -69,7 +69,7 @@ exports.getReviewCompanySelectorView = (0, toolkit_1.createSelector)((state) =>
69
69
  }
70
70
  });
71
71
  const sortOrderValue = (0, sortOrderPayload_1.getSortOrder)(sortOrder);
72
- const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (company) => {
72
+ const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (sortKey === 'auditScore') ? ['auditSummary.auditScorePercentage', 'auditSummary.fixesRequired'] : (company) => {
73
73
  var _a;
74
74
  const warningCount = (0, exports.getAuditWarningsCount)(company);
75
75
  let primarySortValue;
@@ -98,11 +98,6 @@ exports.getReviewCompanySelectorView = (0, toolkit_1.createSelector)((state) =>
98
98
  case 'warnings':
99
99
  primarySortValue = warningCount;
100
100
  break;
101
- case 'auditScore':
102
- isSecondarySortApplicable = true;
103
- primarySortValue = company.auditSummary.auditScorePercentage;
104
- secondarySortValue = company.auditSummary.fixesRequired;
105
- break;
106
101
  case 'reviewVendor':
107
102
  primarySortValue = company.isVendorReviewReqiured;
108
103
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.42",
3
+ "version": "4.11.44",
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",