sf-i-events 1.0.975 → 1.0.977

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.975",
4
+ "version": "1.0.977",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -15261,14 +15261,16 @@ let SfIEvents = class SfIEvents extends LitElement {
15261
15261
  if (this.selectedItemIds.length <= 1) {
15262
15262
  console.log('selectedevent', JSON.stringify(event));
15263
15263
  if (await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance")) {
15264
- for (var p = 0; p < this.events[mmdd].length; p++) {
15265
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
15266
- this.events[mmdd][p].approved = approved;
15267
- console.log('selected event', this.events[mmdd][p]);
15268
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
15269
- this.events[mmdd][p].lastupdated = new Date().toString();
15270
- if (approved) {
15271
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
15264
+ if (this.mode != "next") {
15265
+ for (var p = 0; p < this.events[mmdd].length; p++) {
15266
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
15267
+ this.events[mmdd][p].approved = approved;
15268
+ console.log('selected event', this.events[mmdd][p]);
15269
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
15270
+ this.events[mmdd][p].lastupdated = new Date().toString();
15271
+ if (approved) {
15272
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
15273
+ }
15272
15274
  }
15273
15275
  }
15274
15276
  }
@@ -15347,6 +15349,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15347
15349
  if (this.mode == "next") {
15348
15350
  // this.fetchNext(this.nextPage)
15349
15351
  // this.renderRoleTabsNext(this.nextPage)
15352
+ buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.dispatchEvent(new Event('click'));
15350
15353
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole);
15351
15354
  }
15352
15355
  else {
@@ -15464,6 +15467,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15464
15467
  }
15465
15468
  if (this.mode == "next") {
15466
15469
  // this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus)
15470
+ buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.dispatchEvent(new Event('click'));
15467
15471
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole);
15468
15472
  }
15469
15473
  else {
@@ -15726,6 +15730,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15726
15730
  }
15727
15731
  if (this.mode == "next") {
15728
15732
  // this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus)
15733
+ buttonClose === null || buttonClose === void 0 ? void 0 : buttonClose.dispatchEvent(new Event('click'));
15729
15734
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole);
15730
15735
  }
15731
15736
  else {
@@ -5295,7 +5295,7 @@ export class SfIEvents extends LitElement {
5295
5295
  // console.log("graphParam", graphParam.split(';')[0]);
5296
5296
  const configHome = Util.getProjectConfigHome();
5297
5297
  const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0
5298
- html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<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>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + ((event.module == "rcmresource" && event.completenessstatus == "approved") ? '<button id="button-renew-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="d-flex align-center mb-20 ml-10 button-icon button-renew"><span class="material-symbols-outlined" title="Renew">replay</span>&nbsp;&nbsp;Renew</button>' : '') +'</div>';
5298
+ html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<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>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span>&nbsp;&nbsp;Mark Understood</button>')) : '') + ((event.module == "rcmresource" && event.completenessstatus == "approved") ? '<button id="button-renew-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="d-flex align-center mb-20 ml-10 button-icon button-renew"><span class="material-symbols-outlined" title="Renew">replay</span>&nbsp;&nbsp;Renew</button>' : '') + '</div>';
5299
5299
  // }
5300
5300
 
5301
5301
  return html;
@@ -17390,7 +17390,7 @@ export class SfIEvents extends LitElement {
17390
17390
  console.log('jsonRespose agreement details', jsonRespose);
17391
17391
  if (flagReturn) {
17392
17392
  return jsonRespose.object;
17393
- }else{
17393
+ } else {
17394
17394
  this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy)
17395
17395
  }
17396
17396
  } else {
@@ -19325,14 +19325,16 @@ export class SfIEvents extends LitElement {
19325
19325
  if (this.selectedItemIds.length <= 1) {
19326
19326
  console.log('selectedevent', JSON.stringify(event));
19327
19327
  if (await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.module ?? "compliance")) {
19328
- for (var p = 0; p < this.events[mmdd].length; p++) {
19329
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
19330
- this.events[mmdd][p].approved = approved
19331
- console.log('selected event', this.events[mmdd][p]);
19332
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() })
19333
- this.events[mmdd][p].lastupdated = new Date().toString()
19334
- if (approved) {
19335
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
19328
+ if (this.mode != "next") {
19329
+ for (var p = 0; p < this.events[mmdd].length; p++) {
19330
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
19331
+ this.events[mmdd][p].approved = approved
19332
+ console.log('selected event', this.events[mmdd][p]);
19333
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() })
19334
+ this.events[mmdd][p].lastupdated = new Date().toString()
19335
+ if (approved) {
19336
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
19337
+ }
19336
19338
  }
19337
19339
  }
19338
19340
  }
@@ -19417,6 +19419,7 @@ export class SfIEvents extends LitElement {
19417
19419
  if (this.mode == "next") {
19418
19420
  // this.fetchNext(this.nextPage)
19419
19421
  // this.renderRoleTabsNext(this.nextPage)
19422
+ buttonClose?.dispatchEvent(new Event('click'))
19420
19423
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole)
19421
19424
  } else {
19422
19425
  // if(this.getCurrentTab() == this.TAB_CUSTOM) {
@@ -19539,6 +19542,7 @@ export class SfIEvents extends LitElement {
19539
19542
  }
19540
19543
  if (this.mode == "next") {
19541
19544
  // this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus)
19545
+ buttonClose?.dispatchEvent(new Event('click'))
19542
19546
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole)
19543
19547
  } else {
19544
19548
  // if(this.getCurrentTab() == this.TAB_CUSTOM) {
@@ -19717,7 +19721,7 @@ export class SfIEvents extends LitElement {
19717
19721
  }
19718
19722
  this.recentlyReported[mmdd].push(event)
19719
19723
  console.log('recently reported', this.recentlyReported)
19720
-
19724
+
19721
19725
  } else {
19722
19726
  for (var p = 0; p < this.nextEvents[this.nextTabRole][mmdd].length; p++) {
19723
19727
  if (this.nextEvents[this.nextTabRole][mmdd][p].id == event.id && this.nextEvents[this.nextTabRole][mmdd][p].locationid == event.locationid && this.nextEvents[this.nextTabRole][mmdd][p].entityid == event.entityid) {
@@ -19788,14 +19792,14 @@ export class SfIEvents extends LitElement {
19788
19792
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
19789
19793
  })
19790
19794
 
19791
-
19795
+
19792
19796
  }
19793
-
19797
+
19794
19798
  if (bulkBody.length > 0) {
19795
19799
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
19796
19800
  }
19797
19801
 
19798
-
19802
+
19799
19803
  for (var k = 0; k < this.selectedItemIds.length; k++) {
19800
19804
 
19801
19805
  const selectedId = this.selectedItemIds[k];
@@ -19833,6 +19837,7 @@ export class SfIEvents extends LitElement {
19833
19837
 
19834
19838
  if (this.mode == "next") {
19835
19839
  // this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus)
19840
+ buttonClose?.dispatchEvent(new Event('click'))
19836
19841
  this.renderNextEvents(this.nextEvents, this.nextPage, this.nextTabRole)
19837
19842
  } else {
19838
19843
  // if(this.getCurrentTab() == this.TAB_CUSTOM) {
@@ -28607,7 +28612,7 @@ export class SfIEvents extends LitElement {
28607
28612
 
28608
28613
  uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "compliance") => {
28609
28614
  let url = "https://" + this.apiId + "/uploadreview";
28610
- if(module == "rcmresource" && this.apiId2 != null) {
28615
+ if (module == "rcmresource" && this.apiId2 != null) {
28611
28616
  url = "https://" + this.apiId2 + "/uploadreview1";
28612
28617
  }
28613
28618
  const body = {
@@ -28709,7 +28714,7 @@ export class SfIEvents extends LitElement {
28709
28714
 
28710
28715
  uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "compliance", percentage: string = "100", makercheckers: any, reportedlocations: string = "") => {
28711
28716
  let url = "https://" + this.apiId + "/uploadreport";
28712
- if(module == "rcmresource" && this.apiId2 != null) {
28717
+ if (module == "rcmresource" && this.apiId2 != null) {
28713
28718
  url = "https://" + this.apiId2 + "/uploadreport";
28714
28719
  }
28715
28720
  let yearStr = this.getFinancialYear(mmddyyyy)