@copart/ops-tool-kit 1.8.1-alpha.23 → 1.8.1-alpha.25
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 -2
- 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.8.1-alpha.
|
|
36
|
+
const version$5 = "1.8.1-alpha.25";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -39863,6 +39863,7 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
39863
39863
|
|
|
39864
39864
|
notification = message.data ? [JSON.parse(message.data)] : [];
|
|
39865
39865
|
var newNotification = notification;
|
|
39866
|
+
console.log('***newNotification in socket resp=', newNotification);
|
|
39866
39867
|
|
|
39867
39868
|
if (newNotification.length > 0 && ((_newNotification$ = newNotification[0]) === null || _newNotification$ === void 0 ? void 0 : _newNotification$.status) === 'A') {
|
|
39868
39869
|
compose(updateNotifications, filterNotifications)(newNotification);
|
|
@@ -39874,6 +39875,10 @@ function startWebSocketConnection(updateNotifications, updateAllNotificationsLis
|
|
|
39874
39875
|
}
|
|
39875
39876
|
};
|
|
39876
39877
|
|
|
39878
|
+
client.onclose = function () {
|
|
39879
|
+
console.log('Socket connection Closed');
|
|
39880
|
+
};
|
|
39881
|
+
|
|
39877
39882
|
return client;
|
|
39878
39883
|
} catch (e) {
|
|
39879
39884
|
console.log('Web socket error ', e);
|
|
@@ -47929,19 +47934,24 @@ var AppBar = function AppBar(_ref) {
|
|
|
47929
47934
|
if (newNotifications.length === 1) {
|
|
47930
47935
|
var newNotification = _objectSpread2({}, newNotifications[0]);
|
|
47931
47936
|
|
|
47937
|
+
console.log('***newNotification=', newNotification);
|
|
47932
47938
|
var startTime = newNotification.timeZoneType === "RPTZ" ? newNotification.startsAt : moment.utc(newNotification.startsAt).local().format("YYYY-MM-DD HH:mm:ss");
|
|
47933
47939
|
var endTime = newNotification.timeZoneType === "RPTZ" ? newNotification.endsAt : moment.utc(newNotification.endsAt).local().format("YYYY-MM-DD HH:mm:ss");
|
|
47940
|
+
console.log('***condition=', (newNotification === null || newNotification === void 0 ? void 0 : newNotification.status) !== 'A' || !isOutOfRange(startTime, endTime));
|
|
47934
47941
|
|
|
47935
|
-
if ((newNotification === null || newNotification === void 0 ? void 0 : newNotification.status) !== 'A' || isOutOfRange(startTime, endTime)) {
|
|
47942
|
+
if ((newNotification === null || newNotification === void 0 ? void 0 : newNotification.status) !== 'A' || !isOutOfRange(startTime, endTime)) {
|
|
47936
47943
|
newNotification.endsAt = '2020-01-01 00:00:00';
|
|
47937
47944
|
var currentNotifications = clone$1(notifications);
|
|
47945
|
+
console.log('***currentNotifications=', currentNotifications);
|
|
47938
47946
|
var notificationindex = currentNotifications.findIndex(function (notification) {
|
|
47939
47947
|
return notification.notificationId === newNotification.notificationId;
|
|
47940
47948
|
});
|
|
47949
|
+
console.log('***notificationindex=', notificationindex);
|
|
47941
47950
|
|
|
47942
47951
|
if (notificationindex !== -1) {
|
|
47943
47952
|
currentNotifications[notificationindex] = newNotification;
|
|
47944
47953
|
setNotifications(currentNotifications);
|
|
47954
|
+
console.log('***setNotifications done=', currentNotifications);
|
|
47945
47955
|
}
|
|
47946
47956
|
} else {
|
|
47947
47957
|
setListOfAllNotifications(function (notifications) {
|