@copart/ops-tool-kit 1.8.1-alpha.30 → 1.8.1-alpha.31
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 +34 -24
- 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.31";
|
|
37
37
|
const main$1 = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -35334,9 +35334,14 @@ function filterOutNotificationByAudience(notifications) {
|
|
|
35334
35334
|
});
|
|
35335
35335
|
});
|
|
35336
35336
|
}
|
|
35337
|
+
function filterOutInActiveNotification(notifications) {
|
|
35338
|
+
return notifications.filter(function (notification) {
|
|
35339
|
+
return (notification === null || notification === void 0 ? void 0 : notification.status) === 'A';
|
|
35340
|
+
});
|
|
35341
|
+
}
|
|
35337
35342
|
function filterNotifications(notifications) {
|
|
35338
35343
|
try {
|
|
35339
|
-
return compose(filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
|
|
35344
|
+
return compose(filterOutInActiveNotification, filterOutNotificationByAudience, filterOutViewedNotifications, filterOutExpiredNotifications, filterOutNotificationForOtherApps)(notifications);
|
|
35340
35345
|
} catch (err) {
|
|
35341
35346
|
console.error(err);
|
|
35342
35347
|
return notifications;
|
|
@@ -39833,7 +39838,7 @@ function fetchG2Notifications(updateNotifications, updateAllNotificationsList) {
|
|
|
39833
39838
|
return notification;
|
|
39834
39839
|
});
|
|
39835
39840
|
compose(updateNotifications, filterNotifications)(modifiedNotifications);
|
|
39836
|
-
updateAllNotificationsList(modifiedNotifications);
|
|
39841
|
+
updateAllNotificationsList(modifiedNotifications, true);
|
|
39837
39842
|
}).catch(function (e) {
|
|
39838
39843
|
console.log(e);
|
|
39839
39844
|
});
|
|
@@ -40228,30 +40233,35 @@ var AppBar = function AppBar(_ref) {
|
|
|
40228
40233
|
});
|
|
40229
40234
|
};
|
|
40230
40235
|
|
|
40231
|
-
var updateAllNotificationsList = function updateAllNotificationsList(newNotifications) {
|
|
40232
|
-
|
|
40233
|
-
var check = filterNotifications(newNotifications);
|
|
40236
|
+
var updateAllNotificationsList = function updateAllNotificationsList(newNotifications, isSolr) {
|
|
40237
|
+
console.log("$$$isSolr=", isSolr);
|
|
40234
40238
|
|
|
40235
|
-
|
|
40239
|
+
if (isSolr) {
|
|
40240
|
+
console.log("$$$ in solr notif");
|
|
40241
|
+
setListOfAllNotifications(function (notifications) {
|
|
40242
|
+
return filterDuplicateAndSave(notifications, newNotifications);
|
|
40243
|
+
});
|
|
40244
|
+
return;
|
|
40245
|
+
}
|
|
40236
40246
|
|
|
40237
|
-
|
|
40238
|
-
|
|
40239
|
-
|
|
40247
|
+
console.log("$$$newNotifications=", newNotifications);
|
|
40248
|
+
var check = filterNotifications(newNotifications);
|
|
40249
|
+
console.log("$$$check=", check);
|
|
40240
40250
|
|
|
40241
|
-
|
|
40242
|
-
|
|
40243
|
-
|
|
40244
|
-
|
|
40245
|
-
|
|
40246
|
-
|
|
40247
|
-
|
|
40248
|
-
|
|
40249
|
-
|
|
40250
|
-
|
|
40251
|
-
|
|
40252
|
-
|
|
40253
|
-
|
|
40254
|
-
|
|
40251
|
+
var newNotification = _objectSpread2({}, newNotifications[0]);
|
|
40252
|
+
|
|
40253
|
+
var startTime = newNotification.timeZoneType === "RPTZ" ? newNotification.startsAt : moment.utc(newNotification.startsAt).local().format("YYYY-MM-DD HH:mm:ss"); // const endTime = newNotification.timeZoneType === "RPTZ" && newNotification.endDateTimeZone !=='UTC' ? newNotification.endsAt : moment.utc(newNotification.endsAt).local().format("YYYY-MM-DD HH:mm:ss")
|
|
40254
|
+
|
|
40255
|
+
var currentDate = new Date();
|
|
40256
|
+
|
|
40257
|
+
if (!check.length) {
|
|
40258
|
+
console.log("$$$ in if 1");
|
|
40259
|
+
removeNotification(newNotification);
|
|
40260
|
+
} // test for delete, update, new & future notification..
|
|
40261
|
+
|
|
40262
|
+
|
|
40263
|
+
if (new Date(startTime) > currentDate && (newNotification === null || newNotification === void 0 ? void 0 : newNotification.status) === 'A') {
|
|
40264
|
+
console.log("$$$ in if 2");
|
|
40255
40265
|
setListOfAllNotifications(function (notifications) {
|
|
40256
40266
|
return filterDuplicateAndSave(notifications, newNotifications);
|
|
40257
40267
|
});
|