sf-i-events 1.0.840 → 1.0.842
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 +7 -6
- package/package.json +1 -1
- package/sf-i-events.js +27 -23
- package/src/sf-i-events.ts +22 -20
- package/src/util.ts +34 -1
- package/util.d.ts +2 -0
- package/util.js +28 -1
package/dev/index.html
CHANGED
|
@@ -734,7 +734,7 @@
|
|
|
734
734
|
</div>
|
|
735
735
|
|
|
736
736
|
</sf-i-events> -->
|
|
737
|
-
<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="2025">
|
|
737
|
+
<!-- <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="2025">
|
|
738
738
|
|
|
739
739
|
<div slot="uploader">
|
|
740
740
|
<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>
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
744
744
|
</div>
|
|
745
745
|
|
|
746
|
-
</sf-i-events>
|
|
746
|
+
</sf-i-events> -->
|
|
747
747
|
<!-- <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">
|
|
748
748
|
|
|
749
749
|
</sf-i-events> -->
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
</sf-i-events> -->
|
|
760
760
|
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Sachin Bhat" userprofileid="347e23a2-5ff8-4d3a-b1ab-639faf342f25" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" myroles="["reporter"]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><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></div><div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div></sf-i-events> -->
|
|
761
761
|
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" myroles="["reporter"]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><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></div><div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div></sf-i-events> -->
|
|
762
|
-
<!-- <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="
|
|
762
|
+
<!-- <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="2025">
|
|
763
763
|
|
|
764
764
|
<div slot="uploader">
|
|
765
765
|
<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>
|
|
@@ -779,7 +779,7 @@
|
|
|
779
779
|
</div>
|
|
780
780
|
|
|
781
781
|
</sf-i-events> -->
|
|
782
|
-
|
|
782
|
+
<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="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="reporter" 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="2025">
|
|
783
783
|
|
|
784
784
|
<div slot="uploader">
|
|
785
785
|
<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>
|
|
@@ -788,12 +788,13 @@
|
|
|
788
788
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
789
789
|
</div>
|
|
790
790
|
|
|
791
|
-
</sf-i-events>
|
|
791
|
+
</sf-i-events>
|
|
792
792
|
<!-- <sf-i-events projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" projectname="Standard Radiators Private Limited" mode="onboarding" locations="{"India":{"Punjab":["Punjab Warehouse"],"Gujarat":["RO & Unit I","Unit II"]}}" contractstartdate="01/03/2025" 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">
|
|
793
793
|
|
|
794
794
|
</sf-i-events> -->
|
|
795
|
+
<!-- <sf-i-events projectid="d7d4d17e-3e20-4eaa-a06a-fb1c87f26532" projectname="FlaggGRC Global" mode="onboarding" locations="{"India":{"Maharashtra":["Pune"]}}" contractstartdate="01/01/2025" 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">
|
|
795
796
|
|
|
796
|
-
</sf-i-events>
|
|
797
|
+
</sf-i-events> -->
|
|
797
798
|
<script>
|
|
798
799
|
|
|
799
800
|
function setCookie(name,value,days) {
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -2426,7 +2426,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2426
2426
|
let lastUpdated = '';
|
|
2427
2427
|
// console.log('lastUpdated', event.lastupdated);
|
|
2428
2428
|
if (event.lastupdated != null && event.lastupdated.length > 0) {
|
|
2429
|
-
lastUpdated = event.lastupdated;
|
|
2429
|
+
lastUpdated = Util.getDateTimeStrings(new Date(event.lastupdated).getTime());
|
|
2430
2430
|
}
|
|
2431
2431
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2432
2432
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
@@ -2963,6 +2963,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2963
2963
|
if (Object.keys(this.statisticsFiltersData).length > 0) {
|
|
2964
2964
|
filtersTableHtml += this.renderStatisticsFiltersTableStart();
|
|
2965
2965
|
}
|
|
2966
|
+
console.log('statistics', firstDate, iInit, iLast);
|
|
2966
2967
|
for (var i = iInit; i <= iLast; i++) {
|
|
2967
2968
|
let mmdd = "";
|
|
2968
2969
|
if (firstDate == null) {
|
|
@@ -2973,7 +2974,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2973
2974
|
currDate.setDate(firstDate.getDate() + (i));
|
|
2974
2975
|
mmdd = ("0" + (currDate.getMonth() + 1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
2975
2976
|
}
|
|
2976
|
-
console.log('mmddevent', mmdd, this.
|
|
2977
|
+
console.log('mmddevent', mmdd, this.statistics[mmdd], firstDate);
|
|
2977
2978
|
// var hide;
|
|
2978
2979
|
// if(firstDate == null) {
|
|
2979
2980
|
// hide = this.getCalendarRowHide(this.events[mmdd], i, lastDay, month, firstDate, null);
|
|
@@ -3037,9 +3038,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3037
3038
|
}
|
|
3038
3039
|
else {
|
|
3039
3040
|
const currDate = new Date(firstDate.getTime());
|
|
3040
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
3041
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
3041
3042
|
mmdd = ("0" + (currDate.getMonth() + 1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
3042
3043
|
}
|
|
3044
|
+
console.log('mmddFilters', mmdd);
|
|
3043
3045
|
if (this.statisticsFiltersData[filtercriteria][filterid] != null) {
|
|
3044
3046
|
if (this.statisticsFiltersData[filtercriteria][filterid]['lasttime'] != null) {
|
|
3045
3047
|
lastAction = (_l = this.statisticsFiltersData[filtercriteria][filterid]['lasttime']['lastaction']) !== null && _l !== void 0 ? _l : "";
|
|
@@ -9032,7 +9034,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9032
9034
|
try {
|
|
9033
9035
|
const jsonComments = JSON.parse(onlyCommentText);
|
|
9034
9036
|
if (Util.isInteger(jsonComments)) {
|
|
9035
|
-
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
9037
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
9036
9038
|
}
|
|
9037
9039
|
else {
|
|
9038
9040
|
//console.log('json comments', jsonComments);
|
|
@@ -9043,12 +9045,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9043
9045
|
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
9044
9046
|
htmlTable += '</div>';
|
|
9045
9047
|
}
|
|
9046
|
-
html += '<div class="">' + htmlTable + '<small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
9048
|
+
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
9047
9049
|
}
|
|
9048
9050
|
}
|
|
9049
9051
|
catch (e) {
|
|
9050
9052
|
//console.log('json comments exception', comments[i]);
|
|
9051
|
-
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
9053
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
9052
9054
|
}
|
|
9053
9055
|
html += '</div>';
|
|
9054
9056
|
}
|
|
@@ -10009,7 +10011,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10009
10011
|
try {
|
|
10010
10012
|
const jsonComments = JSON.parse(onlyCommentText);
|
|
10011
10013
|
if (Util.isInteger(jsonComments)) {
|
|
10012
|
-
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
10014
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10013
10015
|
}
|
|
10014
10016
|
else {
|
|
10015
10017
|
//console.log('json comments', jsonComments);
|
|
@@ -10020,12 +10022,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10020
10022
|
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
10021
10023
|
htmlTable += '</div>';
|
|
10022
10024
|
}
|
|
10023
|
-
html += '<div class="">' + htmlTable + '<small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
10025
|
+
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10024
10026
|
}
|
|
10025
10027
|
}
|
|
10026
10028
|
catch (e) {
|
|
10027
10029
|
//console.log('json comments exception', comments[i]);
|
|
10028
|
-
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + comments[i].timestamp + '</span></small></div>';
|
|
10030
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10029
10031
|
}
|
|
10030
10032
|
html += '</div>';
|
|
10031
10033
|
}
|
|
@@ -11991,7 +11993,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11991
11993
|
this.changedOnboardingItemIds = [];
|
|
11992
11994
|
};
|
|
11993
11995
|
this.renderMappingTable = (divElement, jsonData, cursor, fetchFunction, searchString, mappedArray, found, uploadFunction, refreshFunction, extraFields, uploadBlock, extraFieldPosition, colName, subfilter, statuteColName, extraHintsArr) => {
|
|
11994
|
-
var _a, _b, _c, _f;
|
|
11996
|
+
var _a, _b, _c, _f, _g, _h, _j;
|
|
11995
11997
|
console.log('cols1', jsonData);
|
|
11996
11998
|
// console.log('cols', jsonData[0].data.cols);
|
|
11997
11999
|
//console.log('divelement', divElement);
|
|
@@ -12073,7 +12075,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12073
12075
|
// }
|
|
12074
12076
|
// }
|
|
12075
12077
|
for (var j = 0; j < jsonData[0].cols.length; j++) {
|
|
12076
|
-
|
|
12078
|
+
console.log('jsoncols', JSON.parse(jsonData[0].data.cols), jsonData[0].cols.length, j);
|
|
12079
|
+
html += '<th part="td-head" class="td-head ' + (statuteColName.toLowerCase() == ((_a = JSON.parse(jsonData[0].data.cols)[j]) !== null && _a !== void 0 ? _a : "").toLowerCase() ? 'left-sticky' : '') + '">';
|
|
12077
12080
|
// html += jsonData[0].cols[j]
|
|
12078
12081
|
html += '</th>';
|
|
12079
12082
|
}
|
|
@@ -12111,7 +12114,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12111
12114
|
var mappedCount = 0;
|
|
12112
12115
|
for (let level = 0; level < 2; level++) {
|
|
12113
12116
|
for (var i = 0; i < jsonData.length; i++) {
|
|
12114
|
-
//console.log('subfilter value before', subfiltered);
|
|
12117
|
+
// console.log('subfilter value before', subfiltered);
|
|
12118
|
+
console.log('rendering', i, jsonData[i]);
|
|
12115
12119
|
let tempColCountry = -1;
|
|
12116
12120
|
let tempColState = -1;
|
|
12117
12121
|
let tempColStatute = -1;
|
|
@@ -12144,7 +12148,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12144
12148
|
tempColSubcategory = colSubcategory;
|
|
12145
12149
|
}
|
|
12146
12150
|
}
|
|
12147
|
-
if (JSON.parse(jsonData[i].data.data)[tempColCountry].length === 0 && level === 1) {
|
|
12151
|
+
if (((_b = JSON.parse(jsonData[i].data.data)[tempColCountry]) !== null && _b !== void 0 ? _b : "").length === 0 && level === 1) {
|
|
12148
12152
|
html += '<tr id="tablerow-' + i + '" class="tablerow" style="display: none">';
|
|
12149
12153
|
html += '<td part="td-action">';
|
|
12150
12154
|
html += '<div id="select-' + i + '"><input class="checkbox checkbox-' + i + ' checkbox-row" part="input-checkbox" type="checkbox"/></div>';
|
|
@@ -12255,11 +12259,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12255
12259
|
html += '<td part="td-action" class="' + (jsonData[i].mapped ? 'chosen' : '') + '">';
|
|
12256
12260
|
html += '<div class="' + (!showSearch ? 'truncate' : '') + '"><button class="button-expand" part="button-icon" id="show-detail-' + i + '"><span class="material-symbols-outlined">open_in_new</span></button></div>';
|
|
12257
12261
|
let locationsForThisItem = [];
|
|
12258
|
-
if (JSON.parse(jsonData[i].data.data)[tempColState].length > 0) {
|
|
12262
|
+
if (((_c = JSON.parse(jsonData[i].data.data)[tempColState]) !== null && _c !== void 0 ? _c : "").length > 0) {
|
|
12259
12263
|
locationsForThisItem = this.getLocationsByState(JSON.parse(jsonData[i].data.data)[tempColCountry][0], JSON.parse(jsonData[i].data.data)[tempColState][0], JSON.parse(jsonData[i].data.data)[tempColStatute]);
|
|
12260
12264
|
}
|
|
12261
12265
|
else {
|
|
12262
|
-
|
|
12266
|
+
console.log(JSON.parse(jsonData[i].data.data)[colStatute], colStatute, statuteColName);
|
|
12263
12267
|
locationsForThisItem = this.getLocationsByCountry(JSON.parse(jsonData[i].data.data)[tempColCountry][0], JSON.parse(jsonData[i].data.data)[tempColStatute]);
|
|
12264
12268
|
}
|
|
12265
12269
|
if (extraFieldPosition === 0) {
|
|
@@ -12604,7 +12608,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12604
12608
|
}
|
|
12605
12609
|
});
|
|
12606
12610
|
}
|
|
12607
|
-
(
|
|
12611
|
+
(_f = divElement.querySelector('.checkbox-all')) === null || _f === void 0 ? void 0 : _f.addEventListener('change', (e) => {
|
|
12608
12612
|
//console.log('cb-length', arrCheckBoxes.length);
|
|
12609
12613
|
for (var i = 0; i < arrCheckBoxes.length; i++) {
|
|
12610
12614
|
const tableRow = divElement.querySelector('#tablerow-' + (i));
|
|
@@ -12619,7 +12623,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12619
12623
|
divElement.querySelector('.button-save').disabled = false;
|
|
12620
12624
|
});
|
|
12621
12625
|
// Next, previous, save handlers
|
|
12622
|
-
(
|
|
12626
|
+
(_g = this._SfButtonNext) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
|
|
12623
12627
|
const resultFunction = await fetchFunction(searchString, cursor[cursor.length - 1].next);
|
|
12624
12628
|
//console.log(resultFunction);
|
|
12625
12629
|
if (resultFunction != null) {
|
|
@@ -12646,7 +12650,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12646
12650
|
this.renderMappingTable(divElement, jsonData1, cursor, fetchFunction, searchString, mappedArray, found, uploadFunction, refreshFunction, extraFields, uploadBlock, extraFieldPosition, colName, subfilter, statuteColName, extraHintsArr);
|
|
12647
12651
|
}
|
|
12648
12652
|
});
|
|
12649
|
-
(
|
|
12653
|
+
(_h = this._SfButtonPrev) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async () => {
|
|
12650
12654
|
cursor.pop();
|
|
12651
12655
|
const resultFunction = await fetchFunction(searchString, cursor[cursor.length - 1].prev);
|
|
12652
12656
|
//console.log(resultFunction);
|
|
@@ -12667,7 +12671,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12667
12671
|
this.renderMappingTable(divElement, jsonData1, cursor, fetchFunction, searchString, mappedArray, found, uploadFunction, refreshFunction, extraFields, uploadBlock, extraFieldPosition, colName, subfilter, statuteColName, extraHintsArr);
|
|
12668
12672
|
}
|
|
12669
12673
|
});
|
|
12670
|
-
(
|
|
12674
|
+
(_j = this._SfButtonSave) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async () => {
|
|
12671
12675
|
await this.saveMapping(divElement, uploadBlock, jsonData, extraFields, searchString, uploadFunction, refreshFunction, false);
|
|
12672
12676
|
});
|
|
12673
12677
|
// const arrExtraFields = (divElement as HTMLDivElement).querySelectorAll('.extra-field') as NodeListOf<SfIMultitextarea>;
|
|
@@ -18454,7 +18458,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18454
18458
|
}
|
|
18455
18459
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
18456
18460
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
18457
|
-
this.lastupdated =
|
|
18461
|
+
this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
|
|
18458
18462
|
console.log('rendering appropriate string', list);
|
|
18459
18463
|
this.renderAppropriateStream(startDate, endDate, true);
|
|
18460
18464
|
this.fetchBulkReportingData();
|
|
@@ -18557,7 +18561,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18557
18561
|
console.log('jsonRespose', jsonRespose);
|
|
18558
18562
|
let notices = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
18559
18563
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
18560
|
-
this.lastupdated =
|
|
18564
|
+
this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
|
|
18561
18565
|
let tempEvents = this.events;
|
|
18562
18566
|
for (let mmddyyyy of Object.keys(notices)) {
|
|
18563
18567
|
tempEvents[mmddyyyy] = [...((_a = tempEvents[mmddyyyy]) !== null && _a !== void 0 ? _a : []), ...notices[mmddyyyy]];
|
|
@@ -18635,7 +18639,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18635
18639
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
18636
18640
|
console.log('jsonRespose Statistics', jsonRespose);
|
|
18637
18641
|
this.statistics = jsonRespose.data;
|
|
18638
|
-
this.lastupdated =
|
|
18642
|
+
this.lastupdated = Util.getDateTimeStrings(new Date(jsonRespose.lastupdated).getTime());
|
|
18639
18643
|
console.log('statistics date', this.lastupdated);
|
|
18640
18644
|
this.statisticsFiltersData = (_a = jsonRespose.filtersdata) !== null && _a !== void 0 ? _a : {};
|
|
18641
18645
|
if (jsonRespose.meta != null)
|
|
@@ -19628,7 +19632,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19628
19632
|
html += `<td part="td-body">${reportKey.split(';')[0]}</td>`;
|
|
19629
19633
|
html += `<td part="td-body">${JSON.parse(report['docs']).length}</td>`;
|
|
19630
19634
|
html += `<td part="td-body">${report['comments'].length}</td>`;
|
|
19631
|
-
html += `<td part="td-body">${
|
|
19635
|
+
html += `<td part="td-body">${Util.getDateTimeStrings(new Date(report['lastupdated']).getTime())}</td>`;
|
|
19632
19636
|
html += `<td part="td-body">${new Date(parseInt(report['dateofcompletion'])).toLocaleDateString('en-US', { timeZone: 'Asia/Kolkata' })}</td>`;
|
|
19633
19637
|
html += '<th part="td-head">';
|
|
19634
19638
|
// const jsonReportEvent = JSON.parse(report['comments'].reportevent);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4610,7 +4610,7 @@ export class SfIEvents extends LitElement {
|
|
|
4610
4610
|
|
|
4611
4611
|
// console.log('lastUpdated', event.lastupdated);
|
|
4612
4612
|
if(event.lastupdated != null && event.lastupdated.length > 0) {
|
|
4613
|
-
lastUpdated = event.lastupdated;
|
|
4613
|
+
lastUpdated = Util.getDateTimeStrings(new Date(event.lastupdated).getTime());
|
|
4614
4614
|
|
|
4615
4615
|
}
|
|
4616
4616
|
|
|
@@ -5237,6 +5237,7 @@ export class SfIEvents extends LitElement {
|
|
|
5237
5237
|
if(Object.keys(this.statisticsFiltersData).length > 0){
|
|
5238
5238
|
filtersTableHtml += this.renderStatisticsFiltersTableStart()
|
|
5239
5239
|
}
|
|
5240
|
+
console.log('statistics', firstDate, iInit, iLast)
|
|
5240
5241
|
for(var i = iInit; i <= iLast; i++) {
|
|
5241
5242
|
|
|
5242
5243
|
let mmdd : string = "";
|
|
@@ -5250,7 +5251,7 @@ export class SfIEvents extends LitElement {
|
|
|
5250
5251
|
}
|
|
5251
5252
|
|
|
5252
5253
|
|
|
5253
|
-
console.log('mmddevent', mmdd,this.
|
|
5254
|
+
console.log('mmddevent', mmdd,this.statistics[mmdd], firstDate);
|
|
5254
5255
|
|
|
5255
5256
|
// var hide;
|
|
5256
5257
|
// if(firstDate == null) {
|
|
@@ -5334,9 +5335,10 @@ export class SfIEvents extends LitElement {
|
|
|
5334
5335
|
mmdd = ("0" + (month+1)).slice(-2) + "/" + ("0" + i).slice(-2);
|
|
5335
5336
|
} else {
|
|
5336
5337
|
const currDate = new Date(firstDate.getTime());
|
|
5337
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
5338
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
5338
5339
|
mmdd = ("0" + (currDate.getMonth()+1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
5339
5340
|
}
|
|
5341
|
+
console.log('mmddFilters', mmdd)
|
|
5340
5342
|
if(this.statisticsFiltersData[filtercriteria][filterid] != null){
|
|
5341
5343
|
if(this.statisticsFiltersData[filtercriteria][filterid]['lasttime'] != null){
|
|
5342
5344
|
lastAction = this.statisticsFiltersData[filtercriteria][filterid]['lasttime']['lastaction'] ?? ""
|
|
@@ -12550,7 +12552,7 @@ export class SfIEvents extends LitElement {
|
|
|
12550
12552
|
const jsonComments = JSON.parse(onlyCommentText);
|
|
12551
12553
|
|
|
12552
12554
|
if(Util.isInteger(jsonComments)) {
|
|
12553
|
-
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
12555
|
+
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
12554
12556
|
} else {
|
|
12555
12557
|
//console.log('json comments', jsonComments);
|
|
12556
12558
|
var htmlTable = '';
|
|
@@ -12560,12 +12562,12 @@ export class SfIEvents extends LitElement {
|
|
|
12560
12562
|
htmlTable += ('<sf-i-elastic-text text="'+jsonComments[Object.keys(jsonComments)[j]]+'" minLength="20"></sf-i-elastic-text>');
|
|
12561
12563
|
htmlTable += '</div>';
|
|
12562
12564
|
}
|
|
12563
|
-
html += '<div class="">'+htmlTable+'<small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
12565
|
+
html += '<div class="">'+htmlTable+'<small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
12564
12566
|
}
|
|
12565
12567
|
|
|
12566
12568
|
} catch (e: any) {
|
|
12567
12569
|
//console.log('json comments exception', comments[i]);
|
|
12568
|
-
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
12570
|
+
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
12569
12571
|
}
|
|
12570
12572
|
|
|
12571
12573
|
html += '</div>';
|
|
@@ -13685,7 +13687,7 @@ export class SfIEvents extends LitElement {
|
|
|
13685
13687
|
const jsonComments = JSON.parse(onlyCommentText);
|
|
13686
13688
|
|
|
13687
13689
|
if(Util.isInteger(jsonComments)) {
|
|
13688
|
-
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
13690
|
+
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
13689
13691
|
} else {
|
|
13690
13692
|
//console.log('json comments', jsonComments);
|
|
13691
13693
|
var htmlTable = '';
|
|
@@ -13695,12 +13697,12 @@ export class SfIEvents extends LitElement {
|
|
|
13695
13697
|
htmlTable += ('<sf-i-elastic-text text="'+jsonComments[Object.keys(jsonComments)[j]]+'" minLength="20"></sf-i-elastic-text>');
|
|
13696
13698
|
htmlTable += '</div>';
|
|
13697
13699
|
}
|
|
13698
|
-
html += '<div class="">'+htmlTable+'<small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
13700
|
+
html += '<div class="">'+htmlTable+'<small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
13699
13701
|
}
|
|
13700
13702
|
|
|
13701
13703
|
} catch (e: any) {
|
|
13702
13704
|
//console.log('json comments exception', comments[i]);
|
|
13703
|
-
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+comments[i].timestamp+'</span></small></div>';
|
|
13705
|
+
html += '<div class="">'+comments[i].comment+'<br /><small><span class="muted">'+Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime())+'</span></small></div>';
|
|
13704
13706
|
}
|
|
13705
13707
|
|
|
13706
13708
|
html += '</div>';
|
|
@@ -16303,8 +16305,8 @@ export class SfIEvents extends LitElement {
|
|
|
16303
16305
|
// }
|
|
16304
16306
|
|
|
16305
16307
|
for(var j = 0; j < jsonData[0].cols.length; j++) {
|
|
16306
|
-
|
|
16307
|
-
html += '<th part="td-head" class="td-head ' + (statuteColName.toLowerCase() == JSON.parse(jsonData[0].data.cols)[j].toLowerCase() ? 'left-sticky' : '') + '">'
|
|
16308
|
+
console.log('jsoncols', JSON.parse(jsonData[0].data.cols), jsonData[0].cols.length, j)
|
|
16309
|
+
html += '<th part="td-head" class="td-head ' + (statuteColName.toLowerCase() == (JSON.parse(jsonData[0].data.cols)[j] ?? "").toLowerCase() ? 'left-sticky' : '') + '">'
|
|
16308
16310
|
// html += jsonData[0].cols[j]
|
|
16309
16311
|
html += '</th>'
|
|
16310
16312
|
|
|
@@ -16353,8 +16355,8 @@ export class SfIEvents extends LitElement {
|
|
|
16353
16355
|
|
|
16354
16356
|
for(var i = 0; i < jsonData.length; i++) {
|
|
16355
16357
|
|
|
16356
|
-
//console.log('subfilter value before', subfiltered);
|
|
16357
|
-
|
|
16358
|
+
// console.log('subfilter value before', subfiltered);
|
|
16359
|
+
console.log('rendering', i, jsonData[i])
|
|
16358
16360
|
let tempColCountry = -1;
|
|
16359
16361
|
let tempColState = -1;
|
|
16360
16362
|
let tempColStatute = -1;
|
|
@@ -16386,7 +16388,7 @@ export class SfIEvents extends LitElement {
|
|
|
16386
16388
|
}
|
|
16387
16389
|
}
|
|
16388
16390
|
|
|
16389
|
-
if(JSON.parse(jsonData[i].data.data)[tempColCountry].length === 0 && level === 1) {
|
|
16391
|
+
if((JSON.parse(jsonData[i].data.data)[tempColCountry] ?? "").length === 0 && level === 1) {
|
|
16390
16392
|
|
|
16391
16393
|
html += '<tr id="tablerow-'+i+'" class="tablerow" style="display: none">';
|
|
16392
16394
|
|
|
@@ -16537,10 +16539,10 @@ export class SfIEvents extends LitElement {
|
|
|
16537
16539
|
|
|
16538
16540
|
let locationsForThisItem: any = [];
|
|
16539
16541
|
|
|
16540
|
-
if(JSON.parse(jsonData[i].data.data)[tempColState].length > 0) {
|
|
16542
|
+
if((JSON.parse(jsonData[i].data.data)[tempColState] ?? "").length > 0) {
|
|
16541
16543
|
locationsForThisItem = this.getLocationsByState(JSON.parse(jsonData[i].data.data)[tempColCountry][0], JSON.parse(jsonData[i].data.data)[tempColState][0], JSON.parse(jsonData[i].data.data)[tempColStatute]);
|
|
16542
16544
|
} else {
|
|
16543
|
-
|
|
16545
|
+
console.log(JSON.parse(jsonData[i].data.data)[colStatute], colStatute, statuteColName);
|
|
16544
16546
|
locationsForThisItem = this.getLocationsByCountry(JSON.parse(jsonData[i].data.data)[tempColCountry][0], JSON.parse(jsonData[i].data.data)[tempColStatute]);
|
|
16545
16547
|
}
|
|
16546
16548
|
|
|
@@ -24353,7 +24355,7 @@ export class SfIEvents extends LitElement {
|
|
|
24353
24355
|
}
|
|
24354
24356
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
24355
24357
|
if(JSON.stringify(urlBody) == this.getallcountryevetsParams){
|
|
24356
|
-
this.lastupdated =
|
|
24358
|
+
this.lastupdated = Util.getDateTimeStrings(new Date().getTime())
|
|
24357
24359
|
console.log('rendering appropriate string', list);
|
|
24358
24360
|
this.renderAppropriateStream(startDate, endDate, true);
|
|
24359
24361
|
this.fetchBulkReportingData();
|
|
@@ -24490,7 +24492,7 @@ export class SfIEvents extends LitElement {
|
|
|
24490
24492
|
console.log('jsonRespose', jsonRespose);
|
|
24491
24493
|
let notices = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
24492
24494
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
24493
|
-
this.lastupdated =
|
|
24495
|
+
this.lastupdated = Util.getDateTimeStrings(new Date().getTime())
|
|
24494
24496
|
let tempEvents = this.events
|
|
24495
24497
|
for(let mmddyyyy of Object.keys(notices)){
|
|
24496
24498
|
tempEvents[mmddyyyy] = [...(tempEvents[mmddyyyy] ?? []),...notices[mmddyyyy]]
|
|
@@ -24577,7 +24579,7 @@ export class SfIEvents extends LitElement {
|
|
|
24577
24579
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24578
24580
|
console.log('jsonRespose Statistics', jsonRespose);
|
|
24579
24581
|
this.statistics = jsonRespose.data
|
|
24580
|
-
this.lastupdated =
|
|
24582
|
+
this.lastupdated = Util.getDateTimeStrings(new Date(jsonRespose.lastupdated).getTime())
|
|
24581
24583
|
console.log('statistics date', this.lastupdated);
|
|
24582
24584
|
this.statisticsFiltersData = jsonRespose.filtersdata ?? {}
|
|
24583
24585
|
if(jsonRespose.meta != null)
|
|
@@ -25754,7 +25756,7 @@ export class SfIEvents extends LitElement {
|
|
|
25754
25756
|
html += `<td part="td-body">${reportKey.split(';')[0]}</td>`;
|
|
25755
25757
|
html += `<td part="td-body">${JSON.parse(report['docs']).length}</td>`;
|
|
25756
25758
|
html += `<td part="td-body">${report['comments'].length}</td>`;
|
|
25757
|
-
html += `<td part="td-body">${
|
|
25759
|
+
html += `<td part="td-body">${Util.getDateTimeStrings(new Date(report['lastupdated']).getTime())}</td>`;
|
|
25758
25760
|
html += `<td part="td-body">${new Date(parseInt(report['dateofcompletion'])).toLocaleDateString('en-US', { timeZone: 'Asia/Kolkata'})}</td>`;
|
|
25759
25761
|
html += '<th part="td-head">';
|
|
25760
25762
|
|
package/src/util.ts
CHANGED
|
@@ -466,8 +466,41 @@ function getCurrentFiscal(){
|
|
|
466
466
|
return date.getFullYear();
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
+
function getDateTimeStrings(unixTimestamp: number): string {
|
|
470
|
+
// Convert to milliseconds if the timestamp is in seconds
|
|
471
|
+
if (unixTimestamp.toString().length === 10) {
|
|
472
|
+
unixTimestamp *= 1000;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
const date = new Date(unixTimestamp);
|
|
476
|
+
|
|
477
|
+
const options: Intl.DateTimeFormatOptions = {
|
|
478
|
+
year: 'numeric',
|
|
479
|
+
month: '2-digit',
|
|
480
|
+
day: '2-digit',
|
|
481
|
+
hour: '2-digit',
|
|
482
|
+
minute: '2-digit',
|
|
483
|
+
second: '2-digit',
|
|
484
|
+
hour12: false,
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
const estFormatter = new Intl.DateTimeFormat('en-US', {
|
|
488
|
+
...options,
|
|
489
|
+
timeZone: 'America/New_York',
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
const istFormatter = new Intl.DateTimeFormat('en-IN', {
|
|
493
|
+
...options,
|
|
494
|
+
timeZone: 'Asia/Kolkata',
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
const [estDate, estTime] = estFormatter.format(date).split(', ');
|
|
498
|
+
const [istDate, istTime] = istFormatter.format(date).split(', ');
|
|
499
|
+
return `${estDate} ${estTime} EST, ${istDate} ${istTime} IST`;
|
|
500
|
+
}
|
|
501
|
+
|
|
469
502
|
const exportFunctions = {
|
|
470
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal
|
|
503
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings
|
|
471
504
|
};
|
|
472
505
|
|
|
473
506
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare function titleCase(str: string): string;
|
|
|
16
16
|
declare function alphabeticalSort(arr: string[]): string[];
|
|
17
17
|
declare function percentageString(val: number, valTotal: number): string;
|
|
18
18
|
declare function getCurrentFiscal(): number;
|
|
19
|
+
declare function getDateTimeStrings(unixTimestamp: number): string;
|
|
19
20
|
declare const exportFunctions: {
|
|
20
21
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
21
22
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -37,6 +38,7 @@ declare const exportFunctions: {
|
|
|
37
38
|
alphabeticalSort: typeof alphabeticalSort;
|
|
38
39
|
percentageString: typeof percentageString;
|
|
39
40
|
getCurrentFiscal: typeof getCurrentFiscal;
|
|
41
|
+
getDateTimeStrings: typeof getDateTimeStrings;
|
|
40
42
|
};
|
|
41
43
|
export default exportFunctions;
|
|
42
44
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -391,8 +391,35 @@ function getCurrentFiscal() {
|
|
|
391
391
|
}
|
|
392
392
|
return date.getFullYear();
|
|
393
393
|
}
|
|
394
|
+
function getDateTimeStrings(unixTimestamp) {
|
|
395
|
+
// Convert to milliseconds if the timestamp is in seconds
|
|
396
|
+
if (unixTimestamp.toString().length === 10) {
|
|
397
|
+
unixTimestamp *= 1000;
|
|
398
|
+
}
|
|
399
|
+
const date = new Date(unixTimestamp);
|
|
400
|
+
const options = {
|
|
401
|
+
year: 'numeric',
|
|
402
|
+
month: '2-digit',
|
|
403
|
+
day: '2-digit',
|
|
404
|
+
hour: '2-digit',
|
|
405
|
+
minute: '2-digit',
|
|
406
|
+
second: '2-digit',
|
|
407
|
+
hour12: false,
|
|
408
|
+
};
|
|
409
|
+
const estFormatter = new Intl.DateTimeFormat('en-US', {
|
|
410
|
+
...options,
|
|
411
|
+
timeZone: 'America/New_York',
|
|
412
|
+
});
|
|
413
|
+
const istFormatter = new Intl.DateTimeFormat('en-IN', {
|
|
414
|
+
...options,
|
|
415
|
+
timeZone: 'Asia/Kolkata',
|
|
416
|
+
});
|
|
417
|
+
const [estDate, estTime] = estFormatter.format(date).split(', ');
|
|
418
|
+
const [istDate, istTime] = istFormatter.format(date).split(', ');
|
|
419
|
+
return `${estDate} ${estTime} EST, ${istDate} ${istTime} IST`;
|
|
420
|
+
}
|
|
394
421
|
const exportFunctions = {
|
|
395
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal
|
|
422
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort, percentageString, getCurrentFiscal, getDateTimeStrings
|
|
396
423
|
};
|
|
397
424
|
export default exportFunctions;
|
|
398
425
|
//# sourceMappingURL=util.js.map
|