sf-i-events 1.0.798 → 1.0.800
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 +2 -0
- package/sf-i-events.js +110 -14
- package/src/sf-i-events.ts +115 -19
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -282,6 +282,8 @@ export declare class SfIEvents extends LitElement {
|
|
|
282
282
|
selectedCountryIndex: number;
|
|
283
283
|
selectedRegisterIndex: number;
|
|
284
284
|
selectallblock: string;
|
|
285
|
+
graphFilter: string;
|
|
286
|
+
recentlyReported: any;
|
|
285
287
|
static styles: import("lit").CSSResult;
|
|
286
288
|
_SfIEventsC: any;
|
|
287
289
|
_SfRowError: any;
|
package/sf-i-events.js
CHANGED
|
@@ -1234,6 +1234,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1234
1234
|
this.selectedCountryIndex = 0;
|
|
1235
1235
|
this.selectedRegisterIndex = -1;
|
|
1236
1236
|
this.selectallblock = "100";
|
|
1237
|
+
this.graphFilter = "";
|
|
1238
|
+
this.recentlyReported = {};
|
|
1237
1239
|
this.isSelectedLegend = (value) => {
|
|
1238
1240
|
return this.chartSelectedLegend.includes(value);
|
|
1239
1241
|
};
|
|
@@ -1290,7 +1292,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1290
1292
|
this.barCharDataSet4.pop();
|
|
1291
1293
|
}
|
|
1292
1294
|
}
|
|
1293
|
-
this.processGraphFilter(
|
|
1295
|
+
this.processGraphFilter(this.graphFilter);
|
|
1294
1296
|
this.selectedFilters = null;
|
|
1295
1297
|
};
|
|
1296
1298
|
this.getEventField = (field) => {
|
|
@@ -3363,6 +3365,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3363
3365
|
}
|
|
3364
3366
|
}
|
|
3365
3367
|
}
|
|
3368
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3369
|
+
this.recentlyReported[mmdd] = [];
|
|
3370
|
+
}
|
|
3371
|
+
this.recentlyReported[mmdd].push(event);
|
|
3366
3372
|
}
|
|
3367
3373
|
else {
|
|
3368
3374
|
let bulkBodyReview = [];
|
|
@@ -3407,6 +3413,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3407
3413
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationid && this.events[mmdd][p].entityid == entityid) {
|
|
3408
3414
|
this.events[mmdd][p].isbulk = true;
|
|
3409
3415
|
flagBulk = true;
|
|
3416
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3417
|
+
this.recentlyReported[mmdd] = [];
|
|
3418
|
+
}
|
|
3419
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3410
3420
|
}
|
|
3411
3421
|
}
|
|
3412
3422
|
}
|
|
@@ -3458,6 +3468,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3458
3468
|
}
|
|
3459
3469
|
}
|
|
3460
3470
|
}
|
|
3471
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3472
|
+
this.recentlyReported[mmdd] = [];
|
|
3473
|
+
}
|
|
3474
|
+
this.recentlyReported[mmdd].push(event);
|
|
3461
3475
|
}
|
|
3462
3476
|
else {
|
|
3463
3477
|
let bulkBodyAudit = [];
|
|
@@ -3499,6 +3513,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3499
3513
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3500
3514
|
this.events[mmdd][p].isbulk = true;
|
|
3501
3515
|
flagBulk = true;
|
|
3516
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3517
|
+
this.recentlyReported[mmdd] = [];
|
|
3518
|
+
}
|
|
3519
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3502
3520
|
}
|
|
3503
3521
|
}
|
|
3504
3522
|
}
|
|
@@ -3599,11 +3617,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3599
3617
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3600
3618
|
this.events[mmdd][p].approved = true;
|
|
3601
3619
|
// this.events[mmdd][p].documents = docs
|
|
3602
|
-
this.events[mmdd][p].comments.push({ 'author': '
|
|
3620
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3603
3621
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3604
3622
|
}
|
|
3605
3623
|
}
|
|
3606
3624
|
}
|
|
3625
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3626
|
+
this.recentlyReported[mmdd] = [];
|
|
3627
|
+
}
|
|
3628
|
+
this.recentlyReported[mmdd].push(event);
|
|
3629
|
+
console.log('recently reported', this.recentlyReported);
|
|
3607
3630
|
}
|
|
3608
3631
|
else {
|
|
3609
3632
|
let bulkBody = [];
|
|
@@ -3686,6 +3709,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3686
3709
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3687
3710
|
flagBulk = true;
|
|
3688
3711
|
this.events[mmdd][p].isbulk = true;
|
|
3712
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3713
|
+
this.recentlyReported[mmdd] = [];
|
|
3714
|
+
}
|
|
3715
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3689
3716
|
}
|
|
3690
3717
|
}
|
|
3691
3718
|
}
|
|
@@ -3728,7 +3755,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3728
3755
|
});
|
|
3729
3756
|
this._SfUploader[0].querySelector('#uploader').addEventListener('analysisCompleted', (_ev) => {
|
|
3730
3757
|
console.log('uploader analysisInProgress', _ev);
|
|
3731
|
-
listReportingContainer.querySelector('.uploader-analysis-message')
|
|
3758
|
+
if (listReportingContainer.querySelector('.uploader-analysis-message') != null) {
|
|
3759
|
+
listReportingContainer.querySelector('.uploader-analysis-message').style.display = "none";
|
|
3760
|
+
}
|
|
3732
3761
|
});
|
|
3733
3762
|
//console.log('documentType checking', documentType);
|
|
3734
3763
|
if (event.documentType != null) {
|
|
@@ -7121,10 +7150,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7121
7150
|
this._SfCustomContainer.querySelector('#button-year-to-date').click();
|
|
7122
7151
|
};
|
|
7123
7152
|
this.renderThis = (index = 1, showGraph = true, showBackgroundButton) => {
|
|
7153
|
+
// this.clearGraphData();
|
|
7154
|
+
// this.clearSelectedGraphParam();
|
|
7155
|
+
// this.clearSelectedLegend();
|
|
7124
7156
|
var _a, _b;
|
|
7125
|
-
this.clearGraphData();
|
|
7126
|
-
this.clearSelectedGraphParam();
|
|
7127
|
-
this.clearSelectedLegend();
|
|
7128
7157
|
this.streamIndex = index;
|
|
7129
7158
|
var html = '';
|
|
7130
7159
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
@@ -7598,9 +7627,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7598
7627
|
//console.log('flowgraph renderStream', this.flowGraph);
|
|
7599
7628
|
var _a, _b;
|
|
7600
7629
|
this.streamIndex = index;
|
|
7601
|
-
this.clearGraphData();
|
|
7602
|
-
this.clearSelectedGraphParam();
|
|
7603
|
-
this.clearSelectedLegend();
|
|
7630
|
+
// this.clearGraphData();
|
|
7631
|
+
// this.clearSelectedGraphParam();
|
|
7632
|
+
// this.clearSelectedLegend();
|
|
7604
7633
|
var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
7605
7634
|
var html = '';
|
|
7606
7635
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
@@ -8109,7 +8138,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8109
8138
|
}
|
|
8110
8139
|
};
|
|
8111
8140
|
this.clearGraphData = () => {
|
|
8112
|
-
console.log('this.chart2 clearing graph data');
|
|
8113
8141
|
this.chart = null;
|
|
8114
8142
|
this.chart2 = null;
|
|
8115
8143
|
this.chart3 = null;
|
|
@@ -8932,6 +8960,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8932
8960
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
8933
8961
|
}
|
|
8934
8962
|
}
|
|
8963
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
8964
|
+
this.recentlyReported[mmdd] = [];
|
|
8965
|
+
}
|
|
8966
|
+
this.recentlyReported[mmdd].push(event);
|
|
8935
8967
|
console.log('review single');
|
|
8936
8968
|
}
|
|
8937
8969
|
else {
|
|
@@ -8977,6 +9009,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8977
9009
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
8978
9010
|
this.events[mmdd][p].isbulk = true;
|
|
8979
9011
|
flagBulk = true;
|
|
9012
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9013
|
+
this.recentlyReported[mmdd] = [];
|
|
9014
|
+
}
|
|
9015
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
8980
9016
|
}
|
|
8981
9017
|
}
|
|
8982
9018
|
}
|
|
@@ -9034,6 +9070,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9034
9070
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
9035
9071
|
}
|
|
9036
9072
|
}
|
|
9073
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9074
|
+
this.recentlyReported[mmdd] = [];
|
|
9075
|
+
}
|
|
9076
|
+
this.recentlyReported[mmdd].push(event);
|
|
9037
9077
|
console.log('uploadaudit single');
|
|
9038
9078
|
}
|
|
9039
9079
|
else {
|
|
@@ -9076,6 +9116,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9076
9116
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9077
9117
|
this.events[mmdd][p].isbulk = true;
|
|
9078
9118
|
flagBulk = true;
|
|
9119
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9120
|
+
this.recentlyReported[mmdd] = [];
|
|
9121
|
+
}
|
|
9122
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
9079
9123
|
}
|
|
9080
9124
|
}
|
|
9081
9125
|
}
|
|
@@ -9189,12 +9233,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9189
9233
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9190
9234
|
this.events[mmdd][p].approved = true;
|
|
9191
9235
|
// this.events[mmdd][p].documents = docs
|
|
9192
|
-
this.events[mmdd][p].comments.push({ 'author': '
|
|
9236
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
9193
9237
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
9194
9238
|
}
|
|
9195
9239
|
}
|
|
9196
9240
|
console.log('upload report auto approve single');
|
|
9197
9241
|
}
|
|
9242
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9243
|
+
this.recentlyReported[mmdd] = [];
|
|
9244
|
+
}
|
|
9245
|
+
this.recentlyReported[mmdd].push(event);
|
|
9198
9246
|
}
|
|
9199
9247
|
else {
|
|
9200
9248
|
let bulkBody = [];
|
|
@@ -9279,6 +9327,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9279
9327
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9280
9328
|
this.events[mmdd][p].isbulk = true;
|
|
9281
9329
|
flagBulk = true;
|
|
9330
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
9331
|
+
this.recentlyReported[mmdd] = [];
|
|
9332
|
+
}
|
|
9333
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
9282
9334
|
}
|
|
9283
9335
|
}
|
|
9284
9336
|
}
|
|
@@ -10032,6 +10084,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10032
10084
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10033
10085
|
}
|
|
10034
10086
|
}
|
|
10087
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10088
|
+
this.recentlyReported[mmdd] = [];
|
|
10089
|
+
}
|
|
10090
|
+
this.recentlyReported[mmdd].push(event);
|
|
10035
10091
|
}
|
|
10036
10092
|
else {
|
|
10037
10093
|
let bulkBodyReview = [];
|
|
@@ -10076,6 +10132,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10076
10132
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10077
10133
|
this.events[mmdd][p].isbulk = true;
|
|
10078
10134
|
flagBulk = true;
|
|
10135
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10136
|
+
this.recentlyReported[mmdd] = [];
|
|
10137
|
+
}
|
|
10138
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10079
10139
|
}
|
|
10080
10140
|
}
|
|
10081
10141
|
}
|
|
@@ -10132,6 +10192,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10132
10192
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10133
10193
|
}
|
|
10134
10194
|
}
|
|
10195
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10196
|
+
this.recentlyReported[mmdd] = [];
|
|
10197
|
+
}
|
|
10198
|
+
this.recentlyReported[mmdd].push(event);
|
|
10135
10199
|
}
|
|
10136
10200
|
else {
|
|
10137
10201
|
let bulkBodyAudit = [];
|
|
@@ -10173,6 +10237,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10173
10237
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10174
10238
|
this.events[mmdd][p].isbulk = true;
|
|
10175
10239
|
flagBulk = true;
|
|
10240
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10241
|
+
this.recentlyReported[mmdd] = [];
|
|
10242
|
+
}
|
|
10243
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10176
10244
|
}
|
|
10177
10245
|
}
|
|
10178
10246
|
}
|
|
@@ -10292,6 +10360,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10292
10360
|
}
|
|
10293
10361
|
}
|
|
10294
10362
|
}
|
|
10363
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10364
|
+
this.recentlyReported[mmdd] = [];
|
|
10365
|
+
}
|
|
10366
|
+
this.recentlyReported[mmdd].push(event);
|
|
10295
10367
|
}
|
|
10296
10368
|
else {
|
|
10297
10369
|
let bulkBody = [];
|
|
@@ -10392,6 +10464,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10392
10464
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10393
10465
|
this.events[mmdd][p].isbulk = true;
|
|
10394
10466
|
flagBulk = true;
|
|
10467
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10468
|
+
this.recentlyReported[mmdd] = [];
|
|
10469
|
+
}
|
|
10470
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10395
10471
|
}
|
|
10396
10472
|
}
|
|
10397
10473
|
}
|
|
@@ -15437,6 +15513,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15437
15513
|
this.processGraphFilter = (clickedValue) => {
|
|
15438
15514
|
var _a;
|
|
15439
15515
|
let eventContainer = null;
|
|
15516
|
+
console.log('processGraphFilter called', clickedValue);
|
|
15440
15517
|
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
15441
15518
|
eventContainer = this._SfStreamContainer;
|
|
15442
15519
|
}
|
|
@@ -15457,6 +15534,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15457
15534
|
}
|
|
15458
15535
|
if (eventContainer == null)
|
|
15459
15536
|
return;
|
|
15537
|
+
this.graphFilter = clickedValue;
|
|
15460
15538
|
this.selectedItemIds = [];
|
|
15461
15539
|
const buttonSelect = eventContainer.querySelectorAll('.button-select');
|
|
15462
15540
|
// for(let checkSelect of buttonSelect){
|
|
@@ -15476,6 +15554,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15476
15554
|
if (streamEventSummary == null) {
|
|
15477
15555
|
return;
|
|
15478
15556
|
}
|
|
15557
|
+
console.log('recentlyReported', this.recentlyReported);
|
|
15479
15558
|
if (this.graphParam == clickedValue) {
|
|
15480
15559
|
this.graphParam = "";
|
|
15481
15560
|
streamEventSummary.style.display = 'flex';
|
|
@@ -15492,10 +15571,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15492
15571
|
};
|
|
15493
15572
|
streamEventFilters.style.display = 'block';
|
|
15494
15573
|
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>';
|
|
15495
|
-
console.log('processGraphFilter called');
|
|
15496
15574
|
(_a = streamEventFilters.querySelector('#button-filter-cancel')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
15497
15575
|
this.clearSelectedGraphParam();
|
|
15498
15576
|
});
|
|
15577
|
+
setTimeout(() => {
|
|
15578
|
+
this.recentlyReported = {};
|
|
15579
|
+
}, 10000);
|
|
15499
15580
|
}
|
|
15500
15581
|
for (var i = 0; i < divs.length; i++) {
|
|
15501
15582
|
// console.log('processGraphFilter', graphparamnames1[i], (graphparamnames1[i] as HTMLDivElement).innerHTML.toLowerCase().replace('&', '&').replace(/-/g, ' '), this.graphParam.toLowerCase().replace('&', '&').replace(/-/g, ' '));
|
|
@@ -15510,8 +15591,23 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15510
15591
|
break;
|
|
15511
15592
|
}
|
|
15512
15593
|
}
|
|
15513
|
-
if (buttonSelect[i] != null)
|
|
15594
|
+
if (buttonSelect[i] != null) {
|
|
15514
15595
|
buttonSelect[i].checked = false;
|
|
15596
|
+
let selectid = buttonSelect[i].id;
|
|
15597
|
+
let selectidArr = selectid.split('-');
|
|
15598
|
+
let selectMmdd = selectidArr[2] + '/' + selectidArr[3];
|
|
15599
|
+
let selectEntityid = selectidArr[7].replace(/_/g, '-');
|
|
15600
|
+
let selectLocationid = selectidArr[8].replace(/_/g, '-');
|
|
15601
|
+
let selectEventid = selectidArr[9].replace(/_/g, '-');
|
|
15602
|
+
if (this.recentlyReported[selectMmdd] != null) {
|
|
15603
|
+
for (let recentlyReportedEvent of this.recentlyReported[selectMmdd]) {
|
|
15604
|
+
if (recentlyReportedEvent.id == selectEventid && recentlyReportedEvent.locationid == selectLocationid && recentlyReportedEvent.entityid == selectEntityid) {
|
|
15605
|
+
filterFound = true;
|
|
15606
|
+
break;
|
|
15607
|
+
}
|
|
15608
|
+
}
|
|
15609
|
+
}
|
|
15610
|
+
}
|
|
15515
15611
|
if (filterFound) {
|
|
15516
15612
|
if (tables[i] != null) {
|
|
15517
15613
|
tables[i].style.display = 'block';
|
|
@@ -15552,7 +15648,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15552
15648
|
buttonListReporting[i].style.display = 'none';
|
|
15553
15649
|
}
|
|
15554
15650
|
}
|
|
15555
|
-
console.log('eventTitle', divs[i]);
|
|
15651
|
+
// console.log('eventTitle', divs[i]);
|
|
15556
15652
|
if (buttonSelect[i] != null)
|
|
15557
15653
|
buttonSelect[i].style.display = "none";
|
|
15558
15654
|
if (eventTitles[i] != null)
|
package/src/sf-i-events.ts
CHANGED
|
@@ -1645,6 +1645,10 @@ export class SfIEvents extends LitElement {
|
|
|
1645
1645
|
@property()
|
|
1646
1646
|
selectallblock: string = "100";
|
|
1647
1647
|
|
|
1648
|
+
graphFilter:string = "";
|
|
1649
|
+
|
|
1650
|
+
recentlyReported: any = {}
|
|
1651
|
+
|
|
1648
1652
|
static override styles = css`
|
|
1649
1653
|
|
|
1650
1654
|
.bg-white {
|
|
@@ -3091,7 +3095,7 @@ export class SfIEvents extends LitElement {
|
|
|
3091
3095
|
}
|
|
3092
3096
|
}
|
|
3093
3097
|
|
|
3094
|
-
this.processGraphFilter(
|
|
3098
|
+
this.processGraphFilter(this.graphFilter);
|
|
3095
3099
|
this.selectedFilters = null;
|
|
3096
3100
|
}
|
|
3097
3101
|
|
|
@@ -5698,6 +5702,10 @@ export class SfIEvents extends LitElement {
|
|
|
5698
5702
|
}
|
|
5699
5703
|
}
|
|
5700
5704
|
}
|
|
5705
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5706
|
+
this.recentlyReported[mmdd] = []
|
|
5707
|
+
}
|
|
5708
|
+
this.recentlyReported[mmdd].push(event)
|
|
5701
5709
|
}else{
|
|
5702
5710
|
let bulkBodyReview = []
|
|
5703
5711
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5748,6 +5756,10 @@ export class SfIEvents extends LitElement {
|
|
|
5748
5756
|
|
|
5749
5757
|
this.events[mmdd][p].isbulk = true
|
|
5750
5758
|
flagBulk = true
|
|
5759
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5760
|
+
this.recentlyReported[mmdd] = []
|
|
5761
|
+
}
|
|
5762
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
5751
5763
|
}
|
|
5752
5764
|
}
|
|
5753
5765
|
}
|
|
@@ -5801,6 +5813,10 @@ export class SfIEvents extends LitElement {
|
|
|
5801
5813
|
}
|
|
5802
5814
|
}
|
|
5803
5815
|
}
|
|
5816
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5817
|
+
this.recentlyReported[mmdd] = []
|
|
5818
|
+
}
|
|
5819
|
+
this.recentlyReported[mmdd].push(event)
|
|
5804
5820
|
}else{
|
|
5805
5821
|
let bulkBodyAudit = []
|
|
5806
5822
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5848,6 +5864,10 @@ export class SfIEvents extends LitElement {
|
|
|
5848
5864
|
|
|
5849
5865
|
this.events[mmdd][p].isbulk = true
|
|
5850
5866
|
flagBulk = true;
|
|
5867
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5868
|
+
this.recentlyReported[mmdd] = []
|
|
5869
|
+
}
|
|
5870
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
5851
5871
|
}
|
|
5852
5872
|
}
|
|
5853
5873
|
}
|
|
@@ -5964,6 +5984,7 @@ export class SfIEvents extends LitElement {
|
|
|
5964
5984
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5965
5985
|
}
|
|
5966
5986
|
}
|
|
5987
|
+
|
|
5967
5988
|
if(event.makercheckers.length > 0) {
|
|
5968
5989
|
|
|
5969
5990
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
@@ -5971,11 +5992,16 @@ export class SfIEvents extends LitElement {
|
|
|
5971
5992
|
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
5972
5993
|
this.events[mmdd][p].approved = true
|
|
5973
5994
|
// this.events[mmdd][p].documents = docs
|
|
5974
|
-
this.events[mmdd][p].comments.push({'author': '
|
|
5995
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
5975
5996
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5976
5997
|
}
|
|
5977
5998
|
}
|
|
5978
5999
|
}
|
|
6000
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6001
|
+
this.recentlyReported[mmdd] = []
|
|
6002
|
+
}
|
|
6003
|
+
this.recentlyReported[mmdd].push(event)
|
|
6004
|
+
console.log('recently reported', this.recentlyReported)
|
|
5979
6005
|
}else{
|
|
5980
6006
|
let bulkBody = []
|
|
5981
6007
|
let bulkBodyReview = []
|
|
@@ -6066,6 +6092,10 @@ export class SfIEvents extends LitElement {
|
|
|
6066
6092
|
if(this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
6067
6093
|
flagBulk = true;
|
|
6068
6094
|
this.events[mmdd][p].isbulk = true
|
|
6095
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6096
|
+
this.recentlyReported[mmdd] = []
|
|
6097
|
+
}
|
|
6098
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
6069
6099
|
}
|
|
6070
6100
|
}
|
|
6071
6101
|
}
|
|
@@ -6113,7 +6143,9 @@ export class SfIEvents extends LitElement {
|
|
|
6113
6143
|
});
|
|
6114
6144
|
this._SfUploader[0].querySelector('#uploader').addEventListener('analysisCompleted', (_ev: any) => {
|
|
6115
6145
|
console.log('uploader analysisInProgress', _ev);
|
|
6116
|
-
(listReportingContainer.querySelector('.uploader-analysis-message') as HTMLDivElement)
|
|
6146
|
+
if((listReportingContainer.querySelector('.uploader-analysis-message') as HTMLDivElement) != null){
|
|
6147
|
+
(listReportingContainer.querySelector('.uploader-analysis-message') as HTMLDivElement).style.display = "none"
|
|
6148
|
+
}
|
|
6117
6149
|
});
|
|
6118
6150
|
|
|
6119
6151
|
|
|
@@ -10191,9 +10223,9 @@ export class SfIEvents extends LitElement {
|
|
|
10191
10223
|
|
|
10192
10224
|
renderThis = (index: number = 1, showGraph: boolean = true, showBackgroundButton: boolean) => {
|
|
10193
10225
|
|
|
10194
|
-
this.clearGraphData();
|
|
10195
|
-
this.clearSelectedGraphParam();
|
|
10196
|
-
this.clearSelectedLegend();
|
|
10226
|
+
// this.clearGraphData();
|
|
10227
|
+
// this.clearSelectedGraphParam();
|
|
10228
|
+
// this.clearSelectedLegend();
|
|
10197
10229
|
|
|
10198
10230
|
this.streamIndex = index;
|
|
10199
10231
|
|
|
@@ -10765,9 +10797,9 @@ export class SfIEvents extends LitElement {
|
|
|
10765
10797
|
|
|
10766
10798
|
this.streamIndex = index;
|
|
10767
10799
|
|
|
10768
|
-
this.clearGraphData();
|
|
10769
|
-
this.clearSelectedGraphParam();
|
|
10770
|
-
this.clearSelectedLegend();
|
|
10800
|
+
// this.clearGraphData();
|
|
10801
|
+
// this.clearSelectedGraphParam();
|
|
10802
|
+
// this.clearSelectedLegend();
|
|
10771
10803
|
|
|
10772
10804
|
|
|
10773
10805
|
var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
@@ -11400,7 +11432,6 @@ export class SfIEvents extends LitElement {
|
|
|
11400
11432
|
}
|
|
11401
11433
|
|
|
11402
11434
|
clearGraphData = () => {
|
|
11403
|
-
console.log('this.chart2 clearing graph data');
|
|
11404
11435
|
this.chart = null;
|
|
11405
11436
|
this.chart2 = null;
|
|
11406
11437
|
this.chart3 = null;
|
|
@@ -12466,6 +12497,10 @@ export class SfIEvents extends LitElement {
|
|
|
12466
12497
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12467
12498
|
}
|
|
12468
12499
|
}
|
|
12500
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12501
|
+
this.recentlyReported[mmdd] = []
|
|
12502
|
+
}
|
|
12503
|
+
this.recentlyReported[mmdd].push(event)
|
|
12469
12504
|
console.log('review single')
|
|
12470
12505
|
} else {
|
|
12471
12506
|
let bulkBodyReview = []
|
|
@@ -12517,6 +12552,10 @@ export class SfIEvents extends LitElement {
|
|
|
12517
12552
|
|
|
12518
12553
|
this.events[mmdd][p].isbulk = true
|
|
12519
12554
|
flagBulk = true;
|
|
12555
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12556
|
+
this.recentlyReported[mmdd] = []
|
|
12557
|
+
}
|
|
12558
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12520
12559
|
}
|
|
12521
12560
|
}
|
|
12522
12561
|
}
|
|
@@ -12578,6 +12617,10 @@ export class SfIEvents extends LitElement {
|
|
|
12578
12617
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12579
12618
|
}
|
|
12580
12619
|
}
|
|
12620
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12621
|
+
this.recentlyReported[mmdd] = []
|
|
12622
|
+
}
|
|
12623
|
+
this.recentlyReported[mmdd].push(event)
|
|
12581
12624
|
console.log('uploadaudit single')
|
|
12582
12625
|
} else {
|
|
12583
12626
|
let bulkBodyAudit = []
|
|
@@ -12626,6 +12669,10 @@ export class SfIEvents extends LitElement {
|
|
|
12626
12669
|
|
|
12627
12670
|
this.events[mmdd][p].isbulk = true
|
|
12628
12671
|
flagBulk = true;
|
|
12672
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12673
|
+
this.recentlyReported[mmdd] = []
|
|
12674
|
+
}
|
|
12675
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12629
12676
|
}
|
|
12630
12677
|
}
|
|
12631
12678
|
}
|
|
@@ -12768,12 +12815,16 @@ export class SfIEvents extends LitElement {
|
|
|
12768
12815
|
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
12769
12816
|
this.events[mmdd][p].approved = true
|
|
12770
12817
|
// this.events[mmdd][p].documents = docs
|
|
12771
|
-
this.events[mmdd][p].comments.push({'author': '
|
|
12818
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
12772
12819
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12773
12820
|
}
|
|
12774
12821
|
}
|
|
12775
12822
|
console.log('upload report auto approve single')
|
|
12776
12823
|
}
|
|
12824
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12825
|
+
this.recentlyReported[mmdd] = []
|
|
12826
|
+
}
|
|
12827
|
+
this.recentlyReported[mmdd].push(event)
|
|
12777
12828
|
|
|
12778
12829
|
} else {
|
|
12779
12830
|
let bulkBody = []
|
|
@@ -12868,6 +12919,10 @@ export class SfIEvents extends LitElement {
|
|
|
12868
12919
|
|
|
12869
12920
|
this.events[mmdd][p].isbulk = true
|
|
12870
12921
|
flagBulk = true;
|
|
12922
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12923
|
+
this.recentlyReported[mmdd] = []
|
|
12924
|
+
}
|
|
12925
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
12871
12926
|
}
|
|
12872
12927
|
}
|
|
12873
12928
|
}
|
|
@@ -13749,6 +13804,10 @@ export class SfIEvents extends LitElement {
|
|
|
13749
13804
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13750
13805
|
}
|
|
13751
13806
|
}
|
|
13807
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13808
|
+
this.recentlyReported[mmdd] = []
|
|
13809
|
+
}
|
|
13810
|
+
this.recentlyReported[mmdd].push(event)
|
|
13752
13811
|
} else {
|
|
13753
13812
|
let bulkBodyReview = []
|
|
13754
13813
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -13799,6 +13858,10 @@ export class SfIEvents extends LitElement {
|
|
|
13799
13858
|
|
|
13800
13859
|
this.events[mmdd][p].isbulk = true
|
|
13801
13860
|
flagBulk = true;
|
|
13861
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13862
|
+
this.recentlyReported[mmdd] = []
|
|
13863
|
+
}
|
|
13864
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
13802
13865
|
}
|
|
13803
13866
|
}
|
|
13804
13867
|
}
|
|
@@ -13859,6 +13922,10 @@ export class SfIEvents extends LitElement {
|
|
|
13859
13922
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13860
13923
|
}
|
|
13861
13924
|
}
|
|
13925
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13926
|
+
this.recentlyReported[mmdd] = []
|
|
13927
|
+
}
|
|
13928
|
+
this.recentlyReported[mmdd].push(event)
|
|
13862
13929
|
} else {
|
|
13863
13930
|
let bulkBodyAudit = []
|
|
13864
13931
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -13906,6 +13973,10 @@ export class SfIEvents extends LitElement {
|
|
|
13906
13973
|
|
|
13907
13974
|
this.events[mmdd][p].isbulk = true
|
|
13908
13975
|
flagBulk = true;
|
|
13976
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13977
|
+
this.recentlyReported[mmdd] = []
|
|
13978
|
+
}
|
|
13979
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
13909
13980
|
}
|
|
13910
13981
|
}
|
|
13911
13982
|
}
|
|
@@ -14053,6 +14124,10 @@ export class SfIEvents extends LitElement {
|
|
|
14053
14124
|
}
|
|
14054
14125
|
}
|
|
14055
14126
|
}
|
|
14127
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14128
|
+
this.recentlyReported[mmdd] = []
|
|
14129
|
+
}
|
|
14130
|
+
this.recentlyReported[mmdd].push(event)
|
|
14056
14131
|
|
|
14057
14132
|
} else {
|
|
14058
14133
|
let bulkBody = []
|
|
@@ -14161,6 +14236,10 @@ export class SfIEvents extends LitElement {
|
|
|
14161
14236
|
|
|
14162
14237
|
this.events[mmdd][p].isbulk = true
|
|
14163
14238
|
flagBulk = true;
|
|
14239
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14240
|
+
this.recentlyReported[mmdd] = []
|
|
14241
|
+
}
|
|
14242
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
14164
14243
|
}
|
|
14165
14244
|
}
|
|
14166
14245
|
}
|
|
@@ -20606,7 +20685,7 @@ export class SfIEvents extends LitElement {
|
|
|
20606
20685
|
processGraphFilter = (clickedValue: string) => {
|
|
20607
20686
|
|
|
20608
20687
|
let eventContainer = null;
|
|
20609
|
-
|
|
20688
|
+
console.log('processGraphFilter called', clickedValue);
|
|
20610
20689
|
if(this.getCurrentTab() == this.TAB_STREAM) {
|
|
20611
20690
|
eventContainer = (this._SfStreamContainer as HTMLDivElement);
|
|
20612
20691
|
}
|
|
@@ -20632,7 +20711,7 @@ export class SfIEvents extends LitElement {
|
|
|
20632
20711
|
}
|
|
20633
20712
|
|
|
20634
20713
|
if(eventContainer == null) return;
|
|
20635
|
-
|
|
20714
|
+
this.graphFilter = clickedValue
|
|
20636
20715
|
this.selectedItemIds = [];
|
|
20637
20716
|
|
|
20638
20717
|
const buttonSelect = eventContainer!.querySelectorAll('.button-select') as NodeListOf<HTMLInputElement>;
|
|
@@ -20656,7 +20735,7 @@ export class SfIEvents extends LitElement {
|
|
|
20656
20735
|
if(streamEventSummary == null) {
|
|
20657
20736
|
return;
|
|
20658
20737
|
}
|
|
20659
|
-
|
|
20738
|
+
console.log('recentlyReported', this.recentlyReported);
|
|
20660
20739
|
if(this.graphParam == clickedValue) {
|
|
20661
20740
|
|
|
20662
20741
|
this.graphParam = "";
|
|
@@ -20675,11 +20754,12 @@ export class SfIEvents extends LitElement {
|
|
|
20675
20754
|
};
|
|
20676
20755
|
(streamEventFilters as HTMLDivElement).style.display = 'block';
|
|
20677
20756
|
(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>';
|
|
20678
|
-
console.log('processGraphFilter called');
|
|
20679
20757
|
(streamEventFilters as HTMLDivElement).querySelector('#button-filter-cancel')?.addEventListener('click', () => {
|
|
20680
20758
|
this.clearSelectedGraphParam();
|
|
20681
20759
|
});
|
|
20682
|
-
|
|
20760
|
+
setTimeout(() => {
|
|
20761
|
+
this.recentlyReported = {}
|
|
20762
|
+
}, 10000);
|
|
20683
20763
|
}
|
|
20684
20764
|
|
|
20685
20765
|
|
|
@@ -20697,7 +20777,24 @@ export class SfIEvents extends LitElement {
|
|
|
20697
20777
|
break;
|
|
20698
20778
|
}
|
|
20699
20779
|
}
|
|
20700
|
-
if(buttonSelect[i] != null)
|
|
20780
|
+
if(buttonSelect[i] != null){
|
|
20781
|
+
buttonSelect[i].checked = false
|
|
20782
|
+
let selectid = buttonSelect[i].id
|
|
20783
|
+
let selectidArr = selectid.split('-')
|
|
20784
|
+
let selectMmdd = selectidArr[2] + '/' + selectidArr[3]
|
|
20785
|
+
let selectEntityid = selectidArr[7].replace(/_/g,'-')
|
|
20786
|
+
let selectLocationid = selectidArr[8].replace(/_/g,'-')
|
|
20787
|
+
let selectEventid = selectidArr[9].replace(/_/g,'-')
|
|
20788
|
+
if(this.recentlyReported[selectMmdd] != null){
|
|
20789
|
+
for(let recentlyReportedEvent of this.recentlyReported[selectMmdd]){
|
|
20790
|
+
if(recentlyReportedEvent.id == selectEventid && recentlyReportedEvent.locationid == selectLocationid && recentlyReportedEvent.entityid == selectEntityid){
|
|
20791
|
+
filterFound = true;
|
|
20792
|
+
break;
|
|
20793
|
+
}
|
|
20794
|
+
}
|
|
20795
|
+
}
|
|
20796
|
+
}
|
|
20797
|
+
|
|
20701
20798
|
if(filterFound) {
|
|
20702
20799
|
if(tables[i] != null){
|
|
20703
20800
|
(tables[i] as HTMLDivElement).style.display = 'block';
|
|
@@ -20731,7 +20828,7 @@ export class SfIEvents extends LitElement {
|
|
|
20731
20828
|
buttonListReporting[i].style.display = 'none';
|
|
20732
20829
|
}
|
|
20733
20830
|
}
|
|
20734
|
-
console.log('eventTitle', divs[i]);
|
|
20831
|
+
// console.log('eventTitle', divs[i]);
|
|
20735
20832
|
if(buttonSelect[i] != null)buttonSelect[i].style.display = "none"
|
|
20736
20833
|
if(eventTitles[i] != null)(eventTitles[i]).style.display = 'none';
|
|
20737
20834
|
if(divs[i] != null) divs[i].style.display = 'none'
|
|
@@ -20751,7 +20848,6 @@ export class SfIEvents extends LitElement {
|
|
|
20751
20848
|
for(let streamEventTitle of streamEventTitles){
|
|
20752
20849
|
streamEventTitle.removeAttribute('part')
|
|
20753
20850
|
}
|
|
20754
|
-
|
|
20755
20851
|
}
|
|
20756
20852
|
|
|
20757
20853
|
processClickOnLegend = (index: number, legendItem: any) => {
|