@copart/ops-tool-kit 1.5.37 → 1.5.38
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 +7 -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__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
|
33
33
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
34
34
|
|
|
35
35
|
const name$e = "@copart/ops-tool-kit";
|
|
36
|
-
const version$3 = "1.5.
|
|
36
|
+
const version$3 = "1.5.38";
|
|
37
37
|
const main = "dist/ops-tool-kit.js";
|
|
38
38
|
const style = "dist/ops-tool-kit.css";
|
|
39
39
|
const files = [
|
|
@@ -40533,12 +40533,9 @@ function formatLink(link) {
|
|
|
40533
40533
|
function padTo2Digits(num) {
|
|
40534
40534
|
return num.toString().padStart(2, '0');
|
|
40535
40535
|
}
|
|
40536
|
-
|
|
40537
|
-
function getYesterdayDate() {
|
|
40536
|
+
function getTodayDate() {
|
|
40538
40537
|
var today = new Date();
|
|
40539
|
-
|
|
40540
|
-
yesterday.setDate(today.getDate() - 1);
|
|
40541
|
-
return yesterday.getUTCFullYear() + '-' + padTo2Digits(yesterday.getUTCMonth() + 1) + '-' + padTo2Digits(yesterday.getUTCDate());
|
|
40538
|
+
return today.getUTCFullYear() + '-' + padTo2Digits(today.getUTCMonth() + 1) + '-' + padTo2Digits(today.getUTCDate());
|
|
40542
40539
|
}
|
|
40543
40540
|
|
|
40544
40541
|
var name="@firebase/database";var version="0.11.0";/**
|
|
@@ -44663,15 +44660,15 @@ function connect(firebaseConfig) {
|
|
|
44663
44660
|
}
|
|
44664
44661
|
|
|
44665
44662
|
function attachHandlers(setNotifications) {
|
|
44666
|
-
var
|
|
44667
|
-
firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(
|
|
44663
|
+
var today = getTodayDate();
|
|
44664
|
+
firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(today).on('value', function (snapshot) {
|
|
44668
44665
|
compose(setNotifications, filterNotifications, mapNotifications, values$1)(snapshot.val());
|
|
44669
44666
|
});
|
|
44670
44667
|
}
|
|
44671
44668
|
|
|
44672
44669
|
function _refetchNotifications(setNotifications) {
|
|
44673
|
-
var
|
|
44674
|
-
firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(
|
|
44670
|
+
var today = getTodayDate();
|
|
44671
|
+
firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(today).once('value').then(function (snapshot) {
|
|
44675
44672
|
compose(setNotifications, filterNotifications, mapNotifications, values$1)(snapshot.val());
|
|
44676
44673
|
});
|
|
44677
44674
|
}
|