sf-i-events 1.0.909 → 1.0.911
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 +40 -1
- package/package.json +3 -2
- package/sf-i-events.d.ts +8 -1
- package/sf-i-events.js +411 -119
- package/src/sf-i-events.ts +433 -131
- 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,9 @@ export class SfIEvents extends LitElement {
|
|
|
1683
1683
|
|
|
1684
1684
|
recentlyReported: any = {}
|
|
1685
1685
|
|
|
1686
|
+
registerFilters: { [key: string]: { [key: string]: boolean } } = {};
|
|
1687
|
+
|
|
1688
|
+
tablecols: string[] = []
|
|
1686
1689
|
static override styles = css`
|
|
1687
1690
|
|
|
1688
1691
|
.bg-white {
|
|
@@ -2710,7 +2713,8 @@ export class SfIEvents extends LitElement {
|
|
|
2710
2713
|
right: 5px;
|
|
2711
2714
|
background-color: white;
|
|
2712
2715
|
border: solid 1px #888;
|
|
2713
|
-
border-radius: 5px
|
|
2716
|
+
border-radius: 5px;
|
|
2717
|
+
width: max-content;
|
|
2714
2718
|
}
|
|
2715
2719
|
|
|
2716
2720
|
.filter-button-container{
|
|
@@ -4766,7 +4770,7 @@ export class SfIEvents extends LitElement {
|
|
|
4766
4770
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4767
4771
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
|
|
4768
4772
|
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>';
|
|
4773
|
+
// 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
4774
|
|
|
4771
4775
|
const isBulk = event.isbulk === true;
|
|
4772
4776
|
const hasReportFormat = event.reportformat?.length > 0;
|
|
@@ -4797,7 +4801,7 @@ export class SfIEvents extends LitElement {
|
|
|
4797
4801
|
/>
|
|
4798
4802
|
${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
|
|
4799
4803
|
${isReportedLocation ? '<div class="material-symbols-outlined mr-10">arrow_or_edge</div>' : ''}
|
|
4800
|
-
<sf-i-elastic-text
|
|
4804
|
+
<sf-i-elastic-text exportparts="highlight,highlight-count"
|
|
4801
4805
|
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
4802
4806
|
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}-${(isReportedLocation) ? 'reportedlocations' : ''}"
|
|
4803
4807
|
text="${event.obligationtitle}"
|
|
@@ -4975,13 +4979,13 @@ export class SfIEvents extends LitElement {
|
|
|
4975
4979
|
html += this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i);
|
|
4976
4980
|
html += '</td>';
|
|
4977
4981
|
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>';
|
|
4982
|
+
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
4983
|
}
|
|
4980
4984
|
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>';
|
|
4985
|
+
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
4986
|
}
|
|
4983
4987
|
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>';
|
|
4988
|
+
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
4989
|
}
|
|
4986
4990
|
if (event["functions"] != null) {
|
|
4987
4991
|
var functions = '';
|
|
@@ -4989,7 +4993,7 @@ export class SfIEvents extends LitElement {
|
|
|
4989
4993
|
functions += (element.split(';')[0].replace(/ *\([^)]*\) */g, "") + ",");
|
|
4990
4994
|
}
|
|
4991
4995
|
functions = functions.replace(/,\s*$/, "");
|
|
4992
|
-
html += '<td part="td-body"><sf-i-elastic-text text="' + functions + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4996
|
+
html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + functions + '" minLength="10"></sf-i-elastic-text></td>';
|
|
4993
4997
|
}
|
|
4994
4998
|
if (event["risk"] != null) {
|
|
4995
4999
|
html += '<td part="td-body"><div part="nc-stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g, '-') + '">' + event["risk"][0] + '</div></td>';
|
|
@@ -5001,7 +5005,7 @@ export class SfIEvents extends LitElement {
|
|
|
5001
5005
|
if (event[Object.keys(event)[k]].indexOf("[") >= 0) {
|
|
5002
5006
|
html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
|
|
5003
5007
|
} else {
|
|
5004
|
-
html += ' <sf-i-elastic-text text="' + event[Object.keys(event)[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
5008
|
+
html += ' <sf-i-elastic-text exportparts="highlight,highlight-count" text="' + event[Object.keys(event)[k]].replace(/"/g, "") + '" minLength="20"></sf-i-elastic-text>';
|
|
5005
5009
|
}
|
|
5006
5010
|
html += '</td>';
|
|
5007
5011
|
|
|
@@ -5153,7 +5157,7 @@ export class SfIEvents extends LitElement {
|
|
|
5153
5157
|
|
|
5154
5158
|
let graphParam = this.getGraphParam(event);
|
|
5155
5159
|
// 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>';
|
|
5160
|
+
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
5161
|
// }
|
|
5158
5162
|
|
|
5159
5163
|
return html;
|
|
@@ -5481,9 +5485,9 @@ export class SfIEvents extends LitElement {
|
|
|
5481
5485
|
+ '</tr>');
|
|
5482
5486
|
}
|
|
5483
5487
|
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>'
|
|
5488
|
+
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>'
|
|
5489
|
+
+ '<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>'
|
|
5490
|
+
+ '<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
5491
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5488
5492
|
|
|
5489
5493
|
for (let document of this.events[mmdd][j].contractdocuments ?? []) {
|
|
@@ -5491,9 +5495,9 @@ export class SfIEvents extends LitElement {
|
|
|
5491
5495
|
}
|
|
5492
5496
|
htmlSummaryValues += '</td></tr>'
|
|
5493
5497
|
} 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>'
|
|
5498
|
+
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>'
|
|
5499
|
+
+ '<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>'
|
|
5500
|
+
+ '<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
5501
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5498
5502
|
|
|
5499
5503
|
for (let document of this.events[mmdd][j].licensedocuments ?? []) {
|
|
@@ -5501,15 +5505,15 @@ export class SfIEvents extends LitElement {
|
|
|
5501
5505
|
}
|
|
5502
5506
|
htmlSummaryValues += '</td></tr>'
|
|
5503
5507
|
} 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>')
|
|
5508
|
+
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>'
|
|
5509
|
+
+ '<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>'
|
|
5510
|
+
+ '<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>'
|
|
5511
|
+
+ '<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
5512
|
} 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>'
|
|
5513
|
+
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>'
|
|
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]["obligationtitle"] + '" 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.events[mmdd][j]["obligation"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
|
|
5516
|
+
+ '<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
5517
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
5514
5518
|
|
|
5515
5519
|
for (let document of this.events[mmdd][j].documents) {
|
|
@@ -5986,7 +5990,7 @@ export class SfIEvents extends LitElement {
|
|
|
5986
5990
|
} else if (uploadGuidance != 0) {
|
|
5987
5991
|
html += '<div part="upload-guidance-content">'
|
|
5988
5992
|
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>';
|
|
5993
|
+
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
5994
|
html += '</div>'
|
|
5991
5995
|
}
|
|
5992
5996
|
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 +6116,8 @@ export class SfIEvents extends LitElement {
|
|
|
6112
6116
|
const j = idArr[5];
|
|
6113
6117
|
let buttonListReportings = eventsContainer.querySelectorAll('.button-list-reporting') as NodeListOf<HTMLButtonElement>
|
|
6114
6118
|
for (let buttonListReporting of buttonListReportings) {
|
|
6115
|
-
|
|
6116
|
-
|
|
6119
|
+
if (buttonListReporting.id == 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') {
|
|
6120
|
+
console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-');
|
|
6117
6121
|
buttonListReporting.setAttribute('part', 'button-list-reporting-selected')
|
|
6118
6122
|
} else {
|
|
6119
6123
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
@@ -6234,7 +6238,7 @@ export class SfIEvents extends LitElement {
|
|
|
6234
6238
|
}
|
|
6235
6239
|
if ((percentage != null && parseInt(percentage) == 0) || event.docsOptional.length > 0) {
|
|
6236
6240
|
(listReportingContainer.querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents';
|
|
6237
|
-
}else{
|
|
6241
|
+
} else {
|
|
6238
6242
|
(listReportingContainer.querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents*';
|
|
6239
6243
|
}
|
|
6240
6244
|
}, 200);
|
|
@@ -6544,9 +6548,29 @@ export class SfIEvents extends LitElement {
|
|
|
6544
6548
|
//console.log('reporter comments 2', reportercomments);
|
|
6545
6549
|
|
|
6546
6550
|
// if(docsOptional.length === 0) {
|
|
6551
|
+
let percentage: string = "100";
|
|
6552
|
+
if ((listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
6553
|
+
percentage = (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
6554
|
+
}
|
|
6547
6555
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
6548
6556
|
// }
|
|
6549
|
-
|
|
6557
|
+
let flag = false;
|
|
6558
|
+
do {
|
|
6559
|
+
if (docs.length > 0 && event.docsOptional != null && event.docsOptional.length === 0 && parseInt(percentage) > 0) {
|
|
6560
|
+
for (let doc of docs) {
|
|
6561
|
+
if ((doc.jobId == null || doc.jobId.length === 0) && (doc.ext.toLowerCase() == 'pdf' || doc.ext.toLowerCase() == 'png' || doc.ext.toLowerCase() == 'jpeg' || doc.ext.toLowerCase() == 'jpg')) {
|
|
6562
|
+
flag = false
|
|
6563
|
+
} else {
|
|
6564
|
+
flag = true;
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
}
|
|
6568
|
+
if (flag === false) {
|
|
6569
|
+
await this.sleep(1000);
|
|
6570
|
+
console.log('waiting for docs', docs);
|
|
6571
|
+
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
6572
|
+
}
|
|
6573
|
+
} while (flag === false);
|
|
6550
6574
|
//console.log('docs', docs);
|
|
6551
6575
|
let reportformatvalues: string = "";
|
|
6552
6576
|
let reportformatschema: string = "";
|
|
@@ -6554,10 +6578,7 @@ export class SfIEvents extends LitElement {
|
|
|
6554
6578
|
reportformatvalues = JSON.stringify((this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.selectedValues()) ?? "";
|
|
6555
6579
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
6556
6580
|
}
|
|
6557
|
-
|
|
6558
|
-
if ((listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
6559
|
-
percentage = (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
6560
|
-
}
|
|
6581
|
+
|
|
6561
6582
|
console.log('percentage', percentage, (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement).value);
|
|
6562
6583
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
6563
6584
|
|
|
@@ -7244,7 +7265,7 @@ export class SfIEvents extends LitElement {
|
|
|
7244
7265
|
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
7245
7266
|
listReportingContainer.style.display = 'none';
|
|
7246
7267
|
listReportingContainer.innerHTML = '';
|
|
7247
|
-
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLButtonElement
|
|
7268
|
+
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j + '-') as HTMLButtonElement
|
|
7248
7269
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
7249
7270
|
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
7250
7271
|
streamEventTitle.removeAttribute('part')
|
|
@@ -7487,7 +7508,7 @@ export class SfIEvents extends LitElement {
|
|
|
7487
7508
|
// html += '<div class="stream-events-container flex-grow">';
|
|
7488
7509
|
// html += '<div class="hidden-tags hide">'+JSON.stringify(this.events[mmdd][j]['tags'])+'</div>'
|
|
7489
7510
|
// html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>filtered out</i></th></thead></table></div>'
|
|
7490
|
-
// 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>';
|
|
7511
|
+
// 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>';
|
|
7491
7512
|
// html += '<table class="stream-events-container-table">';
|
|
7492
7513
|
// html += '<thead>';
|
|
7493
7514
|
// html += '<th part="td-head">';
|
|
@@ -7646,15 +7667,15 @@ export class SfIEvents extends LitElement {
|
|
|
7646
7667
|
// html += '<td id="td-expand-'+i+'" part="td-body">';
|
|
7647
7668
|
// html += '<button id="button-unmapped-expand-'+mmdd.replace('/', '-')+'-'+j+'" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>'
|
|
7648
7669
|
// html += '</td>';
|
|
7649
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7650
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["entityname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7651
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+this.events[mmdd][j]["countryname"].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]["locationname"].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]["entityname"].replace(/ *\([^)]*\) */g, "")+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7672
|
+
// 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>';
|
|
7652
7673
|
// var functions = '';
|
|
7653
7674
|
// for(const element of this.events[mmdd][j]["functions"]) {
|
|
7654
7675
|
// functions += (element.split(';')[0].replace(/ *\([^)]*\) */g, "") + ",");
|
|
7655
7676
|
// }
|
|
7656
7677
|
// functions = functions.replace(/,\s*$/, "");
|
|
7657
|
-
// html += '<td part="td-body"><sf-i-elastic-text text="'+functions+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7678
|
+
// html += '<td part="td-body"><sf-i-elastic-text exportparts="highlight,highlight-count" text="'+functions+'" minLength="10"></sf-i-elastic-text></td>';
|
|
7658
7679
|
// for(var k = 0; k < Object.keys(this.events[mmdd][j]).length; k++) {
|
|
7659
7680
|
// if(this.getEventPreviewFields().includes(Object.keys(this.events[mmdd][j])[k])) {
|
|
7660
7681
|
|
|
@@ -7662,7 +7683,7 @@ export class SfIEvents extends LitElement {
|
|
|
7662
7683
|
// if(this.events[mmdd][j][Object.keys(this.events[mmdd][j])[k]].indexOf("[") >= 0) {
|
|
7663
7684
|
// 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]);
|
|
7664
7685
|
// } else {
|
|
7665
|
-
// 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>';
|
|
7686
|
+
// 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>';
|
|
7666
7687
|
// }
|
|
7667
7688
|
// html += '</td>';
|
|
7668
7689
|
|
|
@@ -8137,12 +8158,12 @@ export class SfIEvents extends LitElement {
|
|
|
8137
8158
|
})
|
|
8138
8159
|
return [buttonSelectAll, buttonUnselectAll]
|
|
8139
8160
|
}
|
|
8140
|
-
renderRegisterEvents = (events: any, meta: string = "") => {
|
|
8161
|
+
renderRegisterEvents = (events: any, meta: string = "", searchCountryIndex: number = -1, searchIndex: number = -1, searchVal: string = "") => {
|
|
8141
8162
|
|
|
8142
8163
|
var html = '';
|
|
8143
8164
|
|
|
8144
8165
|
this.csvDataRegisters = '';
|
|
8145
|
-
|
|
8166
|
+
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
8146
8167
|
html += '<div class="d-flex scroll-x w-100p">';
|
|
8147
8168
|
|
|
8148
8169
|
for (var i = 0; i < Object.keys(events).length; i++) {
|
|
@@ -8169,7 +8190,7 @@ export class SfIEvents extends LitElement {
|
|
|
8169
8190
|
this.renderRegisterEvents(events);
|
|
8170
8191
|
});
|
|
8171
8192
|
}
|
|
8172
|
-
|
|
8193
|
+
this.tablecols = []
|
|
8173
8194
|
if (this.selectedCountryTab >= 0) {
|
|
8174
8195
|
|
|
8175
8196
|
const index = this.selectedCountryTab;
|
|
@@ -8195,36 +8216,78 @@ export class SfIEvents extends LitElement {
|
|
|
8195
8216
|
for (var k = 0; k < JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols).length; k++) {
|
|
8196
8217
|
if (!this.EXCLUDE_COLS_FROM_REGS.includes(JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k].toLowerCase())) {
|
|
8197
8218
|
this.csvDataRegisters += ('"' + JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k] + '",');
|
|
8219
|
+
|
|
8198
8220
|
console.log('loggin col', JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k])
|
|
8199
8221
|
}
|
|
8222
|
+
|
|
8200
8223
|
}
|
|
8201
8224
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8202
8225
|
this.csvDataRegisters += ('\n');
|
|
8203
8226
|
}
|
|
8204
8227
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8228
|
+
|
|
8229
|
+
html += '<div class="d-flex align-end">';
|
|
8230
|
+
html += '<div class="title-item-date">';
|
|
8231
|
+
html += '<label part="input-label">Search In Statute</label><br />'
|
|
8232
|
+
html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>'
|
|
8233
|
+
html += '</div>';
|
|
8234
|
+
html += '<div class="title-item-date">';
|
|
8235
|
+
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>';
|
|
8236
|
+
html += '</div>';
|
|
8237
|
+
html += '</div>';
|
|
8205
8238
|
html += '<table>';
|
|
8206
|
-
let
|
|
8239
|
+
let tableBodyHtml = ''
|
|
8207
8240
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8241
|
+
|
|
8208
8242
|
const complianceId = Object.keys(objCountry[statute])[j];
|
|
8209
8243
|
const compliance = objCountry[statute][complianceId];
|
|
8244
|
+
console.log('hidecompliances', compliance.hide, complianceId);
|
|
8245
|
+
|
|
8210
8246
|
const data = JSON.parse(compliance.data);
|
|
8211
8247
|
const cols = JSON.parse(compliance.cols);
|
|
8248
|
+
if (!this.tablecols.includes('ID') && !this.EXCLUDE_COLS_FROM_REGS.includes('ID')) {
|
|
8249
|
+
this.tablecols.push('ID')
|
|
8250
|
+
}
|
|
8251
|
+
|
|
8212
8252
|
for (let col of cols) {
|
|
8213
|
-
if (!tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
|
|
8214
|
-
tablecols.push(col)
|
|
8253
|
+
if (!this.tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
|
|
8254
|
+
this.tablecols.push(col)
|
|
8255
|
+
if (flagUpdateFilters && this.registerFilters[col] == null) {
|
|
8256
|
+
this.registerFilters[col] = {}
|
|
8257
|
+
}
|
|
8215
8258
|
}
|
|
8259
|
+
|
|
8260
|
+
}
|
|
8261
|
+
if (compliance.hide != null && compliance.hide == true) {
|
|
8262
|
+
continue;
|
|
8216
8263
|
}
|
|
8217
8264
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
8218
8265
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8219
8266
|
// html += '<table>';
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
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;
|
|
8223
8279
|
for (var k = 0; k < cols.length; k++) {
|
|
8224
|
-
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase())) {
|
|
8225
|
-
|
|
8280
|
+
if (!this.EXCLUDE_COLS_FROM_REGS.includes(cols[k].toLowerCase()) && this.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>');
|
|
8226
8283
|
this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8227
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], this.tablecols.indexOf(cols[k]), k + 1)
|
|
8228
8291
|
}
|
|
8229
8292
|
}
|
|
8230
8293
|
if (compliance['entities'] != null && Array.isArray(compliance['entities'])) {
|
|
@@ -8233,7 +8296,16 @@ export class SfIEvents extends LitElement {
|
|
|
8233
8296
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8234
8297
|
}
|
|
8235
8298
|
entities = entities.slice(0, entities.length - 1)
|
|
8236
|
-
|
|
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 (!this.tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
8301
|
+
this.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
|
+
}
|
|
8237
8309
|
// this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8238
8310
|
}
|
|
8239
8311
|
if (compliance['locations'] != null && Array.isArray(compliance['locations'])) {
|
|
@@ -8242,16 +8314,48 @@ export class SfIEvents extends LitElement {
|
|
|
8242
8314
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8243
8315
|
}
|
|
8244
8316
|
locations = locations.slice(0, locations.length - 1)
|
|
8245
|
-
|
|
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 (!this.tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
8319
|
+
this.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
|
+
}
|
|
8246
8327
|
// this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
|
|
8247
8328
|
}
|
|
8248
8329
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8249
8330
|
this.csvDataRegisters += ('\n');
|
|
8250
8331
|
console.log('enter');
|
|
8251
|
-
|
|
8332
|
+
tableBodyHtml += '</tr>';
|
|
8252
8333
|
// html += '</table>';
|
|
8253
8334
|
// html += '</div>';
|
|
8254
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 this.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-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>'
|
|
8349
|
+
html += '<div id="filter-list-container-' + this.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-${this.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-${this.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-${this.tablecols.indexOf(colName)}-all">All</label></div><button id="button-submit-filters-${this.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-${this.tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${this.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;
|
|
8255
8359
|
html += '</table>';
|
|
8256
8360
|
html += '</div>';
|
|
8257
8361
|
|
|
@@ -8261,8 +8365,8 @@ export class SfIEvents extends LitElement {
|
|
|
8261
8365
|
}
|
|
8262
8366
|
|
|
8263
8367
|
divRegisterList!.innerHTML = html;
|
|
8264
|
-
|
|
8265
|
-
console.log('csvdataregisters', this.csvDataRegisters);
|
|
8368
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
8369
|
+
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
8266
8370
|
|
|
8267
8371
|
const arrButtonCountries = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-icon-country') as NodeListOf<HTMLButtonElement>;
|
|
8268
8372
|
|
|
@@ -8322,10 +8426,135 @@ export class SfIEvents extends LitElement {
|
|
|
8322
8426
|
});
|
|
8323
8427
|
|
|
8324
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 = this.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, this.tablecols)
|
|
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
|
+
}
|
|
8325
8552
|
const registerStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#register-statute-' + this.selectedRegisterIndex) as HTMLDivElement;
|
|
8326
8553
|
if (registerStatute != null) {
|
|
8327
8554
|
registerStatute.scrollIntoView();
|
|
8328
8555
|
}
|
|
8556
|
+
|
|
8557
|
+
|
|
8329
8558
|
} else {
|
|
8330
8559
|
const index = 0;
|
|
8331
8560
|
this.selectedCountryTab = index
|
|
@@ -8334,6 +8563,47 @@ export class SfIEvents extends LitElement {
|
|
|
8334
8563
|
|
|
8335
8564
|
}
|
|
8336
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
|
+
}
|
|
8337
8607
|
checkStartDateEarliness = (value: string) => {
|
|
8338
8608
|
|
|
8339
8609
|
var startDateCalendar = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
|
|
@@ -8887,7 +9157,7 @@ export class SfIEvents extends LitElement {
|
|
|
8887
9157
|
html += ",";
|
|
8888
9158
|
}
|
|
8889
9159
|
}
|
|
8890
|
-
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>';
|
|
8891
9161
|
this.mappedValuesTags[i] = value;
|
|
8892
9162
|
}
|
|
8893
9163
|
if (param == "users") {
|
|
@@ -8904,7 +9174,7 @@ export class SfIEvents extends LitElement {
|
|
|
8904
9174
|
html += ",";
|
|
8905
9175
|
}
|
|
8906
9176
|
}
|
|
8907
|
-
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>';
|
|
8908
9178
|
this.mappedValuesUsers[i] = value;
|
|
8909
9179
|
this.updateMappingStatus(value, i);
|
|
8910
9180
|
this.calculateAndShowSummary();
|
|
@@ -10098,7 +10368,7 @@ export class SfIEvents extends LitElement {
|
|
|
10098
10368
|
const compliance = adhocQuestions[Object.keys(adhocQuestions)[i]][j];
|
|
10099
10369
|
|
|
10100
10370
|
html += '<tr>';
|
|
10101
|
-
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>');
|
|
10102
10372
|
html += '</tr>'
|
|
10103
10373
|
}
|
|
10104
10374
|
html += '</table>'
|
|
@@ -10187,10 +10457,10 @@ export class SfIEvents extends LitElement {
|
|
|
10187
10457
|
|
|
10188
10458
|
html += '<div class="d-flex align-center mt-20">'
|
|
10189
10459
|
html += '<span class="badge-counter" part="badge-counter">' + (j + 1) + '</span>';
|
|
10190
|
-
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>';
|
|
10191
10461
|
html += '</div>'
|
|
10192
10462
|
html += '<div part="td-body" class="d-flex align-center">'
|
|
10193
|
-
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>';
|
|
10194
10464
|
html += '</div>'
|
|
10195
10465
|
|
|
10196
10466
|
|
|
@@ -10204,7 +10474,7 @@ export class SfIEvents extends LitElement {
|
|
|
10204
10474
|
const complianceTrigger = Object.keys(arrTriggers[arrTriggerIds[j]][dateTrigger][locationTrigger])[m];
|
|
10205
10475
|
const dateOccurrence = arrTriggers[arrTriggerIds[j]][dateTrigger][locationTrigger][complianceTrigger];
|
|
10206
10476
|
html += '<div part="td-head" class="d-flex align-center ml-10">';
|
|
10207
|
-
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>';
|
|
10208
10478
|
html += '</div>';
|
|
10209
10479
|
}
|
|
10210
10480
|
|
|
@@ -11518,7 +11788,7 @@ export class SfIEvents extends LitElement {
|
|
|
11518
11788
|
let listReportingContainer = (this._SfThisContainer as HTMLDivElement).querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
11519
11789
|
listReportingContainer.style.display = 'none';
|
|
11520
11790
|
listReportingContainer.innerHTML = '';
|
|
11521
|
-
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
|
|
11522
11792
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
11523
11793
|
let streamEventTitle = (this._SfThisContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
11524
11794
|
streamEventTitle.removeAttribute('part')
|
|
@@ -12143,7 +12413,7 @@ export class SfIEvents extends LitElement {
|
|
|
12143
12413
|
let listReportingContainer = (this._SfStreamContainer as HTMLDivElement).querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j) as HTMLDivElement
|
|
12144
12414
|
listReportingContainer.style.display = 'none';
|
|
12145
12415
|
listReportingContainer.innerHTML = '';
|
|
12146
|
-
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
|
|
12147
12417
|
buttonListReporting.setAttribute('part', 'button-list-reporting')
|
|
12148
12418
|
let streamEventTitle = (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j + '-' + module) as SfIElasticText
|
|
12149
12419
|
streamEventTitle.removeAttribute('part')
|
|
@@ -13292,7 +13562,7 @@ export class SfIEvents extends LitElement {
|
|
|
13292
13562
|
|
|
13293
13563
|
html += '<div class="m-20">';
|
|
13294
13564
|
html += '<div part="detail-head"><strong>' + cols[k] + '</strong></div>'
|
|
13295
|
-
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>';
|
|
13296
13566
|
html += '</div>';
|
|
13297
13567
|
|
|
13298
13568
|
}
|
|
@@ -13520,7 +13790,7 @@ export class SfIEvents extends LitElement {
|
|
|
13520
13790
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
13521
13791
|
htmlTable += '<div class="mb-20">';
|
|
13522
13792
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
13523
|
-
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>');
|
|
13524
13794
|
htmlTable += '</div>';
|
|
13525
13795
|
}
|
|
13526
13796
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -13939,11 +14209,30 @@ export class SfIEvents extends LitElement {
|
|
|
13939
14209
|
let docs: any[] = [];
|
|
13940
14210
|
|
|
13941
14211
|
//console.log('reporter comments 2', reportercomments);
|
|
13942
|
-
|
|
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
|
+
}
|
|
13943
14216
|
// if(docsOptional.length === 0) {
|
|
13944
14217
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
13945
14218
|
// }
|
|
13946
|
-
|
|
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);
|
|
13947
14236
|
//console.log('docs', docs);
|
|
13948
14237
|
let reportformatvalues: string = "";
|
|
13949
14238
|
let reportformatschema: string = "";
|
|
@@ -13952,10 +14241,7 @@ export class SfIEvents extends LitElement {
|
|
|
13952
14241
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
13953
14242
|
}
|
|
13954
14243
|
|
|
13955
|
-
|
|
13956
|
-
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
13957
|
-
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
13958
|
-
}
|
|
14244
|
+
|
|
13959
14245
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
13960
14246
|
|
|
13961
14247
|
//console.log('reporter comments 3', reportercomments);
|
|
@@ -14391,7 +14677,7 @@ export class SfIEvents extends LitElement {
|
|
|
14391
14677
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
14392
14678
|
htmlTable += '<div class="mb-20">';
|
|
14393
14679
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
14394
|
-
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>');
|
|
14395
14681
|
htmlTable += '</div>';
|
|
14396
14682
|
}
|
|
14397
14683
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -15287,7 +15573,7 @@ export class SfIEvents extends LitElement {
|
|
|
15287
15573
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
15288
15574
|
htmlTable += '<div class="mb-20">';
|
|
15289
15575
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
15290
|
-
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>');
|
|
15291
15577
|
htmlTable += '</div>';
|
|
15292
15578
|
}
|
|
15293
15579
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -16184,7 +16470,7 @@ export class SfIEvents extends LitElement {
|
|
|
16184
16470
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
16185
16471
|
htmlTable += '<div class="mb-20">';
|
|
16186
16472
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
16187
|
-
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>');
|
|
16188
16474
|
htmlTable += '</div>';
|
|
16189
16475
|
}
|
|
16190
16476
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -17034,7 +17320,7 @@ export class SfIEvents extends LitElement {
|
|
|
17034
17320
|
renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement) => {
|
|
17035
17321
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
17036
17322
|
|
|
17037
|
-
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;
|
|
17038
17324
|
let entityId: string = "";
|
|
17039
17325
|
let locationId: string = "";
|
|
17040
17326
|
let statuteName: string = "";
|
|
@@ -17108,9 +17394,9 @@ export class SfIEvents extends LitElement {
|
|
|
17108
17394
|
html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
|
|
17109
17395
|
if (obligationArr.length > 1) {
|
|
17110
17396
|
let tempObligationArr = obligationArr.slice(1);
|
|
17111
|
-
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>');
|
|
17112
17398
|
}
|
|
17113
|
-
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>');
|
|
17114
17400
|
html += '</div>';
|
|
17115
17401
|
|
|
17116
17402
|
html += '<br />';
|
|
@@ -17137,7 +17423,7 @@ export class SfIEvents extends LitElement {
|
|
|
17137
17423
|
} else {
|
|
17138
17424
|
html += '<div class="m-20">';
|
|
17139
17425
|
html += '<div part="detail-head"><strong>' + basicFields[i] + '</strong></div>'
|
|
17140
|
-
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>';
|
|
17141
17427
|
html += '</div>';
|
|
17142
17428
|
}
|
|
17143
17429
|
|
|
@@ -17203,7 +17489,7 @@ export class SfIEvents extends LitElement {
|
|
|
17203
17489
|
if ((event[statuteFields[i]] + "").indexOf("[") >= 0) {
|
|
17204
17490
|
html += this.getEventTexts(statuteFields[i], JSON.parse(event[statuteFields[i]]), event);
|
|
17205
17491
|
} else {
|
|
17206
|
-
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>';
|
|
17207
17493
|
}
|
|
17208
17494
|
html += '</div>';
|
|
17209
17495
|
|
|
@@ -17242,7 +17528,7 @@ export class SfIEvents extends LitElement {
|
|
|
17242
17528
|
if ((event[complianceFields[i]] + "").indexOf("[") >= 0) {
|
|
17243
17529
|
html += this.getEventTexts(complianceFields[i], JSON.parse(event[complianceFields[i]]), event) + " <a href=\"" + res + "\" target=\"_blank\">Open</a>";
|
|
17244
17530
|
} else {
|
|
17245
|
-
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>";
|
|
17246
17532
|
}
|
|
17247
17533
|
html += '</div>';
|
|
17248
17534
|
|
|
@@ -17270,7 +17556,7 @@ export class SfIEvents extends LitElement {
|
|
|
17270
17556
|
if ((event[complianceFields[i]] + "").indexOf("[") >= 0) {
|
|
17271
17557
|
html += this.getEventTexts(complianceFields[i], JSON.parse(event[complianceFields[i]]), event);
|
|
17272
17558
|
} else {
|
|
17273
|
-
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>';
|
|
17274
17560
|
}
|
|
17275
17561
|
html += '</div>';
|
|
17276
17562
|
|
|
@@ -17313,7 +17599,7 @@ export class SfIEvents extends LitElement {
|
|
|
17313
17599
|
html += this.getEventTexts(grcFields[i], JSON.parse(event[grcFields[i]]), event);
|
|
17314
17600
|
} else {
|
|
17315
17601
|
//console.log('grcfield', event[grcFields[i]]);
|
|
17316
|
-
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>';
|
|
17317
17603
|
}
|
|
17318
17604
|
}
|
|
17319
17605
|
|
|
@@ -17387,7 +17673,7 @@ export class SfIEvents extends LitElement {
|
|
|
17387
17673
|
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
17388
17674
|
htmlTable += '<div class="mb-20">';
|
|
17389
17675
|
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
17390
|
-
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>');
|
|
17391
17677
|
htmlTable += '</div>';
|
|
17392
17678
|
}
|
|
17393
17679
|
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
@@ -17427,7 +17713,7 @@ export class SfIEvents extends LitElement {
|
|
|
17427
17713
|
|
|
17428
17714
|
html += '<td part="td-body-register">';
|
|
17429
17715
|
html += ('<span part="td-head" style="padding-left: 0px !important">' + Object.keys(jsonReportEvent)[i] + '</span>');
|
|
17430
|
-
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>');
|
|
17431
17717
|
html += '</td>';
|
|
17432
17718
|
|
|
17433
17719
|
}
|
|
@@ -17728,7 +18014,7 @@ export class SfIEvents extends LitElement {
|
|
|
17728
18014
|
}
|
|
17729
18015
|
if ((percentage != null && parseInt(percentage) == 0) || docsOptional.length > 0) {
|
|
17730
18016
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents';
|
|
17731
|
-
}else{
|
|
18017
|
+
} else {
|
|
17732
18018
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#input-label-docs') as HTMLLabelElement).innerHTML = 'Supporting Documents*';
|
|
17733
18019
|
}
|
|
17734
18020
|
}, 200);
|
|
@@ -18081,11 +18367,30 @@ export class SfIEvents extends LitElement {
|
|
|
18081
18367
|
let docs: any[] = [];
|
|
18082
18368
|
|
|
18083
18369
|
//console.log('reporter comments 2', reportercomments);
|
|
18084
|
-
|
|
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
|
+
}
|
|
18085
18374
|
// if(docsOptional.length === 0) {
|
|
18086
18375
|
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
18087
18376
|
// }
|
|
18088
|
-
|
|
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);
|
|
18089
18394
|
//console.log('docs', docs);
|
|
18090
18395
|
let reportformatvalues: string = "";
|
|
18091
18396
|
let reportformatschema: string = "";
|
|
@@ -18094,10 +18399,7 @@ export class SfIEvents extends LitElement {
|
|
|
18094
18399
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
18095
18400
|
}
|
|
18096
18401
|
|
|
18097
|
-
|
|
18098
|
-
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
18099
|
-
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
18100
|
-
}
|
|
18402
|
+
|
|
18101
18403
|
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
18102
18404
|
|
|
18103
18405
|
//console.log('reporter comments 3', reportercomments);
|
|
@@ -19350,7 +19652,7 @@ export class SfIEvents extends LitElement {
|
|
|
19350
19652
|
// }, 20000);
|
|
19351
19653
|
|
|
19352
19654
|
// } else {
|
|
19353
|
-
// 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>';
|
|
19354
19656
|
// }
|
|
19355
19657
|
|
|
19356
19658
|
// html += '</div>';
|
|
@@ -19361,7 +19663,7 @@ export class SfIEvents extends LitElement {
|
|
|
19361
19663
|
// console.log('uniqcolval', uniqCols[l], sourceArray.data.mappings.mappings[i], sourceArray.data.mappings.mappings[i][uniqCols[l]]);
|
|
19362
19664
|
html += '<td class="td-body ' + classBg + '" part="td-key">'
|
|
19363
19665
|
html += '<div class="' + (!showSearch ? 'truncate' : '') + '">';
|
|
19364
|
-
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>';
|
|
19365
19667
|
html += '</div>';
|
|
19366
19668
|
html += '</td>'
|
|
19367
19669
|
}
|
|
@@ -19405,11 +19707,11 @@ export class SfIEvents extends LitElement {
|
|
|
19405
19707
|
if (Array.isArray(JSON.parse(sourceArray.data.mappings.mappings[i].data)[j])) {
|
|
19406
19708
|
|
|
19407
19709
|
for (var k = 0; k < JSON.parse(sourceArray.data.mappings.mappings[i].data)[j].length; k++) {
|
|
19408
|
-
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>');
|
|
19409
19711
|
}
|
|
19410
19712
|
|
|
19411
19713
|
} else {
|
|
19412
|
-
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>')
|
|
19413
19715
|
}
|
|
19414
19716
|
|
|
19415
19717
|
html += '</div>';
|
|
@@ -20271,7 +20573,7 @@ export class SfIEvents extends LitElement {
|
|
|
20271
20573
|
html += '</td>';
|
|
20272
20574
|
}
|
|
20273
20575
|
html += '<td part="td-body">';
|
|
20274
|
-
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>';
|
|
20275
20577
|
html += '</td>';
|
|
20276
20578
|
|
|
20277
20579
|
html += '</tr>';
|
|
@@ -20471,7 +20773,7 @@ export class SfIEvents extends LitElement {
|
|
|
20471
20773
|
html += '</td>';
|
|
20472
20774
|
}
|
|
20473
20775
|
html += '<td part="td-body" class="' + classBg + ' ' + (jsonData[i].mapped ? 'chosen' : '') + '">';
|
|
20474
|
-
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>';
|
|
20475
20777
|
html += '</td>';
|
|
20476
20778
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
20477
20779
|
for (var j = 0; j < JSON.parse(jsonData[i].data.cols).length; j++) {
|
|
@@ -20504,15 +20806,15 @@ export class SfIEvents extends LitElement {
|
|
|
20504
20806
|
|
|
20505
20807
|
for (var k = 0; k < JSON.parse(jsonData[i].data.data)[j].length; k++) {
|
|
20506
20808
|
|
|
20507
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(jsonData[i].data.data)[j][k] + '" minLength="80" lineSize="4"></sf-i-elastic-text>');
|
|
20508
|
-
//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>');
|
|
20509
20811
|
|
|
20510
20812
|
}
|
|
20511
20813
|
|
|
20512
20814
|
} else {
|
|
20513
20815
|
|
|
20514
|
-
html += ('<sf-i-elastic-text text="' + JSON.parse(jsonData[i].data.data)[j] + '" minLength="80" lineSize="4"></sf-i-elastic-text>')
|
|
20515
|
-
//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>');
|
|
20516
20818
|
|
|
20517
20819
|
}
|
|
20518
20820
|
|
|
@@ -20812,7 +21114,7 @@ export class SfIEvents extends LitElement {
|
|
|
20812
21114
|
if (val == '') {
|
|
20813
21115
|
val = '-';
|
|
20814
21116
|
}
|
|
20815
|
-
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>');
|
|
20816
21118
|
|
|
20817
21119
|
}
|
|
20818
21120
|
}
|
|
@@ -20825,7 +21127,7 @@ export class SfIEvents extends LitElement {
|
|
|
20825
21127
|
if (val == '') {
|
|
20826
21128
|
val = '-';
|
|
20827
21129
|
}
|
|
20828
|
-
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 />')
|
|
20829
21131
|
|
|
20830
21132
|
}
|
|
20831
21133
|
html += '</div>';
|
|
@@ -21814,7 +22116,7 @@ export class SfIEvents extends LitElement {
|
|
|
21814
22116
|
if (arrStatus[0].toLowerCase().indexOf('entities') >= 0) {
|
|
21815
22117
|
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#button-status-entities')!.innerHTML = arrStatus[1];
|
|
21816
22118
|
}
|
|
21817
|
-
if (arrStatus[0].toLowerCase().indexOf('locations') >= 0) {
|
|
22119
|
+
if (arrStatus[0].toLowerCase().indexOf('locations') >= 0 && arrStatus[0].toLowerCase().indexOf('reportedlocations') < 0) {
|
|
21818
22120
|
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#button-status-locations')!.innerHTML = arrStatus[1];
|
|
21819
22121
|
}
|
|
21820
22122
|
if (arrStatus[0].toLowerCase().indexOf('functions') >= 0
|
|
@@ -22251,7 +22553,7 @@ export class SfIEvents extends LitElement {
|
|
|
22251
22553
|
|
|
22252
22554
|
html += '<tr>';
|
|
22253
22555
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22254
|
-
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>';
|
|
22255
22557
|
html += '</td>';
|
|
22256
22558
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
22257
22559
|
for (var j = 0; j < Object.keys(this.rcmSelectedCompliance.values).length; j++) {
|
|
@@ -22263,9 +22565,9 @@ export class SfIEvents extends LitElement {
|
|
|
22263
22565
|
|
|
22264
22566
|
for (var k = 0; k < this.rcmSelectedCompliance.values[objectKey].value.length; k++) {
|
|
22265
22567
|
if (this.rcmSelectedCompliance.values[objectKey].text != null) {
|
|
22266
|
-
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>');
|
|
22267
22569
|
} else {
|
|
22268
|
-
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>');
|
|
22269
22571
|
}
|
|
22270
22572
|
|
|
22271
22573
|
if (k < (this.rcmSelectedCompliance.values[objectKey].value.length - 1)) {
|
|
@@ -22275,9 +22577,9 @@ export class SfIEvents extends LitElement {
|
|
|
22275
22577
|
|
|
22276
22578
|
} else {
|
|
22277
22579
|
if (this.rcmSelectedCompliance.values[objectKey].text != null) {
|
|
22278
|
-
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>')
|
|
22279
22581
|
} else {
|
|
22280
|
-
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>')
|
|
22281
22583
|
}
|
|
22282
22584
|
}
|
|
22283
22585
|
html += '</td>';
|
|
@@ -22341,7 +22643,7 @@ export class SfIEvents extends LitElement {
|
|
|
22341
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>';
|
|
22342
22644
|
html += '</td>';
|
|
22343
22645
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22344
|
-
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>';
|
|
22345
22647
|
html += '</td>';
|
|
22346
22648
|
//let data = JSON.parse(jsonData[i].fields.data);
|
|
22347
22649
|
for (var j = 0; j < Object.keys(updatedCompliances[i].values).length; j++) {
|
|
@@ -22353,9 +22655,9 @@ export class SfIEvents extends LitElement {
|
|
|
22353
22655
|
|
|
22354
22656
|
for (var k = 0; k < updatedCompliances[i].values[objectKey].value.length; k++) {
|
|
22355
22657
|
if (updatedCompliances[i].values[objectKey].text != null) {
|
|
22356
|
-
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>');
|
|
22357
22659
|
} else {
|
|
22358
|
-
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>');
|
|
22359
22661
|
}
|
|
22360
22662
|
|
|
22361
22663
|
if (k < (updatedCompliances[i].values[objectKey].value.length - 1)) {
|
|
@@ -22365,9 +22667,9 @@ export class SfIEvents extends LitElement {
|
|
|
22365
22667
|
|
|
22366
22668
|
} else {
|
|
22367
22669
|
if (updatedCompliances[i].values[objectKey].text != null) {
|
|
22368
|
-
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>')
|
|
22369
22671
|
} else {
|
|
22370
|
-
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>')
|
|
22371
22673
|
}
|
|
22372
22674
|
}
|
|
22373
22675
|
html += '</td>';
|
|
@@ -22465,7 +22767,7 @@ export class SfIEvents extends LitElement {
|
|
|
22465
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>';
|
|
22466
22768
|
// html += '</td>';
|
|
22467
22769
|
html += '<td part="td-body" class="' + classBg + '">';
|
|
22468
|
-
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>';
|
|
22469
22771
|
html += '</td>';
|
|
22470
22772
|
// //let data = JSON.parse(jsonData[i].fields.data);
|
|
22471
22773
|
for (var j = 0; j < Object.keys(projects[i]).length; j++) {
|
|
@@ -22478,12 +22780,12 @@ export class SfIEvents extends LitElement {
|
|
|
22478
22780
|
if (Array.isArray(projects[i][objectKey])) {
|
|
22479
22781
|
|
|
22480
22782
|
for (var k = 0; k < projects[i][objectKey].value.length; k++) {
|
|
22481
|
-
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>');
|
|
22482
22784
|
}
|
|
22483
22785
|
|
|
22484
22786
|
} else {
|
|
22485
22787
|
//console.log('not array');
|
|
22486
|
-
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>')
|
|
22487
22789
|
}
|
|
22488
22790
|
html += '</td>';
|
|
22489
22791
|
}
|
|
@@ -25569,7 +25871,7 @@ export class SfIEvents extends LitElement {
|
|
|
25569
25871
|
if (events[index][Object.keys(events[index])[k]].indexOf("[") >= 0) {
|
|
25570
25872
|
html += this.getEventTexts(Object.keys(events[index])[k], JSON.parse(events[index][Object.keys(events[index])[k]]), events[index]);
|
|
25571
25873
|
} else {
|
|
25572
|
-
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>';
|
|
25573
25875
|
}
|
|
25574
25876
|
html += '</td>';
|
|
25575
25877
|
|
|
@@ -25737,7 +26039,7 @@ export class SfIEvents extends LitElement {
|
|
|
25737
26039
|
if (unmappedEvents[i][Object.keys(unmappedEvents[i])[k]].indexOf("[") >= 0) {
|
|
25738
26040
|
html += this.getEventTexts(Object.keys(unmappedEvents[i])[k], JSON.parse(unmappedEvents[i][Object.keys(unmappedEvents[i])[k]]), unmappedEvents[i]);
|
|
25739
26041
|
} else {
|
|
25740
|
-
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>';
|
|
25741
26043
|
}
|
|
25742
26044
|
html += '</td>';
|
|
25743
26045
|
|
|
@@ -25837,7 +26139,7 @@ export class SfIEvents extends LitElement {
|
|
|
25837
26139
|
html += ",";
|
|
25838
26140
|
}
|
|
25839
26141
|
}
|
|
25840
|
-
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>';
|
|
25841
26143
|
this.mappedValuesTags[clickIndex] = form.selectedValues();
|
|
25842
26144
|
|
|
25843
26145
|
// const div = ((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-div-tags-'+clickIndex) as HTMLDivElement);
|
|
@@ -25860,7 +26162,7 @@ export class SfIEvents extends LitElement {
|
|
|
25860
26162
|
html += ",";
|
|
25861
26163
|
}
|
|
25862
26164
|
}
|
|
25863
|
-
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>';
|
|
25864
26166
|
this.mappedValuesUsers[clickIndex] = form.selectedValues();
|
|
25865
26167
|
this.updateMappingStatus(form.selectedValues(), clickIndex);
|
|
25866
26168
|
this.calculateAndShowSummary();
|
|
@@ -26068,7 +26370,7 @@ export class SfIEvents extends LitElement {
|
|
|
26068
26370
|
html += ',';
|
|
26069
26371
|
}
|
|
26070
26372
|
}
|
|
26071
|
-
((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>';
|
|
26072
26374
|
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-tags-' + i) as SfIForm)!.preselectedValues = JSON.stringify(this.mappedValuesTags[i]);
|
|
26073
26375
|
//((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-tags-'+i) as SfIForm)!.populatePreselected();
|
|
26074
26376
|
}
|
|
@@ -26082,7 +26384,7 @@ export class SfIEvents extends LitElement {
|
|
|
26082
26384
|
html += ',';
|
|
26083
26385
|
}
|
|
26084
26386
|
}
|
|
26085
|
-
((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>';
|
|
26086
26388
|
((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-users-' + i) as SfIForm)!.preselectedValues = JSON.stringify(this.mappedValuesUsers[i]);
|
|
26087
26389
|
//((this._SfMappingContainer as HTMLDivElement).querySelector('#row-unmapped-input-users-'+i) as SfIForm)!.populatePreselected();
|
|
26088
26390
|
}
|
|
@@ -28278,7 +28580,7 @@ export class SfIEvents extends LitElement {
|
|
|
28278
28580
|
console.log('jsonRespose', jsonRespose);
|
|
28279
28581
|
const registers = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
28280
28582
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
28281
|
-
|
|
28583
|
+
this.registerFilters = {};
|
|
28282
28584
|
// this.renderAppropriateStream(startDate, endDate);
|
|
28283
28585
|
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
28284
28586
|
//console.log(jsonRespose);
|
|
@@ -29801,11 +30103,11 @@ export class SfIEvents extends LitElement {
|
|
|
29801
30103
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
29802
30104
|
eventHtml += '<div class="hidden-tags hide">' + JSON.stringify(eventsData[role][mmdd][j]['tags']) + '</div>'
|
|
29803
30105
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
29804
|
-
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)
|
|
29805
30107
|
|
|
29806
30108
|
console.log('next isBulk', eventsData[role][mmdd][j].isbulk);
|
|
29807
30109
|
if (eventsData[role][mmdd][j].isbulk == null || eventsData[role][mmdd][j].isbulk == false) {
|
|
29808
|
-
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>'
|
|
29809
30111
|
eventHtml += '</div>';
|
|
29810
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>'
|
|
29811
30113
|
}
|
|
@@ -30109,7 +30411,7 @@ export class SfIEvents extends LitElement {
|
|
|
30109
30411
|
|
|
30110
30412
|
html += '<td part="td-body-register">';
|
|
30111
30413
|
html += ('<span part="td-head" style="padding-left: 0px !important">' + Object.keys(JSON.parse(report['event']))[i] + '</span>');
|
|
30112
|
-
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>');
|
|
30113
30415
|
html += '</td>';
|
|
30114
30416
|
|
|
30115
30417
|
}
|
|
@@ -30420,7 +30722,7 @@ export class SfIEvents extends LitElement {
|
|
|
30420
30722
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
30421
30723
|
eventHtml += '<div class="hidden-tags hide">' + JSON.stringify(eventsData[mmdd][j]['tags']) + '</div>'
|
|
30422
30724
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
30423
|
-
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>';
|
|
30424
30726
|
eventHtml += '</div>';
|
|
30425
30727
|
html += eventHtml
|
|
30426
30728
|
|