sf-i-events 1.0.802 → 1.0.804
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/dev/index.html +21 -1
- package/package.json +1 -1
- package/sf-i-events.d.ts +3 -2
- package/sf-i-events.js +220 -149
- package/src/sf-i-events.ts +232 -163
package/sf-i-events.js
CHANGED
|
@@ -113,6 +113,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
113
113
|
this.COLOR_NOT_COMPLIED = "#C80036";
|
|
114
114
|
this.COLOR_PARTIALLY_COMPLIED = "#F79256";
|
|
115
115
|
this.COLOR_COMPLIED = "#50cf01";
|
|
116
|
+
this.COLOR_COMPLIED_WITH_EXCEPTION = "#ffe505";
|
|
116
117
|
this.STATUS_NOT_STARTED = "not-started";
|
|
117
118
|
this.STATUS_PENDING_APPROVAL = "pending-approval";
|
|
118
119
|
this.STATUS_REJECTED = "rejected";
|
|
@@ -427,6 +428,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
427
428
|
.color-complied {
|
|
428
429
|
color: #50cf01;
|
|
429
430
|
}
|
|
431
|
+
.color-complied-with-exception {
|
|
432
|
+
color: #ffe505;
|
|
433
|
+
}
|
|
430
434
|
.color-scheduled {
|
|
431
435
|
color: #888888;
|
|
432
436
|
}
|
|
@@ -632,6 +636,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
632
636
|
.color-complied {
|
|
633
637
|
color: #50cf01;
|
|
634
638
|
}
|
|
639
|
+
.color-complied-with-exception {
|
|
640
|
+
color: #ffe505;
|
|
641
|
+
}
|
|
635
642
|
.color-scheduled {
|
|
636
643
|
color: #888888;
|
|
637
644
|
}
|
|
@@ -1845,6 +1852,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1845
1852
|
if (arrComplianceData[name]["complied"] == null) {
|
|
1846
1853
|
arrComplianceData[name]["complied"] = 0;
|
|
1847
1854
|
}
|
|
1855
|
+
if (arrComplianceData[name]["complied-with-exception"] == null) {
|
|
1856
|
+
arrComplianceData[name]["complied-with-exception"] = 0;
|
|
1857
|
+
}
|
|
1848
1858
|
arrComplianceData[name][complianceStatus]++;
|
|
1849
1859
|
}
|
|
1850
1860
|
return { arrData: arrData, arrPartData: arrPartData, arrLateData: arrLateData, arrComplianceData: arrComplianceData };
|
|
@@ -2082,7 +2092,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2082
2092
|
}
|
|
2083
2093
|
}
|
|
2084
2094
|
};
|
|
2085
|
-
this.getComplianceStatus = (completeness, timeliness) => {
|
|
2095
|
+
this.getComplianceStatus = (completeness, timeliness, percentage) => {
|
|
2086
2096
|
if (completeness == "not-started") {
|
|
2087
2097
|
if (timeliness == "in-time") {
|
|
2088
2098
|
return "scheduled";
|
|
@@ -2112,7 +2122,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2112
2122
|
}
|
|
2113
2123
|
else {
|
|
2114
2124
|
if (timeliness == "in-time" || timeliness == "late-reported" || timeliness == "late-approved") {
|
|
2115
|
-
|
|
2125
|
+
if (percentage != null && parseInt(percentage) < 100) {
|
|
2126
|
+
return "complied-with-exception";
|
|
2127
|
+
}
|
|
2128
|
+
else {
|
|
2129
|
+
return "complied";
|
|
2130
|
+
}
|
|
2116
2131
|
}
|
|
2117
2132
|
else {
|
|
2118
2133
|
return "not-complied";
|
|
@@ -2269,6 +2284,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2269
2284
|
html += '<div part="badge-dashboard" id="chip-compliance-1" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-not-complied">disabled_by_default</span> <span>Not Complied:</span> <span id="graph-not-complied">DASHBOARD_NOT_COMPLIED</span></div>';
|
|
2270
2285
|
html += '<div part="badge-dashboard" id="chip-compliance-2" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-partially-complied">rule</span> <span>Partially Complied:</span> <span id="graph-partially-complied">DASHBOARD_PARTIALLY_COMPLIED</span></div>';
|
|
2271
2286
|
html += '<div part="badge-dashboard" id="chip-compliance-3" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-symbols-outlined color-complied">sweep</span> <span>Complied:</span> <span id="graph-complied">DASHBOARD_COMPLIED</span></div>';
|
|
2287
|
+
html += '<div part="badge-dashboard" id="chip-compliance-4" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-symbols-outlined color-complied-with-exception">rule</span> <span>Complied With Exception:</span> <span id="graph-complied-with-exception">DASHBOARD_COMPLIED_WITH_EXCEPTION</span></div>';
|
|
2272
2288
|
html += '</div>';
|
|
2273
2289
|
html += '<div id="stream-event-filter" part="stream-event-total" class="d-flex flex-wrap"></div>';
|
|
2274
2290
|
return html;
|
|
@@ -2290,6 +2306,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2290
2306
|
html += '<div part="badge-dashboard" id="chip-compliance-1" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-not-complied">disabled_by_default</span> <span>Not Complied:</span> <span id="graph-not-complied">DASHBOARD_NOT_COMPLIED</span></div>';
|
|
2291
2307
|
html += '<div part="badge-dashboard" id="chip-compliance-2" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-partially-complied">rule</span> <span>Partially Complied:</span> <span id="graph-partially-complied">DASHBOARD_PARTIALLY_COMPLIED</span></div>';
|
|
2292
2308
|
html += '<div part="badge-dashboard" id="chip-compliance-3" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-symbols-outlined color-complied">sweep</span> <span>Complied:</span> <span id="graph-complied">DASHBOARD_COMPLIED</span></div>';
|
|
2309
|
+
html += '<div part="badge-dashboard" id="chip-compliance-4" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-symbols-outlined color-complied-with-exception">rule</span> <span>Complied With Exception:</span> <span id="graph-complied-with-exception">DASHBOARD_COMPLIED_WITH_EXCEPTION</span></div>';
|
|
2293
2310
|
html += '</div>';
|
|
2294
2311
|
html += '<div id="stream-event-filter" part="stream-event-total" class="d-flex flex-wrap"></div>';
|
|
2295
2312
|
return html;
|
|
@@ -2619,6 +2636,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2619
2636
|
html += (complianceStatus == "not-complied" ? '<span class="material-symbols-outlined color-not-complied color-not-complied-item color-not-complied-item-' + i + '">disabled_by_default</span>' : '');
|
|
2620
2637
|
html += (complianceStatus == "partially-complied" ? '<span class="material-symbols-outlined color-partially-complied color-partially-complied-item color-partially-complied-item-' + i + '">rule</span>' : '');
|
|
2621
2638
|
html += (complianceStatus == "complied" ? '<span class="material-symbols-outlined color-complied color-complied-item color-complied-item-' + i + '">sweep</span>' : '');
|
|
2639
|
+
html += (complianceStatus == "complied-with-exception" ? '<span class="material-symbols-outlined color-complied-with-exception color-complied-with-exception-item color-complied-with-exception-item-' + i + '">rule</span>' : '');
|
|
2622
2640
|
html += (partStatus == "not-started" ? '<span class="material-symbols-outlined color-not-started color-not-started-item color-not-started-item-' + i + '">schedule</span>' : '');
|
|
2623
2641
|
html += (partStatus == "pending-approval" ? '<span class="material-symbols-outlined color-pending color-pending-item color-pending-item-' + i + '">pending</span>' : '');
|
|
2624
2642
|
html += (partStatus == "rejected" ? '<span class="material-symbols-outlined color-rejected color-rejected-item color-rejected-item-' + i + '">block</span>' : '');
|
|
@@ -2674,7 +2692,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2674
2692
|
return html;
|
|
2675
2693
|
};
|
|
2676
2694
|
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
|
|
2677
|
-
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;
|
|
2695
|
+
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, compliedWithException = 0;
|
|
2678
2696
|
var html = '';
|
|
2679
2697
|
this.selectedItemIds = [];
|
|
2680
2698
|
this.selectedItems = [];
|
|
@@ -2730,7 +2748,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2730
2748
|
// //console.log('eventlog1', tempEvents1['06/30'][7].comments, mmdd, j);
|
|
2731
2749
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
2732
2750
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(this.events[mmdd][j])), partStatus);
|
|
2733
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus);
|
|
2751
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage);
|
|
2734
2752
|
if (this.flowGraph == this.FLOW_GRAPH_TIMELINESS) {
|
|
2735
2753
|
bgStatus += lateStatus;
|
|
2736
2754
|
}
|
|
@@ -2755,6 +2773,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2755
2773
|
partiallyComplied = partiallyComplied + (complianceStatus == "partially-complied" ? 1 : 0);
|
|
2756
2774
|
notComplied = notComplied + (complianceStatus == "not-complied" ? 1 : 0);
|
|
2757
2775
|
complied = complied + (complianceStatus == "complied" ? 1 : 0);
|
|
2776
|
+
compliedWithException = compliedWithException + (complianceStatus == "complied-with-exception" ? 1 : 0);
|
|
2758
2777
|
this.events[mmdd][j][this.FLOW_GRAPH_COMPLETENESS] = partStatus;
|
|
2759
2778
|
this.events[mmdd][j][this.FLOW_GRAPH_TIMELINESS] = lateStatus;
|
|
2760
2779
|
this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE] = complianceStatus;
|
|
@@ -2876,6 +2895,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2876
2895
|
html = html.replace("DASHBOARD_NOT_COMPLIED", notComplied + "");
|
|
2877
2896
|
html = html.replace("DASHBOARD_PARTIALLY_COMPLIED", partiallyComplied + "");
|
|
2878
2897
|
html = html.replace("DASHBOARD_COMPLIED", complied + "");
|
|
2898
|
+
html = html.replace("DASHBOARD_COMPLIED_WITH_EXCEPTION", compliedWithException + "");
|
|
2879
2899
|
this.csvDataStats = 'Period,Total,Not Started,Approved,Pending Approval,Rejected,Past Due Date,Late Reported,Late Executed,Late Approved,Scheduled,Not Complied,Partially Complied,Complied\n';
|
|
2880
2900
|
this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + scheduled + "," + notComplied + "," + partiallyComplied + "," + complied;
|
|
2881
2901
|
this.htmlDataStats = 'Completeness<br /><br /><table class="w-100"><tr><th class="w-14">Total</th><th class="w-14">Not Started</th><th class="w-14">Approved</th><th class="w-14">Pending Approval</th><th class="w-14">Rejected</th><tr>';
|
|
@@ -3099,8 +3119,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3099
3119
|
let docs = event['documents'] == null ? [] : event['documents'];
|
|
3100
3120
|
let approved = event['approved'] == null ? false : event['approved'];
|
|
3101
3121
|
let dateOfCompletion = event['dateofcompletion'] == null ? '' : event['dateofcompletion'];
|
|
3122
|
+
let percentage = event['percentage'] == null ? '100' : event['percentage'];
|
|
3102
3123
|
let makercheckers = event['makercheckers'] == null ? [] : event['makercheckers'];
|
|
3103
3124
|
let docsOptional = event['docs'] == null ? [] : event['docs'];
|
|
3125
|
+
console.log('rendering reporting', event, percentage);
|
|
3104
3126
|
if (this.selectedItemIds.length > 0) {
|
|
3105
3127
|
html += `<div class="d-flex justify-between ">
|
|
3106
3128
|
<h4 class="m-0 bulk-upload-label" part="bulk-upload-label">${this.selectedItemIds.length - 1} other ` + ((this.selectedItemIds.length - 1) === 1 ? `item` : `items`) + ` also selected</h4>
|
|
@@ -3128,6 +3150,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3128
3150
|
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
3129
3151
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3130
3152
|
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
3153
|
+
html += '<label part="input-label">Percentage</label>';
|
|
3154
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
3131
3155
|
html += '<div>';
|
|
3132
3156
|
html += '<label part="input-label">Approve?*</label><br />';
|
|
3133
3157
|
html += '<div class="mt-5">';
|
|
@@ -3167,6 +3191,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3167
3191
|
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
3168
3192
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3169
3193
|
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
3194
|
+
html += '<label part="input-label">Completion Percentage*</label>';
|
|
3195
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
|
|
3170
3196
|
// if(docsOptional.length === 0) {
|
|
3171
3197
|
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
3172
3198
|
if (event['uploadguidance'] != null && event['uploadguidance'].length > 0) {
|
|
@@ -3204,6 +3230,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3204
3230
|
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
3205
3231
|
html += '<label part="input-label">Date of Completion</label>';
|
|
3206
3232
|
html += '<input id="input-auditor-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '" readonly/><br />';
|
|
3233
|
+
html += '<label part="input-label">Percentage</label>';
|
|
3234
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
3207
3235
|
html += '<div>';
|
|
3208
3236
|
html += '<label part="input-label">Approve?</label><br />';
|
|
3209
3237
|
html += '<div class="mt-5">';
|
|
@@ -3577,7 +3605,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3577
3605
|
reportformatvalues = (_a = JSON.stringify(this._SfReporting[0].querySelector('#reporting-format').selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
3578
3606
|
reportformatschema = (_b = this._SfReporting[0].querySelector('#reporting-format').configjson) !== null && _b !== void 0 ? _b : "";
|
|
3579
3607
|
}
|
|
3580
|
-
|
|
3608
|
+
let percentage = "100";
|
|
3609
|
+
if (listReportingContainer.querySelector('#input-reporter-percentage') != null) {
|
|
3610
|
+
percentage = listReportingContainer.querySelector('#input-reporter-percentage').value;
|
|
3611
|
+
}
|
|
3581
3612
|
if (docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0) {
|
|
3582
3613
|
//console.log('reporter comments 3', reportercomments);
|
|
3583
3614
|
buttonClick.innerHTML = "Save";
|
|
@@ -3587,160 +3618,172 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3587
3618
|
}, 3000);
|
|
3588
3619
|
}
|
|
3589
3620
|
else {
|
|
3590
|
-
|
|
3591
|
-
|
|
3621
|
+
if (docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0) {
|
|
3622
|
+
//console.log('reporter comments 3', reportercomments);
|
|
3592
3623
|
buttonClick.innerHTML = "Save";
|
|
3593
|
-
this.setError('
|
|
3624
|
+
this.setError('No documents uploaded!');
|
|
3594
3625
|
setTimeout(() => {
|
|
3595
3626
|
this.clearMessages();
|
|
3596
3627
|
}, 3000);
|
|
3597
3628
|
}
|
|
3598
3629
|
else {
|
|
3599
|
-
//console.log('
|
|
3600
|
-
if (
|
|
3630
|
+
//console.log('reporterdoc', reporterdoc);
|
|
3631
|
+
if (reporterdoc.length === 0) {
|
|
3601
3632
|
buttonClick.innerHTML = "Save";
|
|
3602
|
-
this.setError('
|
|
3633
|
+
this.setError('Date of completion not selected!');
|
|
3603
3634
|
setTimeout(() => {
|
|
3604
3635
|
this.clearMessages();
|
|
3605
3636
|
}, 3000);
|
|
3606
3637
|
}
|
|
3607
3638
|
else {
|
|
3608
|
-
|
|
3609
|
-
if (
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3639
|
+
//console.log('makerscheckers 1', reportercomments);
|
|
3640
|
+
if (reportercomments.trim().length === 0) {
|
|
3641
|
+
buttonClick.innerHTML = "Save";
|
|
3642
|
+
this.setError('Comments cannot be blank!');
|
|
3643
|
+
setTimeout(() => {
|
|
3644
|
+
this.clearMessages();
|
|
3645
|
+
}, 3000);
|
|
3646
|
+
}
|
|
3647
|
+
else {
|
|
3648
|
+
let flagBulk = false;
|
|
3649
|
+
if (this.selectedItemIds.length == 0) {
|
|
3650
|
+
await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage);
|
|
3651
|
+
console.log('this.events', this.events);
|
|
3621
3652
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3622
3653
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3623
|
-
this.events[mmdd][p].
|
|
3624
|
-
|
|
3625
|
-
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3654
|
+
this.events[mmdd][p].documents = docs;
|
|
3655
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
3626
3656
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3627
3657
|
}
|
|
3628
3658
|
}
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
3640
|
-
const selectedId = this.selectedItemIds[k];
|
|
3641
|
-
//console.log('selectedid', selectedId);
|
|
3642
|
-
const makercheckersL = selectedId.split('-')[5];
|
|
3643
|
-
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
3644
|
-
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
3645
|
-
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
3646
|
-
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
3647
|
-
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
3648
|
-
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
3649
|
-
if (parseInt(makercheckersL) > 0) {
|
|
3650
|
-
bulkBodyReview.push({
|
|
3651
|
-
"mmddyyyy": mmddyyyy,
|
|
3652
|
-
"projectid": this.projectId,
|
|
3653
|
-
"type": "report",
|
|
3654
|
-
"eventid": eventId,
|
|
3655
|
-
"comments": reportercomments,
|
|
3656
|
-
"dateofcompletion": reporterdoc,
|
|
3657
|
-
"entityid": entityId,
|
|
3658
|
-
"locationid": locationId,
|
|
3659
|
-
"event": null,
|
|
3660
|
-
"docs": JSON.stringify(docs),
|
|
3661
|
-
"approved": true,
|
|
3662
|
-
"username": this.userName,
|
|
3663
|
-
"reportformatvalues": reportformatvalues,
|
|
3664
|
-
"reportformatschema": reportformatschema,
|
|
3665
|
-
"userid": this.userProfileId,
|
|
3666
|
-
"userrole": this.myRole,
|
|
3667
|
-
"year": this.calendarStartYYYY,
|
|
3668
|
-
"module": event.isnotice != null ? "notices" : "events"
|
|
3669
|
-
});
|
|
3670
|
-
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
3659
|
+
if (event.makercheckers.length > 0) {
|
|
3660
|
+
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
3661
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3662
|
+
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3663
|
+
this.events[mmdd][p].approved = true;
|
|
3664
|
+
// this.events[mmdd][p].documents = docs
|
|
3665
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3666
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3671
3669
|
}
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
"mmddyyyy": mmddyyyy,
|
|
3675
|
-
"projectid": this.projectId,
|
|
3676
|
-
"type": "report",
|
|
3677
|
-
"eventid": eventId,
|
|
3678
|
-
"comments": reportercomments,
|
|
3679
|
-
"dateofcompletion": reporterdoc,
|
|
3680
|
-
"entityid": entityId,
|
|
3681
|
-
"locationid": locationId,
|
|
3682
|
-
"event": null,
|
|
3683
|
-
"docs": JSON.stringify(docs),
|
|
3684
|
-
"username": this.userName,
|
|
3685
|
-
"reportformatvalues": reportformatvalues,
|
|
3686
|
-
"reportformatschema": reportformatschema,
|
|
3687
|
-
"userid": this.userProfileId,
|
|
3688
|
-
"userrole": this.myRole,
|
|
3689
|
-
"year": this.calendarStartYYYY,
|
|
3690
|
-
"module": event.isnotice != null ? "notices" : "events"
|
|
3691
|
-
});
|
|
3670
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3671
|
+
this.recentlyReported[mmdd] = [];
|
|
3692
3672
|
}
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
// this.clearMessages();
|
|
3673
|
+
this.recentlyReported[mmdd].push(event);
|
|
3674
|
+
console.log('recently reported', this.recentlyReported);
|
|
3696
3675
|
}
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3676
|
+
else {
|
|
3677
|
+
let bulkBody = [];
|
|
3678
|
+
let bulkBodyReview = [];
|
|
3679
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
3680
|
+
const selectedId = this.selectedItemIds[k];
|
|
3681
|
+
//console.log('selectedid', selectedId);
|
|
3682
|
+
const makercheckersL = selectedId.split('-')[5];
|
|
3683
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
3684
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
3685
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
3686
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
3687
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
3688
|
+
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
3689
|
+
if (parseInt(makercheckersL) > 0) {
|
|
3690
|
+
bulkBodyReview.push({
|
|
3691
|
+
"mmddyyyy": mmddyyyy,
|
|
3692
|
+
"projectid": this.projectId,
|
|
3693
|
+
"type": "report",
|
|
3694
|
+
"eventid": eventId,
|
|
3695
|
+
"comments": reportercomments,
|
|
3696
|
+
"dateofcompletion": reporterdoc,
|
|
3697
|
+
"percentage": percentage,
|
|
3698
|
+
"entityid": entityId,
|
|
3699
|
+
"locationid": locationId,
|
|
3700
|
+
"event": null,
|
|
3701
|
+
"docs": JSON.stringify(docs),
|
|
3702
|
+
"approved": true,
|
|
3703
|
+
"username": this.userName,
|
|
3704
|
+
"reportformatvalues": reportformatvalues,
|
|
3705
|
+
"reportformatschema": reportformatschema,
|
|
3706
|
+
"userid": this.userProfileId,
|
|
3707
|
+
"userrole": this.myRole,
|
|
3708
|
+
"year": this.calendarStartYYYY,
|
|
3709
|
+
"module": event.isnotice != null ? "notices" : "events"
|
|
3710
|
+
});
|
|
3711
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
3712
|
+
}
|
|
3713
|
+
else {
|
|
3714
|
+
bulkBody.push({
|
|
3715
|
+
"mmddyyyy": mmddyyyy,
|
|
3716
|
+
"projectid": this.projectId,
|
|
3717
|
+
"type": "report",
|
|
3718
|
+
"eventid": eventId,
|
|
3719
|
+
"comments": reportercomments,
|
|
3720
|
+
"dateofcompletion": reporterdoc,
|
|
3721
|
+
"percentage": percentage,
|
|
3722
|
+
"entityid": entityId,
|
|
3723
|
+
"locationid": locationId,
|
|
3724
|
+
"event": null,
|
|
3725
|
+
"docs": JSON.stringify(docs),
|
|
3726
|
+
"username": this.userName,
|
|
3727
|
+
"reportformatvalues": reportformatvalues,
|
|
3728
|
+
"reportformatschema": reportformatschema,
|
|
3729
|
+
"userid": this.userProfileId,
|
|
3730
|
+
"userrole": this.myRole,
|
|
3731
|
+
"year": this.calendarStartYYYY,
|
|
3732
|
+
"module": event.isnotice != null ? "notices" : "events"
|
|
3733
|
+
});
|
|
3734
|
+
}
|
|
3735
|
+
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
3736
|
+
// await this.sleep(2000);
|
|
3737
|
+
// this.clearMessages();
|
|
3738
|
+
}
|
|
3739
|
+
// await this.uploadReportsBulk(bulkBody);
|
|
3740
|
+
// await this.fetchBulkReportingData();
|
|
3741
|
+
if (bulkBody.length > 0) {
|
|
3742
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
3743
|
+
}
|
|
3744
|
+
if (bulkBodyReview.length > 0) {
|
|
3745
|
+
await this.uploadReportsReviewsBulk(bulkBodyReview);
|
|
3746
|
+
}
|
|
3747
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
3748
|
+
const selectedId = this.selectedItemIds[k];
|
|
3749
|
+
//console.log('selectedid', selectedId);
|
|
3750
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
3751
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
3752
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
3753
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
3754
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
3755
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3756
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
3757
|
+
flagBulk = true;
|
|
3758
|
+
this.events[mmdd][p].isbulk = true;
|
|
3759
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3760
|
+
this.recentlyReported[mmdd] = [];
|
|
3761
|
+
}
|
|
3762
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3719
3763
|
}
|
|
3720
|
-
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
3721
3764
|
}
|
|
3722
3765
|
}
|
|
3723
3766
|
}
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
3727
|
-
}
|
|
3728
|
-
else {
|
|
3729
|
-
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
3730
|
-
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
3731
|
-
// } else
|
|
3732
|
-
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
3733
|
-
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
3734
|
-
this.processFindSelection(this._SfFindContainer, searchString);
|
|
3767
|
+
if (this.mode == "next") {
|
|
3768
|
+
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
3735
3769
|
}
|
|
3736
3770
|
else {
|
|
3737
|
-
if
|
|
3738
|
-
|
|
3771
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
3772
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
3773
|
+
// } else
|
|
3774
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
3775
|
+
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
3776
|
+
this.processFindSelection(this._SfFindContainer, searchString);
|
|
3777
|
+
}
|
|
3778
|
+
else {
|
|
3779
|
+
if (this.selectedItemIds.length > 0) {
|
|
3780
|
+
await this.fetchBulkReportingData();
|
|
3781
|
+
}
|
|
3782
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
3783
|
+
// if(currentColumnButton != null) {
|
|
3784
|
+
// currentColumnButton.click();
|
|
3785
|
+
// }
|
|
3739
3786
|
}
|
|
3740
|
-
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
3741
|
-
// if(currentColumnButton != null) {
|
|
3742
|
-
// currentColumnButton.click();
|
|
3743
|
-
// }
|
|
3744
3787
|
}
|
|
3745
3788
|
}
|
|
3746
3789
|
}
|
|
@@ -8346,27 +8389,29 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8346
8389
|
var dataScheduled = divContainer.querySelector('#graph-scheduled').innerHTML;
|
|
8347
8390
|
var dataPartiallyComplied = divContainer.querySelector('#graph-partially-complied').innerHTML;
|
|
8348
8391
|
var dataComplied = divContainer.querySelector('#graph-complied').innerHTML;
|
|
8392
|
+
var dataCompliedWithException = divContainer.querySelector('#graph-complied-with-exception').innerHTML;
|
|
8349
8393
|
const ctx = divContainer.querySelector('#myChart');
|
|
8350
8394
|
this.showGraph(divContainer, 1);
|
|
8351
8395
|
this.clearGraph(divContainer, 2);
|
|
8352
8396
|
this.clearGraph(divContainer, 3);
|
|
8353
8397
|
this.clearGraph(divContainer, 4);
|
|
8354
8398
|
const data = {
|
|
8355
|
-
labels: ['Scheduled', 'Not Complied', 'Partially Complied', 'Complied'],
|
|
8399
|
+
labels: ['Scheduled', 'Not Complied', 'Partially Complied', 'Complied', 'Complied With Exception'],
|
|
8356
8400
|
datasets: [{
|
|
8357
8401
|
label: 'Compliances',
|
|
8358
|
-
data: [dataScheduled, dataNotComplied, dataPartiallyComplied, dataComplied],
|
|
8402
|
+
data: [dataScheduled, dataNotComplied, dataPartiallyComplied, dataComplied, dataCompliedWithException],
|
|
8359
8403
|
borderWidth: 1,
|
|
8360
8404
|
backgroundColor: [
|
|
8361
8405
|
this.COLOR_SCHEDULED,
|
|
8362
8406
|
this.COLOR_NOT_COMPLIED,
|
|
8363
8407
|
this.COLOR_PARTIALLY_COMPLIED,
|
|
8364
|
-
this.COLOR_COMPLIED
|
|
8408
|
+
this.COLOR_COMPLIED,
|
|
8409
|
+
this.COLOR_COMPLIED_WITH_EXCEPTION
|
|
8365
8410
|
]
|
|
8366
8411
|
}]
|
|
8367
8412
|
};
|
|
8368
|
-
this.csvGraphStats += 'Compliance,Scheduled,Not Complied,Partially Complied,Complied,Total\n';
|
|
8369
|
-
this.csvGraphStats += 'Count,' + parseInt(dataScheduled) + ',' + parseInt(dataNotComplied) + ',' + parseInt(dataPartiallyComplied) + ',' + parseInt(dataComplied) + ',' + parseInt(dataTotal) + '\n';
|
|
8413
|
+
this.csvGraphStats += 'Compliance,Scheduled,Not Complied,Partially Complied,Complied,Complied With Exception,Total\n';
|
|
8414
|
+
this.csvGraphStats += 'Count,' + parseInt(dataScheduled) + ',' + parseInt(dataNotComplied) + ',' + parseInt(dataPartiallyComplied) + ',' + parseInt(dataComplied) + ',' + parseInt(dataCompliedWithException) + ',' + parseInt(dataTotal) + '\n';
|
|
8370
8415
|
//console.log('rendering timeliness graph', this.csvGraphStats);
|
|
8371
8416
|
const itemsTimeliness = divContainer.querySelectorAll('.stat-timeliness');
|
|
8372
8417
|
for (var i = 0; i < itemsTimeliness.length; i++) {
|
|
@@ -8596,6 +8641,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8596
8641
|
dataBar2['datasets'][3]['data'].push(complianceData[Object.keys(complianceData)[i]]['complied']);
|
|
8597
8642
|
}
|
|
8598
8643
|
dataBar2['datasets'][3]['backgroundColor'] = this.COLOR_COMPLIED;
|
|
8644
|
+
dataBar2['datasets'][3]['label'] = 'Complied With Exception';
|
|
8645
|
+
dataBar2['datasets'][3]['data'] = [];
|
|
8646
|
+
for (i = 0; i < Object.keys(complianceData).length; i++) {
|
|
8647
|
+
dataBar2['datasets'][3]['data'].push(complianceData[Object.keys(complianceData)[i]]['complied-with-exception']);
|
|
8648
|
+
}
|
|
8649
|
+
dataBar2['datasets'][3]['backgroundColor'] = this.COLOR_COMPLIED_WITH_EXCEPTION;
|
|
8599
8650
|
return dataBar2;
|
|
8600
8651
|
};
|
|
8601
8652
|
this.populateGraphDataPie = (pieData) => {
|
|
@@ -9231,6 +9282,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9231
9282
|
reportformatvalues = (_a = JSON.stringify(this._SfReporting[0].querySelector('#reporting-format').selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
9232
9283
|
reportformatschema = (_b = this._SfReporting[0].querySelector('#reporting-format').configjson) !== null && _b !== void 0 ? _b : "";
|
|
9233
9284
|
}
|
|
9285
|
+
let percentage = "100";
|
|
9286
|
+
if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
|
|
9287
|
+
percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
|
|
9288
|
+
}
|
|
9234
9289
|
if (docs.length === 0 && docsOptional.length === 0) {
|
|
9235
9290
|
//console.log('reporter comments 3', reportercomments);
|
|
9236
9291
|
buttonClick.innerHTML = "Save";
|
|
@@ -9266,7 +9321,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9266
9321
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
9267
9322
|
let flagBulk = false;
|
|
9268
9323
|
if (this.selectedItemIds.length === 0) {
|
|
9269
|
-
await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices");
|
|
9324
|
+
await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage);
|
|
9270
9325
|
console.log('this.events', this.events);
|
|
9271
9326
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9272
9327
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
@@ -9314,6 +9369,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9314
9369
|
"eventid": eventId,
|
|
9315
9370
|
"comments": reportercomments,
|
|
9316
9371
|
"dateofcompletion": reporterdoc,
|
|
9372
|
+
"percentage": percentage,
|
|
9317
9373
|
"entityid": entityId,
|
|
9318
9374
|
"locationid": locationId,
|
|
9319
9375
|
"event": null,
|
|
@@ -9337,6 +9393,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9337
9393
|
"eventid": eventId,
|
|
9338
9394
|
"comments": reportercomments,
|
|
9339
9395
|
"dateofcompletion": reporterdoc,
|
|
9396
|
+
"percentage": percentage,
|
|
9340
9397
|
"entityid": entityId,
|
|
9341
9398
|
"locationid": locationId,
|
|
9342
9399
|
"event": null,
|
|
@@ -9493,7 +9550,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9493
9550
|
};
|
|
9494
9551
|
this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer) => {
|
|
9495
9552
|
console.log('listEvent', listEvent, listEvent.id);
|
|
9496
|
-
let url = "https://" + this.apiId + "/
|
|
9553
|
+
let url = "https://" + this.apiId + "/getalleventdetails1";
|
|
9497
9554
|
//console.log('fetch calendar url', url);
|
|
9498
9555
|
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "eventid": listEvent.id, "entityid": listEvent.entityid, "locationid": listEvent.locationid, "mmddyyyy": mmddyyyy, "year": this.calendarStartYYYY };
|
|
9499
9556
|
//console.log('urlbody', urlBody);
|
|
@@ -10351,6 +10408,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10351
10408
|
reportformatvalues = (_a = JSON.stringify(this._SfReporting[0].querySelector('#reporting-format').selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
10352
10409
|
reportformatschema = (_b = this._SfReporting[0].querySelector('#reporting-format').configjson) !== null && _b !== void 0 ? _b : "";
|
|
10353
10410
|
}
|
|
10411
|
+
let percentage = "100";
|
|
10412
|
+
if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
|
|
10413
|
+
percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
|
|
10414
|
+
}
|
|
10354
10415
|
if (docs.length === 0 && docsOptional.length === 0) {
|
|
10355
10416
|
//console.log('reporter comments 3', reportercomments);
|
|
10356
10417
|
buttonClick.innerHTML = "Save";
|
|
@@ -10389,7 +10450,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10389
10450
|
//console.log('makerscheckers', makercheckers, reportercomments);
|
|
10390
10451
|
// console.log('reportformatvalues', reportformatvalues)
|
|
10391
10452
|
// console.log('reportformatschema',reportformatschema)
|
|
10392
|
-
await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events");
|
|
10453
|
+
await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage);
|
|
10393
10454
|
console.log('this.events', this.events);
|
|
10394
10455
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10395
10456
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
@@ -10454,6 +10515,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10454
10515
|
"eventid": eventId,
|
|
10455
10516
|
"comments": reportercomments,
|
|
10456
10517
|
"dateofcompletion": reporterdoc,
|
|
10518
|
+
"percentage": percentage,
|
|
10457
10519
|
"entityid": entityId,
|
|
10458
10520
|
"locationid": locationId,
|
|
10459
10521
|
"event": null,
|
|
@@ -10477,6 +10539,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10477
10539
|
"eventid": eventId,
|
|
10478
10540
|
"comments": reportercomments,
|
|
10479
10541
|
"dateofcompletion": reporterdoc,
|
|
10542
|
+
"percentage": percentage,
|
|
10480
10543
|
"entityid": entityId,
|
|
10481
10544
|
"locationid": locationId,
|
|
10482
10545
|
"event": null,
|
|
@@ -14397,6 +14460,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14397
14460
|
.color-complied {
|
|
14398
14461
|
color: #50cf01;
|
|
14399
14462
|
}
|
|
14463
|
+
.color-complied-with-exception {
|
|
14464
|
+
color: #ffe505;
|
|
14465
|
+
}
|
|
14400
14466
|
.color-scheduled {
|
|
14401
14467
|
color: #888888;
|
|
14402
14468
|
}
|
|
@@ -15624,8 +15690,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15624
15690
|
streamEventFilters.style.display = 'block';
|
|
15625
15691
|
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>';
|
|
15626
15692
|
(_a = streamEventFilters.querySelector('#button-filter-cancel')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
15627
|
-
this.clearSelectedGraphParam();
|
|
15628
15693
|
this.graphFilter = "";
|
|
15694
|
+
this.clearSelectedGraphParam();
|
|
15629
15695
|
});
|
|
15630
15696
|
setTimeout(() => {
|
|
15631
15697
|
this.recentlyReported = {};
|
|
@@ -16906,7 +16972,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16906
16972
|
}
|
|
16907
16973
|
};
|
|
16908
16974
|
this.uploadReportsReviewsBulk = async (bulkBody) => {
|
|
16909
|
-
let url = "https://" + this.apiId + "/
|
|
16975
|
+
let url = "https://" + this.apiId + "/uploadreportsreviewsbulk2";
|
|
16910
16976
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
16911
16977
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
16912
16978
|
this._SfLoader.innerHTML = '';
|
|
@@ -16943,8 +17009,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16943
17009
|
}, 3000);
|
|
16944
17010
|
}
|
|
16945
17011
|
};
|
|
16946
|
-
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events") => {
|
|
16947
|
-
let url = "https://" + this.apiId + "/
|
|
17012
|
+
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100") => {
|
|
17013
|
+
let url = "https://" + this.apiId + "/uploadreport2";
|
|
16948
17014
|
let body = {
|
|
16949
17015
|
"mmddyyyy": mmddyyyy,
|
|
16950
17016
|
"projectid": this.projectId,
|
|
@@ -16952,6 +17018,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16952
17018
|
"eventid": eventid,
|
|
16953
17019
|
"comments": comments,
|
|
16954
17020
|
"dateofcompletion": doc,
|
|
17021
|
+
"percentage": percentage,
|
|
16955
17022
|
"entityid": entityId,
|
|
16956
17023
|
"locationid": locationId,
|
|
16957
17024
|
"event": event == null ? null : JSON.stringify(event),
|
|
@@ -16992,7 +17059,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16992
17059
|
}
|
|
16993
17060
|
};
|
|
16994
17061
|
this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
|
|
16995
|
-
let url = "https://" + this.apiId + "/
|
|
17062
|
+
let url = "https://" + this.apiId + "/uploadreportsbulk2";
|
|
16996
17063
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
16997
17064
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
16998
17065
|
if (showSuccess) {
|
|
@@ -18252,7 +18319,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18252
18319
|
else {
|
|
18253
18320
|
view = "entity";
|
|
18254
18321
|
}
|
|
18255
|
-
path = "
|
|
18322
|
+
path = "getallcountryevents3";
|
|
18256
18323
|
let sDate = "";
|
|
18257
18324
|
let eDate = "";
|
|
18258
18325
|
//console.log('currenttab', this.getCurrentTab());
|
|
@@ -19095,7 +19162,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19095
19162
|
console.log('eventsData', eventsData);
|
|
19096
19163
|
console.log('role', role);
|
|
19097
19164
|
// if(Object.keys(eventsData[role]).length > 0){
|
|
19098
|
-
var 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;
|
|
19165
|
+
var 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, compliedWithException = 0;
|
|
19099
19166
|
var html = '';
|
|
19100
19167
|
this.selectedItemIds = [];
|
|
19101
19168
|
this.selectedStatus = "";
|
|
@@ -19121,7 +19188,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19121
19188
|
var complianceStatus = "";
|
|
19122
19189
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(eventsData[role][mmdd][j])));
|
|
19123
19190
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])), partStatus);
|
|
19124
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus);
|
|
19191
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])).percentage);
|
|
19125
19192
|
notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
|
|
19126
19193
|
pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
|
|
19127
19194
|
rejected = rejected + (partStatus == "rejected" ? 1 : 0);
|
|
@@ -19135,6 +19202,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19135
19202
|
partiallyComplied = partiallyComplied + (complianceStatus == "partially-complied" ? 1 : 0);
|
|
19136
19203
|
notComplied = notComplied + (complianceStatus == "not-complied" ? 1 : 0);
|
|
19137
19204
|
complied = complied + (complianceStatus == "complied" ? 1 : 0);
|
|
19205
|
+
compliedWithException = compliedWithException + (complianceStatus == "complied-with-exception" ? 1 : 0);
|
|
19138
19206
|
eventsData[role][mmdd][j][this.FLOW_GRAPH_COMPLETENESS] = partStatus;
|
|
19139
19207
|
eventsData[role][mmdd][j][this.FLOW_GRAPH_TIMELINESS] = lateStatus;
|
|
19140
19208
|
eventsData[role][mmdd][j][this.FLOW_GRAPH_COMPLIANCE] = complianceStatus;
|
|
@@ -19623,7 +19691,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19623
19691
|
continue;
|
|
19624
19692
|
}
|
|
19625
19693
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(eventsData[mmdd][j])), partStatus);
|
|
19626
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus);
|
|
19694
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[mmdd][j])).percentage);
|
|
19627
19695
|
// notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
|
|
19628
19696
|
// pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
|
|
19629
19697
|
// rejected = rejected + (partStatus == "rejected" ? 1 : 0);
|
|
@@ -20778,6 +20846,9 @@ SfIEvents.styles = css `
|
|
|
20778
20846
|
.color-complied {
|
|
20779
20847
|
color: #50cf01;
|
|
20780
20848
|
}
|
|
20849
|
+
.color-complied-with-exception {
|
|
20850
|
+
color: #ffe505;
|
|
20851
|
+
}
|
|
20781
20852
|
.color-scheduled {
|
|
20782
20853
|
color: #888888;
|
|
20783
20854
|
}
|