sf-i-events 1.0.1068 → 1.0.1069
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 +77 -9
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -0
- package/sf-i-events.js +28 -3
- package/src/sf-i-events.ts +36 -6
package/dev/index.html
CHANGED
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
</div>
|
|
1214
1214
|
|
|
1215
1215
|
</sf-i-events> -->
|
|
1216
|
-
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1216
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1217
1217
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1218
1218
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1219
1219
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -1244,7 +1244,39 @@
|
|
|
1244
1244
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1245
1245
|
</div>
|
|
1246
1246
|
|
|
1247
|
-
</sf-i-events>
|
|
1247
|
+
</sf-i-events> -->
|
|
1248
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1249
|
+
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1250
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1251
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1252
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1253
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1254
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1255
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1256
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws"
|
|
1257
|
+
apiiddashboard="api2.flagggrc.tech/dashboard-api" apiidupload="1peg5170d3" apiregionupload="us-east-1" fill="solid"
|
|
1258
|
+
username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410"
|
|
1259
|
+
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
1260
|
+
entityid="c989a44e-7d3d-427e-b712-90eacf585075" locationid="4fb7b672-5cce-443f-869b-6b35247d6331"
|
|
1261
|
+
selectedcriteria="Location - Pune" myrole="reporter" showregisterexport="false"
|
|
1262
|
+
features="["notices","contracts","licenses","rcmresources"]"
|
|
1263
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1264
|
+
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"}]"
|
|
1265
|
+
eventpreviewfields="["obligation"]"
|
|
1266
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1267
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2026" contractstartdate="1/4/2024">
|
|
1268
|
+
|
|
1269
|
+
<div slot="uploader">
|
|
1270
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1271
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1272
|
+
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
1273
|
+
allowdownload="yes"></sf-i-uploader>
|
|
1274
|
+
</div>
|
|
1275
|
+
<div slot="reporting">
|
|
1276
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1277
|
+
</div>
|
|
1278
|
+
|
|
1279
|
+
</sf-i-events> -->
|
|
1248
1280
|
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="api2.flagggrc.tech/event-api"
|
|
1249
1281
|
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
1250
1282
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -1318,26 +1350,62 @@
|
|
|
1318
1350
|
</div>
|
|
1319
1351
|
|
|
1320
1352
|
</sf-i-events> -->
|
|
1321
|
-
|
|
1353
|
+
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1354
|
+
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1322
1355
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1323
1356
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1324
1357
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1325
1358
|
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1326
1359
|
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1327
|
-
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1360
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1361
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws"
|
|
1362
|
+
apiiddashboard="api2.flagggrc.tech/dashboard-api" apiidupload="1peg5170d3" apiregionupload="us-east-1" fill="solid"
|
|
1363
|
+
username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb"
|
|
1364
|
+
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
1365
|
+
countryid="07d73b44-648d-4301-82c4-d6df43397824" selectedcriteria="Country - India" myrole="viewer"
|
|
1366
|
+
showregisterexport="false"
|
|
1331
1367
|
features="["notices","contracts","licenses","rcmresources"]"
|
|
1332
1368
|
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1333
1369
|
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"}]"
|
|
1334
1370
|
eventpreviewfields="["obligation"]"
|
|
1335
1371
|
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1336
|
-
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="
|
|
1372
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2026" contractstartdate="1/4/2024">
|
|
1337
1373
|
|
|
1338
1374
|
<div slot="uploader">
|
|
1339
1375
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1340
|
-
allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
1376
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1377
|
+
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
1378
|
+
allowdownload="yes"></sf-i-uploader>
|
|
1379
|
+
</div>
|
|
1380
|
+
<div slot="reporting">
|
|
1381
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1382
|
+
</div>
|
|
1383
|
+
|
|
1384
|
+
</sf-i-events>
|
|
1385
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1386
|
+
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1387
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1388
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1389
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1390
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1391
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1392
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1393
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws"
|
|
1394
|
+
apiiddashboard="api2.flagggrc.tech/dashboard-api" apiidupload="1peg5170d3" apiregionupload="us-east-1" fill="solid"
|
|
1395
|
+
username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb"
|
|
1396
|
+
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
1397
|
+
entityid="c989a44e-7d3d-427e-b712-90eacf585075" locationid="4fb7b672-5cce-443f-869b-6b35247d6331"
|
|
1398
|
+
selectedcriteria="Location - Pune" myrole="viewer" showregisterexport="false"
|
|
1399
|
+
features="["notices","contracts","licenses","rcmresources"]"
|
|
1400
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1401
|
+
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"}]"
|
|
1402
|
+
eventpreviewfields="["obligation"]"
|
|
1403
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1404
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2026" contractstartdate="1/4/2024">
|
|
1405
|
+
|
|
1406
|
+
<div slot="uploader">
|
|
1407
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1408
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1341
1409
|
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
1342
1410
|
allowdownload="yes"></sf-i-uploader>
|
|
1343
1411
|
</div>
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -116,6 +116,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
116
116
|
[key: string]: Array<string>;
|
|
117
117
|
};
|
|
118
118
|
chartSelectedLegend: Array<number>;
|
|
119
|
+
statisticsLoadLocation: boolean;
|
|
119
120
|
selectedFilters: any;
|
|
120
121
|
barCharDataSet2: Array<any>;
|
|
121
122
|
barCharDataSet2Arr: Array<any>;
|
package/sf-i-events.js
CHANGED
|
@@ -878,6 +878,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
878
878
|
this.COLS_REGS = ["jurisdiction", "subcategory", "obligationtype", "obligationtitle", "applicability", "obligation", "reporters", "approvers", "risk"];
|
|
879
879
|
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
880
880
|
this.chartSelectedLegend = [];
|
|
881
|
+
this.statisticsLoadLocation = false;
|
|
881
882
|
this.selectedFilters = null;
|
|
882
883
|
this.barCharDataSet2 = [];
|
|
883
884
|
this.barCharDataSet2Arr = [];
|
|
@@ -6183,6 +6184,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6183
6184
|
}
|
|
6184
6185
|
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria);
|
|
6185
6186
|
selectFilterCriteriaNew.addEventListener('change', (ev) => {
|
|
6187
|
+
console.log('statsoption change triggered');
|
|
6186
6188
|
let target = ev.target;
|
|
6187
6189
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria');
|
|
6188
6190
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values');
|
|
@@ -7270,8 +7272,26 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7270
7272
|
//console.log('tsend', tsEnd);
|
|
7271
7273
|
let meta = await this.fetchStatistics((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear(), filtercriteria, filtervalue, subfiltercriteria, subfiltervalue);
|
|
7272
7274
|
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), this._SfCustomContainer);
|
|
7273
|
-
if (meta != null)
|
|
7275
|
+
if (meta != null) {
|
|
7274
7276
|
this.renderStatisticsFilters(this._SfCustomContainer);
|
|
7277
|
+
if (this.statisticsLoadLocation && this.locationId != "") {
|
|
7278
|
+
this._SfCustomContainer.querySelector('#select-filter-criteria').value = 'location';
|
|
7279
|
+
this._SfCustomContainer.querySelector('#select-filter-criteria').dispatchEvent(new Event('change'));
|
|
7280
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
7281
|
+
this._SfCustomContainer.querySelector('#select-filter-values').value = this.locationId;
|
|
7282
|
+
for (let option of this._SfCustomContainer.querySelector('#select-filter-values').options) {
|
|
7283
|
+
console.log('statsoption value', option.value, this.locationId);
|
|
7284
|
+
if (option.value == this.locationId) {
|
|
7285
|
+
filtervalue = option.value;
|
|
7286
|
+
filtervaluename = option.innerHTML;
|
|
7287
|
+
break;
|
|
7288
|
+
}
|
|
7289
|
+
}
|
|
7290
|
+
this.statisticsLoadLocation = false;
|
|
7291
|
+
this._SfCustomContainer.querySelector('#select-filter-values').dispatchEvent(new Event('change'));
|
|
7292
|
+
// this.processDateSelectionViewer(eventContainer);
|
|
7293
|
+
}
|
|
7294
|
+
}
|
|
7275
7295
|
}
|
|
7276
7296
|
else if (valueStart != "" && valueEnd == "") {
|
|
7277
7297
|
this._SfStreamEventStatus.innerHTML = "Please select End Date";
|
|
@@ -9131,6 +9151,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9131
9151
|
this.clearGraphData();
|
|
9132
9152
|
this.clearSelectedGraphParam();
|
|
9133
9153
|
this.clearSelectedLegend();
|
|
9154
|
+
if (this.locationId != "") {
|
|
9155
|
+
this.statisticsLoadLocation = true;
|
|
9156
|
+
}
|
|
9134
9157
|
var html = '';
|
|
9135
9158
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
9136
9159
|
html += '<div class="title-item-date">';
|
|
@@ -28317,8 +28340,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
28317
28340
|
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28318
28341
|
this.dispatchEvent(changeEvent);
|
|
28319
28342
|
}
|
|
28320
|
-
|
|
28321
|
-
|
|
28343
|
+
if (xhr.status != 200) {
|
|
28344
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28345
|
+
this.setError(jsonRespose.error);
|
|
28346
|
+
}
|
|
28322
28347
|
}
|
|
28323
28348
|
};
|
|
28324
28349
|
this.fetchBulkReportingData = async () => {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -891,6 +891,8 @@ export class SfIEvents extends LitElement {
|
|
|
891
891
|
|
|
892
892
|
chartSelectedLegend: Array<number> = [];
|
|
893
893
|
|
|
894
|
+
statisticsLoadLocation: boolean = false;
|
|
895
|
+
|
|
894
896
|
selectedFilters: any = null;
|
|
895
897
|
|
|
896
898
|
barCharDataSet2: Array<any> = [];
|
|
@@ -8816,6 +8818,7 @@ export class SfIEvents extends LitElement {
|
|
|
8816
8818
|
|
|
8817
8819
|
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria)
|
|
8818
8820
|
selectFilterCriteriaNew.addEventListener('change', (ev: any) => {
|
|
8821
|
+
console.log('statsoption change triggered');
|
|
8819
8822
|
let target = ev.target as HTMLSelectElement
|
|
8820
8823
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria') as HTMLLabelElement
|
|
8821
8824
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values') as HTMLSelectElement
|
|
@@ -9967,6 +9970,7 @@ export class SfIEvents extends LitElement {
|
|
|
9967
9970
|
filtervaluename = ((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values-mobile') as HTMLSelectElement).options[((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values-mobile') as HTMLSelectElement).selectedIndex].innerHTML
|
|
9968
9971
|
}
|
|
9969
9972
|
}
|
|
9973
|
+
|
|
9970
9974
|
if (filtercriteria == "") {
|
|
9971
9975
|
this.htmlStatsFilter = "Filters Selected -> All"
|
|
9972
9976
|
} else {
|
|
@@ -10000,6 +10004,7 @@ export class SfIEvents extends LitElement {
|
|
|
10000
10004
|
subfiltercriterianame = ((this._SfCustomContainer as HTMLDivElement).querySelector('#select-subfilter-criteria-mobile') as HTMLSelectElement).options[((this._SfCustomContainer as HTMLDivElement).querySelector('#select-subfilter-criteria-mobile') as HTMLSelectElement).selectedIndex].innerHTML
|
|
10001
10005
|
}
|
|
10002
10006
|
}
|
|
10007
|
+
|
|
10003
10008
|
console.log('subfiltercriteria, subfiltercriterianame', subfiltercriteria, subfiltercriterianame)
|
|
10004
10009
|
if (valueStart != "" && valueEnd != "") {
|
|
10005
10010
|
this.initCustomRightColViewer();
|
|
@@ -10031,7 +10036,27 @@ export class SfIEvents extends LitElement {
|
|
|
10031
10036
|
let meta = await this.fetchStatistics((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear(), filtercriteria, filtervalue, subfiltercriteria, subfiltervalue);
|
|
10032
10037
|
this.renderRangeStatistics(new Date(valueStart), ((new Date(valueEnd).getTime()) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), (this._SfCustomContainer as HTMLDivElement));
|
|
10033
10038
|
|
|
10034
|
-
if (meta != null)
|
|
10039
|
+
if (meta != null) {
|
|
10040
|
+
this.renderStatisticsFilters((this._SfCustomContainer as HTMLDivElement))
|
|
10041
|
+
if (this.statisticsLoadLocation && this.locationId != "") {
|
|
10042
|
+
|
|
10043
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement).value = 'location';
|
|
10044
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement).dispatchEvent(new Event('change'))
|
|
10045
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
10046
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values') as HTMLSelectElement).value = this.locationId;
|
|
10047
|
+
for (let option of ((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values') as HTMLSelectElement).options) {
|
|
10048
|
+
console.log('statsoption value', option.value, this.locationId)
|
|
10049
|
+
if (option.value == this.locationId) {
|
|
10050
|
+
filtervalue = option.value
|
|
10051
|
+
filtervaluename = option.innerHTML
|
|
10052
|
+
break;
|
|
10053
|
+
}
|
|
10054
|
+
}
|
|
10055
|
+
this.statisticsLoadLocation = false;
|
|
10056
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values') as HTMLSelectElement).dispatchEvent(new Event('change'))
|
|
10057
|
+
// this.processDateSelectionViewer(eventContainer);
|
|
10058
|
+
}
|
|
10059
|
+
}
|
|
10035
10060
|
} else if (valueStart != "" && valueEnd == "") {
|
|
10036
10061
|
(this._SfStreamEventStatus as HTMLDivElement).innerHTML = "Please select End Date";
|
|
10037
10062
|
} else if (valueStart == "" && valueEnd != "") {
|
|
@@ -12291,6 +12316,9 @@ export class SfIEvents extends LitElement {
|
|
|
12291
12316
|
this.clearSelectedGraphParam();
|
|
12292
12317
|
this.clearSelectedLegend();
|
|
12293
12318
|
|
|
12319
|
+
if (this.locationId != "") {
|
|
12320
|
+
this.statisticsLoadLocation = true;
|
|
12321
|
+
}
|
|
12294
12322
|
var html = '';
|
|
12295
12323
|
|
|
12296
12324
|
html += '<div class="scroll-x w-100 mobile-only">';
|
|
@@ -15355,8 +15383,8 @@ export class SfIEvents extends LitElement {
|
|
|
15355
15383
|
if (cols[k].toLowerCase() == "shortid") {
|
|
15356
15384
|
|
|
15357
15385
|
shortId = (data[k]);
|
|
15358
|
-
|
|
15359
|
-
if(Util.isJSONParsable(shortId)){
|
|
15386
|
+
|
|
15387
|
+
if (Util.isJSONParsable(shortId)) {
|
|
15360
15388
|
shortId = JSON.parse(shortId)[0]
|
|
15361
15389
|
}
|
|
15362
15390
|
|
|
@@ -19861,7 +19889,7 @@ export class SfIEvents extends LitElement {
|
|
|
19861
19889
|
feedbackSuspenseVal = true
|
|
19862
19890
|
}
|
|
19863
19891
|
let shortid = event.shortid
|
|
19864
|
-
if(Util.isJSONParsable(event.shortid)){
|
|
19892
|
+
if (Util.isJSONParsable(event.shortid)) {
|
|
19865
19893
|
shortid = JSON.parse(event.shortid)[0]
|
|
19866
19894
|
}
|
|
19867
19895
|
this.uploadTriggerMyEvent(
|
|
@@ -35064,8 +35092,10 @@ export class SfIEvents extends LitElement {
|
|
|
35064
35092
|
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
35065
35093
|
this.dispatchEvent(changeEvent);
|
|
35066
35094
|
}
|
|
35067
|
-
|
|
35068
|
-
|
|
35095
|
+
if(xhr.status != 200){
|
|
35096
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
35097
|
+
this.setError(jsonRespose.error);
|
|
35098
|
+
}
|
|
35069
35099
|
}
|
|
35070
35100
|
|
|
35071
35101
|
}
|