sf-i-events 1.0.799 → 1.0.801
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/package.json +1 -1
- package/sf-i-events.d.ts +1 -0
- package/sf-i-events.js +114 -16
- package/src/sf-i-events.ts +118 -22
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -283,6 +283,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
283
283
|
selectedRegisterIndex: number;
|
|
284
284
|
selectallblock: string;
|
|
285
285
|
graphFilter: string;
|
|
286
|
+
recentlyReported: any;
|
|
286
287
|
static styles: import("lit").CSSResult;
|
|
287
288
|
_SfIEventsC: any;
|
|
288
289
|
_SfRowError: any;
|
package/sf-i-events.js
CHANGED
|
@@ -1235,6 +1235,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1235
1235
|
this.selectedRegisterIndex = -1;
|
|
1236
1236
|
this.selectallblock = "100";
|
|
1237
1237
|
this.graphFilter = "";
|
|
1238
|
+
this.recentlyReported = {};
|
|
1238
1239
|
this.isSelectedLegend = (value) => {
|
|
1239
1240
|
return this.chartSelectedLegend.includes(value);
|
|
1240
1241
|
};
|
|
@@ -2647,13 +2648,15 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2647
2648
|
return str.trim();
|
|
2648
2649
|
};
|
|
2649
2650
|
this.getGraphParam = (event) => {
|
|
2651
|
+
var _a;
|
|
2650
2652
|
let graphParam = '';
|
|
2651
2653
|
//console.log('getGraphParam', this.flowGraph, event);
|
|
2652
2654
|
if (Array.isArray(event[this.flowGraph])) {
|
|
2653
2655
|
graphParam = event[this.flowGraph].toString().replace(/ *\([^)]*\) */g, "").replace(/,/g, ' • ');
|
|
2654
2656
|
}
|
|
2655
2657
|
else {
|
|
2656
|
-
|
|
2658
|
+
console.log('event[this.flowGraph]', event[this.flowGraph], event, this.flowGraph);
|
|
2659
|
+
graphParam = ((_a = event[this.flowGraph]) !== null && _a !== void 0 ? _a : "").replace(/ *\([^)]*\) */g, "").replace(/,/g, ' • ');
|
|
2657
2660
|
}
|
|
2658
2661
|
return graphParam;
|
|
2659
2662
|
};
|
|
@@ -3364,6 +3367,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3364
3367
|
}
|
|
3365
3368
|
}
|
|
3366
3369
|
}
|
|
3370
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3371
|
+
this.recentlyReported[mmdd] = [];
|
|
3372
|
+
}
|
|
3373
|
+
this.recentlyReported[mmdd].push(event);
|
|
3367
3374
|
}
|
|
3368
3375
|
else {
|
|
3369
3376
|
let bulkBodyReview = [];
|
|
@@ -3408,6 +3415,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3408
3415
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationid && this.events[mmdd][p].entityid == entityid) {
|
|
3409
3416
|
this.events[mmdd][p].isbulk = true;
|
|
3410
3417
|
flagBulk = true;
|
|
3418
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3419
|
+
this.recentlyReported[mmdd] = [];
|
|
3420
|
+
}
|
|
3421
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3411
3422
|
}
|
|
3412
3423
|
}
|
|
3413
3424
|
}
|
|
@@ -3459,6 +3470,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3459
3470
|
}
|
|
3460
3471
|
}
|
|
3461
3472
|
}
|
|
3473
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3474
|
+
this.recentlyReported[mmdd] = [];
|
|
3475
|
+
}
|
|
3476
|
+
this.recentlyReported[mmdd].push(event);
|
|
3462
3477
|
}
|
|
3463
3478
|
else {
|
|
3464
3479
|
let bulkBodyAudit = [];
|
|
@@ -3500,6 +3515,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3500
3515
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3501
3516
|
this.events[mmdd][p].isbulk = true;
|
|
3502
3517
|
flagBulk = true;
|
|
3518
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3519
|
+
this.recentlyReported[mmdd] = [];
|
|
3520
|
+
}
|
|
3521
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3503
3522
|
}
|
|
3504
3523
|
}
|
|
3505
3524
|
}
|
|
@@ -3600,11 +3619,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3600
3619
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3601
3620
|
this.events[mmdd][p].approved = true;
|
|
3602
3621
|
// this.events[mmdd][p].documents = docs
|
|
3603
|
-
this.events[mmdd][p].comments.push({ 'author': '
|
|
3622
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3604
3623
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3605
3624
|
}
|
|
3606
3625
|
}
|
|
3607
3626
|
}
|
|
3627
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3628
|
+
this.recentlyReported[mmdd] = [];
|
|
3629
|
+
}
|
|
3630
|
+
this.recentlyReported[mmdd].push(event);
|
|
3631
|
+
console.log('recently reported', this.recentlyReported);
|
|
3608
3632
|
}
|
|
3609
3633
|
else {
|
|
3610
3634
|
let bulkBody = [];
|
|
@@ -3687,6 +3711,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3687
3711
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3688
3712
|
flagBulk = true;
|
|
3689
3713
|
this.events[mmdd][p].isbulk = true;
|
|
3714
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3715
|
+
this.recentlyReported[mmdd] = [];
|
|
3716
|
+
}
|
|
3717
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3690
3718
|
}
|
|
3691
3719
|
}
|
|
3692
3720
|
}
|
|
@@ -3841,7 +3869,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3841
3869
|
let firstDay = new Date(year, month, 1);
|
|
3842
3870
|
let endDay = new Date(year, month, 1);
|
|
3843
3871
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3844
|
-
var period = ("0" + (month + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' +
|
|
3872
|
+
var period = ("0" + (month + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (month + 1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + endDay.getFullYear();
|
|
3845
3873
|
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year, showBackgroundButton);
|
|
3846
3874
|
};
|
|
3847
3875
|
this.renderThisEvents = (index, startDate, showGraph = true, showBackgroundButton = false) => {
|
|
@@ -3862,7 +3890,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3862
3890
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
3863
3891
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
3864
3892
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3865
|
-
var period = ("0" + (
|
|
3893
|
+
var period = ("0" + (firstDay.getMonth() + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth() + 1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + endDay.getFullYear();
|
|
3866
3894
|
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"), showBackgroundButton);
|
|
3867
3895
|
};
|
|
3868
3896
|
this.renderRangeEvents = (firstDate, count, eventsContainer, showBackgroundButton = false) => {
|
|
@@ -3873,7 +3901,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3873
3901
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
3874
3902
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
3875
3903
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3876
|
-
var period = ("0" + (
|
|
3904
|
+
var period = ("0" + (firstDay.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDay.getDate()).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth() + 1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
3877
3905
|
console.log('rangeperiod', period);
|
|
3878
3906
|
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton);
|
|
3879
3907
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
@@ -7124,10 +7152,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7124
7152
|
this._SfCustomContainer.querySelector('#button-year-to-date').click();
|
|
7125
7153
|
};
|
|
7126
7154
|
this.renderThis = (index = 1, showGraph = true, showBackgroundButton) => {
|
|
7155
|
+
// this.clearGraphData();
|
|
7156
|
+
// this.clearSelectedGraphParam();
|
|
7157
|
+
// this.clearSelectedLegend();
|
|
7127
7158
|
var _a, _b;
|
|
7128
|
-
this.clearGraphData();
|
|
7129
|
-
this.clearSelectedGraphParam();
|
|
7130
|
-
this.clearSelectedLegend();
|
|
7131
7159
|
this.streamIndex = index;
|
|
7132
7160
|
var html = '';
|
|
7133
7161
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
@@ -7601,9 +7629,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7601
7629
|
//console.log('flowgraph renderStream', this.flowGraph);
|
|
7602
7630
|
var _a, _b;
|
|
7603
7631
|
this.streamIndex = index;
|
|
7604
|
-
this.clearGraphData();
|
|
7605
|
-
this.clearSelectedGraphParam();
|
|
7606
|
-
this.clearSelectedLegend();
|
|
7632
|
+
// this.clearGraphData();
|
|
7633
|
+
// this.clearSelectedGraphParam();
|
|
7634
|
+
// this.clearSelectedLegend();
|
|
7607
7635
|
var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
7608
7636
|
var html = '';
|
|
7609
7637
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
@@ -8112,7 +8140,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8112
8140
|
}
|
|
8113
8141
|
};
|
|
8114
8142
|
this.clearGraphData = () => {
|
|
8115
|
-
console.log('this.chart2 clearing graph data');
|
|
8116
8143
|
this.chart = null;
|
|
8117
8144
|
this.chart2 = null;
|
|
8118
8145
|
this.chart3 = null;
|
|
@@ -8227,6 +8254,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8227
8254
|
this.renderCompletenessGraph = (divContainer, selectedTab = -1, selectedSummary = -1, title = "Completeness") => {
|
|
8228
8255
|
this.clearSelectedGraphParam();
|
|
8229
8256
|
// this.clearSelectedLegend();
|
|
8257
|
+
this.graphFilter = "";
|
|
8230
8258
|
this.csvGraphStats = "";
|
|
8231
8259
|
this.csvCompletenessStats = "";
|
|
8232
8260
|
this.csvTimelinessStats = "";
|
|
@@ -8295,6 +8323,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8295
8323
|
//console.log('Rendering compliance graph...');
|
|
8296
8324
|
this.clearSelectedGraphParam();
|
|
8297
8325
|
// this.clearSelectedLegend();
|
|
8326
|
+
this.graphFilter = "";
|
|
8298
8327
|
this.csvGraphStats = "";
|
|
8299
8328
|
this.csvCompletenessStats = "";
|
|
8300
8329
|
this.csvTimelinessStats = "";
|
|
@@ -8344,6 +8373,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8344
8373
|
this.renderTimelinessGraph = (divContainer) => {
|
|
8345
8374
|
this.clearSelectedGraphParam();
|
|
8346
8375
|
// this.clearSelectedLegend();
|
|
8376
|
+
this.graphFilter = "";
|
|
8347
8377
|
this.csvGraphStats = "";
|
|
8348
8378
|
this.csvCompletenessStats = "";
|
|
8349
8379
|
this.csvTimelinessStats = "";
|
|
@@ -8574,6 +8604,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8574
8604
|
console.log('rendering graph chart2');
|
|
8575
8605
|
this.clearSelectedGraphParam();
|
|
8576
8606
|
// this.clearSelectedLegend();
|
|
8607
|
+
this.graphFilter = "";
|
|
8577
8608
|
this.csvGraphStats = "";
|
|
8578
8609
|
this.csvCompletenessStats = "";
|
|
8579
8610
|
this.csvTimelinessStats = "";
|
|
@@ -8935,6 +8966,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8935
8966
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
8936
8967
|
}
|
|
8937
8968
|
}
|
|
8969
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
8970
|
+
this.recentlyReported[mmdd] = [];
|
|
8971
|
+
}
|
|
8972
|
+
this.recentlyReported[mmdd].push(event);
|
|
8938
8973
|
console.log('review single');
|
|
8939
8974
|
}
|
|
8940
8975
|
else {
|
|
@@ -8980,6 +9015,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8980
9015
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
8981
9016
|
this.events[mmdd][p].isbulk = true;
|
|
8982
9017
|
flagBulk = true;
|
|
9018
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9019
|
+
this.recentlyReported[mmdd] = [];
|
|
9020
|
+
}
|
|
9021
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
8983
9022
|
}
|
|
8984
9023
|
}
|
|
8985
9024
|
}
|
|
@@ -9037,6 +9076,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9037
9076
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
9038
9077
|
}
|
|
9039
9078
|
}
|
|
9079
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9080
|
+
this.recentlyReported[mmdd] = [];
|
|
9081
|
+
}
|
|
9082
|
+
this.recentlyReported[mmdd].push(event);
|
|
9040
9083
|
console.log('uploadaudit single');
|
|
9041
9084
|
}
|
|
9042
9085
|
else {
|
|
@@ -9079,6 +9122,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9079
9122
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9080
9123
|
this.events[mmdd][p].isbulk = true;
|
|
9081
9124
|
flagBulk = true;
|
|
9125
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9126
|
+
this.recentlyReported[mmdd] = [];
|
|
9127
|
+
}
|
|
9128
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
9082
9129
|
}
|
|
9083
9130
|
}
|
|
9084
9131
|
}
|
|
@@ -9192,12 +9239,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9192
9239
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9193
9240
|
this.events[mmdd][p].approved = true;
|
|
9194
9241
|
// this.events[mmdd][p].documents = docs
|
|
9195
|
-
this.events[mmdd][p].comments.push({ 'author': '
|
|
9242
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
9196
9243
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
9197
9244
|
}
|
|
9198
9245
|
}
|
|
9199
9246
|
console.log('upload report auto approve single');
|
|
9200
9247
|
}
|
|
9248
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9249
|
+
this.recentlyReported[mmdd] = [];
|
|
9250
|
+
}
|
|
9251
|
+
this.recentlyReported[mmdd].push(event);
|
|
9201
9252
|
}
|
|
9202
9253
|
else {
|
|
9203
9254
|
let bulkBody = [];
|
|
@@ -9282,6 +9333,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9282
9333
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9283
9334
|
this.events[mmdd][p].isbulk = true;
|
|
9284
9335
|
flagBulk = true;
|
|
9336
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9337
|
+
this.recentlyReported[mmdd] = [];
|
|
9338
|
+
}
|
|
9339
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
9285
9340
|
}
|
|
9286
9341
|
}
|
|
9287
9342
|
}
|
|
@@ -10035,6 +10090,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10035
10090
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10036
10091
|
}
|
|
10037
10092
|
}
|
|
10093
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10094
|
+
this.recentlyReported[mmdd] = [];
|
|
10095
|
+
}
|
|
10096
|
+
this.recentlyReported[mmdd].push(event);
|
|
10038
10097
|
}
|
|
10039
10098
|
else {
|
|
10040
10099
|
let bulkBodyReview = [];
|
|
@@ -10079,6 +10138,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10079
10138
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10080
10139
|
this.events[mmdd][p].isbulk = true;
|
|
10081
10140
|
flagBulk = true;
|
|
10141
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10142
|
+
this.recentlyReported[mmdd] = [];
|
|
10143
|
+
}
|
|
10144
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10082
10145
|
}
|
|
10083
10146
|
}
|
|
10084
10147
|
}
|
|
@@ -10135,6 +10198,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10135
10198
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10136
10199
|
}
|
|
10137
10200
|
}
|
|
10201
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10202
|
+
this.recentlyReported[mmdd] = [];
|
|
10203
|
+
}
|
|
10204
|
+
this.recentlyReported[mmdd].push(event);
|
|
10138
10205
|
}
|
|
10139
10206
|
else {
|
|
10140
10207
|
let bulkBodyAudit = [];
|
|
@@ -10176,6 +10243,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10176
10243
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10177
10244
|
this.events[mmdd][p].isbulk = true;
|
|
10178
10245
|
flagBulk = true;
|
|
10246
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10247
|
+
this.recentlyReported[mmdd] = [];
|
|
10248
|
+
}
|
|
10249
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10179
10250
|
}
|
|
10180
10251
|
}
|
|
10181
10252
|
}
|
|
@@ -10295,6 +10366,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10295
10366
|
}
|
|
10296
10367
|
}
|
|
10297
10368
|
}
|
|
10369
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10370
|
+
this.recentlyReported[mmdd] = [];
|
|
10371
|
+
}
|
|
10372
|
+
this.recentlyReported[mmdd].push(event);
|
|
10298
10373
|
}
|
|
10299
10374
|
else {
|
|
10300
10375
|
let bulkBody = [];
|
|
@@ -10395,6 +10470,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10395
10470
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10396
10471
|
this.events[mmdd][p].isbulk = true;
|
|
10397
10472
|
flagBulk = true;
|
|
10473
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10474
|
+
this.recentlyReported[mmdd] = [];
|
|
10475
|
+
}
|
|
10476
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10398
10477
|
}
|
|
10399
10478
|
}
|
|
10400
10479
|
}
|
|
@@ -15440,6 +15519,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15440
15519
|
this.processGraphFilter = (clickedValue) => {
|
|
15441
15520
|
var _a;
|
|
15442
15521
|
let eventContainer = null;
|
|
15522
|
+
console.log('processGraphFilter called', clickedValue);
|
|
15443
15523
|
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
15444
15524
|
eventContainer = this._SfStreamContainer;
|
|
15445
15525
|
}
|
|
@@ -15480,6 +15560,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15480
15560
|
if (streamEventSummary == null) {
|
|
15481
15561
|
return;
|
|
15482
15562
|
}
|
|
15563
|
+
console.log('recentlyReported', this.recentlyReported);
|
|
15483
15564
|
if (this.graphParam == clickedValue) {
|
|
15484
15565
|
this.graphParam = "";
|
|
15485
15566
|
streamEventSummary.style.display = 'flex';
|
|
@@ -15496,10 +15577,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15496
15577
|
};
|
|
15497
15578
|
streamEventFilters.style.display = 'block';
|
|
15498
15579
|
streamEventFilters.innerHTML = '<div part="badge-dashboard" class="d-flex align-center justify-between mr-10 mb-10 no-shrink"><div><span>Filtered by</span> <span id="graph-total" part="badge-filter-name">' + clickedValue + '</span></div><button id="button-filter-cancel" part="button-icon"><span class="material-symbols-outlined">close</span></button></div>';
|
|
15499
|
-
console.log('processGraphFilter called');
|
|
15500
15580
|
(_a = streamEventFilters.querySelector('#button-filter-cancel')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
15501
15581
|
this.clearSelectedGraphParam();
|
|
15502
15582
|
});
|
|
15583
|
+
setTimeout(() => {
|
|
15584
|
+
this.recentlyReported = {};
|
|
15585
|
+
}, 10000);
|
|
15503
15586
|
}
|
|
15504
15587
|
for (var i = 0; i < divs.length; i++) {
|
|
15505
15588
|
// console.log('processGraphFilter', graphparamnames1[i], (graphparamnames1[i] as HTMLDivElement).innerHTML.toLowerCase().replace('&', '&').replace(/-/g, ' '), this.graphParam.toLowerCase().replace('&', '&').replace(/-/g, ' '));
|
|
@@ -15514,8 +15597,23 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15514
15597
|
break;
|
|
15515
15598
|
}
|
|
15516
15599
|
}
|
|
15517
|
-
if (buttonSelect[i] != null)
|
|
15600
|
+
if (buttonSelect[i] != null) {
|
|
15518
15601
|
buttonSelect[i].checked = false;
|
|
15602
|
+
let selectid = buttonSelect[i].id;
|
|
15603
|
+
let selectidArr = selectid.split('-');
|
|
15604
|
+
let selectMmdd = selectidArr[2] + '/' + selectidArr[3];
|
|
15605
|
+
let selectEntityid = selectidArr[7].replace(/_/g, '-');
|
|
15606
|
+
let selectLocationid = selectidArr[8].replace(/_/g, '-');
|
|
15607
|
+
let selectEventid = selectidArr[9].replace(/_/g, '-');
|
|
15608
|
+
if (this.recentlyReported[selectMmdd] != null) {
|
|
15609
|
+
for (let recentlyReportedEvent of this.recentlyReported[selectMmdd]) {
|
|
15610
|
+
if (recentlyReportedEvent.id == selectEventid && recentlyReportedEvent.locationid == selectLocationid && recentlyReportedEvent.entityid == selectEntityid) {
|
|
15611
|
+
filterFound = true;
|
|
15612
|
+
break;
|
|
15613
|
+
}
|
|
15614
|
+
}
|
|
15615
|
+
}
|
|
15616
|
+
}
|
|
15519
15617
|
if (filterFound) {
|
|
15520
15618
|
if (tables[i] != null) {
|
|
15521
15619
|
tables[i].style.display = 'block';
|
|
@@ -15556,7 +15654,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15556
15654
|
buttonListReporting[i].style.display = 'none';
|
|
15557
15655
|
}
|
|
15558
15656
|
}
|
|
15559
|
-
console.log('eventTitle', divs[i]);
|
|
15657
|
+
// console.log('eventTitle', divs[i]);
|
|
15560
15658
|
if (buttonSelect[i] != null)
|
|
15561
15659
|
buttonSelect[i].style.display = "none";
|
|
15562
15660
|
if (eventTitles[i] != null)
|
package/src/sf-i-events.ts
CHANGED
|
@@ -1647,6 +1647,8 @@ export class SfIEvents extends LitElement {
|
|
|
1647
1647
|
|
|
1648
1648
|
graphFilter:string = "";
|
|
1649
1649
|
|
|
1650
|
+
recentlyReported: any = {}
|
|
1651
|
+
|
|
1650
1652
|
static override styles = css`
|
|
1651
1653
|
|
|
1652
1654
|
.bg-white {
|
|
@@ -4872,7 +4874,8 @@ export class SfIEvents extends LitElement {
|
|
|
4872
4874
|
if(Array.isArray(event[this.flowGraph])) {
|
|
4873
4875
|
graphParam = event[this.flowGraph].toString().replace(/ *\([^)]*\) */g, "").replace(/,/g,' • ');
|
|
4874
4876
|
} else {
|
|
4875
|
-
|
|
4877
|
+
console.log('event[this.flowGraph]', event[this.flowGraph], event, this.flowGraph)
|
|
4878
|
+
graphParam = (event[this.flowGraph] ?? "").replace(/ *\([^)]*\) */g, "").replace(/,/g,' • ');
|
|
4876
4879
|
}
|
|
4877
4880
|
return graphParam;
|
|
4878
4881
|
}
|
|
@@ -5700,6 +5703,10 @@ export class SfIEvents extends LitElement {
|
|
|
5700
5703
|
}
|
|
5701
5704
|
}
|
|
5702
5705
|
}
|
|
5706
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5707
|
+
this.recentlyReported[mmdd] = []
|
|
5708
|
+
}
|
|
5709
|
+
this.recentlyReported[mmdd].push(event)
|
|
5703
5710
|
}else{
|
|
5704
5711
|
let bulkBodyReview = []
|
|
5705
5712
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5750,6 +5757,10 @@ export class SfIEvents extends LitElement {
|
|
|
5750
5757
|
|
|
5751
5758
|
this.events[mmdd][p].isbulk = true
|
|
5752
5759
|
flagBulk = true
|
|
5760
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5761
|
+
this.recentlyReported[mmdd] = []
|
|
5762
|
+
}
|
|
5763
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
5753
5764
|
}
|
|
5754
5765
|
}
|
|
5755
5766
|
}
|
|
@@ -5803,6 +5814,10 @@ export class SfIEvents extends LitElement {
|
|
|
5803
5814
|
}
|
|
5804
5815
|
}
|
|
5805
5816
|
}
|
|
5817
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5818
|
+
this.recentlyReported[mmdd] = []
|
|
5819
|
+
}
|
|
5820
|
+
this.recentlyReported[mmdd].push(event)
|
|
5806
5821
|
}else{
|
|
5807
5822
|
let bulkBodyAudit = []
|
|
5808
5823
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5850,6 +5865,10 @@ export class SfIEvents extends LitElement {
|
|
|
5850
5865
|
|
|
5851
5866
|
this.events[mmdd][p].isbulk = true
|
|
5852
5867
|
flagBulk = true;
|
|
5868
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5869
|
+
this.recentlyReported[mmdd] = []
|
|
5870
|
+
}
|
|
5871
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
5853
5872
|
}
|
|
5854
5873
|
}
|
|
5855
5874
|
}
|
|
@@ -5966,6 +5985,7 @@ export class SfIEvents extends LitElement {
|
|
|
5966
5985
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5967
5986
|
}
|
|
5968
5987
|
}
|
|
5988
|
+
|
|
5969
5989
|
if(event.makercheckers.length > 0) {
|
|
5970
5990
|
|
|
5971
5991
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
@@ -5973,11 +5993,16 @@ export class SfIEvents extends LitElement {
|
|
|
5973
5993
|
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
5974
5994
|
this.events[mmdd][p].approved = true
|
|
5975
5995
|
// this.events[mmdd][p].documents = docs
|
|
5976
|
-
this.events[mmdd][p].comments.push({'author': '
|
|
5996
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
5977
5997
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5978
5998
|
}
|
|
5979
5999
|
}
|
|
5980
6000
|
}
|
|
6001
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6002
|
+
this.recentlyReported[mmdd] = []
|
|
6003
|
+
}
|
|
6004
|
+
this.recentlyReported[mmdd].push(event)
|
|
6005
|
+
console.log('recently reported', this.recentlyReported)
|
|
5981
6006
|
}else{
|
|
5982
6007
|
let bulkBody = []
|
|
5983
6008
|
let bulkBodyReview = []
|
|
@@ -6068,6 +6093,10 @@ export class SfIEvents extends LitElement {
|
|
|
6068
6093
|
if(this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
6069
6094
|
flagBulk = true;
|
|
6070
6095
|
this.events[mmdd][p].isbulk = true
|
|
6096
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6097
|
+
this.recentlyReported[mmdd] = []
|
|
6098
|
+
}
|
|
6099
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
6071
6100
|
}
|
|
6072
6101
|
}
|
|
6073
6102
|
}
|
|
@@ -6238,7 +6267,7 @@ export class SfIEvents extends LitElement {
|
|
|
6238
6267
|
let firstDay = new Date(year, month, 1);
|
|
6239
6268
|
let endDay = new Date(year, month, 1);
|
|
6240
6269
|
endDay?.setDate(endDay.getDate() + lastDay + 1);
|
|
6241
|
-
var period = ("0" + (month+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' +
|
|
6270
|
+
var period = ("0" + (month+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (month+1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + endDay.getFullYear()
|
|
6242
6271
|
|
|
6243
6272
|
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year, showBackgroundButton);
|
|
6244
6273
|
|
|
@@ -6272,7 +6301,7 @@ export class SfIEvents extends LitElement {
|
|
|
6272
6301
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
6273
6302
|
endDay?.setDate(endDay.getDate() + lastDay + 1);
|
|
6274
6303
|
|
|
6275
|
-
var period = ("0" + (
|
|
6304
|
+
var period = ("0" + (firstDay.getMonth()+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth()+1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + endDay.getFullYear()
|
|
6276
6305
|
|
|
6277
6306
|
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"), showBackgroundButton);
|
|
6278
6307
|
|
|
@@ -6289,7 +6318,7 @@ export class SfIEvents extends LitElement {
|
|
|
6289
6318
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
6290
6319
|
endDay?.setDate(endDay.getDate() + lastDay + 1);
|
|
6291
6320
|
|
|
6292
|
-
var period = ("0" + (
|
|
6321
|
+
var period = ("0" + (firstDay.getMonth()+1)).slice(-2) + "/" + ("0" + firstDay.getDate()).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth()+1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
6293
6322
|
|
|
6294
6323
|
console.log('rangeperiod', period)
|
|
6295
6324
|
|
|
@@ -10195,9 +10224,9 @@ export class SfIEvents extends LitElement {
|
|
|
10195
10224
|
|
|
10196
10225
|
renderThis = (index: number = 1, showGraph: boolean = true, showBackgroundButton: boolean) => {
|
|
10197
10226
|
|
|
10198
|
-
this.clearGraphData();
|
|
10199
|
-
this.clearSelectedGraphParam();
|
|
10200
|
-
this.clearSelectedLegend();
|
|
10227
|
+
// this.clearGraphData();
|
|
10228
|
+
// this.clearSelectedGraphParam();
|
|
10229
|
+
// this.clearSelectedLegend();
|
|
10201
10230
|
|
|
10202
10231
|
this.streamIndex = index;
|
|
10203
10232
|
|
|
@@ -10769,9 +10798,9 @@ export class SfIEvents extends LitElement {
|
|
|
10769
10798
|
|
|
10770
10799
|
this.streamIndex = index;
|
|
10771
10800
|
|
|
10772
|
-
this.clearGraphData();
|
|
10773
|
-
this.clearSelectedGraphParam();
|
|
10774
|
-
this.clearSelectedLegend();
|
|
10801
|
+
// this.clearGraphData();
|
|
10802
|
+
// this.clearSelectedGraphParam();
|
|
10803
|
+
// this.clearSelectedLegend();
|
|
10775
10804
|
|
|
10776
10805
|
|
|
10777
10806
|
var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
@@ -11404,7 +11433,6 @@ export class SfIEvents extends LitElement {
|
|
|
11404
11433
|
}
|
|
11405
11434
|
|
|
11406
11435
|
clearGraphData = () => {
|
|
11407
|
-
console.log('this.chart2 clearing graph data');
|
|
11408
11436
|
this.chart = null;
|
|
11409
11437
|
this.chart2 = null;
|
|
11410
11438
|
this.chart3 = null;
|
|
@@ -11562,7 +11590,7 @@ export class SfIEvents extends LitElement {
|
|
|
11562
11590
|
|
|
11563
11591
|
this.clearSelectedGraphParam();
|
|
11564
11592
|
// this.clearSelectedLegend();
|
|
11565
|
-
|
|
11593
|
+
this.graphFilter = "";
|
|
11566
11594
|
this.csvGraphStats = "";
|
|
11567
11595
|
this.csvCompletenessStats = "";
|
|
11568
11596
|
this.csvTimelinessStats = "";
|
|
@@ -11643,6 +11671,7 @@ export class SfIEvents extends LitElement {
|
|
|
11643
11671
|
|
|
11644
11672
|
this.clearSelectedGraphParam();
|
|
11645
11673
|
// this.clearSelectedLegend();
|
|
11674
|
+
this.graphFilter = "";
|
|
11646
11675
|
|
|
11647
11676
|
this.csvGraphStats = "";
|
|
11648
11677
|
this.csvCompletenessStats = "";
|
|
@@ -11703,6 +11732,7 @@ export class SfIEvents extends LitElement {
|
|
|
11703
11732
|
|
|
11704
11733
|
this.clearSelectedGraphParam();
|
|
11705
11734
|
// this.clearSelectedLegend();
|
|
11735
|
+
this.graphFilter = "";
|
|
11706
11736
|
|
|
11707
11737
|
this.csvGraphStats = "";
|
|
11708
11738
|
this.csvCompletenessStats = "";
|
|
@@ -12005,7 +12035,8 @@ export class SfIEvents extends LitElement {
|
|
|
12005
12035
|
console.log('rendering graph chart2');
|
|
12006
12036
|
this.clearSelectedGraphParam();
|
|
12007
12037
|
// this.clearSelectedLegend();
|
|
12008
|
-
|
|
12038
|
+
this.graphFilter = "";
|
|
12039
|
+
|
|
12009
12040
|
this.csvGraphStats = "";
|
|
12010
12041
|
this.csvCompletenessStats = "";
|
|
12011
12042
|
this.csvTimelinessStats = "";
|
|
@@ -12470,6 +12501,10 @@ export class SfIEvents extends LitElement {
|
|
|
12470
12501
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12471
12502
|
}
|
|
12472
12503
|
}
|
|
12504
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12505
|
+
this.recentlyReported[mmdd] = []
|
|
12506
|
+
}
|
|
12507
|
+
this.recentlyReported[mmdd].push(event)
|
|
12473
12508
|
console.log('review single')
|
|
12474
12509
|
} else {
|
|
12475
12510
|
let bulkBodyReview = []
|
|
@@ -12521,6 +12556,10 @@ export class SfIEvents extends LitElement {
|
|
|
12521
12556
|
|
|
12522
12557
|
this.events[mmdd][p].isbulk = true
|
|
12523
12558
|
flagBulk = true;
|
|
12559
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12560
|
+
this.recentlyReported[mmdd] = []
|
|
12561
|
+
}
|
|
12562
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12524
12563
|
}
|
|
12525
12564
|
}
|
|
12526
12565
|
}
|
|
@@ -12582,6 +12621,10 @@ export class SfIEvents extends LitElement {
|
|
|
12582
12621
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12583
12622
|
}
|
|
12584
12623
|
}
|
|
12624
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12625
|
+
this.recentlyReported[mmdd] = []
|
|
12626
|
+
}
|
|
12627
|
+
this.recentlyReported[mmdd].push(event)
|
|
12585
12628
|
console.log('uploadaudit single')
|
|
12586
12629
|
} else {
|
|
12587
12630
|
let bulkBodyAudit = []
|
|
@@ -12630,6 +12673,10 @@ export class SfIEvents extends LitElement {
|
|
|
12630
12673
|
|
|
12631
12674
|
this.events[mmdd][p].isbulk = true
|
|
12632
12675
|
flagBulk = true;
|
|
12676
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12677
|
+
this.recentlyReported[mmdd] = []
|
|
12678
|
+
}
|
|
12679
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12633
12680
|
}
|
|
12634
12681
|
}
|
|
12635
12682
|
}
|
|
@@ -12772,12 +12819,16 @@ export class SfIEvents extends LitElement {
|
|
|
12772
12819
|
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
12773
12820
|
this.events[mmdd][p].approved = true
|
|
12774
12821
|
// this.events[mmdd][p].documents = docs
|
|
12775
|
-
this.events[mmdd][p].comments.push({'author': '
|
|
12822
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
12776
12823
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12777
12824
|
}
|
|
12778
12825
|
}
|
|
12779
12826
|
console.log('upload report auto approve single')
|
|
12780
12827
|
}
|
|
12828
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12829
|
+
this.recentlyReported[mmdd] = []
|
|
12830
|
+
}
|
|
12831
|
+
this.recentlyReported[mmdd].push(event)
|
|
12781
12832
|
|
|
12782
12833
|
} else {
|
|
12783
12834
|
let bulkBody = []
|
|
@@ -12872,6 +12923,10 @@ export class SfIEvents extends LitElement {
|
|
|
12872
12923
|
|
|
12873
12924
|
this.events[mmdd][p].isbulk = true
|
|
12874
12925
|
flagBulk = true;
|
|
12926
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12927
|
+
this.recentlyReported[mmdd] = []
|
|
12928
|
+
}
|
|
12929
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12875
12930
|
}
|
|
12876
12931
|
}
|
|
12877
12932
|
}
|
|
@@ -13753,6 +13808,10 @@ export class SfIEvents extends LitElement {
|
|
|
13753
13808
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13754
13809
|
}
|
|
13755
13810
|
}
|
|
13811
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13812
|
+
this.recentlyReported[mmdd] = []
|
|
13813
|
+
}
|
|
13814
|
+
this.recentlyReported[mmdd].push(event)
|
|
13756
13815
|
} else {
|
|
13757
13816
|
let bulkBodyReview = []
|
|
13758
13817
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -13803,6 +13862,10 @@ export class SfIEvents extends LitElement {
|
|
|
13803
13862
|
|
|
13804
13863
|
this.events[mmdd][p].isbulk = true
|
|
13805
13864
|
flagBulk = true;
|
|
13865
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13866
|
+
this.recentlyReported[mmdd] = []
|
|
13867
|
+
}
|
|
13868
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
13806
13869
|
}
|
|
13807
13870
|
}
|
|
13808
13871
|
}
|
|
@@ -13863,6 +13926,10 @@ export class SfIEvents extends LitElement {
|
|
|
13863
13926
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13864
13927
|
}
|
|
13865
13928
|
}
|
|
13929
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13930
|
+
this.recentlyReported[mmdd] = []
|
|
13931
|
+
}
|
|
13932
|
+
this.recentlyReported[mmdd].push(event)
|
|
13866
13933
|
} else {
|
|
13867
13934
|
let bulkBodyAudit = []
|
|
13868
13935
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -13910,6 +13977,10 @@ export class SfIEvents extends LitElement {
|
|
|
13910
13977
|
|
|
13911
13978
|
this.events[mmdd][p].isbulk = true
|
|
13912
13979
|
flagBulk = true;
|
|
13980
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13981
|
+
this.recentlyReported[mmdd] = []
|
|
13982
|
+
}
|
|
13983
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
13913
13984
|
}
|
|
13914
13985
|
}
|
|
13915
13986
|
}
|
|
@@ -14057,6 +14128,10 @@ export class SfIEvents extends LitElement {
|
|
|
14057
14128
|
}
|
|
14058
14129
|
}
|
|
14059
14130
|
}
|
|
14131
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14132
|
+
this.recentlyReported[mmdd] = []
|
|
14133
|
+
}
|
|
14134
|
+
this.recentlyReported[mmdd].push(event)
|
|
14060
14135
|
|
|
14061
14136
|
} else {
|
|
14062
14137
|
let bulkBody = []
|
|
@@ -14165,6 +14240,10 @@ export class SfIEvents extends LitElement {
|
|
|
14165
14240
|
|
|
14166
14241
|
this.events[mmdd][p].isbulk = true
|
|
14167
14242
|
flagBulk = true;
|
|
14243
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14244
|
+
this.recentlyReported[mmdd] = []
|
|
14245
|
+
}
|
|
14246
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
14168
14247
|
}
|
|
14169
14248
|
}
|
|
14170
14249
|
}
|
|
@@ -20610,7 +20689,7 @@ export class SfIEvents extends LitElement {
|
|
|
20610
20689
|
processGraphFilter = (clickedValue: string) => {
|
|
20611
20690
|
|
|
20612
20691
|
let eventContainer = null;
|
|
20613
|
-
|
|
20692
|
+
console.log('processGraphFilter called', clickedValue);
|
|
20614
20693
|
if(this.getCurrentTab() == this.TAB_STREAM) {
|
|
20615
20694
|
eventContainer = (this._SfStreamContainer as HTMLDivElement);
|
|
20616
20695
|
}
|
|
@@ -20660,7 +20739,7 @@ export class SfIEvents extends LitElement {
|
|
|
20660
20739
|
if(streamEventSummary == null) {
|
|
20661
20740
|
return;
|
|
20662
20741
|
}
|
|
20663
|
-
|
|
20742
|
+
console.log('recentlyReported', this.recentlyReported);
|
|
20664
20743
|
if(this.graphParam == clickedValue) {
|
|
20665
20744
|
|
|
20666
20745
|
this.graphParam = "";
|
|
@@ -20679,11 +20758,12 @@ export class SfIEvents extends LitElement {
|
|
|
20679
20758
|
};
|
|
20680
20759
|
(streamEventFilters as HTMLDivElement).style.display = 'block';
|
|
20681
20760
|
(streamEventFilters as HTMLDivElement).innerHTML = '<div part="badge-dashboard" class="d-flex align-center justify-between mr-10 mb-10 no-shrink"><div><span>Filtered by</span> <span id="graph-total" part="badge-filter-name">'+clickedValue+'</span></div><button id="button-filter-cancel" part="button-icon"><span class="material-symbols-outlined">close</span></button></div>';
|
|
20682
|
-
console.log('processGraphFilter called');
|
|
20683
20761
|
(streamEventFilters as HTMLDivElement).querySelector('#button-filter-cancel')?.addEventListener('click', () => {
|
|
20684
20762
|
this.clearSelectedGraphParam();
|
|
20685
20763
|
});
|
|
20686
|
-
|
|
20764
|
+
setTimeout(() => {
|
|
20765
|
+
this.recentlyReported = {}
|
|
20766
|
+
}, 10000);
|
|
20687
20767
|
}
|
|
20688
20768
|
|
|
20689
20769
|
|
|
@@ -20701,7 +20781,24 @@ export class SfIEvents extends LitElement {
|
|
|
20701
20781
|
break;
|
|
20702
20782
|
}
|
|
20703
20783
|
}
|
|
20704
|
-
if(buttonSelect[i] != null)
|
|
20784
|
+
if(buttonSelect[i] != null){
|
|
20785
|
+
buttonSelect[i].checked = false
|
|
20786
|
+
let selectid = buttonSelect[i].id
|
|
20787
|
+
let selectidArr = selectid.split('-')
|
|
20788
|
+
let selectMmdd = selectidArr[2] + '/' + selectidArr[3]
|
|
20789
|
+
let selectEntityid = selectidArr[7].replace(/_/g,'-')
|
|
20790
|
+
let selectLocationid = selectidArr[8].replace(/_/g,'-')
|
|
20791
|
+
let selectEventid = selectidArr[9].replace(/_/g,'-')
|
|
20792
|
+
if(this.recentlyReported[selectMmdd] != null){
|
|
20793
|
+
for(let recentlyReportedEvent of this.recentlyReported[selectMmdd]){
|
|
20794
|
+
if(recentlyReportedEvent.id == selectEventid && recentlyReportedEvent.locationid == selectLocationid && recentlyReportedEvent.entityid == selectEntityid){
|
|
20795
|
+
filterFound = true;
|
|
20796
|
+
break;
|
|
20797
|
+
}
|
|
20798
|
+
}
|
|
20799
|
+
}
|
|
20800
|
+
}
|
|
20801
|
+
|
|
20705
20802
|
if(filterFound) {
|
|
20706
20803
|
if(tables[i] != null){
|
|
20707
20804
|
(tables[i] as HTMLDivElement).style.display = 'block';
|
|
@@ -20735,7 +20832,7 @@ export class SfIEvents extends LitElement {
|
|
|
20735
20832
|
buttonListReporting[i].style.display = 'none';
|
|
20736
20833
|
}
|
|
20737
20834
|
}
|
|
20738
|
-
console.log('eventTitle', divs[i]);
|
|
20835
|
+
// console.log('eventTitle', divs[i]);
|
|
20739
20836
|
if(buttonSelect[i] != null)buttonSelect[i].style.display = "none"
|
|
20740
20837
|
if(eventTitles[i] != null)(eventTitles[i]).style.display = 'none';
|
|
20741
20838
|
if(divs[i] != null) divs[i].style.display = 'none'
|
|
@@ -20755,7 +20852,6 @@ export class SfIEvents extends LitElement {
|
|
|
20755
20852
|
for(let streamEventTitle of streamEventTitles){
|
|
20756
20853
|
streamEventTitle.removeAttribute('part')
|
|
20757
20854
|
}
|
|
20758
|
-
|
|
20759
20855
|
}
|
|
20760
20856
|
|
|
20761
20857
|
processClickOnLegend = (index: number, legendItem: any) => {
|