sf-i-events 1.0.780 → 1.0.782
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.d.ts +4 -2
- package/sf-i-events.js +39 -28
- package/src/sf-i-events.ts +42 -31
package/dev/index.html
CHANGED
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
</div>
|
|
639
639
|
|
|
640
640
|
</sf-i-events> -->
|
|
641
|
-
|
|
641
|
+
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Ankur Singhal" userprofileid="010834e8-108e-4a87-b58d-f5b429f184be" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" countryid="4ab8901c-4407-4c4d-a2c7-df1a690aa0a3" myrole="viewer" showregisterexport="false" features="[]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" 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"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
642
642
|
|
|
643
643
|
<div slot="uploader">
|
|
644
644
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
648
648
|
</div>
|
|
649
649
|
|
|
650
|
-
</sf-i-events>
|
|
650
|
+
</sf-i-events>
|
|
651
651
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" 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"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
652
652
|
|
|
653
653
|
<div slot="uploader">
|
|
@@ -658,7 +658,7 @@
|
|
|
658
658
|
</div>
|
|
659
659
|
|
|
660
660
|
</sf-i-events> -->
|
|
661
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" 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"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
661
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" 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"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
662
662
|
|
|
663
663
|
<div slot="uploader">
|
|
664
664
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -667,7 +667,7 @@
|
|
|
667
667
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
668
668
|
</div>
|
|
669
669
|
|
|
670
|
-
</sf-i-events>
|
|
670
|
+
</sf-i-events> -->
|
|
671
671
|
<!-- <sf-i-events projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" mode="onboarding" locations="{"India":{"Telangana":["Corporate Office","Telangana Plant"],"Karnataka":["Prime","Stopak","Wintek","Tools","Conversion"],"Gujarat":["Dahej"],"Dadra and Nagar Haveli and Daman and Diu":["Silvassa"],"Uttarakhand":["Uttarakhand"],"Maharashtra":["Pune"],"Andhra Pradesh":["AP"],"Chhattisgarh":["Chhattisgarh"],"Goa":["Goa"],"Himachal Pradesh":["HP"],"Haryana":["Haryana"],"Jharkhand":["Jharkhand"],"Madhya Pradesh":["MP"],"Odisha":["Odisha"],"Punjab":["Punjab"],"Tamil Nadu":["TN"],"Uttar Pradesh":["UP"],"West Bengal":["WB"]}}" contractstartdate="01/04/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
|
|
672
672
|
|
|
673
673
|
</sf-i-events> -->
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -278,6 +278,8 @@ export declare class SfIEvents extends LitElement {
|
|
|
278
278
|
edate: string;
|
|
279
279
|
lastupdated: string;
|
|
280
280
|
changedOnboardingItemIds: string[];
|
|
281
|
+
selectedCountryIndex: number;
|
|
282
|
+
selectedRegisterIndex: number;
|
|
281
283
|
selectallblock: string;
|
|
282
284
|
static styles: import("lit").CSSResult;
|
|
283
285
|
_SfIEventsC: any;
|
|
@@ -491,7 +493,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
491
493
|
renderStatisticsFilters: (eventsContainer: HTMLDivElement) => void;
|
|
492
494
|
renderSelectAllButtons: () => string;
|
|
493
495
|
attachSelectAllListeners: (eventsContainer: HTMLDivElement, buttonSelect: NodeListOf<HTMLButtonElement>) => HTMLButtonElement[];
|
|
494
|
-
renderRegisterEvents: (events: any) => void;
|
|
496
|
+
renderRegisterEvents: (events: any, meta?: string) => void;
|
|
495
497
|
checkStartDateEarliness: (value: string) => boolean;
|
|
496
498
|
checkEndDateLateness: (value: string) => boolean;
|
|
497
499
|
attachHandlers: (eventContainer: HTMLDivElement, valueStart: string, valueEnd: string) => void;
|
|
@@ -789,7 +791,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
789
791
|
fetchGetMappedCalendar: (year: string) => Promise<any>;
|
|
790
792
|
sleepFunction: (ms: number) => Promise<unknown>;
|
|
791
793
|
renderAppropriateStream: (startDate: string, endDate: string, showGraph?: boolean, showBackgroundButton?: boolean) => void;
|
|
792
|
-
fetchRegisters: (searchString?: string) => Promise<any>;
|
|
794
|
+
fetchRegisters: (searchString?: string, meta?: string, selectedCountry?: string, selectedStatute?: string) => Promise<any>;
|
|
793
795
|
renderWithFeatures: (startDate?: string, endDate?: string, searchString?: string, list?: string, month?: string) => Promise<void>;
|
|
794
796
|
fetchAndYearlyRenderUserCalendar_2: (startDate?: string, endDate?: string, searchString?: string, list?: string, month?: string) => Promise<void>;
|
|
795
797
|
fetchAndRenderNotices: (startDate?: string, endDate?: string, searchString?: string, list?: string, month?: string) => Promise<void>;
|
package/sf-i-events.js
CHANGED
|
@@ -1230,6 +1230,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1230
1230
|
this.edate = "";
|
|
1231
1231
|
this.lastupdated = "";
|
|
1232
1232
|
this.changedOnboardingItemIds = [];
|
|
1233
|
+
this.selectedCountryIndex = 0;
|
|
1234
|
+
this.selectedRegisterIndex = 0;
|
|
1233
1235
|
this.selectallblock = "100";
|
|
1234
1236
|
this.isSelectedLegend = (value) => {
|
|
1235
1237
|
return this.chartSelectedLegend.includes(value);
|
|
@@ -4756,7 +4758,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4756
4758
|
});
|
|
4757
4759
|
return [buttonSelectAll, buttonUnselectAll];
|
|
4758
4760
|
};
|
|
4759
|
-
this.renderRegisterEvents = (events) => {
|
|
4761
|
+
this.renderRegisterEvents = (events, meta = "") => {
|
|
4760
4762
|
var html = '';
|
|
4761
4763
|
this.csvDataRegisters = '';
|
|
4762
4764
|
html += '<div class="d-flex scroll-x w-100p">';
|
|
@@ -4790,7 +4792,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4790
4792
|
html += ('<h3 part="register-section-title-' + (i != 0 ? 'not-selected' : 'selected') + '" class="left-sticky register-statute" id="register-statute-' + i + '">' + statute + '</h3>');
|
|
4791
4793
|
// html += '<div class="w-100p scroll-x '+(i != 0 ? 'hide' : '')+'" id="register-body-'+i+'" >';
|
|
4792
4794
|
// html += '<table>';
|
|
4793
|
-
if (i
|
|
4795
|
+
if (i == this.selectedRegisterIndex && meta == "") {
|
|
4796
|
+
console.log('meta', meta, this.selectedCountryTab);
|
|
4794
4797
|
for (var k = 0; k < JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols).length; k++) {
|
|
4795
4798
|
if (!this.EXCLUDE_COLS_FROM_REGS.includes(JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k].toLowerCase())) {
|
|
4796
4799
|
this.csvDataRegisters += ('"' + JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k] + '",');
|
|
@@ -4806,7 +4809,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4806
4809
|
const data = JSON.parse(compliance.data);
|
|
4807
4810
|
const cols = JSON.parse(compliance.cols);
|
|
4808
4811
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
4809
|
-
html += '<div class="w-100p scroll-x ' + (i !=
|
|
4812
|
+
html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '" part="' + (i != this.selectedRegisterIndex ? 'register-section-title-not-selected' : 'register-section-title-selected') + '" >';
|
|
4810
4813
|
html += '<table>';
|
|
4811
4814
|
html += '<tr>';
|
|
4812
4815
|
html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-' + index + '-' + i + '-' + j + '" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
|
|
@@ -4848,28 +4851,33 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4848
4851
|
const arrRegisterStatutes = this._SfRegisterContainer.querySelector('.calendar-right-data').querySelectorAll('.register-statute');
|
|
4849
4852
|
for (i = 0; i < arrRegisterStatutes.length; i++) {
|
|
4850
4853
|
const button = Util.clearListeners(arrRegisterStatutes[i]);
|
|
4851
|
-
button.addEventListener('click', (e) => {
|
|
4852
|
-
const button = e.currentTarget;
|
|
4854
|
+
button.addEventListener('click', async (e) => {
|
|
4855
|
+
// const button = (e.currentTarget as HTMLDivElement);
|
|
4853
4856
|
const index = e.currentTarget.id.split('-')[2];
|
|
4854
4857
|
console.log('index', index);
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4858
|
+
this.selectedRegisterIndex = index;
|
|
4859
|
+
let selectedCountry = Object.keys(events)[this.selectedCountryTab];
|
|
4860
|
+
let selectedStatute = Object.keys(events[selectedCountry])[index];
|
|
4861
|
+
let tempRegisters = await this.fetchRegisters("", "", selectedCountry, selectedStatute);
|
|
4862
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute];
|
|
4863
|
+
this.renderRegisterEvents(events);
|
|
4864
|
+
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
4865
|
+
// for(let divBody of divBodys){
|
|
4866
|
+
// if(divBody.classList.contains('hide')) {
|
|
4867
|
+
// divBody.classList.remove('hide')
|
|
4868
|
+
// button.setAttribute('part','register-section-title-selected');
|
|
4869
|
+
// } else {
|
|
4870
|
+
// divBody.classList.add('hide')
|
|
4871
|
+
// button.setAttribute('part','register-section-title-not-selected');
|
|
4872
|
+
// }
|
|
4873
|
+
// }
|
|
4866
4874
|
});
|
|
4867
4875
|
}
|
|
4868
4876
|
}
|
|
4869
4877
|
else {
|
|
4870
4878
|
const index = 0;
|
|
4871
4879
|
this.selectedCountryTab = index;
|
|
4872
|
-
this.renderRegisterEvents(events);
|
|
4880
|
+
this.renderRegisterEvents(events, meta);
|
|
4873
4881
|
}
|
|
4874
4882
|
};
|
|
4875
4883
|
this.checkStartDateEarliness = (value) => {
|
|
@@ -6588,8 +6596,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6588
6596
|
html += '</div>';
|
|
6589
6597
|
html += '</div>';
|
|
6590
6598
|
this._SfRegisterContainer.innerHTML = html;
|
|
6591
|
-
const events = await this.fetchRegisters();
|
|
6592
|
-
this.renderRegisterEvents(events);
|
|
6599
|
+
const events = await this.fetchRegisters("", "yes");
|
|
6600
|
+
this.renderRegisterEvents(events, "yes");
|
|
6593
6601
|
(_a = this._SfRegisterContainer.querySelector('#stream-search')) === null || _a === void 0 ? void 0 : _a.addEventListener('keyup', async (ev) => {
|
|
6594
6602
|
//console.log('ev', ev.key);
|
|
6595
6603
|
if (ev.key == "Enter") {
|
|
@@ -8377,6 +8385,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8377
8385
|
return csv;
|
|
8378
8386
|
};
|
|
8379
8387
|
this.renderGraph = (divContainer, pieData, partData, lateData, complianceData, param) => {
|
|
8388
|
+
console.log('rendering graph chart2');
|
|
8380
8389
|
this.clearSelectedGraphParam();
|
|
8381
8390
|
// this.clearSelectedLegend();
|
|
8382
8391
|
this.csvGraphStats = "";
|
|
@@ -14352,7 +14361,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14352
14361
|
animation: {
|
|
14353
14362
|
duration: 0,
|
|
14354
14363
|
onComplete: () => {
|
|
14355
|
-
if (this.chart4 != null) {
|
|
14364
|
+
if (this.chart4 != null && this.chart4.ctx != null) {
|
|
14356
14365
|
if (type == 'bar') {
|
|
14357
14366
|
this.chart4.ctx.font = "bold 10pt 'Helvetica Neue'";
|
|
14358
14367
|
this.chart4.ctx.fillStyle = '#000';
|
|
@@ -14425,7 +14434,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14425
14434
|
}
|
|
14426
14435
|
}
|
|
14427
14436
|
}
|
|
14428
|
-
if (this.chart4 != null) {
|
|
14437
|
+
if (this.chart4 != null && this.chart4.ctx != null) {
|
|
14429
14438
|
this.chart4Base64 = this.chart4.toBase64Image();
|
|
14430
14439
|
}
|
|
14431
14440
|
}
|
|
@@ -14531,7 +14540,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14531
14540
|
animation: {
|
|
14532
14541
|
duration: 0,
|
|
14533
14542
|
onComplete: () => {
|
|
14534
|
-
if (this.chart3 != null) {
|
|
14543
|
+
if (this.chart3 != null && this.chart3.ctx != null) {
|
|
14535
14544
|
if (type == 'bar') {
|
|
14536
14545
|
this.chart3.ctx.font = "bold 10pt 'Helvetica Neue'";
|
|
14537
14546
|
this.chart3.ctx.fillStyle = '#000';
|
|
@@ -14604,7 +14613,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14604
14613
|
}
|
|
14605
14614
|
}
|
|
14606
14615
|
}
|
|
14607
|
-
if (this.chart3 != null) {
|
|
14616
|
+
if (this.chart3 != null && this.chart3.ctx != null) {
|
|
14608
14617
|
this.chart3Base64 = this.chart3.toBase64Image();
|
|
14609
14618
|
}
|
|
14610
14619
|
}
|
|
@@ -14700,6 +14709,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14700
14709
|
if (this.chart2 != null) {
|
|
14701
14710
|
this.chart2.destroy();
|
|
14702
14711
|
}
|
|
14712
|
+
console.log('chart2 context', ctx);
|
|
14703
14713
|
this.chart2 = new Chart(ctx, {
|
|
14704
14714
|
type: type,
|
|
14705
14715
|
data: data,
|
|
@@ -14710,7 +14720,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14710
14720
|
animation: {
|
|
14711
14721
|
duration: 0,
|
|
14712
14722
|
onComplete: () => {
|
|
14713
|
-
if (this.chart2 != null) {
|
|
14723
|
+
if (this.chart2 != null && this.chart2.ctx != null) {
|
|
14724
|
+
console.log('chart 2 ctx', this.chart2);
|
|
14714
14725
|
if (type == 'bar') {
|
|
14715
14726
|
this.chart2.ctx.font = "bold 10pt 'Helvetica Neue'";
|
|
14716
14727
|
this.chart2.ctx.fillStyle = '#000';
|
|
@@ -14773,7 +14784,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14773
14784
|
}
|
|
14774
14785
|
}
|
|
14775
14786
|
}
|
|
14776
|
-
if (this.chart2 != null) {
|
|
14787
|
+
if (this.chart2 != null && this.chart2.ctx != null) {
|
|
14777
14788
|
this.chart2Base64 = this.chart2.toBase64Image();
|
|
14778
14789
|
}
|
|
14779
14790
|
}
|
|
@@ -17802,9 +17813,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17802
17813
|
// this.renderPast(parseInt(this.currentColumnIndex), false);
|
|
17803
17814
|
// }
|
|
17804
17815
|
};
|
|
17805
|
-
this.fetchRegisters = async (searchString = "") => {
|
|
17816
|
+
this.fetchRegisters = async (searchString = "", meta = "", selectedCountry = "", selectedStatute = "") => {
|
|
17806
17817
|
let path = "";
|
|
17807
|
-
path = "
|
|
17818
|
+
path = "getallfunctionevents1";
|
|
17808
17819
|
let url = "https://" + this.apiId + "/" + path;
|
|
17809
17820
|
let locationId = "";
|
|
17810
17821
|
let entityId = "";
|
|
@@ -17815,7 +17826,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17815
17826
|
entityId = this.entityId;
|
|
17816
17827
|
}
|
|
17817
17828
|
//console.log('fetch calendar url', url);
|
|
17818
|
-
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId };
|
|
17829
|
+
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId, meta: meta, country: selectedCountry, statute: selectedStatute };
|
|
17819
17830
|
//console.log('urlbody', url, urlBody);
|
|
17820
17831
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17821
17832
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization));
|
package/src/sf-i-events.ts
CHANGED
|
@@ -1634,7 +1634,11 @@ export class SfIEvents extends LitElement {
|
|
|
1634
1634
|
|
|
1635
1635
|
lastupdated: string = "";
|
|
1636
1636
|
|
|
1637
|
-
changedOnboardingItemIds: string[] = []
|
|
1637
|
+
changedOnboardingItemIds: string[] = [];
|
|
1638
|
+
|
|
1639
|
+
selectedCountryIndex: number = 0;
|
|
1640
|
+
|
|
1641
|
+
selectedRegisterIndex: number = 0;
|
|
1638
1642
|
|
|
1639
1643
|
@property()
|
|
1640
1644
|
selectallblock: string = "100";
|
|
@@ -7304,7 +7308,7 @@ export class SfIEvents extends LitElement {
|
|
|
7304
7308
|
})
|
|
7305
7309
|
return [buttonSelectAll, buttonUnselectAll]
|
|
7306
7310
|
}
|
|
7307
|
-
renderRegisterEvents = (events: any) => {
|
|
7311
|
+
renderRegisterEvents = (events: any, meta: string = "") => {
|
|
7308
7312
|
|
|
7309
7313
|
var html = '';
|
|
7310
7314
|
|
|
@@ -7356,7 +7360,8 @@ export class SfIEvents extends LitElement {
|
|
|
7356
7360
|
// html += '<div class="w-100p scroll-x '+(i != 0 ? 'hide' : '')+'" id="register-body-'+i+'" >';
|
|
7357
7361
|
// html += '<table>';
|
|
7358
7362
|
|
|
7359
|
-
if(i
|
|
7363
|
+
if(i == this.selectedRegisterIndex && meta == "") {
|
|
7364
|
+
console.log('meta', meta, this.selectedCountryTab);
|
|
7360
7365
|
for(var k = 0; k < JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols).length; k++) {
|
|
7361
7366
|
if(!this.EXCLUDE_COLS_FROM_REGS.includes(JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k].toLowerCase())) {
|
|
7362
7367
|
this.csvDataRegisters += ('"' + JSON.parse(objCountry[statute][Object.keys(objCountry[statute])[0]].cols)[k] + '",');
|
|
@@ -7373,7 +7378,7 @@ export class SfIEvents extends LitElement {
|
|
|
7373
7378
|
const data = JSON.parse(compliance.data);
|
|
7374
7379
|
const cols = JSON.parse(compliance.cols);
|
|
7375
7380
|
this.csvDataRegisters += ('"' + complianceId + '",');
|
|
7376
|
-
html += '<div class="w-100p scroll-x '+(i !=
|
|
7381
|
+
html += '<div class="w-100p scroll-x '+(i != this.selectedRegisterIndex ? 'hide' : '')+' register-body-'+i+'" part="' + (i != this.selectedRegisterIndex ? 'register-section-title-not-selected' : 'register-section-title-selected') +'" >';
|
|
7377
7382
|
html += '<table>';
|
|
7378
7383
|
html += '<tr>';
|
|
7379
7384
|
html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-'+index+'-'+i+'-'+j+'" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
|
|
@@ -7428,21 +7433,27 @@ export class SfIEvents extends LitElement {
|
|
|
7428
7433
|
for(i = 0; i < arrRegisterStatutes.length; i++) {
|
|
7429
7434
|
|
|
7430
7435
|
const button = Util.clearListeners(arrRegisterStatutes[i]);
|
|
7431
|
-
button.addEventListener('click', (e: any)=> {
|
|
7436
|
+
button.addEventListener('click', async (e: any)=> {
|
|
7432
7437
|
|
|
7433
|
-
const button = (e.currentTarget as HTMLDivElement);
|
|
7438
|
+
// const button = (e.currentTarget as HTMLDivElement);
|
|
7434
7439
|
const index = e.currentTarget.id.split('-')[2];
|
|
7435
7440
|
console.log('index', index);
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7441
|
+
this.selectedRegisterIndex = index;
|
|
7442
|
+
let selectedCountry = Object.keys(events)[this.selectedCountryTab]
|
|
7443
|
+
let selectedStatute = Object.keys(events[selectedCountry])[index]
|
|
7444
|
+
let tempRegisters = await this.fetchRegisters("","",selectedCountry,selectedStatute);
|
|
7445
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute]
|
|
7446
|
+
this.renderRegisterEvents(events);
|
|
7447
|
+
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
7448
|
+
// for(let divBody of divBodys){
|
|
7449
|
+
// if(divBody.classList.contains('hide')) {
|
|
7450
|
+
// divBody.classList.remove('hide')
|
|
7451
|
+
// button.setAttribute('part','register-section-title-selected');
|
|
7452
|
+
// } else {
|
|
7453
|
+
// divBody.classList.add('hide')
|
|
7454
|
+
// button.setAttribute('part','register-section-title-not-selected');
|
|
7455
|
+
// }
|
|
7456
|
+
// }
|
|
7446
7457
|
|
|
7447
7458
|
});
|
|
7448
7459
|
|
|
@@ -7451,7 +7462,7 @@ export class SfIEvents extends LitElement {
|
|
|
7451
7462
|
} else {
|
|
7452
7463
|
const index = 0;
|
|
7453
7464
|
this.selectedCountryTab = index
|
|
7454
|
-
this.renderRegisterEvents(events);
|
|
7465
|
+
this.renderRegisterEvents(events, meta);
|
|
7455
7466
|
}
|
|
7456
7467
|
|
|
7457
7468
|
}
|
|
@@ -9576,8 +9587,8 @@ export class SfIEvents extends LitElement {
|
|
|
9576
9587
|
|
|
9577
9588
|
(this._SfRegisterContainer as HTMLDivElement).innerHTML = html;
|
|
9578
9589
|
|
|
9579
|
-
const events = await this.fetchRegisters();
|
|
9580
|
-
this.renderRegisterEvents(events);
|
|
9590
|
+
const events = await this.fetchRegisters("","yes");
|
|
9591
|
+
this.renderRegisterEvents(events, "yes");
|
|
9581
9592
|
|
|
9582
9593
|
(this._SfRegisterContainer as HTMLDivElement).querySelector('#stream-search')?.addEventListener('keyup', async (ev: any) => {
|
|
9583
9594
|
//console.log('ev', ev.key);
|
|
@@ -11805,7 +11816,7 @@ export class SfIEvents extends LitElement {
|
|
|
11805
11816
|
}
|
|
11806
11817
|
|
|
11807
11818
|
renderGraph = (divContainer: HTMLDivElement, pieData: any, partData: any, lateData: any, complianceData: any, param: string) => {
|
|
11808
|
-
|
|
11819
|
+
console.log('rendering graph chart2');
|
|
11809
11820
|
this.clearSelectedGraphParam();
|
|
11810
11821
|
// this.clearSelectedLegend();
|
|
11811
11822
|
|
|
@@ -19402,7 +19413,7 @@ export class SfIEvents extends LitElement {
|
|
|
19402
19413
|
duration:0,
|
|
19403
19414
|
onComplete: () => {
|
|
19404
19415
|
|
|
19405
|
-
if(this.chart4 != null) {
|
|
19416
|
+
if(this.chart4 != null && this.chart4.ctx != null) {
|
|
19406
19417
|
|
|
19407
19418
|
if(type == 'bar') {
|
|
19408
19419
|
|
|
@@ -19495,7 +19506,7 @@ export class SfIEvents extends LitElement {
|
|
|
19495
19506
|
|
|
19496
19507
|
|
|
19497
19508
|
}
|
|
19498
|
-
if(this.chart4 != null){
|
|
19509
|
+
if(this.chart4 != null && this.chart4.ctx != null){
|
|
19499
19510
|
this.chart4Base64 = (this.chart4 as Chart).toBase64Image()
|
|
19500
19511
|
}
|
|
19501
19512
|
}
|
|
@@ -19607,7 +19618,7 @@ export class SfIEvents extends LitElement {
|
|
|
19607
19618
|
duration:0,
|
|
19608
19619
|
onComplete: () => {
|
|
19609
19620
|
|
|
19610
|
-
if(this.chart3 != null) {
|
|
19621
|
+
if(this.chart3 != null && this.chart3.ctx != null) {
|
|
19611
19622
|
|
|
19612
19623
|
if(type == 'bar') {
|
|
19613
19624
|
|
|
@@ -19700,7 +19711,7 @@ export class SfIEvents extends LitElement {
|
|
|
19700
19711
|
|
|
19701
19712
|
|
|
19702
19713
|
}
|
|
19703
|
-
if(this.chart3 != null){
|
|
19714
|
+
if(this.chart3 != null && this.chart3.ctx != null){
|
|
19704
19715
|
this.chart3Base64 = (this.chart3 as Chart).toBase64Image();
|
|
19705
19716
|
}
|
|
19706
19717
|
}
|
|
@@ -19800,7 +19811,7 @@ export class SfIEvents extends LitElement {
|
|
|
19800
19811
|
if(this.chart2 != null) {
|
|
19801
19812
|
(this.chart2 as Chart).destroy();
|
|
19802
19813
|
}
|
|
19803
|
-
|
|
19814
|
+
console.log('chart2 context', ctx);
|
|
19804
19815
|
this.chart2 = new Chart(ctx, {
|
|
19805
19816
|
type: type,
|
|
19806
19817
|
data: data,
|
|
@@ -19812,8 +19823,8 @@ export class SfIEvents extends LitElement {
|
|
|
19812
19823
|
duration:0,
|
|
19813
19824
|
onComplete: () => {
|
|
19814
19825
|
|
|
19815
|
-
if(this.chart2 != null) {
|
|
19816
|
-
|
|
19826
|
+
if(this.chart2 != null && this.chart2.ctx != null) {
|
|
19827
|
+
console.log('chart 2 ctx', this.chart2);
|
|
19817
19828
|
if(type == 'bar') {
|
|
19818
19829
|
|
|
19819
19830
|
this.chart2.ctx.font = "bold 10pt 'Helvetica Neue'";
|
|
@@ -19893,7 +19904,7 @@ export class SfIEvents extends LitElement {
|
|
|
19893
19904
|
}
|
|
19894
19905
|
|
|
19895
19906
|
}
|
|
19896
|
-
if(this.chart2 != null){
|
|
19907
|
+
if(this.chart2 != null && this.chart2.ctx != null){
|
|
19897
19908
|
this.chart2Base64 = (this.chart2 as Chart).toBase64Image();
|
|
19898
19909
|
}
|
|
19899
19910
|
}
|
|
@@ -23814,11 +23825,11 @@ export class SfIEvents extends LitElement {
|
|
|
23814
23825
|
// }
|
|
23815
23826
|
}
|
|
23816
23827
|
|
|
23817
|
-
fetchRegisters = async(searchString: string = "") => {
|
|
23828
|
+
fetchRegisters = async(searchString: string = "", meta: string = "", selectedCountry: string = "", selectedStatute: string = "") => {
|
|
23818
23829
|
|
|
23819
23830
|
let path = "";
|
|
23820
23831
|
|
|
23821
|
-
path = "
|
|
23832
|
+
path = "getallfunctionevents1";
|
|
23822
23833
|
|
|
23823
23834
|
let url = "https://"+this.apiId+"/"+ path;
|
|
23824
23835
|
|
|
@@ -23834,7 +23845,7 @@ export class SfIEvents extends LitElement {
|
|
|
23834
23845
|
}
|
|
23835
23846
|
|
|
23836
23847
|
//console.log('fetch calendar url', url);
|
|
23837
|
-
let urlBody : any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId};
|
|
23848
|
+
let urlBody : any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId, meta: meta, country: selectedCountry, statute: selectedStatute};
|
|
23838
23849
|
|
|
23839
23850
|
//console.log('urlbody', url, urlBody);
|
|
23840
23851
|
|