sf-i-events 1.0.734 → 1.0.737
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/package.json +1 -1
- package/sf-i-events.d.ts +1 -1
- package/sf-i-events.js +119 -125
- package/src/sf-i-events.ts +128 -136
- package/src/util.ts +8 -1
- package/util.d.ts +2 -0
- package/util.js +7 -1
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -441,7 +441,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
441
441
|
getApproverStringFromEvent: (event: any) => string;
|
|
442
442
|
getApproverDetailStringFromEvent: (event: any) => string;
|
|
443
443
|
renderLatestCompliance: (mmddyyyy: string, event: any) => any;
|
|
444
|
-
getCompletenessStatus: (event: any) => "
|
|
444
|
+
getCompletenessStatus: (event: any) => "not-started" | "pending-approval" | "rejected" | "approved";
|
|
445
445
|
getTimelinessStatus: (mmdd: string, event: any, completeness: string) => "late-executed" | "late-reported" | "late-approved" | "past-due-date" | "in-time";
|
|
446
446
|
getComplianceStatus: (completeness: string, timeliness: string) => "scheduled" | "not-complied" | "partially-complied" | "complied";
|
|
447
447
|
numcalled: number;
|
package/sf-i-events.js
CHANGED
|
@@ -3528,9 +3528,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3528
3528
|
//console.log('rangeperiod', period)
|
|
3529
3529
|
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
3530
3530
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3531
|
+
if (eventsContainer.innerHTML.indexOf('button-select-all') < 0) {
|
|
3532
|
+
eventsContainer.insertAdjacentHTML('beforeend', this.renderSelectAllButtons());
|
|
3533
|
+
}
|
|
3534
3534
|
this.renderButtonRefresh(eventsContainer);
|
|
3535
3535
|
this.attachTimelineFilterHandlers(eventsContainer);
|
|
3536
3536
|
const radioExpander = eventsContainer.querySelector('#graph-radios-expander');
|
|
@@ -3573,80 +3573,82 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3573
3573
|
}
|
|
3574
3574
|
const streamEventsContainer = eventsContainer.querySelectorAll('.stream-events-container');
|
|
3575
3575
|
const buttonSelect = eventsContainer.querySelectorAll('.button-select');
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
buttonSelect
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
else {
|
|
3592
|
-
this.selectedItemIds.splice(this.selectedItemIds.indexOf(id), 1);
|
|
3593
|
-
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3594
|
-
listReportingContainer.style.display = 'none';
|
|
3595
|
-
listReportingContainer.innerHTML = '';
|
|
3596
|
-
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3597
|
-
buttonListReporting.setAttribute('part', 'button-list-reporting');
|
|
3598
|
-
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3599
|
-
streamEventTitle.removeAttribute('part');
|
|
3600
|
-
}
|
|
3601
|
-
if (this.selectedItemIds.length === 0) {
|
|
3602
|
-
for (var k = 0; k < buttonSelect.length; k++) {
|
|
3603
|
-
buttonSelect[k].style.display = 'block';
|
|
3604
|
-
streamEventsContainer[k].style.display = 'block';
|
|
3576
|
+
if (eventsContainer.innerHTML.indexOf('button-select-all') >= 0) {
|
|
3577
|
+
let selectAllArr = this.attachSelectAllListeners(eventsContainer, buttonSelect);
|
|
3578
|
+
const buttonSelectAll = selectAllArr[0];
|
|
3579
|
+
const buttonUnselectAll = selectAllArr[1];
|
|
3580
|
+
for (i = 0; i < buttonSelect.length; i++) {
|
|
3581
|
+
buttonSelect[i].addEventListener('click', (ev) => {
|
|
3582
|
+
//console.log('eventscontainer', streamEventsContainer.length, buttonSelect.length);
|
|
3583
|
+
const id = ev.target.id;
|
|
3584
|
+
const idArr = id.split("-");
|
|
3585
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
3586
|
+
const j = idArr[4];
|
|
3587
|
+
// const makercheckers = idArr[5];
|
|
3588
|
+
const docs = idArr[6];
|
|
3589
|
+
if (ev.target.checked) {
|
|
3590
|
+
this.selectedItemIds.push(id);
|
|
3605
3591
|
}
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
const id1 = id;
|
|
3616
|
-
const idArr1 = id1.split("-");
|
|
3617
|
-
const status = idArr1[13].replace(/_/g, '-');
|
|
3618
|
-
this.selectedStatus = status;
|
|
3592
|
+
else {
|
|
3593
|
+
this.selectedItemIds.splice(this.selectedItemIds.indexOf(id), 1);
|
|
3594
|
+
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3595
|
+
listReportingContainer.style.display = 'none';
|
|
3596
|
+
listReportingContainer.innerHTML = '';
|
|
3597
|
+
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3598
|
+
buttonListReporting.setAttribute('part', 'button-list-reporting');
|
|
3599
|
+
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3600
|
+
streamEventTitle.removeAttribute('part');
|
|
3619
3601
|
}
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
const docs1 = idArr1[6];
|
|
3625
|
-
const status = idArr1[13].replace(/_/g, '-');
|
|
3626
|
-
if (docs == docs1 && status == this.selectedStatus) {
|
|
3627
|
-
totalVisibleCount++;
|
|
3602
|
+
if (this.selectedItemIds.length === 0) {
|
|
3603
|
+
for (var k = 0; k < buttonSelect.length; k++) {
|
|
3604
|
+
buttonSelect[k].style.display = 'block';
|
|
3605
|
+
streamEventsContainer[k].style.display = 'block';
|
|
3628
3606
|
}
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3607
|
+
let bulkUploadLables = eventsContainer.querySelectorAll('.bulk-upload-label');
|
|
3608
|
+
for (let bulkUploadLable of bulkUploadLables) {
|
|
3609
|
+
bulkUploadLable.innerHTML = '';
|
|
3632
3610
|
}
|
|
3633
|
-
}
|
|
3634
|
-
let bulkUploadLables = eventsContainer.querySelectorAll('.bulk-upload-label');
|
|
3635
|
-
for (let bulkUploadLable of bulkUploadLables) {
|
|
3636
|
-
bulkUploadLable.innerHTML = `${this.selectedItemIds.length - 1} other ` + ((this.selectedItemIds.length - 1) === 1 ? `item` : `items`) + ` also selected`;
|
|
3637
|
-
}
|
|
3638
|
-
if (this.selectedItemIds.length >= parseInt(this.selectallblock) || this.selectedItemIds.length >= totalVisibleCount) {
|
|
3639
3611
|
buttonSelectAll.style.display = 'none';
|
|
3640
|
-
buttonUnselectAll.style.display = '
|
|
3612
|
+
buttonUnselectAll.style.display = 'none';
|
|
3641
3613
|
}
|
|
3642
3614
|
else {
|
|
3643
|
-
|
|
3644
|
-
|
|
3615
|
+
if (this.selectedItemIds.length === 1) {
|
|
3616
|
+
const id1 = id;
|
|
3617
|
+
const idArr1 = id1.split("-");
|
|
3618
|
+
const status = idArr1[13].replace(/_/g, '-');
|
|
3619
|
+
this.selectedStatus = status;
|
|
3620
|
+
}
|
|
3621
|
+
let totalVisibleCount = 0;
|
|
3622
|
+
for (var k = 0; k < buttonSelect.length; k++) {
|
|
3623
|
+
const id1 = buttonSelect[k].id;
|
|
3624
|
+
const idArr1 = id1.split("-");
|
|
3625
|
+
const docs1 = idArr1[6];
|
|
3626
|
+
const status = idArr1[13].replace(/_/g, '-');
|
|
3627
|
+
if (docs == docs1 && status == this.selectedStatus) {
|
|
3628
|
+
totalVisibleCount++;
|
|
3629
|
+
}
|
|
3630
|
+
else {
|
|
3631
|
+
buttonSelect[k].style.display = 'none';
|
|
3632
|
+
streamEventsContainer[k].style.display = 'none';
|
|
3633
|
+
}
|
|
3634
|
+
}
|
|
3635
|
+
let bulkUploadLables = eventsContainer.querySelectorAll('.bulk-upload-label');
|
|
3636
|
+
for (let bulkUploadLable of bulkUploadLables) {
|
|
3637
|
+
bulkUploadLable.innerHTML = `${this.selectedItemIds.length - 1} other ` + ((this.selectedItemIds.length - 1) === 1 ? `item` : `items`) + ` also selected`;
|
|
3638
|
+
}
|
|
3639
|
+
if (this.selectedItemIds.length >= parseInt(this.selectallblock) || this.selectedItemIds.length >= totalVisibleCount) {
|
|
3640
|
+
buttonSelectAll.style.display = 'none';
|
|
3641
|
+
buttonUnselectAll.style.display = 'flex';
|
|
3642
|
+
}
|
|
3643
|
+
else {
|
|
3644
|
+
buttonSelectAll.style.display = 'flex';
|
|
3645
|
+
buttonUnselectAll.style.display = 'none';
|
|
3646
|
+
}
|
|
3645
3647
|
}
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
}
|
|
3648
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block'
|
|
3649
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + ((new Date()).getFullYear() + ""));
|
|
3650
|
+
});
|
|
3651
|
+
}
|
|
3650
3652
|
}
|
|
3651
3653
|
// this.clearGraphData();
|
|
3652
3654
|
// //console.log('rendering range', firstDate, count);
|
|
@@ -4098,22 +4100,24 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4098
4100
|
let inputLabelFilter = eventsContainer.querySelector('#input-label-filter');
|
|
4099
4101
|
selectFilterCriteria.style.display = 'block';
|
|
4100
4102
|
inputLabelFilter.style.display = 'block';
|
|
4101
|
-
// let selectedCriteria = ""
|
|
4102
4103
|
selectFilterCriteria.innerHTML = "";
|
|
4103
4104
|
let option = new Option();
|
|
4104
4105
|
option.value = "";
|
|
4105
|
-
option.innerHTML = "
|
|
4106
|
+
option.innerHTML = "all";
|
|
4106
4107
|
selectFilterCriteria.add(option);
|
|
4107
4108
|
for (let criteria of Object.keys(this.statisticsMeta)) {
|
|
4108
|
-
// if(i == 0){
|
|
4109
|
-
// selectedCriteria = criteria
|
|
4110
|
-
// }
|
|
4111
4109
|
let option = new Option();
|
|
4112
4110
|
option.value = criteria;
|
|
4113
|
-
|
|
4111
|
+
if (criteria == "reporter" || criteria == "approver" || criteria == "functionhead") {
|
|
4112
|
+
option.innerHTML = "user:" + criteria;
|
|
4113
|
+
}
|
|
4114
|
+
else {
|
|
4115
|
+
option.innerHTML = criteria;
|
|
4116
|
+
}
|
|
4114
4117
|
selectFilterCriteria.add(option);
|
|
4115
4118
|
}
|
|
4116
|
-
|
|
4119
|
+
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria);
|
|
4120
|
+
selectFilterCriteriaNew.addEventListener('change', (ev) => {
|
|
4117
4121
|
let target = ev.target;
|
|
4118
4122
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria');
|
|
4119
4123
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values');
|
|
@@ -4127,16 +4131,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4127
4131
|
option.innerHTML = "All";
|
|
4128
4132
|
selectFilterValues.add(option);
|
|
4129
4133
|
if (this.statisticsMeta[target.value] != null) {
|
|
4134
|
+
let sortedFilters = Util.alphabeticalSort(this.statisticsMeta[target.value]);
|
|
4130
4135
|
selectFilterValues.style.display = 'block';
|
|
4131
4136
|
inputLabelCriteria.style.display = 'block';
|
|
4132
|
-
inputLabelCriteria.innerHTML =
|
|
4133
|
-
for (let filter of
|
|
4137
|
+
inputLabelCriteria.innerHTML = target.value;
|
|
4138
|
+
for (let filter of sortedFilters) {
|
|
4134
4139
|
let option = new Option();
|
|
4135
4140
|
option.value = filter.split(';')[1];
|
|
4136
|
-
option.innerHTML =
|
|
4141
|
+
option.innerHTML = filter.split(';')[0].replace(/\([^)]*\)/g, "");
|
|
4137
4142
|
selectFilterValues.add(option);
|
|
4138
4143
|
}
|
|
4139
|
-
|
|
4144
|
+
let selectFilterValuesNew = Util.clearListeners(selectFilterValues);
|
|
4145
|
+
selectFilterValuesNew.addEventListener('change', () => {
|
|
4140
4146
|
console.log('changed');
|
|
4141
4147
|
this.processDateSelectionViewer(eventsContainer);
|
|
4142
4148
|
});
|
|
@@ -4150,24 +4156,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4150
4156
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria');
|
|
4151
4157
|
selectFilterValues.style.display = 'none';
|
|
4152
4158
|
inputLabelCriteria.style.display = 'none';
|
|
4153
|
-
// inputLabelCriteria.innerHTML = selectedCriteria
|
|
4154
|
-
// selectFilterValues.innerHTML = ""
|
|
4155
|
-
// option = new Option()
|
|
4156
|
-
// option.value = "";
|
|
4157
|
-
// option.innerHTML = "All"
|
|
4158
|
-
// selectFilterValues.add(option)
|
|
4159
|
-
// if(this.statisticsMeta[selectedCriteria] != null){
|
|
4160
|
-
// for(let filter of this.statisticsMeta[selectedCriteria]){
|
|
4161
|
-
// let option = new Option()
|
|
4162
|
-
// option.value = filter.split(';')[1];
|
|
4163
|
-
// option.innerHTML = Util.titleCase(filter.split(';')[0]).replace(/\([^)]*\)/g,"")
|
|
4164
|
-
// selectFilterValues.add(option)
|
|
4165
|
-
// }
|
|
4166
|
-
// }
|
|
4167
|
-
// selectFilterValues.addEventListener('change',() => {
|
|
4168
|
-
// console.log('changed')
|
|
4169
|
-
// this.processDateSelectionViewer(eventsContainer);
|
|
4170
|
-
// })
|
|
4171
4159
|
};
|
|
4172
4160
|
this.renderSelectAllButtons = () => {
|
|
4173
4161
|
let selectAllHtml = '<div class="d-flex justify-end w-100" style="position: fixed; bottom: 70px; left: 0px;" part="button-select-all-container">';
|
|
@@ -4485,9 +4473,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4485
4473
|
const tsEnd = new Date(valueEnd);
|
|
4486
4474
|
tsStart.setDate(tsStart.getDate() - 2);
|
|
4487
4475
|
tsEnd.setDate(tsEnd.getDate() + 2);
|
|
4488
|
-
//console.log('tsstart', tsStart);
|
|
4489
|
-
//console.log('tsend', tsEnd);
|
|
4490
|
-
// await this.fetchUserCalendar_2(tsStart.getMonth() + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), valueEnd.split('-')[1] + "/" + valueEnd.split('-')[2] + "/" + valueEnd.split('-')[0]);
|
|
4491
4476
|
await this.fetchAndYearlyRenderUserCalendar_2((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
4492
4477
|
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime() + 24 * 60 * 60 * 1000) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), this._SfCustomContainer);
|
|
4493
4478
|
}
|
|
@@ -6226,7 +6211,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6226
6211
|
// }
|
|
6227
6212
|
};
|
|
6228
6213
|
this.renderCustomViewer = () => {
|
|
6229
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m
|
|
6214
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m;
|
|
6230
6215
|
this.clearGraphData();
|
|
6231
6216
|
this.clearSelectedGraphParam();
|
|
6232
6217
|
this.clearSelectedLegend();
|
|
@@ -6260,12 +6245,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6260
6245
|
html += '</div>';
|
|
6261
6246
|
html += '<div class="d-flex w-100">';
|
|
6262
6247
|
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end">';
|
|
6263
|
-
html += '<div class="title-item-date">';
|
|
6264
|
-
html += '<label part="input-label">Start Date</label
|
|
6248
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6249
|
+
html += '<label part="input-label">Start Date</label>';
|
|
6265
6250
|
html += '<input id="stream-start-date" part="input" type="date" />';
|
|
6266
6251
|
html += '</div>';
|
|
6267
|
-
html += '<div class="title-item-date">';
|
|
6268
|
-
html += '<label part="input-label">End Date</label
|
|
6252
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6253
|
+
html += '<label part="input-label">End Date</label>';
|
|
6269
6254
|
html += '<input id="stream-end-date" part="input" type="date" />';
|
|
6270
6255
|
html += '</div>';
|
|
6271
6256
|
html += '<div class="title-item-date">';
|
|
@@ -6278,12 +6263,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6278
6263
|
html += '<button id="button-this-year" part="button-lg-short-secondary">This Year</button>';
|
|
6279
6264
|
html += '</div>';
|
|
6280
6265
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6281
|
-
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label
|
|
6282
|
-
html += '<select id="select-filter-criteria" class="mr-10"></select>';
|
|
6266
|
+
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label>';
|
|
6267
|
+
html += '<select part="input-select-calendar-filter" id="select-filter-criteria" class="mr-10"></select>';
|
|
6283
6268
|
html += '</div>';
|
|
6284
6269
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
6285
|
-
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label
|
|
6286
|
-
html += '<select id="select-filter-values" class="mr-10"></select>';
|
|
6270
|
+
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label>';
|
|
6271
|
+
html += '<select part="input-select-calendar-filter" id="select-filter-values" class="mr-10"></select>';
|
|
6287
6272
|
html += '</div>';
|
|
6288
6273
|
html += '</div>';
|
|
6289
6274
|
html += '<div class="calendar-right-data flex-grow">';
|
|
@@ -6392,10 +6377,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6392
6377
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
6393
6378
|
this.processDateSelectionViewer(this._SfCustomContainer);
|
|
6394
6379
|
});
|
|
6395
|
-
let
|
|
6396
|
-
|
|
6397
|
-
let
|
|
6398
|
-
|
|
6380
|
+
let selectFilterCriteria = this._SfCustomContainer.querySelector('#select-filter-criteria');
|
|
6381
|
+
selectFilterCriteria.style.display = 'none';
|
|
6382
|
+
let selectFilterValues = this._SfCustomContainer.querySelector('#select-filter-values');
|
|
6383
|
+
selectFilterValues.style.display = 'none';
|
|
6399
6384
|
let inputLabelFilter = this._SfCustomContainer.querySelector('#input-label-filter');
|
|
6400
6385
|
inputLabelFilter.style.display = 'none';
|
|
6401
6386
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -6405,8 +6390,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6405
6390
|
// this.renderPast(target);
|
|
6406
6391
|
// })
|
|
6407
6392
|
// }
|
|
6408
|
-
|
|
6409
|
-
(_p = this._SfCustomContainer.querySelector('#button-year-to-date-mobile')) === null || _p === void 0 ? void 0 : _p.click();
|
|
6393
|
+
this._SfCustomContainer.querySelector('#button-year-to-date').click();
|
|
6410
6394
|
};
|
|
6411
6395
|
this.renderThis = (index = 1, showGraph = true) => {
|
|
6412
6396
|
var _a, _b;
|
|
@@ -12909,7 +12893,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12909
12893
|
}
|
|
12910
12894
|
}
|
|
12911
12895
|
}
|
|
12912
|
-
this.
|
|
12896
|
+
if (this.chart4 != null) {
|
|
12897
|
+
this.chart4Base64 = this.chart4.toBase64Image();
|
|
12898
|
+
}
|
|
12913
12899
|
}
|
|
12914
12900
|
},
|
|
12915
12901
|
scales: {
|
|
@@ -13085,7 +13071,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13085
13071
|
}
|
|
13086
13072
|
}
|
|
13087
13073
|
}
|
|
13088
|
-
this.
|
|
13074
|
+
if (this.chart3 != null) {
|
|
13075
|
+
this.chart3Base64 = this.chart3.toBase64Image();
|
|
13076
|
+
}
|
|
13089
13077
|
}
|
|
13090
13078
|
},
|
|
13091
13079
|
scales: {
|
|
@@ -13251,7 +13239,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13251
13239
|
}
|
|
13252
13240
|
}
|
|
13253
13241
|
}
|
|
13254
|
-
this.
|
|
13242
|
+
if (this.chart2 != null) {
|
|
13243
|
+
this.chart2Base64 = this.chart2.toBase64Image();
|
|
13244
|
+
}
|
|
13255
13245
|
}
|
|
13256
13246
|
},
|
|
13257
13247
|
scales: {
|
|
@@ -13458,8 +13448,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13458
13448
|
}
|
|
13459
13449
|
}
|
|
13460
13450
|
}
|
|
13461
|
-
this.
|
|
13462
|
-
|
|
13451
|
+
if (this.chart != null) {
|
|
13452
|
+
this.chartBase64 = this.chart.toBase64Image();
|
|
13453
|
+
}
|
|
13463
13454
|
}
|
|
13464
13455
|
},
|
|
13465
13456
|
scales: {
|
|
@@ -14117,6 +14108,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14117
14108
|
(_g = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', () => {
|
|
14118
14109
|
this.enableCustom();
|
|
14119
14110
|
this.renderTabs(this.TAB_CUSTOM);
|
|
14111
|
+
console.log('stats clicked');
|
|
14120
14112
|
if (this.myRole == this.TAB_VIEWER) {
|
|
14121
14113
|
this.renderCustomViewer();
|
|
14122
14114
|
}
|
|
@@ -16439,10 +16431,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16439
16431
|
let eventid = sortidArr[3];
|
|
16440
16432
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
16441
16433
|
console.log('mmdd', mmdd, Object.keys(this.events));
|
|
16442
|
-
|
|
16443
|
-
|
|
16444
|
-
this.events[mmdd][i].
|
|
16445
|
-
|
|
16434
|
+
if (this.events[mmdd] != null) {
|
|
16435
|
+
for (let i = 0; i < this.events[mmdd].length; i++) {
|
|
16436
|
+
if (this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid) {
|
|
16437
|
+
this.events[mmdd][i].isbulk = true;
|
|
16438
|
+
break;
|
|
16439
|
+
}
|
|
16446
16440
|
}
|
|
16447
16441
|
}
|
|
16448
16442
|
}
|
package/src/sf-i-events.ts
CHANGED
|
@@ -5881,10 +5881,9 @@ export class SfIEvents extends LitElement {
|
|
|
5881
5881
|
var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
5882
5882
|
|
|
5883
5883
|
eventsContainer.querySelector('.calendar-right-data')!.innerHTML = html;
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
eventsContainer.innerHTML = innerhtml
|
|
5884
|
+
if(eventsContainer.innerHTML.indexOf('button-select-all') < 0){
|
|
5885
|
+
eventsContainer.insertAdjacentHTML( 'beforeend', this.renderSelectAllButtons());
|
|
5886
|
+
}
|
|
5888
5887
|
this.renderButtonRefresh(eventsContainer);
|
|
5889
5888
|
this.attachTimelineFilterHandlers(eventsContainer);
|
|
5890
5889
|
|
|
@@ -5942,102 +5941,104 @@ export class SfIEvents extends LitElement {
|
|
|
5942
5941
|
|
|
5943
5942
|
const streamEventsContainer = eventsContainer.querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
5944
5943
|
const buttonSelect = eventsContainer.querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5944
|
+
if(eventsContainer.innerHTML.indexOf('button-select-all') >= 0){
|
|
5945
|
+
let selectAllArr = this.attachSelectAllListeners(eventsContainer,buttonSelect)
|
|
5946
|
+
const buttonSelectAll = selectAllArr[0]
|
|
5947
|
+
const buttonUnselectAll = selectAllArr[1]
|
|
5948
|
+
for(i = 0; i < buttonSelect.length; i++) {
|
|
5949
5949
|
|
|
5950
|
-
|
|
5950
|
+
buttonSelect[i].addEventListener('click', (ev: any) => {
|
|
5951
5951
|
|
|
5952
|
-
|
|
5952
|
+
//console.log('eventscontainer', streamEventsContainer.length, buttonSelect.length);
|
|
5953
5953
|
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5954
|
+
const id = ev.target.id;
|
|
5955
|
+
const idArr = id.split("-")
|
|
5956
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
5957
|
+
const j = idArr[4];
|
|
5958
|
+
// const makercheckers = idArr[5];
|
|
5959
|
+
const docs = idArr[6];
|
|
5960
5960
|
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5961
|
+
if((ev.target as HTMLInputElement).checked) {
|
|
5962
|
+
this.selectedItemIds.push(id);
|
|
5963
|
+
} else {
|
|
5964
|
+
this.selectedItemIds.splice(this.selectedItemIds.indexOf(id), 1);
|
|
5965
|
+
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g,'-') + '-' + j) as HTMLDivElement
|
|
5966
|
+
listReportingContainer.style.display = 'none';
|
|
5967
|
+
listReportingContainer.innerHTML = '';
|
|
5968
|
+
let buttonListReporting = eventsContainer.querySelector('#button-list-reporting-' + mmdd.replace(/\//g,'-') + '-' + j) as HTMLButtonElement
|
|
5969
|
+
buttonListReporting.setAttribute('part','button-list-reporting')
|
|
5970
|
+
let streamEventTitle = eventsContainer.querySelector('#stream-event-title-' + mmdd.replace(/\//g,'-') + '-' + j) as SfIElasticText
|
|
5971
|
+
streamEventTitle.removeAttribute('part')
|
|
5972
|
+
}
|
|
5973
5973
|
|
|
5974
|
-
|
|
5974
|
+
if(this.selectedItemIds.length === 0) {
|
|
5975
5975
|
|
|
5976
|
-
|
|
5976
|
+
for(var k = 0; k < buttonSelect.length; k++) {
|
|
5977
5977
|
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5978
|
+
(buttonSelect[k] as HTMLInputElement).style.display = 'block';
|
|
5979
|
+
(streamEventsContainer[k] as HTMLDivElement).style.display = 'block';
|
|
5980
|
+
|
|
5981
|
+
}
|
|
5982
5982
|
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5983
|
+
let bulkUploadLables = eventsContainer.querySelectorAll('.bulk-upload-label') as NodeListOf<HTMLHeadingElement>
|
|
5984
|
+
for(let bulkUploadLable of bulkUploadLables){
|
|
5985
|
+
bulkUploadLable.innerHTML = ''
|
|
5986
|
+
}
|
|
5987
|
+
|
|
5988
|
+
buttonSelectAll.style.display = 'none';
|
|
5989
|
+
buttonUnselectAll.style.display = 'none';
|
|
5990
5990
|
|
|
5991
|
-
|
|
5991
|
+
} else {
|
|
5992
5992
|
|
|
5993
|
-
|
|
5993
|
+
if(this.selectedItemIds.length === 1) {
|
|
5994
5994
|
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5995
|
+
const id1 = id;
|
|
5996
|
+
const idArr1 = id1.split("-")
|
|
5997
|
+
const status = idArr1[13].replace(/_/g, '-');
|
|
5998
|
+
this.selectedStatus = status;
|
|
5999
5999
|
|
|
6000
|
-
|
|
6000
|
+
}
|
|
6001
6001
|
|
|
6002
|
-
|
|
6003
|
-
|
|
6002
|
+
let totalVisibleCount = 0
|
|
6003
|
+
for(var k = 0; k < buttonSelect.length; k++) {
|
|
6004
6004
|
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6005
|
+
const id1 = buttonSelect[k].id;
|
|
6006
|
+
const idArr1 = id1.split("-")
|
|
6007
|
+
const docs1 = idArr1[6];
|
|
6008
|
+
const status = idArr1[13].replace(/_/g, '-');
|
|
6009
|
+
|
|
6010
|
+
if(docs == docs1 && status == this.selectedStatus) {
|
|
6011
|
+
totalVisibleCount++
|
|
6012
|
+
} else {
|
|
6013
|
+
(buttonSelect[k] as HTMLInputElement).style.display = 'none';
|
|
6014
|
+
(streamEventsContainer[k] as HTMLDivElement).style.display = 'none';
|
|
6015
|
+
}
|
|
6016
|
+
|
|
6017
|
+
}
|
|
6018
|
+
|
|
6019
|
+
let bulkUploadLables = eventsContainer.querySelectorAll('.bulk-upload-label') as NodeListOf<HTMLHeadingElement>
|
|
6020
|
+
for(let bulkUploadLable of bulkUploadLables){
|
|
6021
|
+
bulkUploadLable.innerHTML = `${this.selectedItemIds.length - 1} other ` + ((this.selectedItemIds.length - 1) === 1 ? `item` : `items`) + ` also selected`
|
|
6015
6022
|
}
|
|
6016
|
-
|
|
6017
|
-
}
|
|
6018
6023
|
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6024
|
+
if(this.selectedItemIds.length >= parseInt(this.selectallblock) || this.selectedItemIds.length >= totalVisibleCount){
|
|
6025
|
+
buttonSelectAll.style.display = 'none';
|
|
6026
|
+
buttonUnselectAll.style.display = 'flex';
|
|
6027
|
+
}else{
|
|
6028
|
+
buttonSelectAll.style.display = 'flex';
|
|
6029
|
+
buttonUnselectAll.style.display = 'none';
|
|
6030
|
+
}
|
|
6031
|
+
|
|
6023
6032
|
|
|
6024
|
-
if(this.selectedItemIds.length >= parseInt(this.selectallblock) || this.selectedItemIds.length >= totalVisibleCount){
|
|
6025
|
-
buttonSelectAll.style.display = 'none';
|
|
6026
|
-
buttonUnselectAll.style.display = 'flex';
|
|
6027
|
-
}else{
|
|
6028
|
-
buttonSelectAll.style.display = 'flex';
|
|
6029
|
-
buttonUnselectAll.style.display = 'none';
|
|
6030
6033
|
}
|
|
6031
|
-
|
|
6032
6034
|
|
|
6033
|
-
|
|
6035
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block'
|
|
6034
6036
|
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
})
|
|
6037
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + ((new Date()).getFullYear() + ""));
|
|
6038
|
+
|
|
6039
|
+
})
|
|
6040
6040
|
|
|
6041
|
+
}
|
|
6041
6042
|
}
|
|
6042
6043
|
|
|
6043
6044
|
// this.clearGraphData();
|
|
@@ -6571,22 +6572,24 @@ export class SfIEvents extends LitElement {
|
|
|
6571
6572
|
let inputLabelFilter = eventsContainer.querySelector('#input-label-filter') as HTMLLabelElement
|
|
6572
6573
|
selectFilterCriteria.style.display = 'block'
|
|
6573
6574
|
inputLabelFilter.style.display = 'block'
|
|
6574
|
-
// let selectedCriteria = ""
|
|
6575
6575
|
selectFilterCriteria.innerHTML = ""
|
|
6576
6576
|
let option = new Option()
|
|
6577
6577
|
option.value = "";
|
|
6578
|
-
option.innerHTML = "
|
|
6578
|
+
option.innerHTML = "all"
|
|
6579
6579
|
selectFilterCriteria.add(option)
|
|
6580
|
+
|
|
6580
6581
|
for(let criteria of Object.keys(this.statisticsMeta)){
|
|
6581
|
-
// if(i == 0){
|
|
6582
|
-
// selectedCriteria = criteria
|
|
6583
|
-
// }
|
|
6584
6582
|
let option = new Option()
|
|
6585
6583
|
option.value = criteria;
|
|
6586
|
-
|
|
6584
|
+
if(criteria == "reporter" || criteria == "approver" || criteria == "functionhead"){
|
|
6585
|
+
option.innerHTML = "user:" + criteria
|
|
6586
|
+
}else{
|
|
6587
|
+
option.innerHTML = criteria
|
|
6588
|
+
}
|
|
6587
6589
|
selectFilterCriteria.add(option)
|
|
6588
6590
|
}
|
|
6589
|
-
|
|
6591
|
+
let selectFilterCriteriaNew = Util.clearListeners(selectFilterCriteria)
|
|
6592
|
+
selectFilterCriteriaNew.addEventListener('change',(ev: any) => {
|
|
6590
6593
|
let target = ev.target as HTMLSelectElement
|
|
6591
6594
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria') as HTMLLabelElement
|
|
6592
6595
|
let selectFilterValues = eventsContainer.querySelector('#select-filter-values') as HTMLSelectElement
|
|
@@ -6601,16 +6604,18 @@ export class SfIEvents extends LitElement {
|
|
|
6601
6604
|
option.innerHTML = "All";
|
|
6602
6605
|
selectFilterValues.add(option)
|
|
6603
6606
|
if(this.statisticsMeta[target.value] != null){
|
|
6607
|
+
let sortedFilters = Util.alphabeticalSort(this.statisticsMeta[target.value])
|
|
6604
6608
|
selectFilterValues.style.display = 'block'
|
|
6605
6609
|
inputLabelCriteria.style.display = 'block'
|
|
6606
|
-
inputLabelCriteria.innerHTML =
|
|
6607
|
-
for(let filter of
|
|
6610
|
+
inputLabelCriteria.innerHTML = target.value
|
|
6611
|
+
for(let filter of sortedFilters){
|
|
6608
6612
|
let option = new Option()
|
|
6609
6613
|
option.value = filter.split(';')[1];
|
|
6610
|
-
option.innerHTML =
|
|
6614
|
+
option.innerHTML = filter.split(';')[0].replace(/\([^)]*\)/g,"")
|
|
6611
6615
|
selectFilterValues.add(option)
|
|
6612
6616
|
}
|
|
6613
|
-
|
|
6617
|
+
let selectFilterValuesNew = Util.clearListeners(selectFilterValues)
|
|
6618
|
+
selectFilterValuesNew.addEventListener('change',() => {
|
|
6614
6619
|
console.log('changed')
|
|
6615
6620
|
this.processDateSelectionViewer(eventsContainer);
|
|
6616
6621
|
})
|
|
@@ -6623,24 +6628,6 @@ export class SfIEvents extends LitElement {
|
|
|
6623
6628
|
let inputLabelCriteria = eventsContainer.querySelector('#input-label-criteria') as HTMLLabelElement
|
|
6624
6629
|
selectFilterValues.style.display = 'none'
|
|
6625
6630
|
inputLabelCriteria.style.display = 'none'
|
|
6626
|
-
// inputLabelCriteria.innerHTML = selectedCriteria
|
|
6627
|
-
// selectFilterValues.innerHTML = ""
|
|
6628
|
-
// option = new Option()
|
|
6629
|
-
// option.value = "";
|
|
6630
|
-
// option.innerHTML = "All"
|
|
6631
|
-
// selectFilterValues.add(option)
|
|
6632
|
-
// if(this.statisticsMeta[selectedCriteria] != null){
|
|
6633
|
-
// for(let filter of this.statisticsMeta[selectedCriteria]){
|
|
6634
|
-
// let option = new Option()
|
|
6635
|
-
// option.value = filter.split(';')[1];
|
|
6636
|
-
// option.innerHTML = Util.titleCase(filter.split(';')[0]).replace(/\([^)]*\)/g,"")
|
|
6637
|
-
// selectFilterValues.add(option)
|
|
6638
|
-
// }
|
|
6639
|
-
// }
|
|
6640
|
-
// selectFilterValues.addEventListener('change',() => {
|
|
6641
|
-
// console.log('changed')
|
|
6642
|
-
// this.processDateSelectionViewer(eventsContainer);
|
|
6643
|
-
// })
|
|
6644
6631
|
}
|
|
6645
6632
|
renderSelectAllButtons = () => {
|
|
6646
6633
|
let selectAllHtml = '<div class="d-flex justify-end w-100" style="position: fixed; bottom: 70px; left: 0px;" part="button-select-all-container">';
|
|
@@ -7054,10 +7041,6 @@ export class SfIEvents extends LitElement {
|
|
|
7054
7041
|
tsStart.setDate(tsStart.getDate() - 2);
|
|
7055
7042
|
tsEnd.setDate(tsEnd.getDate() + 2);
|
|
7056
7043
|
|
|
7057
|
-
//console.log('tsstart', tsStart);
|
|
7058
|
-
//console.log('tsend', tsEnd);
|
|
7059
|
-
|
|
7060
|
-
// await this.fetchUserCalendar_2(tsStart.getMonth() + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), valueEnd.split('-')[1] + "/" + valueEnd.split('-')[2] + "/" + valueEnd.split('-')[0]);
|
|
7061
7044
|
await this.fetchAndYearlyRenderUserCalendar_2((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
7062
7045
|
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime()+24*60*60*1000) - new Date(valueStart).getTime())/(1000*60*60*24), (this._SfCustomContainer as HTMLDivElement));
|
|
7063
7046
|
} else if(valueStart != "" && valueEnd == "") {
|
|
@@ -9239,12 +9222,12 @@ export class SfIEvents extends LitElement {
|
|
|
9239
9222
|
html += '<div class="d-flex w-100">';
|
|
9240
9223
|
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end">';
|
|
9241
9224
|
|
|
9242
|
-
html += '<div class="title-item-date">';
|
|
9243
|
-
html += '<label part="input-label">Start Date</label
|
|
9225
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9226
|
+
html += '<label part="input-label">Start Date</label>'
|
|
9244
9227
|
html += '<input id="stream-start-date" part="input" type="date" />'
|
|
9245
9228
|
html += '</div>';
|
|
9246
|
-
html += '<div class="title-item-date">';
|
|
9247
|
-
html += '<label part="input-label">End Date</label
|
|
9229
|
+
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9230
|
+
html += '<label part="input-label">End Date</label>'
|
|
9248
9231
|
html += '<input id="stream-end-date" part="input" type="date" />'
|
|
9249
9232
|
html += '</div>';
|
|
9250
9233
|
html += '<div class="title-item-date">';
|
|
@@ -9257,12 +9240,12 @@ export class SfIEvents extends LitElement {
|
|
|
9257
9240
|
html += '<button id="button-this-year" part="button-lg-short-secondary">This Year</button>'
|
|
9258
9241
|
html += '</div>';
|
|
9259
9242
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9260
|
-
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label
|
|
9261
|
-
html += '<select id="select-filter-criteria" class="mr-10"></select>'
|
|
9243
|
+
html += '<label part="input-label-filter-criteria" id="input-label-filter" class="mr-10">Filter Criteria</label>'
|
|
9244
|
+
html += '<select part="input-select-calendar-filter" id="select-filter-criteria" class="mr-10"></select>'
|
|
9262
9245
|
html += '</div>';
|
|
9263
9246
|
html += '<div class="title-item-date d-flex flex-col align-end">';
|
|
9264
|
-
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label
|
|
9265
|
-
html += '<select id="select-filter-values" class="mr-10"></select>'
|
|
9247
|
+
html += '<label part="input-label-filter-value" id="input-label-criteria" class="mr-10"></label>'
|
|
9248
|
+
html += '<select part="input-select-calendar-filter" id="select-filter-values" class="mr-10"></select>'
|
|
9266
9249
|
html += '</div>';
|
|
9267
9250
|
|
|
9268
9251
|
|
|
@@ -9400,10 +9383,10 @@ export class SfIEvents extends LitElement {
|
|
|
9400
9383
|
this.processDateSelectionViewer((this._SfCustomContainer as HTMLDivElement));
|
|
9401
9384
|
});
|
|
9402
9385
|
|
|
9403
|
-
let
|
|
9404
|
-
|
|
9405
|
-
let
|
|
9406
|
-
|
|
9386
|
+
let selectFilterCriteria = (this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement
|
|
9387
|
+
selectFilterCriteria.style.display = 'none'
|
|
9388
|
+
let selectFilterValues = (this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-values') as HTMLSelectElement
|
|
9389
|
+
selectFilterValues.style.display = 'none'
|
|
9407
9390
|
let inputLabelFilter = (this._SfCustomContainer as HTMLDivElement).querySelector('#input-label-filter') as HTMLLabelElement
|
|
9408
9391
|
inputLabelFilter.style.display = 'none';
|
|
9409
9392
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -9413,9 +9396,8 @@ export class SfIEvents extends LitElement {
|
|
|
9413
9396
|
// this.renderPast(target);
|
|
9414
9397
|
// })
|
|
9415
9398
|
// }
|
|
9416
|
-
|
|
9417
|
-
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date') as HTMLButtonElement)
|
|
9418
|
-
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date-mobile') as HTMLButtonElement)?.click();
|
|
9399
|
+
|
|
9400
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date') as HTMLButtonElement).click();
|
|
9419
9401
|
}
|
|
9420
9402
|
|
|
9421
9403
|
renderThis = (index: number = 1, showGraph: boolean = true) => {
|
|
@@ -17806,7 +17788,9 @@ export class SfIEvents extends LitElement {
|
|
|
17806
17788
|
|
|
17807
17789
|
|
|
17808
17790
|
}
|
|
17809
|
-
|
|
17791
|
+
if(this.chart4 != null){
|
|
17792
|
+
this.chart4Base64 = (this.chart4 as Chart).toBase64Image()
|
|
17793
|
+
}
|
|
17810
17794
|
}
|
|
17811
17795
|
},
|
|
17812
17796
|
scales: {
|
|
@@ -18008,7 +17992,9 @@ export class SfIEvents extends LitElement {
|
|
|
18008
17992
|
|
|
18009
17993
|
|
|
18010
17994
|
}
|
|
18011
|
-
|
|
17995
|
+
if(this.chart3 != null){
|
|
17996
|
+
this.chart3Base64 = (this.chart3 as Chart).toBase64Image();
|
|
17997
|
+
}
|
|
18012
17998
|
}
|
|
18013
17999
|
},
|
|
18014
18000
|
scales: {
|
|
@@ -18198,7 +18184,9 @@ export class SfIEvents extends LitElement {
|
|
|
18198
18184
|
}
|
|
18199
18185
|
|
|
18200
18186
|
}
|
|
18201
|
-
|
|
18187
|
+
if(this.chart2 != null){
|
|
18188
|
+
this.chart2Base64 = (this.chart2 as Chart).toBase64Image();
|
|
18189
|
+
}
|
|
18202
18190
|
}
|
|
18203
18191
|
},
|
|
18204
18192
|
scales: {
|
|
@@ -18434,8 +18422,9 @@ export class SfIEvents extends LitElement {
|
|
|
18434
18422
|
}
|
|
18435
18423
|
|
|
18436
18424
|
}
|
|
18437
|
-
|
|
18438
|
-
|
|
18425
|
+
if(this.chart != null){
|
|
18426
|
+
this.chartBase64 = (this.chart as Chart).toBase64Image();
|
|
18427
|
+
}
|
|
18439
18428
|
}
|
|
18440
18429
|
},
|
|
18441
18430
|
scales: {
|
|
@@ -19215,6 +19204,7 @@ export class SfIEvents extends LitElement {
|
|
|
19215
19204
|
(this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom')?.addEventListener('click', () => {
|
|
19216
19205
|
this.enableCustom();
|
|
19217
19206
|
this.renderTabs(this.TAB_CUSTOM);
|
|
19207
|
+
console.log('stats clicked');
|
|
19218
19208
|
if(this.myRole == this.TAB_VIEWER){
|
|
19219
19209
|
this.renderCustomViewer()
|
|
19220
19210
|
}else{
|
|
@@ -22341,10 +22331,12 @@ export class SfIEvents extends LitElement {
|
|
|
22341
22331
|
let eventid = sortidArr[3]
|
|
22342
22332
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1]
|
|
22343
22333
|
console.log('mmdd', mmdd, Object.keys(this.events));
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
this.events[mmdd][i].
|
|
22347
|
-
|
|
22334
|
+
if(this.events[mmdd] != null){
|
|
22335
|
+
for (let i = 0 ; i < this.events[mmdd].length; i ++){
|
|
22336
|
+
if(this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid){
|
|
22337
|
+
this.events[mmdd][i].isbulk = true;
|
|
22338
|
+
break
|
|
22339
|
+
}
|
|
22348
22340
|
}
|
|
22349
22341
|
}
|
|
22350
22342
|
}
|
package/src/util.ts
CHANGED
|
@@ -438,8 +438,15 @@ function titleCase(str: string) {
|
|
|
438
438
|
return splitStr.join(' ');
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
function alphabeticalSort(arr:string[]){
|
|
442
|
+
let arrSorted = arr.sort((a,b) => {
|
|
443
|
+
return a.trim().toLowerCase().localeCompare(b.trim().toLowerCase())
|
|
444
|
+
})
|
|
445
|
+
return arrSorted
|
|
446
|
+
}
|
|
447
|
+
|
|
441
448
|
const exportFunctions = {
|
|
442
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase
|
|
449
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort
|
|
443
450
|
};
|
|
444
451
|
|
|
445
452
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare function jsonObjectToHtml(json: any): string;
|
|
|
13
13
|
declare function convertToCSV(arr: any[]): string;
|
|
14
14
|
declare function parseCsv(csv: string): any;
|
|
15
15
|
declare function titleCase(str: string): string;
|
|
16
|
+
declare function alphabeticalSort(arr: string[]): string[];
|
|
16
17
|
declare const exportFunctions: {
|
|
17
18
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
18
19
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -31,6 +32,7 @@ declare const exportFunctions: {
|
|
|
31
32
|
convertToCSV: typeof convertToCSV;
|
|
32
33
|
parseCsv: typeof parseCsv;
|
|
33
34
|
titleCase: typeof titleCase;
|
|
35
|
+
alphabeticalSort: typeof alphabeticalSort;
|
|
34
36
|
};
|
|
35
37
|
export default exportFunctions;
|
|
36
38
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -366,8 +366,14 @@ function titleCase(str) {
|
|
|
366
366
|
// Directly return the joined string
|
|
367
367
|
return splitStr.join(' ');
|
|
368
368
|
}
|
|
369
|
+
function alphabeticalSort(arr) {
|
|
370
|
+
let arrSorted = arr.sort((a, b) => {
|
|
371
|
+
return a.trim().toLowerCase().localeCompare(b.trim().toLowerCase());
|
|
372
|
+
});
|
|
373
|
+
return arrSorted;
|
|
374
|
+
}
|
|
369
375
|
const exportFunctions = {
|
|
370
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase
|
|
376
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV, parseCsv, titleCase, alphabeticalSort
|
|
371
377
|
};
|
|
372
378
|
export default exportFunctions;
|
|
373
379
|
//# sourceMappingURL=util.js.map
|