sf-i-events 1.0.917 → 1.0.919

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
@@ -829,7 +829,7 @@
829
829
  disablesignoff="yes" disableclientresponse="yes">
830
830
 
831
831
  </sf-i-events> -->
832
- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
832
+ <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
833
833
  apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
834
834
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
835
835
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Local Reporter 1"
@@ -842,7 +842,7 @@
842
842
  extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
843
843
  allowdownload="yes"></sf-i-uploader></div>
844
844
  <div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
845
- </sf-i-events>
845
+ </sf-i-events> -->
846
846
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
847
847
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
848
848
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
@@ -873,7 +873,7 @@
873
873
  </div>
874
874
 
875
875
  </sf-i-events> -->
876
- <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
876
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
877
877
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
878
878
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
879
879
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -901,7 +901,7 @@
901
901
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
902
902
  </div>
903
903
 
904
- </sf-i-events> -->
904
+ </sf-i-events>
905
905
  <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
906
906
  apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
907
907
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.917",
4
+ "version": "1.0.919",
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
@@ -3734,7 +3734,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3734
3734
  return html;
3735
3735
  };
3736
3736
  this.renderListReporting = (listReportingContainer, event, mmddyyyy, eventsContainer) => {
3737
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p;
3737
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o;
3738
3738
  console.log('listreporting event', event, this.graphFilter);
3739
3739
  let html = '';
3740
3740
  let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
@@ -3873,6 +3873,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3873
3873
  let percentage = inputReportingPercentage.value;
3874
3874
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
3875
3875
  listReportingContainer.querySelector('#reporting-entity-container').classList.remove('hide');
3876
+ listReportingContainer.querySelector('#reporting-location-container').classList.remove('hide');
3876
3877
  }
3877
3878
  else {
3878
3879
  listReportingContainer.querySelector('#reporting-entity-container').classList.add('hide');
@@ -3884,6 +3885,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3884
3885
  console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
3885
3886
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
3886
3887
  listReportingContainer.querySelector('#reporting-entity-container').classList.remove('hide');
3888
+ listReportingContainer.querySelector('#reporting-location-container').classList.remove('hide');
3887
3889
  }
3888
3890
  else {
3889
3891
  listReportingContainer.querySelector('#reporting-entity-container').classList.add('hide');
@@ -3932,8 +3934,35 @@ let SfIEvents = class SfIEvents extends LitElement {
3932
3934
  listReportingContainer.querySelector('#reporting-location-container').classList.remove('hide');
3933
3935
  selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
3934
3936
  });
3935
- selectReportingLocation.value = (_j = event.reportedlocations) !== null && _j !== void 0 ? _j : "";
3936
- (_k = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
3937
+ if (event.reportedlocations != null && event.reportedlocations.length > 0) {
3938
+ console.log('setting reportedlocations', event.reportedlocations);
3939
+ for (let country of Object.keys(projectUserMap)) {
3940
+ if (country == "roles") {
3941
+ continue;
3942
+ }
3943
+ for (let entity of Object.keys(projectUserMap[country])) {
3944
+ let flagSetVal = false;
3945
+ for (let location of Object.keys(projectUserMap[country][entity])) {
3946
+ if (event.reportedlocations.indexOf(location) >= 0) {
3947
+ selectReportingEntity.value = entity;
3948
+ const changeEvent = new Event('change', { bubbles: true });
3949
+ selectReportingEntity.dispatchEvent(changeEvent);
3950
+ selectReportingLocation.value = location;
3951
+ flagSetVal = true;
3952
+ break;
3953
+ }
3954
+ }
3955
+ if (flagSetVal) {
3956
+ break;
3957
+ }
3958
+ }
3959
+ }
3960
+ }
3961
+ else {
3962
+ selectReportingEntity.value = "";
3963
+ selectReportingLocation.value = "";
3964
+ }
3965
+ (_j = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
3937
3966
  var _a, _b;
3938
3967
  let buttonClick = ev.target;
3939
3968
  buttonClick.innerHTML = "Saving...";
@@ -4062,7 +4091,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4062
4091
  }
4063
4092
  }
4064
4093
  });
4065
- (_l = listReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', async (ev) => {
4094
+ (_k = listReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
4066
4095
  var _a, _b;
4067
4096
  let buttonClick = ev.target;
4068
4097
  buttonClick.innerHTML = "Saving...";
@@ -4190,7 +4219,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4190
4219
  else {
4191
4220
  if (listReportingContainer.querySelector('#button-uploader-submit-report') != null) {
4192
4221
  listReportingContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
4193
- (_m = listReportingContainer.querySelector('#button-uploader-submit-report')) === null || _m === void 0 ? void 0 : _m.addEventListener('click', async (ev) => {
4222
+ (_l = listReportingContainer.querySelector('#button-uploader-submit-report')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', async (ev) => {
4194
4223
  var _a, _b, _c, _f, _g;
4195
4224
  let buttonClick = ev.target;
4196
4225
  buttonClick.innerHTML = "Saving...";
@@ -4562,7 +4591,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4562
4591
  }
4563
4592
  }
4564
4593
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
4565
- this.fetchReportFormat(listReportingContainer, reportformatName, (_o = event['reportformatschema']) !== null && _o !== void 0 ? _o : "", (_p = event['reportformatvalues']) !== null && _p !== void 0 ? _p : "");
4594
+ this.fetchReportFormat(listReportingContainer, reportformatName, (_m = event['reportformatschema']) !== null && _m !== void 0 ? _m : "", (_o = event['reportformatvalues']) !== null && _o !== void 0 ? _o : "");
4566
4595
  }
4567
4596
  };
4568
4597
  this.attachListReportingListeners = (eventsContainer) => {
@@ -5697,7 +5726,7 @@ let SfIEvents = class SfIEvents extends LitElement {
5697
5726
  this.csvDataRegisters += ('\n');
5698
5727
  }
5699
5728
  html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
5700
- html += '<div class="d-flex align-end">';
5729
+ html += '<div class="d-flex align-end left-sticky">';
5701
5730
  html += '<div class="title-item-date">';
5702
5731
  html += '<label part="input-label">Search In Statute</label><br />';
5703
5732
  html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>';
@@ -5907,7 +5936,7 @@ let SfIEvents = class SfIEvents extends LitElement {
5907
5936
  const searchIndex = e.currentTarget.id.split('-')[4];
5908
5937
  const objCountry = events[Object.keys(events)[countryIndex]];
5909
5938
  const statute = Object.keys(objCountry)[searchIndex];
5910
- let csvData = '"ID","Country","Entities","Locations","Statute","Reference","Obligation"\n';
5939
+ let csvData = '"ID","Country","Entities","Locations","Statute","Reference","Obligation Title"\n';
5911
5940
  for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
5912
5941
  const complianceId = Object.keys(objCountry[statute])[j];
5913
5942
  const compliance = objCountry[statute][complianceId];
@@ -5923,7 +5952,7 @@ let SfIEvents = class SfIEvents extends LitElement {
5923
5952
  csvData += ('"' + (compliance['locations'] != null && Array.isArray(compliance['locations']) ? compliance['locations'].map((e) => e.split(';')[0].replace(/\([^)]*\)/g, "")).join(',') : '') + '",');
5924
5953
  csvData += ('"' + statute + '",');
5925
5954
  csvData += ('"' + data[cols.indexOf('reference')] + '",');
5926
- csvData += ('"' + data[cols.indexOf('obligation')] + '"\n');
5955
+ csvData += ('"' + data[cols.indexOf('obligationtitle')] + '"\n');
5927
5956
  }
5928
5957
  console.log('csvData', csvData);
5929
5958
  const ts = new Date();
@@ -7767,7 +7796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7767
7796
  var _a, _b;
7768
7797
  var html = '';
7769
7798
  html += '<div class="scroll-x w-100 mobile-only">';
7770
- html += '<div class="title-item-date">';
7799
+ html += '<div class="title-item-date hide">';
7771
7800
  html += '<label part="input-label">Search</label><br />';
7772
7801
  html += '<input id="stream-search-mobile" part="input" type="text" autofocus/>';
7773
7802
  html += '</div>';
@@ -7775,7 +7804,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7775
7804
  html += '<div class="d-flex w-100 flex-col">';
7776
7805
  html += '<div class="calendar-left-col-register flex-grow desktop-only flex-col justify-start">';
7777
7806
  html += '<div>';
7778
- html += '<div class="title-item-date">';
7807
+ html += '<div class="title-item-date hide">';
7779
7808
  html += '<label part="input-label">Search</label><br />';
7780
7809
  html += '<input id="stream-search" part="input" type="text" autofocus/>';
7781
7810
  html += '</div>';
@@ -13392,7 +13421,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13392
13421
  }
13393
13422
  };
13394
13423
  this.renderEventDetail = (event, mmddyyyy, currentColumnButton, eventsContainer) => {
13395
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
13424
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
13396
13425
  console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
13397
13426
  let comments, docs, approved, /*dateOfCompletion,*/ makercheckers, docsOptional, documentType;
13398
13427
  let entityId = "";
@@ -13955,6 +13984,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13955
13984
  let percentage = inputReportingPercentage.value;
13956
13985
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
13957
13986
  this._SfDetailContainer.querySelector('#reporting-entity-container').classList.remove('hide');
13987
+ this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
13958
13988
  }
13959
13989
  else {
13960
13990
  this._SfDetailContainer.querySelector('#reporting-entity-container').classList.add('hide');
@@ -13966,6 +13996,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13966
13996
  console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
13967
13997
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
13968
13998
  this._SfDetailContainer.querySelector('#reporting-entity-container').classList.remove('hide');
13999
+ this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
13969
14000
  }
13970
14001
  else {
13971
14002
  this._SfDetailContainer.querySelector('#reporting-entity-container').classList.add('hide');
@@ -14014,8 +14045,35 @@ let SfIEvents = class SfIEvents extends LitElement {
14014
14045
  this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
14015
14046
  selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
14016
14047
  });
14017
- selectReportingLocation.value = (_t = event.reportedlocations) !== null && _t !== void 0 ? _t : "";
14018
- (_u = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
14048
+ if (event.reportedlocations != null && event.reportedlocations.length > 0) {
14049
+ console.log('setting reportedlocations', event.reportedlocations);
14050
+ for (let country of Object.keys(projectUserMap)) {
14051
+ if (country == "roles") {
14052
+ continue;
14053
+ }
14054
+ for (let entity of Object.keys(projectUserMap[country])) {
14055
+ let flagSetVal = false;
14056
+ for (let location of Object.keys(projectUserMap[country][entity])) {
14057
+ if (event.reportedlocations.indexOf(location) >= 0) {
14058
+ selectReportingEntity.value = entity;
14059
+ const changeEvent = new Event('change', { bubbles: true });
14060
+ selectReportingEntity.dispatchEvent(changeEvent);
14061
+ selectReportingLocation.value = location;
14062
+ flagSetVal = true;
14063
+ break;
14064
+ }
14065
+ }
14066
+ if (flagSetVal) {
14067
+ break;
14068
+ }
14069
+ }
14070
+ }
14071
+ }
14072
+ else {
14073
+ selectReportingEntity.value = "";
14074
+ selectReportingLocation.value = "";
14075
+ }
14076
+ (_t = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _t === void 0 ? void 0 : _t.addEventListener('click', async (ev) => {
14019
14077
  var _a, _b, _c;
14020
14078
  let buttonClick = ev.target;
14021
14079
  buttonClick.innerHTML = "Saving...";
@@ -14154,7 +14212,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14154
14212
  }
14155
14213
  }
14156
14214
  });
14157
- (_v = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _v === void 0 ? void 0 : _v.addEventListener('click', async (ev) => {
14215
+ (_u = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
14158
14216
  var _a, _b;
14159
14217
  let buttonClick = ev.target;
14160
14218
  buttonClick.innerHTML = "Saving...";
@@ -14310,7 +14368,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14310
14368
  else {
14311
14369
  if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
14312
14370
  this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
14313
- (_w = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _w === void 0 ? void 0 : _w.addEventListener('click', async (ev) => {
14371
+ (_v = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _v === void 0 ? void 0 : _v.addEventListener('click', async (ev) => {
14314
14372
  var _a, _b, _c, _f;
14315
14373
  let buttonClick = ev.target;
14316
14374
  buttonClick.innerHTML = "Saving...";
@@ -14713,7 +14771,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14713
14771
  }
14714
14772
  }
14715
14773
  else if (event['reportformat'] != null && event['reportformat'].length > 0) {
14716
- this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_x = event['reportformatschema']) !== null && _x !== void 0 ? _x : "", (_y = event['reportformatvalues']) !== null && _y !== void 0 ? _y : "");
14774
+ this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_w = event['reportformatschema']) !== null && _w !== void 0 ? _w : "", (_x = event['reportformatvalues']) !== null && _x !== void 0 ? _x : "");
14717
14775
  }
14718
14776
  };
14719
14777
  this.renderCalendar = () => {
@@ -6231,7 +6231,8 @@ export class SfIEvents extends LitElement {
6231
6231
  let percentage = inputReportingPercentage.value
6232
6232
 
6233
6233
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
6234
- (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
6234
+ (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
6235
+ (listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
6235
6236
  } else {
6236
6237
  (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
6237
6238
  (listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
@@ -6241,7 +6242,8 @@ export class SfIEvents extends LitElement {
6241
6242
  let percentage = inputReportingPercentage.value
6242
6243
  console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
6243
6244
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
6244
- (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
6245
+ (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
6246
+ (listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
6245
6247
  } else {
6246
6248
  (listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
6247
6249
  (listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
@@ -6274,7 +6276,7 @@ export class SfIEvents extends LitElement {
6274
6276
  continue;
6275
6277
  }
6276
6278
  for (let entity of Object.keys(projectUserMap[country])) {
6277
- if(entity.indexOf(e.target.value) < 0){
6279
+ if (entity.indexOf(e.target.value) < 0) {
6278
6280
  continue;
6279
6281
  }
6280
6282
  for (let location of Object.keys(projectUserMap[country][entity])) {
@@ -6287,8 +6289,34 @@ export class SfIEvents extends LitElement {
6287
6289
  (listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
6288
6290
  selectReportingLocation.value = event.reportedlocations ?? "";
6289
6291
  })
6290
-
6291
- selectReportingLocation.value = event.reportedlocations ?? "";
6292
+ if (event.reportedlocations != null && event.reportedlocations.length > 0) {
6293
+ console.log('setting reportedlocations', event.reportedlocations)
6294
+ for (let country of Object.keys(projectUserMap)) {
6295
+ if (country == "roles") {
6296
+ continue;
6297
+ }
6298
+ for (let entity of Object.keys(projectUserMap[country])) {
6299
+ let flagSetVal = false;
6300
+ for (let location of Object.keys(projectUserMap[country][entity])) {
6301
+ if (event.reportedlocations.indexOf(location) >= 0) {
6302
+ selectReportingEntity.value = entity;
6303
+ const changeEvent = new Event('change', { bubbles: true });
6304
+ selectReportingEntity.dispatchEvent(changeEvent)
6305
+ selectReportingLocation.value = location;
6306
+ flagSetVal = true;
6307
+ break;
6308
+ }
6309
+ }
6310
+ if (flagSetVal) {
6311
+ break;
6312
+ }
6313
+ }
6314
+ }
6315
+ } else {
6316
+ selectReportingEntity.value = "";
6317
+ selectReportingLocation.value = "";
6318
+ }
6319
+
6292
6320
  listReportingContainer.querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
6293
6321
  let buttonClick = ev.target as HTMLButtonElement
6294
6322
  buttonClick.innerHTML = "Saving..."
@@ -6594,7 +6622,7 @@ export class SfIEvents extends LitElement {
6594
6622
  flag = true;
6595
6623
  }
6596
6624
  }
6597
- }else{
6625
+ } else {
6598
6626
  flag = true;
6599
6627
  }
6600
6628
  if (flag === false) {
@@ -8258,7 +8286,7 @@ export class SfIEvents extends LitElement {
8258
8286
  }
8259
8287
  html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
8260
8288
 
8261
- html += '<div class="d-flex align-end">';
8289
+ html += '<div class="d-flex align-end left-sticky">';
8262
8290
  html += '<div class="title-item-date">';
8263
8291
  html += '<label part="input-label">Search In Statute</label><br />'
8264
8292
  html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>'
@@ -8492,7 +8520,7 @@ export class SfIEvents extends LitElement {
8492
8520
  const searchIndex = e.currentTarget.id.split('-')[4];
8493
8521
  const objCountry = events[Object.keys(events)[countryIndex]]
8494
8522
  const statute = Object.keys(objCountry)[searchIndex];
8495
- let csvData = '"ID","Country","Entities","Locations","Statute","Reference","Obligation"\n';
8523
+ let csvData = '"ID","Country","Entities","Locations","Statute","Reference","Obligation Title"\n';
8496
8524
  for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
8497
8525
  const complianceId = Object.keys(objCountry[statute])[j];
8498
8526
  const compliance = objCountry[statute][complianceId];
@@ -8509,7 +8537,7 @@ export class SfIEvents extends LitElement {
8509
8537
  csvData += ('"' + (compliance['locations'] != null && Array.isArray(compliance['locations']) ? compliance['locations'].map((e: string) => e.split(';')[0].replace(/\([^)]*\)/g, "")).join(',') : '') + '",');
8510
8538
  csvData += ('"' + statute + '",');
8511
8539
  csvData += ('"' + data[cols.indexOf('reference')] + '",');
8512
- csvData += ('"' + data[cols.indexOf('obligation')] + '"\n');
8540
+ csvData += ('"' + data[cols.indexOf('obligationtitle')] + '"\n');
8513
8541
  }
8514
8542
  console.log('csvData', csvData);
8515
8543
  const ts = new Date();
@@ -10759,7 +10787,7 @@ export class SfIEvents extends LitElement {
10759
10787
 
10760
10788
  html += '<div class="scroll-x w-100 mobile-only">';
10761
10789
 
10762
- html += '<div class="title-item-date">';
10790
+ html += '<div class="title-item-date hide">';
10763
10791
  html += '<label part="input-label">Search</label><br />'
10764
10792
  html += '<input id="stream-search-mobile" part="input" type="text" autofocus/>'
10765
10793
  html += '</div>';
@@ -10770,7 +10798,7 @@ export class SfIEvents extends LitElement {
10770
10798
  html += '<div class="calendar-left-col-register flex-grow desktop-only flex-col justify-start">';
10771
10799
 
10772
10800
  html += '<div>';
10773
- html += '<div class="title-item-date">';
10801
+ html += '<div class="title-item-date hide">';
10774
10802
  html += '<label part="input-label">Search</label><br />'
10775
10803
  html += '<input id="stream-search" part="input" type="text" autofocus/>'
10776
10804
  html += '</div>';
@@ -14259,7 +14287,7 @@ export class SfIEvents extends LitElement {
14259
14287
  flag = true;
14260
14288
  }
14261
14289
  }
14262
- }else{
14290
+ } else {
14263
14291
  flag = true;
14264
14292
  }
14265
14293
  if (flag === false) {
@@ -18034,7 +18062,8 @@ export class SfIEvents extends LitElement {
18034
18062
  let percentage = inputReportingPercentage.value
18035
18063
 
18036
18064
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
18037
- ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
18065
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
18066
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
18038
18067
  } else {
18039
18068
  ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
18040
18069
  ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
@@ -18044,7 +18073,8 @@ export class SfIEvents extends LitElement {
18044
18073
  let percentage = inputReportingPercentage.value
18045
18074
  console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
18046
18075
  if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
18047
- ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
18076
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
18077
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
18048
18078
  } else {
18049
18079
  ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
18050
18080
  ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
@@ -18077,7 +18107,7 @@ export class SfIEvents extends LitElement {
18077
18107
  continue;
18078
18108
  }
18079
18109
  for (let entity of Object.keys(projectUserMap[country])) {
18080
- if(entity.indexOf(e.target.value) < 0){
18110
+ if (entity.indexOf(e.target.value) < 0) {
18081
18111
  continue;
18082
18112
  }
18083
18113
  for (let location of Object.keys(projectUserMap[country][entity])) {
@@ -18090,8 +18120,34 @@ export class SfIEvents extends LitElement {
18090
18120
  ((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
18091
18121
  selectReportingLocation.value = event.reportedlocations ?? "";
18092
18122
  })
18093
-
18094
- selectReportingLocation.value = event.reportedlocations ?? "";
18123
+ if (event.reportedlocations != null && event.reportedlocations.length > 0) {
18124
+ console.log('setting reportedlocations', event.reportedlocations)
18125
+ for (let country of Object.keys(projectUserMap)) {
18126
+ if (country == "roles") {
18127
+ continue;
18128
+ }
18129
+ for (let entity of Object.keys(projectUserMap[country])) {
18130
+ let flagSetVal = false;
18131
+ for (let location of Object.keys(projectUserMap[country][entity])) {
18132
+ if (event.reportedlocations.indexOf(location) >= 0) {
18133
+ selectReportingEntity.value = entity;
18134
+ const changeEvent = new Event('change', { bubbles: true });
18135
+ selectReportingEntity.dispatchEvent(changeEvent)
18136
+ selectReportingLocation.value = location;
18137
+ flagSetVal = true;
18138
+ break;
18139
+ }
18140
+ }
18141
+ if (flagSetVal) {
18142
+ break;
18143
+ }
18144
+ }
18145
+ }
18146
+ } else {
18147
+ selectReportingEntity.value = "";
18148
+ selectReportingLocation.value = "";
18149
+ }
18150
+
18095
18151
  (this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
18096
18152
  let buttonClick = ev.target as HTMLButtonElement
18097
18153
  buttonClick.innerHTML = "Saving..."
@@ -18441,7 +18497,7 @@ export class SfIEvents extends LitElement {
18441
18497
  flag = true;
18442
18498
  }
18443
18499
  }
18444
- }else{
18500
+ } else {
18445
18501
  flag = true;
18446
18502
  }
18447
18503
  if (flag === false) {