sf-i-events 1.0.918 → 1.0.920
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 +4 -4
- package/package.json +1 -1
- package/sf-i-events.js +117 -21
- package/src/sf-i-events.ts +114 -24
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
|
-
|
|
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
package/sf-i-events.js
CHANGED
|
@@ -850,7 +850,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
850
850
|
|
|
851
851
|
`;
|
|
852
852
|
this.AUTOSAVE_FLAG = true;
|
|
853
|
-
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"];
|
|
853
|
+
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers", "lastmodifiedby", "lastmodifiedtime"];
|
|
854
854
|
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
855
855
|
this.chartSelectedLegend = [];
|
|
856
856
|
this.selectedFilters = null;
|
|
@@ -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
|
|
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
|
-
|
|
3936
|
-
|
|
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
|
-
(
|
|
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
|
-
(
|
|
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, (
|
|
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) => {
|
|
@@ -5648,7 +5677,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5648
5677
|
return [buttonSelectAll, buttonUnselectAll];
|
|
5649
5678
|
};
|
|
5650
5679
|
this.renderRegisterEvents = (events, meta = "", searchCountryIndex = -1, searchIndex = -1, searchVal = "") => {
|
|
5651
|
-
var _a;
|
|
5680
|
+
var _a, _b;
|
|
5652
5681
|
var html = '';
|
|
5653
5682
|
this.csvDataRegisters = '';
|
|
5654
5683
|
let flagUpdateFilters = Object.keys(this.registerFilters).length == 0;
|
|
@@ -5672,6 +5701,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5672
5701
|
});
|
|
5673
5702
|
}
|
|
5674
5703
|
this.tablecols = [];
|
|
5704
|
+
let linesCount = 0;
|
|
5705
|
+
let searchFilterString = "";
|
|
5675
5706
|
if (this.selectedCountryTab >= 0) {
|
|
5676
5707
|
const index = this.selectedCountryTab;
|
|
5677
5708
|
//console.log('indexclicked', index);
|
|
@@ -5679,6 +5710,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5679
5710
|
//console.log('indexclicked', objCountry);
|
|
5680
5711
|
var html = '';
|
|
5681
5712
|
this.csvDataRegisters += '"ID",';
|
|
5713
|
+
linesCount = 0;
|
|
5682
5714
|
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
5683
5715
|
const statute = Object.keys(objCountry)[i];
|
|
5684
5716
|
// this.csvDataRegisters += ('\n\n"' + statute + '"\n\n');
|
|
@@ -5696,7 +5728,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5696
5728
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
5697
5729
|
this.csvDataRegisters += ('\n');
|
|
5698
5730
|
}
|
|
5731
|
+
else {
|
|
5732
|
+
continue;
|
|
5733
|
+
}
|
|
5699
5734
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
5735
|
+
html += '<div class="d-flex flex-col left-sticky">';
|
|
5700
5736
|
html += '<div class="d-flex align-end">';
|
|
5701
5737
|
html += '<div class="title-item-date">';
|
|
5702
5738
|
html += '<label part="input-label">Search In Statute</label><br />';
|
|
@@ -5706,6 +5742,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5706
5742
|
html += '<button id="button-download-statute-' + index + '-' + i + '" part="button" class="button-download-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">download</span> <span>Export</span></button>';
|
|
5707
5743
|
html += '</div>';
|
|
5708
5744
|
html += '</div>';
|
|
5745
|
+
html += '<div id="filter-string" part="filter-string">Test String</div>';
|
|
5746
|
+
html += '</div>';
|
|
5709
5747
|
html += '<table>';
|
|
5710
5748
|
let tableBodyHtml = '';
|
|
5711
5749
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
@@ -5728,6 +5766,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5728
5766
|
if (compliance.hide != null && compliance.hide == true) {
|
|
5729
5767
|
continue;
|
|
5730
5768
|
}
|
|
5769
|
+
linesCount++;
|
|
5731
5770
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
5732
5771
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
5733
5772
|
// html += '<table>';
|
|
@@ -5763,7 +5802,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5763
5802
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
|
|
5764
5803
|
}
|
|
5765
5804
|
entities = entities.slice(0, entities.length - 1);
|
|
5766
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
5805
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + entities + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
5767
5806
|
if (!this.tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
5768
5807
|
this.tablecols.push('entities');
|
|
5769
5808
|
}
|
|
@@ -5781,7 +5820,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5781
5820
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
|
|
5782
5821
|
}
|
|
5783
5822
|
locations = locations.slice(0, locations.length - 1);
|
|
5784
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
5823
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + locations + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
5785
5824
|
if (!this.tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
5786
5825
|
this.tablecols.push('locations');
|
|
5787
5826
|
}
|
|
@@ -5802,19 +5841,30 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5802
5841
|
}
|
|
5803
5842
|
html += '<thead><tr>';
|
|
5804
5843
|
html += '<th class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important"></span></th>';
|
|
5844
|
+
searchFilterString = "";
|
|
5805
5845
|
for (let colName of this.tablecols) {
|
|
5806
5846
|
let allSelected = true;
|
|
5807
5847
|
for (let subfilterObj of Object.keys((_a = this.registerFilters[colName]) !== null && _a !== void 0 ? _a : {})) {
|
|
5808
5848
|
if (this.registerFilters[colName][subfilterObj] == false) {
|
|
5809
5849
|
allSelected = false;
|
|
5850
|
+
for (let subfilterObjVal of Object.keys((_b = this.registerFilters[colName]) !== null && _b !== void 0 ? _b : {})) {
|
|
5851
|
+
if (this.registerFilters[colName][subfilterObjVal] == true) {
|
|
5852
|
+
if (searchFilterString == "") {
|
|
5853
|
+
searchFilterString += subfilterObjVal;
|
|
5854
|
+
}
|
|
5855
|
+
else {
|
|
5856
|
+
searchFilterString += ', ' + subfilterObjVal;
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
}
|
|
5810
5860
|
break;
|
|
5811
5861
|
}
|
|
5812
5862
|
}
|
|
5813
|
-
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>';
|
|
5863
|
+
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="' + (allSelected ? '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>';
|
|
5814
5864
|
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">';
|
|
5815
5865
|
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>`;
|
|
5816
5866
|
for (let [index, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
5817
|
-
console.log('rendering filter', filterKey);
|
|
5867
|
+
// console.log('rendering filter', filterKey);
|
|
5818
5868
|
html += `<div class="filter-input-container d-flex justify-start align-start"><input class="input-select-filter" type="checkbox" ${this.registerFilters[colName][filterKey] == true ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${this.tablecols.indexOf(colName)}-${index}" class="input-select-filter-label" part="input-select-feature-label">${filterKey}</label></div>`;
|
|
5819
5869
|
}
|
|
5820
5870
|
html += '</div></div></th>';
|
|
@@ -5827,8 +5877,25 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5827
5877
|
// html += '</div>';
|
|
5828
5878
|
}
|
|
5829
5879
|
divRegisterList.innerHTML = html;
|
|
5830
|
-
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
5880
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
5831
5881
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
5882
|
+
if (this.selectedRegisterIndex >= 0) {
|
|
5883
|
+
const divFilterString = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelector('#filter-string');
|
|
5884
|
+
let filterString = "";
|
|
5885
|
+
if (searchVal != "" || searchFilterString != "") {
|
|
5886
|
+
filterString = linesCount + " result(s) when ";
|
|
5887
|
+
if (searchVal != "") {
|
|
5888
|
+
filterString += "searched by \"" + searchVal + "\"";
|
|
5889
|
+
if (searchFilterString != "") {
|
|
5890
|
+
filterString += ", filtered by \"" + searchFilterString + "\"";
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
else if (searchFilterString != "") {
|
|
5894
|
+
filterString += "filtered by \"" + searchFilterString + "\"";
|
|
5895
|
+
}
|
|
5896
|
+
}
|
|
5897
|
+
divFilterString.innerHTML = filterString;
|
|
5898
|
+
}
|
|
5832
5899
|
const arrButtonCountries = this._SfRegisterContainer.querySelector('.calendar-right-data-register').querySelectorAll('.button-icon-country');
|
|
5833
5900
|
for (i = 0; i < arrButtonCountries.length; i++) {
|
|
5834
5901
|
const button = Util.clearListeners(arrButtonCountries[i]);
|
|
@@ -7767,7 +7834,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7767
7834
|
var _a, _b;
|
|
7768
7835
|
var html = '';
|
|
7769
7836
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
7770
|
-
html += '<div class="title-item-date">';
|
|
7837
|
+
html += '<div class="title-item-date hide">';
|
|
7771
7838
|
html += '<label part="input-label">Search</label><br />';
|
|
7772
7839
|
html += '<input id="stream-search-mobile" part="input" type="text" autofocus/>';
|
|
7773
7840
|
html += '</div>';
|
|
@@ -7775,7 +7842,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7775
7842
|
html += '<div class="d-flex w-100 flex-col">';
|
|
7776
7843
|
html += '<div class="calendar-left-col-register flex-grow desktop-only flex-col justify-start">';
|
|
7777
7844
|
html += '<div>';
|
|
7778
|
-
html += '<div class="title-item-date">';
|
|
7845
|
+
html += '<div class="title-item-date hide">';
|
|
7779
7846
|
html += '<label part="input-label">Search</label><br />';
|
|
7780
7847
|
html += '<input id="stream-search" part="input" type="text" autofocus/>';
|
|
7781
7848
|
html += '</div>';
|
|
@@ -13392,7 +13459,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13392
13459
|
}
|
|
13393
13460
|
};
|
|
13394
13461
|
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
|
|
13462
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
13396
13463
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
13397
13464
|
let comments, docs, approved, /*dateOfCompletion,*/ makercheckers, docsOptional, documentType;
|
|
13398
13465
|
let entityId = "";
|
|
@@ -13955,6 +14022,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13955
14022
|
let percentage = inputReportingPercentage.value;
|
|
13956
14023
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
13957
14024
|
this._SfDetailContainer.querySelector('#reporting-entity-container').classList.remove('hide');
|
|
14025
|
+
this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
13958
14026
|
}
|
|
13959
14027
|
else {
|
|
13960
14028
|
this._SfDetailContainer.querySelector('#reporting-entity-container').classList.add('hide');
|
|
@@ -13966,6 +14034,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13966
14034
|
console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
|
|
13967
14035
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
13968
14036
|
this._SfDetailContainer.querySelector('#reporting-entity-container').classList.remove('hide');
|
|
14037
|
+
this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
13969
14038
|
}
|
|
13970
14039
|
else {
|
|
13971
14040
|
this._SfDetailContainer.querySelector('#reporting-entity-container').classList.add('hide');
|
|
@@ -14014,8 +14083,35 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14014
14083
|
this._SfDetailContainer.querySelector('#reporting-location-container').classList.remove('hide');
|
|
14015
14084
|
selectReportingLocation.value = (_a = event.reportedlocations) !== null && _a !== void 0 ? _a : "";
|
|
14016
14085
|
});
|
|
14017
|
-
|
|
14018
|
-
|
|
14086
|
+
if (event.reportedlocations != null && event.reportedlocations.length > 0) {
|
|
14087
|
+
console.log('setting reportedlocations', event.reportedlocations);
|
|
14088
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
14089
|
+
if (country == "roles") {
|
|
14090
|
+
continue;
|
|
14091
|
+
}
|
|
14092
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
14093
|
+
let flagSetVal = false;
|
|
14094
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
14095
|
+
if (event.reportedlocations.indexOf(location) >= 0) {
|
|
14096
|
+
selectReportingEntity.value = entity;
|
|
14097
|
+
const changeEvent = new Event('change', { bubbles: true });
|
|
14098
|
+
selectReportingEntity.dispatchEvent(changeEvent);
|
|
14099
|
+
selectReportingLocation.value = location;
|
|
14100
|
+
flagSetVal = true;
|
|
14101
|
+
break;
|
|
14102
|
+
}
|
|
14103
|
+
}
|
|
14104
|
+
if (flagSetVal) {
|
|
14105
|
+
break;
|
|
14106
|
+
}
|
|
14107
|
+
}
|
|
14108
|
+
}
|
|
14109
|
+
}
|
|
14110
|
+
else {
|
|
14111
|
+
selectReportingEntity.value = "";
|
|
14112
|
+
selectReportingLocation.value = "";
|
|
14113
|
+
}
|
|
14114
|
+
(_t = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _t === void 0 ? void 0 : _t.addEventListener('click', async (ev) => {
|
|
14019
14115
|
var _a, _b, _c;
|
|
14020
14116
|
let buttonClick = ev.target;
|
|
14021
14117
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -14154,7 +14250,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14154
14250
|
}
|
|
14155
14251
|
}
|
|
14156
14252
|
});
|
|
14157
|
-
(
|
|
14253
|
+
(_u = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
|
|
14158
14254
|
var _a, _b;
|
|
14159
14255
|
let buttonClick = ev.target;
|
|
14160
14256
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -14310,7 +14406,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14310
14406
|
else {
|
|
14311
14407
|
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
14312
14408
|
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
14313
|
-
(
|
|
14409
|
+
(_v = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _v === void 0 ? void 0 : _v.addEventListener('click', async (ev) => {
|
|
14314
14410
|
var _a, _b, _c, _f;
|
|
14315
14411
|
let buttonClick = ev.target;
|
|
14316
14412
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -14713,7 +14809,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14713
14809
|
}
|
|
14714
14810
|
}
|
|
14715
14811
|
else if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
14716
|
-
this.fetchReportFormat(this._SfDetailContainer, reportformatName, (
|
|
14812
|
+
this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_w = event['reportformatschema']) !== null && _w !== void 0 ? _w : "", (_x = event['reportformatvalues']) !== null && _x !== void 0 ? _x : "");
|
|
14717
14813
|
}
|
|
14718
14814
|
};
|
|
14719
14815
|
this.renderCalendar = () => {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -858,7 +858,7 @@ export class SfIEvents extends LitElement {
|
|
|
858
858
|
|
|
859
859
|
AUTOSAVE_FLAG = true;
|
|
860
860
|
|
|
861
|
-
EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"]
|
|
861
|
+
EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers", "lastmodifiedby", "lastmodifiedtime"]
|
|
862
862
|
|
|
863
863
|
CHARTS_LIST_BY_MODULES: { [key: string]: Array<string> } = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
864
864
|
|
|
@@ -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
|
-
|
|
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) {
|
|
@@ -8223,6 +8251,8 @@ export class SfIEvents extends LitElement {
|
|
|
8223
8251
|
});
|
|
8224
8252
|
}
|
|
8225
8253
|
this.tablecols = []
|
|
8254
|
+
let linesCount = 0;
|
|
8255
|
+
let searchFilterString = ""
|
|
8226
8256
|
if (this.selectedCountryTab >= 0) {
|
|
8227
8257
|
|
|
8228
8258
|
const index = this.selectedCountryTab;
|
|
@@ -8233,6 +8263,7 @@ export class SfIEvents extends LitElement {
|
|
|
8233
8263
|
|
|
8234
8264
|
var html = '';
|
|
8235
8265
|
this.csvDataRegisters += '"ID",';
|
|
8266
|
+
linesCount = 0
|
|
8236
8267
|
for (var i = 0; i < Object.keys(objCountry).length; i++) {
|
|
8237
8268
|
|
|
8238
8269
|
const statute = Object.keys(objCountry)[i];
|
|
@@ -8255,10 +8286,13 @@ export class SfIEvents extends LitElement {
|
|
|
8255
8286
|
}
|
|
8256
8287
|
this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
|
|
8257
8288
|
this.csvDataRegisters += ('\n');
|
|
8289
|
+
} else {
|
|
8290
|
+
continue;
|
|
8258
8291
|
}
|
|
8259
8292
|
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8260
8293
|
|
|
8261
|
-
html += '<div class="d-flex
|
|
8294
|
+
html += '<div class="d-flex flex-col left-sticky">';
|
|
8295
|
+
html += '<div class="d-flex align-end">'
|
|
8262
8296
|
html += '<div class="title-item-date">';
|
|
8263
8297
|
html += '<label part="input-label">Search In Statute</label><br />'
|
|
8264
8298
|
html += '<input id="stream-search-statute-' + index + '-' + i + '" class="stream-search-statute" part="input" type="text" value="' + ((searchCountryIndex == index && searchIndex == i) ? searchVal : "") + '"/>'
|
|
@@ -8267,8 +8301,11 @@ export class SfIEvents extends LitElement {
|
|
|
8267
8301
|
html += '<button id="button-download-statute-' + index + '-' + i + '" part="button" class="button-download-statute d-flex justify-center align-center ml-10"><span class="material-symbols-outlined">download</span> <span>Export</span></button>';
|
|
8268
8302
|
html += '</div>';
|
|
8269
8303
|
html += '</div>';
|
|
8304
|
+
html += '<div id="filter-string" part="filter-string">Test String</div>'
|
|
8305
|
+
html += '</div>';
|
|
8270
8306
|
html += '<table>';
|
|
8271
8307
|
let tableBodyHtml = ''
|
|
8308
|
+
|
|
8272
8309
|
for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
|
|
8273
8310
|
|
|
8274
8311
|
const complianceId = Object.keys(objCountry[statute])[j];
|
|
@@ -8293,6 +8330,7 @@ export class SfIEvents extends LitElement {
|
|
|
8293
8330
|
if (compliance.hide != null && compliance.hide == true) {
|
|
8294
8331
|
continue;
|
|
8295
8332
|
}
|
|
8333
|
+
linesCount++
|
|
8296
8334
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
8297
8335
|
// html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
|
|
8298
8336
|
// html += '<table>';
|
|
@@ -8328,7 +8366,7 @@ export class SfIEvents extends LitElement {
|
|
|
8328
8366
|
entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8329
8367
|
}
|
|
8330
8368
|
entities = entities.slice(0, entities.length - 1)
|
|
8331
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
8369
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + entities + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8332
8370
|
if (!this.tablecols.includes('entities') && !this.EXCLUDE_COLS_FROM_REGS.includes('entities')) {
|
|
8333
8371
|
this.tablecols.push('entities')
|
|
8334
8372
|
}
|
|
@@ -8346,7 +8384,7 @@ export class SfIEvents extends LitElement {
|
|
|
8346
8384
|
locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ','
|
|
8347
8385
|
}
|
|
8348
8386
|
locations = locations.slice(0, locations.length - 1)
|
|
8349
|
-
tableBodyHtml += ('<td class="td-body" part="td-body-register"><
|
|
8387
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-register"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + locations + '" highlight="' + searchVal + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
|
|
8350
8388
|
if (!this.tablecols.includes('locations') && !this.EXCLUDE_COLS_FROM_REGS.includes('locations')) {
|
|
8351
8389
|
this.tablecols.push('locations')
|
|
8352
8390
|
}
|
|
@@ -8367,21 +8405,30 @@ export class SfIEvents extends LitElement {
|
|
|
8367
8405
|
}
|
|
8368
8406
|
html += '<thead><tr>';
|
|
8369
8407
|
html += '<th class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important"></span></th>'
|
|
8370
|
-
|
|
8408
|
+
searchFilterString = ""
|
|
8371
8409
|
for (let colName of this.tablecols) {
|
|
8372
8410
|
let allSelected = true;
|
|
8373
8411
|
for (let subfilterObj of Object.keys(this.registerFilters[colName] ?? {})) {
|
|
8374
8412
|
if (this.registerFilters[colName][subfilterObj] == false) {
|
|
8375
8413
|
allSelected = false;
|
|
8414
|
+
for (let subfilterObjVal of Object.keys(this.registerFilters[colName] ?? {})) {
|
|
8415
|
+
if (this.registerFilters[colName][subfilterObjVal] == true) {
|
|
8416
|
+
if (searchFilterString == "") {
|
|
8417
|
+
searchFilterString += subfilterObjVal
|
|
8418
|
+
} else {
|
|
8419
|
+
searchFilterString += ', ' + subfilterObjVal
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
}
|
|
8376
8423
|
break;
|
|
8377
8424
|
}
|
|
8378
8425
|
}
|
|
8379
8426
|
|
|
8380
|
-
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>'
|
|
8427
|
+
html += '<th class="td-body" part="td-body-register"><div class="d-flex align-start"><span part="' + (allSelected ? 'td-head' : 'td-head-selected') + '" style="' + (allSelected ? '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>'
|
|
8381
8428
|
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">'
|
|
8382
8429
|
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>`
|
|
8383
8430
|
for (let [index, filterKey] of Object.keys(this.registerFilters[colName]).entries()) {
|
|
8384
|
-
console.log('rendering filter', filterKey);
|
|
8431
|
+
// console.log('rendering filter', filterKey);
|
|
8385
8432
|
html += `<div class="filter-input-container d-flex justify-start align-start"><input class="input-select-filter" type="checkbox" ${this.registerFilters[colName][filterKey] == true ? 'checked' : ''} id="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" name="features" part="input-select-feature" value="${filterKey}"></input><label for="input-select-filter-${this.tablecols.indexOf(colName)}-${index}" id="input-select-filter-label-${this.tablecols.indexOf(colName)}-${index}" class="input-select-filter-label" part="input-select-feature-label">${filterKey}</label></div>`
|
|
8386
8433
|
}
|
|
8387
8434
|
html += '</div></div></th>'
|
|
@@ -8397,9 +8444,24 @@ export class SfIEvents extends LitElement {
|
|
|
8397
8444
|
}
|
|
8398
8445
|
|
|
8399
8446
|
divRegisterList!.innerHTML = html;
|
|
8400
|
-
console.log('registerFilters', flagUpdateFilters, this.registerFilters);
|
|
8447
|
+
console.log('registerFilters', flagUpdateFilters, this.registerFilters, html.indexOf('input-select-filter-0-0'));
|
|
8401
8448
|
// console.log('csvdataregisters', this.csvDataRegisters);
|
|
8402
|
-
|
|
8449
|
+
if (this.selectedRegisterIndex >= 0) {
|
|
8450
|
+
const divFilterString = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelector('#filter-string') as HTMLDivElement
|
|
8451
|
+
let filterString = ""
|
|
8452
|
+
if (searchVal != "" || searchFilterString != "") {
|
|
8453
|
+
filterString = linesCount + " result(s) when "
|
|
8454
|
+
if (searchVal != "") {
|
|
8455
|
+
filterString += "searched by \"" + searchVal + "\""
|
|
8456
|
+
if (searchFilterString != "") {
|
|
8457
|
+
filterString += ", filtered by \"" + searchFilterString + "\""
|
|
8458
|
+
}
|
|
8459
|
+
} else if (searchFilterString != "") {
|
|
8460
|
+
filterString += "filtered by \"" + searchFilterString + "\""
|
|
8461
|
+
}
|
|
8462
|
+
}
|
|
8463
|
+
divFilterString.innerHTML = filterString
|
|
8464
|
+
}
|
|
8403
8465
|
const arrButtonCountries = (this._SfRegisterContainer.querySelector('.calendar-right-data-register') as HTMLDivElement).querySelectorAll('.button-icon-country') as NodeListOf<HTMLButtonElement>;
|
|
8404
8466
|
|
|
8405
8467
|
for (i = 0; i < arrButtonCountries.length; i++) {
|
|
@@ -10759,7 +10821,7 @@ export class SfIEvents extends LitElement {
|
|
|
10759
10821
|
|
|
10760
10822
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
10761
10823
|
|
|
10762
|
-
html += '<div class="title-item-date">';
|
|
10824
|
+
html += '<div class="title-item-date hide">';
|
|
10763
10825
|
html += '<label part="input-label">Search</label><br />'
|
|
10764
10826
|
html += '<input id="stream-search-mobile" part="input" type="text" autofocus/>'
|
|
10765
10827
|
html += '</div>';
|
|
@@ -10770,7 +10832,7 @@ export class SfIEvents extends LitElement {
|
|
|
10770
10832
|
html += '<div class="calendar-left-col-register flex-grow desktop-only flex-col justify-start">';
|
|
10771
10833
|
|
|
10772
10834
|
html += '<div>';
|
|
10773
|
-
html += '<div class="title-item-date">';
|
|
10835
|
+
html += '<div class="title-item-date hide">';
|
|
10774
10836
|
html += '<label part="input-label">Search</label><br />'
|
|
10775
10837
|
html += '<input id="stream-search" part="input" type="text" autofocus/>'
|
|
10776
10838
|
html += '</div>';
|
|
@@ -14259,7 +14321,7 @@ export class SfIEvents extends LitElement {
|
|
|
14259
14321
|
flag = true;
|
|
14260
14322
|
}
|
|
14261
14323
|
}
|
|
14262
|
-
}else{
|
|
14324
|
+
} else {
|
|
14263
14325
|
flag = true;
|
|
14264
14326
|
}
|
|
14265
14327
|
if (flag === false) {
|
|
@@ -18034,7 +18096,8 @@ export class SfIEvents extends LitElement {
|
|
|
18034
18096
|
let percentage = inputReportingPercentage.value
|
|
18035
18097
|
|
|
18036
18098
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
18037
|
-
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
|
|
18099
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
|
|
18100
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
18038
18101
|
} else {
|
|
18039
18102
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
|
|
18040
18103
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
|
|
@@ -18044,7 +18107,8 @@ export class SfIEvents extends LitElement {
|
|
|
18044
18107
|
let percentage = inputReportingPercentage.value
|
|
18045
18108
|
console.log('percentage', percentage, inputReportingPercentage, inputReportingPercentage.value);
|
|
18046
18109
|
if (percentage != null && percentage.length > 0 && parseInt(percentage) < 100) {
|
|
18047
|
-
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide')
|
|
18110
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.remove('hide');
|
|
18111
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
18048
18112
|
} else {
|
|
18049
18113
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-entity-container') as HTMLDivElement).classList.add('hide');
|
|
18050
18114
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.add('hide')
|
|
@@ -18077,7 +18141,7 @@ export class SfIEvents extends LitElement {
|
|
|
18077
18141
|
continue;
|
|
18078
18142
|
}
|
|
18079
18143
|
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18080
|
-
if(entity.indexOf(e.target.value) < 0){
|
|
18144
|
+
if (entity.indexOf(e.target.value) < 0) {
|
|
18081
18145
|
continue;
|
|
18082
18146
|
}
|
|
18083
18147
|
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
@@ -18090,8 +18154,34 @@ export class SfIEvents extends LitElement {
|
|
|
18090
18154
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-location-container') as HTMLDivElement).classList.remove('hide')
|
|
18091
18155
|
selectReportingLocation.value = event.reportedlocations ?? "";
|
|
18092
18156
|
})
|
|
18093
|
-
|
|
18094
|
-
|
|
18157
|
+
if (event.reportedlocations != null && event.reportedlocations.length > 0) {
|
|
18158
|
+
console.log('setting reportedlocations', event.reportedlocations)
|
|
18159
|
+
for (let country of Object.keys(projectUserMap)) {
|
|
18160
|
+
if (country == "roles") {
|
|
18161
|
+
continue;
|
|
18162
|
+
}
|
|
18163
|
+
for (let entity of Object.keys(projectUserMap[country])) {
|
|
18164
|
+
let flagSetVal = false;
|
|
18165
|
+
for (let location of Object.keys(projectUserMap[country][entity])) {
|
|
18166
|
+
if (event.reportedlocations.indexOf(location) >= 0) {
|
|
18167
|
+
selectReportingEntity.value = entity;
|
|
18168
|
+
const changeEvent = new Event('change', { bubbles: true });
|
|
18169
|
+
selectReportingEntity.dispatchEvent(changeEvent)
|
|
18170
|
+
selectReportingLocation.value = location;
|
|
18171
|
+
flagSetVal = true;
|
|
18172
|
+
break;
|
|
18173
|
+
}
|
|
18174
|
+
}
|
|
18175
|
+
if (flagSetVal) {
|
|
18176
|
+
break;
|
|
18177
|
+
}
|
|
18178
|
+
}
|
|
18179
|
+
}
|
|
18180
|
+
} else {
|
|
18181
|
+
selectReportingEntity.value = "";
|
|
18182
|
+
selectReportingLocation.value = "";
|
|
18183
|
+
}
|
|
18184
|
+
|
|
18095
18185
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev: any) => {
|
|
18096
18186
|
let buttonClick = ev.target as HTMLButtonElement
|
|
18097
18187
|
buttonClick.innerHTML = "Saving..."
|
|
@@ -18441,7 +18531,7 @@ export class SfIEvents extends LitElement {
|
|
|
18441
18531
|
flag = true;
|
|
18442
18532
|
}
|
|
18443
18533
|
}
|
|
18444
|
-
}else{
|
|
18534
|
+
} else {
|
|
18445
18535
|
flag = true;
|
|
18446
18536
|
}
|
|
18447
18537
|
if (flag === false) {
|