sf-i-events 1.0.763 → 1.0.765
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 +12 -2
- package/package.json +1 -1
- package/sf-i-events.js +243 -139
- package/src/sf-i-events.ts +249 -138
- package/src/util.ts +9 -1
- package/util.d.ts +2 -0
- package/util.js +8 -1
package/sf-i-events.js
CHANGED
|
@@ -1222,7 +1222,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1222
1222
|
this.getFeatures = () => {
|
|
1223
1223
|
return ['compliances', ...JSON.parse(this.features)];
|
|
1224
1224
|
};
|
|
1225
|
-
this.selectedFeatures =
|
|
1225
|
+
this.selectedFeatures = ['compliances'];
|
|
1226
1226
|
this.nextPage = 0;
|
|
1227
1227
|
this.nextTabRole = "";
|
|
1228
1228
|
this.nextTabStatus = "";
|
|
@@ -1610,24 +1610,32 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1610
1610
|
html += '</div>';
|
|
1611
1611
|
return html;
|
|
1612
1612
|
};
|
|
1613
|
+
// getYearFromMonthAndCalendarStart = (mm: string) => {
|
|
1614
|
+
// var yyyy = "";
|
|
1615
|
+
// var currMonth = new Date().getMonth() + 1;
|
|
1616
|
+
// console.log('CurrentMonth', currMonth, "MM", mm);
|
|
1617
|
+
// if(parseInt(mm) < parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
|
|
1618
|
+
// //console.log('getpastduedate returning', 0);
|
|
1619
|
+
// yyyy = parseInt(this.calendarStartYYYY) + "";
|
|
1620
|
+
// } else if(parseInt(mm) >= parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
|
|
1621
|
+
// //console.log('getpastduedate returning', 1);
|
|
1622
|
+
// yyyy = (parseInt(this.calendarStartYYYY) - 1) + "";
|
|
1623
|
+
// } else if(parseInt(mm) < parseInt(this.calendarStartMM) && currMonth >= parseInt(this.calendarStartMM)) {
|
|
1624
|
+
// //console.log('getpastduedate returning', 2);
|
|
1625
|
+
// yyyy = (parseInt(this.calendarStartYYYY) + 1) + "";
|
|
1626
|
+
// } else if(parseInt(mm) >= parseInt(this.calendarStartMM) && currMonth >= parseInt(this.calendarStartMM)) {
|
|
1627
|
+
// //console.log('getpastduedate returning', 3);
|
|
1628
|
+
// yyyy = (parseInt(this.calendarStartYYYY)) + "";
|
|
1629
|
+
// }
|
|
1630
|
+
// return yyyy;
|
|
1631
|
+
// }
|
|
1613
1632
|
this.getYearFromMonthAndCalendarStart = (mm) => {
|
|
1614
1633
|
var yyyy = "";
|
|
1615
|
-
|
|
1616
|
-
if (parseInt(mm) < parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
|
|
1617
|
-
//console.log('getpastduedate returning', 0);
|
|
1618
|
-
yyyy = parseInt(this.calendarStartYYYY) + "";
|
|
1619
|
-
}
|
|
1620
|
-
else if (parseInt(mm) >= parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
|
|
1621
|
-
//console.log('getpastduedate returning', 1);
|
|
1622
|
-
yyyy = (parseInt(this.calendarStartYYYY) - 1) + "";
|
|
1623
|
-
}
|
|
1624
|
-
else if (parseInt(mm) < parseInt(this.calendarStartMM) && currMonth >= parseInt(this.calendarStartMM)) {
|
|
1625
|
-
//console.log('getpastduedate returning', 2);
|
|
1634
|
+
if (parseInt(mm) < parseInt(this.calendarStartMM)) {
|
|
1626
1635
|
yyyy = (parseInt(this.calendarStartYYYY) + 1) + "";
|
|
1627
1636
|
}
|
|
1628
|
-
else
|
|
1629
|
-
|
|
1630
|
-
yyyy = (parseInt(this.calendarStartYYYY)) + "";
|
|
1637
|
+
else {
|
|
1638
|
+
yyyy = parseInt(this.calendarStartYYYY) + "";
|
|
1631
1639
|
}
|
|
1632
1640
|
return yyyy;
|
|
1633
1641
|
};
|
|
@@ -2139,15 +2147,15 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2139
2147
|
html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
|
|
2140
2148
|
html += '<div class="align-center d-flex flex-wrap align-start justify-between mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title" class="m-0">' + parametersTitle + '</h4>';
|
|
2141
2149
|
if (this.getFeatures().length > 1) {
|
|
2142
|
-
html += '<div class="filter-button-container"><button part="button-icon" id="filter-button" class="material-
|
|
2150
|
+
html += '<div class="filter-button-container"><button part="button-icon" id="filter-button" class="material-symbols-outlined">category</button>';
|
|
2143
2151
|
html += '<div id="filter-list-container" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">';
|
|
2144
2152
|
html += '<div id="filter-label-container" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><label class="filter-label" part="filter-label">Filters</label><button id="button-submit-features" part="button-icon-small" class="material-icons button-expand invisible">check</button></div>';
|
|
2145
|
-
html += `<div class="filter-input-container d-flex"><input class="input-select-feature-all" type="checkbox" ${this.selectedFeatures.length >= (this.getFeatures().length) ? 'checked' : ''} id="input-select-feature-all" part="input-select-feature" name="all"></input><label for="input-select-feature-all" class="input-select-feature-label-all" id="input-select-feature-label-all"
|
|
2146
|
-
|
|
2153
|
+
// html += `<div class="filter-input-container d-flex"><input class="input-select-feature-all" type="checkbox" ${this.selectedFeatures.length >= (this.getFeatures().length) ? 'checked' : ''} id="input-select-feature-all" part="input-select-feature" name="all"></input><label for="input-select-feature-all" class="input-select-feature-label-all" id="input-select-feature-label-all"
|
|
2154
|
+
// part="input-select-feature-label">all</label></div>`
|
|
2147
2155
|
// html += `<div class="filter-input-container d-flex"><input class="input-select-feature-compliances" type="checkbox" ${this.selectedFeatures.indexOf('compliances') >= 0 ? 'checked' : ''} id="input-select-feature-compliances" part="input-select-feature" name="compliances"></input><label for="input-select-feature-compliances" class="input-select-feature-label" part="input-select-feature-label">compliances</label></div>`
|
|
2148
2156
|
for (let [index, feature] of this.getFeatures().entries()) {
|
|
2149
2157
|
console.log('rendering features', feature, this.selectedFeatures);
|
|
2150
|
-
html += `<div class="filter-input-container d-flex"><input class="input-select-feature" type="
|
|
2158
|
+
html += `<div class="filter-input-container d-flex"><input class="input-select-feature" type="radio" ${this.selectedFeatures.indexOf(feature) >= 0 ? 'checked' : ''} id="input-select-feature-${index}" name="features" part="input-select-feature" value="${feature}"></input><label for="input-select-feature-${index}" id="input-select-feature-label-${index}" class="input-select-feature-label" part="input-select-feature-label">${feature}</label></div>`;
|
|
2151
2159
|
}
|
|
2152
2160
|
html += '</div></div>';
|
|
2153
2161
|
}
|
|
@@ -2196,7 +2204,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2196
2204
|
//console.log('flowGraph', this.flowGraph);
|
|
2197
2205
|
var html = '';
|
|
2198
2206
|
html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
|
|
2199
|
-
html += '<div class="align-center d-flex flex-wrap mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title">' + parametersTitle + '</h4
|
|
2207
|
+
html += '<div class="align-center justify-between d-flex flex-wrap mb-10 w-100-m-0" part="duration-title-container"><h4 part="duration-title">' + parametersTitle + '</h4>';
|
|
2208
|
+
if (this.getFeatures().length > 1) {
|
|
2209
|
+
html += '<div class="filter-button-container"><button part="button-icon" id="filter-button" class="material-symbols-outlined">category</button>';
|
|
2210
|
+
html += '<div id="filter-list-container" class="filter-list-container hide flex-col justify-between align-start p-10" part="filter-list-container" anchor="filter-button">';
|
|
2211
|
+
html += '<div id="filter-label-container" class="filter-label-container d-flex justify-between align-center" part="filter-label-container"><label class="filter-label" part="filter-label">Filters</label><button id="button-submit-features" part="button-icon-small" class="material-icons button-expand invisible">check</button></div>';
|
|
2212
|
+
// html += `<div class="filter-input-container d-flex"><input class="input-select-feature-all" type="checkbox" ${this.selectedFeatures.length >= (this.getFeatures().length) ? 'checked' : ''} id="input-select-feature-all" part="input-select-feature" name="all"></input><label for="input-select-feature-all" class="input-select-feature-label-all" id="input-select-feature-label-all"
|
|
2213
|
+
// part="input-select-feature-label">all</label></div>`
|
|
2214
|
+
// html += `<div class="filter-input-container d-flex"><input class="input-select-feature-compliances" type="checkbox" ${this.selectedFeatures.indexOf('compliances') >= 0 ? 'checked' : ''} id="input-select-feature-compliances" part="input-select-feature" name="compliances"></input><label for="input-select-feature-compliances" class="input-select-feature-label" part="input-select-feature-label">compliances</label></div>`
|
|
2215
|
+
for (let [index, feature] of this.getFeatures().entries()) {
|
|
2216
|
+
console.log('rendering features statistics', feature, this.selectedFeatures);
|
|
2217
|
+
html += `<div class="filter-input-container d-flex"><input class="input-select-feature" type="radio" ${this.selectedFeatures.indexOf(feature) >= 0 ? 'checked' : ''} id="input-select-feature-${index}" name="features" part="input-select-feature" value="${feature}"></input><label for="input-select-feature-${index}" id="input-select-feature-label-${index}" class="input-select-feature-label" part="input-select-feature-label">${feature}</label></div>`;
|
|
2218
|
+
}
|
|
2219
|
+
html += '</div></div>';
|
|
2220
|
+
}
|
|
2221
|
+
html += '<button id="button-refresh" part="button-duration-title" class="align-center d-flex justify-center"><h4 part="duration-title">' + parametersTitle + '</h4><span part="duration-title-icon" class="material-icons ml-10">refresh</span></button></div>';
|
|
2200
2222
|
html += '<div class="align-center d-flex flex-wrap mb-10 w-100-m-0" part="last-update-title-container"><h6 part="last-update-title" class="align-center d-flex"><span class="material-symbols-outlined">update</span> Last Updated on ' + this.lastupdated + '</h6></div>';
|
|
2201
2223
|
if (showGraph) {
|
|
2202
2224
|
html += '<div class="chart-container d-flex scroll-x align-center"><div part="chart-item" class="chart-item"><canvas id="myChart"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart4" class="gone"></canvas></div><div part="chart-item chart-item-middle" class="chart-item"><canvas id="myChart2" class="gone"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart3" class="gone"></canvas></div></div>';
|
|
@@ -3677,38 +3699,37 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3677
3699
|
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
3678
3700
|
const filterList = eventsContainer.querySelector('#filter-list-container');
|
|
3679
3701
|
filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none');
|
|
3680
|
-
filterButton.innerHTML = (filterList.style.display != 'block' ? '
|
|
3702
|
+
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
3681
3703
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
3682
3704
|
filterSubmitButton.addEventListener('click', () => {
|
|
3683
3705
|
this.processDateSelection(eventsContainer);
|
|
3684
3706
|
});
|
|
3685
|
-
const selectFeatureAll = filterList.querySelector('.input-select-feature-all')
|
|
3686
|
-
selectFeatureAll.addEventListener('click',
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
});
|
|
3707
|
+
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
3708
|
+
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
3709
|
+
// let target = ev.target;
|
|
3710
|
+
// if(target.checked){
|
|
3711
|
+
// for(let feature of this.getFeatures()){
|
|
3712
|
+
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
3713
|
+
// this.selectedFeatures.push(feature);
|
|
3714
|
+
// }
|
|
3715
|
+
// }
|
|
3716
|
+
// }else{
|
|
3717
|
+
// this.selectedFeatures = []
|
|
3718
|
+
// }
|
|
3719
|
+
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
3720
|
+
// for(let selectFeature of selectFeatures){
|
|
3721
|
+
// let id = selectFeature.id;
|
|
3722
|
+
// let i = id.split('-')[3];
|
|
3723
|
+
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
3724
|
+
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
3725
|
+
// }
|
|
3726
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
3727
|
+
// })
|
|
3728
|
+
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
3729
|
+
// selectFeatureAllLabel.addEventListener('click',()=>{
|
|
3730
|
+
// selectFeatureAll.checked = !selectFeatureAll.checked
|
|
3731
|
+
// selectFeatureAll.click();
|
|
3732
|
+
// })
|
|
3712
3733
|
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
3713
3734
|
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
3714
3735
|
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
@@ -3719,16 +3740,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3719
3740
|
let selectedFeature = this.getFeatures()[index];
|
|
3720
3741
|
if (target.checked) {
|
|
3721
3742
|
if (this.selectedFeatures.indexOf(selectedFeature) < 0) {
|
|
3722
|
-
this.selectedFeatures.push(selectedFeature)
|
|
3743
|
+
// this.selectedFeatures.push(selectedFeature)
|
|
3744
|
+
this.selectedFeatures = [selectedFeature];
|
|
3723
3745
|
}
|
|
3724
3746
|
}
|
|
3725
|
-
else
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
}
|
|
3731
|
-
filterSubmitButton.style.visibility = 'visible'
|
|
3747
|
+
// else{
|
|
3748
|
+
// // selectFeatureAll.checked = false;
|
|
3749
|
+
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
3750
|
+
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
3751
|
+
// }
|
|
3752
|
+
// }
|
|
3753
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
3754
|
+
filterSubmitButton.click();
|
|
3732
3755
|
});
|
|
3733
3756
|
selectFeatureLabels[i].addEventListener('click', () => {
|
|
3734
3757
|
selectFeature.checked = !selectFeature.checked;
|
|
@@ -4291,6 +4314,70 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4291
4314
|
var html = this.renderStatistics(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
|
|
4292
4315
|
eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
|
|
4293
4316
|
this.renderButtonRefresh(eventsContainer);
|
|
4317
|
+
const filterButton = eventsContainer.querySelector('#filter-button');
|
|
4318
|
+
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
4319
|
+
const filterList = eventsContainer.querySelector('#filter-list-container');
|
|
4320
|
+
filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none');
|
|
4321
|
+
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4322
|
+
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4323
|
+
filterSubmitButton.addEventListener('click', () => {
|
|
4324
|
+
this.processDateSelectionViewer(eventsContainer);
|
|
4325
|
+
});
|
|
4326
|
+
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
4327
|
+
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
4328
|
+
// let target = ev.target;
|
|
4329
|
+
// if(target.checked){
|
|
4330
|
+
// for(let feature of this.getFeatures()){
|
|
4331
|
+
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
4332
|
+
// this.selectedFeatures.push(feature);
|
|
4333
|
+
// }
|
|
4334
|
+
// }
|
|
4335
|
+
// }else{
|
|
4336
|
+
// this.selectedFeatures = []
|
|
4337
|
+
// }
|
|
4338
|
+
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
4339
|
+
// for(let selectFeature of selectFeatures){
|
|
4340
|
+
// let id = selectFeature.id;
|
|
4341
|
+
// let i = id.split('-')[3];
|
|
4342
|
+
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
4343
|
+
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
4344
|
+
// }
|
|
4345
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
4346
|
+
// })
|
|
4347
|
+
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
4348
|
+
// selectFeatureAllLabel.addEventListener('click',()=>{
|
|
4349
|
+
// selectFeatureAll.checked = !selectFeatureAll.checked
|
|
4350
|
+
// selectFeatureAll.click();
|
|
4351
|
+
// })
|
|
4352
|
+
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
4353
|
+
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
4354
|
+
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
4355
|
+
selectFeature.addEventListener('click', (ev) => {
|
|
4356
|
+
let target = ev.target;
|
|
4357
|
+
let id = target.id;
|
|
4358
|
+
let index = id.split('-')[3];
|
|
4359
|
+
let selectedFeature = this.getFeatures()[index];
|
|
4360
|
+
if (target.checked) {
|
|
4361
|
+
if (this.selectedFeatures.indexOf(selectedFeature) < 0) {
|
|
4362
|
+
// this.selectedFeatures.push(selectedFeature)
|
|
4363
|
+
this.selectedFeatures = [selectedFeature];
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4366
|
+
// else{
|
|
4367
|
+
// // selectFeatureAll.checked = false;
|
|
4368
|
+
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
4369
|
+
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
4370
|
+
// }
|
|
4371
|
+
// }
|
|
4372
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
4373
|
+
filterSubmitButton.click();
|
|
4374
|
+
});
|
|
4375
|
+
selectFeatureLabels[i].addEventListener('click', () => {
|
|
4376
|
+
selectFeature.checked = !selectFeature.checked;
|
|
4377
|
+
selectFeature.click();
|
|
4378
|
+
});
|
|
4379
|
+
}
|
|
4380
|
+
});
|
|
4294
4381
|
// let innerhtml = eventsContainer.innerHTML;
|
|
4295
4382
|
// innerhtml += this.renderSelectAllButtons();
|
|
4296
4383
|
// eventsContainer.innerHTML = innerhtml
|
|
@@ -4762,7 +4849,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4762
4849
|
const tsEnd = new Date(valueEnd);
|
|
4763
4850
|
tsStart.setDate(tsStart.getDate() - 2);
|
|
4764
4851
|
tsEnd.setDate(tsEnd.getDate() + 2);
|
|
4765
|
-
await this.
|
|
4852
|
+
await this.renderWithFeatures((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
4853
|
+
// await this.fetchAndYearlyRenderUserCalendar_2((tsStart.getMonth() + 1) + "/" + tsStart.getDate() + "/" + tsStart.getFullYear(), (tsEnd.getMonth() + 1) + "/" + tsEnd.getDate() + "/" + tsEnd.getFullYear());
|
|
4766
4854
|
this.renderRangeEvents(new Date(valueStart), ((new Date(valueEnd).getTime() + 24 * 60 * 60 * 1000) - new Date(valueStart).getTime()) / (1000 * 60 * 60 * 24), this._SfCustomContainer);
|
|
4767
4855
|
}
|
|
4768
4856
|
else if (valueStart != "" && valueEnd == "") {
|
|
@@ -5708,6 +5796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5708
5796
|
let nowYear = parseInt(this.getCurrentYear(nowMonth + ""));
|
|
5709
5797
|
let lastMonth = -1;
|
|
5710
5798
|
let nextMonth = -1;
|
|
5799
|
+
console.log('calculating startAndEndOfStream', index, nowMonth, currentMonth);
|
|
5711
5800
|
let lastMonthsYear = -1;
|
|
5712
5801
|
let nextMonthsYear = -1;
|
|
5713
5802
|
if (currentMonth === 1) {
|
|
@@ -5895,8 +5984,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5895
5984
|
// } else {
|
|
5896
5985
|
// nextMonthsYear = parseInt(this.calendarStartYYYY) + 1;
|
|
5897
5986
|
// }
|
|
5898
|
-
let startDate = lastMonth + "/25/" + lastMonthsYear;
|
|
5899
|
-
let endDate = nextMonth + "/01/" + nextMonthsYear;
|
|
5987
|
+
let startDate = ("0" + lastMonth).slice(-2) + "/25/" + lastMonthsYear;
|
|
5988
|
+
let endDate = ("0" + nextMonth).slice(-2) + "/01/" + nextMonthsYear;
|
|
5900
5989
|
return { startDate: startDate, endDate: endDate };
|
|
5901
5990
|
}
|
|
5902
5991
|
else {
|
|
@@ -6738,7 +6827,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6738
6827
|
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
6739
6828
|
const filterList = this._SfThisContainer.querySelector('#filter-list-container');
|
|
6740
6829
|
filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none');
|
|
6741
|
-
filterButton.innerHTML = (filterList.style.display != 'block' ? '
|
|
6830
|
+
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
6742
6831
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
6743
6832
|
filterSubmitButton.addEventListener('click', async () => {
|
|
6744
6833
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
@@ -6751,33 +6840,32 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6751
6840
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
6752
6841
|
this.renderStream(index);
|
|
6753
6842
|
});
|
|
6754
|
-
const selectFeatureAll = filterList.querySelector('.input-select-feature-all')
|
|
6755
|
-
selectFeatureAll.addEventListener('click',
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
});
|
|
6843
|
+
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
6844
|
+
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
6845
|
+
// let target = ev.target;
|
|
6846
|
+
// if(target.checked){
|
|
6847
|
+
// for(let feature of this.getFeatures()){
|
|
6848
|
+
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
6849
|
+
// this.selectedFeatures.push(feature);
|
|
6850
|
+
// }
|
|
6851
|
+
// }
|
|
6852
|
+
// }else{
|
|
6853
|
+
// this.selectedFeatures = []
|
|
6854
|
+
// }
|
|
6855
|
+
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
6856
|
+
// for(let selectFeature of selectFeatures){
|
|
6857
|
+
// let id = selectFeature.id;
|
|
6858
|
+
// let i = id.split('-')[3];
|
|
6859
|
+
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
6860
|
+
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
6861
|
+
// }
|
|
6862
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
6863
|
+
// })
|
|
6864
|
+
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
6865
|
+
// selectFeatureAllLabel.addEventListener('click',()=>{
|
|
6866
|
+
// selectFeatureAll.checked = !selectFeatureAll.checked
|
|
6867
|
+
// selectFeatureAll.click();
|
|
6868
|
+
// })
|
|
6781
6869
|
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
6782
6870
|
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
6783
6871
|
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
@@ -6788,16 +6876,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6788
6876
|
let selectedFeature = this.getFeatures()[i];
|
|
6789
6877
|
if (target.checked) {
|
|
6790
6878
|
if (this.selectedFeatures.indexOf(selectedFeature) < 0) {
|
|
6791
|
-
this.selectedFeatures.push(selectedFeature)
|
|
6792
|
-
|
|
6793
|
-
}
|
|
6794
|
-
else {
|
|
6795
|
-
selectFeatureAll.checked = false;
|
|
6796
|
-
if (this.selectedFeatures.indexOf(selectedFeature) >= 0) {
|
|
6797
|
-
this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature), 1);
|
|
6879
|
+
// this.selectedFeatures.push(selectedFeature)
|
|
6880
|
+
this.selectedFeatures = [selectedFeature];
|
|
6798
6881
|
}
|
|
6799
6882
|
}
|
|
6800
|
-
|
|
6883
|
+
// else{
|
|
6884
|
+
// // selectFeatureAll.checked = false;
|
|
6885
|
+
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
6886
|
+
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
6887
|
+
// }
|
|
6888
|
+
// }
|
|
6889
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
6890
|
+
filterSubmitButton.click();
|
|
6801
6891
|
});
|
|
6802
6892
|
selectFeatureLabels[i].addEventListener('click', () => {
|
|
6803
6893
|
selectFeature.checked = !selectFeature.checked;
|
|
@@ -6919,7 +7009,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6919
7009
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
6920
7010
|
this.currentColumnIndex = index + "";
|
|
6921
7011
|
const dateResult = this.calculateStartAndEndDateOfThis(index);
|
|
6922
|
-
await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
|
|
7012
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
|
|
7013
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
|
|
6923
7014
|
this.renderThis(index);
|
|
6924
7015
|
});
|
|
6925
7016
|
this.attachListReportingListeners(this._SfThisContainer);
|
|
@@ -7153,7 +7244,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7153
7244
|
filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
|
|
7154
7245
|
const filterList = this._SfStreamContainer.querySelector('#filter-list-container');
|
|
7155
7246
|
filterList.style.display = (filterList.style.display != 'block' ? 'block' : 'none');
|
|
7156
|
-
filterButton.innerHTML = (filterList.style.display != 'block' ? '
|
|
7247
|
+
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
7157
7248
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
7158
7249
|
filterSubmitButton.addEventListener('click', async () => {
|
|
7159
7250
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
@@ -7168,33 +7259,32 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7168
7259
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7169
7260
|
this.renderStream(index);
|
|
7170
7261
|
});
|
|
7171
|
-
const selectFeatureAll = filterList.querySelector('.input-select-feature-all')
|
|
7172
|
-
selectFeatureAll
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
});
|
|
7262
|
+
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
7263
|
+
// selectFeatureAll?.addEventListener('click',async(ev: any) => {
|
|
7264
|
+
// let target = ev.target;
|
|
7265
|
+
// if(target.checked){
|
|
7266
|
+
// for(let feature of this.getFeatures()){
|
|
7267
|
+
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
7268
|
+
// this.selectedFeatures.push(feature);
|
|
7269
|
+
// }
|
|
7270
|
+
// }
|
|
7271
|
+
// }else{
|
|
7272
|
+
// this.selectedFeatures = []
|
|
7273
|
+
// }
|
|
7274
|
+
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
7275
|
+
// for(let selectFeature of selectFeatures){
|
|
7276
|
+
// let id = selectFeature.id;
|
|
7277
|
+
// let i = id.split('-')[3];
|
|
7278
|
+
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
7279
|
+
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
7280
|
+
// }
|
|
7281
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
7282
|
+
// })
|
|
7283
|
+
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
7284
|
+
// selectFeatureAllLabel?.addEventListener('click',()=>{
|
|
7285
|
+
// selectFeatureAll.checked = !selectFeatureAll.checked;
|
|
7286
|
+
// selectFeatureAll.click();
|
|
7287
|
+
// })
|
|
7198
7288
|
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
7199
7289
|
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
7200
7290
|
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
@@ -7205,16 +7295,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7205
7295
|
let selectedFeature = this.getFeatures()[i];
|
|
7206
7296
|
if (target.checked) {
|
|
7207
7297
|
if (this.selectedFeatures.indexOf(selectedFeature) < 0) {
|
|
7208
|
-
this.selectedFeatures.push(selectedFeature)
|
|
7209
|
-
|
|
7210
|
-
}
|
|
7211
|
-
else {
|
|
7212
|
-
selectFeatureAll.checked = false;
|
|
7213
|
-
if (this.selectedFeatures.indexOf(selectedFeature) >= 0) {
|
|
7214
|
-
this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature), 1);
|
|
7298
|
+
// this.selectedFeatures.push(selectedFeature)
|
|
7299
|
+
this.selectedFeatures = [selectedFeature];
|
|
7215
7300
|
}
|
|
7216
7301
|
}
|
|
7217
|
-
|
|
7302
|
+
// else{
|
|
7303
|
+
// // selectFeatureAll.checked = false;
|
|
7304
|
+
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
7305
|
+
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
7306
|
+
// }
|
|
7307
|
+
// }
|
|
7308
|
+
// filterSubmitButton.style.visibility = 'visible'
|
|
7309
|
+
filterSubmitButton.click();
|
|
7218
7310
|
});
|
|
7219
7311
|
selectFeatureLabels[i].addEventListener('click', () => {
|
|
7220
7312
|
selectFeature.checked = !selectFeature.checked;
|
|
@@ -7339,7 +7431,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7339
7431
|
console.log('dateresult', dateResult);
|
|
7340
7432
|
this.currentColumnIndex = index + "";
|
|
7341
7433
|
if (dateResult != null) {
|
|
7342
|
-
await this.
|
|
7434
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
|
|
7435
|
+
// await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
|
|
7343
7436
|
}
|
|
7344
7437
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
7345
7438
|
this.renderStream(index);
|
|
@@ -7538,6 +7631,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7538
7631
|
// } else if(parseInt(mm) >= parseInt(this.calendarStartMM) && currMonth >= parseInt(this.calendarStartMM)) {
|
|
7539
7632
|
// yyyy = (parseInt(this.calendarStartYYYY) + 1) + "";
|
|
7540
7633
|
// }
|
|
7634
|
+
// if(parseInt(mm) >= 4){
|
|
7635
|
+
// return new Date().getFullYear() + ""
|
|
7636
|
+
// }else{
|
|
7637
|
+
// return (new Date().getFullYear() + 1) + ""
|
|
7638
|
+
// }
|
|
7541
7639
|
var yyyy = this.getYearFromMonthAndCalendarStart(mm);
|
|
7542
7640
|
return yyyy;
|
|
7543
7641
|
};
|
|
@@ -17437,9 +17535,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17437
17535
|
console.log('rendering appropriate string', list);
|
|
17438
17536
|
this.renderAppropriateStream(startDate, endDate, list == "no");
|
|
17439
17537
|
this.fetchBulkReportingData();
|
|
17440
|
-
if
|
|
17441
|
-
|
|
17442
|
-
}
|
|
17538
|
+
// if(this.selectedFeatures.indexOf('notices') >= 0){
|
|
17539
|
+
// this.fetchAndRenderNotices(startDate, endDate);
|
|
17540
|
+
// }
|
|
17443
17541
|
// this.events = {}
|
|
17444
17542
|
// this.events = {...JSON.parse(JSON.stringify(jsonRespose.data.events))};
|
|
17445
17543
|
// let lastEvaluatedKey = jsonRespose.lastEvaluatedKey;
|
|
@@ -17531,7 +17629,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17531
17629
|
console.log('jsonRespose', jsonRespose);
|
|
17532
17630
|
let notices = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
17533
17631
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
17534
|
-
|
|
17632
|
+
this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN');
|
|
17535
17633
|
let tempEvents = this.events;
|
|
17536
17634
|
for (let mmddyyyy of Object.keys(notices)) {
|
|
17537
17635
|
tempEvents[mmddyyyy] = [...((_a = tempEvents[mmddyyyy]) !== null && _a !== void 0 ? _a : []), ...notices[mmddyyyy]];
|
|
@@ -17569,7 +17667,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17569
17667
|
sDate = startDate;
|
|
17570
17668
|
eDate = endDate;
|
|
17571
17669
|
}
|
|
17572
|
-
let url = "
|
|
17670
|
+
let url = "";
|
|
17671
|
+
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
17672
|
+
url = "https://" + this.apiId + "/" + path;
|
|
17673
|
+
}
|
|
17674
|
+
else if (this.selectedFeatures.indexOf('notices') >= 0) {
|
|
17675
|
+
url = "https://" + this.apiIdNotices + "/" + path;
|
|
17676
|
+
}
|
|
17573
17677
|
//console.log('fetch calendar url', url);
|
|
17574
17678
|
let urlBody = { "projectid": this.projectId, "userid": this.userProfileId, "role": this.myRole, "sdate": sDate, "edate": eDate, "filtercriteria": filtercriteria };
|
|
17575
17679
|
if (filtercriteria == 'function') {
|
|
@@ -18860,7 +18964,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18860
18964
|
if (tempRole != "") {
|
|
18861
18965
|
this._SfRoleTabContainer.innerHTML = '';
|
|
18862
18966
|
}
|
|
18863
|
-
this.selectedFeatures = this.getFeatures()
|
|
18967
|
+
// this.selectedFeatures = this.getFeatures()
|
|
18864
18968
|
//console.log('stream received', this.stream, this.TAB_STREAM, this.TAB_YEAR);
|
|
18865
18969
|
if (this.stream == this.TAB_YEAR) {
|
|
18866
18970
|
this.renderTabs(this.TAB_YEAR);
|