sf-i-events 1.0.976 → 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.976",
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
  }
@@ -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
  }
@@ -19719,7 +19721,7 @@ export class SfIEvents extends LitElement {
19719
19721
  }
19720
19722
  this.recentlyReported[mmdd].push(event)
19721
19723
  console.log('recently reported', this.recentlyReported)
19722
-
19724
+
19723
19725
  } else {
19724
19726
  for (var p = 0; p < this.nextEvents[this.nextTabRole][mmdd].length; p++) {
19725
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) {
@@ -19790,14 +19792,14 @@ export class SfIEvents extends LitElement {
19790
19792
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
19791
19793
  })
19792
19794
 
19793
-
19795
+
19794
19796
  }
19795
-
19797
+
19796
19798
  if (bulkBody.length > 0) {
19797
19799
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
19798
19800
  }
19799
19801
 
19800
-
19802
+
19801
19803
  for (var k = 0; k < this.selectedItemIds.length; k++) {
19802
19804
 
19803
19805
  const selectedId = this.selectedItemIds[k];
@@ -28610,7 +28612,7 @@ export class SfIEvents extends LitElement {
28610
28612
 
28611
28613
  uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "compliance") => {
28612
28614
  let url = "https://" + this.apiId + "/uploadreview";
28613
- if(module == "rcmresource" && this.apiId2 != null) {
28615
+ if (module == "rcmresource" && this.apiId2 != null) {
28614
28616
  url = "https://" + this.apiId2 + "/uploadreview1";
28615
28617
  }
28616
28618
  const body = {
@@ -28712,7 +28714,7 @@ export class SfIEvents extends LitElement {
28712
28714
 
28713
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 = "") => {
28714
28716
  let url = "https://" + this.apiId + "/uploadreport";
28715
- if(module == "rcmresource" && this.apiId2 != null) {
28717
+ if (module == "rcmresource" && this.apiId2 != null) {
28716
28718
  url = "https://" + this.apiId2 + "/uploadreport";
28717
28719
  }
28718
28720
  let yearStr = this.getFinancialYear(mmddyyyy)