sf-i-events 1.0.914 → 1.0.915
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 +1 -30
- package/package.json +1 -1
- package/sf-i-events.js +62 -13
- package/src/sf-i-events.ts +66 -17
package/dev/index.html
CHANGED
|
@@ -829,7 +829,7 @@
|
|
|
829
829
|
disablesignoff="yes" disableclientresponse="yes">
|
|
830
830
|
|
|
831
831
|
</sf-i-events> -->
|
|
832
|
-
|
|
832
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
833
833
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
834
834
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
835
835
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -858,35 +858,6 @@
|
|
|
858
858
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
859
859
|
</div>
|
|
860
860
|
|
|
861
|
-
</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
861
|
</sf-i-events>
|
|
891
862
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
892
863
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
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;
|
|
@@ -13941,21 +13970,41 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13941
13970
|
}
|
|
13942
13971
|
}, 200);
|
|
13943
13972
|
});
|
|
13973
|
+
let selectReportingEntity = this._SfDetailContainer.querySelector('#input-reporter-entity');
|
|
13944
13974
|
let selectReportingLocation = this._SfDetailContainer.querySelector('#input-reporter-location');
|
|
13945
|
-
|
|
13975
|
+
selectReportingEntity.innerHTML = '';
|
|
13946
13976
|
let projectUserMap = Util.getProjectUsermap();
|
|
13947
13977
|
for (let country of Object.keys(projectUserMap)) {
|
|
13948
13978
|
if (country == "roles") {
|
|
13949
13979
|
continue;
|
|
13950
13980
|
}
|
|
13951
13981
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
13952
|
-
|
|
13953
|
-
|
|
13954
|
-
|
|
13955
|
-
selectReportingLocation.add(option);
|
|
13956
|
-
}
|
|
13982
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
13983
|
+
let option = new Option(entityName, entity);
|
|
13984
|
+
selectReportingEntity.add(option);
|
|
13957
13985
|
}
|
|
13958
13986
|
}
|
|
13987
|
+
selectReportingEntity.addEventListener('change', (e) => {
|
|
13988
|
+
var _a;
|
|
13989
|
+
selectReportingLocation.innerHTML = '';
|
|
13990
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
13991
|
+
if (country == "roles") {
|
|
13992
|
+
continue;
|
|
13993
|
+
}
|
|
13994
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
13995
|
+
if (entity.indexOf(e.target.value) < 0) {
|
|
13996
|
+
continue;
|
|
13997
|
+
}
|
|
13998
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
13999
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "");
|
|
14000
|
+
let option = new Option(locationName, location);
|
|
14001
|
+
selectReportingLocation.add(option);
|
|
14002
|
+
}
|
|
14003
|
+
}
|
|
14004
|
+
}
|
|
14005
|
+
this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
14006
|
+
selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
|
|
14007
|
+
});
|
|
13959
14008
|
selectReportingLocation.value = (_t = event.reportedlocations) !== null && _t !== void 0 ? _t : "";
|
|
13960
14009
|
(_u = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
|
|
13961
14010
|
var _a, _b, _c;
|
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
|
|
@@ -8248,7 +8277,7 @@ export class SfIEvents extends LitElement {
|
|
|
8248
8277
|
if (!this.tablecols.includes('ID') && !this.EXCLUDE_COLS_FROM_REGS.includes('ID')) {
|
|
8249
8278
|
this.tablecols.push('ID')
|
|
8250
8279
|
}
|
|
8251
|
-
|
|
8280
|
+
|
|
8252
8281
|
for (let col of cols) {
|
|
8253
8282
|
if (!this.tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
|
|
8254
8283
|
this.tablecols.push(col)
|
|
@@ -8344,7 +8373,7 @@ export class SfIEvents extends LitElement {
|
|
|
8344
8373
|
break;
|
|
8345
8374
|
}
|
|
8346
8375
|
}
|
|
8347
|
-
|
|
8376
|
+
|
|
8348
8377
|
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
8378
|
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
8379
|
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 +8510,7 @@ export class SfIEvents extends LitElement {
|
|
|
8481
8510
|
}
|
|
8482
8511
|
console.log('csvData', csvData);
|
|
8483
8512
|
const ts = new Date();
|
|
8484
|
-
let fileName = 'register_' + statute.replace(/ /g,'_').slice(0, 25) + '_' + ts + '.xlsx'
|
|
8513
|
+
let fileName = 'register_' + statute.replace(/ /g, '_').slice(0, 25) + '_' + ts + '.xlsx'
|
|
8485
8514
|
Util.downloadExcelFromCSV(csvData, fileName, "Register Export", this.projectName);
|
|
8486
8515
|
})
|
|
8487
8516
|
}
|
|
@@ -8592,7 +8621,7 @@ export class SfIEvents extends LitElement {
|
|
|
8592
8621
|
}
|
|
8593
8622
|
}
|
|
8594
8623
|
if (JSON.stringify(compliance).toLowerCase().includes(searchVal.toLowerCase())) {
|
|
8595
|
-
if(flagFilter){
|
|
8624
|
+
if (flagFilter) {
|
|
8596
8625
|
events[Object.keys(events)[index]][statute][complianceId].hide = false;
|
|
8597
8626
|
}
|
|
8598
8627
|
} else {
|
|
@@ -18020,21 +18049,41 @@ export class SfIEvents extends LitElement {
|
|
|
18020
18049
|
}
|
|
18021
18050
|
}, 200);
|
|
18022
18051
|
})
|
|
18052
|
+
let selectReportingEntity = (this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-entity') as HTMLSelectElement;
|
|
18023
18053
|
let selectReportingLocation = (this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-location') as HTMLSelectElement;
|
|
18024
|
-
|
|
18054
|
+
selectReportingEntity.innerHTML = '';
|
|
18025
18055
|
let projectUserMap = Util.getProjectUsermap()
|
|
18026
18056
|
for (let country of Object.keys(projectUserMap)) {
|
|
18027
18057
|
if (country == "roles") {
|
|
18028
18058
|
continue;
|
|
18029
18059
|
}
|
|
18030
18060
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
selectReportingLocation.add(option);
|
|
18035
|
-
}
|
|
18061
|
+
let entityName = entity.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
18062
|
+
let option = new Option(entityName, entity)
|
|
18063
|
+
selectReportingEntity.add(option);
|
|
18036
18064
|
}
|
|
18037
18065
|
}
|
|
18066
|
+
selectReportingEntity.addEventListener('change', (e: any) => {
|
|
18067
|
+
selectReportingLocation.innerHTML = ''
|
|
18068
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
18069
|
+
if (country == "roles") {
|
|
18070
|
+
continue;
|
|
18071
|
+
}
|
|
18072
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18073
|
+
if(entity.indexOf(e.target.value) < 0){
|
|
18074
|
+
continue;
|
|
18075
|
+
}
|
|
18076
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
18077
|
+
let locationName = location.split(';')[0].replace(/ *\([^)]*\) */g, "")
|
|
18078
|
+
let option = new Option(locationName, location)
|
|
18079
|
+
selectReportingLocation.add(option);
|
|
18080
|
+
}
|
|
18081
|
+
}
|
|
18082
|
+
}
|
|
18083
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
18084
|
+
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
18085
|
+
})
|
|
18086
|
+
|
|
18038
18087
|
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
18039
18088
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
|
|
18040
18089
|
let buttonClick = ev.target as HTMLButtonElement
|