sf-i-events 1.0.965 → 1.0.966

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 CHANGED
@@ -864,7 +864,7 @@
864
864
  allowdownload="yes"></sf-i-uploader></div>
865
865
  <div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
866
866
  </sf-i-events> -->
867
- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
867
+ <!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api" mode="consumer"
868
868
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
869
869
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
870
870
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -893,6 +893,35 @@
893
893
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
894
894
  </div>
895
895
 
896
+ </sf-i-events> -->
897
+ <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api" mode="consumer"
898
+ apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
899
+ apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
900
+ apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
901
+ apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
902
+ apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
903
+ apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
904
+ apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="pattern"
905
+ username="Nirmal Rathod" userprofileid="d4d92385-1fa4-4055-b23c-d7ef5e18bc3d"
906
+ projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" projectname="Standard Radiators Private Limited"
907
+ countryid="17f9c73b-886d-40d7-b8f2-2ace42763d47" selectedcriteria="Country - India" enabledeletelatestreport="true"
908
+ features="[]"
909
+ eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]"
910
+ eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]"
911
+ eventpreviewfields="[&quot;obligationtitle&quot;]"
912
+ eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]"
913
+ calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
914
+
915
+ <div slot="uploader">
916
+ <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
917
+ allowedextensions="[&quot;jpg&quot;,&quot;jpeg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;,&quot;zip&quot;]"
918
+ extract="yes" projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" maxsize="31457280"
919
+ allowdownload="yes"></sf-i-uploader>
920
+ </div>
921
+ <div slot="reporting">
922
+ <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
923
+ </div>
924
+
896
925
  </sf-i-events>
897
926
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
898
927
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.965",
4
+ "version": "1.0.966",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -3932,7 +3932,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3932
3932
  return html;
3933
3933
  };
3934
3934
  this.renderListReporting = (listReportingContainer, event, mmddyyyy, eventsContainer) => {
3935
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o;
3935
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m;
3936
3936
  console.log('listreporting event', event, this.graphFilter);
3937
3937
  let html = '';
3938
3938
  let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
@@ -3982,23 +3982,26 @@ let SfIEvents = class SfIEvents extends LitElement {
3982
3982
  if (this._SfUploader[0] != null) {
3983
3983
  this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
3984
3984
  }
3985
- (_f = listReportingContainer.querySelector('.button-delete')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
3986
- await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
3987
- this.setSuccess('Deleted successfully!');
3988
- setTimeout(() => {
3989
- this.clearMessages();
3990
- }, 3000);
3991
- //console.log('deleted', resultDelete);
3992
- if (this.getCurrentTab() == this.TAB_CUSTOM) {
3993
- this.processDateSelection(this._SfCustomContainer);
3994
- }
3995
- else {
3996
- // if(currentColumnButton != null) {
3997
- // currentColumnButton.click();
3998
- // }
3999
- }
4000
- });
4001
- (_g = listReportingContainer.querySelector('#button-auto-approve')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
3985
+ let deleteButtons = listReportingContainer.querySelectorAll('.button-delete');
3986
+ for (let deleteButton of deleteButtons) {
3987
+ deleteButton === null || deleteButton === void 0 ? void 0 : deleteButton.addEventListener('click', async () => {
3988
+ await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
3989
+ this.setSuccess('Deleted successfully!');
3990
+ setTimeout(() => {
3991
+ this.clearMessages();
3992
+ }, 3000);
3993
+ //console.log('deleted', resultDelete);
3994
+ if (this.getCurrentTab() == this.TAB_CUSTOM) {
3995
+ this.processDateSelection(this._SfCustomContainer);
3996
+ }
3997
+ else {
3998
+ // if(currentColumnButton != null) {
3999
+ // currentColumnButton.click();
4000
+ // }
4001
+ }
4002
+ });
4003
+ }
4004
+ (_f = listReportingContainer.querySelector('#button-auto-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
4002
4005
  var _a, _b;
4003
4006
  if (this.selectedItemIds.length <= 1) {
4004
4007
  await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
@@ -4045,7 +4048,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4045
4048
  // }
4046
4049
  }
4047
4050
  });
4048
- (_h = listReportingContainer.querySelector('#upload-guidance-button')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async () => {
4051
+ (_g = listReportingContainer.querySelector('#upload-guidance-button')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
4049
4052
  var _a, _b, _c, _f, _g, _h;
4050
4053
  console.log('upload guidance clicked', event);
4051
4054
  let inputReportingPercentage = (_b = (_a = listReportingContainer.querySelector('#input-reporter-percentage')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "100";
@@ -4240,7 +4243,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4240
4243
  selectReportingLocation.value = "";
4241
4244
  }
4242
4245
  }
4243
- (_j = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
4246
+ (_h = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
4244
4247
  var _a, _b;
4245
4248
  let buttonClick = ev.target;
4246
4249
  buttonClick.innerHTML = "Saving...";
@@ -4369,7 +4372,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4369
4372
  }
4370
4373
  }
4371
4374
  });
4372
- (_k = listReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
4375
+ (_j = listReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
4373
4376
  var _a, _b;
4374
4377
  let buttonClick = ev.target;
4375
4378
  buttonClick.innerHTML = "Saving...";
@@ -4497,7 +4500,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4497
4500
  else {
4498
4501
  if (listReportingContainer.querySelector('#button-uploader-submit-report') != null) {
4499
4502
  listReportingContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
4500
- (_l = listReportingContainer.querySelector('#button-uploader-submit-report')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', async (ev) => {
4503
+ (_k = listReportingContainer.querySelector('#button-uploader-submit-report')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
4501
4504
  var _a, _b, _c, _f;
4502
4505
  let buttonClick = ev.target;
4503
4506
  buttonClick.innerHTML = "Saving...";
@@ -4880,7 +4883,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4880
4883
  }
4881
4884
  }
4882
4885
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
4883
- this.fetchReportFormat(listReportingContainer, reportformatName, (_m = event['reportformatschema']) !== null && _m !== void 0 ? _m : "", (_o = event['reportformatvalues']) !== null && _o !== void 0 ? _o : "");
4886
+ this.fetchReportFormat(listReportingContainer, reportformatName, (_l = event['reportformatschema']) !== null && _l !== void 0 ? _l : "", (_m = event['reportformatvalues']) !== null && _m !== void 0 ? _m : "");
4884
4887
  }
4885
4888
  };
4886
4889
  this.attachListReportingListeners = (eventsContainer) => {
@@ -8243,10 +8246,10 @@ let SfIEvents = class SfIEvents extends LitElement {
8243
8246
  chooseDateInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
8244
8247
  submitFlag = false;
8245
8248
  }
8246
- if (remarks == "") {
8247
- remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
8248
- submitFlag = false;
8249
- }
8249
+ // if (remarks == "") {
8250
+ // remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
8251
+ // submitFlag = false;
8252
+ // }
8250
8253
  if (submitFlag) {
8251
8254
  triggeredCompliances.push({
8252
8255
  compliances: compliances,
@@ -14719,14 +14722,6 @@ let SfIEvents = class SfIEvents extends LitElement {
14719
14722
  obligationtitle: event.obligationtitle,
14720
14723
  obligation: event.obligation,
14721
14724
  });
14722
- // this.uploadTriggerMyEvent(
14723
- // event.id + ";" + event.shortid,
14724
- // feedbackMessage.value,
14725
- // event.countries.join(",").replace(/ *\([^)]*\) */g, ""),
14726
- // event.entities.join(',').replace(/ *\([^)]*\) */g, ""),
14727
- // event.locations.join(',').replace(/ *\([^)]*\) */g, ""),
14728
- // event.statute[0],
14729
- // event.subcategory[0]);
14730
14725
  buttonCancel.click();
14731
14726
  buttonClose.click();
14732
14727
  }
@@ -14764,7 +14759,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14764
14759
  }
14765
14760
  };
14766
14761
  this.renderEventDetailReporting = (eventDetailReportingContainer, event, mmddyyyy, eventDetailContainer) => {
14767
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m;
14762
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l;
14768
14763
  console.log('detailreporting event', event, this.graphFilter);
14769
14764
  let html = '';
14770
14765
  let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
@@ -14785,23 +14780,26 @@ let SfIEvents = class SfIEvents extends LitElement {
14785
14780
  if (this._SfUploader[0] != null) {
14786
14781
  this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
14787
14782
  }
14788
- (_c = eventDetailReportingContainer.querySelector('.button-delete')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
14789
- await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
14790
- this.setSuccess('Deleted successfully!');
14791
- setTimeout(() => {
14792
- this.clearMessages();
14793
- }, 3000);
14794
- //console.log('deleted', resultDelete);
14795
- if (this.getCurrentTab() == this.TAB_CUSTOM) {
14796
- this.processDateSelection(this._SfCustomContainer);
14797
- }
14798
- else {
14799
- // if(currentColumnButton != null) {
14800
- // currentColumnButton.click();
14801
- // }
14802
- }
14803
- });
14804
- (_f = eventDetailReportingContainer.querySelector('#button-auto-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
14783
+ let deleteButtons = eventDetailContainer.querySelectorAll('.button-delete');
14784
+ for (let deleteButton of deleteButtons) {
14785
+ deleteButton === null || deleteButton === void 0 ? void 0 : deleteButton.addEventListener('click', async () => {
14786
+ await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
14787
+ this.setSuccess('Deleted successfully!');
14788
+ setTimeout(() => {
14789
+ this.clearMessages();
14790
+ }, 3000);
14791
+ //console.log('deleted', resultDelete);
14792
+ if (this.getCurrentTab() == this.TAB_CUSTOM) {
14793
+ this.processDateSelection(this._SfCustomContainer);
14794
+ }
14795
+ else {
14796
+ // if(currentColumnButton != null) {
14797
+ // currentColumnButton.click();
14798
+ // }
14799
+ }
14800
+ });
14801
+ }
14802
+ (_c = eventDetailReportingContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
14805
14803
  var _a, _b;
14806
14804
  if (this.selectedItemIds.length <= 1) {
14807
14805
  await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
@@ -14848,7 +14846,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14848
14846
  // }
14849
14847
  }
14850
14848
  });
14851
- (_g = eventDetailReportingContainer.querySelector('#upload-guidance-button')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
14849
+ (_f = eventDetailReportingContainer.querySelector('#upload-guidance-button')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
14852
14850
  var _a, _b, _c, _f, _g, _h;
14853
14851
  console.log('upload guidance clicked', event);
14854
14852
  let inputReportingPercentage = (_b = (_a = eventDetailReportingContainer.querySelector('#input-reporter-percentage')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "100";
@@ -15043,7 +15041,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15043
15041
  selectReportingLocation.value = "";
15044
15042
  }
15045
15043
  }
15046
- (_h = eventDetailReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
15044
+ (_g = eventDetailReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async (ev) => {
15047
15045
  var _a, _b;
15048
15046
  let buttonClick = ev.target;
15049
15047
  buttonClick.innerHTML = "Saving...";
@@ -15172,7 +15170,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15172
15170
  }
15173
15171
  }
15174
15172
  });
15175
- (_j = eventDetailReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
15173
+ (_h = eventDetailReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
15176
15174
  var _a, _b;
15177
15175
  let buttonClick = ev.target;
15178
15176
  buttonClick.innerHTML = "Saving...";
@@ -15300,7 +15298,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15300
15298
  else {
15301
15299
  if (eventDetailReportingContainer.querySelector('#button-uploader-submit-report') != null) {
15302
15300
  eventDetailReportingContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
15303
- (_k = eventDetailReportingContainer.querySelector('#button-uploader-submit-report')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
15301
+ (_j = eventDetailReportingContainer.querySelector('#button-uploader-submit-report')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
15304
15302
  var _a, _b, _c, _f;
15305
15303
  let buttonClick = ev.target;
15306
15304
  buttonClick.innerHTML = "Saving...";
@@ -15683,7 +15681,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15683
15681
  }
15684
15682
  }
15685
15683
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
15686
- this.fetchReportFormat(eventDetailReportingContainer, reportformatName, (_l = event['reportformatschema']) !== null && _l !== void 0 ? _l : "", (_m = event['reportformatvalues']) !== null && _m !== void 0 ? _m : "");
15684
+ this.fetchReportFormat(eventDetailReportingContainer, reportformatName, (_k = event['reportformatschema']) !== null && _k !== void 0 ? _k : "", (_l = event['reportformatvalues']) !== null && _l !== void 0 ? _l : "");
15687
15685
  }
15688
15686
  };
15689
15687
  this.renderCalendar = () => {
@@ -22434,7 +22432,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22434
22432
  }
22435
22433
  };
22436
22434
  this.uploadTriggerEvent = async (triggeredCompliances) => {
22437
- let url = "https://" + this.apiId + "/triggerevent";
22435
+ let url = "https://" + this.apiId + "/triggerevent1";
22438
22436
  const body = {
22439
22437
  "projectid": this.projectId,
22440
22438
  "triggers": triggeredCompliances
@@ -6378,23 +6378,26 @@ export class SfIEvents extends LitElement {
6378
6378
  if (this._SfUploader[0] != null) {
6379
6379
  (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.emailcontent = emailcontent;
6380
6380
  }
6381
- listReportingContainer.querySelector('.button-delete')?.addEventListener('click', async () => {
6381
+ let deleteButtons = listReportingContainer.querySelectorAll('.button-delete') as NodeListOf<HTMLButtonElement>
6382
+ for (let deleteButton of deleteButtons) {
6383
+ deleteButton?.addEventListener('click', async () => {
6382
6384
 
6383
- await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
6384
- this.setSuccess('Deleted successfully!')
6385
- setTimeout(() => {
6386
- this.clearMessages()
6387
- }, 3000);
6388
- //console.log('deleted', resultDelete);
6389
- if (this.getCurrentTab() == this.TAB_CUSTOM) {
6390
- this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
6391
- } else {
6392
- // if(currentColumnButton != null) {
6393
- // currentColumnButton.click();
6394
- // }
6395
- }
6385
+ await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
6386
+ this.setSuccess('Deleted successfully!')
6387
+ setTimeout(() => {
6388
+ this.clearMessages()
6389
+ }, 3000);
6390
+ //console.log('deleted', resultDelete);
6391
+ if (this.getCurrentTab() == this.TAB_CUSTOM) {
6392
+ this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
6393
+ } else {
6394
+ // if(currentColumnButton != null) {
6395
+ // currentColumnButton.click();
6396
+ // }
6397
+ }
6396
6398
 
6397
- });
6399
+ });
6400
+ }
6398
6401
  listReportingContainer.querySelector('#button-auto-approve')?.addEventListener('click', async () => {
6399
6402
  if (this.selectedItemIds.length <= 1) {
6400
6403
  await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
@@ -6596,7 +6599,7 @@ export class SfIEvents extends LitElement {
6596
6599
  // }
6597
6600
  }
6598
6601
  selectReportingLocation.addEventListener('change', (e: any) => {
6599
- if(selectReportingEntity.value == ""){
6602
+ if (selectReportingEntity.value == "") {
6600
6603
  return;
6601
6604
  }
6602
6605
  let index = parseInt(e.target.id.split('-')[3])
@@ -11245,10 +11248,10 @@ export class SfIEvents extends LitElement {
11245
11248
  chooseDateInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
11246
11249
  submitFlag = false;
11247
11250
  }
11248
- if (remarks == "") {
11249
- remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
11250
- submitFlag = false;
11251
- }
11251
+ // if (remarks == "") {
11252
+ // remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
11253
+ // submitFlag = false;
11254
+ // }
11252
11255
  if (submitFlag) {
11253
11256
  triggeredCompliances.push({
11254
11257
  compliances: compliances,
@@ -18776,14 +18779,6 @@ export class SfIEvents extends LitElement {
18776
18779
  obligation: event.obligation,
18777
18780
  }
18778
18781
  );
18779
- // this.uploadTriggerMyEvent(
18780
- // event.id + ";" + event.shortid,
18781
- // feedbackMessage.value,
18782
- // event.countries.join(",").replace(/ *\([^)]*\) */g, ""),
18783
- // event.entities.join(',').replace(/ *\([^)]*\) */g, ""),
18784
- // event.locations.join(',').replace(/ *\([^)]*\) */g, ""),
18785
- // event.statute[0],
18786
- // event.subcategory[0]);
18787
18782
  buttonCancel.click();
18788
18783
  buttonClose.click();
18789
18784
  }
@@ -18851,23 +18846,26 @@ export class SfIEvents extends LitElement {
18851
18846
  if (this._SfUploader[0] != null) {
18852
18847
  (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.emailcontent = emailcontent;
18853
18848
  }
18854
- eventDetailReportingContainer.querySelector('.button-delete')?.addEventListener('click', async () => {
18849
+ let deleteButtons = eventDetailContainer.querySelectorAll('.button-delete') as NodeListOf<HTMLButtonElement>
18850
+ for (let deleteButton of deleteButtons) {
18851
+ deleteButton?.addEventListener('click', async () => {
18855
18852
 
18856
- await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
18857
- this.setSuccess('Deleted successfully!')
18858
- setTimeout(() => {
18859
- this.clearMessages()
18860
- }, 3000);
18861
- //console.log('deleted', resultDelete);
18862
- if (this.getCurrentTab() == this.TAB_CUSTOM) {
18863
- this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
18864
- } else {
18865
- // if(currentColumnButton != null) {
18866
- // currentColumnButton.click();
18867
- // }
18868
- }
18853
+ await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
18854
+ this.setSuccess('Deleted successfully!')
18855
+ setTimeout(() => {
18856
+ this.clearMessages()
18857
+ }, 3000);
18858
+ //console.log('deleted', resultDelete);
18859
+ if (this.getCurrentTab() == this.TAB_CUSTOM) {
18860
+ this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
18861
+ } else {
18862
+ // if(currentColumnButton != null) {
18863
+ // currentColumnButton.click();
18864
+ // }
18865
+ }
18869
18866
 
18870
- });
18867
+ });
18868
+ }
18871
18869
  eventDetailReportingContainer.querySelector('#button-auto-approve')?.addEventListener('click', async () => {
18872
18870
  if (this.selectedItemIds.length <= 1) {
18873
18871
  await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
@@ -19070,7 +19068,7 @@ export class SfIEvents extends LitElement {
19070
19068
  // }
19071
19069
  }
19072
19070
  selectReportingLocation.addEventListener('change', (e: any) => {
19073
- if(selectReportingEntity.value == ""){
19071
+ if (selectReportingEntity.value == "") {
19074
19072
  return;
19075
19073
  }
19076
19074
  let index = parseInt(e.target.id.split('-')[3])
@@ -28306,7 +28304,7 @@ export class SfIEvents extends LitElement {
28306
28304
 
28307
28305
  uploadTriggerEvent = async (triggeredCompliances: any) => {
28308
28306
 
28309
- let url = "https://" + this.apiId + "/triggerevent";
28307
+ let url = "https://" + this.apiId + "/triggerevent1";
28310
28308
 
28311
28309
  const body = {
28312
28310
  "projectid": this.projectId,