sf-i-events 1.0.781 → 1.0.783
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 +41 -23
- package/src/sf-i-events.ts +44 -26
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="true" 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,40 @@ 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
|
+
console.log('registerevents', Object.keys(events[selectedCountry][selectedStatute]).length);
|
|
4862
|
+
if (Object.keys(events[selectedCountry][selectedStatute]).length == 0) {
|
|
4863
|
+
let tempRegisters = await this.fetchRegisters("", "", selectedCountry, selectedStatute);
|
|
4864
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute];
|
|
4865
|
+
}
|
|
4866
|
+
this.renderRegisterEvents(events);
|
|
4867
|
+
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
4868
|
+
// for(let divBody of divBodys){
|
|
4869
|
+
// if(divBody.classList.contains('hide')) {
|
|
4870
|
+
// divBody.classList.remove('hide')
|
|
4871
|
+
// button.setAttribute('part','register-section-title-selected');
|
|
4872
|
+
// } else {
|
|
4873
|
+
// divBody.classList.add('hide')
|
|
4874
|
+
// button.setAttribute('part','register-section-title-not-selected');
|
|
4875
|
+
// }
|
|
4876
|
+
// }
|
|
4866
4877
|
});
|
|
4867
4878
|
}
|
|
4879
|
+
const registerStatute = this._SfRegisterContainer.querySelector('.calendar-right-data').querySelector('#register-statute-' + this.selectedRegisterIndex);
|
|
4880
|
+
if (registerStatute != null) {
|
|
4881
|
+
registerStatute.scrollIntoView();
|
|
4882
|
+
}
|
|
4868
4883
|
}
|
|
4869
4884
|
else {
|
|
4870
4885
|
const index = 0;
|
|
4871
4886
|
this.selectedCountryTab = index;
|
|
4872
|
-
this.renderRegisterEvents(events);
|
|
4887
|
+
this.renderRegisterEvents(events, meta);
|
|
4873
4888
|
}
|
|
4874
4889
|
};
|
|
4875
4890
|
this.checkStartDateEarliness = (value) => {
|
|
@@ -6588,8 +6603,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6588
6603
|
html += '</div>';
|
|
6589
6604
|
html += '</div>';
|
|
6590
6605
|
this._SfRegisterContainer.innerHTML = html;
|
|
6591
|
-
const events = await this.fetchRegisters();
|
|
6592
|
-
this.renderRegisterEvents(events);
|
|
6606
|
+
const events = await this.fetchRegisters("", "yes");
|
|
6607
|
+
this.renderRegisterEvents(events, "yes");
|
|
6593
6608
|
(_a = this._SfRegisterContainer.querySelector('#stream-search')) === null || _a === void 0 ? void 0 : _a.addEventListener('keyup', async (ev) => {
|
|
6594
6609
|
//console.log('ev', ev.key);
|
|
6595
6610
|
if (ev.key == "Enter") {
|
|
@@ -6598,7 +6613,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6598
6613
|
this.renderRegisterEvents(events);
|
|
6599
6614
|
}
|
|
6600
6615
|
});
|
|
6601
|
-
(_b = this._SfRegisterContainer.querySelector('#button-download')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', () => {
|
|
6616
|
+
(_b = this._SfRegisterContainer.querySelector('#button-download')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
6617
|
+
let tempEvents = await this.fetchRegisters("", "all", "", "");
|
|
6618
|
+
this.renderRegisterEvents(tempEvents, "all");
|
|
6602
6619
|
const ts = new Date();
|
|
6603
6620
|
console.log(this.csvDataRegisters);
|
|
6604
6621
|
const blob = new Blob([this.csvDataRegisters], { type: 'text/csv' });
|
|
@@ -17805,9 +17822,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17805
17822
|
// this.renderPast(parseInt(this.currentColumnIndex), false);
|
|
17806
17823
|
// }
|
|
17807
17824
|
};
|
|
17808
|
-
this.fetchRegisters = async (searchString = "") => {
|
|
17825
|
+
this.fetchRegisters = async (searchString = "", meta = "", selectedCountry = "", selectedStatute = "") => {
|
|
17809
17826
|
let path = "";
|
|
17810
|
-
path = "
|
|
17827
|
+
path = "getallfunctionevents1";
|
|
17811
17828
|
let url = "https://" + this.apiId + "/" + path;
|
|
17812
17829
|
let locationId = "";
|
|
17813
17830
|
let entityId = "";
|
|
@@ -17818,7 +17835,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17818
17835
|
entityId = this.entityId;
|
|
17819
17836
|
}
|
|
17820
17837
|
//console.log('fetch calendar url', url);
|
|
17821
|
-
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId };
|
|
17838
|
+
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "searchstring": searchString, "locationid": locationId, "entityid": entityId, meta: meta, country: selectedCountry, statute: selectedStatute };
|
|
17822
17839
|
//console.log('urlbody', url, urlBody);
|
|
17823
17840
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17824
17841
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization));
|
|
@@ -19394,6 +19411,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19394
19411
|
super.connectedCallback();
|
|
19395
19412
|
}
|
|
19396
19413
|
render() {
|
|
19414
|
+
console.log('rendering', this.mode);
|
|
19397
19415
|
if (this.mode == "rcmnotifications") {
|
|
19398
19416
|
return html `
|
|
19399
19417
|
|
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,30 +7433,42 @@ 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
|
+
console.log('registerevents', Object.keys(events[selectedCountry][selectedStatute]).length)
|
|
7445
|
+
if(Object.keys(events[selectedCountry][selectedStatute]).length == 0){
|
|
7446
|
+
let tempRegisters = await this.fetchRegisters("","",selectedCountry,selectedStatute);
|
|
7447
|
+
events[selectedCountry][selectedStatute] = tempRegisters[selectedCountry][selectedStatute]
|
|
7448
|
+
}
|
|
7449
|
+
this.renderRegisterEvents(events);
|
|
7450
|
+
// const divBodys = ((this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelectorAll('.register-body-'+ index) as NodeListOf<HTMLDivElement>);
|
|
7451
|
+
// for(let divBody of divBodys){
|
|
7452
|
+
// if(divBody.classList.contains('hide')) {
|
|
7453
|
+
// divBody.classList.remove('hide')
|
|
7454
|
+
// button.setAttribute('part','register-section-title-selected');
|
|
7455
|
+
// } else {
|
|
7456
|
+
// divBody.classList.add('hide')
|
|
7457
|
+
// button.setAttribute('part','register-section-title-not-selected');
|
|
7458
|
+
// }
|
|
7459
|
+
// }
|
|
7446
7460
|
|
|
7447
7461
|
});
|
|
7448
7462
|
|
|
7449
7463
|
}
|
|
7450
|
-
|
|
7464
|
+
const registerStatute = (this._SfRegisterContainer.querySelector('.calendar-right-data') as HTMLDivElement).querySelector('#register-statute-' + this.selectedRegisterIndex) as HTMLDivElement;
|
|
7465
|
+
if(registerStatute != null){
|
|
7466
|
+
registerStatute.scrollIntoView();
|
|
7467
|
+
}
|
|
7451
7468
|
} else {
|
|
7452
7469
|
const index = 0;
|
|
7453
7470
|
this.selectedCountryTab = index
|
|
7454
|
-
this.renderRegisterEvents(events);
|
|
7471
|
+
this.renderRegisterEvents(events, meta);
|
|
7455
7472
|
}
|
|
7456
7473
|
|
|
7457
7474
|
}
|
|
@@ -9576,8 +9593,8 @@ export class SfIEvents extends LitElement {
|
|
|
9576
9593
|
|
|
9577
9594
|
(this._SfRegisterContainer as HTMLDivElement).innerHTML = html;
|
|
9578
9595
|
|
|
9579
|
-
const events = await this.fetchRegisters();
|
|
9580
|
-
this.renderRegisterEvents(events);
|
|
9596
|
+
const events = await this.fetchRegisters("","yes");
|
|
9597
|
+
this.renderRegisterEvents(events, "yes");
|
|
9581
9598
|
|
|
9582
9599
|
(this._SfRegisterContainer as HTMLDivElement).querySelector('#stream-search')?.addEventListener('keyup', async (ev: any) => {
|
|
9583
9600
|
//console.log('ev', ev.key);
|
|
@@ -9588,8 +9605,9 @@ export class SfIEvents extends LitElement {
|
|
|
9588
9605
|
}
|
|
9589
9606
|
});
|
|
9590
9607
|
|
|
9591
|
-
(this._SfRegisterContainer as HTMLDivElement).querySelector('#button-download')?.addEventListener('click', () => {
|
|
9592
|
-
|
|
9608
|
+
(this._SfRegisterContainer as HTMLDivElement).querySelector('#button-download')?.addEventListener('click', async() => {
|
|
9609
|
+
let tempEvents = await this.fetchRegisters("","all","","")
|
|
9610
|
+
this.renderRegisterEvents(tempEvents,"all");
|
|
9593
9611
|
const ts = new Date();
|
|
9594
9612
|
console.log(this.csvDataRegisters);
|
|
9595
9613
|
const blob = new Blob([this.csvDataRegisters], { type: 'text/csv' });
|
|
@@ -23814,11 +23832,11 @@ export class SfIEvents extends LitElement {
|
|
|
23814
23832
|
// }
|
|
23815
23833
|
}
|
|
23816
23834
|
|
|
23817
|
-
fetchRegisters = async(searchString: string = "") => {
|
|
23835
|
+
fetchRegisters = async(searchString: string = "", meta: string = "", selectedCountry: string = "", selectedStatute: string = "") => {
|
|
23818
23836
|
|
|
23819
23837
|
let path = "";
|
|
23820
23838
|
|
|
23821
|
-
path = "
|
|
23839
|
+
path = "getallfunctionevents1";
|
|
23822
23840
|
|
|
23823
23841
|
let url = "https://"+this.apiId+"/"+ path;
|
|
23824
23842
|
|
|
@@ -23834,7 +23852,7 @@ export class SfIEvents extends LitElement {
|
|
|
23834
23852
|
}
|
|
23835
23853
|
|
|
23836
23854
|
//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};
|
|
23855
|
+
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
23856
|
|
|
23839
23857
|
//console.log('urlbody', url, urlBody);
|
|
23840
23858
|
|
|
@@ -25691,7 +25709,7 @@ export class SfIEvents extends LitElement {
|
|
|
25691
25709
|
}
|
|
25692
25710
|
|
|
25693
25711
|
override render() {
|
|
25694
|
-
|
|
25712
|
+
console.log('rendering', this.mode);
|
|
25695
25713
|
if(this.mode == "rcmnotifications") {
|
|
25696
25714
|
|
|
25697
25715
|
return html`
|