sf-i-events 1.0.795 → 1.0.797
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 +12 -2
- package/package.json +1 -1
- package/sf-i-events.js +20 -7
- package/src/sf-i-events.ts +20 -20
package/dev/index.html
CHANGED
|
@@ -648,6 +648,16 @@
|
|
|
648
648
|
</div>
|
|
649
649
|
|
|
650
650
|
</sf-i-events> -->
|
|
651
|
+
<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="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="reporter" 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="2024">
|
|
652
|
+
|
|
653
|
+
<div slot="uploader">
|
|
654
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
655
|
+
</div>
|
|
656
|
+
<div slot="reporting">
|
|
657
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
658
|
+
</div>
|
|
659
|
+
|
|
660
|
+
</sf-i-events>
|
|
651
661
|
<!-- <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="true" 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="2024">
|
|
652
662
|
|
|
653
663
|
<div slot="uploader">
|
|
@@ -681,7 +691,7 @@
|
|
|
681
691
|
</div>
|
|
682
692
|
|
|
683
693
|
</sf-i-events> -->
|
|
684
|
-
<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" fill="solid" username="Local Approver 1" userprofileid="c44dcd04-aebb-4417-ba6b-fac170efd5d0" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="approver" showregisterexport="false" 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="2024">
|
|
694
|
+
<!-- <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" fill="solid" username="Local Approver 1" userprofileid="c44dcd04-aebb-4417-ba6b-fac170efd5d0" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="approver" showregisterexport="false" 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="2024">
|
|
685
695
|
|
|
686
696
|
<div slot="uploader">
|
|
687
697
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -690,7 +700,7 @@
|
|
|
690
700
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
691
701
|
</div>
|
|
692
702
|
|
|
693
|
-
</sf-i-events>
|
|
703
|
+
</sf-i-events> -->
|
|
694
704
|
|
|
695
705
|
|
|
696
706
|
<script>
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -2395,8 +2395,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2395
2395
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2396
2396
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
2397
2397
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
2398
|
-
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, '_') + '-' + (((_a = event.isnotice) !== null && _a !== void 0 ? _a : false) ? 'isnotice' : 'isevent') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true)) ? '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 button-event-title" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + (((_b = event.isnotice) !== null && _b !== void 0 ? _b : false) ? 'isnotice' : 'isevent') + '" text="' + event['obligationtitle'] + '" minLength="100"></sf-i-elastic-text>' + (event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + (lastUpdated.length > 0 ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
2399
|
-
if (remarks.length > 0) {
|
|
2398
|
+
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, '_') + '-' + (((_a = event.isnotice) !== null && _a !== void 0 ? _a : false) ? 'isnotice' : 'isevent') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true)) ? '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 button-event-title" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + (((_b = event.isnotice) !== null && _b !== void 0 ? _b : false) ? 'isnotice' : 'isevent') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + (event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
2399
|
+
if (event.reporters != null && remarks.length > 0) {
|
|
2400
2400
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
2401
2401
|
}
|
|
2402
2402
|
return html;
|
|
@@ -3247,10 +3247,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3247
3247
|
reportformatName = ((_a = event['reportformat'][0]) !== null && _a !== void 0 ? _a : "").trim().replace('&', '&');
|
|
3248
3248
|
}
|
|
3249
3249
|
let docs = event['documents'] == null ? [] : event['documents'];
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3250
|
+
event.approved = event['approved'] == null ? false : event['approved'];
|
|
3251
|
+
event.dateOfCompletion = event['dateofcompletion'] == null ? '' : event['dateofcompletion'];
|
|
3252
|
+
event.makercheckers = event['makercheckers'] == null ? [] : event['makercheckers'];
|
|
3253
|
+
event.docsOptional = event['docs'] == null ? [] : event['docs'];
|
|
3254
3254
|
html = this.renderReporting(event, mmddyyyy);
|
|
3255
3255
|
console.log('reporting html', html);
|
|
3256
3256
|
let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container');
|
|
@@ -3438,6 +3438,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3438
3438
|
const comments = listReportingContainer.querySelector('#input-auditor-comments').value;
|
|
3439
3439
|
const approved = listReportingContainer.querySelector('#input-approve-yes').checked;
|
|
3440
3440
|
if (comments.trim().length === 0) {
|
|
3441
|
+
buttonClick.innerHTML = "Save";
|
|
3441
3442
|
this.setError('Comments cannot be blank!');
|
|
3442
3443
|
setTimeout(() => {
|
|
3443
3444
|
this.clearMessages();
|
|
@@ -3553,8 +3554,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3553
3554
|
reportformatvalues = (_a = JSON.stringify(this._SfReporting[0].querySelector('#reporting-format').selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
3554
3555
|
reportformatschema = (_b = this._SfReporting[0].querySelector('#reporting-format').configjson) !== null && _b !== void 0 ? _b : "";
|
|
3555
3556
|
}
|
|
3556
|
-
|
|
3557
|
+
console.log('docs', docs, 'docsOptional', event.docsOptional);
|
|
3558
|
+
if (docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0) {
|
|
3557
3559
|
//console.log('reporter comments 3', reportercomments);
|
|
3560
|
+
buttonClick.innerHTML = "Save";
|
|
3558
3561
|
this.setError('No documents uploaded!');
|
|
3559
3562
|
setTimeout(() => {
|
|
3560
3563
|
this.clearMessages();
|
|
@@ -3563,6 +3566,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3563
3566
|
else {
|
|
3564
3567
|
//console.log('reporterdoc', reporterdoc);
|
|
3565
3568
|
if (reporterdoc.length === 0) {
|
|
3569
|
+
buttonClick.innerHTML = "Save";
|
|
3566
3570
|
this.setError('Date of completion not selected!');
|
|
3567
3571
|
setTimeout(() => {
|
|
3568
3572
|
this.clearMessages();
|
|
@@ -3571,6 +3575,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3571
3575
|
else {
|
|
3572
3576
|
//console.log('makerscheckers 1', reportercomments);
|
|
3573
3577
|
if (reportercomments.trim().length === 0) {
|
|
3578
|
+
buttonClick.innerHTML = "Save";
|
|
3574
3579
|
this.setError('Comments cannot be blank!');
|
|
3575
3580
|
setTimeout(() => {
|
|
3576
3581
|
this.clearMessages();
|
|
@@ -9012,6 +9017,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9012
9017
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
9013
9018
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
9014
9019
|
if (comments.trim().length === 0) {
|
|
9020
|
+
buttonClick.innerHTML = "Save";
|
|
9015
9021
|
this.setError('Comments cannot be blank!');
|
|
9016
9022
|
setTimeout(() => {
|
|
9017
9023
|
this.clearMessages();
|
|
@@ -9134,6 +9140,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9134
9140
|
}
|
|
9135
9141
|
if (docs.length === 0 && docsOptional.length === 0) {
|
|
9136
9142
|
//console.log('reporter comments 3', reportercomments);
|
|
9143
|
+
buttonClick.innerHTML = "Save";
|
|
9137
9144
|
this.setError('No documents uploaded!');
|
|
9138
9145
|
setTimeout(() => {
|
|
9139
9146
|
this.clearMessages();
|
|
@@ -9142,6 +9149,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9142
9149
|
else {
|
|
9143
9150
|
//console.log('reporterdoc', reporterdoc);
|
|
9144
9151
|
if (reporterdoc.length === 0) {
|
|
9152
|
+
buttonClick.innerHTML = "Save";
|
|
9145
9153
|
this.setError('Date of completion not selected!');
|
|
9146
9154
|
setTimeout(() => {
|
|
9147
9155
|
this.clearMessages();
|
|
@@ -9150,6 +9158,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9150
9158
|
else {
|
|
9151
9159
|
//console.log('makerscheckers 1', reportercomments);
|
|
9152
9160
|
if (reportercomments.trim().length === 0) {
|
|
9161
|
+
buttonClick.innerHTML = "Save";
|
|
9153
9162
|
this.setError('Comments cannot be blank!');
|
|
9154
9163
|
setTimeout(() => {
|
|
9155
9164
|
this.clearMessages();
|
|
@@ -10106,6 +10115,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10106
10115
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
10107
10116
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
10108
10117
|
if (comments.trim().length === 0) {
|
|
10118
|
+
buttonClick.innerHTML = "Save";
|
|
10109
10119
|
this.setError('Comments cannot be blank!');
|
|
10110
10120
|
setTimeout(() => {
|
|
10111
10121
|
this.clearMessages();
|
|
@@ -10226,6 +10236,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10226
10236
|
}
|
|
10227
10237
|
if (docs.length === 0 && docsOptional.length === 0) {
|
|
10228
10238
|
//console.log('reporter comments 3', reportercomments);
|
|
10239
|
+
buttonClick.innerHTML = "Save";
|
|
10229
10240
|
this.setError('No documents uploaded!');
|
|
10230
10241
|
setTimeout(() => {
|
|
10231
10242
|
this.clearMessages();
|
|
@@ -10234,6 +10245,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10234
10245
|
else {
|
|
10235
10246
|
//console.log('reporterdoc', reporterdoc);
|
|
10236
10247
|
if (reporterdoc.length === 0) {
|
|
10248
|
+
buttonClick.innerHTML = "Save";
|
|
10237
10249
|
this.setError('Date of completion not selected!');
|
|
10238
10250
|
setTimeout(() => {
|
|
10239
10251
|
this.clearMessages();
|
|
@@ -10242,6 +10254,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10242
10254
|
else {
|
|
10243
10255
|
//console.log('makerscheckers 1', reportercomments);
|
|
10244
10256
|
if (reportercomments.trim().length === 0) {
|
|
10257
|
+
buttonClick.innerHTML = "Save";
|
|
10245
10258
|
this.setError('Comments cannot be blank!');
|
|
10246
10259
|
setTimeout(() => {
|
|
10247
10260
|
this.clearMessages();
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4574,8 +4574,8 @@ export class SfIEvents extends LitElement {
|
|
|
4574
4574
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4575
4575
|
html += '<div class="hidden-tags hide">'+JSON.stringify(event['tags'])+'</div>'
|
|
4576
4576
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
4577
|
-
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.isnotice ?? false) ? 'isnotice' : 'isevent') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true)) ? '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 button-event-title" id="stream-event-title-' + mmdd.replace(/\//g,'-') + '-' + itemNumber + '-'+((event.isnotice ?? false)?'isnotice':'isevent')+ '" text="'+event['obligationtitle']+'" minLength="100"></sf-i-elastic-text>' + (event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><button id="button-list-reporting-'+mmdd.replace('/', '-')+'-' + itemNumber +'" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + (lastUpdated.length > 0 ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4578
|
-
if(remarks.length > 0) {
|
|
4577
|
+
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.isnotice ?? false) ? 'isnotice' : 'isevent') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true)) ? '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 button-event-title" id="stream-event-title-' + mmdd.replace(/\//g,'-') + '-' + itemNumber + '-'+((event.isnotice ?? false)?'isnotice':'isevent')+ '" text="'+event['obligationtitle']+'" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + (event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><button id="button-list-reporting-'+mmdd.replace('/', '-')+'-' + itemNumber +'" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4578
|
+
if(event.reporters != null && remarks.length > 0) {
|
|
4579
4579
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">'+remarks+', occurred on '+occurrenceDate+'</div>';
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
@@ -5579,10 +5579,10 @@ export class SfIEvents extends LitElement {
|
|
|
5579
5579
|
reportformatName = (event['reportformat'][0] ?? "").trim().replace('&','&');
|
|
5580
5580
|
}
|
|
5581
5581
|
let docs = event['documents'] == null ? [] : event['documents'];
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5582
|
+
event.approved = event['approved'] == null ? false : event['approved'];
|
|
5583
|
+
event.dateOfCompletion = event['dateofcompletion'] == null ? '' : event['dateofcompletion'];
|
|
5584
|
+
event.makercheckers = event['makercheckers'] == null ? [] : event['makercheckers'];
|
|
5585
|
+
event.docsOptional = event['docs'] == null ? [] : event['docs'];
|
|
5586
5586
|
html = this.renderReporting(event, mmddyyyy);
|
|
5587
5587
|
console.log('reporting html', html);
|
|
5588
5588
|
|
|
@@ -5781,7 +5781,7 @@ export class SfIEvents extends LitElement {
|
|
|
5781
5781
|
const approved = (listReportingContainer.querySelector('#input-approve-yes') as HTMLInputElement).checked;
|
|
5782
5782
|
|
|
5783
5783
|
if(comments.trim().length === 0) {
|
|
5784
|
-
|
|
5784
|
+
buttonClick.innerHTML = "Save"
|
|
5785
5785
|
this.setError('Comments cannot be blank!');
|
|
5786
5786
|
setTimeout(() => {
|
|
5787
5787
|
this.clearMessages();
|
|
@@ -5918,11 +5918,11 @@ export class SfIEvents extends LitElement {
|
|
|
5918
5918
|
reportformatschema = (this._SfReporting[0].querySelector('#reporting-format') as SfIReporting)!.configjson ?? "";
|
|
5919
5919
|
}
|
|
5920
5920
|
|
|
5921
|
-
|
|
5922
|
-
if(docs.length
|
|
5921
|
+
console.log('docs', docs, 'docsOptional', event.docsOptional)
|
|
5922
|
+
if(docs.length == 0 && event.docsOptional != null && event.docsOptional.length === 0) {
|
|
5923
5923
|
|
|
5924
5924
|
//console.log('reporter comments 3', reportercomments);
|
|
5925
|
-
|
|
5925
|
+
buttonClick.innerHTML = "Save"
|
|
5926
5926
|
this.setError('No documents uploaded!');
|
|
5927
5927
|
setTimeout(() => {
|
|
5928
5928
|
this.clearMessages();
|
|
@@ -5933,7 +5933,7 @@ export class SfIEvents extends LitElement {
|
|
|
5933
5933
|
//console.log('reporterdoc', reporterdoc);
|
|
5934
5934
|
|
|
5935
5935
|
if(reporterdoc.length === 0) {
|
|
5936
|
-
|
|
5936
|
+
buttonClick.innerHTML = "Save"
|
|
5937
5937
|
this.setError('Date of completion not selected!');
|
|
5938
5938
|
setTimeout(() => {
|
|
5939
5939
|
this.clearMessages();
|
|
@@ -5944,7 +5944,7 @@ export class SfIEvents extends LitElement {
|
|
|
5944
5944
|
//console.log('makerscheckers 1', reportercomments);
|
|
5945
5945
|
|
|
5946
5946
|
if(reportercomments.trim().length === 0) {
|
|
5947
|
-
|
|
5947
|
+
buttonClick.innerHTML = "Save"
|
|
5948
5948
|
this.setError('Comments cannot be blank!');
|
|
5949
5949
|
setTimeout(() => {
|
|
5950
5950
|
this.clearMessages();
|
|
@@ -12560,7 +12560,7 @@ export class SfIEvents extends LitElement {
|
|
|
12560
12560
|
const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
|
|
12561
12561
|
|
|
12562
12562
|
if(comments.trim().length === 0) {
|
|
12563
|
-
|
|
12563
|
+
buttonClick.innerHTML = "Save"
|
|
12564
12564
|
this.setError('Comments cannot be blank!');
|
|
12565
12565
|
setTimeout(() => {
|
|
12566
12566
|
this.clearMessages();
|
|
@@ -12710,7 +12710,7 @@ export class SfIEvents extends LitElement {
|
|
|
12710
12710
|
if(docs.length === 0 && docsOptional.length === 0) {
|
|
12711
12711
|
|
|
12712
12712
|
//console.log('reporter comments 3', reportercomments);
|
|
12713
|
-
|
|
12713
|
+
buttonClick.innerHTML = "Save"
|
|
12714
12714
|
this.setError('No documents uploaded!');
|
|
12715
12715
|
setTimeout(() => {
|
|
12716
12716
|
this.clearMessages();
|
|
@@ -12721,7 +12721,7 @@ export class SfIEvents extends LitElement {
|
|
|
12721
12721
|
//console.log('reporterdoc', reporterdoc);
|
|
12722
12722
|
|
|
12723
12723
|
if(reporterdoc.length === 0) {
|
|
12724
|
-
|
|
12724
|
+
buttonClick.innerHTML = "Save"
|
|
12725
12725
|
this.setError('Date of completion not selected!');
|
|
12726
12726
|
setTimeout(() => {
|
|
12727
12727
|
this.clearMessages();
|
|
@@ -12732,7 +12732,7 @@ export class SfIEvents extends LitElement {
|
|
|
12732
12732
|
//console.log('makerscheckers 1', reportercomments);
|
|
12733
12733
|
|
|
12734
12734
|
if(reportercomments.trim().length === 0) {
|
|
12735
|
-
|
|
12735
|
+
buttonClick.innerHTML = "Save"
|
|
12736
12736
|
this.setError('Comments cannot be blank!');
|
|
12737
12737
|
setTimeout(() => {
|
|
12738
12738
|
this.clearMessages();
|
|
@@ -13841,7 +13841,7 @@ export class SfIEvents extends LitElement {
|
|
|
13841
13841
|
const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
|
|
13842
13842
|
|
|
13843
13843
|
if(comments.trim().length === 0) {
|
|
13844
|
-
|
|
13844
|
+
buttonClick.innerHTML = "Save"
|
|
13845
13845
|
this.setError('Comments cannot be blank!');
|
|
13846
13846
|
setTimeout(() => {
|
|
13847
13847
|
this.clearMessages();
|
|
@@ -13988,7 +13988,7 @@ export class SfIEvents extends LitElement {
|
|
|
13988
13988
|
if(docs.length === 0 && docsOptional.length === 0) {
|
|
13989
13989
|
|
|
13990
13990
|
//console.log('reporter comments 3', reportercomments);
|
|
13991
|
-
|
|
13991
|
+
buttonClick.innerHTML = "Save"
|
|
13992
13992
|
this.setError('No documents uploaded!');
|
|
13993
13993
|
setTimeout(() => {
|
|
13994
13994
|
this.clearMessages();
|
|
@@ -13999,7 +13999,7 @@ export class SfIEvents extends LitElement {
|
|
|
13999
13999
|
//console.log('reporterdoc', reporterdoc);
|
|
14000
14000
|
|
|
14001
14001
|
if(reporterdoc.length === 0) {
|
|
14002
|
-
|
|
14002
|
+
buttonClick.innerHTML = "Save"
|
|
14003
14003
|
this.setError('Date of completion not selected!');
|
|
14004
14004
|
setTimeout(() => {
|
|
14005
14005
|
this.clearMessages();
|
|
@@ -14010,7 +14010,7 @@ export class SfIEvents extends LitElement {
|
|
|
14010
14010
|
//console.log('makerscheckers 1', reportercomments);
|
|
14011
14011
|
|
|
14012
14012
|
if(reportercomments.trim().length === 0) {
|
|
14013
|
-
|
|
14013
|
+
buttonClick.innerHTML = "Save"
|
|
14014
14014
|
this.setError('Comments cannot be blank!');
|
|
14015
14015
|
setTimeout(() => {
|
|
14016
14016
|
this.clearMessages();
|