sf-i-events 1.0.768 → 1.0.770

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 CHANGED
@@ -628,8 +628,15 @@
628
628
  </style>
629
629
  </head>
630
630
  <body>
631
- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding" locations="{}" contractstartdate="01/04/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
631
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="58c90fb5-9d1d-46bc-9b1a-2cf3e353eed0" myrole="reporter" showregisterexport="false" features="[&quot;notices&quot;]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
632
632
 
633
+ <div slot="uploader">
634
+ <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
635
+ </div>
636
+ <div slot="reporting">
637
+ <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
638
+ </div>
639
+
633
640
  </sf-i-events>
634
641
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="functionhead" showregisterexport="false" features="[&quot;notices&quot;]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
635
642
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.768",
4
+ "version": "1.0.770",
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
@@ -714,7 +714,7 @@ export declare class SfIEvents extends LitElement {
714
714
  uploadReportsReviewsBulk: (bulkBody: any) => Promise<void>;
715
715
  uploadReviewsBulk: (bulkBody: any) => Promise<void>;
716
716
  uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues?: string, reportformatschema?: string, module?: string) => Promise<void>;
717
- uploadReportsBulk: (bulkBody: any) => Promise<void>;
717
+ uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
718
718
  uploadMapping: () => Promise<void>;
719
719
  uploadEvents: () => Promise<void>;
720
720
  uploadReprogramTrigger: (eventid: string, timestamp: string) => Promise<void>;
package/sf-i-events.js CHANGED
@@ -2159,7 +2159,7 @@ 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></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></div>';
2163
2163
  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
2164
  if (showGraph) {
2165
2165
  html += '<div part="stream-event-chart-selection" class="mb-20">';
@@ -2470,7 +2470,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2470
2470
  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
2471
  }
2472
2472
  else {
2473
- html += '<div class="lds-dual-ring1"></div>';
2473
+ html += '<div class="lds-dual-ring1 bulk-loader"></div>';
2474
2474
  }
2475
2475
  html += '</td>';
2476
2476
  html += '<td part="td-body">';
@@ -3497,7 +3497,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3497
3497
  // await this.uploadReportsBulk(bulkBody);
3498
3498
  // await this.fetchBulkReportingData();
3499
3499
  if (bulkBody.length > 0) {
3500
- await this.uploadReportsBulk(bulkBody);
3500
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
3501
3501
  }
3502
3502
  if (bulkBodyReview.length > 0) {
3503
3503
  await this.uploadReportsReviewsBulk(bulkBodyReview);
@@ -7422,7 +7422,8 @@ let SfIEvents = class SfIEvents extends LitElement {
7422
7422
  //console.log('dateresult', dateResult);
7423
7423
  this.currentColumnIndex = target + "";
7424
7424
  if (dateResult != null) {
7425
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
7425
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
7426
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
7426
7427
  }
7427
7428
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7428
7429
  this.renderStream(target);
@@ -7432,7 +7433,8 @@ let SfIEvents = class SfIEvents extends LitElement {
7432
7433
  const dateResult = this.calculateStartAndEndDateOfStream(target);
7433
7434
  const monthResult = this.calculateMonthFromIndex(target);
7434
7435
  if (dateResult != null) {
7435
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
7436
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
7437
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
7436
7438
  }
7437
7439
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
7438
7440
  this.currentColumnIndex = target + "";
@@ -8803,7 +8805,7 @@ let SfIEvents = class SfIEvents extends LitElement {
8803
8805
  // await this.uploadReportsBulk(bulkBody);
8804
8806
  // await this.fetchBulkReportingData();
8805
8807
  if (bulkBody.length > 0) {
8806
- await this.uploadReportsBulk(bulkBody);
8808
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
8807
8809
  }
8808
8810
  if (bulkBodyReview.length > 0) {
8809
8811
  await this.uploadReportsReviewsBulk(bulkBodyReview);
@@ -9909,7 +9911,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9909
9911
  // this.clearMessages();
9910
9912
  }
9911
9913
  if (bulkBody.length > 0) {
9912
- await this.uploadReportsBulk(bulkBody);
9914
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
9913
9915
  }
9914
9916
  // await this.fetchBulkReportingData();
9915
9917
  if (bulkBodyReview.length > 0) {
@@ -14084,6 +14086,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14084
14086
  responsive: true,
14085
14087
  maintainAspectRatio: false,
14086
14088
  animation: {
14089
+ duration: 0,
14087
14090
  onComplete: () => {
14088
14091
  if (this.chart4 != null) {
14089
14092
  if (type == 'bar') {
@@ -14262,6 +14265,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14262
14265
  responsive: true,
14263
14266
  maintainAspectRatio: false,
14264
14267
  animation: {
14268
+ duration: 0,
14265
14269
  onComplete: () => {
14266
14270
  if (this.chart3 != null) {
14267
14271
  if (type == 'bar') {
@@ -14440,6 +14444,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14440
14444
  responsive: true,
14441
14445
  maintainAspectRatio: false,
14442
14446
  animation: {
14447
+ duration: 0,
14443
14448
  onComplete: () => {
14444
14449
  if (this.chart2 != null) {
14445
14450
  if (type == 'bar') {
@@ -14616,6 +14621,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14616
14621
  responsive: true,
14617
14622
  maintainAspectRatio: false,
14618
14623
  animation: {
14624
+ duration: 0,
14619
14625
  onComplete: () => {
14620
14626
  if (this.chart != null) {
14621
14627
  if (type == 'bar') {
@@ -15330,7 +15336,8 @@ let SfIEvents = class SfIEvents extends LitElement {
15330
15336
  const dateResult = this.calculateStartAndEndDateOfStream(idx);
15331
15337
  const monthResult = this.calculateMonthFromIndex(idx);
15332
15338
  if (dateResult != null) {
15333
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
15339
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "yes", ("0" + monthResult).slice(-2));
15340
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
15334
15341
  }
15335
15342
  this.renderStream(idx);
15336
15343
  });
@@ -16326,16 +16333,20 @@ let SfIEvents = class SfIEvents extends LitElement {
16326
16333
  this.setError(jsonRespose.error);
16327
16334
  }
16328
16335
  };
16329
- this.uploadReportsBulk = async (bulkBody) => {
16336
+ this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
16330
16337
  let url = "https://" + this.apiId + "/uploadreportsbulk1";
16331
16338
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
16332
16339
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
16333
- this._SfLoader.innerHTML = '';
16340
+ if (showSuccess) {
16341
+ this._SfLoader.innerHTML = '';
16342
+ }
16334
16343
  if (xhr.status == 200) {
16335
- this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
16336
- setTimeout(() => {
16337
- this.clearMessages();
16338
- }, 10000);
16344
+ if (showSuccess) {
16345
+ this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
16346
+ setTimeout(() => {
16347
+ this.clearMessages();
16348
+ }, 10000);
16349
+ }
16339
16350
  }
16340
16351
  else {
16341
16352
  const jsonRespose = JSON.parse(xhr.responseText);
@@ -17606,7 +17617,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17606
17617
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
17607
17618
  this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN');
17608
17619
  console.log('rendering appropriate string', list);
17609
- this.renderAppropriateStream(startDate, endDate, list == "no");
17620
+ this.renderAppropriateStream(startDate, endDate, true);
17610
17621
  this.fetchBulkReportingData();
17611
17622
  // if(this.selectedFeatures.indexOf('notices') >= 0){
17612
17623
  // this.fetchAndRenderNotices(startDate, endDate);
@@ -17797,6 +17808,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17797
17808
  if (xhr.status == 200) {
17798
17809
  const jsonRespose = JSON.parse(xhr.responseText);
17799
17810
  console.log('bulk reports jsonRespose', jsonRespose);
17811
+ let flagBulk = false;
17800
17812
  if (jsonRespose.result == true) {
17801
17813
  for (let sortid of Object.keys(jsonRespose.data)) {
17802
17814
  let sortidArr = sortid.split(';');
@@ -17810,14 +17822,26 @@ let SfIEvents = class SfIEvents extends LitElement {
17810
17822
  for (let i = 0; i < this.events[mmdd].length; i++) {
17811
17823
  if (this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid) {
17812
17824
  this.events[mmdd][i].isbulk = true;
17825
+ flagBulk = true;
17813
17826
  break;
17814
17827
  }
17815
17828
  }
17816
17829
  }
17817
17830
  }
17818
- if (Object.keys(jsonRespose.data).length > 0) {
17831
+ let backgroundProcessButton = this._SfIEventsC.querySelector('#button-background-process');
17832
+ if (flagBulk) {
17833
+ backgroundProcessButton.style.display = 'flex';
17834
+ console.log('backgroundprocessbutton', backgroundProcessButton);
17835
+ backgroundProcessButton.addEventListener('click', () => {
17836
+ console.log('bulk-progress clicked');
17837
+ let bulkLoader = this._SfIEventsC.querySelector('.bulk-loader');
17838
+ bulkLoader.scrollIntoView();
17839
+ });
17819
17840
  this.renderAppropriateStream(this.sdate, this.edate, true);
17820
17841
  }
17842
+ else {
17843
+ backgroundProcessButton.style.display = 'none';
17844
+ }
17821
17845
  }
17822
17846
  }
17823
17847
  };
@@ -20649,6 +20673,16 @@ SfIEvents.styles = css `
20649
20673
  bottom: 10px;
20650
20674
  right: 10px
20651
20675
  }
20676
+ #button-background-process {
20677
+ display:none;
20678
+ position: fixed;
20679
+ top: 10px;
20680
+ left:0;
20681
+ right: 0;
20682
+ margin-left: auto;
20683
+ margin-right: auto;
20684
+ width: fit-content;
20685
+ }
20652
20686
 
20653
20687
  .small-icon {
20654
20688
  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%
@@ -4269,7 +4279,7 @@ 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></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></div>';
4273
4283
  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
4284
  if(showGraph) {
4275
4285
  html += '<div part="stream-event-chart-selection" class="mb-20">';
@@ -4661,7 +4671,7 @@ export class SfIEvents extends LitElement {
4661
4671
  if(event.isbulk == null || !event.isbulk){
4662
4672
  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
4673
  }else{
4664
- html += '<div class="lds-dual-ring1"></div>';
4674
+ html += '<div class="lds-dual-ring1 bulk-loader"></div>';
4665
4675
  }
4666
4676
  html += '</td>';
4667
4677
  html += '<td part="td-body">';
@@ -5862,7 +5872,7 @@ export class SfIEvents extends LitElement {
5862
5872
 
5863
5873
  // await this.fetchBulkReportingData();
5864
5874
  if(bulkBody.length > 0){
5865
- await this.uploadReportsBulk(bulkBody);
5875
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
5866
5876
  }
5867
5877
 
5868
5878
  if(bulkBodyReview.length > 0){
@@ -10623,7 +10633,8 @@ export class SfIEvents extends LitElement {
10623
10633
  //console.log('dateresult', dateResult);
10624
10634
  this.currentColumnIndex = target + "";
10625
10635
  if(dateResult != null) {
10626
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10636
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10637
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10627
10638
  }
10628
10639
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10629
10640
  this.renderStream(target);
@@ -10636,7 +10647,8 @@ export class SfIEvents extends LitElement {
10636
10647
  const dateResult = this.calculateStartAndEndDateOfStream(target);
10637
10648
  const monthResult = this.calculateMonthFromIndex(target);
10638
10649
  if(dateResult != null) {
10639
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10650
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10651
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
10640
10652
  }
10641
10653
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
10642
10654
  this.currentColumnIndex = target + "";
@@ -12362,7 +12374,7 @@ export class SfIEvents extends LitElement {
12362
12374
  // await this.uploadReportsBulk(bulkBody);
12363
12375
  // await this.fetchBulkReportingData();
12364
12376
  if(bulkBody.length > 0){
12365
- await this.uploadReportsBulk(bulkBody);
12377
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
12366
12378
  }
12367
12379
 
12368
12380
  if(bulkBodyReview.length > 0){
@@ -13651,7 +13663,7 @@ export class SfIEvents extends LitElement {
13651
13663
  }
13652
13664
 
13653
13665
  if(bulkBody.length > 0){
13654
- await this.uploadReportsBulk(bulkBody);
13666
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
13655
13667
  }
13656
13668
  // await this.fetchBulkReportingData();
13657
13669
  if(bulkBodyReview.length > 0){
@@ -19100,6 +19112,7 @@ export class SfIEvents extends LitElement {
19100
19112
  responsive: true,
19101
19113
  maintainAspectRatio: false,
19102
19114
  animation: {
19115
+ duration:0,
19103
19116
  onComplete: () => {
19104
19117
 
19105
19118
  if(this.chart4 != null) {
@@ -19304,6 +19317,7 @@ export class SfIEvents extends LitElement {
19304
19317
  responsive: true,
19305
19318
  maintainAspectRatio: false,
19306
19319
  animation: {
19320
+ duration:0,
19307
19321
  onComplete: () => {
19308
19322
 
19309
19323
  if(this.chart3 != null) {
@@ -19508,6 +19522,7 @@ export class SfIEvents extends LitElement {
19508
19522
  responsive: true,
19509
19523
  maintainAspectRatio: false,
19510
19524
  animation: {
19525
+ duration:0,
19511
19526
  onComplete: () => {
19512
19527
 
19513
19528
  if(this.chart2 != null) {
@@ -19709,6 +19724,7 @@ export class SfIEvents extends LitElement {
19709
19724
  responsive: true,
19710
19725
  maintainAspectRatio: false,
19711
19726
  animation: {
19727
+ duration:0,
19712
19728
  onComplete: () => {
19713
19729
 
19714
19730
  if(this.chart != null) {
@@ -20563,7 +20579,8 @@ export class SfIEvents extends LitElement {
20563
20579
  const dateResult = this.calculateStartAndEndDateOfStream(idx);
20564
20580
  const monthResult = this.calculateMonthFromIndex(idx);
20565
20581
  if(dateResult != null) {
20566
- await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20582
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20583
+ // await this.fetchAndYearlyRenderUserCalendar_2(dateResult.startDate, dateResult.endDate,"","yes",("0" + monthResult).slice(-2));
20567
20584
  }
20568
20585
  this.renderStream(idx);
20569
20586
  });
@@ -21804,18 +21821,21 @@ export class SfIEvents extends LitElement {
21804
21821
  }
21805
21822
  }
21806
21823
 
21807
- uploadReportsBulk = async (bulkBody: any) => {
21824
+ uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
21808
21825
  let url = "https://"+this.apiId+"/uploadreportsbulk1"
21809
21826
 
21810
21827
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
21811
21828
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
21812
- this._SfLoader.innerHTML = '';
21829
+ if(showSuccess){
21830
+ this._SfLoader.innerHTML = '';
21831
+ }
21813
21832
  if(xhr.status == 200) {
21814
-
21815
- this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
21816
- setTimeout(() => {
21817
- this.clearMessages()
21818
- }, 10000);
21833
+ if(showSuccess){
21834
+ this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
21835
+ setTimeout(() => {
21836
+ this.clearMessages()
21837
+ }, 10000);
21838
+ }
21819
21839
 
21820
21840
  } else {
21821
21841
  const jsonRespose = JSON.parse(xhr.responseText);
@@ -23607,7 +23627,7 @@ export class SfIEvents extends LitElement {
23607
23627
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
23608
23628
  this.lastupdated = new Date().toLocaleDateString('en-IN') + " - " + new Date().toLocaleTimeString('en-IN')
23609
23629
  console.log('rendering appropriate string', list);
23610
- this.renderAppropriateStream(startDate, endDate, list == "no");
23630
+ this.renderAppropriateStream(startDate, endDate, true);
23611
23631
  this.fetchBulkReportingData();
23612
23632
  // if(this.selectedFeatures.indexOf('notices') >= 0){
23613
23633
  // this.fetchAndRenderNotices(startDate, endDate);
@@ -23847,6 +23867,7 @@ export class SfIEvents extends LitElement {
23847
23867
 
23848
23868
  const jsonRespose = JSON.parse(xhr.responseText);
23849
23869
  console.log('bulk reports jsonRespose', jsonRespose);
23870
+ let flagBulk = false;
23850
23871
  if(jsonRespose.result == true){
23851
23872
  for(let sortid of Object.keys(jsonRespose.data)){
23852
23873
  let sortidArr = sortid.split(';')
@@ -23860,13 +23881,25 @@ export class SfIEvents extends LitElement {
23860
23881
  for (let i = 0 ; i < this.events[mmdd].length; i ++){
23861
23882
  if(this.events[mmdd][i].entityid == entityid && this.events[mmdd][i].locationid == locationid && this.events[mmdd][i].id == eventid){
23862
23883
  this.events[mmdd][i].isbulk = true;
23884
+ flagBulk = true
23863
23885
  break
23864
23886
  }
23865
23887
  }
23866
23888
  }
23867
23889
  }
23868
- if(Object.keys(jsonRespose.data).length > 0){
23890
+ let backgroundProcessButton = (this._SfIEventsC as HTMLDivElement).querySelector('#button-background-process') as HTMLButtonElement
23891
+
23892
+ if(flagBulk){
23893
+ backgroundProcessButton.style.display = 'flex'
23894
+ console.log('backgroundprocessbutton', backgroundProcessButton);
23895
+ backgroundProcessButton.addEventListener('click',() => {
23896
+ console.log('bulk-progress clicked')
23897
+ let bulkLoader = (this._SfIEventsC as HTMLDivElement).querySelector('.bulk-loader') as HTMLDivElement
23898
+ bulkLoader.scrollIntoView();
23899
+ })
23869
23900
  this.renderAppropriateStream(this.sdate,this.edate,true)
23901
+ }else{
23902
+ backgroundProcessButton.style.display = 'none'
23870
23903
  }
23871
23904
  }
23872
23905
  }