sf-i-events 1.0.838 → 1.0.839
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/index.html +4 -4
- package/package.json +1 -1
- package/sf-i-events.js +28 -23
- package/src/sf-i-events.ts +28 -24
package/dev/index.html
CHANGED
|
@@ -714,7 +714,7 @@
|
|
|
714
714
|
</div>
|
|
715
715
|
|
|
716
716
|
</sf-i-events> -->
|
|
717
|
-
<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="2025">
|
|
717
|
+
<!-- <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="2025">
|
|
718
718
|
|
|
719
719
|
<div slot="uploader">
|
|
720
720
|
<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>
|
|
@@ -723,7 +723,7 @@
|
|
|
723
723
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
724
724
|
</div>
|
|
725
725
|
|
|
726
|
-
</sf-i-events>
|
|
726
|
+
</sf-i-events> -->
|
|
727
727
|
<!-- <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="2024">
|
|
728
728
|
|
|
729
729
|
<div slot="uploader">
|
|
@@ -734,7 +734,7 @@
|
|
|
734
734
|
</div>
|
|
735
735
|
|
|
736
736
|
</sf-i-events> -->
|
|
737
|
-
|
|
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="2024">
|
|
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> -->
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -2716,6 +2716,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2716
2716
|
// }
|
|
2717
2717
|
return html;
|
|
2718
2718
|
};
|
|
2719
|
+
//(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton)
|
|
2719
2720
|
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
|
|
2720
2721
|
var _a, _b, _c, _f, _g, _h, _j, _k;
|
|
2721
2722
|
var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0, compliedWithGaps = 0, reportedNonCompliance = 0;
|
|
@@ -2746,11 +2747,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2746
2747
|
}
|
|
2747
2748
|
else {
|
|
2748
2749
|
const currDate = new Date(firstDate.getTime());
|
|
2749
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
2750
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
2750
2751
|
mmdd = ("0" + (currDate.getMonth() + 1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
2751
2752
|
}
|
|
2752
2753
|
//console.log('mmdd', mmdd);
|
|
2753
|
-
|
|
2754
|
+
console.log('mmddevent', mmdd, this.events[mmdd], firstDate);
|
|
2754
2755
|
var hide;
|
|
2755
2756
|
if (firstDate == null) {
|
|
2756
2757
|
hide = this.getCalendarRowHide(this.events[mmdd], i, lastDay, month, firstDate, null);
|
|
@@ -2969,10 +2970,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2969
2970
|
}
|
|
2970
2971
|
else {
|
|
2971
2972
|
const currDate = new Date(firstDate.getTime());
|
|
2972
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
2973
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
2973
2974
|
mmdd = ("0" + (currDate.getMonth() + 1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
2974
2975
|
}
|
|
2975
|
-
|
|
2976
|
+
console.log('mmddevent', mmdd, this.events[mmdd], firstDate);
|
|
2976
2977
|
// var hide;
|
|
2977
2978
|
// if(firstDate == null) {
|
|
2978
2979
|
// hide = this.getCalendarRowHide(this.events[mmdd], i, lastDay, month, firstDate, null);
|
|
@@ -4019,10 +4020,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4019
4020
|
const lastDay = count;
|
|
4020
4021
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
4021
4022
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
4022
|
-
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay
|
|
4023
|
+
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay);
|
|
4024
|
+
console.log('firstday', firstDay, endDay);
|
|
4023
4025
|
var period = ("0" + (firstDay.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDay.getDate()).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth() + 1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
4024
|
-
console.log('rangeperiod', period);
|
|
4025
|
-
var html = this.renderEvents(firstDay, endDay,
|
|
4026
|
+
console.log('rangeperiod', period, lastDay);
|
|
4027
|
+
var html = this.renderEvents(firstDay, endDay, 0, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton);
|
|
4026
4028
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
4027
4029
|
if (eventsContainer.innerHTML.indexOf('button-select-all') < 0) {
|
|
4028
4030
|
eventsContainer.insertAdjacentHTML('beforeend', this.renderSelectAllButtons());
|
|
@@ -4698,10 +4700,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4698
4700
|
const lastDay = count;
|
|
4699
4701
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
4700
4702
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
4701
|
-
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay
|
|
4702
|
-
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (
|
|
4703
|
-
|
|
4704
|
-
var html = this.renderStatistics(firstDay, endDay,
|
|
4703
|
+
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay);
|
|
4704
|
+
var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (endDay.getMonth() + 1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
4705
|
+
console.log('rangeperiod', period, lastDay);
|
|
4706
|
+
var html = this.renderStatistics(firstDay, endDay, 0, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
4705
4707
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
4706
4708
|
this.renderButtonRefresh(eventsContainer);
|
|
4707
4709
|
const filterButton = eventsContainer.querySelector('#filter-button');
|
|
@@ -5281,19 +5283,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5281
5283
|
this._SfStreamEventStatus.innerHTML = "Chosen End Date cannot be earlier than chosen Start Date";
|
|
5282
5284
|
return;
|
|
5283
5285
|
}
|
|
5284
|
-
if ((new Date(valueEnd).getTime() - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24) >
|
|
5285
|
-
this._SfStreamEventStatus.innerHTML = "Chosen time window cannot be greater than
|
|
5286
|
+
if ((new Date(valueEnd).getTime() - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24) > 365) {
|
|
5287
|
+
this._SfStreamEventStatus.innerHTML = "Chosen time window cannot be greater than 365 days";
|
|
5286
5288
|
return;
|
|
5287
5289
|
}
|
|
5288
5290
|
const tsStart = new Date(valueStart);
|
|
5289
5291
|
const tsEnd = new Date(valueEnd);
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
+
console.log('start date', tsStart, 'endDate', tsEnd);
|
|
5293
|
+
// tsStart.setDate(tsStart.getDate() - 2);
|
|
5294
|
+
// tsEnd.setDate(tsEnd.getDate() + 2);
|
|
5292
5295
|
if (fetchData) {
|
|
5293
5296
|
await this.renderWithFeatures((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
5294
5297
|
// await this.fetchAndYearlyRenderUserCalendar_2((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
5295
5298
|
}
|
|
5296
|
-
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime()
|
|
5299
|
+
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), this._SfCustomContainer, showBackgroundButton);
|
|
5297
5300
|
}
|
|
5298
5301
|
else if (valueStart != "" && valueEnd == "") {
|
|
5299
5302
|
this._SfStreamEventStatus.innerHTML = "Please select End Date";
|
|
@@ -5393,18 +5396,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5393
5396
|
this._SfStreamEventStatus.innerHTML = "Chosen End Date cannot be earlier than chosen Start Date";
|
|
5394
5397
|
return;
|
|
5395
5398
|
}
|
|
5396
|
-
if ((new Date(valueEnd).getTime() - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24) >
|
|
5397
|
-
this._SfStreamEventStatus.innerHTML = "Chosen time window cannot be greater than
|
|
5399
|
+
if ((new Date(valueEnd).getTime() - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24) > 365) {
|
|
5400
|
+
this._SfStreamEventStatus.innerHTML = "Chosen time window cannot be greater than 365 days";
|
|
5398
5401
|
return;
|
|
5399
5402
|
}
|
|
5400
5403
|
const tsStart = new Date(valueStart);
|
|
5401
5404
|
const tsEnd = new Date(valueEnd);
|
|
5402
|
-
tsStart.setDate(tsStart.getDate() - 2);
|
|
5403
|
-
tsEnd.setDate(tsEnd.getDate() + 2);
|
|
5405
|
+
// tsStart.setDate(tsStart.getDate() - 2);
|
|
5406
|
+
// tsEnd.setDate(tsEnd.getDate() + 2);
|
|
5404
5407
|
//console.log('tsstart', tsStart);
|
|
5405
5408
|
//console.log('tsend', tsEnd);
|
|
5406
5409
|
let meta = await this.fetchStatistics((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear(), filtercriteria, filtervalue, subfiltercriteria, subfiltervalue);
|
|
5407
|
-
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()
|
|
5410
|
+
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), this._SfCustomContainer);
|
|
5408
5411
|
if (meta != null)
|
|
5409
5412
|
this.renderStatisticsFilters(this._SfCustomContainer);
|
|
5410
5413
|
}
|
|
@@ -18778,7 +18781,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18778
18781
|
}
|
|
18779
18782
|
};
|
|
18780
18783
|
this.fetchAdhoc = async () => {
|
|
18781
|
-
let path = "
|
|
18784
|
+
let path = "getallmyevents1", view = "";
|
|
18782
18785
|
if (this.tagId != null && this.tagId != "") {
|
|
18783
18786
|
view = "tag";
|
|
18784
18787
|
}
|
|
@@ -18800,7 +18803,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18800
18803
|
if (xhr.status == 200) {
|
|
18801
18804
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
18802
18805
|
console.log(jsonRespose);
|
|
18803
|
-
|
|
18806
|
+
let responseData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
18807
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
18808
|
+
return responseData;
|
|
18804
18809
|
}
|
|
18805
18810
|
else {
|
|
18806
18811
|
if (xhr.status == 401) {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4947,6 +4947,7 @@ export class SfIEvents extends LitElement {
|
|
|
4947
4947
|
|
|
4948
4948
|
}
|
|
4949
4949
|
|
|
4950
|
+
//(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton)
|
|
4950
4951
|
renderEvents = (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any = null, parametersTitle: string, showBackgroundButton: boolean) => {
|
|
4951
4952
|
var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0, compliedWithGaps = 0, reportedNonCompliance = 0;
|
|
4952
4953
|
var html = '';
|
|
@@ -4984,12 +4985,12 @@ export class SfIEvents extends LitElement {
|
|
|
4984
4985
|
mmdd = ("0" + (month+1)).slice(-2) + "/" + ("0" + i).slice(-2);
|
|
4985
4986
|
} else {
|
|
4986
4987
|
const currDate = new Date(firstDate.getTime());
|
|
4987
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
4988
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
4988
4989
|
mmdd = ("0" + (currDate.getMonth()+1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
4989
4990
|
}
|
|
4990
4991
|
|
|
4991
4992
|
//console.log('mmdd', mmdd);
|
|
4992
|
-
|
|
4993
|
+
console.log('mmddevent', mmdd,this.events[mmdd], firstDate);
|
|
4993
4994
|
|
|
4994
4995
|
var hide;
|
|
4995
4996
|
if(firstDate == null) {
|
|
@@ -5244,12 +5245,12 @@ export class SfIEvents extends LitElement {
|
|
|
5244
5245
|
mmdd = ("0" + (month+1)).slice(-2) + "/" + ("0" + i).slice(-2);
|
|
5245
5246
|
} else {
|
|
5246
5247
|
const currDate = new Date(firstDate.getTime());
|
|
5247
|
-
currDate.setDate(firstDate.getDate() + (i
|
|
5248
|
+
currDate.setDate(firstDate.getDate() + (i));
|
|
5248
5249
|
mmdd = ("0" + (currDate.getMonth()+1)).slice(-2) + "/" + ("0" + currDate.getDate()).slice(-2);
|
|
5249
5250
|
}
|
|
5250
5251
|
|
|
5251
5252
|
|
|
5252
|
-
|
|
5253
|
+
console.log('mmddevent', mmdd,this.events[mmdd], firstDate);
|
|
5253
5254
|
|
|
5254
5255
|
// var hide;
|
|
5255
5256
|
// if(firstDate == null) {
|
|
@@ -6435,13 +6436,13 @@ export class SfIEvents extends LitElement {
|
|
|
6435
6436
|
const lastDay = count;
|
|
6436
6437
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
6437
6438
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
6438
|
-
endDay?.setDate(endDay.getDate() + lastDay
|
|
6439
|
-
|
|
6439
|
+
endDay?.setDate(endDay.getDate() + lastDay);
|
|
6440
|
+
console.log('firstday', firstDay, endDay)
|
|
6440
6441
|
var period = ("0" + (firstDay.getMonth()+1)).slice(-2) + "/" + ("0" + firstDay.getDate()).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth()+1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
6441
6442
|
|
|
6442
|
-
console.log('rangeperiod', period)
|
|
6443
|
+
console.log('rangeperiod', period, lastDay);
|
|
6443
6444
|
|
|
6444
|
-
var html = this.renderEvents(firstDay, endDay,
|
|
6445
|
+
var html = this.renderEvents(firstDay, endDay, 0, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton);
|
|
6445
6446
|
|
|
6446
6447
|
eventsContainer.querySelector('.calendar-right-data')!.innerHTML = html;
|
|
6447
6448
|
if(eventsContainer.innerHTML.indexOf('button-select-all') < 0){
|
|
@@ -7229,11 +7230,11 @@ export class SfIEvents extends LitElement {
|
|
|
7229
7230
|
const lastDay = count;
|
|
7230
7231
|
let firstDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
7231
7232
|
let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
|
|
7232
|
-
endDay?.setDate(endDay.getDate() + lastDay
|
|
7233
|
-
var period = ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (
|
|
7234
|
-
|
|
7233
|
+
endDay?.setDate(endDay.getDate() + lastDay);
|
|
7234
|
+
var period = ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (endDay.getMonth()+1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
7235
|
+
console.log('rangeperiod', period, lastDay)
|
|
7235
7236
|
|
|
7236
|
-
var html = this.renderStatistics(firstDay, endDay,
|
|
7237
|
+
var html = this.renderStatistics(firstDay, endDay, 0, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
7237
7238
|
|
|
7238
7239
|
eventsContainer.querySelector('.calendar-right-data')!.innerHTML = html;
|
|
7239
7240
|
this.renderButtonRefresh(eventsContainer);
|
|
@@ -7915,19 +7916,20 @@ export class SfIEvents extends LitElement {
|
|
|
7915
7916
|
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen End Date cannot be earlier than chosen Start Date";
|
|
7916
7917
|
return;
|
|
7917
7918
|
}
|
|
7918
|
-
if((new Date(valueEnd).getTime() - new Date(valueStart).getTime())/(1000*60*60*24) >
|
|
7919
|
-
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen time window cannot be greater than
|
|
7919
|
+
if((new Date(valueEnd).getTime() - new Date(valueStart).getTime())/(1000*60*60*24) > 365) {
|
|
7920
|
+
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen time window cannot be greater than 365 days";
|
|
7920
7921
|
return;
|
|
7921
7922
|
}
|
|
7922
7923
|
const tsStart = new Date(valueStart);
|
|
7923
7924
|
const tsEnd = new Date(valueEnd);
|
|
7924
|
-
|
|
7925
|
-
|
|
7925
|
+
console.log('start date', tsStart, 'endDate', tsEnd)
|
|
7926
|
+
// tsStart.setDate(tsStart.getDate() - 2);
|
|
7927
|
+
// tsEnd.setDate(tsEnd.getDate() + 2);
|
|
7926
7928
|
if(fetchData){
|
|
7927
7929
|
await this.renderWithFeatures((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear())
|
|
7928
7930
|
// await this.fetchAndYearlyRenderUserCalendar_2((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
7929
7931
|
}
|
|
7930
|
-
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime()
|
|
7932
|
+
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime())/(1000*60*60*24), (this._SfCustomContainer as HTMLDivElement), showBackgroundButton);
|
|
7931
7933
|
} else if(valueStart != "" && valueEnd == "") {
|
|
7932
7934
|
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Please select End Date";
|
|
7933
7935
|
} else if(valueStart == "" && valueEnd != "") {
|
|
@@ -8032,20 +8034,20 @@ export class SfIEvents extends LitElement {
|
|
|
8032
8034
|
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen End Date cannot be earlier than chosen Start Date";
|
|
8033
8035
|
return;
|
|
8034
8036
|
}
|
|
8035
|
-
if((new Date(valueEnd).getTime() - new Date(valueStart).getTime())/(1000*60*60*24) >
|
|
8036
|
-
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen time window cannot be greater than
|
|
8037
|
+
if((new Date(valueEnd).getTime() - new Date(valueStart).getTime())/(1000*60*60*24) > 365) {
|
|
8038
|
+
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Chosen time window cannot be greater than 365 days";
|
|
8037
8039
|
return;
|
|
8038
8040
|
}
|
|
8039
8041
|
const tsStart = new Date(valueStart);
|
|
8040
8042
|
const tsEnd = new Date(valueEnd);
|
|
8041
|
-
tsStart.setDate(tsStart.getDate() - 2);
|
|
8042
|
-
tsEnd.setDate(tsEnd.getDate() + 2);
|
|
8043
|
+
// tsStart.setDate(tsStart.getDate() - 2);
|
|
8044
|
+
// tsEnd.setDate(tsEnd.getDate() + 2);
|
|
8043
8045
|
|
|
8044
8046
|
//console.log('tsstart', tsStart);
|
|
8045
8047
|
//console.log('tsend', tsEnd);
|
|
8046
8048
|
|
|
8047
8049
|
let meta = await this.fetchStatistics((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear(), filtercriteria, filtervalue, subfiltercriteria, subfiltervalue);
|
|
8048
|
-
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()
|
|
8050
|
+
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime())/(1000*60*60*24), (this._SfCustomContainer as HTMLDivElement));
|
|
8049
8051
|
|
|
8050
8052
|
if(meta != null) this.renderStatisticsFilters((this._SfCustomContainer as HTMLDivElement))
|
|
8051
8053
|
} else if(valueStart != "" && valueEnd == "") {
|
|
@@ -24739,7 +24741,7 @@ export class SfIEvents extends LitElement {
|
|
|
24739
24741
|
|
|
24740
24742
|
fetchAdhoc = async () => {
|
|
24741
24743
|
|
|
24742
|
-
let path = "
|
|
24744
|
+
let path = "getallmyevents1", view = "";
|
|
24743
24745
|
|
|
24744
24746
|
if(this.tagId != null && this.tagId != "") {
|
|
24745
24747
|
view = "tag";
|
|
@@ -24763,7 +24765,9 @@ export class SfIEvents extends LitElement {
|
|
|
24763
24765
|
|
|
24764
24766
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24765
24767
|
console.log(jsonRespose);
|
|
24766
|
-
|
|
24768
|
+
let responseData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
24769
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
24770
|
+
return responseData;
|
|
24767
24771
|
|
|
24768
24772
|
} else {
|
|
24769
24773
|
if(xhr.status == 401){
|