sf-i-events 1.0.769 → 1.0.771

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.769",
4
+ "version": "1.0.771",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.d.ts CHANGED
@@ -455,7 +455,7 @@ export declare class SfIEvents extends LitElement {
455
455
  getComplianceStatus: (completeness: string, timeliness: string) => "scheduled" | "not-complied" | "partially-complied" | "complied";
456
456
  numcalled: number;
457
457
  updateStats: (event: any, partStatus: string, lateStatus: string, complianceStatus: string) => void;
458
- renderCalendarGraphs: (showGraph: boolean, parametersTitle: string) => string;
458
+ renderCalendarGraphs: (showGraph: boolean, parametersTitle: string, showBackgroundButton: boolean) => string;
459
459
  renderCalendarStatisticsGraphs: (showGraph: boolean, parametersTitle: string) => string;
460
460
  renderCalendarContainerDivStart: (index: number) => string;
461
461
  renderCalendarContainerDivEnd: () => string;
@@ -478,14 +478,14 @@ export declare class SfIEvents extends LitElement {
478
478
  renderStatusString: (partStatus: string, lateStatus: string, complianceStatus: string) => string;
479
479
  getGraphParam: (event: any) => string;
480
480
  renderCalendarAnnotations: (event: any, mmdd: string, j: number) => string;
481
- renderEvents: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string) => string;
481
+ renderEvents: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string, showBackgroundButton: boolean) => string;
482
482
  renderStatistics: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string) => string;
483
483
  renderReporting: (event: any, mmddyyyy: any) => string;
484
484
  renderListReporting: (listReportingContainer: HTMLDivElement, event: any, mmddyyyy: any, eventsContainer: HTMLDivElement) => void;
485
485
  attachListReportingListeners: (eventsContainer: HTMLDivElement) => void;
486
- renderStreamEvents: (index: number, month: number, year: number, showGraph?: boolean) => string;
487
- renderThisEvents: (index: number, startDate: Date, showGraph?: boolean) => string;
488
- renderRangeEvents: (firstDate: Date, count: number, eventsContainer: HTMLDivElement) => void;
486
+ renderStreamEvents: (index: number, month: number, year: number, showGraph?: boolean, showBackgroundButton?: boolean) => string;
487
+ renderThisEvents: (index: number, startDate: Date, showGraph?: boolean, showBackgroundButton?: boolean) => string;
488
+ renderRangeEvents: (firstDate: Date, count: number, eventsContainer: HTMLDivElement, showBackgroundButton?: boolean) => void;
489
489
  renderRangeStatistics: (firstDate: Date, count: number, eventsContainer: HTMLDivElement) => void;
490
490
  renderStatisticsFilters: (eventsContainer: HTMLDivElement) => void;
491
491
  renderSelectAllButtons: () => string;
@@ -560,9 +560,9 @@ export declare class SfIEvents extends LitElement {
560
560
  renderFind: () => void;
561
561
  renderCustom: () => void;
562
562
  renderCustomViewer: () => void;
563
- renderThis: (index?: number, showGraph?: boolean) => void;
563
+ renderThis: (index: number | undefined, showGraph: boolean | undefined, showBackgroundButton: boolean) => void;
564
564
  renderButtonRefresh: (eventsContainer: HTMLDivElement) => void;
565
- renderStream: (index?: number, showGraph?: boolean) => void;
565
+ renderStream: (index: number | undefined, showGraph: boolean | undefined, showBackgroundButton: boolean) => void;
566
566
  attachTimelineFilterHandlers: (divContainer: HTMLDivElement) => void;
567
567
  getCurrentYear: (mm: string) => string;
568
568
  clearButtonSelection: () => void;
@@ -787,7 +787,7 @@ export declare class SfIEvents extends LitElement {
787
787
  fetchDetail: (value: any) => Promise<void>;
788
788
  fetchGetMappedCalendar: (year: string) => Promise<any>;
789
789
  sleepFunction: (ms: number) => Promise<unknown>;
790
- renderAppropriateStream: (startDate: string, endDate: string, showGraph?: boolean) => void;
790
+ renderAppropriateStream: (startDate: string, endDate: string, showGraph?: boolean, showBackgroundButton?: boolean) => void;
791
791
  fetchRegisters: (searchString?: string) => Promise<any>;
792
792
  renderWithFeatures: (startDate?: string, endDate?: string, searchString?: string, list?: string, month?: string) => Promise<void>;
793
793
  fetchAndYearlyRenderUserCalendar_2: (startDate?: string, endDate?: string, searchString?: string, list?: string, month?: string) => Promise<void>;
package/sf-i-events.js CHANGED
@@ -2141,7 +2141,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2141
2141
  this.updateSubcategoryStats(event['subcategory'], partStatus, lateStatus, complianceStatus);
2142
2142
  }
2143
2143
  };
2144
- this.renderCalendarGraphs = (showGraph, parametersTitle) => {
2144
+ this.renderCalendarGraphs = (showGraph, parametersTitle, showBackgroundButton) => {
2145
2145
  //console.log('flowGraph', this.flowGraph);
2146
2146
  var html = '';
2147
2147
  html += '<div class="mb-20 stream-event-list" part="stream-event-list-charts">';
@@ -2159,7 +2159,10 @@ let SfIEvents = class SfIEvents extends LitElement {
2159
2159
  }
2160
2160
  html += '</div></div>';
2161
2161
  }
2162
- 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>';
2162
+ 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></div>';
2163
+ if (showBackgroundButton) {
2164
+ html += '</button><button id="button-background-process" part="button-background-process" class="align-center d-flex justify-center"><h4 part="processing-title" class="mr-10">background processing</h4><div class="lds-dual-ring1"></div></button>';
2165
+ }
2163
2166
  html += '<div class="align-center d-flex flex-wrap align-center 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>&nbsp;&nbsp;Last Updated on ' + this.lastupdated + '</h6></div>';
2164
2167
  if (showGraph) {
2165
2168
  html += '<div part="stream-event-chart-selection" class="mb-20">';
@@ -2470,7 +2473,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2470
2473
  html += '<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '-' + (((_a = event.isnotice) !== null && _a !== void 0 ? _a : false) ? 'isnotice' : 'isevent') + '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>';
2471
2474
  }
2472
2475
  else {
2473
- html += '<div class="lds-dual-ring1"></div>';
2476
+ html += '<div class="lds-dual-ring1 bulk-loader"></div>';
2474
2477
  }
2475
2478
  html += '</td>';
2476
2479
  html += '<td part="td-body">';
@@ -2619,7 +2622,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2619
2622
  html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + '<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button></div>';
2620
2623
  return html;
2621
2624
  };
2622
- this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle) => {
2625
+ this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
2623
2626
  var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0;
2624
2627
  var html = '';
2625
2628
  this.selectedItemIds = [];
@@ -2633,7 +2636,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2633
2636
  this.clearGraphData();
2634
2637
  this.clearSelectedGraphParam();
2635
2638
  this.clearSelectedLegend();
2636
- html += this.renderCalendarGraphs(showGraph, parametersTitle);
2639
+ html += this.renderCalendarGraphs(showGraph, parametersTitle, showBackgroundButton);
2637
2640
  html += this.renderCalendarContainerDivStart(index);
2638
2641
  html += this.renderCalendarEventSummary();
2639
2642
  // csvCols += 'Period,Status,Id,ObligationTitle,Obligation,Duedate'
@@ -3659,16 +3662,16 @@ let SfIEvents = class SfIEvents extends LitElement {
3659
3662
  });
3660
3663
  }
3661
3664
  };
3662
- this.renderStreamEvents = (index, month, year, showGraph = true) => {
3665
+ this.renderStreamEvents = (index, month, year, showGraph = true, showBackgroundButton = false) => {
3663
3666
  //console.log('flowgraph renderStreamEvents', this.flowGraph);
3664
3667
  const lastDay = this.getLastDayOfMonth(month, year);
3665
3668
  let firstDay = new Date(year, month, 1);
3666
3669
  let endDay = new Date(year, month, 1);
3667
3670
  endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
3668
3671
  var period = ("0" + (month + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + new Date().getFullYear() + ' - ' + ("0" + (month + 1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + new Date().getFullYear();
3669
- return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year);
3672
+ return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year, showBackgroundButton);
3670
3673
  };
3671
- this.renderThisEvents = (index, startDate, showGraph = true) => {
3674
+ this.renderThisEvents = (index, startDate, showGraph = true, showBackgroundButton = false) => {
3672
3675
  var firstDate = new Date();
3673
3676
  var count = 7;
3674
3677
  //console.log('this start date', startDate);
@@ -3687,9 +3690,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3687
3690
  let endDay = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate());
3688
3691
  endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
3689
3692
  var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + firstDate.getFullYear();
3690
- return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"));
3693
+ return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"), showBackgroundButton);
3691
3694
  };
3692
- this.renderRangeEvents = (firstDate, count, eventsContainer) => {
3695
+ this.renderRangeEvents = (firstDate, count, eventsContainer, showBackgroundButton = false) => {
3693
3696
  var lastDate = new Date(firstDate.getTime());
3694
3697
  lastDate.setDate(lastDate.getDate() + count - 1);
3695
3698
  const lastDay = count;
@@ -3698,13 +3701,25 @@ let SfIEvents = class SfIEvents extends LitElement {
3698
3701
  endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay + 1);
3699
3702
  var period = ("0" + (firstDate.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDate.getDate()).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (lastDate.getMonth() + 1)).slice(-2) + "/" + ("0" + lastDate.getDate()).slice(-2) + '/' + lastDate.getFullYear();
3700
3703
  //console.log('rangeperiod', period)
3701
- var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
3704
+ var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate, "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton);
3702
3705
  eventsContainer.querySelector('.calendar-right-data').innerHTML = html;
3703
3706
  if (eventsContainer.innerHTML.indexOf('button-select-all') < 0) {
3704
3707
  eventsContainer.insertAdjacentHTML('beforeend', this.renderSelectAllButtons());
3705
3708
  }
3706
3709
  this.renderButtonRefresh(eventsContainer);
3707
3710
  this.attachTimelineFilterHandlers(eventsContainer);
3711
+ let backgroundProcessButton = eventsContainer.querySelector('#button-background-process');
3712
+ if (showBackgroundButton) {
3713
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
3714
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
3715
+ if (showBackgroundButton) {
3716
+ backgroundProcessButton.addEventListener('click', () => {
3717
+ console.log('bulk-progress clicked');
3718
+ let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
3719
+ bulkLoader.scrollIntoView();
3720
+ });
3721
+ }
3722
+ }
3708
3723
  const filterButton = eventsContainer.querySelector('#filter-button');
3709
3724
  filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
3710
3725
  const filterList = eventsContainer.querySelector('#filter-list-container');
@@ -6785,7 +6800,7 @@ let SfIEvents = class SfIEvents extends LitElement {
6785
6800
  inputLabelFilterMobile.style.display = 'none';
6786
6801
  this._SfCustomContainer.querySelector('#button-year-to-date').click();
6787
6802
  };
6788
- this.renderThis = (index = 1, showGraph = true) => {
6803
+ this.renderThis = (index = 1, showGraph = true, showBackgroundButton) => {
6789
6804
  var _a, _b;
6790
6805
  this.clearGraphData();
6791
6806
  this.clearSelectedGraphParam();
@@ -6832,13 +6847,25 @@ let SfIEvents = class SfIEvents extends LitElement {
6832
6847
  html += '<div class="calendar-right-data flex-grow">';
6833
6848
  // var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
6834
6849
  var startDate = new Date();
6835
- html += this.renderThisEvents(index, startDate, showGraph);
6850
+ html += this.renderThisEvents(index, startDate, showGraph, showBackgroundButton);
6836
6851
  startDate.setDate(startDate.getDate() + 1);
6837
6852
  html += '</div>';
6838
6853
  html += this.renderSelectAllButtons();
6839
6854
  html += '</div>';
6840
6855
  this._SfThisContainer.innerHTML = html;
6841
6856
  this.renderButtonRefresh(this._SfThisContainer);
6857
+ let backgroundProcessButton = this._SfThisContainer.querySelector('#button-background-process');
6858
+ if (backgroundProcessButton != null) {
6859
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
6860
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
6861
+ if (showBackgroundButton) {
6862
+ backgroundProcessButton.addEventListener('click', () => {
6863
+ console.log('bulk-progress clicked');
6864
+ let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
6865
+ bulkLoader.scrollIntoView();
6866
+ });
6867
+ }
6868
+ }
6842
6869
  const filterButton = this._SfThisContainer.querySelector('#filter-button');
6843
6870
  filterButton === null || filterButton === void 0 ? void 0 : filterButton.addEventListener('click', () => {
6844
6871
  const filterList = this._SfThisContainer.querySelector('#filter-list-container');
@@ -6854,7 +6881,7 @@ let SfIEvents = class SfIEvents extends LitElement {
6854
6881
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
6855
6882
  }
6856
6883
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
6857
- this.renderStream(index);
6884
+ this.renderStream(index, showGraph, showBackgroundButton);
6858
6885
  });
6859
6886
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
6860
6887
  // selectFeatureAll.addEventListener('click',async(ev: any) => {
@@ -6923,19 +6950,19 @@ let SfIEvents = class SfIEvents extends LitElement {
6923
6950
  const radioCompleteness = this._SfThisContainer.querySelector('#radio-completeness');
6924
6951
  radioCompleteness === null || radioCompleteness === void 0 ? void 0 : radioCompleteness.addEventListener('click', () => {
6925
6952
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
6926
- this.renderThis(index);
6953
+ this.renderThis(index, showGraph, showBackgroundButton);
6927
6954
  this.renderCompletenessGraph(this._SfThisContainer);
6928
6955
  });
6929
6956
  const radioTimeliness = this._SfThisContainer.querySelector('#radio-timeliness');
6930
6957
  radioTimeliness === null || radioTimeliness === void 0 ? void 0 : radioTimeliness.addEventListener('click', () => {
6931
6958
  this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
6932
- this.renderThis(index);
6959
+ this.renderThis(index, showGraph, showBackgroundButton);
6933
6960
  this.renderTimelinessGraph(this._SfThisContainer);
6934
6961
  });
6935
6962
  const radioCompliance = this._SfThisContainer.querySelector('#radio-compliance');
6936
6963
  radioCompliance === null || radioCompliance === void 0 ? void 0 : radioCompliance.addEventListener('click', () => {
6937
6964
  this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
6938
- this.renderThis(index);
6965
+ this.renderThis(index, showGraph, showBackgroundButton);
6939
6966
  this.renderComplianceGraph(this._SfThisContainer);
6940
6967
  });
6941
6968
  // const radioCompliance = (this._SfThisContainer as HTMLDivElement).querySelector('#radio-compliance') as HTMLButtonElement;
@@ -6947,49 +6974,49 @@ let SfIEvents = class SfIEvents extends LitElement {
6947
6974
  const radioRisk = this._SfThisContainer.querySelector('#radio-risk');
6948
6975
  radioRisk === null || radioRisk === void 0 ? void 0 : radioRisk.addEventListener('click', () => {
6949
6976
  this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
6950
- this.renderThis(index);
6977
+ this.renderThis(index, showGraph, showBackgroundButton);
6951
6978
  this.renderRiskGraph(this._SfThisContainer);
6952
6979
  });
6953
6980
  const radioFunction = this._SfThisContainer.querySelector('#radio-function');
6954
6981
  radioFunction === null || radioFunction === void 0 ? void 0 : radioFunction.addEventListener('click', () => {
6955
6982
  this.flowGraph = this.FLOW_GRAPH_FUNCTION;
6956
- this.renderThis(index);
6983
+ this.renderThis(index, showGraph, showBackgroundButton);
6957
6984
  this.renderFunctionGraph(this._SfThisContainer);
6958
6985
  });
6959
6986
  const radioRiskSeverity = this._SfThisContainer.querySelector('#radio-riskseverity');
6960
6987
  radioRiskSeverity === null || radioRiskSeverity === void 0 ? void 0 : radioRiskSeverity.addEventListener('click', () => {
6961
6988
  this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
6962
- this.renderThis(index);
6989
+ this.renderThis(index, showGraph, showBackgroundButton);
6963
6990
  this.renderRiskSeverityGraph(this._SfThisContainer);
6964
6991
  });
6965
6992
  const radioObligationType = this._SfThisContainer.querySelector('#radio-obligationtype');
6966
6993
  radioObligationType === null || radioObligationType === void 0 ? void 0 : radioObligationType.addEventListener('click', () => {
6967
6994
  this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
6968
- this.renderThis(index);
6995
+ this.renderThis(index, showGraph, showBackgroundButton);
6969
6996
  this.renderObligationTypeGraph(this._SfThisContainer);
6970
6997
  });
6971
6998
  const radioJurisdiction = this._SfThisContainer.querySelector('#radio-jurisdiction');
6972
6999
  radioJurisdiction === null || radioJurisdiction === void 0 ? void 0 : radioJurisdiction.addEventListener('click', () => {
6973
7000
  this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
6974
- this.renderThis(index);
7001
+ this.renderThis(index, showGraph, showBackgroundButton);
6975
7002
  this.renderJurisdictionGraph(this._SfThisContainer);
6976
7003
  });
6977
7004
  const radioFrequency = this._SfThisContainer.querySelector('#radio-frequency');
6978
7005
  radioFrequency === null || radioFrequency === void 0 ? void 0 : radioFrequency.addEventListener('click', () => {
6979
7006
  this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
6980
- this.renderThis(index);
7007
+ this.renderThis(index, showGraph, showBackgroundButton);
6981
7008
  this.renderFrequencyGraph(this._SfThisContainer);
6982
7009
  });
6983
7010
  const radioSubcategory = this._SfThisContainer.querySelector('#radio-subcategory');
6984
7011
  radioSubcategory === null || radioSubcategory === void 0 ? void 0 : radioSubcategory.addEventListener('click', () => {
6985
7012
  this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
6986
- this.renderThis(index);
7013
+ this.renderThis(index, showGraph, showBackgroundButton);
6987
7014
  this.renderSubcategoryGraph(this._SfThisContainer);
6988
7015
  });
6989
7016
  const radioLocation = this._SfThisContainer.querySelector('#radio-location');
6990
7017
  radioLocation === null || radioLocation === void 0 ? void 0 : radioLocation.addEventListener('click', () => {
6991
7018
  this.flowGraph = this.FLOW_GRAPH_LOCATION;
6992
- this.renderThis(index);
7019
+ this.renderThis(index, showGraph, showBackgroundButton);
6993
7020
  this.renderLocationGraph(this._SfThisContainer);
6994
7021
  });
6995
7022
  // const buttonStatusMore = (this._SfThisContainer as HTMLDivElement).querySelector('#button-status-more');
@@ -7008,7 +7035,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7008
7035
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7009
7036
  this.currentColumnIndex = target + "";
7010
7037
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
7011
- this.renderThis(target);
7038
+ this.renderThis(target, showGraph, showBackgroundButton);
7012
7039
  });
7013
7040
  (_b = this._SfThisContainer.querySelector('#stream-month-' + i + '-mobile')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async (ev) => {
7014
7041
  const target = parseInt(ev.target.id.split('-')[2]);
@@ -7017,7 +7044,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7017
7044
  this.currentColumnIndex = target + "";
7018
7045
  const dateResult = this.calculateStartAndEndDateOfThis(target);
7019
7046
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
7020
- this.renderThis(target);
7047
+ this.renderThis(target, showGraph, showBackgroundButton);
7021
7048
  });
7022
7049
  }
7023
7050
  const buttonRefresh = this._SfThisContainer.querySelector('#button-refresh');
@@ -7027,7 +7054,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7027
7054
  const dateResult = this.calculateStartAndEndDateOfThis(index);
7028
7055
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
7029
7056
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
7030
- this.renderThis(index);
7057
+ this.renderThis(index, showGraph, showBackgroundButton);
7031
7058
  });
7032
7059
  this.attachListReportingListeners(this._SfThisContainer);
7033
7060
  const buttonArr = this._SfThisContainer.querySelectorAll('.button-expand');
@@ -7204,7 +7231,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7204
7231
  }
7205
7232
  });
7206
7233
  };
7207
- this.renderStream = (index = 0, showGraph = true) => {
7234
+ this.renderStream = (index = 0, showGraph = true, showBackgroundButton) => {
7208
7235
  //console.log('flowgraph renderStream', this.flowGraph);
7209
7236
  var _a, _b;
7210
7237
  this.streamIndex = index;
@@ -7246,7 +7273,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7246
7273
  for (i = 0; i < 12; i++) {
7247
7274
  if (i === index) {
7248
7275
  //console.log(i, index)
7249
- html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph);
7276
+ html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph, showBackgroundButton);
7250
7277
  }
7251
7278
  startDate.setMonth(startDate.getMonth() + 1);
7252
7279
  }
@@ -7273,7 +7300,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7273
7300
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
7274
7301
  }
7275
7302
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7276
- this.renderStream(index);
7303
+ this.renderStream(index, showGraph, showBackgroundButton);
7277
7304
  });
7278
7305
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
7279
7306
  // selectFeatureAll?.addEventListener('click',async(ev: any) => {
@@ -7342,69 +7369,81 @@ let SfIEvents = class SfIEvents extends LitElement {
7342
7369
  const radioCompleteness = this._SfStreamContainer.querySelector('#radio-completeness');
7343
7370
  radioCompleteness === null || radioCompleteness === void 0 ? void 0 : radioCompleteness.addEventListener('click', () => {
7344
7371
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7345
- this.renderStream(index);
7372
+ this.renderStream(index, showGraph, showBackgroundButton);
7346
7373
  this.renderCompletenessGraph(this._SfStreamContainer);
7347
7374
  });
7348
7375
  const radioTimeliness = this._SfStreamContainer.querySelector('#radio-timeliness');
7349
7376
  radioTimeliness === null || radioTimeliness === void 0 ? void 0 : radioTimeliness.addEventListener('click', () => {
7350
7377
  this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
7351
- this.renderStream(index);
7378
+ this.renderStream(index, showGraph, showBackgroundButton);
7352
7379
  this.renderTimelinessGraph(this._SfStreamContainer);
7353
7380
  });
7354
7381
  const radioCompliance = this._SfStreamContainer.querySelector('#radio-compliance');
7355
7382
  radioCompliance === null || radioCompliance === void 0 ? void 0 : radioCompliance.addEventListener('click', () => {
7356
7383
  this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
7357
- this.renderStream(index);
7384
+ this.renderStream(index, showGraph, showBackgroundButton);
7358
7385
  this.renderComplianceGraph(this._SfStreamContainer);
7359
7386
  });
7360
7387
  const radioRisk = this._SfStreamContainer.querySelector('#radio-risk');
7361
7388
  radioRisk === null || radioRisk === void 0 ? void 0 : radioRisk.addEventListener('click', () => {
7362
7389
  this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
7363
- this.renderStream(index);
7390
+ this.renderStream(index, showGraph, showBackgroundButton);
7364
7391
  this.renderRiskGraph(this._SfStreamContainer);
7365
7392
  });
7366
7393
  const radioRiskSeverity = this._SfStreamContainer.querySelector('#radio-riskseverity');
7367
7394
  radioRiskSeverity === null || radioRiskSeverity === void 0 ? void 0 : radioRiskSeverity.addEventListener('click', () => {
7368
7395
  this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
7369
- this.renderStream(index);
7396
+ this.renderStream(index, showGraph, showBackgroundButton);
7370
7397
  this.renderRiskSeverityGraph(this._SfStreamContainer);
7371
7398
  });
7372
7399
  const radioFunction = this._SfStreamContainer.querySelector('#radio-function');
7373
7400
  radioFunction === null || radioFunction === void 0 ? void 0 : radioFunction.addEventListener('click', () => {
7374
7401
  this.flowGraph = this.FLOW_GRAPH_FUNCTION;
7375
- this.renderStream(index);
7402
+ this.renderStream(index, showGraph, showBackgroundButton);
7376
7403
  this.renderFunctionGraph(this._SfStreamContainer);
7377
7404
  });
7378
7405
  const radioObligationType = this._SfStreamContainer.querySelector('#radio-obligationtype');
7379
7406
  radioObligationType === null || radioObligationType === void 0 ? void 0 : radioObligationType.addEventListener('click', () => {
7380
7407
  this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
7381
- this.renderStream(index);
7408
+ this.renderStream(index, showGraph, showBackgroundButton);
7382
7409
  this.renderObligationTypeGraph(this._SfStreamContainer);
7383
7410
  });
7384
7411
  const radioJurisdiction = this._SfStreamContainer.querySelector('#radio-jurisdiction');
7385
7412
  radioJurisdiction === null || radioJurisdiction === void 0 ? void 0 : radioJurisdiction.addEventListener('click', () => {
7386
7413
  this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
7387
- this.renderStream(index);
7414
+ this.renderStream(index, showGraph, showBackgroundButton);
7388
7415
  this.renderJurisdictionGraph(this._SfStreamContainer);
7389
7416
  });
7390
7417
  const radioFrequency = this._SfStreamContainer.querySelector('#radio-frequency');
7391
7418
  radioFrequency === null || radioFrequency === void 0 ? void 0 : radioFrequency.addEventListener('click', () => {
7392
7419
  this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
7393
- this.renderStream(index);
7420
+ this.renderStream(index, showGraph, showBackgroundButton);
7394
7421
  this.renderFrequencyGraph(this._SfStreamContainer);
7395
7422
  });
7396
7423
  const radioSubcategory = this._SfStreamContainer.querySelector('#radio-subcategory');
7397
7424
  radioSubcategory === null || radioSubcategory === void 0 ? void 0 : radioSubcategory.addEventListener('click', () => {
7398
7425
  this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
7399
- this.renderStream(index);
7426
+ this.renderStream(index, showGraph, showBackgroundButton);
7400
7427
  this.renderSubcategoryGraph(this._SfStreamContainer);
7401
7428
  });
7402
7429
  const radioLocation = this._SfStreamContainer.querySelector('#radio-location');
7403
7430
  radioLocation === null || radioLocation === void 0 ? void 0 : radioLocation.addEventListener('click', () => {
7404
7431
  this.flowGraph = this.FLOW_GRAPH_LOCATION;
7405
- this.renderStream(index);
7432
+ this.renderStream(index, showGraph, showBackgroundButton);
7406
7433
  this.renderLocationGraph(this._SfStreamContainer);
7407
7434
  });
7435
+ let backgroundProcessButton = this._SfStreamContainer.querySelector('#button-background-process');
7436
+ if (showBackgroundButton) {
7437
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none';
7438
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
7439
+ if (showBackgroundButton) {
7440
+ backgroundProcessButton.addEventListener('click', () => {
7441
+ console.log('bulk-progress clicked');
7442
+ let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
7443
+ bulkLoader.scrollIntoView();
7444
+ });
7445
+ }
7446
+ }
7408
7447
  // const buttonStatusMore = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-status-more');
7409
7448
  // buttonStatusMore?.addEventListener('click', () => {
7410
7449
  // const divStatusList = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.late-statuses') as NodeListOf<HTMLDivElement>;
@@ -7426,7 +7465,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7426
7465
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
7427
7466
  }
7428
7467
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7429
- this.renderStream(target);
7468
+ this.renderStream(target, showGraph, showBackgroundButton);
7430
7469
  });
7431
7470
  (_b = this._SfStreamContainer.querySelector('#stream-month-' + i + '-mobile')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async (ev) => {
7432
7471
  const target = parseInt(ev.target.id.split('-')[2]);
@@ -7438,7 +7477,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7438
7477
  }
7439
7478
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7440
7479
  this.currentColumnIndex = target + "";
7441
- this.renderStream(target);
7480
+ this.renderStream(target, showGraph, showBackgroundButton);
7442
7481
  });
7443
7482
  }
7444
7483
  const buttonRefresh = this._SfStreamContainer.querySelector('#button-refresh');
@@ -7453,7 +7492,7 @@ let SfIEvents = class SfIEvents extends LitElement {
7453
7492
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
7454
7493
  }
7455
7494
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7456
- this.renderStream(index);
7495
+ this.renderStream(index, showGraph, showBackgroundButton);
7457
7496
  });
7458
7497
  this.attachListReportingListeners(this._SfStreamContainer);
7459
7498
  const buttonArr = this._SfStreamContainer.querySelectorAll('.button-expand');
@@ -10072,7 +10111,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10072
10111
  //console.log('render stream', id);
10073
10112
  this.enableStream();
10074
10113
  this.renderTabs(this.TAB_STREAM);
10075
- this.renderStream(parseInt(id));
10114
+ this.renderStream(parseInt(id), false, false);
10076
10115
  });
10077
10116
  }
10078
10117
  };
@@ -13597,13 +13636,13 @@ let SfIEvents = class SfIEvents extends LitElement {
13597
13636
  (_c = container.querySelector('.switch-solid')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', () => {
13598
13637
  this.fill = "solid";
13599
13638
  if (this.getCurrentTab() == this.TAB_STREAM) {
13600
- this.renderStream();
13639
+ this.renderStream(0, true, false);
13601
13640
  }
13602
13641
  });
13603
13642
  (_f = container.querySelector('.switch-pattern')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', () => {
13604
13643
  this.fill = "pattern";
13605
13644
  if (this.getCurrentTab() == this.TAB_STREAM) {
13606
- this.renderStream();
13645
+ this.renderStream(0, true, false);
13607
13646
  }
13608
13647
  });
13609
13648
  };
@@ -13656,7 +13695,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13656
13695
  //console.log('canceled');
13657
13696
  if (this.getCurrentTab() == this.TAB_STREAM) {
13658
13697
  this.renderChartSettings(container, -1, -1, ctx);
13659
- this.renderStream(this.streamIndex);
13698
+ this.renderStream(this.streamIndex, false, false);
13660
13699
  }
13661
13700
  // if(this.getCurrentTab() == this.TAB_UPCOMING) {
13662
13701
  // this.renderChartSettings(container, -1, ctx);
@@ -13664,7 +13703,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13664
13703
  // }
13665
13704
  if (this.getCurrentTab() == this.TAB_THIS) {
13666
13705
  this.renderChartSettings(container, -1, -1, ctx);
13667
- this.renderThis(this.streamIndex);
13706
+ this.renderThis(this.streamIndex, false, false);
13668
13707
  }
13669
13708
  // if(this.getCurrentTab() == this.TAB_PAST) {
13670
13709
  // this.renderChartSettings(container, -1, ctx);
@@ -14086,6 +14125,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14086
14125
  responsive: true,
14087
14126
  maintainAspectRatio: false,
14088
14127
  animation: {
14128
+ duration: 0,
14089
14129
  onComplete: () => {
14090
14130
  if (this.chart4 != null) {
14091
14131
  if (type == 'bar') {
@@ -14264,6 +14304,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14264
14304
  responsive: true,
14265
14305
  maintainAspectRatio: false,
14266
14306
  animation: {
14307
+ duration: 0,
14267
14308
  onComplete: () => {
14268
14309
  if (this.chart3 != null) {
14269
14310
  if (type == 'bar') {
@@ -14442,6 +14483,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14442
14483
  responsive: true,
14443
14484
  maintainAspectRatio: false,
14444
14485
  animation: {
14486
+ duration: 0,
14445
14487
  onComplete: () => {
14446
14488
  if (this.chart2 != null) {
14447
14489
  if (type == 'bar') {
@@ -14618,6 +14660,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14618
14660
  responsive: true,
14619
14661
  maintainAspectRatio: false,
14620
14662
  animation: {
14663
+ duration: 0,
14621
14664
  onComplete: () => {
14622
14665
  if (this.chart != null) {
14623
14666
  if (type == 'bar') {
@@ -15335,7 +15378,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15335
15378
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
15336
15379
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
15337
15380
  }
15338
- this.renderStream(idx);
15381
+ this.renderStream(idx, true, false);
15339
15382
  });
15340
15383
  // (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-upcoming')?.addEventListener('click', async () => {
15341
15384
  // this.enableUpcoming();
@@ -15363,7 +15406,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15363
15406
  //console.log('dateresult', dateResult)
15364
15407
  this.currentColumnIndex = 1 + "";
15365
15408
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
15366
- this.renderThis();
15409
+ this.renderThis(0, true, false);
15367
15410
  });
15368
15411
  // (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-past')?.addEventListener('click', async () => {
15369
15412
  // this.enablePast();
@@ -17513,17 +17556,17 @@ let SfIEvents = class SfIEvents extends LitElement {
17513
17556
  setTimeout(resolve, ms);
17514
17557
  });
17515
17558
  };
17516
- this.renderAppropriateStream = (startDate, endDate, showGraph = false) => {
17559
+ this.renderAppropriateStream = (startDate, endDate, showGraph = false, showBackgroundButton = false) => {
17517
17560
  if (startDate == "" && endDate == "")
17518
17561
  this.renderCalendar(); // yearly
17519
17562
  if (this.selectedTab == this.TAB_STREAM) {
17520
- this.renderStream(parseInt(this.currentColumnIndex), showGraph);
17563
+ this.renderStream(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
17521
17564
  }
17522
17565
  // if(this.selectedTab == this.TAB_UPCOMING) {
17523
17566
  // this.renderUpcoming(parseInt(this.currentColumnIndex), false);
17524
17567
  // }
17525
17568
  if (this.selectedTab == this.TAB_THIS) {
17526
- this.renderThis(parseInt(this.currentColumnIndex), showGraph);
17569
+ this.renderThis(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
17527
17570
  }
17528
17571
  // if(this.selectedTab == this.TAB_PAST) {
17529
17572
  // this.renderPast(parseInt(this.currentColumnIndex), false);
@@ -17802,10 +17845,11 @@ let SfIEvents = class SfIEvents extends LitElement {
17802
17845
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
17803
17846
  this._SfLoader.innerHTML = '';
17804
17847
  if (xhr.status == 200) {
17805
- const jsonRespose = JSON.parse(xhr.responseText);
17806
- console.log('bulk reports jsonRespose', jsonRespose);
17807
- if (jsonRespose.result == true) {
17808
- for (let sortid of Object.keys(jsonRespose.data)) {
17848
+ const jsonResponse = JSON.parse(xhr.responseText);
17849
+ console.log('bulk reports jsonResponse', jsonResponse);
17850
+ let flagBulk = false;
17851
+ if (jsonResponse.result == true) {
17852
+ for (let sortid of Object.keys(jsonResponse.data)) {
17809
17853
  let sortidArr = sortid.split(';');
17810
17854
  let mmddyyyy = sortidArr[0];
17811
17855
  let entityid = sortidArr[1];
@@ -17817,13 +17861,26 @@ let SfIEvents = class SfIEvents extends LitElement {
17817
17861
  for (let i = 0; i < this.events[mmdd].length; i++) {
17818
17862
  if (this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid) {
17819
17863
  this.events[mmdd][i].isbulk = true;
17864
+ flagBulk = true;
17820
17865
  break;
17821
17866
  }
17822
17867
  }
17823
17868
  }
17824
17869
  }
17825
- if (Object.keys(jsonRespose.data).length > 0) {
17826
- this.renderAppropriateStream(this.sdate, this.edate, true);
17870
+ if (flagBulk) {
17871
+ // backgroundProcessButton.classList.remove('hide');
17872
+ // backgroundProcessButton.style.display = 'flex'
17873
+ // console.log('backgroundprocessbutton', backgroundProcessButton);
17874
+ // backgroundProcessButton.addEventListener('click',() => {
17875
+ // console.log('bulk-progress clicked')
17876
+ // let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
17877
+ // bulkLoader.scrollIntoView();
17878
+ // })
17879
+ this.renderAppropriateStream(this.sdate, this.edate, true, true);
17880
+ }
17881
+ else {
17882
+ // backgroundProcessButton.classList.add('hide')
17883
+ // backgroundProcessButton.style.display = 'none'
17827
17884
  }
17828
17885
  }
17829
17886
  }
@@ -20656,6 +20713,16 @@ SfIEvents.styles = css `
20656
20713
  bottom: 10px;
20657
20714
  right: 10px
20658
20715
  }
20716
+ #button-background-process {
20717
+ display:none;
20718
+ position: fixed;
20719
+ top: 10px;
20720
+ left:0;
20721
+ right: 0;
20722
+ margin-left: auto;
20723
+ margin-right: auto;
20724
+ width: fit-content;
20725
+ }
20659
20726
 
20660
20727
  .small-icon {
20661
20728
  font-size: 98%
@@ -2694,6 +2694,16 @@ export class SfIEvents extends LitElement {
2694
2694
  bottom: 10px;
2695
2695
  right: 10px
2696
2696
  }
2697
+ #button-background-process {
2698
+ display:none;
2699
+ position: fixed;
2700
+ top: 10px;
2701
+ left:0;
2702
+ right: 0;
2703
+ margin-left: auto;
2704
+ margin-right: auto;
2705
+ width: fit-content;
2706
+ }
2697
2707
 
2698
2708
  .small-icon {
2699
2709
  font-size: 98%
@@ -4248,7 +4258,7 @@ export class SfIEvents extends LitElement {
4248
4258
 
4249
4259
  }
4250
4260
 
4251
- renderCalendarGraphs = (showGraph: boolean, parametersTitle: string) => {
4261
+ renderCalendarGraphs = (showGraph: boolean, parametersTitle: string, showBackgroundButton: boolean) => {
4252
4262
 
4253
4263
  //console.log('flowGraph', this.flowGraph);
4254
4264
 
@@ -4269,7 +4279,10 @@ export class SfIEvents extends LitElement {
4269
4279
  }
4270
4280
  html += '</div></div>'
4271
4281
  }
4272
- 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>';
4282
+ 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></div>';
4283
+ if(showBackgroundButton){
4284
+ html += '</button><button id="button-background-process" part="button-background-process" class="align-center d-flex justify-center"><h4 part="processing-title" class="mr-10">background processing</h4><div class="lds-dual-ring1"></div></button>'
4285
+ }
4273
4286
  html += '<div class="align-center d-flex flex-wrap align-center 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>&nbsp;&nbsp;Last Updated on ' + this.lastupdated + '</h6></div>';
4274
4287
  if(showGraph) {
4275
4288
  html += '<div part="stream-event-chart-selection" class="mb-20">';
@@ -4661,7 +4674,7 @@ export class SfIEvents extends LitElement {
4661
4674
  if(event.isbulk == null || !event.isbulk){
4662
4675
  html += '<button id="button-unmapped-expand-'+mmdd.replace('/', '-')+'-'+j+'-'+((event.isnotice ?? false)?'isnotice':'isevent')+ '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>'
4663
4676
  }else{
4664
- html += '<div class="lds-dual-ring1"></div>';
4677
+ html += '<div class="lds-dual-ring1 bulk-loader"></div>';
4665
4678
  }
4666
4679
  html += '</td>';
4667
4680
  html += '<td part="td-body">';
@@ -4838,7 +4851,7 @@ export class SfIEvents extends LitElement {
4838
4851
 
4839
4852
  }
4840
4853
 
4841
- renderEvents = (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any = null, parametersTitle: string) => {
4854
+ renderEvents = (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any = null, parametersTitle: string, showBackgroundButton: boolean) => {
4842
4855
  var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0;
4843
4856
  var html = '';
4844
4857
  this.selectedItemIds = [];
@@ -4855,7 +4868,7 @@ export class SfIEvents extends LitElement {
4855
4868
  this.clearSelectedGraphParam();
4856
4869
  this.clearSelectedLegend();
4857
4870
 
4858
- html += this.renderCalendarGraphs(showGraph, parametersTitle);
4871
+ html += this.renderCalendarGraphs(showGraph, parametersTitle, showBackgroundButton);
4859
4872
  html += this.renderCalendarContainerDivStart(index)
4860
4873
  html += this.renderCalendarEventSummary();
4861
4874
 
@@ -6040,7 +6053,7 @@ export class SfIEvents extends LitElement {
6040
6053
  })
6041
6054
  }
6042
6055
  }
6043
- renderStreamEvents = (index: number, month: number, year: number, showGraph: boolean = true) => {
6056
+ renderStreamEvents = (index: number, month: number, year: number, showGraph: boolean = true, showBackgroundButton: boolean = false) => {
6044
6057
 
6045
6058
  //console.log('flowgraph renderStreamEvents', this.flowGraph);
6046
6059
 
@@ -6050,11 +6063,11 @@ export class SfIEvents extends LitElement {
6050
6063
  endDay?.setDate(endDay.getDate() + lastDay + 1);
6051
6064
  var period = ("0" + (month+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + new Date().getFullYear() + ' - ' + ("0" + (month+1)).slice(-2) + "/" + ("0" + lastDay).slice(-2) + '/' + new Date().getFullYear()
6052
6065
 
6053
- return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year);
6066
+ return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, month, period, null, this.monthNames[month] + " " + year, showBackgroundButton);
6054
6067
 
6055
6068
  }
6056
6069
 
6057
- renderThisEvents = (index: number, startDate: Date, showGraph: boolean = true) => {
6070
+ renderThisEvents = (index: number, startDate: Date, showGraph: boolean = true, showBackgroundButton: boolean = false) => {
6058
6071
 
6059
6072
  var firstDate = new Date();
6060
6073
  var count = 7;
@@ -6084,11 +6097,11 @@ export class SfIEvents extends LitElement {
6084
6097
 
6085
6098
  var period = ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + 1).slice(-2) + '/' + firstDate.getFullYear() + ' - ' + ("0" + (firstDate.getMonth()+1)).slice(-2) + "/" + ("0" + count).slice(-2) + '/' + firstDate.getFullYear()
6086
6099
 
6087
- return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"));
6100
+ return this.renderEvents(firstDay, endDay, 1, lastDay, showGraph, index, (firstDate.getMonth()), period, null, "This " + (index === 0 ? "Week" : "Month"), showBackgroundButton);
6088
6101
 
6089
6102
  }
6090
6103
 
6091
- renderRangeEvents = (firstDate: Date, count: number, eventsContainer: HTMLDivElement) => {
6104
+ renderRangeEvents = (firstDate: Date, count: number, eventsContainer: HTMLDivElement, showBackgroundButton: boolean = false) => {
6092
6105
 
6093
6106
 
6094
6107
  var lastDate = new Date(firstDate.getTime());
@@ -6103,7 +6116,7 @@ export class SfIEvents extends LitElement {
6103
6116
 
6104
6117
  //console.log('rangeperiod', period)
6105
6118
 
6106
- var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'));
6119
+ var html = this.renderEvents(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton);
6107
6120
 
6108
6121
  eventsContainer.querySelector('.calendar-right-data')!.innerHTML = html;
6109
6122
  if(eventsContainer.innerHTML.indexOf('button-select-all') < 0){
@@ -6111,6 +6124,18 @@ export class SfIEvents extends LitElement {
6111
6124
  }
6112
6125
  this.renderButtonRefresh(eventsContainer);
6113
6126
  this.attachTimelineFilterHandlers(eventsContainer);
6127
+ let backgroundProcessButton = eventsContainer.querySelector('#button-background-process') as HTMLButtonElement
6128
+ if(showBackgroundButton){
6129
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none'
6130
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
6131
+ if(showBackgroundButton){
6132
+ backgroundProcessButton.addEventListener('click',() => {
6133
+ console.log('bulk-progress clicked')
6134
+ let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
6135
+ bulkLoader.scrollIntoView();
6136
+ })
6137
+ }
6138
+ }
6114
6139
  const filterButton = eventsContainer.querySelector('#filter-button') as HTMLButtonElement
6115
6140
  filterButton?.addEventListener('click',() => {
6116
6141
  const filterList = eventsContainer.querySelector('#filter-list-container') as HTMLDivElement
@@ -9834,7 +9859,7 @@ export class SfIEvents extends LitElement {
9834
9859
  ((this._SfCustomContainer as HTMLDivElement).querySelector('#button-year-to-date') as HTMLButtonElement).click();
9835
9860
  }
9836
9861
 
9837
- renderThis = (index: number = 1, showGraph: boolean = true) => {
9862
+ renderThis = (index: number = 1, showGraph: boolean = true, showBackgroundButton: boolean) => {
9838
9863
 
9839
9864
  this.clearGraphData();
9840
9865
  this.clearSelectedGraphParam();
@@ -9890,7 +9915,7 @@ export class SfIEvents extends LitElement {
9890
9915
 
9891
9916
  // var startDate = new Date(this.calendarStartMM + '/' + this.calendarStartDD + '/' + this.calendarStartYYYY);
9892
9917
  var startDate = new Date();
9893
- html += this.renderThisEvents(index, startDate, showGraph);
9918
+ html += this.renderThisEvents(index, startDate, showGraph, showBackgroundButton);
9894
9919
  startDate.setDate(startDate.getDate() + 1);
9895
9920
 
9896
9921
  html += '</div>';
@@ -9899,6 +9924,18 @@ export class SfIEvents extends LitElement {
9899
9924
 
9900
9925
  (this._SfThisContainer as HTMLDivElement).innerHTML = html;
9901
9926
  this.renderButtonRefresh((this._SfThisContainer as HTMLDivElement));
9927
+ let backgroundProcessButton = (this._SfThisContainer as HTMLDivElement).querySelector('#button-background-process') as HTMLButtonElement
9928
+ if(backgroundProcessButton != null){
9929
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none'
9930
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
9931
+ if(showBackgroundButton){
9932
+ backgroundProcessButton.addEventListener('click',() => {
9933
+ console.log('bulk-progress clicked')
9934
+ let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
9935
+ bulkLoader.scrollIntoView();
9936
+ })
9937
+ }
9938
+ }
9902
9939
  const filterButton = (this._SfThisContainer as HTMLDivElement).querySelector('#filter-button') as HTMLButtonElement
9903
9940
  filterButton?.addEventListener('click',() => {
9904
9941
  const filterList = (this._SfThisContainer as HTMLDivElement).querySelector('#filter-list-container') as HTMLDivElement
@@ -9914,7 +9951,7 @@ export class SfIEvents extends LitElement {
9914
9951
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
9915
9952
  }
9916
9953
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
9917
- this.renderStream(index);
9954
+ this.renderStream(index, showGraph, showBackgroundButton);
9918
9955
  })
9919
9956
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
9920
9957
  // selectFeatureAll.addEventListener('click',async(ev: any) => {
@@ -9989,7 +10026,7 @@ export class SfIEvents extends LitElement {
9989
10026
  radioCompleteness?.addEventListener('click', () => {
9990
10027
 
9991
10028
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
9992
- this.renderThis(index);
10029
+ this.renderThis(index, showGraph, showBackgroundButton);
9993
10030
  this.renderCompletenessGraph((this._SfThisContainer as HTMLDivElement));
9994
10031
 
9995
10032
  });
@@ -9998,7 +10035,7 @@ export class SfIEvents extends LitElement {
9998
10035
  radioTimeliness?.addEventListener('click', () => {
9999
10036
 
10000
10037
  this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
10001
- this.renderThis(index);
10038
+ this.renderThis(index, showGraph, showBackgroundButton);
10002
10039
  this.renderTimelinessGraph((this._SfThisContainer as HTMLDivElement))
10003
10040
 
10004
10041
  });
@@ -10007,7 +10044,7 @@ export class SfIEvents extends LitElement {
10007
10044
  radioCompliance?.addEventListener('click', () => {
10008
10045
 
10009
10046
  this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
10010
- this.renderThis(index);
10047
+ this.renderThis(index, showGraph, showBackgroundButton);
10011
10048
  this.renderComplianceGraph((this._SfThisContainer as HTMLDivElement))
10012
10049
 
10013
10050
  });
@@ -10025,7 +10062,7 @@ export class SfIEvents extends LitElement {
10025
10062
  radioRisk?.addEventListener('click', () => {
10026
10063
 
10027
10064
  this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
10028
- this.renderThis(index);
10065
+ this.renderThis(index, showGraph, showBackgroundButton);
10029
10066
  this.renderRiskGraph((this._SfThisContainer as HTMLDivElement))
10030
10067
 
10031
10068
  });
@@ -10035,7 +10072,7 @@ export class SfIEvents extends LitElement {
10035
10072
  radioFunction?.addEventListener('click', () => {
10036
10073
 
10037
10074
  this.flowGraph = this.FLOW_GRAPH_FUNCTION;
10038
- this.renderThis(index);
10075
+ this.renderThis(index, showGraph, showBackgroundButton);
10039
10076
  this.renderFunctionGraph((this._SfThisContainer as HTMLDivElement))
10040
10077
 
10041
10078
  });
@@ -10044,7 +10081,7 @@ export class SfIEvents extends LitElement {
10044
10081
  radioRiskSeverity?.addEventListener('click', () => {
10045
10082
 
10046
10083
  this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
10047
- this.renderThis(index);
10084
+ this.renderThis(index, showGraph, showBackgroundButton);
10048
10085
  this.renderRiskSeverityGraph((this._SfThisContainer as HTMLDivElement))
10049
10086
 
10050
10087
  });
@@ -10053,7 +10090,7 @@ export class SfIEvents extends LitElement {
10053
10090
  radioObligationType?.addEventListener('click', () => {
10054
10091
 
10055
10092
  this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
10056
- this.renderThis(index);
10093
+ this.renderThis(index, showGraph, showBackgroundButton);
10057
10094
  this.renderObligationTypeGraph((this._SfThisContainer as HTMLDivElement))
10058
10095
 
10059
10096
  });
@@ -10062,7 +10099,7 @@ export class SfIEvents extends LitElement {
10062
10099
  radioJurisdiction?.addEventListener('click', () => {
10063
10100
 
10064
10101
  this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
10065
- this.renderThis(index);
10102
+ this.renderThis(index, showGraph, showBackgroundButton);
10066
10103
  this.renderJurisdictionGraph((this._SfThisContainer as HTMLDivElement))
10067
10104
 
10068
10105
  });
@@ -10071,7 +10108,7 @@ export class SfIEvents extends LitElement {
10071
10108
  radioFrequency?.addEventListener('click', () => {
10072
10109
 
10073
10110
  this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
10074
- this.renderThis(index);
10111
+ this.renderThis(index, showGraph, showBackgroundButton);
10075
10112
  this.renderFrequencyGraph((this._SfThisContainer as HTMLDivElement))
10076
10113
 
10077
10114
  });
@@ -10080,7 +10117,7 @@ export class SfIEvents extends LitElement {
10080
10117
  radioSubcategory?.addEventListener('click', () => {
10081
10118
 
10082
10119
  this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
10083
- this.renderThis(index);
10120
+ this.renderThis(index, showGraph, showBackgroundButton);
10084
10121
  this.renderSubcategoryGraph((this._SfThisContainer as HTMLDivElement))
10085
10122
 
10086
10123
  });
@@ -10089,7 +10126,7 @@ export class SfIEvents extends LitElement {
10089
10126
  radioLocation?.addEventListener('click', () => {
10090
10127
 
10091
10128
  this.flowGraph = this.FLOW_GRAPH_LOCATION;
10092
- this.renderThis(index);
10129
+ this.renderThis(index, showGraph, showBackgroundButton);
10093
10130
  this.renderLocationGraph((this._SfThisContainer as HTMLDivElement))
10094
10131
 
10095
10132
  });
@@ -10113,7 +10150,7 @@ export class SfIEvents extends LitElement {
10113
10150
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10114
10151
  this.currentColumnIndex = target + "";
10115
10152
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
10116
- this.renderThis(target);
10153
+ this.renderThis(target, showGraph, showBackgroundButton);
10117
10154
  });
10118
10155
 
10119
10156
  (this._SfThisContainer as HTMLDivElement).querySelector('#stream-month-' + i + '-mobile')?.addEventListener('click', async (ev: any)=> {
@@ -10123,7 +10160,7 @@ export class SfIEvents extends LitElement {
10123
10160
  this.currentColumnIndex = target + "";
10124
10161
  const dateResult = this.calculateStartAndEndDateOfThis(target);
10125
10162
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
10126
- this.renderThis(target);
10163
+ this.renderThis(target, showGraph, showBackgroundButton);
10127
10164
  })
10128
10165
  }
10129
10166
  const buttonRefresh = (this._SfThisContainer as HTMLDivElement).querySelector('#button-refresh') as HTMLButtonElement
@@ -10133,7 +10170,7 @@ export class SfIEvents extends LitElement {
10133
10170
  const dateResult = this.calculateStartAndEndDateOfThis(index);
10134
10171
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate);
10135
10172
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate);
10136
- this.renderThis(index);
10173
+ this.renderThis(index, showGraph, showBackgroundButton);
10137
10174
  })
10138
10175
  this.attachListReportingListeners(this._SfThisContainer as HTMLDivElement);
10139
10176
  const buttonArr = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.button-expand') as NodeListOf<HTMLButtonElement>;
@@ -10343,7 +10380,7 @@ export class SfIEvents extends LitElement {
10343
10380
  })
10344
10381
  }
10345
10382
 
10346
- renderStream = (index: number = 0, showGraph: boolean = true) => {
10383
+ renderStream = (index: number = 0, showGraph: boolean = true, showBackgroundButton: boolean) => {
10347
10384
  //console.log('flowgraph renderStream', this.flowGraph);
10348
10385
 
10349
10386
  this.streamIndex = index;
@@ -10402,7 +10439,7 @@ export class SfIEvents extends LitElement {
10402
10439
  for(i = 0; i < 12; i++) {
10403
10440
  if(i === index) {
10404
10441
  //console.log(i, index)
10405
- html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph)
10442
+ html += this.renderStreamEvents(i, startDate.getMonth(), startDate.getFullYear(), showGraph, showBackgroundButton)
10406
10443
  }
10407
10444
  startDate.setMonth(startDate.getMonth() + 1);
10408
10445
  }
@@ -10430,7 +10467,7 @@ export class SfIEvents extends LitElement {
10430
10467
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","no",("0" + monthResult).slice(-2));
10431
10468
  }
10432
10469
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10433
- this.renderStream(index);
10470
+ this.renderStream(index, showGraph, showBackgroundButton);
10434
10471
  })
10435
10472
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
10436
10473
  // selectFeatureAll?.addEventListener('click',async(ev: any) => {
@@ -10506,7 +10543,7 @@ export class SfIEvents extends LitElement {
10506
10543
  radioCompleteness?.addEventListener('click', () => {
10507
10544
 
10508
10545
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10509
- this.renderStream(index);
10546
+ this.renderStream(index, showGraph, showBackgroundButton);
10510
10547
  this.renderCompletenessGraph((this._SfStreamContainer as HTMLDivElement));
10511
10548
 
10512
10549
  });
@@ -10515,7 +10552,7 @@ export class SfIEvents extends LitElement {
10515
10552
  radioTimeliness?.addEventListener('click', () => {
10516
10553
 
10517
10554
  this.flowGraph = this.FLOW_GRAPH_TIMELINESS;
10518
- this.renderStream(index);
10555
+ this.renderStream(index, showGraph, showBackgroundButton);
10519
10556
  this.renderTimelinessGraph((this._SfStreamContainer as HTMLDivElement))
10520
10557
 
10521
10558
  });
@@ -10524,7 +10561,7 @@ export class SfIEvents extends LitElement {
10524
10561
  radioCompliance?.addEventListener('click', () => {
10525
10562
 
10526
10563
  this.flowGraph = this.FLOW_GRAPH_COMPLIANCE;
10527
- this.renderStream(index);
10564
+ this.renderStream(index, showGraph, showBackgroundButton);
10528
10565
  this.renderComplianceGraph((this._SfStreamContainer as HTMLDivElement))
10529
10566
 
10530
10567
  });
@@ -10533,7 +10570,7 @@ export class SfIEvents extends LitElement {
10533
10570
  radioRisk?.addEventListener('click', () => {
10534
10571
 
10535
10572
  this.flowGraph = this.FLOW_GRAPH_RISKAREAS;
10536
- this.renderStream(index);
10573
+ this.renderStream(index, showGraph, showBackgroundButton);
10537
10574
  this.renderRiskGraph((this._SfStreamContainer as HTMLDivElement))
10538
10575
 
10539
10576
  });
@@ -10542,7 +10579,7 @@ export class SfIEvents extends LitElement {
10542
10579
  radioRiskSeverity?.addEventListener('click', () => {
10543
10580
 
10544
10581
  this.flowGraph = this.FLOW_GRAPH_RISKSEVERITY;
10545
- this.renderStream(index);
10582
+ this.renderStream(index, showGraph, showBackgroundButton);
10546
10583
  this.renderRiskSeverityGraph((this._SfStreamContainer as HTMLDivElement))
10547
10584
 
10548
10585
  });
@@ -10551,7 +10588,7 @@ export class SfIEvents extends LitElement {
10551
10588
  radioFunction?.addEventListener('click', () => {
10552
10589
 
10553
10590
  this.flowGraph = this.FLOW_GRAPH_FUNCTION;
10554
- this.renderStream(index);
10591
+ this.renderStream(index, showGraph, showBackgroundButton);
10555
10592
  this.renderFunctionGraph((this._SfStreamContainer as HTMLDivElement))
10556
10593
 
10557
10594
  });
@@ -10560,7 +10597,7 @@ export class SfIEvents extends LitElement {
10560
10597
  radioObligationType?.addEventListener('click', () => {
10561
10598
 
10562
10599
  this.flowGraph = this.FLOW_GRAPH_OBLIGATIONTYPE;
10563
- this.renderStream(index);
10600
+ this.renderStream(index, showGraph, showBackgroundButton);
10564
10601
  this.renderObligationTypeGraph((this._SfStreamContainer as HTMLDivElement))
10565
10602
 
10566
10603
  });
@@ -10569,7 +10606,7 @@ export class SfIEvents extends LitElement {
10569
10606
  radioJurisdiction?.addEventListener('click', () => {
10570
10607
 
10571
10608
  this.flowGraph = this.FLOW_GRAPH_JURISDICTION;
10572
- this.renderStream(index);
10609
+ this.renderStream(index, showGraph, showBackgroundButton);
10573
10610
  this.renderJurisdictionGraph((this._SfStreamContainer as HTMLDivElement))
10574
10611
 
10575
10612
  });
@@ -10578,7 +10615,7 @@ export class SfIEvents extends LitElement {
10578
10615
  radioFrequency?.addEventListener('click', () => {
10579
10616
 
10580
10617
  this.flowGraph = this.FLOW_GRAPH_FREQUENCY;
10581
- this.renderStream(index);
10618
+ this.renderStream(index, showGraph, showBackgroundButton);
10582
10619
  this.renderFrequencyGraph((this._SfStreamContainer as HTMLDivElement))
10583
10620
 
10584
10621
  });
@@ -10587,7 +10624,7 @@ export class SfIEvents extends LitElement {
10587
10624
  radioSubcategory?.addEventListener('click', () => {
10588
10625
 
10589
10626
  this.flowGraph = this.FLOW_GRAPH_SUBCATEGORY;
10590
- this.renderStream(index);
10627
+ this.renderStream(index, showGraph, showBackgroundButton);
10591
10628
  this.renderSubcategoryGraph((this._SfStreamContainer as HTMLDivElement))
10592
10629
 
10593
10630
  });
@@ -10596,11 +10633,22 @@ export class SfIEvents extends LitElement {
10596
10633
  radioLocation?.addEventListener('click', () => {
10597
10634
 
10598
10635
  this.flowGraph = this.FLOW_GRAPH_LOCATION;
10599
- this.renderStream(index);
10636
+ this.renderStream(index, showGraph, showBackgroundButton);
10600
10637
  this.renderLocationGraph((this._SfStreamContainer as HTMLDivElement))
10601
10638
 
10602
10639
  });
10603
-
10640
+ let backgroundProcessButton = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-background-process') as HTMLButtonElement
10641
+ if(showBackgroundButton){
10642
+ backgroundProcessButton.style.display = showBackgroundButton ? 'flex' : 'none'
10643
+ console.log('backgroundprocessbutton', backgroundProcessButton.style.display);
10644
+ if(showBackgroundButton){
10645
+ backgroundProcessButton.addEventListener('click',() => {
10646
+ console.log('bulk-progress clicked')
10647
+ let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
10648
+ bulkLoader.scrollIntoView();
10649
+ })
10650
+ }
10651
+ }
10604
10652
 
10605
10653
  // const buttonStatusMore = (this._SfStreamContainer as HTMLDivElement).querySelector('#button-status-more');
10606
10654
  // buttonStatusMore?.addEventListener('click', () => {
@@ -10627,7 +10675,7 @@ export class SfIEvents extends LitElement {
10627
10675
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10628
10676
  }
10629
10677
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10630
- this.renderStream(target);
10678
+ this.renderStream(target, showGraph, showBackgroundButton);
10631
10679
 
10632
10680
  });
10633
10681
 
@@ -10642,7 +10690,7 @@ export class SfIEvents extends LitElement {
10642
10690
  }
10643
10691
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10644
10692
  this.currentColumnIndex = target + "";
10645
- this.renderStream(target);
10693
+ this.renderStream(target, showGraph, showBackgroundButton);
10646
10694
 
10647
10695
  })
10648
10696
  }
@@ -10658,7 +10706,7 @@ export class SfIEvents extends LitElement {
10658
10706
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10659
10707
  }
10660
10708
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10661
- this.renderStream(index);
10709
+ this.renderStream(index, showGraph, showBackgroundButton);
10662
10710
  })
10663
10711
  this.attachListReportingListeners(this._SfStreamContainer as HTMLDivElement);
10664
10712
  const buttonArr = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.button-expand') as NodeListOf<HTMLButtonElement>;
@@ -13851,7 +13899,7 @@ export class SfIEvents extends LitElement {
13851
13899
  //console.log('render stream', id);
13852
13900
  this.enableStream();
13853
13901
  this.renderTabs(this.TAB_STREAM);
13854
- this.renderStream(parseInt(id));
13902
+ this.renderStream(parseInt(id),false, false);
13855
13903
 
13856
13904
  })
13857
13905
 
@@ -18512,7 +18560,7 @@ export class SfIEvents extends LitElement {
18512
18560
 
18513
18561
  this.fill = "solid";
18514
18562
  if(this.getCurrentTab() == this.TAB_STREAM) {
18515
- this.renderStream();
18563
+ this.renderStream(0, true, false);
18516
18564
  }
18517
18565
 
18518
18566
  });
@@ -18521,7 +18569,7 @@ export class SfIEvents extends LitElement {
18521
18569
 
18522
18570
  this.fill = "pattern";
18523
18571
  if(this.getCurrentTab() == this.TAB_STREAM) {
18524
- this.renderStream();
18572
+ this.renderStream(0, true, false);
18525
18573
  }
18526
18574
 
18527
18575
  });
@@ -18586,7 +18634,7 @@ export class SfIEvents extends LitElement {
18586
18634
  //console.log('canceled');
18587
18635
  if(this.getCurrentTab() == this.TAB_STREAM) {
18588
18636
  this.renderChartSettings(container, -1, -1, ctx);
18589
- this.renderStream(this.streamIndex);
18637
+ this.renderStream(this.streamIndex, false, false);
18590
18638
  }
18591
18639
  // if(this.getCurrentTab() == this.TAB_UPCOMING) {
18592
18640
  // this.renderChartSettings(container, -1, ctx);
@@ -18594,7 +18642,7 @@ export class SfIEvents extends LitElement {
18594
18642
  // }
18595
18643
  if(this.getCurrentTab() == this.TAB_THIS) {
18596
18644
  this.renderChartSettings(container, -1, -1, ctx);
18597
- this.renderThis(this.streamIndex);
18645
+ this.renderThis(this.streamIndex, false, false);
18598
18646
  }
18599
18647
  // if(this.getCurrentTab() == this.TAB_PAST) {
18600
18648
  // this.renderChartSettings(container, -1, ctx);
@@ -19102,6 +19150,7 @@ export class SfIEvents extends LitElement {
19102
19150
  responsive: true,
19103
19151
  maintainAspectRatio: false,
19104
19152
  animation: {
19153
+ duration:0,
19105
19154
  onComplete: () => {
19106
19155
 
19107
19156
  if(this.chart4 != null) {
@@ -19306,6 +19355,7 @@ export class SfIEvents extends LitElement {
19306
19355
  responsive: true,
19307
19356
  maintainAspectRatio: false,
19308
19357
  animation: {
19358
+ duration:0,
19309
19359
  onComplete: () => {
19310
19360
 
19311
19361
  if(this.chart3 != null) {
@@ -19510,6 +19560,7 @@ export class SfIEvents extends LitElement {
19510
19560
  responsive: true,
19511
19561
  maintainAspectRatio: false,
19512
19562
  animation: {
19563
+ duration:0,
19513
19564
  onComplete: () => {
19514
19565
 
19515
19566
  if(this.chart2 != null) {
@@ -19711,6 +19762,7 @@ export class SfIEvents extends LitElement {
19711
19762
  responsive: true,
19712
19763
  maintainAspectRatio: false,
19713
19764
  animation: {
19765
+ duration:0,
19714
19766
  onComplete: () => {
19715
19767
 
19716
19768
  if(this.chart != null) {
@@ -20568,7 +20620,7 @@ export class SfIEvents extends LitElement {
20568
20620
  await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20569
20621
  // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20570
20622
  }
20571
- this.renderStream(idx);
20623
+ this.renderStream(idx, true, false);
20572
20624
  });
20573
20625
 
20574
20626
  // (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-upcoming')?.addEventListener('click', async () => {
@@ -20598,7 +20650,7 @@ export class SfIEvents extends LitElement {
20598
20650
  //console.log('dateresult', dateResult)
20599
20651
  this.currentColumnIndex = 1 + ""
20600
20652
  await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20601
- this.renderThis();
20653
+ this.renderThis(0, true, false);
20602
20654
  });
20603
20655
 
20604
20656
  // (this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-past')?.addEventListener('click', async () => {
@@ -23491,17 +23543,17 @@ export class SfIEvents extends LitElement {
23491
23543
  });
23492
23544
  }
23493
23545
 
23494
- renderAppropriateStream = (startDate: string, endDate: string, showGraph: boolean = false) => {
23546
+ renderAppropriateStream = (startDate: string, endDate: string, showGraph: boolean = false, showBackgroundButton: boolean = false) => {
23495
23547
  if(startDate == "" && endDate == "") this.renderCalendar(); // yearly
23496
23548
 
23497
23549
  if(this.selectedTab == this.TAB_STREAM) {
23498
- this.renderStream(parseInt(this.currentColumnIndex), showGraph);
23550
+ this.renderStream(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
23499
23551
  }
23500
23552
  // if(this.selectedTab == this.TAB_UPCOMING) {
23501
23553
  // this.renderUpcoming(parseInt(this.currentColumnIndex), false);
23502
23554
  // }
23503
23555
  if(this.selectedTab == this.TAB_THIS) {
23504
- this.renderThis(parseInt(this.currentColumnIndex), showGraph);
23556
+ this.renderThis(parseInt(this.currentColumnIndex), showGraph, showBackgroundButton);
23505
23557
  }
23506
23558
  // if(this.selectedTab == this.TAB_PAST) {
23507
23559
  // this.renderPast(parseInt(this.currentColumnIndex), false);
@@ -23851,10 +23903,11 @@ export class SfIEvents extends LitElement {
23851
23903
  this._SfLoader.innerHTML = '';
23852
23904
  if(xhr.status == 200) {
23853
23905
 
23854
- const jsonRespose = JSON.parse(xhr.responseText);
23855
- console.log('bulk reports jsonRespose', jsonRespose);
23856
- if(jsonRespose.result == true){
23857
- for(let sortid of Object.keys(jsonRespose.data)){
23906
+ const jsonResponse = JSON.parse(xhr.responseText);
23907
+ console.log('bulk reports jsonResponse', jsonResponse);
23908
+ let flagBulk = false;
23909
+ if(jsonResponse.result == true){
23910
+ for(let sortid of Object.keys(jsonResponse.data)){
23858
23911
  let sortidArr = sortid.split(';')
23859
23912
  let mmddyyyy = sortidArr[0]
23860
23913
  let entityid = sortidArr[1]
@@ -23866,13 +23919,26 @@ export class SfIEvents extends LitElement {
23866
23919
  for (let i = 0 ; i < this.events[mmdd].length; i ++){
23867
23920
  if(this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid){
23868
23921
  this.events[mmdd][i].isbulk = true;
23922
+ flagBulk = true
23869
23923
  break
23870
23924
  }
23871
23925
  }
23872
23926
  }
23873
23927
  }
23874
- if(Object.keys(jsonRespose.data).length > 0){
23875
- this.renderAppropriateStream(this.sdate,this.edate,true)
23928
+
23929
+ if(flagBulk){
23930
+ // backgroundProcessButton.classList.remove('hide');
23931
+ // backgroundProcessButton.style.display = 'flex'
23932
+ // console.log('backgroundprocessbutton', backgroundProcessButton);
23933
+ // backgroundProcessButton.addEventListener('click',() => {
23934
+ // console.log('bulk-progress clicked')
23935
+ // let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
23936
+ // bulkLoader.scrollIntoView();
23937
+ // })
23938
+ this.renderAppropriateStream(this.sdate,this.edate,true,true)
23939
+ }else{
23940
+ // backgroundProcessButton.classList.add('hide')
23941
+ // backgroundProcessButton.style.display = 'none'
23876
23942
  }
23877
23943
  }
23878
23944
  }