sf-i-events 1.0.1113 → 1.0.1115
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 +37 -46
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -0
- package/sf-i-events.js +89 -21
- package/src/sf-i-events.ts +97 -22
package/dev/index.html
CHANGED
|
@@ -803,47 +803,6 @@
|
|
|
803
803
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
804
804
|
</div>
|
|
805
805
|
|
|
806
|
-
</sf-i-events> -->
|
|
807
|
-
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
|
|
808
|
-
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
809
|
-
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
810
|
-
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Neeti Kharbanda"
|
|
811
|
-
userprofileid="ef467815-de15-4c11-8149-24a3ffad2904" projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891"
|
|
812
|
-
projectname="Khaitan" myroles="["viewer","reporter","functionhead"]"
|
|
813
|
-
eventpreviewfields="["obligation"]"
|
|
814
|
-
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
815
|
-
blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
816
|
-
<div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
817
|
-
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
818
|
-
extract="yes" projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" maxsize="31457280"
|
|
819
|
-
allowdownload="yes"></sf-i-uploader></div>
|
|
820
|
-
<div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
|
|
821
|
-
</sf-i-events> -->
|
|
822
|
-
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
823
|
-
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
824
|
-
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
825
|
-
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
826
|
-
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid"
|
|
827
|
-
username="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca"
|
|
828
|
-
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
829
|
-
countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="functionhead" showregisterexport="false"
|
|
830
|
-
features="["notices"]"
|
|
831
|
-
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
832
|
-
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"}]"
|
|
833
|
-
eventpreviewfields="["obligation"]"
|
|
834
|
-
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
835
|
-
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
836
|
-
|
|
837
|
-
<div slot="uploader">
|
|
838
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
839
|
-
allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
840
|
-
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880"
|
|
841
|
-
allowdownload="yes"></sf-i-uploader>
|
|
842
|
-
</div>
|
|
843
|
-
<div slot="reporting">
|
|
844
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
845
|
-
</div>
|
|
846
|
-
|
|
847
806
|
</sf-i-events> -->
|
|
848
807
|
<!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
|
|
849
808
|
locations="{"India":{"Maharashtra":["Pune","Mumbai"],"Telangana":["Telangana"]},"Canada":{"CanadaSO":["CanadaLO"]},"Singapore":{"SingaporeSO":["Orchard","Raffles","Robinson","Tanjong","Tras"]},"United Kingdom":{"UnitedSO":["UnitedLO"]},"United States of America":{"AmericaSO":["AmericaLO"]}}"
|
|
@@ -1131,7 +1090,7 @@
|
|
|
1131
1090
|
</div>
|
|
1132
1091
|
|
|
1133
1092
|
</sf-i-events> -->
|
|
1134
|
-
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1093
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1135
1094
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1136
1095
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1137
1096
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -1150,7 +1109,7 @@
|
|
|
1150
1109
|
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"}]"
|
|
1151
1110
|
eventpreviewfields="["obligation"]"
|
|
1152
1111
|
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1153
|
-
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="
|
|
1112
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2026" contractstartdate="1/4/2024">
|
|
1154
1113
|
|
|
1155
1114
|
<div slot="uploader">
|
|
1156
1115
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
@@ -1162,7 +1121,39 @@
|
|
|
1162
1121
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1163
1122
|
</div>
|
|
1164
1123
|
|
|
1165
|
-
</sf-i-events>
|
|
1124
|
+
</sf-i-events> -->
|
|
1125
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1126
|
+
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1127
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1128
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1129
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1130
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1131
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1132
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1133
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws"
|
|
1134
|
+
apiiddashboard="api2.flagggrc.tech/dashboard-api" apiidupload="1peg5170d3" apiregionupload="us-east-1" fill="solid"
|
|
1135
|
+
username="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca"
|
|
1136
|
+
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
1137
|
+
entityid="c989a44e-7d3d-427e-b712-90eacf585075" locationid="4fb7b672-5cce-443f-869b-6b35247d6331"
|
|
1138
|
+
selectedcriteria="Location - Pune" myrole="functionhead" showregisterexport="false"
|
|
1139
|
+
features="["notices","contracts","licenses","rcmresources"]"
|
|
1140
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1141
|
+
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"}]"
|
|
1142
|
+
eventpreviewfields="["obligation"]"
|
|
1143
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1144
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2026" contractstartdate="1/4/2024">
|
|
1145
|
+
|
|
1146
|
+
<div slot="uploader">
|
|
1147
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1148
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1149
|
+
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
1150
|
+
allowdownload="yes"></sf-i-uploader>
|
|
1151
|
+
</div>
|
|
1152
|
+
<div slot="reporting">
|
|
1153
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1154
|
+
</div>
|
|
1155
|
+
|
|
1156
|
+
</sf-i-events> -->
|
|
1166
1157
|
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1167
1158
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1168
1159
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
@@ -1303,7 +1294,7 @@
|
|
|
1303
1294
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1304
1295
|
</div>
|
|
1305
1296
|
</sf-i-events> -->
|
|
1306
|
-
|
|
1297
|
+
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1307
1298
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1308
1299
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1309
1300
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -1334,7 +1325,7 @@
|
|
|
1334
1325
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1335
1326
|
</div>
|
|
1336
1327
|
|
|
1337
|
-
</sf-i-events>
|
|
1328
|
+
</sf-i-events>
|
|
1338
1329
|
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1339
1330
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1340
1331
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -836,6 +836,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
836
836
|
uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string | undefined, reportformatschema: string | undefined, module: string | undefined, percentage: string | undefined, makercheckers: any, reportedlocations?: string) => Promise<boolean>;
|
|
837
837
|
uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
|
|
838
838
|
sendSuggestions: (eventid: string, eventdelta: any) => Promise<boolean>;
|
|
839
|
+
exportCompliances: (startDate?: string, endDate?: string, list?: string, month?: string, year?: string, flagReporting?: boolean) => Promise<void>;
|
|
839
840
|
exportRegister: () => Promise<void>;
|
|
840
841
|
uploadMapping: () => Promise<void>;
|
|
841
842
|
uploadEvents: () => Promise<void>;
|
package/sf-i-events.js
CHANGED
|
@@ -8938,6 +8938,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8938
8938
|
//let nowYear = new Date().getFullYear();
|
|
8939
8939
|
let nowYear = parseInt(this.getCurrentYear(nowMonth + ""));
|
|
8940
8940
|
let lastMonth = -1;
|
|
8941
|
+
let lastDate = new Date(nowYear, month, 0).getDate() + "";
|
|
8941
8942
|
let nextMonth = -1;
|
|
8942
8943
|
console.log('calculating startAndEndOfStream', index, nowMonth, currentMonth);
|
|
8943
8944
|
let lastMonthsYear = -1;
|
|
@@ -9127,8 +9128,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9127
9128
|
// } else {
|
|
9128
9129
|
// nextMonthsYear = parseInt(this.calendarStartYYYY) + 1;
|
|
9129
9130
|
// }
|
|
9130
|
-
let startDate = ("0" + lastMonth).slice(-2) + "/25/" + lastMonthsYear;
|
|
9131
|
-
let
|
|
9131
|
+
// let startDate = ("0" + lastMonth).slice(-2) + "/25/" + lastMonthsYear;
|
|
9132
|
+
let startDate = ("0" + currentMonth).slice(-2) + "/01/" + nowYear;
|
|
9133
|
+
let endDate = ("0" + currentMonth).slice(-2) + "/" + lastDate + "/" + nowYear;
|
|
9134
|
+
// let endDate = ("0" + nextMonth).slice(-2) + "/01/" + nextMonthsYear;
|
|
9135
|
+
console.log(lastMonth, lastMonthsYear, nextMonth, nextMonthsYear);
|
|
9132
9136
|
return { startDate: startDate, endDate: endDate };
|
|
9133
9137
|
}
|
|
9134
9138
|
else {
|
|
@@ -16428,7 +16432,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16428
16432
|
if (this.mode == "consumer" || this.mode == "next" || this.mode == "viewer") {
|
|
16429
16433
|
if (this.mode != "viewer" && !fromDrilldown) {
|
|
16430
16434
|
html += '<div part="reporting-view-container" class="m-20" id="reporting-view-container">';
|
|
16431
|
-
html += this.renderReporting(event, mmddyyyy);
|
|
16435
|
+
// html += this.renderReporting(event, mmddyyyy);
|
|
16432
16436
|
html += "</div>";
|
|
16433
16437
|
}
|
|
16434
16438
|
html += '<div class="d-flex justify-between m-20">';
|
|
@@ -23465,15 +23469,15 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23465
23469
|
<div class="p-10 mr-10 w-100">
|
|
23466
23470
|
<div part="td-head">Reports</div>
|
|
23467
23471
|
<div part="td-body" class="d-flex align-center mt-10 flex-wrap">
|
|
23468
|
-
<div class="mr-10 d-flex align-center mb-10">
|
|
23472
|
+
<!-- <div class="mr-10 d-flex align-center mb-10">
|
|
23469
23473
|
<input type="radio" id="radio-csv" class="switch-csv" value="Excel" checked name="radio-report" part="radio-download"/>
|
|
23470
23474
|
<label for="radio-csv" part="label-radio-download" class="mr-10">Summary (CSV)</label>
|
|
23471
|
-
</div
|
|
23475
|
+
</div>-->
|
|
23472
23476
|
<div class="mr-10 d-flex align-center mb-10">
|
|
23473
23477
|
<input type="radio" id="radio-image" class="switch-image" value="Image" name="radio-report" part="radio-download"/>
|
|
23474
23478
|
<label for="radio-image" part="label-radio-download" class="mr-10">Image (PNG)</label>
|
|
23475
23479
|
</div>
|
|
23476
|
-
<div class="mr-10 d-flex align-center mb-10">
|
|
23480
|
+
<!-- <div class="mr-10 d-flex align-center mb-10">
|
|
23477
23481
|
<input type="radio" id="radio-stats" class="switch-image" value="Stats" name="radio-report" part="radio-download"/>
|
|
23478
23482
|
<label for="radio-stats" part="label-radio-download" class="mr-10">Stats (HTML)</label>
|
|
23479
23483
|
</div>
|
|
@@ -23492,6 +23496,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23492
23496
|
<div class="mr-10 d-flex align-center mb-10">
|
|
23493
23497
|
<input type="radio" id="radio-certificate" class="switch-image" value="Certificate" name="radio-report" part="radio-download"/>
|
|
23494
23498
|
<label for="radio-certificate" part="label-radio-download" class="mr-10">Certificate (HTML)</label>
|
|
23499
|
+
</div>-->
|
|
23500
|
+
<div class="mr-10 d-flex align-center mb-10">
|
|
23501
|
+
<input type="radio" id="radio-list" class="switch-image" value="List" name="radio-report" part="radio-download"/>
|
|
23502
|
+
<label for="radio-list" part="label-radio-download" class="mr-10">List and Certificate (Email)</label>
|
|
23495
23503
|
</div>
|
|
23496
23504
|
</div>
|
|
23497
23505
|
<div class="d-flex mt-10">
|
|
@@ -23609,7 +23617,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23609
23617
|
if (selectedTab === -1 && !(radioImage.checked)) {
|
|
23610
23618
|
let oldFilters = this.selectedFilters;
|
|
23611
23619
|
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
23612
|
-
await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no", "00", this.calendarStartYYYY, true)
|
|
23620
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no", "00", this.calendarStartYYYY, true)
|
|
23613
23621
|
}
|
|
23614
23622
|
else if (this.selectedFeatures.indexOf('notices') >= 0) {
|
|
23615
23623
|
await this.fetchAndRenderNotices(this.sdate, this.edate, "", "no");
|
|
@@ -23703,20 +23711,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23703
23711
|
a.click();
|
|
23704
23712
|
}
|
|
23705
23713
|
if (radioList === null || radioList === void 0 ? void 0 : radioList.checked) {
|
|
23706
|
-
const ts = new Date();
|
|
23707
|
-
var html = this.COMPLIANCES_HTML;
|
|
23708
|
-
html = html.replace(/PROJECT_NAME/g, this.projectName);
|
|
23709
|
-
html = html.replace(/FILTERS_DATA/g, '');
|
|
23710
|
-
html = html.replace(/REPORT_DATE/g, new Date().getDate() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getFullYear() + " " + new Date().getHours() + ":" + new Date().getMinutes() + ' for the period ' + this.period);
|
|
23711
|
-
let tempHtml = "";
|
|
23712
|
-
tempHtml += this.getFilteredString();
|
|
23713
|
-
html = html.replace(/PERSON_COMPLIANCES/g, tempHtml);
|
|
23714
|
-
const blob = new Blob([html], { type: 'text/html' });
|
|
23715
|
-
const url = window.URL.createObjectURL(blob)
|
|
23716
|
-
const a = document.createElement('a')
|
|
23717
|
-
a.setAttribute('href', url)
|
|
23718
|
-
a.setAttribute('download', 'report_' + ts + '.html');
|
|
23719
|
-
a.click()
|
|
23714
|
+
// const ts = new Date();
|
|
23715
|
+
// var html = this.COMPLIANCES_HTML;
|
|
23716
|
+
// html = html.replace(/PROJECT_NAME/g, this.projectName);
|
|
23717
|
+
// html = html.replace(/FILTERS_DATA/g, '');
|
|
23718
|
+
// html = html.replace(/REPORT_DATE/g, new Date().getDate() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getFullYear() + " " + new Date().getHours() + ":" + new Date().getMinutes() + ' for the period ' + this.period);
|
|
23719
|
+
// let tempHtml: string = "";
|
|
23720
|
+
// tempHtml += this.getFilteredString();
|
|
23721
|
+
// html = html.replace(/PERSON_COMPLIANCES/g, tempHtml);
|
|
23722
|
+
// const blob = new Blob([html], { type: 'text/html' });
|
|
23723
|
+
// const url = window.URL.createObjectURL(blob)
|
|
23724
|
+
// const a = document.createElement('a')
|
|
23725
|
+
// a.setAttribute('href', url)
|
|
23726
|
+
// a.setAttribute('download', 'report_' + ts + '.html');
|
|
23727
|
+
// a.click()
|
|
23728
|
+
this.exportCompliances(this.sdate, this.edate, "", "00", this.calendarStartYYYY, true);
|
|
23720
23729
|
}
|
|
23721
23730
|
if (radioListCsv === null || radioListCsv === void 0 ? void 0 : radioListCsv.checked) {
|
|
23722
23731
|
const ts = new Date();
|
|
@@ -27848,6 +27857,65 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
27848
27857
|
}
|
|
27849
27858
|
return retValue;
|
|
27850
27859
|
};
|
|
27860
|
+
this.exportCompliances = async (startDate = "", endDate = "", list = "yes", month = "00", year = this.calendarStartYYYY, flagReporting = false) => {
|
|
27861
|
+
let view = "";
|
|
27862
|
+
this.sdate = startDate;
|
|
27863
|
+
this.edate = endDate;
|
|
27864
|
+
this.suspenseCount = this.suspenseFlag ? this.suspenseCount : 0;
|
|
27865
|
+
if (this.tagId != null && this.tagId != "") {
|
|
27866
|
+
view = "tag";
|
|
27867
|
+
}
|
|
27868
|
+
else if (this.countryId != null && this.countryId != "") {
|
|
27869
|
+
view = "country";
|
|
27870
|
+
}
|
|
27871
|
+
else if (this.locationId != null && this.locationId != "") {
|
|
27872
|
+
view = "location";
|
|
27873
|
+
}
|
|
27874
|
+
else {
|
|
27875
|
+
view = "entity";
|
|
27876
|
+
}
|
|
27877
|
+
let sDate = "";
|
|
27878
|
+
let eDate = "";
|
|
27879
|
+
//console.log('currenttab', this.getCurrentTab());
|
|
27880
|
+
if (this.getCurrentTab() == this.TAB_YEAR) {
|
|
27881
|
+
sDate = "03/31/" + this.calendarStartYYYY;
|
|
27882
|
+
eDate = "04/01/" + (parseInt(this.calendarStartYYYY) + 1);
|
|
27883
|
+
}
|
|
27884
|
+
else {
|
|
27885
|
+
sDate = startDate;
|
|
27886
|
+
eDate = endDate;
|
|
27887
|
+
}
|
|
27888
|
+
//console.log('fetch calendar url', url);
|
|
27889
|
+
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": this.entityId, "countryid": this.countryId, "functionid": this.functionId, "locationid": this.locationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": view, "year": year, "list": list, "month": month, "suspense": this.suspenseFlag, "contractstartdate": this.contractStartDate, flagreporting: flagReporting };
|
|
27890
|
+
if (this.showReportedLocations) {
|
|
27891
|
+
urlBody["reportedlocations"] = "yes";
|
|
27892
|
+
}
|
|
27893
|
+
let url = "https://" + this.apiId + "/schedulecomplianceexportjob";
|
|
27894
|
+
urlBody["admin"] = (this.showRegisterExport && this.showRegisterExport == "true");
|
|
27895
|
+
console.log('exporting compliances...', urlBody);
|
|
27896
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
27897
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization));
|
|
27898
|
+
this._SfLoader.innerHTML = '';
|
|
27899
|
+
if (xhr.status == 200) {
|
|
27900
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
27901
|
+
console.log('jsonResponse sync', jsonRespose);
|
|
27902
|
+
this.setSuccess("Compliance data export started successfully! You will get an email with requested data.");
|
|
27903
|
+
setTimeout(() => {
|
|
27904
|
+
this.clearMessages();
|
|
27905
|
+
}, 5000);
|
|
27906
|
+
}
|
|
27907
|
+
else {
|
|
27908
|
+
if (xhr.status == 401) {
|
|
27909
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
27910
|
+
this.dispatchEvent(changeEvent);
|
|
27911
|
+
}
|
|
27912
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
27913
|
+
this.setError(jsonRespose.error);
|
|
27914
|
+
setTimeout(() => {
|
|
27915
|
+
this.clearMessages();
|
|
27916
|
+
}, 3000);
|
|
27917
|
+
}
|
|
27918
|
+
};
|
|
27851
27919
|
this.exportRegister = async () => {
|
|
27852
27920
|
let url = "https://" + this.apiId + "/scheduleregisterexportjob";
|
|
27853
27921
|
const body = {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -12066,6 +12066,7 @@ export class SfIEvents extends LitElement {
|
|
|
12066
12066
|
//let nowYear = new Date().getFullYear();
|
|
12067
12067
|
let nowYear = parseInt(this.getCurrentYear(nowMonth + ""));
|
|
12068
12068
|
let lastMonth = -1;
|
|
12069
|
+
let lastDate = new Date(nowYear, month, 0).getDate() + "";
|
|
12069
12070
|
let nextMonth = -1;
|
|
12070
12071
|
console.log('calculating startAndEndOfStream', index, nowMonth, currentMonth)
|
|
12071
12072
|
let lastMonthsYear = -1;
|
|
@@ -12267,9 +12268,11 @@ export class SfIEvents extends LitElement {
|
|
|
12267
12268
|
// nextMonthsYear = parseInt(this.calendarStartYYYY) + 1;
|
|
12268
12269
|
// }
|
|
12269
12270
|
|
|
12270
|
-
let startDate = ("0" + lastMonth).slice(-2) + "/25/" + lastMonthsYear;
|
|
12271
|
-
let
|
|
12272
|
-
|
|
12271
|
+
// let startDate = ("0" + lastMonth).slice(-2) + "/25/" + lastMonthsYear;
|
|
12272
|
+
let startDate = ("0" + currentMonth).slice(-2) + "/01/" + nowYear;
|
|
12273
|
+
let endDate = ("0" + currentMonth).slice(-2) + "/" + lastDate + "/" + nowYear;
|
|
12274
|
+
// let endDate = ("0" + nextMonth).slice(-2) + "/01/" + nextMonthsYear;
|
|
12275
|
+
console.log(lastMonth, lastMonthsYear, nextMonth, nextMonthsYear)
|
|
12273
12276
|
return { startDate: startDate, endDate: endDate };
|
|
12274
12277
|
|
|
12275
12278
|
} else {
|
|
@@ -20666,7 +20669,7 @@ export class SfIEvents extends LitElement {
|
|
|
20666
20669
|
if (this.mode == "consumer" || this.mode == "next" || this.mode == "viewer") {
|
|
20667
20670
|
if (this.mode != "viewer" && !fromDrilldown) {
|
|
20668
20671
|
html += '<div part="reporting-view-container" class="m-20" id="reporting-view-container">'
|
|
20669
|
-
html += this.renderReporting(event, mmddyyyy);
|
|
20672
|
+
// html += this.renderReporting(event, mmddyyyy);
|
|
20670
20673
|
html += "</div>"
|
|
20671
20674
|
}
|
|
20672
20675
|
|
|
@@ -29240,15 +29243,15 @@ export class SfIEvents extends LitElement {
|
|
|
29240
29243
|
<div class="p-10 mr-10 w-100">
|
|
29241
29244
|
<div part="td-head">Reports</div>
|
|
29242
29245
|
<div part="td-body" class="d-flex align-center mt-10 flex-wrap">
|
|
29243
|
-
<div class="mr-10 d-flex align-center mb-10">
|
|
29246
|
+
<!-- <div class="mr-10 d-flex align-center mb-10">
|
|
29244
29247
|
<input type="radio" id="radio-csv" class="switch-csv" value="Excel" checked name="radio-report" part="radio-download"/>
|
|
29245
29248
|
<label for="radio-csv" part="label-radio-download" class="mr-10">Summary (CSV)</label>
|
|
29246
|
-
</div
|
|
29249
|
+
</div>-->
|
|
29247
29250
|
<div class="mr-10 d-flex align-center mb-10">
|
|
29248
29251
|
<input type="radio" id="radio-image" class="switch-image" value="Image" name="radio-report" part="radio-download"/>
|
|
29249
29252
|
<label for="radio-image" part="label-radio-download" class="mr-10">Image (PNG)</label>
|
|
29250
29253
|
</div>
|
|
29251
|
-
<div class="mr-10 d-flex align-center mb-10">
|
|
29254
|
+
<!-- <div class="mr-10 d-flex align-center mb-10">
|
|
29252
29255
|
<input type="radio" id="radio-stats" class="switch-image" value="Stats" name="radio-report" part="radio-download"/>
|
|
29253
29256
|
<label for="radio-stats" part="label-radio-download" class="mr-10">Stats (HTML)</label>
|
|
29254
29257
|
</div>
|
|
@@ -29267,6 +29270,10 @@ export class SfIEvents extends LitElement {
|
|
|
29267
29270
|
<div class="mr-10 d-flex align-center mb-10">
|
|
29268
29271
|
<input type="radio" id="radio-certificate" class="switch-image" value="Certificate" name="radio-report" part="radio-download"/>
|
|
29269
29272
|
<label for="radio-certificate" part="label-radio-download" class="mr-10">Certificate (HTML)</label>
|
|
29273
|
+
</div>-->
|
|
29274
|
+
<div class="mr-10 d-flex align-center mb-10">
|
|
29275
|
+
<input type="radio" id="radio-list" class="switch-image" value="List" name="radio-report" part="radio-download"/>
|
|
29276
|
+
<label for="radio-list" part="label-radio-download" class="mr-10">List and Certificate (Email)</label>
|
|
29270
29277
|
</div>
|
|
29271
29278
|
</div>
|
|
29272
29279
|
<div class="d-flex mt-10">
|
|
@@ -29385,7 +29392,7 @@ export class SfIEvents extends LitElement {
|
|
|
29385
29392
|
if (selectedTab === -1 && !(radioImage.checked)) {
|
|
29386
29393
|
let oldFilters = this.selectedFilters
|
|
29387
29394
|
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
29388
|
-
await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no", "00", this.calendarStartYYYY, true)
|
|
29395
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no", "00", this.calendarStartYYYY, true)
|
|
29389
29396
|
} else if (this.selectedFeatures.indexOf('notices') >= 0) {
|
|
29390
29397
|
await this.fetchAndRenderNotices(this.sdate, this.edate, "", "no");
|
|
29391
29398
|
} else if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
@@ -29486,23 +29493,24 @@ export class SfIEvents extends LitElement {
|
|
|
29486
29493
|
}
|
|
29487
29494
|
|
|
29488
29495
|
if (radioList?.checked) {
|
|
29489
|
-
const ts = new Date();
|
|
29496
|
+
// const ts = new Date();
|
|
29490
29497
|
|
|
29491
|
-
var html = this.COMPLIANCES_HTML;
|
|
29492
|
-
html = html.replace(/PROJECT_NAME/g, this.projectName);
|
|
29493
|
-
html = html.replace(/FILTERS_DATA/g, '');
|
|
29494
|
-
html = html.replace(/REPORT_DATE/g, new Date().getDate() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getFullYear() + " " + new Date().getHours() + ":" + new Date().getMinutes() + ' for the period ' + this.period);
|
|
29498
|
+
// var html = this.COMPLIANCES_HTML;
|
|
29499
|
+
// html = html.replace(/PROJECT_NAME/g, this.projectName);
|
|
29500
|
+
// html = html.replace(/FILTERS_DATA/g, '');
|
|
29501
|
+
// html = html.replace(/REPORT_DATE/g, new Date().getDate() + "/" + (new Date().getMonth() + 1) + "/" + new Date().getFullYear() + " " + new Date().getHours() + ":" + new Date().getMinutes() + ' for the period ' + this.period);
|
|
29495
29502
|
|
|
29496
|
-
let tempHtml: string = "";
|
|
29497
|
-
tempHtml += this.getFilteredString();
|
|
29498
|
-
html = html.replace(/PERSON_COMPLIANCES/g, tempHtml);
|
|
29503
|
+
// let tempHtml: string = "";
|
|
29504
|
+
// tempHtml += this.getFilteredString();
|
|
29505
|
+
// html = html.replace(/PERSON_COMPLIANCES/g, tempHtml);
|
|
29499
29506
|
|
|
29500
|
-
const blob = new Blob([html], { type: 'text/html' });
|
|
29501
|
-
const url = window.URL.createObjectURL(blob)
|
|
29502
|
-
const a = document.createElement('a')
|
|
29503
|
-
a.setAttribute('href', url)
|
|
29504
|
-
a.setAttribute('download', 'report_' + ts + '.html');
|
|
29505
|
-
a.click()
|
|
29507
|
+
// const blob = new Blob([html], { type: 'text/html' });
|
|
29508
|
+
// const url = window.URL.createObjectURL(blob)
|
|
29509
|
+
// const a = document.createElement('a')
|
|
29510
|
+
// a.setAttribute('href', url)
|
|
29511
|
+
// a.setAttribute('download', 'report_' + ts + '.html');
|
|
29512
|
+
// a.click()
|
|
29513
|
+
this.exportCompliances(this.sdate, this.edate, "", "00", this.calendarStartYYYY, true)
|
|
29506
29514
|
}
|
|
29507
29515
|
|
|
29508
29516
|
if (radioListCsv?.checked) {
|
|
@@ -34353,6 +34361,73 @@ export class SfIEvents extends LitElement {
|
|
|
34353
34361
|
return retValue;
|
|
34354
34362
|
}
|
|
34355
34363
|
|
|
34364
|
+
exportCompliances = async (startDate: string = "", endDate: string = "", list: string = "yes", month: string = "00", year: string = this.calendarStartYYYY, flagReporting: boolean = false) => {
|
|
34365
|
+
|
|
34366
|
+
let view = "";
|
|
34367
|
+
this.sdate = startDate;
|
|
34368
|
+
this.edate = endDate;
|
|
34369
|
+
this.suspenseCount = this.suspenseFlag ? this.suspenseCount : 0;
|
|
34370
|
+
if (this.tagId != null && this.tagId != "") {
|
|
34371
|
+
view = "tag";
|
|
34372
|
+
} else if (this.countryId != null && this.countryId != "") {
|
|
34373
|
+
view = "country";
|
|
34374
|
+
} else if (this.locationId != null && this.locationId != "") {
|
|
34375
|
+
view = "location";
|
|
34376
|
+
} else {
|
|
34377
|
+
view = "entity";
|
|
34378
|
+
}
|
|
34379
|
+
|
|
34380
|
+
let sDate = "";
|
|
34381
|
+
let eDate = "";
|
|
34382
|
+
|
|
34383
|
+
//console.log('currenttab', this.getCurrentTab());
|
|
34384
|
+
|
|
34385
|
+
if (this.getCurrentTab() == this.TAB_YEAR) {
|
|
34386
|
+
sDate = "03/31/" + this.calendarStartYYYY;
|
|
34387
|
+
eDate = "04/01/" + (parseInt(this.calendarStartYYYY) + 1);
|
|
34388
|
+
} else {
|
|
34389
|
+
sDate = startDate;
|
|
34390
|
+
eDate = endDate;
|
|
34391
|
+
}
|
|
34392
|
+
|
|
34393
|
+
//console.log('fetch calendar url', url);
|
|
34394
|
+
let urlBody: any = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": this.entityId, "countryid": this.countryId, "functionid": this.functionId, "locationid": this.locationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": view, "year": year, "list": list, "month": month, "suspense": this.suspenseFlag, "contractstartdate": this.contractStartDate, flagreporting: flagReporting };
|
|
34395
|
+
|
|
34396
|
+
if (this.showReportedLocations) {
|
|
34397
|
+
urlBody["reportedlocations"] = "yes";
|
|
34398
|
+
}
|
|
34399
|
+
let url = "https://" + this.apiId + "/schedulecomplianceexportjob";
|
|
34400
|
+
|
|
34401
|
+
urlBody["admin"] = (this.showRegisterExport && this.showRegisterExport == "true")
|
|
34402
|
+
|
|
34403
|
+
|
|
34404
|
+
console.log('exporting compliances...', urlBody);
|
|
34405
|
+
|
|
34406
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
34407
|
+
const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization)) as any;
|
|
34408
|
+
this._SfLoader.innerHTML = '';
|
|
34409
|
+
if (xhr.status == 200) {
|
|
34410
|
+
|
|
34411
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
34412
|
+
console.log('jsonResponse sync', jsonRespose);
|
|
34413
|
+
this.setSuccess("Compliance data export started successfully! You will get an email with requested data.");
|
|
34414
|
+
setTimeout(() => {
|
|
34415
|
+
this.clearMessages();
|
|
34416
|
+
}, 5000);
|
|
34417
|
+
|
|
34418
|
+
} else {
|
|
34419
|
+
if (xhr.status == 401) {
|
|
34420
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
34421
|
+
this.dispatchEvent(changeEvent);
|
|
34422
|
+
}
|
|
34423
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
34424
|
+
this.setError(jsonRespose.error);
|
|
34425
|
+
setTimeout(() => {
|
|
34426
|
+
this.clearMessages()
|
|
34427
|
+
}, 3000);
|
|
34428
|
+
}
|
|
34429
|
+
}
|
|
34430
|
+
|
|
34356
34431
|
exportRegister = async () => {
|
|
34357
34432
|
|
|
34358
34433
|
let url = "https://" + this.apiId + "/scheduleregisterexportjob";
|