@copart/ops-tool-kit 1.10.11 → 1.10.13

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.
@@ -33,7 +33,7 @@ var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
33
33
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
34
34
 
35
35
  const name$f = "@copart/ops-tool-kit";
36
- const version$5 = "1.10.11";
36
+ const version$5 = "1.10.13";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -7039,7 +7039,9 @@ function () {
7039
7039
  _context2.prev = 45;
7040
7040
  endpoint = (_storage$getLocalItem = storage$1.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.appScopesAWS;
7041
7041
  _context2.next = 49;
7042
- return fetcher.get(endpoint);
7042
+ return fetcher.get(endpoint).then(function (res) {
7043
+ return res.data;
7044
+ });
7043
7045
 
7044
7046
  case 49:
7045
7047
  appFunctions = _context2.sent;
@@ -11183,7 +11185,9 @@ function () {
11183
11185
  endpoint = (_storage$getLocalItem = storage.getLocalItem('opsportal-core:config')) === null || _storage$getLocalItem === void 0 ? void 0 : (_storage$getLocalItem2 = _storage$getLocalItem.endpoints) === null || _storage$getLocalItem2 === void 0 ? void 0 : _storage$getLocalItem2.hierarchiesAWS;
11184
11186
  _context.prev = 1;
11185
11187
  _context.next = 4;
11186
- return fetcher.get(endpoint);
11188
+ return fetcher.get(endpoint).then(function (res) {
11189
+ return res.data;
11190
+ });
11187
11191
 
11188
11192
  case 4:
11189
11193
  hierarchies = _context.sent;
@@ -11207,21 +11211,24 @@ function () {
11207
11211
 
11208
11212
  var scopeInfo = scope === null || scope === void 0 ? void 0 : scope.split('|');
11209
11213
  var hierarchyList = (_scopeInfo$ = scopeInfo[2]) === null || _scopeInfo$ === void 0 ? void 0 : _scopeInfo$.split(':');
11210
- var hierarchies = hierarchyList.map(function (hierarchy) {
11214
+ console.log('hierarchyList--> ', hierarchyList, hierarchies);
11215
+ var hierarchiesWithDetails = hierarchyList.map(function (hierarchy) {
11211
11216
  return getHierarchyDetails(hierarchies, Number(hierarchy));
11212
11217
  });
11218
+ console.log('hierarchiesWithDetails--> ', hierarchiesWithDetails);
11213
11219
 
11214
- if (hierarchy) {
11220
+ if (hierarchiesWithDetails.length > 0) {
11215
11221
  filteredScopeList.push({
11216
11222
  appName: scopeInfo[0],
11217
11223
  scopeName: scopeInfo[1],
11218
- hierarchies: hierarchies
11224
+ hierarchies: hierarchiesWithDetails
11219
11225
  });
11220
11226
  }
11221
11227
  });
11228
+ console.log('filteredScopeList -->', filteredScopeList);
11222
11229
  return _context.abrupt("return", filteredScopeList);
11223
11230
 
11224
- case 18:
11231
+ case 19:
11225
11232
  case "end":
11226
11233
  return _context.stop();
11227
11234
  }
@@ -42062,7 +42069,8 @@ var appFunctionIdAllowed = function appFunctionIdAllowed() {
42062
42069
  var tile = arguments.length > 4 ? arguments[4] : undefined;
42063
42070
 
42064
42071
  if (tile.useAppScopes) {
42065
- return tile.appAuthName && appScopes.some(function (appScope) {
42072
+ var userAppScopes = Array.isArray(appScopes) ? appScopes : [];
42073
+ return tile.appAuthName && userAppScopes.some(function (appScope) {
42066
42074
  return appScope.appName === tile.appAuthName;
42067
42075
  });
42068
42076
  }