sf-i-events 1.0.887 → 1.0.888
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 +4 -4
- package/package.json +1 -1
- package/sf-i-events.js +49 -13
- package/src/sf-i-events.ts +58 -13
package/dev/index.html
CHANGED
|
@@ -757,7 +757,7 @@
|
|
|
757
757
|
</div>
|
|
758
758
|
|
|
759
759
|
</sf-i-events> -->
|
|
760
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
760
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
761
761
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
762
762
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
763
763
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -785,7 +785,7 @@
|
|
|
785
785
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
786
786
|
</div>
|
|
787
787
|
|
|
788
|
-
</sf-i-events>
|
|
788
|
+
</sf-i-events> -->
|
|
789
789
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
790
790
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
791
791
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -814,7 +814,7 @@
|
|
|
814
814
|
</div>
|
|
815
815
|
|
|
816
816
|
</sf-i-events> -->
|
|
817
|
-
|
|
817
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
818
818
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
819
819
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
820
820
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
842
842
|
</div>
|
|
843
843
|
|
|
844
|
-
</sf-i-events>
|
|
844
|
+
</sf-i-events>
|
|
845
845
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
846
846
|
|
|
847
847
|
<div slot="uploader">
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -2547,7 +2547,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2547
2547
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2548
2548
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
2549
2549
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
2550
|
-
// 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.
|
|
2550
|
+
// 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>';
|
|
2551
2551
|
const isBulk = event.isbulk === true;
|
|
2552
2552
|
const hasReportFormat = ((_a = event.reportformat) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
2553
2553
|
const hasCustomReporting = event.customreporting != null;
|
|
@@ -2563,7 +2563,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2563
2563
|
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
|
|
2564
2564
|
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
2565
2565
|
const showLocationRisk = event.reporters == null;
|
|
2566
|
-
const showLastUpdated = event.
|
|
2566
|
+
const showLastUpdated = event.concise == null && lastUpdated.length > 0;
|
|
2567
2567
|
html += `
|
|
2568
2568
|
<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
|
|
2569
2569
|
<input
|
|
@@ -2576,7 +2576,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2576
2576
|
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
2577
2577
|
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
|
|
2578
2578
|
text="${event.obligationtitle}"
|
|
2579
|
-
minLength="${event.
|
|
2579
|
+
minLength="${event.concise == null ? '100' : '60'}">
|
|
2580
2580
|
</sf-i-elastic-text>
|
|
2581
2581
|
${showLocationRisk ? `
|
|
2582
2582
|
<div part="stream-event-location" class="stream-event-location ml-5">
|
|
@@ -2601,7 +2601,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2601
2601
|
` : ''}
|
|
2602
2602
|
</div>
|
|
2603
2603
|
`;
|
|
2604
|
-
if (event.
|
|
2604
|
+
if (event.concise == null && remarks.length > 0) {
|
|
2605
2605
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
2606
2606
|
}
|
|
2607
2607
|
// console.log('returning divstarthtml', html);
|
|
@@ -2877,12 +2877,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2877
2877
|
this.renderCalendarAnnotations = (event, mmdd, j) => {
|
|
2878
2878
|
var html = '';
|
|
2879
2879
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>';
|
|
2880
|
-
// if(event.
|
|
2881
|
-
let reporterStr = event.
|
|
2880
|
+
// if(event.concise == null && event.approvers != null){
|
|
2881
|
+
let reporterStr = event.concise == null ? this.getReporterStringFromEvent(event) : "";
|
|
2882
2882
|
let approverStr = event.approvers != null ? this.getApproverStringFromEvent(event) : "";
|
|
2883
2883
|
let graphParam = this.getGraphParam(event);
|
|
2884
2884
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
2885
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.
|
|
2885
|
+
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))) ? ('<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>';
|
|
2886
2886
|
// }
|
|
2887
2887
|
return html;
|
|
2888
2888
|
};
|
|
@@ -7480,8 +7480,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7480
7480
|
(_j = this._SfCustomContainer.querySelector('#button-this-year-mobile')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', () => {
|
|
7481
7481
|
this._SfCustomContainer.querySelector('#stream-start-date-mobile').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7482
7482
|
this._SfCustomContainer.querySelector('#stream-start-date').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7483
|
-
|
|
7484
|
-
|
|
7483
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
7484
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
7485
|
+
if (month === 0) {
|
|
7486
|
+
month = 12;
|
|
7487
|
+
year -= 1;
|
|
7488
|
+
}
|
|
7489
|
+
// Pad month
|
|
7490
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
7491
|
+
// Determine last day of month (safe)
|
|
7492
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
7493
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
7494
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
7495
|
+
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = finalDate;
|
|
7496
|
+
this._SfCustomContainer.querySelector('#stream-end-date').value = finalDate;
|
|
7485
7497
|
this.processDateSelection(this._SfCustomContainer);
|
|
7486
7498
|
});
|
|
7487
7499
|
(_k = this._SfCustomContainer.querySelector('#button-this-year')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', () => {
|
|
@@ -7688,15 +7700,39 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7688
7700
|
(_j = this._SfCustomContainer.querySelector('#button-this-year-mobile')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', () => {
|
|
7689
7701
|
this._SfCustomContainer.querySelector('#stream-start-date-mobile').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7690
7702
|
this._SfCustomContainer.querySelector('#stream-start-date').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7691
|
-
|
|
7692
|
-
|
|
7703
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
7704
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
7705
|
+
if (month === 0) {
|
|
7706
|
+
month = 12;
|
|
7707
|
+
year -= 1;
|
|
7708
|
+
}
|
|
7709
|
+
// Pad month
|
|
7710
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
7711
|
+
// Determine last day of month (safe)
|
|
7712
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
7713
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
7714
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
7715
|
+
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = finalDate;
|
|
7716
|
+
this._SfCustomContainer.querySelector('#stream-end-date').value = finalDate;
|
|
7693
7717
|
this.processDateSelectionViewer(this._SfCustomContainer);
|
|
7694
7718
|
});
|
|
7695
7719
|
(_k = this._SfCustomContainer.querySelector('#button-this-year')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', () => {
|
|
7696
7720
|
this._SfCustomContainer.querySelector('#stream-start-date-mobile').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7697
7721
|
this._SfCustomContainer.querySelector('#stream-start-date').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7698
|
-
|
|
7699
|
-
|
|
7722
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
7723
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
7724
|
+
if (month === 0) {
|
|
7725
|
+
month = 12;
|
|
7726
|
+
year -= 1;
|
|
7727
|
+
}
|
|
7728
|
+
// Pad month
|
|
7729
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
7730
|
+
// Determine last day of month (safe)
|
|
7731
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
7732
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
7733
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
7734
|
+
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = finalDate;
|
|
7735
|
+
this._SfCustomContainer.querySelector('#stream-end-date').value = finalDate;
|
|
7700
7736
|
this.processDateSelectionViewer(this._SfCustomContainer);
|
|
7701
7737
|
});
|
|
7702
7738
|
(_l = this._SfCustomContainer.querySelector('#button-this-quarter-mobile')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', () => {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4759,7 +4759,7 @@ export class SfIEvents extends LitElement {
|
|
|
4759
4759
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4760
4760
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
|
|
4761
4761
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
4762
|
-
// 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.
|
|
4762
|
+
// 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>';
|
|
4763
4763
|
|
|
4764
4764
|
const isBulk = event.isbulk === true;
|
|
4765
4765
|
const hasReportFormat = event.reportformat?.length > 0;
|
|
@@ -4776,7 +4776,7 @@ export class SfIEvents extends LitElement {
|
|
|
4776
4776
|
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
|
|
4777
4777
|
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
4778
4778
|
const showLocationRisk = event.reporters == null;
|
|
4779
|
-
const showLastUpdated = event.
|
|
4779
|
+
const showLastUpdated = event.concise == null && lastUpdated.length > 0;
|
|
4780
4780
|
|
|
4781
4781
|
html += `
|
|
4782
4782
|
<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
|
|
@@ -4790,7 +4790,7 @@ export class SfIEvents extends LitElement {
|
|
|
4790
4790
|
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
4791
4791
|
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
|
|
4792
4792
|
text="${event.obligationtitle}"
|
|
4793
|
-
minLength="${event.
|
|
4793
|
+
minLength="${event.concise == null ? '100' : '60'}">
|
|
4794
4794
|
</sf-i-elastic-text>
|
|
4795
4795
|
${showLocationRisk ? `
|
|
4796
4796
|
<div part="stream-event-location" class="stream-event-location ml-5">
|
|
@@ -4816,7 +4816,7 @@ export class SfIEvents extends LitElement {
|
|
|
4816
4816
|
</div>
|
|
4817
4817
|
`;
|
|
4818
4818
|
|
|
4819
|
-
if (event.
|
|
4819
|
+
if (event.concise == null && remarks.length > 0) {
|
|
4820
4820
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
4821
4821
|
}
|
|
4822
4822
|
// console.log('returning divstarthtml', html);
|
|
@@ -5132,13 +5132,13 @@ export class SfIEvents extends LitElement {
|
|
|
5132
5132
|
var html = '';
|
|
5133
5133
|
|
|
5134
5134
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>'
|
|
5135
|
-
// if(event.
|
|
5136
|
-
let reporterStr = event.
|
|
5135
|
+
// if(event.concise == null && event.approvers != null){
|
|
5136
|
+
let reporterStr = event.concise == null ? this.getReporterStringFromEvent(event) : "";
|
|
5137
5137
|
let approverStr = event.approvers != null ? this.getApproverStringFromEvent(event) : "";
|
|
5138
5138
|
|
|
5139
5139
|
let graphParam = this.getGraphParam(event);
|
|
5140
5140
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5141
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.
|
|
5141
|
+
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))) ? ('<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>';
|
|
5142
5142
|
// }
|
|
5143
5143
|
|
|
5144
5144
|
return html;
|
|
@@ -10503,8 +10503,23 @@ export class SfIEvents extends LitElement {
|
|
|
10503
10503
|
(this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year-mobile')?.addEventListener('click', () => {
|
|
10504
10504
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date-mobile') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10505
10505
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10506
|
-
|
|
10507
|
-
|
|
10506
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
10507
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
10508
|
+
|
|
10509
|
+
if (month === 0) {
|
|
10510
|
+
month = 12;
|
|
10511
|
+
year -= 1;
|
|
10512
|
+
}
|
|
10513
|
+
|
|
10514
|
+
// Pad month
|
|
10515
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
10516
|
+
|
|
10517
|
+
// Determine last day of month (safe)
|
|
10518
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
10519
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
10520
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
10521
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date-mobile') as HTMLInputElement).value = finalDate;
|
|
10522
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date') as HTMLInputElement).value = finalDate;
|
|
10508
10523
|
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10509
10524
|
});
|
|
10510
10525
|
(this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year')?.addEventListener('click', () => {
|
|
@@ -10751,15 +10766,45 @@ export class SfIEvents extends LitElement {
|
|
|
10751
10766
|
(this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year-mobile')?.addEventListener('click', () => {
|
|
10752
10767
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date-mobile') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10753
10768
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10754
|
-
|
|
10755
|
-
|
|
10769
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
10770
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
10771
|
+
|
|
10772
|
+
if (month === 0) {
|
|
10773
|
+
month = 12;
|
|
10774
|
+
year -= 1;
|
|
10775
|
+
}
|
|
10776
|
+
|
|
10777
|
+
// Pad month
|
|
10778
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
10779
|
+
|
|
10780
|
+
// Determine last day of month (safe)
|
|
10781
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
10782
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
10783
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
10784
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date-mobile') as HTMLInputElement).value = finalDate;
|
|
10785
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date') as HTMLInputElement).value = finalDate;
|
|
10756
10786
|
this.processDateSelectionViewer((this._SfCustomContainer as HTMLDivElement));
|
|
10757
10787
|
});
|
|
10758
10788
|
(this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year')?.addEventListener('click', () => {
|
|
10759
10789
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date-mobile') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10760
10790
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10761
|
-
|
|
10762
|
-
|
|
10791
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
10792
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
10793
|
+
|
|
10794
|
+
if (month === 0) {
|
|
10795
|
+
month = 12;
|
|
10796
|
+
year -= 1;
|
|
10797
|
+
}
|
|
10798
|
+
|
|
10799
|
+
// Pad month
|
|
10800
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
10801
|
+
|
|
10802
|
+
// Determine last day of month (safe)
|
|
10803
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
10804
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
10805
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
10806
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date-mobile') as HTMLInputElement).value = finalDate;
|
|
10807
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date') as HTMLInputElement).value = finalDate;
|
|
10763
10808
|
this.processDateSelectionViewer((this._SfCustomContainer as HTMLDivElement));
|
|
10764
10809
|
});
|
|
10765
10810
|
|