sf-i-events 1.0.781 → 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 +11 -11
- package/package.json +1 -1
- package/sf-i-events.d.ts +4 -2
- package/sf-i-events.js +30 -22
- package/src/sf-i-events.ts +33 -22
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,6 +647,16 @@
|
|
|
647
647
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
648
648
|
</div>
|
|
649
649
|
|
|
650
|
+
</sf-i-events>
|
|
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
|
+
|
|
653
|
+
<div slot="uploader">
|
|
654
|
+
<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>
|
|
655
|
+
</div>
|
|
656
|
+
<div slot="reporting">
|
|
657
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
658
|
+
</div>
|
|
659
|
+
|
|
650
660
|
</sf-i-events> -->
|
|
651
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">
|
|
652
662
|
|
|
@@ -658,16 +668,6 @@
|
|
|
658
668
|
</div>
|
|
659
669
|
|
|
660
670
|
</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="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="functionhead" 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
|
-
|
|
663
|
-
<div slot="uploader">
|
|
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>
|
|
665
|
-
</div>
|
|
666
|
-
<div slot="reporting">
|
|
667
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
668
|
-
</div>
|
|
669
|
-
|
|
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") {
|
|
@@ -17805,9 +17813,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17805
17813
|
// this.renderPast(parseInt(this.currentColumnIndex), false);
|
|
17806
17814
|
// }
|
|
17807
17815
|
};
|
|
17808
|
-
this.fetchRegisters = async (searchString = "") => {
|
|
17816
|
+
this.fetchRegisters = async (searchString = "", meta = "", selectedCountry = "", selectedStatute = "") => {
|
|
17809
17817
|
let path = "";
|
|
17810
|
-
path = "
|
|
17818
|
+
path = "getallfunctionevents1";
|
|
17811
17819
|
let url = "https://" + this.apiId + "/" + path;
|
|
17812
17820
|
let locationId = "";
|
|
17813
17821
|
let entityId = "";
|
|
@@ -17818,7 +17826,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17818
17826
|
entityId = this.entityId;
|
|
17819
17827
|
}
|
|
17820
17828
|
//console.log('fetch calendar url', url);
|
|
17821
|
-
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 };
|
|
17822
17830
|
//console.log('urlbody', url, urlBody);
|
|
17823
17831
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17824
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);
|
|
@@ -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
|
|