sf-i-events 1.0.770 → 1.0.772
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 +8 -8
- package/sf-i-events.js +139 -86
- package/src/sf-i-events.ts +138 -94
package/sf-i-events.js
CHANGED
|
@@ -2141,7 +2141,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2141
2141
|
this.updateSubcategoryStats(event['subcategory'], partStatus, lateStatus, complianceStatus);
|
|
2142
2142
|
}
|
|
2143
2143
|
};
|
|
2144
|
-
this.renderCalendarGraphs = (showGraph, parametersTitle) => {
|
|
2144
|
+
this.renderCalendarGraphs = (showGraph, parametersTitle, showBackgroundButton) => {
|
|
2145
2145
|
//console.log('flowGraph', this.flowGraph);
|
|
2146
2146
|
var html = '';
|
|
2147
2147
|
html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
|
|
@@ -2159,8 +2159,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
html += '</div></div>';
|
|
2161
2161
|
}
|
|
2162
|
-
html += '<button id="button-refresh" part="button-duration-title" class="align-center d-flex justify-center"><h4 part="duration-title">' + parametersTitle + '</h4><span part="duration-title-icon" class="material-icons ml-10">refresh</span></
|
|
2163
|
-
|
|
2162
|
+
html += '<button id="button-refresh" part="button-duration-title" class="align-center d-flex justify-center"><h4 part="duration-title">' + parametersTitle + '</h4><span part="duration-title-icon" class="material-icons ml-10">refresh</span></div>';
|
|
2163
|
+
if (showBackgroundButton) {
|
|
2164
|
+
html += '<div class="align-center d-flex flex-wrap align-center mb-10 w-100-m-0" part="last-update-title-container" id="button-background-process"><h6 part="last-update-title" class="align-center d-flex"><div class="lds-dual-ring1"></div> background processing</h6></div>';
|
|
2165
|
+
}
|
|
2166
|
+
else {
|
|
2167
|
+
html += '<div class="align-center d-flex flex-wrap align-center mb-10 w-100-m-0" part="last-update-title-container"><h6 part="last-update-title" class="align-center d-flex"><span class="material-symbols-outlined">update</span> Last Updated on ' + this.lastupdated + '</h6></div>';
|
|
2168
|
+
}
|
|
2164
2169
|
if (showGraph) {
|
|
2165
2170
|
html += '<div part="stream-event-chart-selection" class="mb-20">';
|
|
2166
2171
|
html += '<div part="td-head" class="mb-5">Select Chart</div>';
|
|
@@ -2619,7 +2624,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2619
2624
|
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + '<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button></div>';
|
|
2620
2625
|
return html;
|
|
2621
2626
|
};
|
|
2622
|
-
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle) => {
|
|
2627
|
+
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
|
|
2623
2628
|
var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0;
|
|
2624
2629
|
var html = '';
|
|
2625
2630
|
this.selectedItemIds = [];
|
|
@@ -2633,7 +2638,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2633
2638
|
this.clearGraphData();
|
|
2634
2639
|
this.clearSelectedGraphParam();
|
|
2635
2640
|
this.clearSelectedLegend();
|
|
2636
|
-
html += this.renderCalendarGraphs(showGraph, parametersTitle);
|
|
2641
|
+
html += this.renderCalendarGraphs(showGraph, parametersTitle, showBackgroundButton);
|
|
2637
2642
|
html += this.renderCalendarContainerDivStart(index);
|
|
2638
2643
|
html += this.renderCalendarEventSummary();
|
|
2639
2644
|
// csvCols += 'Period,Status,Id,ObligationTitle,Obligation,Duedate'
|
|
@@ -3188,6 +3193,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3188
3193
|
buttonClick.innerHTML = "Saving...";
|
|
3189
3194
|
const comments = listReportingContainer.querySelector('#input-approver-comments').value;
|
|
3190
3195
|
const approved = listReportingContainer.querySelector('#input-approve-yes').checked;
|
|
3196
|
+
let flagBulk = false;
|
|
3191
3197
|
if (this.selectedItemIds.length == 0) {
|
|
3192
3198
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
|
|
3193
3199
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -3243,6 +3249,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3243
3249
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3244
3250
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationid && this.events[mmdd][p].entityid == entityid) {
|
|
3245
3251
|
this.events[mmdd][p].isbulk = true;
|
|
3252
|
+
flagBulk = true;
|
|
3246
3253
|
}
|
|
3247
3254
|
}
|
|
3248
3255
|
}
|
|
@@ -3264,7 +3271,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3264
3271
|
await this.fetchBulkReportingData();
|
|
3265
3272
|
}
|
|
3266
3273
|
console.log('events', this.events);
|
|
3267
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
3274
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
3268
3275
|
}
|
|
3269
3276
|
}
|
|
3270
3277
|
});
|
|
@@ -3280,6 +3287,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3280
3287
|
}, 3000);
|
|
3281
3288
|
}
|
|
3282
3289
|
else {
|
|
3290
|
+
let flagBulk = false;
|
|
3283
3291
|
if (this.selectedItemIds.length == 0) {
|
|
3284
3292
|
await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
|
|
3285
3293
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -3332,6 +3340,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3332
3340
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3333
3341
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3334
3342
|
this.events[mmdd][p].isbulk = true;
|
|
3343
|
+
flagBulk = true;
|
|
3335
3344
|
}
|
|
3336
3345
|
}
|
|
3337
3346
|
}
|
|
@@ -3351,7 +3360,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3351
3360
|
if (this.selectedItemIds.length > 0) {
|
|
3352
3361
|
await this.fetchBulkReportingData();
|
|
3353
3362
|
}
|
|
3354
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
3363
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
3355
3364
|
// if(currentColumnButton != null) {
|
|
3356
3365
|
// currentColumnButton.click();
|
|
3357
3366
|
// }
|
|
@@ -3411,6 +3420,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3411
3420
|
}, 3000);
|
|
3412
3421
|
}
|
|
3413
3422
|
else {
|
|
3423
|
+
let flagBulk = false;
|
|
3414
3424
|
if (this.selectedItemIds.length == 0) {
|
|
3415
3425
|
await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events");
|
|
3416
3426
|
console.log('this.events', this.events);
|
|
@@ -3512,6 +3522,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3512
3522
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
3513
3523
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3514
3524
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3525
|
+
flagBulk = true;
|
|
3515
3526
|
this.events[mmdd][p].isbulk = true;
|
|
3516
3527
|
}
|
|
3517
3528
|
}
|
|
@@ -3532,7 +3543,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3532
3543
|
if (this.selectedItemIds.length > 0) {
|
|
3533
3544
|
await this.fetchBulkReportingData();
|
|
3534
3545
|
}
|
|
3535
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
3546
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
3536
3547
|
// if(currentColumnButton != null) {
|
|
3537
3548
|
// currentColumnButton.click();
|
|
3538
3549
|
// }
|
|
@@ -3659,16 +3670,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3659
3670
|
});
|
|
3660
3671
|
}
|
|
3661
3672
|
};
|
|
3662
|
-
this.renderStreamEvents = (index, month, year, showGraph = true) => {
|
|
3673
|
+
this.renderStreamEvents = (index, month, year, showGraph = true, showBackgroundButton = false) => {
|
|
3663
3674
|
//console.log('flowgraph renderStreamEvents', this.flowGraph);
|
|
3664
3675
|
const lastDay = this.getLastDayOfMonth(month, year);
|
|
3665
3676
|
let firstDay = new Date(year, month, 1);
|
|
3666
3677
|
let endDay = new Date(year, month, 1);
|
|
3667
3678
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3668
3679
|
var period = ("0" + (month + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + new Date().getFullYear() + ' - ' + ("0" + (month + 1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + new Date().getFullYear();
|
|
3669
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year);
|
|
3680
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year, showBackgroundButton);
|
|
3670
3681
|
};
|
|
3671
|
-
this.renderThisEvents = (index, startDate, showGraph = true) => {
|
|
3682
|
+
this.renderThisEvents = (index, startDate, showGraph = true, showBackgroundButton = false) => {
|
|
3672
3683
|
var firstDate = new Date();
|
|
3673
3684
|
var count = 7;
|
|
3674
3685
|
//console.log('this start date', startDate);
|
|
@@ -3687,9 +3698,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3687
3698
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
3688
3699
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3689
3700
|
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + firstDate.getFullYear();
|
|
3690
|
-
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"));
|
|
3701
|
+
return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"), showBackgroundButton);
|
|
3691
3702
|
};
|
|
3692
|
-
this.renderRangeEvents = (firstDate, count, eventsContainer) => {
|
|
3703
|
+
this.renderRangeEvents = (firstDate, count, eventsContainer, showBackgroundButton = false) => {
|
|
3693
3704
|
var lastDate = new Date(firstDate.getTime());
|
|
3694
3705
|
lastDate.setDate(lastDate.getDate() + count - 1);
|
|
3695
3706
|
const lastDay = count;
|
|
@@ -3698,13 +3709,25 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3698
3709
|
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
|
|
3699
3710
|
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (lastDate.getMonth() + 1)).slice(-2) + "/" + ("0" + lastDate.getDate()).slice(-2) + '/' + lastDate.getFullYear();
|
|
3700
3711
|
//console.log('rangeperiod', period)
|
|
3701
|
-
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
3712
|
+
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);
|
|
3702
3713
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
3703
3714
|
if (eventsContainer.innerHTML.indexOf('button-select-all') < 0) {
|
|
3704
3715
|
eventsContainer.insertAdjacentHTML('beforeend', this.renderSelectAllButtons());
|
|
3705
3716
|
}
|
|
3706
3717
|
this.renderButtonRefresh(eventsContainer);
|
|
3707
3718
|
this.attachTimelineFilterHandlers(eventsContainer);
|
|
3719
|
+
let backgroundProcessButton = eventsContainer.querySelector('#button-background-process');
|
|
3720
|
+
if (showBackgroundButton) {
|
|
3721
|
+
backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
|
|
3722
|
+
console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
|
|
3723
|
+
if (showBackgroundButton) {
|
|
3724
|
+
backgroundProcessButton.addEventListener('click', () => {
|
|
3725
|
+
console.log('bulk-progress clicked');
|
|
3726
|
+
let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
|
|
3727
|
+
bulkLoader.scrollIntoView();
|
|
3728
|
+
});
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3708
3731
|
const filterButton = eventsContainer.querySelector('#filter-button');
|
|
3709
3732
|
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
3710
3733
|
const filterList = eventsContainer.querySelector('#filter-list-container');
|
|
@@ -6785,7 +6808,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6785
6808
|
inputLabelFilterMobile.style.display = 'none';
|
|
6786
6809
|
this._SfCustomContainer.querySelector('#button-year-to-date').click();
|
|
6787
6810
|
};
|
|
6788
|
-
this.renderThis = (index = 1, showGraph = true) => {
|
|
6811
|
+
this.renderThis = (index = 1, showGraph = true, showBackgroundButton) => {
|
|
6789
6812
|
var _a, _b;
|
|
6790
6813
|
this.clearGraphData();
|
|
6791
6814
|
this.clearSelectedGraphParam();
|
|
@@ -6832,13 +6855,25 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6832
6855
|
html += '<div class="calendar-right-data flex-grow">';
|
|
6833
6856
|
// var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
6834
6857
|
var startDate = new Date();
|
|
6835
|
-
html += this.renderThisEvents(index, startDate, showGraph);
|
|
6858
|
+
html += this.renderThisEvents(index, startDate, showGraph, showBackgroundButton);
|
|
6836
6859
|
startDate.setDate(startDate.getDate() + 1);
|
|
6837
6860
|
html += '</div>';
|
|
6838
6861
|
html += this.renderSelectAllButtons();
|
|
6839
6862
|
html += '</div>';
|
|
6840
6863
|
this._SfThisContainer.innerHTML = html;
|
|
6841
6864
|
this.renderButtonRefresh(this._SfThisContainer);
|
|
6865
|
+
let backgroundProcessButton = this._SfThisContainer.querySelector('#button-background-process');
|
|
6866
|
+
if (backgroundProcessButton != null) {
|
|
6867
|
+
backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
|
|
6868
|
+
console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
|
|
6869
|
+
if (showBackgroundButton) {
|
|
6870
|
+
backgroundProcessButton.addEventListener('click', () => {
|
|
6871
|
+
console.log('bulk-progress clicked');
|
|
6872
|
+
let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
|
|
6873
|
+
bulkLoader.scrollIntoView();
|
|
6874
|
+
});
|
|
6875
|
+
}
|
|
6876
|
+
}
|
|
6842
6877
|
const filterButton = this._SfThisContainer.querySelector('#filter-button');
|
|
6843
6878
|
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
6844
6879
|
const filterList = this._SfThisContainer.querySelector('#filter-list-container');
|
|
@@ -6854,7 +6889,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6854
6889
|
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
|
|
6855
6890
|
}
|
|
6856
6891
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
6857
|
-
this.renderStream(index);
|
|
6892
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
6858
6893
|
});
|
|
6859
6894
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
6860
6895
|
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
@@ -6923,19 +6958,19 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6923
6958
|
const radioCompleteness = this._SfThisContainer.querySelector('#radio-completeness');
|
|
6924
6959
|
radioCompleteness === null || radioCompleteness === void 0 ? void 0 : radioCompleteness.addEventListener('click', () => {
|
|
6925
6960
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
6926
|
-
this.renderThis(index);
|
|
6961
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6927
6962
|
this.renderCompletenessGraph(this._SfThisContainer);
|
|
6928
6963
|
});
|
|
6929
6964
|
const radioTimeliness = this._SfThisContainer.querySelector('#radio-timeliness');
|
|
6930
6965
|
radioTimeliness === null || radioTimeliness === void 0 ? void 0 : radioTimeliness.addEventListener('click', () => {
|
|
6931
6966
|
this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
|
|
6932
|
-
this.renderThis(index);
|
|
6967
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6933
6968
|
this.renderTimelinessGraph(this._SfThisContainer);
|
|
6934
6969
|
});
|
|
6935
6970
|
const radioCompliance = this._SfThisContainer.querySelector('#radio-compliance');
|
|
6936
6971
|
radioCompliance === null || radioCompliance === void 0 ? void 0 : radioCompliance.addEventListener('click', () => {
|
|
6937
6972
|
this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
|
|
6938
|
-
this.renderThis(index);
|
|
6973
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6939
6974
|
this.renderComplianceGraph(this._SfThisContainer);
|
|
6940
6975
|
});
|
|
6941
6976
|
// const radioCompliance = (this._SfThisContainer as HTMLDivElement).querySelector('#radio-compliance') as HTMLButtonElement;
|
|
@@ -6947,49 +6982,49 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6947
6982
|
const radioRisk = this._SfThisContainer.querySelector('#radio-risk');
|
|
6948
6983
|
radioRisk === null || radioRisk === void 0 ? void 0 : radioRisk.addEventListener('click', () => {
|
|
6949
6984
|
this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
|
|
6950
|
-
this.renderThis(index);
|
|
6985
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6951
6986
|
this.renderRiskGraph(this._SfThisContainer);
|
|
6952
6987
|
});
|
|
6953
6988
|
const radioFunction = this._SfThisContainer.querySelector('#radio-function');
|
|
6954
6989
|
radioFunction === null || radioFunction === void 0 ? void 0 : radioFunction.addEventListener('click', () => {
|
|
6955
6990
|
this.flowGraph = this.FLOW_GRAPH_FUNCTION;
|
|
6956
|
-
this.renderThis(index);
|
|
6991
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6957
6992
|
this.renderFunctionGraph(this._SfThisContainer);
|
|
6958
6993
|
});
|
|
6959
6994
|
const radioRiskSeverity = this._SfThisContainer.querySelector('#radio-riskseverity');
|
|
6960
6995
|
radioRiskSeverity === null || radioRiskSeverity === void 0 ? void 0 : radioRiskSeverity.addEventListener('click', () => {
|
|
6961
6996
|
this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
|
|
6962
|
-
this.renderThis(index);
|
|
6997
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6963
6998
|
this.renderRiskSeverityGraph(this._SfThisContainer);
|
|
6964
6999
|
});
|
|
6965
7000
|
const radioObligationType = this._SfThisContainer.querySelector('#radio-obligationtype');
|
|
6966
7001
|
radioObligationType === null || radioObligationType === void 0 ? void 0 : radioObligationType.addEventListener('click', () => {
|
|
6967
7002
|
this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
|
|
6968
|
-
this.renderThis(index);
|
|
7003
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6969
7004
|
this.renderObligationTypeGraph(this._SfThisContainer);
|
|
6970
7005
|
});
|
|
6971
7006
|
const radioJurisdiction = this._SfThisContainer.querySelector('#radio-jurisdiction');
|
|
6972
7007
|
radioJurisdiction === null || radioJurisdiction === void 0 ? void 0 : radioJurisdiction.addEventListener('click', () => {
|
|
6973
7008
|
this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
|
|
6974
|
-
this.renderThis(index);
|
|
7009
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6975
7010
|
this.renderJurisdictionGraph(this._SfThisContainer);
|
|
6976
7011
|
});
|
|
6977
7012
|
const radioFrequency = this._SfThisContainer.querySelector('#radio-frequency');
|
|
6978
7013
|
radioFrequency === null || radioFrequency === void 0 ? void 0 : radioFrequency.addEventListener('click', () => {
|
|
6979
7014
|
this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
|
|
6980
|
-
this.renderThis(index);
|
|
7015
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6981
7016
|
this.renderFrequencyGraph(this._SfThisContainer);
|
|
6982
7017
|
});
|
|
6983
7018
|
const radioSubcategory = this._SfThisContainer.querySelector('#radio-subcategory');
|
|
6984
7019
|
radioSubcategory === null || radioSubcategory === void 0 ? void 0 : radioSubcategory.addEventListener('click', () => {
|
|
6985
7020
|
this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
|
|
6986
|
-
this.renderThis(index);
|
|
7021
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6987
7022
|
this.renderSubcategoryGraph(this._SfThisContainer);
|
|
6988
7023
|
});
|
|
6989
7024
|
const radioLocation = this._SfThisContainer.querySelector('#radio-location');
|
|
6990
7025
|
radioLocation === null || radioLocation === void 0 ? void 0 : radioLocation.addEventListener('click', () => {
|
|
6991
7026
|
this.flowGraph = this.FLOW_GRAPH_LOCATION;
|
|
6992
|
-
this.renderThis(index);
|
|
7027
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
6993
7028
|
this.renderLocationGraph(this._SfThisContainer);
|
|
6994
7029
|
});
|
|
6995
7030
|
// const buttonStatusMore = (this._SfThisContainer as HTMLDivElement).querySelector('#button-status-more');
|
|
@@ -7008,7 +7043,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7008
7043
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7009
7044
|
this.currentColumnIndex = target + "";
|
|
7010
7045
|
await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
|
|
7011
|
-
this.renderThis(target);
|
|
7046
|
+
this.renderThis(target, showGraph, showBackgroundButton);
|
|
7012
7047
|
});
|
|
7013
7048
|
(_b = this._SfThisContainer.querySelector('#stream-month-' + i + '-mobile')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async (ev) => {
|
|
7014
7049
|
const target = parseInt(ev.target.id.split('-')[2]);
|
|
@@ -7017,7 +7052,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7017
7052
|
this.currentColumnIndex = target + "";
|
|
7018
7053
|
const dateResult = this.calculateStartAndEndDateOfThis(target);
|
|
7019
7054
|
await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
|
|
7020
|
-
this.renderThis(target);
|
|
7055
|
+
this.renderThis(target, showGraph, showBackgroundButton);
|
|
7021
7056
|
});
|
|
7022
7057
|
}
|
|
7023
7058
|
const buttonRefresh = this._SfThisContainer.querySelector('#button-refresh');
|
|
@@ -7027,7 +7062,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7027
7062
|
const dateResult = this.calculateStartAndEndDateOfThis(index);
|
|
7028
7063
|
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
|
|
7029
7064
|
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
|
|
7030
|
-
this.renderThis(index);
|
|
7065
|
+
this.renderThis(index, showGraph, showBackgroundButton);
|
|
7031
7066
|
});
|
|
7032
7067
|
this.attachListReportingListeners(this._SfThisContainer);
|
|
7033
7068
|
const buttonArr = this._SfThisContainer.querySelectorAll('.button-expand');
|
|
@@ -7204,7 +7239,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7204
7239
|
}
|
|
7205
7240
|
});
|
|
7206
7241
|
};
|
|
7207
|
-
this.renderStream = (index = 0, showGraph = true) => {
|
|
7242
|
+
this.renderStream = (index = 0, showGraph = true, showBackgroundButton) => {
|
|
7208
7243
|
//console.log('flowgraph renderStream', this.flowGraph);
|
|
7209
7244
|
var _a, _b;
|
|
7210
7245
|
this.streamIndex = index;
|
|
@@ -7246,7 +7281,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7246
7281
|
for (i = 0; i < 12; i++) {
|
|
7247
7282
|
if (i === index) {
|
|
7248
7283
|
//console.log(i, index)
|
|
7249
|
-
html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph);
|
|
7284
|
+
html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph, showBackgroundButton);
|
|
7250
7285
|
}
|
|
7251
7286
|
startDate.setMonth(startDate.getMonth() + 1);
|
|
7252
7287
|
}
|
|
@@ -7273,7 +7308,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7273
7308
|
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
|
|
7274
7309
|
}
|
|
7275
7310
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7276
|
-
this.renderStream(index);
|
|
7311
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7277
7312
|
});
|
|
7278
7313
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
7279
7314
|
// selectFeatureAll?.addEventListener('click',async(ev: any) => {
|
|
@@ -7342,69 +7377,81 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7342
7377
|
const radioCompleteness = this._SfStreamContainer.querySelector('#radio-completeness');
|
|
7343
7378
|
radioCompleteness === null || radioCompleteness === void 0 ? void 0 : radioCompleteness.addEventListener('click', () => {
|
|
7344
7379
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7345
|
-
this.renderStream(index);
|
|
7380
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7346
7381
|
this.renderCompletenessGraph(this._SfStreamContainer);
|
|
7347
7382
|
});
|
|
7348
7383
|
const radioTimeliness = this._SfStreamContainer.querySelector('#radio-timeliness');
|
|
7349
7384
|
radioTimeliness === null || radioTimeliness === void 0 ? void 0 : radioTimeliness.addEventListener('click', () => {
|
|
7350
7385
|
this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
|
|
7351
|
-
this.renderStream(index);
|
|
7386
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7352
7387
|
this.renderTimelinessGraph(this._SfStreamContainer);
|
|
7353
7388
|
});
|
|
7354
7389
|
const radioCompliance = this._SfStreamContainer.querySelector('#radio-compliance');
|
|
7355
7390
|
radioCompliance === null || radioCompliance === void 0 ? void 0 : radioCompliance.addEventListener('click', () => {
|
|
7356
7391
|
this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
|
|
7357
|
-
this.renderStream(index);
|
|
7392
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7358
7393
|
this.renderComplianceGraph(this._SfStreamContainer);
|
|
7359
7394
|
});
|
|
7360
7395
|
const radioRisk = this._SfStreamContainer.querySelector('#radio-risk');
|
|
7361
7396
|
radioRisk === null || radioRisk === void 0 ? void 0 : radioRisk.addEventListener('click', () => {
|
|
7362
7397
|
this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
|
|
7363
|
-
this.renderStream(index);
|
|
7398
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7364
7399
|
this.renderRiskGraph(this._SfStreamContainer);
|
|
7365
7400
|
});
|
|
7366
7401
|
const radioRiskSeverity = this._SfStreamContainer.querySelector('#radio-riskseverity');
|
|
7367
7402
|
radioRiskSeverity === null || radioRiskSeverity === void 0 ? void 0 : radioRiskSeverity.addEventListener('click', () => {
|
|
7368
7403
|
this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
|
|
7369
|
-
this.renderStream(index);
|
|
7404
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7370
7405
|
this.renderRiskSeverityGraph(this._SfStreamContainer);
|
|
7371
7406
|
});
|
|
7372
7407
|
const radioFunction = this._SfStreamContainer.querySelector('#radio-function');
|
|
7373
7408
|
radioFunction === null || radioFunction === void 0 ? void 0 : radioFunction.addEventListener('click', () => {
|
|
7374
7409
|
this.flowGraph = this.FLOW_GRAPH_FUNCTION;
|
|
7375
|
-
this.renderStream(index);
|
|
7410
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7376
7411
|
this.renderFunctionGraph(this._SfStreamContainer);
|
|
7377
7412
|
});
|
|
7378
7413
|
const radioObligationType = this._SfStreamContainer.querySelector('#radio-obligationtype');
|
|
7379
7414
|
radioObligationType === null || radioObligationType === void 0 ? void 0 : radioObligationType.addEventListener('click', () => {
|
|
7380
7415
|
this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
|
|
7381
|
-
this.renderStream(index);
|
|
7416
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7382
7417
|
this.renderObligationTypeGraph(this._SfStreamContainer);
|
|
7383
7418
|
});
|
|
7384
7419
|
const radioJurisdiction = this._SfStreamContainer.querySelector('#radio-jurisdiction');
|
|
7385
7420
|
radioJurisdiction === null || radioJurisdiction === void 0 ? void 0 : radioJurisdiction.addEventListener('click', () => {
|
|
7386
7421
|
this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
|
|
7387
|
-
this.renderStream(index);
|
|
7422
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7388
7423
|
this.renderJurisdictionGraph(this._SfStreamContainer);
|
|
7389
7424
|
});
|
|
7390
7425
|
const radioFrequency = this._SfStreamContainer.querySelector('#radio-frequency');
|
|
7391
7426
|
radioFrequency === null || radioFrequency === void 0 ? void 0 : radioFrequency.addEventListener('click', () => {
|
|
7392
7427
|
this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
|
|
7393
|
-
this.renderStream(index);
|
|
7428
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7394
7429
|
this.renderFrequencyGraph(this._SfStreamContainer);
|
|
7395
7430
|
});
|
|
7396
7431
|
const radioSubcategory = this._SfStreamContainer.querySelector('#radio-subcategory');
|
|
7397
7432
|
radioSubcategory === null || radioSubcategory === void 0 ? void 0 : radioSubcategory.addEventListener('click', () => {
|
|
7398
7433
|
this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
|
|
7399
|
-
this.renderStream(index);
|
|
7434
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7400
7435
|
this.renderSubcategoryGraph(this._SfStreamContainer);
|
|
7401
7436
|
});
|
|
7402
7437
|
const radioLocation = this._SfStreamContainer.querySelector('#radio-location');
|
|
7403
7438
|
radioLocation === null || radioLocation === void 0 ? void 0 : radioLocation.addEventListener('click', () => {
|
|
7404
7439
|
this.flowGraph = this.FLOW_GRAPH_LOCATION;
|
|
7405
|
-
this.renderStream(index);
|
|
7440
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7406
7441
|
this.renderLocationGraph(this._SfStreamContainer);
|
|
7407
7442
|
});
|
|
7443
|
+
let backgroundProcessButton = this._SfStreamContainer.querySelector('#button-background-process');
|
|
7444
|
+
if (showBackgroundButton) {
|
|
7445
|
+
backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
|
|
7446
|
+
console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
|
|
7447
|
+
if (showBackgroundButton) {
|
|
7448
|
+
backgroundProcessButton.addEventListener('click', () => {
|
|
7449
|
+
console.log('bulk-progress clicked');
|
|
7450
|
+
let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
|
|
7451
|
+
bulkLoader.scrollIntoView();
|
|
7452
|
+
});
|
|
7453
|
+
}
|
|
7454
|
+
}
|
|
7408
7455
|
// const buttonStatusMore = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-status-more');
|
|
7409
7456
|
// buttonStatusMore?.addEventListener('click', () => {
|
|
7410
7457
|
// const divStatusList = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.late-statuses') as NodeListOf<HTMLDivElement>;
|
|
@@ -7426,7 +7473,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7426
7473
|
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
7427
7474
|
}
|
|
7428
7475
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7429
|
-
this.renderStream(target);
|
|
7476
|
+
this.renderStream(target, showGraph, showBackgroundButton);
|
|
7430
7477
|
});
|
|
7431
7478
|
(_b = this._SfStreamContainer.querySelector('#stream-month-' + i + '-mobile')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async (ev) => {
|
|
7432
7479
|
const target = parseInt(ev.target.id.split('-')[2]);
|
|
@@ -7438,7 +7485,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7438
7485
|
}
|
|
7439
7486
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7440
7487
|
this.currentColumnIndex = target + "";
|
|
7441
|
-
this.renderStream(target);
|
|
7488
|
+
this.renderStream(target, showGraph, showBackgroundButton);
|
|
7442
7489
|
});
|
|
7443
7490
|
}
|
|
7444
7491
|
const buttonRefresh = this._SfStreamContainer.querySelector('#button-refresh');
|
|
@@ -7453,7 +7500,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7453
7500
|
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
7454
7501
|
}
|
|
7455
7502
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7456
|
-
this.renderStream(index);
|
|
7503
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
7457
7504
|
});
|
|
7458
7505
|
this.attachListReportingListeners(this._SfStreamContainer);
|
|
7459
7506
|
const buttonArr = this._SfStreamContainer.querySelectorAll('.button-expand');
|
|
@@ -8476,6 +8523,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8476
8523
|
});
|
|
8477
8524
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
8478
8525
|
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved)
|
|
8526
|
+
let flagBulk = false;
|
|
8479
8527
|
if (this.selectedItemIds.length === 0) {
|
|
8480
8528
|
console.log('mmddyyyy', mmddyyyy);
|
|
8481
8529
|
await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events");
|
|
@@ -8529,6 +8577,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8529
8577
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
8530
8578
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
8531
8579
|
this.events[mmdd][p].isbulk = true;
|
|
8580
|
+
flagBulk = true;
|
|
8532
8581
|
}
|
|
8533
8582
|
}
|
|
8534
8583
|
}
|
|
@@ -8550,7 +8599,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8550
8599
|
if (this.selectedItemIds.length > 0) {
|
|
8551
8600
|
await this.fetchBulkReportingData();
|
|
8552
8601
|
}
|
|
8553
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
8602
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
8554
8603
|
var clickEvent = new MouseEvent("click", {
|
|
8555
8604
|
"view": window,
|
|
8556
8605
|
"bubbles": true,
|
|
@@ -8575,6 +8624,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8575
8624
|
}, 3000);
|
|
8576
8625
|
}
|
|
8577
8626
|
else {
|
|
8627
|
+
let flagBulk = false;
|
|
8578
8628
|
if (this.selectedItemIds.length === 0) {
|
|
8579
8629
|
await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events");
|
|
8580
8630
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -8625,6 +8675,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8625
8675
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
8626
8676
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
8627
8677
|
this.events[mmdd][p].isbulk = true;
|
|
8678
|
+
flagBulk = true;
|
|
8628
8679
|
}
|
|
8629
8680
|
}
|
|
8630
8681
|
}
|
|
@@ -8651,7 +8702,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8651
8702
|
if (this.selectedItemIds.length > 0) {
|
|
8652
8703
|
await this.fetchBulkReportingData();
|
|
8653
8704
|
}
|
|
8654
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
8705
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
8655
8706
|
// if(currentColumnButton != null) {
|
|
8656
8707
|
// currentColumnButton.click();
|
|
8657
8708
|
// }
|
|
@@ -8717,6 +8768,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8717
8768
|
"cancelable": false
|
|
8718
8769
|
});
|
|
8719
8770
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
8771
|
+
let flagBulk = false;
|
|
8720
8772
|
if (this.selectedItemIds.length === 0) {
|
|
8721
8773
|
await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices");
|
|
8722
8774
|
console.log('this.events', this.events);
|
|
@@ -8823,6 +8875,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8823
8875
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
8824
8876
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
8825
8877
|
this.events[mmdd][p].isbulk = true;
|
|
8878
|
+
flagBulk = true;
|
|
8826
8879
|
}
|
|
8827
8880
|
}
|
|
8828
8881
|
}
|
|
@@ -8842,7 +8895,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8842
8895
|
if (this.selectedItemIds.length > 0) {
|
|
8843
8896
|
await this.fetchBulkReportingData();
|
|
8844
8897
|
}
|
|
8845
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
8898
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
8846
8899
|
// if(currentColumnButton != null) {
|
|
8847
8900
|
// currentColumnButton.click();
|
|
8848
8901
|
// }
|
|
@@ -9568,6 +9621,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9568
9621
|
});
|
|
9569
9622
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
9570
9623
|
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved)
|
|
9624
|
+
let flagBulk = false;
|
|
9571
9625
|
if (this.selectedItemIds.length === 0) {
|
|
9572
9626
|
// console.log('mmddyyyy', mmddyyyy)
|
|
9573
9627
|
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
|
|
@@ -9620,6 +9674,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9620
9674
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9621
9675
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9622
9676
|
this.events[mmdd][p].isbulk = true;
|
|
9677
|
+
flagBulk = true;
|
|
9623
9678
|
}
|
|
9624
9679
|
}
|
|
9625
9680
|
}
|
|
@@ -9640,7 +9695,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9640
9695
|
if (this.selectedItemIds.length > 0) {
|
|
9641
9696
|
await this.fetchBulkReportingData();
|
|
9642
9697
|
}
|
|
9643
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
9698
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
9644
9699
|
var clickEvent = new MouseEvent("click", {
|
|
9645
9700
|
"view": window,
|
|
9646
9701
|
"bubbles": true,
|
|
@@ -9665,6 +9720,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9665
9720
|
}, 3000);
|
|
9666
9721
|
}
|
|
9667
9722
|
else {
|
|
9723
|
+
let flagBulk = false;
|
|
9668
9724
|
if (this.selectedItemIds.length === 0) {
|
|
9669
9725
|
await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
|
|
9670
9726
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -9714,6 +9770,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9714
9770
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9715
9771
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9716
9772
|
this.events[mmdd][p].isbulk = true;
|
|
9773
|
+
flagBulk = true;
|
|
9717
9774
|
}
|
|
9718
9775
|
}
|
|
9719
9776
|
}
|
|
@@ -9739,7 +9796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9739
9796
|
if (this.selectedItemIds.length > 0) {
|
|
9740
9797
|
await this.fetchBulkReportingData();
|
|
9741
9798
|
}
|
|
9742
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
9799
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
9743
9800
|
// if(currentColumnButton != null) {
|
|
9744
9801
|
// currentColumnButton.click();
|
|
9745
9802
|
// }
|
|
@@ -9805,6 +9862,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9805
9862
|
"cancelable": false
|
|
9806
9863
|
});
|
|
9807
9864
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
9865
|
+
let flagBulk = false;
|
|
9808
9866
|
if (this.selectedItemIds.length === 0) {
|
|
9809
9867
|
//console.log('makerscheckers', makercheckers, reportercomments);
|
|
9810
9868
|
// console.log('reportformatvalues', reportformatvalues)
|
|
@@ -9928,6 +9986,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9928
9986
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9929
9987
|
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9930
9988
|
this.events[mmdd][p].isbulk = true;
|
|
9989
|
+
flagBulk = true;
|
|
9931
9990
|
}
|
|
9932
9991
|
}
|
|
9933
9992
|
}
|
|
@@ -9947,7 +10006,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9947
10006
|
if (this.selectedItemIds.length > 0) {
|
|
9948
10007
|
await this.fetchBulkReportingData();
|
|
9949
10008
|
}
|
|
9950
|
-
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
10009
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
9951
10010
|
// if(currentColumnButton != null) {
|
|
9952
10011
|
// currentColumnButton.click();
|
|
9953
10012
|
// }
|
|
@@ -10072,7 +10131,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10072
10131
|
//console.log('render stream', id);
|
|
10073
10132
|
this.enableStream();
|
|
10074
10133
|
this.renderTabs(this.TAB_STREAM);
|
|
10075
|
-
this.renderStream(parseInt(id));
|
|
10134
|
+
this.renderStream(parseInt(id), false, false);
|
|
10076
10135
|
});
|
|
10077
10136
|
}
|
|
10078
10137
|
};
|
|
@@ -13597,13 +13656,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13597
13656
|
(_c = container.querySelector('.switch-solid')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', () => {
|
|
13598
13657
|
this.fill = "solid";
|
|
13599
13658
|
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
13600
|
-
this.renderStream();
|
|
13659
|
+
this.renderStream(0, true, false);
|
|
13601
13660
|
}
|
|
13602
13661
|
});
|
|
13603
13662
|
(_f = container.querySelector('.switch-pattern')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', () => {
|
|
13604
13663
|
this.fill = "pattern";
|
|
13605
13664
|
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
13606
|
-
this.renderStream();
|
|
13665
|
+
this.renderStream(0, true, false);
|
|
13607
13666
|
}
|
|
13608
13667
|
});
|
|
13609
13668
|
};
|
|
@@ -13656,7 +13715,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13656
13715
|
//console.log('canceled');
|
|
13657
13716
|
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
13658
13717
|
this.renderChartSettings(container, -1, -1, ctx);
|
|
13659
|
-
this.renderStream(this.streamIndex);
|
|
13718
|
+
this.renderStream(this.streamIndex, false, false);
|
|
13660
13719
|
}
|
|
13661
13720
|
// if(this.getCurrentTab() == this.TAB_UPCOMING) {
|
|
13662
13721
|
// this.renderChartSettings(container, -1, ctx);
|
|
@@ -13664,7 +13723,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13664
13723
|
// }
|
|
13665
13724
|
if (this.getCurrentTab() == this.TAB_THIS) {
|
|
13666
13725
|
this.renderChartSettings(container, -1, -1, ctx);
|
|
13667
|
-
this.renderThis(this.streamIndex);
|
|
13726
|
+
this.renderThis(this.streamIndex, false, false);
|
|
13668
13727
|
}
|
|
13669
13728
|
// if(this.getCurrentTab() == this.TAB_PAST) {
|
|
13670
13729
|
// this.renderChartSettings(container, -1, ctx);
|
|
@@ -15339,7 +15398,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15339
15398
|
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
15340
15399
|
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
15341
15400
|
}
|
|
15342
|
-
this.renderStream(idx);
|
|
15401
|
+
this.renderStream(idx, true, false);
|
|
15343
15402
|
});
|
|
15344
15403
|
// (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-upcoming')?.addEventListener('click', async () => {
|
|
15345
15404
|
// this.enableUpcoming();
|
|
@@ -15367,7 +15426,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15367
15426
|
//console.log('dateresult', dateResult)
|
|
15368
15427
|
this.currentColumnIndex = 1 + "";
|
|
15369
15428
|
await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
15370
|
-
this.renderThis();
|
|
15429
|
+
this.renderThis(0, true, false);
|
|
15371
15430
|
});
|
|
15372
15431
|
// (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-past')?.addEventListener('click', async () => {
|
|
15373
15432
|
// this.enablePast();
|
|
@@ -17517,17 +17576,17 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17517
17576
|
setTimeout(resolve, ms);
|
|
17518
17577
|
});
|
|
17519
17578
|
};
|
|
17520
|
-
this.renderAppropriateStream = (startDate, endDate, showGraph = false) => {
|
|
17579
|
+
this.renderAppropriateStream = (startDate, endDate, showGraph = false, showBackgroundButton = false) => {
|
|
17521
17580
|
if (startDate == "" && endDate == "")
|
|
17522
17581
|
this.renderCalendar(); // yearly
|
|
17523
17582
|
if (this.selectedTab == this.TAB_STREAM) {
|
|
17524
|
-
this.renderStream(parseInt(this.currentColumnIndex), showGraph);
|
|
17583
|
+
this.renderStream(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
|
|
17525
17584
|
}
|
|
17526
17585
|
// if(this.selectedTab == this.TAB_UPCOMING) {
|
|
17527
17586
|
// this.renderUpcoming(parseInt(this.currentColumnIndex), false);
|
|
17528
17587
|
// }
|
|
17529
17588
|
if (this.selectedTab == this.TAB_THIS) {
|
|
17530
|
-
this.renderThis(parseInt(this.currentColumnIndex), showGraph);
|
|
17589
|
+
this.renderThis(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
|
|
17531
17590
|
}
|
|
17532
17591
|
// if(this.selectedTab == this.TAB_PAST) {
|
|
17533
17592
|
// this.renderPast(parseInt(this.currentColumnIndex), false);
|
|
@@ -17806,11 +17865,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17806
17865
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
17807
17866
|
this._SfLoader.innerHTML = '';
|
|
17808
17867
|
if (xhr.status == 200) {
|
|
17809
|
-
const
|
|
17810
|
-
console.log('bulk reports
|
|
17868
|
+
const jsonResponse = JSON.parse(xhr.responseText);
|
|
17869
|
+
console.log('bulk reports jsonResponse', jsonResponse);
|
|
17811
17870
|
let flagBulk = false;
|
|
17812
|
-
if (
|
|
17813
|
-
for (let sortid of Object.keys(
|
|
17871
|
+
if (jsonResponse.result == true) {
|
|
17872
|
+
for (let sortid of Object.keys(jsonResponse.data)) {
|
|
17814
17873
|
let sortidArr = sortid.split(';');
|
|
17815
17874
|
let mmddyyyy = sortidArr[0];
|
|
17816
17875
|
let entityid = sortidArr[1];
|
|
@@ -17828,19 +17887,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17828
17887
|
}
|
|
17829
17888
|
}
|
|
17830
17889
|
}
|
|
17831
|
-
let backgroundProcessButton = this._SfIEventsC.querySelector('#button-background-process');
|
|
17832
17890
|
if (flagBulk) {
|
|
17833
|
-
backgroundProcessButton.
|
|
17834
|
-
|
|
17835
|
-
|
|
17836
|
-
|
|
17837
|
-
|
|
17838
|
-
|
|
17839
|
-
|
|
17840
|
-
|
|
17891
|
+
// backgroundProcessButton.classList.remove('hide');
|
|
17892
|
+
// backgroundProcessButton.style.display = 'flex'
|
|
17893
|
+
// console.log('backgroundprocessbutton', backgroundProcessButton);
|
|
17894
|
+
// backgroundProcessButton.addEventListener('click',() => {
|
|
17895
|
+
// console.log('bulk-progress clicked')
|
|
17896
|
+
// let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
|
|
17897
|
+
// bulkLoader.scrollIntoView();
|
|
17898
|
+
// })
|
|
17899
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, true);
|
|
17841
17900
|
}
|
|
17842
17901
|
else {
|
|
17843
|
-
backgroundProcessButton.
|
|
17902
|
+
// backgroundProcessButton.classList.add('hide')
|
|
17903
|
+
// backgroundProcessButton.style.display = 'none'
|
|
17844
17904
|
}
|
|
17845
17905
|
}
|
|
17846
17906
|
}
|
|
@@ -20674,14 +20734,7 @@ SfIEvents.styles = css `
|
|
|
20674
20734
|
right: 10px
|
|
20675
20735
|
}
|
|
20676
20736
|
#button-background-process {
|
|
20677
|
-
|
|
20678
|
-
position: fixed;
|
|
20679
|
-
top: 10px;
|
|
20680
|
-
left:0;
|
|
20681
|
-
right: 0;
|
|
20682
|
-
margin-left: auto;
|
|
20683
|
-
margin-right: auto;
|
|
20684
|
-
width: fit-content;
|
|
20737
|
+
cursor: pointer
|
|
20685
20738
|
}
|
|
20686
20739
|
|
|
20687
20740
|
.small-icon {
|