@copart/ops-tool-kit 1.10.5 → 1.10.7
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.
- package/dist/ops-tool-kit.js +12 -10
- package/dist/ops-tool-kit.js.map +1 -1
- package/package.json +1 -1
package/dist/ops-tool-kit.js
CHANGED
|
@@ -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.
|
|
36
|
+
const version$5 = "1.10.7";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -6588,7 +6588,7 @@ function () {
|
|
|
6588
6588
|
break;
|
|
6589
6589
|
}
|
|
6590
6590
|
|
|
6591
|
-
userAppScopes = storage.userAppScopes;
|
|
6591
|
+
userAppScopes = Array.isArray(storage.userAppScopes) ? storage.userAppScopes : [];
|
|
6592
6592
|
allAppScopesAndFunctions = storage.appScopesAndFunctions;
|
|
6593
6593
|
currentAppScopesAndFunctions = allAppScopesAndFunctions.find(function (scope) {
|
|
6594
6594
|
return scope.appName === appName;
|
|
@@ -21489,7 +21489,7 @@ var getHierarchyDetails = function getHierarchyDetails(hierarchyId) {
|
|
|
21489
21489
|
|
|
21490
21490
|
var getUserScopes = function getUserScopes() {
|
|
21491
21491
|
var scopeData = storage.getLocalItem('login', 'entity_auth_scope');
|
|
21492
|
-
var scopeList = scopeData.split(',');
|
|
21492
|
+
var scopeList = typeof scopeData === 'string' ? scopeData === null || scopeData === void 0 ? void 0 : scopeData.split(',') : [];
|
|
21493
21493
|
var filteredScopeList = [];
|
|
21494
21494
|
scopeList.forEach(function (scope) {
|
|
21495
21495
|
var scopeInfo = scope.split('|');
|
|
@@ -40002,9 +40002,10 @@ var saveSettings$1 = function saveSettings(self) {
|
|
|
40002
40002
|
storage$1.setLocalItem('lastSelectedYard', yard);
|
|
40003
40003
|
storage$1.setLocalItem('dashboard', selectedCurrency || yard.yard_currency, 'selectedCurrency');
|
|
40004
40004
|
securityLevel = pickUserSecurityLevel(getSelectedYard(selectedYard));
|
|
40005
|
-
storage$1.setSessionItem('securityLevel', Number(securityLevel));
|
|
40005
|
+
storage$1.setSessionItem('securityLevel', Number(securityLevel));
|
|
40006
|
+
storage$1.setLocalItem('login', fetcher.getUserScopes(), 'userAppScopes'); // persist user preferences
|
|
40006
40007
|
|
|
40007
|
-
_context.next =
|
|
40008
|
+
_context.next = 25;
|
|
40008
40009
|
return fetcher.setUserPreferences('oph', {
|
|
40009
40010
|
selectedCurrency: selectedCurrency || yard.yard_currency,
|
|
40010
40011
|
language: selectedLanguage || 'en',
|
|
@@ -40015,7 +40016,7 @@ var saveSettings$1 = function saveSettings(self) {
|
|
|
40015
40016
|
securityLevel: securityLevel
|
|
40016
40017
|
}, 'USA');
|
|
40017
40018
|
|
|
40018
|
-
case
|
|
40019
|
+
case 25:
|
|
40019
40020
|
self.setState({
|
|
40020
40021
|
oldActivePrinters: printers
|
|
40021
40022
|
});
|
|
@@ -40029,7 +40030,7 @@ var saveSettings$1 = function saveSettings(self) {
|
|
|
40029
40030
|
};
|
|
40030
40031
|
self.props.onSave(oldSettings, newSettings);
|
|
40031
40032
|
|
|
40032
|
-
case
|
|
40033
|
+
case 28:
|
|
40033
40034
|
case "end":
|
|
40034
40035
|
return _context.stop();
|
|
40035
40036
|
}
|
|
@@ -40794,6 +40795,7 @@ var saveSettings = function saveSettings(self) {
|
|
|
40794
40795
|
storage$1.setLocalItem('settings', selectedHierarchyOption, 'selectedHierarchyOption');
|
|
40795
40796
|
storage$1.setLocalItem('settings', selectedHierarchy, 'selectedHierarchy');
|
|
40796
40797
|
storage$1.setLocalItem('lastSelectedYard', yard);
|
|
40798
|
+
storage$1.setLocalItem('login', fetcher.getUserScopes(), 'userAppScopes');
|
|
40797
40799
|
|
|
40798
40800
|
getSelectedYard = function getSelectedYard() {
|
|
40799
40801
|
var yardList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -40809,7 +40811,7 @@ var saveSettings = function saveSettings(self) {
|
|
|
40809
40811
|
securityLevel = compose(pickUserSecurityLevel, getSelectedYard)((_storage$getLocalItem = storage$1.getLocalItem('login')) === null || _storage$getLocalItem === void 0 ? void 0 : _storage$getLocalItem.yardList);
|
|
40810
40812
|
storage$1.setSessionItem('securityLevel', securityLevel); // persist user preferences
|
|
40811
40813
|
|
|
40812
|
-
_context2.next =
|
|
40814
|
+
_context2.next = 28;
|
|
40813
40815
|
return fetcher.setUserPreferences('oph', {
|
|
40814
40816
|
selectedCurrency: yard.yard_currency,
|
|
40815
40817
|
language: 'en',
|
|
@@ -40822,7 +40824,7 @@ var saveSettings = function saveSettings(self) {
|
|
|
40822
40824
|
securityLevel: securityLevel
|
|
40823
40825
|
}, 'GBR');
|
|
40824
40826
|
|
|
40825
|
-
case
|
|
40827
|
+
case 28:
|
|
40826
40828
|
self.setState({
|
|
40827
40829
|
oldActivePrinters: printers
|
|
40828
40830
|
});
|
|
@@ -40837,7 +40839,7 @@ var saveSettings = function saveSettings(self) {
|
|
|
40837
40839
|
};
|
|
40838
40840
|
self.props.onSave(oldSettings, newSettings);
|
|
40839
40841
|
|
|
40840
|
-
case
|
|
40842
|
+
case 31:
|
|
40841
40843
|
case "end":
|
|
40842
40844
|
return _context2.stop();
|
|
40843
40845
|
}
|