sf-i-events 1.0.914 → 1.0.916
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 +14 -29
- package/package.json +1 -1
- package/sf-i-events.js +71 -13
- package/src/sf-i-events.ts +72 -17
package/dev/index.html
CHANGED
|
@@ -829,6 +829,20 @@
|
|
|
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"
|
|
833
|
+
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
834
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
835
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Local Reporter 1"
|
|
836
|
+
userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710"
|
|
837
|
+
projectname="ABC Global" myroles="["reporter"]" eventpreviewfields="["obligation"]"
|
|
838
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
839
|
+
blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
840
|
+
<div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
841
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx"]"
|
|
842
|
+
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
843
|
+
allowdownload="yes"></sf-i-uploader></div>
|
|
844
|
+
<div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
|
|
845
|
+
</sf-i-events>
|
|
832
846
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
833
847
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
834
848
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -859,35 +873,6 @@
|
|
|
859
873
|
</div>
|
|
860
874
|
|
|
861
875
|
</sf-i-events> -->
|
|
862
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
863
|
-
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
864
|
-
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
865
|
-
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
866
|
-
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
867
|
-
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
868
|
-
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
869
|
-
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="pattern"
|
|
870
|
-
username="Neeti Kharbanda" userprofileid="ef467815-de15-4c11-8149-24a3ffad2904"
|
|
871
|
-
projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" projectname="Khaitan"
|
|
872
|
-
countryid="f0e588c1-bc61-4bc9-8db1-10fabe616cc9" selectedcriteria="Country - India" enabledeletelatestreport="true"
|
|
873
|
-
features="[]"
|
|
874
|
-
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
875
|
-
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"}]"
|
|
876
|
-
eventpreviewfields="["obligationtitle"]"
|
|
877
|
-
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
878
|
-
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
879
|
-
|
|
880
|
-
<div slot="uploader">
|
|
881
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
882
|
-
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx"]"
|
|
883
|
-
extract="yes" projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" maxsize="31457280"
|
|
884
|
-
allowdownload="yes"></sf-i-uploader>
|
|
885
|
-
</div>
|
|
886
|
-
<div slot="reporting">
|
|
887
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
888
|
-
</div>
|
|
889
|
-
|
|
890
|
-
</sf-i-events>
|
|
891
876
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
892
877
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
893
878
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -3570,6 +3570,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3570
3570
|
html += '<label part="input-label">Completion Percentage</label>';
|
|
3571
3571
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1" disabled/><br />';
|
|
3572
3572
|
html += '</div>';
|
|
3573
|
+
html += '<div id="reporting-entity-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
3574
|
+
html += '<label part="input-label">Entity</label>';
|
|
3575
|
+
html += '<select id="input-reporter-entity" part="input"></select><br />';
|
|
3576
|
+
html += '</div>';
|
|
3573
3577
|
html += '<div id="reporting-location-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
3574
3578
|
html += '<label part="input-label">Location</label>';
|
|
3575
3579
|
html += '<select id="input-reporter-location" part="input"></select><br />';
|
|
@@ -3627,6 +3631,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3627
3631
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
3628
3632
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
|
|
3629
3633
|
html += '</div>';
|
|
3634
|
+
html += '<div id="reporting-entity-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
3635
|
+
html += '<label part="input-label">Entity</label>';
|
|
3636
|
+
html += '<select id="input-reporter-entity" part="input"></select><br />';
|
|
3637
|
+
html += '</div>';
|
|
3630
3638
|
html += '<div id="reporting-location-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
3631
3639
|
html += '<label part="input-label">Location</label>';
|
|
3632
3640
|
html += '<select id="input-reporter-location" part="input"></select><br />';
|
|
@@ -3874,9 +3882,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3874
3882
|
let percentage = inputReportingPercentage.value;
|
|
3875
3883
|
console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
|
|
3876
3884
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
3877
|
-
listReportingContainer.querySelector('#reporting-
|
|
3885
|
+
listReportingContainer.querySelector('#reporting-entity-container').classList.remove('hide');
|
|
3878
3886
|
}
|
|
3879
3887
|
else {
|
|
3888
|
+
listReportingContainer.querySelector('#reporting-entity-container').classList.add('hide');
|
|
3880
3889
|
listReportingContainer.querySelector('#reporting-location-container').classList.add('hide');
|
|
3881
3890
|
}
|
|
3882
3891
|
if ((percentage != null && parseInt(percentage) == 0) || event.docsOptional.length > 0) {
|
|
@@ -3887,21 +3896,41 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3887
3896
|
}
|
|
3888
3897
|
}, 200);
|
|
3889
3898
|
});
|
|
3899
|
+
let selectReportingEntity = listReportingContainer.querySelector('#input-reporter-entity');
|
|
3890
3900
|
let selectReportingLocation = listReportingContainer.querySelector('#input-reporter-location');
|
|
3891
|
-
|
|
3901
|
+
selectReportingEntity.innerHTML = '';
|
|
3892
3902
|
let projectUserMap = Util.getProjectUsermap();
|
|
3893
3903
|
for (let country of Object.keys(projectUserMap)) {
|
|
3894
3904
|
if (country == "roles") {
|
|
3895
3905
|
continue;
|
|
3896
3906
|
}
|
|
3897
3907
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
selectReportingLocation.add(option);
|
|
3902
|
-
}
|
|
3908
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
3909
|
+
let option = new Option(entityName, entity);
|
|
3910
|
+
selectReportingEntity.add(option);
|
|
3903
3911
|
}
|
|
3904
3912
|
}
|
|
3913
|
+
selectReportingEntity.addEventListener('change', (e) => {
|
|
3914
|
+
var _a;
|
|
3915
|
+
selectReportingLocation.innerHTML = '';
|
|
3916
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
3917
|
+
if (country == "roles") {
|
|
3918
|
+
continue;
|
|
3919
|
+
}
|
|
3920
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
3921
|
+
if (entity.indexOf(e.target.value) < 0) {
|
|
3922
|
+
continue;
|
|
3923
|
+
}
|
|
3924
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
3925
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
3926
|
+
let option = new Option(locationName, location);
|
|
3927
|
+
selectReportingLocation.add(option);
|
|
3928
|
+
}
|
|
3929
|
+
}
|
|
3930
|
+
}
|
|
3931
|
+
listReportingContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
3932
|
+
selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
|
|
3933
|
+
});
|
|
3905
3934
|
selectReportingLocation.value = (_j = event.reportedlocations) !== null && _j !== void 0 ? _j : "";
|
|
3906
3935
|
(_k = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
|
|
3907
3936
|
var _a, _b;
|
|
@@ -4188,6 +4217,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4188
4217
|
}
|
|
4189
4218
|
}
|
|
4190
4219
|
}
|
|
4220
|
+
else {
|
|
4221
|
+
flag = true;
|
|
4222
|
+
}
|
|
4191
4223
|
if (flag === false) {
|
|
4192
4224
|
await this.sleep(1000);
|
|
4193
4225
|
console.log('waiting for docs', docs);
|
|
@@ -10627,6 +10659,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10627
10659
|
}
|
|
10628
10660
|
}
|
|
10629
10661
|
}
|
|
10662
|
+
else {
|
|
10663
|
+
flag = true;
|
|
10664
|
+
}
|
|
10630
10665
|
if (flag === false) {
|
|
10631
10666
|
await this.sleep(1000);
|
|
10632
10667
|
console.log('waiting for docs', docs);
|
|
@@ -13941,21 +13976,41 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13941
13976
|
}
|
|
13942
13977
|
}, 200);
|
|
13943
13978
|
});
|
|
13979
|
+
let selectReportingEntity = this._SfDetailContainer.querySelector('#input-reporter-entity');
|
|
13944
13980
|
let selectReportingLocation = this._SfDetailContainer.querySelector('#input-reporter-location');
|
|
13945
|
-
|
|
13981
|
+
selectReportingEntity.innerHTML = '';
|
|
13946
13982
|
let projectUserMap = Util.getProjectUsermap();
|
|
13947
13983
|
for (let country of Object.keys(projectUserMap)) {
|
|
13948
13984
|
if (country == "roles") {
|
|
13949
13985
|
continue;
|
|
13950
13986
|
}
|
|
13951
13987
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
13952
|
-
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
selectReportingLocation.add(option);
|
|
13956
|
-
}
|
|
13988
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
13989
|
+
let option = new Option(entityName, entity);
|
|
13990
|
+
selectReportingEntity.add(option);
|
|
13957
13991
|
}
|
|
13958
13992
|
}
|
|
13993
|
+
selectReportingEntity.addEventListener('change', (e) => {
|
|
13994
|
+
var _a;
|
|
13995
|
+
selectReportingLocation.innerHTML = '';
|
|
13996
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
13997
|
+
if (country == "roles") {
|
|
13998
|
+
continue;
|
|
13999
|
+
}
|
|
14000
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
14001
|
+
if (entity.indexOf(e.target.value) < 0) {
|
|
14002
|
+
continue;
|
|
14003
|
+
}
|
|
14004
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
14005
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
14006
|
+
let option = new Option(locationName, location);
|
|
14007
|
+
selectReportingLocation.add(option);
|
|
14008
|
+
}
|
|
14009
|
+
}
|
|
14010
|
+
}
|
|
14011
|
+
this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
14012
|
+
selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
|
|
14013
|
+
});
|
|
13959
14014
|
selectReportingLocation.value = (_t = event.reportedlocations) !== null && _t !== void 0 ? _t : "";
|
|
13960
14015
|
(_u = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
|
|
13961
14016
|
var _a, _b, _c;
|
|
@@ -14280,6 +14335,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14280
14335
|
}
|
|
14281
14336
|
}
|
|
14282
14337
|
}
|
|
14338
|
+
else {
|
|
14339
|
+
flag = true;
|
|
14340
|
+
}
|
|
14283
14341
|
if (flag === false) {
|
|
14284
14342
|
await this.sleep(1000);
|
|
14285
14343
|
console.log('waiting for docs', docs);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -5903,6 +5903,10 @@ export class SfIEvents extends LitElement {
|
|
|
5903
5903
|
html += '<label part="input-label">Completion Percentage</label>';
|
|
5904
5904
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1" disabled/><br />';
|
|
5905
5905
|
html += '</div>'
|
|
5906
|
+
html += '<div id="reporting-entity-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
5907
|
+
html += '<label part="input-label">Entity</label>';
|
|
5908
|
+
html += '<select id="input-reporter-entity" part="input"></select><br />';
|
|
5909
|
+
html += '</div>'
|
|
5906
5910
|
html += '<div id="reporting-location-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
5907
5911
|
html += '<label part="input-label">Location</label>';
|
|
5908
5912
|
html += '<select id="input-reporter-location" part="input"></select><br />';
|
|
@@ -5973,6 +5977,10 @@ export class SfIEvents extends LitElement {
|
|
|
5973
5977
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
5974
5978
|
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
|
|
5975
5979
|
html += '</div>'
|
|
5980
|
+
html += '<div id="reporting-entity-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
5981
|
+
html += '<label part="input-label">Entity</label>';
|
|
5982
|
+
html += '<select id="input-reporter-entity" part="input"></select><br />';
|
|
5983
|
+
html += '</div>'
|
|
5976
5984
|
html += '<div id="reporting-location-container" class="d-flex flex-col flex-grow ml-20 hide">';
|
|
5977
5985
|
html += '<label part="input-label">Location</label>';
|
|
5978
5986
|
html += '<select id="input-reporter-location" part="input"></select><br />';
|
|
@@ -6232,8 +6240,9 @@ export class SfIEvents extends LitElement {
|
|
|
6232
6240
|
let percentage = inputReportingPercentage.value
|
|
6233
6241
|
console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
|
|
6234
6242
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
6235
|
-
(listReportingContainer.querySelector('#reporting-
|
|
6243
|
+
(listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
|
|
6236
6244
|
} else {
|
|
6245
|
+
(listReportingContainer.querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
|
|
6237
6246
|
(listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
|
|
6238
6247
|
}
|
|
6239
6248
|
if ((percentage != null && parseInt(percentage) == 0) || event.docsOptional.length > 0) {
|
|
@@ -6243,21 +6252,41 @@ export class SfIEvents extends LitElement {
|
|
|
6243
6252
|
}
|
|
6244
6253
|
}, 200);
|
|
6245
6254
|
})
|
|
6255
|
+
let selectReportingEntity = listReportingContainer.querySelector('#input-reporter-entity') as HTMLSelectElement;
|
|
6246
6256
|
let selectReportingLocation = listReportingContainer.querySelector('#input-reporter-location') as HTMLSelectElement;
|
|
6247
|
-
|
|
6257
|
+
selectReportingEntity.innerHTML = '';
|
|
6248
6258
|
let projectUserMap = Util.getProjectUsermap()
|
|
6249
6259
|
for (let country of Object.keys(projectUserMap)) {
|
|
6250
6260
|
if (country == "roles") {
|
|
6251
6261
|
continue;
|
|
6252
6262
|
}
|
|
6253
6263
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
selectReportingLocation.add(option);
|
|
6258
|
-
}
|
|
6264
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
6265
|
+
let option = new Option(entityName, entity)
|
|
6266
|
+
selectReportingEntity.add(option);
|
|
6259
6267
|
}
|
|
6260
6268
|
}
|
|
6269
|
+
selectReportingEntity.addEventListener('change', (e: any) => {
|
|
6270
|
+
selectReportingLocation.innerHTML = ''
|
|
6271
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
6272
|
+
if (country == "roles") {
|
|
6273
|
+
continue;
|
|
6274
|
+
}
|
|
6275
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
6276
|
+
if(entity.indexOf(e.target.value) < 0){
|
|
6277
|
+
continue;
|
|
6278
|
+
}
|
|
6279
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
6280
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
6281
|
+
let option = new Option(locationName, location)
|
|
6282
|
+
selectReportingLocation.add(option);
|
|
6283
|
+
}
|
|
6284
|
+
}
|
|
6285
|
+
}
|
|
6286
|
+
(listReportingContainer.querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
6287
|
+
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
6288
|
+
})
|
|
6289
|
+
|
|
6261
6290
|
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
6262
6291
|
listReportingContainer.querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
|
|
6263
6292
|
let buttonClick = ev.target as HTMLButtonElement
|
|
@@ -6564,6 +6593,8 @@ export class SfIEvents extends LitElement {
|
|
|
6564
6593
|
flag = true;
|
|
6565
6594
|
}
|
|
6566
6595
|
}
|
|
6596
|
+
}else{
|
|
6597
|
+
flag = true;
|
|
6567
6598
|
}
|
|
6568
6599
|
if (flag === false) {
|
|
6569
6600
|
await this.sleep(1000);
|
|
@@ -8248,7 +8279,7 @@ export class SfIEvents extends LitElement {
|
|
|
8248
8279
|
if (!this.tablecols.includes('ID') && !this.EXCLUDE_COLS_FROM_REGS.includes('ID')) {
|
|
8249
8280
|
this.tablecols.push('ID')
|
|
8250
8281
|
}
|
|
8251
|
-
|
|
8282
|
+
|
|
8252
8283
|
for (let col of cols) {
|
|
8253
8284
|
if (!this.tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
|
|
8254
8285
|
this.tablecols.push(col)
|
|
@@ -8344,7 +8375,7 @@ export class SfIEvents extends LitElement {
|
|
|
8344
8375
|
break;
|
|
8345
8376
|
}
|
|
8346
8377
|
}
|
|
8347
|
-
|
|
8378
|
+
|
|
8348
8379
|
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="padding-left: 0px !important">' + colName + '</span><div class="filter-button-container ml-10"><button part="' + (allSelected ? 'col-icon' : 'col-icon-selected') + '" id="filter-button-' + this.tablecols.indexOf(colName) + '" class="filter-button material-symbols-outlined">filter_list</button>'
|
|
8349
8380
|
html += '<div id="filter-list-container-' + this.tablecols.indexOf(colName) + '" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">'
|
|
8350
8381
|
html += `<div id="filter-label-container-${this.tablecols.indexOf(colName)}" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><div class="d-flex align-center"><input class="input-select-filter" type="checkbox" ${allSelected ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-all" name="features" part="input-select-feature" value="all-${colName}"></input><label class="filter-label" part="filter-label" for="input-select-filter-${this.tablecols.indexOf(colName)}-all">All</label></div><button id="button-submit-filters-${this.tablecols.indexOf(colName)}" part="col-option-icon" class="button-submit-filters material-icons invisible">check</button></div>`
|
|
@@ -8481,7 +8512,7 @@ export class SfIEvents extends LitElement {
|
|
|
8481
8512
|
}
|
|
8482
8513
|
console.log('csvData', csvData);
|
|
8483
8514
|
const ts = new Date();
|
|
8484
|
-
let fileName = 'register_' + statute.replace(/ /g,'_').slice(0, 25) + '_' + ts + '.xlsx'
|
|
8515
|
+
let fileName = 'register_' + statute.replace(/ /g, '_').slice(0, 25) + '_' + ts + '.xlsx'
|
|
8485
8516
|
Util.downloadExcelFromCSV(csvData, fileName, "Register Export", this.projectName);
|
|
8486
8517
|
})
|
|
8487
8518
|
}
|
|
@@ -8592,7 +8623,7 @@ export class SfIEvents extends LitElement {
|
|
|
8592
8623
|
}
|
|
8593
8624
|
}
|
|
8594
8625
|
if (JSON.stringify(compliance).toLowerCase().includes(searchVal.toLowerCase())) {
|
|
8595
|
-
if(flagFilter){
|
|
8626
|
+
if (flagFilter) {
|
|
8596
8627
|
events[Object.keys(events)[index]][statute][complianceId].hide = false;
|
|
8597
8628
|
}
|
|
8598
8629
|
} else {
|
|
@@ -14227,6 +14258,8 @@ export class SfIEvents extends LitElement {
|
|
|
14227
14258
|
flag = true;
|
|
14228
14259
|
}
|
|
14229
14260
|
}
|
|
14261
|
+
}else{
|
|
14262
|
+
flag = true;
|
|
14230
14263
|
}
|
|
14231
14264
|
if (flag === false) {
|
|
14232
14265
|
await this.sleep(1000);
|
|
@@ -18020,21 +18053,41 @@ export class SfIEvents extends LitElement {
|
|
|
18020
18053
|
}
|
|
18021
18054
|
}, 200);
|
|
18022
18055
|
})
|
|
18056
|
+
let selectReportingEntity = (this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-entity') as HTMLSelectElement;
|
|
18023
18057
|
let selectReportingLocation = (this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-location') as HTMLSelectElement;
|
|
18024
|
-
|
|
18058
|
+
selectReportingEntity.innerHTML = '';
|
|
18025
18059
|
let projectUserMap = Util.getProjectUsermap()
|
|
18026
18060
|
for (let country of Object.keys(projectUserMap)) {
|
|
18027
18061
|
if (country == "roles") {
|
|
18028
18062
|
continue;
|
|
18029
18063
|
}
|
|
18030
18064
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
selectReportingLocation.add(option);
|
|
18035
|
-
}
|
|
18065
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
18066
|
+
let option = new Option(entityName, entity)
|
|
18067
|
+
selectReportingEntity.add(option);
|
|
18036
18068
|
}
|
|
18037
18069
|
}
|
|
18070
|
+
selectReportingEntity.addEventListener('change', (e: any) => {
|
|
18071
|
+
selectReportingLocation.innerHTML = ''
|
|
18072
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
18073
|
+
if (country == "roles") {
|
|
18074
|
+
continue;
|
|
18075
|
+
}
|
|
18076
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18077
|
+
if(entity.indexOf(e.target.value) < 0){
|
|
18078
|
+
continue;
|
|
18079
|
+
}
|
|
18080
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
18081
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
18082
|
+
let option = new Option(locationName, location)
|
|
18083
|
+
selectReportingLocation.add(option);
|
|
18084
|
+
}
|
|
18085
|
+
}
|
|
18086
|
+
}
|
|
18087
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
18088
|
+
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
18089
|
+
})
|
|
18090
|
+
|
|
18038
18091
|
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
18039
18092
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
|
|
18040
18093
|
let buttonClick = ev.target as HTMLButtonElement
|
|
@@ -18385,6 +18438,8 @@ export class SfIEvents extends LitElement {
|
|
|
18385
18438
|
flag = true;
|
|
18386
18439
|
}
|
|
18387
18440
|
}
|
|
18441
|
+
}else{
|
|
18442
|
+
flag = true;
|
|
18388
18443
|
}
|
|
18389
18444
|
if (flag === false) {
|
|
18390
18445
|
await this.sleep(1000);
|