sf-i-events 1.0.908 → 1.0.910
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 +44 -5
- package/package.json +3 -2
- package/sf-i-events.d.ts +7 -1
- package/sf-i-events.js +423 -120
- package/src/sf-i-events.ts +442 -130
- package/src/util.ts +372 -326
- package/util.d.ts +2 -0
- package/util.js +39 -1
package/src/sf-i-events.ts
CHANGED
|
@@ -969,7 +969,7 @@ export class SfIEvents extends LitElement {
|
|
|
969
969
|
tempHtml += ', ';
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
html += ('<div><sf-i-elastic-text class="statute-summary id-9" text="' + tempHtml + '" minlength="50"></sf-i-elastic-text></div>');
|
|
972
|
+
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + tempHtml + '" minlength="50"></sf-i-elastic-text></div>');
|
|
973
973
|
html += '</td>';
|
|
974
974
|
|
|
975
975
|
html += '</tr>';
|
|
@@ -1035,14 +1035,14 @@ export class SfIEvents extends LitElement {
|
|
|
1035
1035
|
html += '<td part="td-body1" class="' + classBg + '">';
|
|
1036
1036
|
if (jsonFilterOnboarding[i].excludestatutes != null) {
|
|
1037
1037
|
for (var j = 0; j < jsonFilterOnboarding[i].excludestatutes.length; j++) {
|
|
1038
|
-
html += ('<div><sf-i-elastic-text class="statute-summary id-9" text="' + jsonFilterOnboarding[i].excludestatutes[j] + '" minlength="10"></sf-i-elastic-text></div>');
|
|
1038
|
+
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + jsonFilterOnboarding[i].excludestatutes[j] + '" minlength="10"></sf-i-elastic-text></div>');
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
html += '</td>';
|
|
1042
1042
|
html += '<td part="td-body1" class="' + classBg + '">';
|
|
1043
1043
|
if (jsonFilterOnboarding[i].includestatutes != null) {
|
|
1044
1044
|
for (var j = 0; j < jsonFilterOnboarding[i].includestatutes.length; j++) {
|
|
1045
|
-
html += ('<div><sf-i-elastic-text class="statute-summary id-9" text="' + jsonFilterOnboarding[i].includestatutes[j] + '" minlength="20"></sf-i-elastic-text></div>');
|
|
1045
|
+
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + jsonFilterOnboarding[i].includestatutes[j] + '" minlength="20"></sf-i-elastic-text></div>');
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
1048
|
html += '</td>';
|
|
@@ -1683,6 +1683,8 @@ export class SfIEvents extends LitElement {
|
|
|
1683
1683
|
|
|
1684
1684
|
recentlyReported: any = {}
|
|
1685
1685
|
|
|
1686
|
+
registerFilters: { [key: string]: { [key: string]: boolean } } = {};
|
|
1687
|
+
|
|
1686
1688
|
static override styles = css`
|
|
1687
1689
|
|
|
1688
1690
|
.bg-white {
|
|
@@ -2710,7 +2712,8 @@ export class SfIEvents extends LitElement {
|
|
|
2710
2712
|
right: 5px;
|
|
2711
2713
|
background-color: white;
|
|
2712
2714
|
border: solid 1px #888;
|
|
2713
|
-
border-radius: 5px
|
|
2715
|
+
border-radius: 5px;
|
|
2716
|
+
width: max-content;
|
|
2714
2717
|
}
|
|
2715
2718
|
|
|
2716
2719
|
.filter-button-container{
|
|
@@ -4766,7 +4769,7 @@ export class SfIEvents extends LitElement {
|
|
|
4766
4769
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4767
4770
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
|
|
4768
4771
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
4769
|
-
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.concise == null ? "100" : "60") + '"></sf-i-elastic-text>' + event.concise == null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.concise == null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4772
|
+
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text exportparts="highlight,highlight-count" class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.concise == null ? "100" : "60") + '"></sf-i-elastic-text>' + event.concise == null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.concise == null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4770
4773
|
|
|
4771
4774
|
const isBulk = event.isbulk === true;
|
|
4772
4775
|
const hasReportFormat = event.reportformat?.length > 0;
|
|
@@ -4797,7 +4800,7 @@ export class SfIEvents extends LitElement {
|
|
|
4797
4800
|
/>
|
|
4798
4801
|
${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
|
|
4799
4802
|
${isReportedLocation ? '<div class="material-symbols-outlined mr-10">arrow_or_edge</div>' : ''}
|
|
4800
|
-
<sf-i-elastic-text
|
|
4803
|
+
<sf-i-elastic-text exportparts="highlight,highlight-count"
|
|
4801
4804
|
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
4802
4805
|
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}-${(isReportedLocation) ? 'reportedlocations' : ''}"
|
|
4803
4806
|
text="${event.obligationtitle}"
|
|
@@ -4975,13 +4978,13 @@ export class SfIEvents extends LitElement {
|
|
|
4975
4978
|
html += this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i);
|
|
4976
4979
|
html += '</td>';
|
|
4977
4980
|
if (event["locationname"] != null) {
|
|
4978
|
-
html += '<td part="td-body"><sf-i-elastic-text text="' + event["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4981
|
+
html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + event["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4979
4982
|
}
|
|
4980
4983
|
if (event["entityname"] != null) {
|
|
4981
|
-
html += '<td part="td-body"><sf-i-elastic-text text="' + event["entityname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4984
|
+
html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + event["entityname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4982
4985
|
}
|
|
4983
4986
|
if (event["countryname"] != null) {
|
|
4984
|
-
html += '<td part="td-body"><sf-i-elastic-text text="' + event["countryname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4987
|
+
html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + event["countryname"].replace(/ *\([^)]*\) */g, "") + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4985
4988
|
}
|
|
4986
4989
|
if (event["functions"] != null) {
|
|
4987
4990
|
var functions = '';
|
|
@@ -4989,7 +4992,7 @@ export class SfIEvents extends LitElement {
|
|
|
4989
4992
|
functions += (element.split(';')[0].replace(/ *\([^)]*\) */g, "") + ",");
|
|
4990
4993
|
}
|
|
4991
4994
|
functions = functions.replace(/,\s*$/, "");
|
|
4992
|
-
html += '<td part="td-body"><sf-i-elastic-text text="' + functions + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4995
|
+
html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + functions + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4993
4996
|
}
|
|
4994
4997
|
if (event["risk"] != null) {
|
|
4995
4998
|
html += '<td part="td-body"><div part="nc-stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g, '-') + '">' + event["risk"][0] + '</div></td>';
|
|
@@ -5001,7 +5004,7 @@ export class SfIEvents extends LitElement {
|
|
|
5001
5004
|
if (event[Object.keys(event)[k]].indexOf("[") >= 0) {
|
|
5002
5005
|
html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
|
|
5003
5006
|
} else {
|
|
5004
|
-
html += ' <sf-i-elastic-text text="' + event[Object.keys(event)[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
5007
|
+
html += ' <sf-i-elastic-text exportparts="highlight,highlight-count" text="' + event[Object.keys(event)[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
5005
5008
|
}
|
|
5006
5009
|
html += '</td>';
|
|
5007
5010
|
|
|
@@ -5153,7 +5156,7 @@ export class SfIEvents extends LitElement {
|
|
|
5153
5156
|
|
|
5154
5157
|
let graphParam = this.getGraphParam(event);
|
|
5155
5158
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5156
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<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>';
|
|
5159
|
+
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true))) ? ('<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>';
|
|
5157
5160
|
// }
|
|
5158
5161
|
|
|
5159
5162
|
return html;
|
|
@@ -5481,9 +5484,9 @@ export class SfIEvents extends LitElement {
|
|
|
5481
5484
|
+ '</tr>');
|
|
5482
5485
|
}
|
|
5483
5486
|
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
5484
|
-
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5485
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5486
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5487
|
+
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5488
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5489
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5487
5490
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5488
5491
|
|
|
5489
5492
|
for (let document of this.events[mmdd][j].contractdocuments ?? []) {
|
|
@@ -5491,9 +5494,9 @@ export class SfIEvents extends LitElement {
|
|
|
5491
5494
|
}
|
|
5492
5495
|
htmlSummaryValues += '</td></tr>'
|
|
5493
5496
|
} else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
5494
|
-
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5495
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5496
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5497
|
+
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5498
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5499
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5497
5500
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5498
5501
|
|
|
5499
5502
|
for (let document of this.events[mmdd][j].licensedocuments ?? []) {
|
|
@@ -5501,15 +5504,15 @@ export class SfIEvents extends LitElement {
|
|
|
5501
5504
|
}
|
|
5502
5505
|
htmlSummaryValues += '</td></tr>'
|
|
5503
5506
|
} else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
5504
|
-
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5505
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5506
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5507
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["url"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td></tr>')
|
|
5507
|
+
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5508
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5509
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5510
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["url"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td></tr>')
|
|
5508
5511
|
} else {
|
|
5509
|
-
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5510
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5511
|
-
// + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligation"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5512
|
-
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5512
|
+
htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
|
|
5513
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5514
|
+
// + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligation"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5515
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5513
5516
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5514
5517
|
|
|
5515
5518
|
for (let document of this.events[mmdd][j].documents) {
|
|
@@ -5977,7 +5980,7 @@ export class SfIEvents extends LitElement {
|
|
|
5977
5980
|
html += '<div part="input-reporter-percentage-message" class="input-reporter-percentage-message mb-20">For reporting full non-compliance, choose 0%. For reporting compliance with gaps, choose the appropriate % value.</div><br />'
|
|
5978
5981
|
|
|
5979
5982
|
// if(docsOptional.length === 0) {
|
|
5980
|
-
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
5983
|
+
html += '<label id="input-label-docs" part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
5981
5984
|
|
|
5982
5985
|
|
|
5983
5986
|
html += '<slot name="uploader"></slot>';
|
|
@@ -5986,7 +5989,7 @@ export class SfIEvents extends LitElement {
|
|
|
5986
5989
|
} else if (uploadGuidance != 0) {
|
|
5987
5990
|
html += '<div part="upload-guidance-content">'
|
|
5988
5991
|
html += '<div part="detail-head" class="mb-5"><strong>Upload Guidance</strong></div>'
|
|
5989
|
-
html += '<sf-i-elastic-text text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
|
|
5992
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
|
|
5990
5993
|
html += '</div>'
|
|
5991
5994
|
}
|
|
5992
5995
|
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
@@ -6112,8 +6115,8 @@ export class SfIEvents extends LitElement {
|
|
|
6112
6115
|
const j = idArr[5];
|
|
6113
6116
|
let buttonListReportings = eventsContainer.querySelectorAll('.button-list-reporting') as NodeListOf<HTMLButtonElement>
|
|
6114
6117
|
for (let buttonListReporting of buttonListReportings) {
|
|
6115
|
-
|
|
6116
|
-
|
|
6118
|
+
if (buttonListReporting.id == 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') {
|
|
6119
|
+
console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-');
|
|
6117
6120
|
buttonListReporting.setAttribute('part', 'button-list-reporting-selected')
|
|
6118
6121
|
} else {
|
|
6119
6122
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
@@ -6232,6 +6235,11 @@ export class SfIEvents extends LitElement {
|
|
|
6232
6235
|
} else {
|
|
6233
6236
|
(listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
|
|
6234
6237
|
}
|
|
6238
|
+
if ((percentage != null && parseInt(percentage) == 0) || event.docsOptional.length > 0) {
|
|
6239
|
+
(listReportingContainer.querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents';
|
|
6240
|
+
} else {
|
|
6241
|
+
(listReportingContainer.querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents*';
|
|
6242
|
+
}
|
|
6235
6243
|
}, 200);
|
|
6236
6244
|
})
|
|
6237
6245
|
let selectReportingLocation = listReportingContainer.querySelector('#input-reporter-location') as HTMLSelectElement;
|
|
@@ -6539,9 +6547,29 @@ export class SfIEvents extends LitElement {
|
|
|
6539
6547
|
//console.log('reporter comments 2', reportercomments);
|
|
6540
6548
|
|
|
6541
6549
|
// if(docsOptional.length === 0) {
|
|
6550
|
+
let percentage: string = "100";
|
|
6551
|
+
if ((listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
6552
|
+
percentage = (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
6553
|
+
}
|
|
6542
6554
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
6543
6555
|
// }
|
|
6544
|
-
|
|
6556
|
+
let flag = false;
|
|
6557
|
+
do {
|
|
6558
|
+
if (docs.length > 0 && event.docsOptional != null && event.docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
6559
|
+
for (let doc of docs) {
|
|
6560
|
+
if ((doc.jobId == null || doc.jobId.length === 0) && (doc.ext.toLowerCase() == 'pdf' || doc.ext.toLowerCase() == 'png' || doc.ext.toLowerCase() == 'jpeg' || doc.ext.toLowerCase() == 'jpg')) {
|
|
6561
|
+
flag = false
|
|
6562
|
+
} else {
|
|
6563
|
+
flag = true;
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
if (flag === false) {
|
|
6568
|
+
await this.sleep(1000);
|
|
6569
|
+
console.log('waiting for docs', docs);
|
|
6570
|
+
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
6571
|
+
}
|
|
6572
|
+
} while (flag === false);
|
|
6545
6573
|
//console.log('docs', docs);
|
|
6546
6574
|
let reportformatvalues: string = "";
|
|
6547
6575
|
let reportformatschema: string = "";
|
|
@@ -6549,10 +6577,7 @@ export class SfIEvents extends LitElement {
|
|
|
6549
6577
|
reportformatvalues = JSON.stringify((this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.selectedValues()) ?? "";
|
|
6550
6578
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
6551
6579
|
}
|
|
6552
|
-
|
|
6553
|
-
if ((listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
6554
|
-
percentage = (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
6555
|
-
}
|
|
6580
|
+
|
|
6556
6581
|
console.log('percentage', percentage, (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value);
|
|
6557
6582
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
6558
6583
|
|
|
@@ -6564,7 +6589,7 @@ export class SfIEvents extends LitElement {
|
|
|
6564
6589
|
}, 3000);
|
|
6565
6590
|
|
|
6566
6591
|
} else {
|
|
6567
|
-
if (docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0) {
|
|
6592
|
+
if (docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
6568
6593
|
|
|
6569
6594
|
//console.log('reporter comments 3', reportercomments);
|
|
6570
6595
|
buttonClick.innerHTML = "Save"
|
|
@@ -7239,7 +7264,7 @@ export class SfIEvents extends LitElement {
|
|
|
7239
7264
|
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
7240
7265
|
listReportingContainer.style.display = 'none';
|
|
7241
7266
|
listReportingContainer.innerHTML = '';
|
|
7242
|
-
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLButtonElement
|
|
7267
|
+
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
7243
7268
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
7244
7269
|
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
7245
7270
|
streamEventTitle.removeAttribute('part')
|
|
@@ -7482,7 +7507,7 @@ export class SfIEvents extends LitElement {
|
|
|
7482
7507
|
// html += '<div class="stream-events-container flex-grow">';
|
|
7483
7508
|
// html += '<div class="hidden-tags hide">'+JSON.stringify(this.events[mmdd][j]['tags'])+'</div>'
|
|
7484
7509
|
// html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>filtered out</i></th></thead></table></div>'
|
|
7485
|
-
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + ('<input id="button-select-'+mmdd.replace('/', '-')+'-'+j + '-' + (((this.events[mmdd][j].makercheckers != null && (this.events[mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((this.events[mmdd][j].docs != null && (this.events[mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + this.events[mmdd][j].entityid.replace(/-/g, '_') + '-' + this.events[mmdd][j].locationid.replace(/-/g, '_') + '-' + this.events[mmdd][j].id.replace(/-/g, '_') + '-' + this.events[mmdd][j].duedate.split('/')[1] + '-' + this.events[mmdd][j].duedate.split('/')[0] + '-' + this.events[mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g,'_') + '" class="button-select mr-10" type="checkbox" />') + '<sf-i-elastic-text text="'+this.events[mmdd][j]['obligationtitle']+'" minLength="100"></sf-i-elastic-text></div>';
|
|
7510
|
+
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + ('<input id="button-select-'+mmdd.replace('/', '-')+'-'+j + '-' + (((this.events[mmdd][j].makercheckers != null && (this.events[mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((this.events[mmdd][j].docs != null && (this.events[mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + this.events[mmdd][j].entityid.replace(/-/g, '_') + '-' + this.events[mmdd][j].locationid.replace(/-/g, '_') + '-' + this.events[mmdd][j].id.replace(/-/g, '_') + '-' + this.events[mmdd][j].duedate.split('/')[1] + '-' + this.events[mmdd][j].duedate.split('/')[0] + '-' + this.events[mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g,'_') + '" class="button-select mr-10" type="checkbox" />') + '<sf-i-elastic-text exportparts="highlight,highlight-count" text="'+this.events[mmdd][j]['obligationtitle']+'" minLength="100"></sf-i-elastic-text></div>';
|
|
7486
7511
|
// html += '<table class="stream-events-container-table">';
|
|
7487
7512
|
// html += '<thead>';
|
|
7488
7513
|
// html += '<th part="td-head">';
|
|
@@ -7641,15 +7666,15 @@ export class SfIEvents extends LitElement {
|
|
|
7641
7666
|
// html += '<td id="td-expand-'+i+'" part="td-body">';
|
|
7642
7667
|
// html += '<button id="button-unmapped-expand-'+mmdd.replace('/', '-')+'-'+j+'" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>'
|
|
7643
7668
|
// html += '</td>';
|
|
7644
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7645
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["entityname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7646
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["countryname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7669
|
+
// html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="'+this.events[mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7670
|
+
// html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="'+this.events[mmdd][j]["entityname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7671
|
+
// html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="'+this.events[mmdd][j]["countryname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7647
7672
|
// var functions = '';
|
|
7648
7673
|
// for(const element of this.events[mmdd][j]["functions"]) {
|
|
7649
7674
|
// functions += (element.split(';')[0].replace(/ *\([^)]*\) */g, "") + ",");
|
|
7650
7675
|
// }
|
|
7651
7676
|
// functions = functions.replace(/,\s*$/, "");
|
|
7652
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+functions+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7677
|
+
// html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="'+functions+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7653
7678
|
// for(var k = 0; k < Object.keys(this.events[mmdd][j]).length; k++) {
|
|
7654
7679
|
// if(this.getEventPreviewFields().includes(Object.keys(this.events[mmdd][j])[k])) {
|
|
7655
7680
|
|
|
@@ -7657,7 +7682,7 @@ export class SfIEvents extends LitElement {
|
|
|
7657
7682
|
// if(this.events[mmdd][j][Object.keys(this.events[mmdd][j])[k]].indexOf("[") >= 0) {
|
|
7658
7683
|
// html += this.getEventTexts(Object.keys(this.events[mmdd][j])[k], JSON.parse(this.events[mmdd][j][Object.keys(this.events[mmdd][j])[k]]), this.events[mmdd][j]);
|
|
7659
7684
|
// } else {
|
|
7660
|
-
// html += ' <sf-i-elastic-text text="'+this.events[mmdd][j][Object.keys(this.events[mmdd][j])[k]].replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
|
|
7685
|
+
// html += ' <sf-i-elastic-text exportparts="highlight,highlight-count" text="'+this.events[mmdd][j][Object.keys(this.events[mmdd][j])[k]].replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
|
|
7661
7686
|
// }
|
|
7662
7687
|
// html += '</td>';
|
|
7663
7688
|
|
|
@@ -8132,12 +8157,12 @@ export class SfIEvents extends LitElement {
|
|
|
8132
8157
|
})
|
|
8133
8158
|
return [buttonSelectAll, buttonUnselectAll]
|
|
8134
8159
|
}
|
|
8135
|
-
renderRegisterEvents = (events: any, meta: string = "") => {
|
|
8160
|
+
renderRegisterEvents = (events: any, meta: string = "", searchCountryIndex: number = -1, searchIndex: number = -1, searchVal: string = "") => {
|
|
8136
8161
|
|
|
8137
8162
|
var html = '';
|
|
8138
8163
|
|
|
8139
8164
|
this.csvDataRegisters = '';
|
|
8140
|
-
|
|
8165
|
+
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
8141
8166
|
html += '<div class="d-flex scroll-x w-100p">';
|
|
8142
8167
|
|
|
8143
8168
|
for (var i = 0; i < Object.keys(events).length; i++) {
|
|
@@ -8164,7 +8189,7 @@ export class SfIEvents extends LitElement {
|
|
|
8164
8189
|
this.renderRegisterEvents(events);
|
|
8165
8190
|
});
|
|
8166
8191
|
}
|
|
8167
|
-
|
|
8192
|
+
let tablecols: string[] = []
|
|
8168
8193
|
if (this.selectedCountryTab >= 0) {
|
|
8169
8194
|
|
|
8170
8195
|
const index = this.selectedCountryTab;
|
|
@@ -8190,36 +8215,79 @@ export class SfIEvents extends LitElement {
|
|
|
8190
8215
|
for (var k = 0; k < JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols).length; k++) {
|
|
8191
8216
|
if (!this.EXCLUDE_COLS_FROM_REGS.includes(JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k].toLowerCase())) {
|
|
8192
8217
|
this.csvDataRegisters += ('"' + JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k] + '",');
|
|
8218
|
+
|
|
8193
8219
|
console.log('loggin col', JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k])
|
|
8194
8220
|
}
|
|
8221
|
+
|
|
8195
8222
|
}
|
|
8196
8223
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8197
8224
|
this.csvDataRegisters += ('\n');
|
|
8198
8225
|
}
|
|
8199
8226
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8227
|
+
|
|
8228
|
+
html += '<div class="d-flex align-end">';
|
|
8229
|
+
html += '<div class="title-item-date">';
|
|
8230
|
+
html += '<label part="input-label">Search In Statute</label><br />'
|
|
8231
|
+
html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>'
|
|
8232
|
+
html += '</div>';
|
|
8233
|
+
html += '<div class="title-item-date">';
|
|
8234
|
+
html += '<button id="button-download-statute-' + index + '-' + i + '" part="button" class="button-download-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">download</span> <span>Export</span></button>';
|
|
8235
|
+
html += '</div>';
|
|
8236
|
+
html += '</div>';
|
|
8200
8237
|
html += '<table>';
|
|
8201
|
-
|
|
8238
|
+
tablecols = []
|
|
8239
|
+
let tableBodyHtml = ''
|
|
8202
8240
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8241
|
+
|
|
8203
8242
|
const complianceId = Object.keys(objCountry[statute])[j];
|
|
8204
8243
|
const compliance = objCountry[statute][complianceId];
|
|
8244
|
+
console.log('hidecompliances', compliance.hide, complianceId);
|
|
8245
|
+
|
|
8205
8246
|
const data = JSON.parse(compliance.data);
|
|
8206
8247
|
const cols = JSON.parse(compliance.cols);
|
|
8248
|
+
if (!tablecols.includes('ID') && !this.EXCLUDE_COLS_FROM_REGS.includes('ID')) {
|
|
8249
|
+
tablecols.push('ID')
|
|
8250
|
+
}
|
|
8251
|
+
|
|
8207
8252
|
for (let col of cols) {
|
|
8208
8253
|
if (!tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
|
|
8209
8254
|
tablecols.push(col)
|
|
8255
|
+
if (flagUpdateFilters && this.registerFilters[col] == null) {
|
|
8256
|
+
this.registerFilters[col] = {}
|
|
8257
|
+
}
|
|
8210
8258
|
}
|
|
8259
|
+
|
|
8260
|
+
}
|
|
8261
|
+
if (compliance.hide != null && compliance.hide == true) {
|
|
8262
|
+
continue;
|
|
8211
8263
|
}
|
|
8212
8264
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
8213
8265
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8214
8266
|
// html += '<table>';
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8267
|
+
tableBodyHtml += '<tr>';
|
|
8268
|
+
tableBodyHtml += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-' + index + '-' + i + '-' + j + '" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
|
|
8269
|
+
if (flagUpdateFilters) {
|
|
8270
|
+
if (this.registerFilters["ID"] == null) {
|
|
8271
|
+
this.registerFilters["ID"] = {}
|
|
8272
|
+
}
|
|
8273
|
+
this.registerFilters["ID"][complianceId] = true;
|
|
8274
|
+
}
|
|
8275
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + complianceId + '" highlight="' + searchVal + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
8276
|
+
|
|
8277
|
+
// tableBodyHtml += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">ID</span><br /><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + complianceId + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
8278
|
+
let tempCount = 0;
|
|
8218
8279
|
for (var k = 0; k < cols.length; k++) {
|
|
8219
|
-
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase())) {
|
|
8220
|
-
|
|
8280
|
+
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase()) && tablecols.indexOf(cols[k]) == tempCount + 1) {
|
|
8281
|
+
// tableBodyHtml += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">' + cols[k] + '</span><br /><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + data[k] + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8282
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + data[k] + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8221
8283
|
this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8222
8284
|
// this.csvDataRegisters += ('",');
|
|
8285
|
+
if (flagUpdateFilters) {
|
|
8286
|
+
this.registerFilters[cols[k]][data[k]] = true;
|
|
8287
|
+
}
|
|
8288
|
+
tempCount++;
|
|
8289
|
+
} else {
|
|
8290
|
+
console.log('skipping col', cols[k], tablecols.indexOf(cols[k]), k + 1)
|
|
8223
8291
|
}
|
|
8224
8292
|
}
|
|
8225
8293
|
if (compliance['entities'] != null && Array.isArray(compliance['entities'])) {
|
|
@@ -8228,7 +8296,16 @@ export class SfIEvents extends LitElement {
|
|
|
8228
8296
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8229
8297
|
}
|
|
8230
8298
|
entities = entities.slice(0, entities.length - 1)
|
|
8231
|
-
|
|
8299
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">entities</span><br /><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + entities + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8300
|
+
if (!tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
8301
|
+
tablecols.push('entities')
|
|
8302
|
+
}
|
|
8303
|
+
if (flagUpdateFilters) {
|
|
8304
|
+
if (this.registerFilters["entities"] == null) {
|
|
8305
|
+
this.registerFilters["entities"] = {}
|
|
8306
|
+
}
|
|
8307
|
+
this.registerFilters["entities"][entities] = true;
|
|
8308
|
+
}
|
|
8232
8309
|
// this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8233
8310
|
}
|
|
8234
8311
|
if (compliance['locations'] != null && Array.isArray(compliance['locations'])) {
|
|
@@ -8237,16 +8314,48 @@ export class SfIEvents extends LitElement {
|
|
|
8237
8314
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8238
8315
|
}
|
|
8239
8316
|
locations = locations.slice(0, locations.length - 1)
|
|
8240
|
-
|
|
8317
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">locations</span><br /><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + locations + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8318
|
+
if (!tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
8319
|
+
tablecols.push('locations')
|
|
8320
|
+
}
|
|
8321
|
+
if (flagUpdateFilters) {
|
|
8322
|
+
if (this.registerFilters["locations"] == null) {
|
|
8323
|
+
this.registerFilters["locations"] = {}
|
|
8324
|
+
}
|
|
8325
|
+
this.registerFilters["locations"][locations] = true;
|
|
8326
|
+
}
|
|
8241
8327
|
// this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8242
8328
|
}
|
|
8243
8329
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8244
8330
|
this.csvDataRegisters += ('\n');
|
|
8245
8331
|
console.log('enter');
|
|
8246
|
-
|
|
8332
|
+
tableBodyHtml += '</tr>';
|
|
8247
8333
|
// html += '</table>';
|
|
8248
8334
|
// html += '</div>';
|
|
8249
8335
|
}
|
|
8336
|
+
html += '<thead><tr>';
|
|
8337
|
+
html += '<th class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important"></span></th>'
|
|
8338
|
+
|
|
8339
|
+
for (let colName of tablecols) {
|
|
8340
|
+
let allSelected = true;
|
|
8341
|
+
for (let subfilterObj of Object.keys(this.registerFilters[colName])) {
|
|
8342
|
+
if (this.registerFilters[colName][subfilterObj] == false) {
|
|
8343
|
+
allSelected = false;
|
|
8344
|
+
break;
|
|
8345
|
+
}
|
|
8346
|
+
}
|
|
8347
|
+
|
|
8348
|
+
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="padding-left: 0px !important">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'button-icon' : 'button-icon-selected') + '" id="filter-button-' + tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>'
|
|
8349
|
+
html += '<div id="filter-list-container-' + tablecols.indexOf(colName) + '" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">'
|
|
8350
|
+
html += `<div id="filter-label-container-${tablecols.indexOf(colName)}" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><div class="d-flex align-center"><input class="input-select-filter" type="checkbox" ${allSelected ? 'checked' : ''} id="input-select-filter-${tablecols.indexOf(colName)}-all" name="features" part="input-select-feature" value="all-${colName}"></input><label class="filter-label" part="filter-label" for="input-select-filter-${tablecols.indexOf(colName)}-all">All</label></div><button id="button-submit-filters-${tablecols.indexOf(colName)}" part="button-icon-small" class="button-submit-filters material-icons invisible">check</button></div>`
|
|
8351
|
+
for (let [index, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
8352
|
+
console.log('rendering filter', filterKey);
|
|
8353
|
+
html += `<div class="filter-input-container d-flex justify-start align-start"><input class="input-select-filter" type="checkbox" ${this.registerFilters[colName][filterKey] == true ? 'checked' : ''} id="input-select-filter-${tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${tablecols.indexOf(colName)}-${index}" class="input-select-filter-label" part="input-select-feature-label">${filterKey}</label></div>`
|
|
8354
|
+
}
|
|
8355
|
+
html += '</div></div></th>'
|
|
8356
|
+
}
|
|
8357
|
+
html += '</tr></thead>';
|
|
8358
|
+
html += tableBodyHtml;
|
|
8250
8359
|
html += '</table>';
|
|
8251
8360
|
html += '</div>';
|
|
8252
8361
|
|
|
@@ -8256,8 +8365,8 @@ export class SfIEvents extends LitElement {
|
|
|
8256
8365
|
}
|
|
8257
8366
|
|
|
8258
8367
|
divRegisterList!.innerHTML = html;
|
|
8259
|
-
|
|
8260
|
-
console.log('csvdataregisters', this.csvDataRegisters);
|
|
8368
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
8369
|
+
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
8261
8370
|
|
|
8262
8371
|
const arrButtonCountries = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-icon-country') as NodeListOf<HTMLButtonElement>;
|
|
8263
8372
|
|
|
@@ -8317,10 +8426,135 @@ export class SfIEvents extends LitElement {
|
|
|
8317
8426
|
});
|
|
8318
8427
|
|
|
8319
8428
|
}
|
|
8429
|
+
|
|
8430
|
+
const arrInputStatuteSearch = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.stream-search-statute') as NodeListOf<HTMLInputElement>;
|
|
8431
|
+
for (i = 0; i < arrInputStatuteSearch.length; i++) {
|
|
8432
|
+
const input = Util.clearListeners(arrInputStatuteSearch[i]);
|
|
8433
|
+
input.addEventListener('change', (e: any) => {
|
|
8434
|
+
const searchedValue = e.currentTarget.value;
|
|
8435
|
+
const countryIndex = e.currentTarget.id.split('-')[3];
|
|
8436
|
+
const searchIndex = e.currentTarget.id.split('-')[4];
|
|
8437
|
+
// const objCountry = events[Object.keys(events)[countryIndex]]
|
|
8438
|
+
// const statute = Object.keys(objCountry)[searchIndex];
|
|
8439
|
+
// for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8440
|
+
// const complianceId = Object.keys(objCountry[statute])[j];
|
|
8441
|
+
// const compliance = objCountry[statute][complianceId];
|
|
8442
|
+
// if (JSON.stringify(compliance).toLowerCase().includes(searchedValue.toLowerCase())) {
|
|
8443
|
+
// events[Object.keys(events)[countryIndex]][statute][complianceId].hide = false;
|
|
8444
|
+
// } else {
|
|
8445
|
+
// events[Object.keys(events)[countryIndex]][statute][complianceId].hide = true;
|
|
8446
|
+
// }
|
|
8447
|
+
// }
|
|
8448
|
+
|
|
8449
|
+
this.processRegisterFilters(events, meta, countryIndex, searchIndex, searchedValue);
|
|
8450
|
+
// this.renderRegisterEvents(events, meta, countryIndex, searchIndex, searchedValue);
|
|
8451
|
+
|
|
8452
|
+
})
|
|
8453
|
+
}
|
|
8454
|
+
|
|
8455
|
+
const arrButtonDownloadStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-download-statute') as NodeListOf<HTMLButtonElement>;
|
|
8456
|
+
for (i = 0; i < arrButtonDownloadStatute.length; i++) {
|
|
8457
|
+
const button = Util.clearListeners(arrButtonDownloadStatute[i]);
|
|
8458
|
+
button.addEventListener('click', (e: any) => {
|
|
8459
|
+
const countryIndex = e.currentTarget.id.split('-')[3];
|
|
8460
|
+
const searchIndex = e.currentTarget.id.split('-')[4];
|
|
8461
|
+
const objCountry = events[Object.keys(events)[countryIndex]]
|
|
8462
|
+
const statute = Object.keys(objCountry)[searchIndex];
|
|
8463
|
+
let csvData = '"ID","Country","Entities","Locations","Statute","Reference","Obligation"\n';
|
|
8464
|
+
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8465
|
+
const complianceId = Object.keys(objCountry[statute])[j];
|
|
8466
|
+
const compliance = objCountry[statute][complianceId];
|
|
8467
|
+
console.log('hidecompliances', compliance.hide, complianceId);
|
|
8468
|
+
if (compliance.hide != null && compliance.hide == true) {
|
|
8469
|
+
continue;
|
|
8470
|
+
}
|
|
8471
|
+
|
|
8472
|
+
const data = JSON.parse(compliance.data);
|
|
8473
|
+
const cols = JSON.parse(compliance.cols);
|
|
8474
|
+
csvData += ('"' + complianceId + '",');
|
|
8475
|
+
csvData += ('"' + Object.keys(events)[countryIndex] + '",');
|
|
8476
|
+
csvData += ('"' + (compliance['entities'] != null && Array.isArray(compliance['entities']) ? compliance['entities'].map((e: string) => e.split(';')[0].replace(/\([^)]*\)/g, "")).join(',') : '') + '",');
|
|
8477
|
+
csvData += ('"' + (compliance['locations'] != null && Array.isArray(compliance['locations']) ? compliance['locations'].map((e: string) => e.split(';')[0].replace(/\([^)]*\)/g, "")).join(',') : '') + '",');
|
|
8478
|
+
csvData += ('"' + statute + '",');
|
|
8479
|
+
csvData += ('"' + data[cols.indexOf('reference')] + '",');
|
|
8480
|
+
csvData += ('"' + data[cols.indexOf('obligation')] + '"\n');
|
|
8481
|
+
}
|
|
8482
|
+
console.log('csvData', csvData);
|
|
8483
|
+
const ts = new Date();
|
|
8484
|
+
let fileName = 'register_' + statute.replace(/ /g,'_').slice(0, 25) + '_' + ts + '.xlsx'
|
|
8485
|
+
Util.downloadExcelFromCSV(csvData, fileName, "Register Export", this.projectName);
|
|
8486
|
+
})
|
|
8487
|
+
}
|
|
8488
|
+
|
|
8489
|
+
const arrFilterButtons = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.filter-button') as NodeListOf<HTMLButtonElement>;
|
|
8490
|
+
for (i = 0; i < arrFilterButtons.length; i++) {
|
|
8491
|
+
const button = Util.clearListeners(arrFilterButtons[i]);
|
|
8492
|
+
button.addEventListener('click', (e: any) => {
|
|
8493
|
+
const index = e.currentTarget.id.split('-')[2];
|
|
8494
|
+
let filterListContainer = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#filter-list-container-' + index) as HTMLDivElement;
|
|
8495
|
+
if (filterListContainer != null) {
|
|
8496
|
+
if (filterListContainer.classList.contains('hide')) {
|
|
8497
|
+
filterListContainer.classList.remove('hide');
|
|
8498
|
+
} else {
|
|
8499
|
+
filterListContainer.classList.add('hide');
|
|
8500
|
+
}
|
|
8501
|
+
}
|
|
8502
|
+
})
|
|
8503
|
+
}
|
|
8504
|
+
|
|
8505
|
+
const arrFilterInputs = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.input-select-filter') as NodeListOf<HTMLInputElement>;
|
|
8506
|
+
for (i = 0; i < arrFilterInputs.length; i++) {
|
|
8507
|
+
const input = Util.clearListeners(arrFilterInputs[i]);
|
|
8508
|
+
input.addEventListener('change', (e: any) => {
|
|
8509
|
+
let checked = e.currentTarget.checked;
|
|
8510
|
+
let selectedColIndex = e.currentTarget.id.split('-')[3];
|
|
8511
|
+
let selectedFilterIndex = e.currentTarget.id.split('-')[4];
|
|
8512
|
+
let colName = tablecols[selectedColIndex]
|
|
8513
|
+
// for (let [colIndex, colName] of Object.keys(this.registerFilters).entries()) {
|
|
8514
|
+
if (colName != null) {
|
|
8515
|
+
for (let [filterIndex, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
8516
|
+
if (filterIndex == parseInt(selectedFilterIndex) || selectedFilterIndex == 'all') {
|
|
8517
|
+
this.registerFilters[colName][filterKey] = checked;
|
|
8518
|
+
console.log('registerFilters entry', this.registerFilters[colName][filterKey], colName, filterKey);
|
|
8519
|
+
}
|
|
8520
|
+
if (selectedFilterIndex == 'all') {
|
|
8521
|
+
((this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#input-select-filter-' + selectedColIndex + '-' + filterIndex) as HTMLInputElement).checked = checked;
|
|
8522
|
+
}
|
|
8523
|
+
}
|
|
8524
|
+
if (!checked) {
|
|
8525
|
+
((this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#input-select-filter-' + selectedColIndex + '-all') as HTMLInputElement).checked = checked;
|
|
8526
|
+
}
|
|
8527
|
+
if (selectedFilterIndex == 'all') {
|
|
8528
|
+
for (let [filterIndex, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
8529
|
+
((this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#input-select-filter-' + selectedColIndex + '-' + filterIndex) as HTMLInputElement).checked = checked;
|
|
8530
|
+
console.log('Changing Key', filterKey);
|
|
8531
|
+
}
|
|
8532
|
+
}
|
|
8533
|
+
}
|
|
8534
|
+
// }
|
|
8535
|
+
// this.processRegisterFilters(events, meta, searchCountryIndex, searchIndex, searchVal);
|
|
8536
|
+
const buttonSubmitFilters = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#button-submit-filters-' + selectedColIndex) as HTMLButtonElement
|
|
8537
|
+
if (buttonSubmitFilters != null) {
|
|
8538
|
+
buttonSubmitFilters.style.visibility = 'visible'
|
|
8539
|
+
}
|
|
8540
|
+
console.log('registerFilters applying', colName, selectedFilterIndex)
|
|
8541
|
+
})
|
|
8542
|
+
}
|
|
8543
|
+
|
|
8544
|
+
const arrButtonSubmitFilters = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-submit-filters') as NodeListOf<HTMLButtonElement>;
|
|
8545
|
+
for (i = 0; i < arrButtonSubmitFilters.length; i++) {
|
|
8546
|
+
const button = Util.clearListeners(arrButtonSubmitFilters[i])
|
|
8547
|
+
button.addEventListener('click', (e: any) => {
|
|
8548
|
+
console.log('registerFilters applied', e.currentTarget.id)
|
|
8549
|
+
this.processRegisterFilters(events, meta, searchCountryIndex, searchIndex, searchVal);
|
|
8550
|
+
})
|
|
8551
|
+
}
|
|
8320
8552
|
const registerStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#register-statute-' + this.selectedRegisterIndex) as HTMLDivElement;
|
|
8321
8553
|
if (registerStatute != null) {
|
|
8322
8554
|
registerStatute.scrollIntoView();
|
|
8323
8555
|
}
|
|
8556
|
+
|
|
8557
|
+
|
|
8324
8558
|
} else {
|
|
8325
8559
|
const index = 0;
|
|
8326
8560
|
this.selectedCountryTab = index
|
|
@@ -8329,6 +8563,47 @@ export class SfIEvents extends LitElement {
|
|
|
8329
8563
|
|
|
8330
8564
|
}
|
|
8331
8565
|
|
|
8566
|
+
processRegisterFilters = (events: any, meta: string = "", searchCountryIndex: number = -1, searchIndex: number = -1, searchVal: string = "") => {
|
|
8567
|
+
if (this.selectedCountryTab >= 0) {
|
|
8568
|
+
const index = this.selectedCountryTab;
|
|
8569
|
+
//console.log('indexclicked', index);
|
|
8570
|
+
|
|
8571
|
+
const objCountry = events[Object.keys(events)[index]];
|
|
8572
|
+
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
8573
|
+
|
|
8574
|
+
const statute = Object.keys(objCountry)[i];
|
|
8575
|
+
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8576
|
+
let flagFilter = true;
|
|
8577
|
+
const complianceId = Object.keys(objCountry[statute])[j];
|
|
8578
|
+
events[Object.keys(events)[index]][statute][complianceId].hide = false;
|
|
8579
|
+
if (this.registerFilters['ID'][complianceId] == false) {
|
|
8580
|
+
flagFilter = false;
|
|
8581
|
+
events[Object.keys(events)[index]][statute][complianceId].hide = true;
|
|
8582
|
+
}
|
|
8583
|
+
const compliance = objCountry[statute][complianceId];
|
|
8584
|
+
const data = JSON.parse(compliance.data);
|
|
8585
|
+
const cols = JSON.parse(compliance.cols);
|
|
8586
|
+
for (var k = 0; k < cols.length; k++) {
|
|
8587
|
+
if (this.registerFilters[cols[k]] != null && this.registerFilters[cols[k]][data[k]] == false) {
|
|
8588
|
+
flagFilter = false
|
|
8589
|
+
events[Object.keys(events)[index]][statute][complianceId].hide = true;
|
|
8590
|
+
} else {
|
|
8591
|
+
console.log('notFound', k, this.registerFilters[cols[k]])
|
|
8592
|
+
}
|
|
8593
|
+
}
|
|
8594
|
+
if (JSON.stringify(compliance).toLowerCase().includes(searchVal.toLowerCase())) {
|
|
8595
|
+
if(flagFilter){
|
|
8596
|
+
events[Object.keys(events)[index]][statute][complianceId].hide = false;
|
|
8597
|
+
}
|
|
8598
|
+
} else {
|
|
8599
|
+
events[Object.keys(events)[index]][statute][complianceId].hide = true;
|
|
8600
|
+
}
|
|
8601
|
+
}
|
|
8602
|
+
}
|
|
8603
|
+
}
|
|
8604
|
+
|
|
8605
|
+
this.renderRegisterEvents(events, meta, searchCountryIndex, searchIndex, searchVal);
|
|
8606
|
+
}
|
|
8332
8607
|
checkStartDateEarliness = (value: string) => {
|
|
8333
8608
|
|
|
8334
8609
|
var startDateCalendar = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
@@ -8882,7 +9157,7 @@ export class SfIEvents extends LitElement {
|
|
|
8882
9157
|
html += ",";
|
|
8883
9158
|
}
|
|
8884
9159
|
}
|
|
8885
|
-
divTagsArr[i].innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
9160
|
+
divTagsArr[i].innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
8886
9161
|
this.mappedValuesTags[i] = value;
|
|
8887
9162
|
}
|
|
8888
9163
|
if (param == "users") {
|
|
@@ -8899,7 +9174,7 @@ export class SfIEvents extends LitElement {
|
|
|
8899
9174
|
html += ",";
|
|
8900
9175
|
}
|
|
8901
9176
|
}
|
|
8902
|
-
divUsersArr[i].innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
9177
|
+
divUsersArr[i].innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
8903
9178
|
this.mappedValuesUsers[i] = value;
|
|
8904
9179
|
this.updateMappingStatus(value, i);
|
|
8905
9180
|
this.calculateAndShowSummary();
|
|
@@ -10093,7 +10368,7 @@ export class SfIEvents extends LitElement {
|
|
|
10093
10368
|
const compliance = adhocQuestions[Object.keys(adhocQuestions)[i]][j];
|
|
10094
10369
|
|
|
10095
10370
|
html += '<tr>';
|
|
10096
|
-
html += ('<td part="td-body"><sf-i-elastic-text text="' + compliance.id + '" minLength="10" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text text="' + compliance.locationname.replace(/ *\([^)]*\) */g, "").trim() + '" minLength="80" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text text="' + compliance.obligationtitle.replace(/ *\([^)]*\) */g, "").trim() + '" minLength="80" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text text="' + compliance.obligation + '" minLength="80" lineSize="6"></sf-i-elastic-text></td>');
|
|
10371
|
+
html += ('<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + compliance.id + '" minLength="10" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + compliance.locationname.replace(/ *\([^)]*\) */g, "").trim() + '" minLength="80" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + compliance.obligationtitle.replace(/ *\([^)]*\) */g, "").trim() + '" minLength="80" lineSize="6"></sf-i-elastic-text></td><td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + compliance.obligation + '" minLength="80" lineSize="6"></sf-i-elastic-text></td>');
|
|
10097
10372
|
html += '</tr>'
|
|
10098
10373
|
}
|
|
10099
10374
|
html += '</table>'
|
|
@@ -10182,10 +10457,10 @@ export class SfIEvents extends LitElement {
|
|
|
10182
10457
|
|
|
10183
10458
|
html += '<div class="d-flex align-center mt-20">'
|
|
10184
10459
|
html += '<span class="badge-counter" part="badge-counter">' + (j + 1) + '</span>';
|
|
10185
|
-
html += '<div part="results-title"><sf-i-elastic-text text="' + arrTriggerRemarks[j] + '" minLength="40"></sf-i-elastic-text></div>';
|
|
10460
|
+
html += '<div part="results-title"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + arrTriggerRemarks[j] + '" minLength="40"></sf-i-elastic-text></div>';
|
|
10186
10461
|
html += '</div>'
|
|
10187
10462
|
html += '<div part="td-body" class="d-flex align-center">'
|
|
10188
|
-
html += '<div>Trigger Id: </div> <sf-i-elastic-text text="' + arrTriggerIds[j] + '" minLength="10" lineSize="6"></sf-i-elastic-text> <button id="adhoc-delete-start-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 adhoc-delete-start">Retract</button><button id="adhoc-delete-cancel-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 hide adhoc-delete-cancel">Cancel</button><button id="adhoc-delete-confirm-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 hide adhoc-delete-confirm">Confirm Retract</button>';
|
|
10463
|
+
html += '<div>Trigger Id: </div> <sf-i-elastic-text exportparts="highlight,highlight-count" text="' + arrTriggerIds[j] + '" minLength="10" lineSize="6"></sf-i-elastic-text> <button id="adhoc-delete-start-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 adhoc-delete-start">Retract</button><button id="adhoc-delete-cancel-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 hide adhoc-delete-cancel">Cancel</button><button id="adhoc-delete-confirm-' + arrTriggerIds[j].replace(/-/g, "_") + '" class="mr-10 hide adhoc-delete-confirm">Confirm Retract</button>';
|
|
10189
10464
|
html += '</div>'
|
|
10190
10465
|
|
|
10191
10466
|
|
|
@@ -10199,7 +10474,7 @@ export class SfIEvents extends LitElement {
|
|
|
10199
10474
|
const complianceTrigger = Object.keys(arrTriggers[arrTriggerIds[j]][dateTrigger][locationTrigger])[m];
|
|
10200
10475
|
const dateOccurrence = arrTriggers[arrTriggerIds[j]][dateTrigger][locationTrigger][complianceTrigger];
|
|
10201
10476
|
html += '<div part="td-head" class="d-flex align-center ml-10">';
|
|
10202
|
-
html += '<div>Occurred on ' + dateOccurrence + ', Triggered on ' + dateTrigger + ' at ' + locationTrigger.replace(/ *\([^)]*\) */g, "").trim() + ' for Compliance Id </div><sf-i-elastic-text text="' + complianceTrigger + '" minLength="10" lineSize="6"></sf-i-elastic-text>';
|
|
10477
|
+
html += '<div>Occurred on ' + dateOccurrence + ', Triggered on ' + dateTrigger + ' at ' + locationTrigger.replace(/ *\([^)]*\) */g, "").trim() + ' for Compliance Id </div><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + complianceTrigger + '" minLength="10" lineSize="6"></sf-i-elastic-text>';
|
|
10203
10478
|
html += '</div>';
|
|
10204
10479
|
}
|
|
10205
10480
|
|
|
@@ -11513,7 +11788,7 @@ export class SfIEvents extends LitElement {
|
|
|
11513
11788
|
let listReportingContainer = (this._SfThisContainer as HTMLDivElement).querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
11514
11789
|
listReportingContainer.style.display = 'none';
|
|
11515
11790
|
listReportingContainer.innerHTML = '';
|
|
11516
|
-
let buttonListReporting = (this._SfThisContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLButtonElement
|
|
11791
|
+
let buttonListReporting = (this._SfThisContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
11517
11792
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
11518
11793
|
let streamEventTitle = (this._SfThisContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
11519
11794
|
streamEventTitle.removeAttribute('part')
|
|
@@ -12138,7 +12413,7 @@ export class SfIEvents extends LitElement {
|
|
|
12138
12413
|
let listReportingContainer = (this._SfStreamContainer as HTMLDivElement).querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
12139
12414
|
listReportingContainer.style.display = 'none';
|
|
12140
12415
|
listReportingContainer.innerHTML = '';
|
|
12141
|
-
let buttonListReporting = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLButtonElement
|
|
12416
|
+
let buttonListReporting = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
12142
12417
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
12143
12418
|
let streamEventTitle = (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
12144
12419
|
streamEventTitle.removeAttribute('part')
|
|
@@ -13287,7 +13562,7 @@ export class SfIEvents extends LitElement {
|
|
|
13287
13562
|
|
|
13288
13563
|
html += '<div class="m-20">';
|
|
13289
13564
|
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>'
|
|
13290
|
-
html += '<sf-i-elastic-text text="' + data[k] + '" minLength="80" lineSize="6"></sf-i-elastic-text>';
|
|
13565
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + data[k] + '" minLength="80" lineSize="6"></sf-i-elastic-text>';
|
|
13291
13566
|
html += '</div>';
|
|
13292
13567
|
|
|
13293
13568
|
}
|
|
@@ -13515,7 +13790,7 @@ export class SfIEvents extends LitElement {
|
|
|
13515
13790
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
13516
13791
|
htmlTable += '<div class="mb-20">';
|
|
13517
13792
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
13518
|
-
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
13793
|
+
htmlTable += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
13519
13794
|
htmlTable += '</div>';
|
|
13520
13795
|
}
|
|
13521
13796
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -13934,11 +14209,30 @@ export class SfIEvents extends LitElement {
|
|
|
13934
14209
|
let docs: any[] = [];
|
|
13935
14210
|
|
|
13936
14211
|
//console.log('reporter comments 2', reportercomments);
|
|
13937
|
-
|
|
14212
|
+
let percentage: string = "100";
|
|
14213
|
+
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
14214
|
+
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
14215
|
+
}
|
|
13938
14216
|
// if(docsOptional.length === 0) {
|
|
13939
14217
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
13940
14218
|
// }
|
|
13941
|
-
|
|
14219
|
+
let flag = false;
|
|
14220
|
+
do {
|
|
14221
|
+
if (docs.length > 0 && docsOptional != null && docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
14222
|
+
for (let doc of docs) {
|
|
14223
|
+
if ((doc.jobId == null || doc.jobId.length === 0) && (doc.ext.toLowerCase() == 'pdf' || doc.ext.toLowerCase() == 'png' || doc.ext.toLowerCase() == 'jpeg' || doc.ext.toLowerCase() == 'jpg')) {
|
|
14224
|
+
flag = false
|
|
14225
|
+
} else {
|
|
14226
|
+
flag = true;
|
|
14227
|
+
}
|
|
14228
|
+
}
|
|
14229
|
+
}
|
|
14230
|
+
if (flag === false) {
|
|
14231
|
+
await this.sleep(1000);
|
|
14232
|
+
console.log('waiting for docs', docs);
|
|
14233
|
+
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
14234
|
+
}
|
|
14235
|
+
} while (flag === false);
|
|
13942
14236
|
//console.log('docs', docs);
|
|
13943
14237
|
let reportformatvalues: string = "";
|
|
13944
14238
|
let reportformatschema: string = "";
|
|
@@ -13947,10 +14241,7 @@ export class SfIEvents extends LitElement {
|
|
|
13947
14241
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
13948
14242
|
}
|
|
13949
14243
|
|
|
13950
|
-
|
|
13951
|
-
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
13952
|
-
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
13953
|
-
}
|
|
14244
|
+
|
|
13954
14245
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
13955
14246
|
|
|
13956
14247
|
//console.log('reporter comments 3', reportercomments);
|
|
@@ -14386,7 +14677,7 @@ export class SfIEvents extends LitElement {
|
|
|
14386
14677
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
14387
14678
|
htmlTable += '<div class="mb-20">';
|
|
14388
14679
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
14389
|
-
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
14680
|
+
htmlTable += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
14390
14681
|
htmlTable += '</div>';
|
|
14391
14682
|
}
|
|
14392
14683
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -15282,7 +15573,7 @@ export class SfIEvents extends LitElement {
|
|
|
15282
15573
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
15283
15574
|
htmlTable += '<div class="mb-20">';
|
|
15284
15575
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
15285
|
-
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
15576
|
+
htmlTable += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
15286
15577
|
htmlTable += '</div>';
|
|
15287
15578
|
}
|
|
15288
15579
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -16179,7 +16470,7 @@ export class SfIEvents extends LitElement {
|
|
|
16179
16470
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
16180
16471
|
htmlTable += '<div class="mb-20">';
|
|
16181
16472
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
16182
|
-
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
16473
|
+
htmlTable += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
16183
16474
|
htmlTable += '</div>';
|
|
16184
16475
|
}
|
|
16185
16476
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -17029,7 +17320,7 @@ export class SfIEvents extends LitElement {
|
|
|
17029
17320
|
renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement) => {
|
|
17030
17321
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
17031
17322
|
|
|
17032
|
-
let comments, docs, approved, /*dateOfCompletion,*/ makercheckers: Array<string>, docsOptional, documentType;
|
|
17323
|
+
let comments, docs, approved, /*dateOfCompletion,*/ makercheckers: Array<string>, docsOptional: boolean | any, documentType: string | any;
|
|
17033
17324
|
let entityId: string = "";
|
|
17034
17325
|
let locationId: string = "";
|
|
17035
17326
|
let statuteName: string = "";
|
|
@@ -17103,9 +17394,9 @@ export class SfIEvents extends LitElement {
|
|
|
17103
17394
|
html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
|
|
17104
17395
|
if (obligationArr.length > 1) {
|
|
17105
17396
|
let tempObligationArr = obligationArr.slice(1);
|
|
17106
|
-
html += ('<div part="detail-summary-subtitle-more-info" class="pl-20 pr-20 pb-10">' + ('<sf-i-elastic-text text="More information:' + (tempObligationArr.join('')).replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
|
|
17397
|
+
html += ('<div part="detail-summary-subtitle-more-info" class="pl-20 pr-20 pb-10">' + ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="More information:' + (tempObligationArr.join('')).replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
|
|
17107
17398
|
}
|
|
17108
|
-
html += ('<div part="detail-summary-content" class="pl-20 pr-20 pt-20">' + ('<sf-i-elastic-text text="' + (event['internalcontrols'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
|
|
17399
|
+
html += ('<div part="detail-summary-content" class="pl-20 pr-20 pt-20">' + ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event['internalcontrols'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
|
|
17109
17400
|
html += '</div>';
|
|
17110
17401
|
|
|
17111
17402
|
html += '<br />';
|
|
@@ -17132,7 +17423,7 @@ export class SfIEvents extends LitElement {
|
|
|
17132
17423
|
} else {
|
|
17133
17424
|
html += '<div class="m-20">';
|
|
17134
17425
|
html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>'
|
|
17135
|
-
html += '<sf-i-elastic-text text="' + (event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0] + '" minLength="80"></sf-i-elastic-text>';
|
|
17426
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[basicFields[i]] + "").replace(/"/g, "").replace(/ *\([^)]*\) */g, "").trim().split(';')[0] + '" minLength="80"></sf-i-elastic-text>';
|
|
17136
17427
|
html += '</div>';
|
|
17137
17428
|
}
|
|
17138
17429
|
|
|
@@ -17198,7 +17489,7 @@ export class SfIEvents extends LitElement {
|
|
|
17198
17489
|
if ((event[statuteFields[i]] + "").indexOf("[") >= 0) {
|
|
17199
17490
|
html += this.getEventTexts(statuteFields[i], JSON.parse(event[statuteFields[i]]), event);
|
|
17200
17491
|
} else {
|
|
17201
|
-
html += '<sf-i-elastic-text text="' + (event[statuteFields[i]] + "").replace(/"/g, "") + '" minLength="80"></sf-i-elastic-text>';
|
|
17492
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[statuteFields[i]] + "").replace(/"/g, "") + '" minLength="80"></sf-i-elastic-text>';
|
|
17202
17493
|
}
|
|
17203
17494
|
html += '</div>';
|
|
17204
17495
|
|
|
@@ -17237,7 +17528,7 @@ export class SfIEvents extends LitElement {
|
|
|
17237
17528
|
if ((event[complianceFields[i]] + "").indexOf("[") >= 0) {
|
|
17238
17529
|
html += this.getEventTexts(complianceFields[i], JSON.parse(event[complianceFields[i]]), event) + " <a href=\"" + res + "\" target=\"_blank\">Open</a>";
|
|
17239
17530
|
} else {
|
|
17240
|
-
html += '<sf-i-elastic-text text="' + (event[complianceFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>' + " <a href=\"" + res + "\" target=\"_blank\">Open</a>";
|
|
17531
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[complianceFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>' + " <a href=\"" + res + "\" target=\"_blank\">Open</a>";
|
|
17241
17532
|
}
|
|
17242
17533
|
html += '</div>';
|
|
17243
17534
|
|
|
@@ -17265,7 +17556,7 @@ export class SfIEvents extends LitElement {
|
|
|
17265
17556
|
if ((event[complianceFields[i]] + "").indexOf("[") >= 0) {
|
|
17266
17557
|
html += this.getEventTexts(complianceFields[i], JSON.parse(event[complianceFields[i]]), event);
|
|
17267
17558
|
} else {
|
|
17268
|
-
html += '<sf-i-elastic-text text="' + (event[complianceFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>';
|
|
17559
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[complianceFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>';
|
|
17269
17560
|
}
|
|
17270
17561
|
html += '</div>';
|
|
17271
17562
|
|
|
@@ -17308,7 +17599,7 @@ export class SfIEvents extends LitElement {
|
|
|
17308
17599
|
html += this.getEventTexts(grcFields[i], JSON.parse(event[grcFields[i]]), event);
|
|
17309
17600
|
} else {
|
|
17310
17601
|
//console.log('grcfield', event[grcFields[i]]);
|
|
17311
|
-
html += '<sf-i-elastic-text text="' + (event[grcFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>';
|
|
17602
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (event[grcFields[i]] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>';
|
|
17312
17603
|
}
|
|
17313
17604
|
}
|
|
17314
17605
|
|
|
@@ -17382,7 +17673,7 @@ export class SfIEvents extends LitElement {
|
|
|
17382
17673
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
17383
17674
|
htmlTable += '<div class="mb-20">';
|
|
17384
17675
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
17385
|
-
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
17676
|
+
htmlTable += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
17386
17677
|
htmlTable += '</div>';
|
|
17387
17678
|
}
|
|
17388
17679
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -17422,7 +17713,7 @@ export class SfIEvents extends LitElement {
|
|
|
17422
17713
|
|
|
17423
17714
|
html += '<td part="td-body-register">';
|
|
17424
17715
|
html += ('<span part="td-head" style="padding-left: 0px !important">' + Object.keys(jsonReportEvent)[i] + '</span>');
|
|
17425
|
-
html += ('<span part="td-body"><sf-i-elastic-text text="' + jsonReportEvent[Object.keys(jsonReportEvent)[i]] + '" lineSize="4" minLength="60"></sf-i-elastic-text>' + '</span>');
|
|
17716
|
+
html += ('<span part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + jsonReportEvent[Object.keys(jsonReportEvent)[i]] + '" lineSize="4" minLength="60"></sf-i-elastic-text>' + '</span>');
|
|
17426
17717
|
html += '</td>';
|
|
17427
17718
|
|
|
17428
17719
|
}
|
|
@@ -17721,6 +18012,11 @@ export class SfIEvents extends LitElement {
|
|
|
17721
18012
|
} else {
|
|
17722
18013
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
|
|
17723
18014
|
}
|
|
18015
|
+
if ((percentage != null && parseInt(percentage) == 0) || docsOptional.length > 0) {
|
|
18016
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents';
|
|
18017
|
+
} else {
|
|
18018
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents*';
|
|
18019
|
+
}
|
|
17724
18020
|
}, 200);
|
|
17725
18021
|
})
|
|
17726
18022
|
let selectReportingLocation = (this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-location') as HTMLSelectElement;
|
|
@@ -18071,11 +18367,30 @@ export class SfIEvents extends LitElement {
|
|
|
18071
18367
|
let docs: any[] = [];
|
|
18072
18368
|
|
|
18073
18369
|
//console.log('reporter comments 2', reportercomments);
|
|
18074
|
-
|
|
18370
|
+
let percentage: string = "100";
|
|
18371
|
+
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
18372
|
+
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
18373
|
+
}
|
|
18075
18374
|
// if(docsOptional.length === 0) {
|
|
18076
18375
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
18077
18376
|
// }
|
|
18078
|
-
|
|
18377
|
+
let flag = false;
|
|
18378
|
+
do {
|
|
18379
|
+
if (docs.length > 0 && docsOptional != null && docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
18380
|
+
for (let doc of docs) {
|
|
18381
|
+
if ((doc.jobId == null || doc.jobId.length === 0) && (doc.ext.toLowerCase() == 'pdf' || doc.ext.toLowerCase() == 'png' || doc.ext.toLowerCase() == 'jpeg' || doc.ext.toLowerCase() == 'jpg')) {
|
|
18382
|
+
flag = false
|
|
18383
|
+
} else {
|
|
18384
|
+
flag = true;
|
|
18385
|
+
}
|
|
18386
|
+
}
|
|
18387
|
+
}
|
|
18388
|
+
if (flag === false) {
|
|
18389
|
+
await this.sleep(1000);
|
|
18390
|
+
console.log('waiting for docs', docs);
|
|
18391
|
+
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
18392
|
+
}
|
|
18393
|
+
} while (flag === false);
|
|
18079
18394
|
//console.log('docs', docs);
|
|
18080
18395
|
let reportformatvalues: string = "";
|
|
18081
18396
|
let reportformatschema: string = "";
|
|
@@ -18084,10 +18399,7 @@ export class SfIEvents extends LitElement {
|
|
|
18084
18399
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
18085
18400
|
}
|
|
18086
18401
|
|
|
18087
|
-
|
|
18088
|
-
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
18089
|
-
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
18090
|
-
}
|
|
18402
|
+
|
|
18091
18403
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
18092
18404
|
|
|
18093
18405
|
//console.log('reporter comments 3', reportercomments);
|
|
@@ -18098,7 +18410,7 @@ export class SfIEvents extends LitElement {
|
|
|
18098
18410
|
}, 3000);
|
|
18099
18411
|
|
|
18100
18412
|
} else {
|
|
18101
|
-
if (docs.length === 0 && docsOptional.length === 0) {
|
|
18413
|
+
if (docs.length === 0 && docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
18102
18414
|
|
|
18103
18415
|
//console.log('reporter comments 3', reportercomments);
|
|
18104
18416
|
buttonClick.innerHTML = "Save"
|
|
@@ -19340,7 +19652,7 @@ export class SfIEvents extends LitElement {
|
|
|
19340
19652
|
// }, 20000);
|
|
19341
19653
|
|
|
19342
19654
|
// } else {
|
|
19343
|
-
// html += '<sf-i-elastic-text text="'+JSON.stringify(arrFeedbackReference[JSON.parse(sourceArray.data.mappings.mappings[i].data)[1][0].trim()][JSON.parse(sourceArray.data.mappings.mappings[i].data)[6][0].trim().replace(/&/g, "&")]).replace(/"/g,"").replace(/\\n/g,"").replace(/{/g,"").replace(/}/g,"").replace(/\\/g,"")+'" lineSize="4" minLength="60"></sf-i-elastic-text>';
|
|
19655
|
+
// html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="'+JSON.stringify(arrFeedbackReference[JSON.parse(sourceArray.data.mappings.mappings[i].data)[1][0].trim()][JSON.parse(sourceArray.data.mappings.mappings[i].data)[6][0].trim().replace(/&/g, "&")]).replace(/"/g,"").replace(/\\n/g,"").replace(/{/g,"").replace(/}/g,"").replace(/\\/g,"")+'" lineSize="4" minLength="60"></sf-i-elastic-text>';
|
|
19344
19656
|
// }
|
|
19345
19657
|
|
|
19346
19658
|
// html += '</div>';
|
|
@@ -19351,7 +19663,7 @@ export class SfIEvents extends LitElement {
|
|
|
19351
19663
|
// console.log('uniqcolval', uniqCols[l], sourceArray.data.mappings.mappings[i], sourceArray.data.mappings.mappings[i][uniqCols[l]]);
|
|
19352
19664
|
html += '<td class="td-body ' + classBg + '" part="td-key">'
|
|
19353
19665
|
html += '<div class="' + (!showSearch ? 'truncate' : '') + '">';
|
|
19354
|
-
html += '<sf-i-elastic-text text="' + sourceArray.data.mappings.mappings[i][uniqCols[l]].replace(/ *\([^)]*\) */g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
19666
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + sourceArray.data.mappings.mappings[i][uniqCols[l]].replace(/ *\([^)]*\) */g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
19355
19667
|
html += '</div>';
|
|
19356
19668
|
html += '</td>'
|
|
19357
19669
|
}
|
|
@@ -19395,11 +19707,11 @@ export class SfIEvents extends LitElement {
|
|
|
19395
19707
|
if (Array.isArray(JSON.parse(sourceArray.data.mappings.mappings[i].data)[j])) {
|
|
19396
19708
|
|
|
19397
19709
|
for (var k = 0; k < JSON.parse(sourceArray.data.mappings.mappings[i].data)[j].length; k++) {
|
|
19398
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(sourceArray.data.mappings.mappings[i].data)[j][k] + '" minLength="100" lineSize="4"></sf-i-elastic-text>');
|
|
19710
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + JSON.parse(sourceArray.data.mappings.mappings[i].data)[j][k] + '" minLength="100" lineSize="4"></sf-i-elastic-text>');
|
|
19399
19711
|
}
|
|
19400
19712
|
|
|
19401
19713
|
} else {
|
|
19402
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(sourceArray.data.mappings.mappings[i].data)[j] + '" minLength="100" lineSize="4"></sf-i-elastic-text>')
|
|
19714
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + JSON.parse(sourceArray.data.mappings.mappings[i].data)[j] + '" minLength="100" lineSize="4"></sf-i-elastic-text>')
|
|
19403
19715
|
}
|
|
19404
19716
|
|
|
19405
19717
|
html += '</div>';
|
|
@@ -20261,7 +20573,7 @@ export class SfIEvents extends LitElement {
|
|
|
20261
20573
|
html += '</td>';
|
|
20262
20574
|
}
|
|
20263
20575
|
html += '<td part="td-body">';
|
|
20264
|
-
html += '<sf-i-elastic-text class="statute id-' + i + '" text="' + (jsonData[i].id) + '" minLength="10"></sf-i-elastic-text>';
|
|
20576
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" class="statute id-' + i + '" text="' + (jsonData[i].id) + '" minLength="10"></sf-i-elastic-text>';
|
|
20265
20577
|
html += '</td>';
|
|
20266
20578
|
|
|
20267
20579
|
html += '</tr>';
|
|
@@ -20461,7 +20773,7 @@ export class SfIEvents extends LitElement {
|
|
|
20461
20773
|
html += '</td>';
|
|
20462
20774
|
}
|
|
20463
20775
|
html += '<td part="td-body" class="' + classBg + ' ' + (jsonData[i].mapped ? 'chosen' : '') + '">';
|
|
20464
|
-
html += '<div class="' + (!showSearch ? 'truncate' : '') + '"><sf-i-elastic-text class="statute id-' + i + '" text="' + (jsonData[i].id) + '" minLength="10"></sf-i-elastic-text></div>';
|
|
20776
|
+
html += '<div class="' + (!showSearch ? 'truncate' : '') + '"><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute id-' + i + '" text="' + (jsonData[i].id) + '" minLength="10"></sf-i-elastic-text></div>';
|
|
20465
20777
|
html += '</td>';
|
|
20466
20778
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
20467
20779
|
for (var j = 0; j < JSON.parse(jsonData[i].data.cols).length; j++) {
|
|
@@ -20494,15 +20806,15 @@ export class SfIEvents extends LitElement {
|
|
|
20494
20806
|
|
|
20495
20807
|
for (var k = 0; k < JSON.parse(jsonData[i].data.data)[j].length; k++) {
|
|
20496
20808
|
|
|
20497
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(jsonData[i].data.data)[j][k] + '" minLength="80" lineSize="4"></sf-i-elastic-text>');
|
|
20498
|
-
//console.log('Considering', JSON.parse(jsonData[i].data.cols)[j], jsonData[i].cols, j, JSON.parse(jsonData[i].data.data)[j], '<sf-i-elastic-text text="'+JSON.parse(jsonData[i].data.data)[j][k]+'" minLength="80"></sf-i-elastic-text>');
|
|
20809
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + JSON.parse(jsonData[i].data.data)[j][k] + '" minLength="80" lineSize="4"></sf-i-elastic-text>');
|
|
20810
|
+
//console.log('Considering', JSON.parse(jsonData[i].data.cols)[j], jsonData[i].cols, j, JSON.parse(jsonData[i].data.data)[j], '<sf-i-elastic-text exportparts="highlight,highlight-count" text="'+JSON.parse(jsonData[i].data.data)[j][k]+'" minLength="80"></sf-i-elastic-text>');
|
|
20499
20811
|
|
|
20500
20812
|
}
|
|
20501
20813
|
|
|
20502
20814
|
} else {
|
|
20503
20815
|
|
|
20504
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(jsonData[i].data.data)[j] + '" minLength="80" lineSize="4"></sf-i-elastic-text>')
|
|
20505
|
-
//console.log('Considering', JSON.parse(jsonData[i].data.cols)[j], jsonData[i].cols, j, JSON.parse(jsonData[i].data.data)[j], '<sf-i-elastic-text text="'+JSON.parse(jsonData[i].data.data)[j]+'" minLength="80"></sf-i-elastic-text>');
|
|
20816
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + JSON.parse(jsonData[i].data.data)[j] + '" minLength="80" lineSize="4"></sf-i-elastic-text>')
|
|
20817
|
+
//console.log('Considering', JSON.parse(jsonData[i].data.cols)[j], jsonData[i].cols, j, JSON.parse(jsonData[i].data.data)[j], '<sf-i-elastic-text exportparts="highlight,highlight-count" text="'+JSON.parse(jsonData[i].data.data)[j]+'" minLength="80"></sf-i-elastic-text>');
|
|
20506
20818
|
|
|
20507
20819
|
}
|
|
20508
20820
|
|
|
@@ -20802,7 +21114,7 @@ export class SfIEvents extends LitElement {
|
|
|
20802
21114
|
if (val == '') {
|
|
20803
21115
|
val = '-';
|
|
20804
21116
|
}
|
|
20805
|
-
html += ('<sf-i-elastic-text text="' + val + '" minLength="80"></sf-i-elastic-text>');
|
|
21117
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + val + '" minLength="80"></sf-i-elastic-text>');
|
|
20806
21118
|
|
|
20807
21119
|
}
|
|
20808
21120
|
}
|
|
@@ -20815,7 +21127,7 @@ export class SfIEvents extends LitElement {
|
|
|
20815
21127
|
if (val == '') {
|
|
20816
21128
|
val = '-';
|
|
20817
21129
|
}
|
|
20818
|
-
html += ('<div part="td-body">' + '<sf-i-elastic-text text="' + val + '" minLength="80"></sf-i-elastic-text>' + '</div><br />')
|
|
21130
|
+
html += ('<div part="td-body">' + '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + val + '" minLength="80"></sf-i-elastic-text>' + '</div><br />')
|
|
20819
21131
|
|
|
20820
21132
|
}
|
|
20821
21133
|
html += '</div>';
|
|
@@ -21804,7 +22116,7 @@ export class SfIEvents extends LitElement {
|
|
|
21804
22116
|
if (arrStatus[0].toLowerCase().indexOf('entities') >= 0) {
|
|
21805
22117
|
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#button-status-entities')!.innerHTML = arrStatus[1];
|
|
21806
22118
|
}
|
|
21807
|
-
if (arrStatus[0].toLowerCase().indexOf('locations') >= 0) {
|
|
22119
|
+
if (arrStatus[0].toLowerCase().indexOf('locations') >= 0 && arrStatus[0].toLowerCase().indexOf('reportedlocations') < 0) {
|
|
21808
22120
|
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#button-status-locations')!.innerHTML = arrStatus[1];
|
|
21809
22121
|
}
|
|
21810
22122
|
if (arrStatus[0].toLowerCase().indexOf('functions') >= 0
|
|
@@ -22241,7 +22553,7 @@ export class SfIEvents extends LitElement {
|
|
|
22241
22553
|
|
|
22242
22554
|
html += '<tr>';
|
|
22243
22555
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22244
|
-
html += '<sf-i-elastic-text class="statute id-' + i + '" text="' + (this.rcmSelectedCompliance.id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22556
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" class="statute id-' + i + '" text="' + (this.rcmSelectedCompliance.id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22245
22557
|
html += '</td>';
|
|
22246
22558
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
22247
22559
|
for (var j = 0; j < Object.keys(this.rcmSelectedCompliance.values).length; j++) {
|
|
@@ -22253,9 +22565,9 @@ export class SfIEvents extends LitElement {
|
|
|
22253
22565
|
|
|
22254
22566
|
for (var k = 0; k < this.rcmSelectedCompliance.values[objectKey].value.length; k++) {
|
|
22255
22567
|
if (this.rcmSelectedCompliance.values[objectKey].text != null) {
|
|
22256
|
-
html += ('<sf-i-elastic-text text="' + this.rcmSelectedCompliance.values[objectKey].text[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22568
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.rcmSelectedCompliance.values[objectKey].text[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22257
22569
|
} else {
|
|
22258
|
-
html += ('<sf-i-elastic-text text="' + this.rcmSelectedCompliance.values[objectKey].value[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22570
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.rcmSelectedCompliance.values[objectKey].value[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22259
22571
|
}
|
|
22260
22572
|
|
|
22261
22573
|
if (k < (this.rcmSelectedCompliance.values[objectKey].value.length - 1)) {
|
|
@@ -22265,9 +22577,9 @@ export class SfIEvents extends LitElement {
|
|
|
22265
22577
|
|
|
22266
22578
|
} else {
|
|
22267
22579
|
if (this.rcmSelectedCompliance.values[objectKey].text != null) {
|
|
22268
|
-
html += ('<sf-i-elastic-text text="' + this.rcmSelectedCompliance.values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22580
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.rcmSelectedCompliance.values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22269
22581
|
} else {
|
|
22270
|
-
html += ('<sf-i-elastic-text text="' + this.rcmSelectedCompliance.values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22582
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.rcmSelectedCompliance.values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22271
22583
|
}
|
|
22272
22584
|
}
|
|
22273
22585
|
html += '</td>';
|
|
@@ -22331,7 +22643,7 @@ export class SfIEvents extends LitElement {
|
|
|
22331
22643
|
html += '<div class="d-flex"><button id="button-lock-' + (updatedCompliances[i].id) + '" class="mr-10 button-lock-icon button-lock-' + i + '" part="button-icon-small"><span class="material-symbols-outlined">done</span></button></div>';
|
|
22332
22644
|
html += '</td>';
|
|
22333
22645
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22334
|
-
html += '<sf-i-elastic-text class="statute id-' + i + '" text="' + (updatedCompliances[i].id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22646
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" class="statute id-' + i + '" text="' + (updatedCompliances[i].id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22335
22647
|
html += '</td>';
|
|
22336
22648
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
22337
22649
|
for (var j = 0; j < Object.keys(updatedCompliances[i].values).length; j++) {
|
|
@@ -22343,9 +22655,9 @@ export class SfIEvents extends LitElement {
|
|
|
22343
22655
|
|
|
22344
22656
|
for (var k = 0; k < updatedCompliances[i].values[objectKey].value.length; k++) {
|
|
22345
22657
|
if (updatedCompliances[i].values[objectKey].text != null) {
|
|
22346
|
-
html += ('<sf-i-elastic-text text="' + updatedCompliances[i].values[objectKey].text[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22658
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + updatedCompliances[i].values[objectKey].text[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22347
22659
|
} else {
|
|
22348
|
-
html += ('<sf-i-elastic-text text="' + updatedCompliances[i].values[objectKey].value[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22660
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + updatedCompliances[i].values[objectKey].value[k] + '" minLength="80"></sf-i-elastic-text>');
|
|
22349
22661
|
}
|
|
22350
22662
|
|
|
22351
22663
|
if (k < (updatedCompliances[i].values[objectKey].value.length - 1)) {
|
|
@@ -22355,9 +22667,9 @@ export class SfIEvents extends LitElement {
|
|
|
22355
22667
|
|
|
22356
22668
|
} else {
|
|
22357
22669
|
if (updatedCompliances[i].values[objectKey].text != null) {
|
|
22358
|
-
html += ('<sf-i-elastic-text text="' + updatedCompliances[i].values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22670
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + updatedCompliances[i].values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22359
22671
|
} else {
|
|
22360
|
-
html += ('<sf-i-elastic-text text="' + updatedCompliances[i].values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22672
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + updatedCompliances[i].values[objectKey].value + '" minLength="80"></sf-i-elastic-text>')
|
|
22361
22673
|
}
|
|
22362
22674
|
}
|
|
22363
22675
|
html += '</td>';
|
|
@@ -22455,7 +22767,7 @@ export class SfIEvents extends LitElement {
|
|
|
22455
22767
|
// html += '<div id="select-'+i+'"><button id="button-'+i+'" class="button-icon button-'+i+'"><span class="material-symbols-outlined">navigate_next</span></button></div>';
|
|
22456
22768
|
// html += '</td>';
|
|
22457
22769
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22458
|
-
html += '<sf-i-elastic-text class="statute id-' + i + '" text="' + (projects[i].id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22770
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" class="statute id-' + i + '" text="' + (projects[i].id) + '" minLength="80"></sf-i-elastic-text>';
|
|
22459
22771
|
html += '</td>';
|
|
22460
22772
|
// //let data = JSON.parse(jsonData[i].fields.data);
|
|
22461
22773
|
for (var j = 0; j < Object.keys(projects[i]).length; j++) {
|
|
@@ -22468,12 +22780,12 @@ export class SfIEvents extends LitElement {
|
|
|
22468
22780
|
if (Array.isArray(projects[i][objectKey])) {
|
|
22469
22781
|
|
|
22470
22782
|
for (var k = 0; k < projects[i][objectKey].value.length; k++) {
|
|
22471
|
-
html += ('<sf-i-elastic-text text="' + projects[i][objectKey][0] + '" minLength="80"></sf-i-elastic-text>');
|
|
22783
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + projects[i][objectKey][0] + '" minLength="80"></sf-i-elastic-text>');
|
|
22472
22784
|
}
|
|
22473
22785
|
|
|
22474
22786
|
} else {
|
|
22475
22787
|
//console.log('not array');
|
|
22476
|
-
html += ('<sf-i-elastic-text text="' + projects[i][objectKey].replace(/"/g, '') + '" minLength="80"></sf-i-elastic-text>')
|
|
22788
|
+
html += ('<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + projects[i][objectKey].replace(/"/g, '') + '" minLength="80"></sf-i-elastic-text>')
|
|
22477
22789
|
}
|
|
22478
22790
|
html += '</td>';
|
|
22479
22791
|
}
|
|
@@ -25559,7 +25871,7 @@ export class SfIEvents extends LitElement {
|
|
|
25559
25871
|
if (events[index][Object.keys(events[index])[k]].indexOf("[") >= 0) {
|
|
25560
25872
|
html += this.getEventTexts(Object.keys(events[index])[k], JSON.parse(events[index][Object.keys(events[index])[k]]), events[index]);
|
|
25561
25873
|
} else {
|
|
25562
|
-
html += '<sf-i-elastic-text text="' + events[index][Object.keys(events[index])[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
25874
|
+
html += '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + events[index][Object.keys(events[index])[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
25563
25875
|
}
|
|
25564
25876
|
html += '</td>';
|
|
25565
25877
|
|
|
@@ -25727,7 +26039,7 @@ export class SfIEvents extends LitElement {
|
|
|
25727
26039
|
if (unmappedEvents[i][Object.keys(unmappedEvents[i])[k]].indexOf("[") >= 0) {
|
|
25728
26040
|
html += this.getEventTexts(Object.keys(unmappedEvents[i])[k], JSON.parse(unmappedEvents[i][Object.keys(unmappedEvents[i])[k]]), unmappedEvents[i]);
|
|
25729
26041
|
} else {
|
|
25730
|
-
html += ' <sf-i-elastic-text text="' + unmappedEvents[i][Object.keys(unmappedEvents[i])[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
26042
|
+
html += ' <sf-i-elastic-text exportparts="highlight,highlight-count" text="' + unmappedEvents[i][Object.keys(unmappedEvents[i])[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
25731
26043
|
}
|
|
25732
26044
|
html += '</td>';
|
|
25733
26045
|
|
|
@@ -25827,7 +26139,7 @@ export class SfIEvents extends LitElement {
|
|
|
25827
26139
|
html += ",";
|
|
25828
26140
|
}
|
|
25829
26141
|
}
|
|
25830
|
-
div.innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26142
|
+
div.innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
25831
26143
|
this.mappedValuesTags[clickIndex] = form.selectedValues();
|
|
25832
26144
|
|
|
25833
26145
|
// const div = ((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-tags-'+clickIndex) as HTMLDivElement);
|
|
@@ -25850,7 +26162,7 @@ export class SfIEvents extends LitElement {
|
|
|
25850
26162
|
html += ",";
|
|
25851
26163
|
}
|
|
25852
26164
|
}
|
|
25853
|
-
div.innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26165
|
+
div.innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
25854
26166
|
this.mappedValuesUsers[clickIndex] = form.selectedValues();
|
|
25855
26167
|
this.updateMappingStatus(form.selectedValues(), clickIndex);
|
|
25856
26168
|
this.calculateAndShowSummary();
|
|
@@ -26058,7 +26370,7 @@ export class SfIEvents extends LitElement {
|
|
|
26058
26370
|
html += ',';
|
|
26059
26371
|
}
|
|
26060
26372
|
}
|
|
26061
|
-
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-tags-' + i) as HTMLDivElement)!.innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26373
|
+
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-tags-' + i) as HTMLDivElement)!.innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26062
26374
|
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-tags-' + i) as SfIForm)!.preselectedValues = JSON.stringify(this.mappedValuesTags[i]);
|
|
26063
26375
|
//((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-tags-'+i) as SfIForm)!.populatePreselected();
|
|
26064
26376
|
}
|
|
@@ -26072,7 +26384,7 @@ export class SfIEvents extends LitElement {
|
|
|
26072
26384
|
html += ',';
|
|
26073
26385
|
}
|
|
26074
26386
|
}
|
|
26075
|
-
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-users-' + i) as HTMLDivElement)!.innerHTML = '<sf-i-elastic-text text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26387
|
+
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-users-' + i) as HTMLDivElement)!.innerHTML = '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + html + '" minLength="20"></sf-i-elastic-text>';
|
|
26076
26388
|
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-users-' + i) as SfIForm)!.preselectedValues = JSON.stringify(this.mappedValuesUsers[i]);
|
|
26077
26389
|
//((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-users-'+i) as SfIForm)!.populatePreselected();
|
|
26078
26390
|
}
|
|
@@ -28268,7 +28580,7 @@ export class SfIEvents extends LitElement {
|
|
|
28268
28580
|
console.log('jsonRespose', jsonRespose);
|
|
28269
28581
|
const registers = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
28270
28582
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
28271
|
-
|
|
28583
|
+
this.registerFilters = {};
|
|
28272
28584
|
// this.renderAppropriateStream(startDate, endDate);
|
|
28273
28585
|
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
28274
28586
|
//console.log(jsonRespose);
|
|
@@ -29791,11 +30103,11 @@ export class SfIEvents extends LitElement {
|
|
|
29791
30103
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
29792
30104
|
eventHtml += '<div class="hidden-tags hide">' + JSON.stringify(eventsData[role][mmdd][j]['tags']) + '</div>'
|
|
29793
30105
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
29794
|
-
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + (eventsData[role][mmdd][j].isbulk ? ('<div class="lds-dual-ring1 bulk-loader mr-10"></div>') : ('<input id="button-select-' + mmdd.replace('/', '-') + '-' + j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />')) + (eventsData[role][mmdd][j].isbulk ? '' : ('<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>')) + '<sf-i-elastic-text text="' + eventsData[role][mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="' + eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i)
|
|
30106
|
+
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + (eventsData[role][mmdd][j].isbulk ? ('<div class="lds-dual-ring1 bulk-loader mr-10"></div>') : ('<input id="button-select-' + mmdd.replace('/', '-') + '-' + j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />')) + (eventsData[role][mmdd][j].isbulk ? '' : ('<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>')) + '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventsData[role][mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i)
|
|
29795
30107
|
|
|
29796
30108
|
console.log('next isBulk', eventsData[role][mmdd][j].isbulk);
|
|
29797
30109
|
if (eventsData[role][mmdd][j].isbulk == null || eventsData[role][mmdd][j].isbulk == false) {
|
|
29798
|
-
eventHtml += '<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>'
|
|
30110
|
+
eventHtml += '<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>'
|
|
29799
30111
|
eventHtml += '</div>';
|
|
29800
30112
|
eventHtml += '<div class="list-reporting-container d-flex flex-col hide" part="list-reporting-container" id="list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j + '"></div>'
|
|
29801
30113
|
}
|
|
@@ -30099,7 +30411,7 @@ export class SfIEvents extends LitElement {
|
|
|
30099
30411
|
|
|
30100
30412
|
html += '<td part="td-body-register">';
|
|
30101
30413
|
html += ('<span part="td-head" style="padding-left: 0px !important">' + Object.keys(JSON.parse(report['event']))[i] + '</span>');
|
|
30102
|
-
html += ('<span part="td-body"><sf-i-elastic-text text="' + JSON.parse(report['event'])[Object.keys(JSON.parse(report['event']))[i]] + '" lineSize="4" minLength="60"></sf-i-elastic-text>' + '</span>');
|
|
30414
|
+
html += ('<span part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + JSON.parse(report['event'])[Object.keys(JSON.parse(report['event']))[i]] + '" lineSize="4" minLength="60"></sf-i-elastic-text>' + '</span>');
|
|
30103
30415
|
html += '</td>';
|
|
30104
30416
|
|
|
30105
30417
|
}
|
|
@@ -30410,7 +30722,7 @@ export class SfIEvents extends LitElement {
|
|
|
30410
30722
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
30411
30723
|
eventHtml += '<div class="hidden-tags hide">' + JSON.stringify(eventsData[mmdd][j]['tags']) + '</div>'
|
|
30412
30724
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
30413
|
-
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + '<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">check</button>' + '<sf-i-elastic-text text="' + eventsData[mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="' + eventsData[mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i) + '</div>';
|
|
30725
|
+
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + '<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">check</button>' + '<sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventsData[mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventsData[mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i) + '</div>';
|
|
30414
30726
|
eventHtml += '</div>';
|
|
30415
30727
|
html += eventHtml
|
|
30416
30728
|
|