@copart/ops-tool-kit 1.8.1-alpha.7 → 1.8.1-alpha.9
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 +8 -7
- 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__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
|
33
33
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$f = "@copart/ops-tool-kit";
|
|
36
|
-
const version$5 = "1.8.1-alpha.
|
|
36
|
+
const version$5 = "1.8.1-alpha.9";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -2856,9 +2856,9 @@ var createOpsStorage = function createOpsStorage() {
|
|
|
2856
2856
|
},
|
|
2857
2857
|
|
|
2858
2858
|
get hasCasAccess() {
|
|
2859
|
-
var _getLocalItem3;
|
|
2859
|
+
var _getLocalItem3, _getLocalItem3$userDa;
|
|
2860
2860
|
|
|
2861
|
-
return (_getLocalItem3 = getLocalItem('login')) === null || _getLocalItem3 === void 0 ? void 0 : _getLocalItem3.userData.hasCasAccess;
|
|
2861
|
+
return (_getLocalItem3 = getLocalItem('login')) === null || _getLocalItem3 === void 0 ? void 0 : (_getLocalItem3$userDa = _getLocalItem3.userData) === null || _getLocalItem3$userDa === void 0 ? void 0 : _getLocalItem3$userDa.hasCasAccess;
|
|
2862
2862
|
},
|
|
2863
2863
|
|
|
2864
2864
|
get activeYardNumber() {
|
|
@@ -35511,6 +35511,7 @@ function filterOutExpiredNotifications(notifications) {
|
|
|
35511
35511
|
function filterOutNotificationForOtherAppsFirebase(notifications) {
|
|
35512
35512
|
var currentApp = window.location.pathname === '/' ? 'opsportal-core' : window.location.pathname.split('/')[1];
|
|
35513
35513
|
return filter$1(function (notification) {
|
|
35514
|
+
if (!notification.apps || !notification.apps.length) return true;
|
|
35514
35515
|
return includes$1(currentApp, propOr$1([], 'apps', notification));
|
|
35515
35516
|
})(notifications);
|
|
35516
35517
|
}
|
|
@@ -35585,7 +35586,7 @@ function filterOutNotificationByAudience(notifications) {
|
|
|
35585
35586
|
return usersList.includes(userEmail);
|
|
35586
35587
|
|
|
35587
35588
|
case 'groups':
|
|
35588
|
-
var groups = pathOr$1([], ['groups'])(
|
|
35589
|
+
var groups = pathOr$1([], ['groups'])(target);
|
|
35589
35590
|
return groups.some(function (group) {
|
|
35590
35591
|
var users = pathOr$1([], ['users'])(group);
|
|
35591
35592
|
return users.includes(userEmail) || users.includes('*');
|
|
@@ -42124,7 +42125,7 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
42124
42125
|
var _storage$getSessionIt, _storage$getSessionIt2;
|
|
42125
42126
|
|
|
42126
42127
|
var coreAppConfig = storage$1.getLocalItem('opsportal-core:config');
|
|
42127
|
-
var webSocketURL = "".concat(coreAppConfig.webSocketURL, "/").concat((_storage$getSessionIt = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt === void 0 ? void 0 : _storage$getSessionIt.selectedYard);
|
|
42128
|
+
var webSocketURL = "".concat(coreAppConfig.webSocketURL, "/").concat((_storage$getSessionIt = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt === void 0 ? void 0 : _storage$getSessionIt.selectedYard, ",").concat(storage$1.userEmail);
|
|
42128
42129
|
browserCookies.set('notification_country', (_storage$getSessionIt2 = storage$1.getSessionItem('dashboard')) === null || _storage$getSessionIt2 === void 0 ? void 0 : _storage$getSessionIt2.selectedCountryA3code, {
|
|
42129
42130
|
domain: '.copart.com'
|
|
42130
42131
|
});
|
|
@@ -50224,7 +50225,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
50224
50225
|
socketClient && socketClient.close();
|
|
50225
50226
|
|
|
50226
50227
|
if (coreAppConfig && coreAppConfig.tiles) {
|
|
50227
|
-
var currentTile = coreAppConfig.tiles.find(function (tile) {
|
|
50228
|
+
var currentTile = history.location.pathname !== '/login' && coreAppConfig.tiles.find(function (tile) {
|
|
50228
50229
|
return tile.path === window.location.pathname;
|
|
50229
50230
|
});
|
|
50230
50231
|
var tileConfigAccess = true;
|
|
@@ -50233,7 +50234,7 @@ var AppBar = function AppBar(_ref) {
|
|
|
50233
50234
|
tileConfigAccess = userHasAccess(currentTile);
|
|
50234
50235
|
}
|
|
50235
50236
|
|
|
50236
|
-
if (history.location.pathname !== '/logout' && tileConfigAccess) {
|
|
50237
|
+
if (history.location.pathname !== '/logout' && history.location.pathname !== '/login' && localStorage.getItem('login') && tileConfigAccess) {
|
|
50237
50238
|
if (notificationsSource.includes('Nchan')) {
|
|
50238
50239
|
fetchG2Notifications(updateNotifications, updateAllNotificationsList);
|
|
50239
50240
|
setSocketClient(startWebSocketConnection(updateNotifications, updateAllNotificationsList));
|