sf-i-events 1.0.817 → 1.0.818

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
@@ -22,7 +22,7 @@
22
22
  import {SfISubSelect} from 'https://esm.run/sf-i-sub-select@1.0.83/sf-i-sub-select.js';
23
23
  import {SfIForm} from 'https://esm.run/sf-i-form@1.0.184/sf-i-form.js';
24
24
  import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text@1.0.17/sf-i-elastic-text.js';
25
- import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.105/sf-i-uploader.js';
25
+ import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.108/sf-i-uploader.js';
26
26
  import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea@1.0.23/sf-i-multitextarea.js';
27
27
  import {SfIReporting} from 'https://esm.run/sf-i-reporting@1.0.73/sf-i-reporting.js';
28
28
  import {SfIBricks} from 'https://esm.run/sf-i-bricks@1.0.8/sf-i-bricks.js';
@@ -37,7 +37,7 @@
37
37
  // import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.184/sf-i-form.js?module';
38
38
  // import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.423/sf-i-events.js?module';
39
39
  // import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.7/sf-i-elastic-text.js?module';
40
- // import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.102/sf-i-uploader.js?module';
40
+ // import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.108/sf-i-uploader.js?module';
41
41
  // import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
42
42
 
43
43
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.817",
4
+ "version": "1.0.818",
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
@@ -721,7 +721,7 @@ export declare class SfIEvents extends LitElement {
721
721
  uploadReview: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<void>;
722
722
  uploadReportsReviewsBulk: (bulkBody: any) => Promise<void>;
723
723
  uploadReviewsBulk: (bulkBody: any) => Promise<void>;
724
- uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues?: string, reportformatschema?: string, module?: string, percentage?: string) => Promise<void>;
724
+ uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string | undefined, reportformatschema: string | undefined, module: string | undefined, percentage: string | undefined, makercheckers: any) => Promise<void>;
725
725
  uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
726
726
  uploadMapping: () => Promise<void>;
727
727
  uploadEvents: () => Promise<void>;
package/sf-i-events.js CHANGED
@@ -3680,7 +3680,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3680
3680
  else {
3681
3681
  let flagBulk = false;
3682
3682
  if (this.selectedItemIds.length == 0) {
3683
- await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage);
3683
+ await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers);
3684
3684
  console.log('this.events', this.events);
3685
3685
  if (this.mode != "next") {
3686
3686
  for (var p = 0; p < this.events[mmdd].length; p++) {
@@ -3691,7 +3691,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3691
3691
  }
3692
3692
  }
3693
3693
  if (event.makercheckers.length > 0) {
3694
- await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
3694
+ // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
3695
3695
  for (var p = 0; p < this.events[mmdd].length; p++) {
3696
3696
  if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3697
3697
  this.events[mmdd][p].approved = true;
@@ -3721,52 +3721,52 @@ let SfIEvents = class SfIEvents extends LitElement {
3721
3721
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
3722
3722
  //console.log(entityId, locationId, eventId, mmddyyyy);
3723
3723
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
3724
- if (parseInt(makercheckersL) > 0) {
3725
- bulkBodyReview.push({
3726
- "mmddyyyy": mmddyyyy,
3727
- "projectid": this.projectId,
3728
- "type": "report",
3729
- "eventid": eventId,
3730
- "comments": reportercomments,
3731
- "dateofcompletion": reporterdoc,
3732
- "percentage": percentage,
3733
- "entityid": entityId,
3734
- "locationid": locationId,
3735
- "event": null,
3736
- "docs": JSON.stringify(docs),
3737
- "approved": true,
3738
- "username": this.userName,
3739
- "reportformatvalues": reportformatvalues,
3740
- "reportformatschema": reportformatschema,
3741
- "userid": this.userProfileId,
3742
- "userrole": this.myRole,
3743
- "year": this.calendarStartYYYY,
3744
- "module": event.isnotice != null ? "notices" : "events"
3745
- });
3746
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
3747
- }
3748
- else {
3749
- bulkBody.push({
3750
- "mmddyyyy": mmddyyyy,
3751
- "projectid": this.projectId,
3752
- "type": "report",
3753
- "eventid": eventId,
3754
- "comments": reportercomments,
3755
- "dateofcompletion": reporterdoc,
3756
- "percentage": percentage,
3757
- "entityid": entityId,
3758
- "locationid": locationId,
3759
- "event": null,
3760
- "docs": JSON.stringify(docs),
3761
- "username": this.userName,
3762
- "reportformatvalues": reportformatvalues,
3763
- "reportformatschema": reportformatschema,
3764
- "userid": this.userProfileId,
3765
- "userrole": this.myRole,
3766
- "year": this.calendarStartYYYY,
3767
- "module": event.isnotice != null ? "notices" : "events"
3768
- });
3769
- }
3724
+ // if(parseInt(makercheckersL) > 0) {
3725
+ // bulkBodyReview.push({
3726
+ // "mmddyyyy": mmddyyyy,
3727
+ // "projectid": this.projectId,
3728
+ // "type": "report",
3729
+ // "eventid": eventId,
3730
+ // "comments": reportercomments,
3731
+ // "dateofcompletion": reporterdoc,
3732
+ // "percentage": percentage,
3733
+ // "entityid": entityId,
3734
+ // "locationid": locationId,
3735
+ // "event": null,
3736
+ // "docs": JSON.stringify(docs),
3737
+ // "approved": true,
3738
+ // "username": this.userName,
3739
+ // "reportformatvalues": reportformatvalues,
3740
+ // "reportformatschema": reportformatschema,
3741
+ // "userid": this.userProfileId,
3742
+ // "userrole": this.myRole,
3743
+ // "year": this.calendarStartYYYY,
3744
+ // "module": event.isnotice != null ? "notices" : "events"
3745
+ // } )
3746
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
3747
+ // }else{
3748
+ bulkBody.push({
3749
+ "mmddyyyy": mmddyyyy,
3750
+ "projectid": this.projectId,
3751
+ "type": "report",
3752
+ "eventid": eventId,
3753
+ "comments": reportercomments,
3754
+ "dateofcompletion": reporterdoc,
3755
+ "percentage": percentage,
3756
+ "entityid": entityId,
3757
+ "locationid": locationId,
3758
+ "event": null,
3759
+ "docs": JSON.stringify(docs),
3760
+ "username": this.userName,
3761
+ "reportformatvalues": reportformatvalues,
3762
+ "reportformatschema": reportformatschema,
3763
+ "userid": this.userProfileId,
3764
+ "userrole": this.myRole,
3765
+ "year": this.calendarStartYYYY,
3766
+ "module": event.isnotice != null ? "notices" : "events",
3767
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
3768
+ });
3769
+ // }
3770
3770
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
3771
3771
  // await this.sleep(2000);
3772
3772
  // this.clearMessages();
@@ -3776,9 +3776,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3776
3776
  if (bulkBody.length > 0) {
3777
3777
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
3778
3778
  }
3779
- if (bulkBodyReview.length > 0) {
3780
- await this.uploadReportsReviewsBulk(bulkBodyReview);
3781
- }
3779
+ // if(bulkBodyReview.length > 0){
3780
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
3781
+ // }
3782
3782
  for (var k = 0; k < this.selectedItemIds.length; k++) {
3783
3783
  const selectedId = this.selectedItemIds[k];
3784
3784
  //console.log('selectedid', selectedId);
@@ -9375,7 +9375,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9375
9375
  this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
9376
9376
  let flagBulk = false;
9377
9377
  if (this.selectedItemIds.length === 0) {
9378
- await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage);
9378
+ await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers);
9379
9379
  console.log('this.events', this.events);
9380
9380
  for (var p = 0; p < this.events[mmdd].length; p++) {
9381
9381
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
@@ -9386,7 +9386,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9386
9386
  }
9387
9387
  console.log('uploadReport single');
9388
9388
  if (makercheckers.length > 0) {
9389
- await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
9389
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
9390
9390
  for (var p = 0; p < this.events[mmdd].length; p++) {
9391
9391
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9392
9392
  this.events[mmdd][p].approved = true;
@@ -9415,52 +9415,52 @@ let SfIEvents = class SfIEvents extends LitElement {
9415
9415
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
9416
9416
  //console.log(entityId, locationId, eventId, mmddyyyy);
9417
9417
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
9418
- if (parseInt(makercheckersL) > 0) {
9419
- bulkBodyReview.push({
9420
- "mmddyyyy": mmddyyyy,
9421
- "projectid": this.projectId,
9422
- "type": "report",
9423
- "eventid": eventId,
9424
- "comments": reportercomments,
9425
- "dateofcompletion": reporterdoc,
9426
- "percentage": percentage,
9427
- "entityid": entityId,
9428
- "locationid": locationId,
9429
- "event": null,
9430
- "docs": JSON.stringify(docs),
9431
- "approved": true,
9432
- "username": this.userName,
9433
- "reportformatvalues": reportformatvalues,
9434
- "reportformatschema": reportformatschema,
9435
- "userid": this.userProfileId,
9436
- "userrole": this.myRole,
9437
- "year": this.calendarStartYYYY,
9438
- "module": listEvent.isnotice != null ? "notices" : "events"
9439
- });
9440
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
9441
- }
9442
- else {
9443
- bulkBody.push({
9444
- "mmddyyyy": mmddyyyy,
9445
- "projectid": this.projectId,
9446
- "type": "report",
9447
- "eventid": eventId,
9448
- "comments": reportercomments,
9449
- "dateofcompletion": reporterdoc,
9450
- "percentage": percentage,
9451
- "entityid": entityId,
9452
- "locationid": locationId,
9453
- "event": null,
9454
- "docs": JSON.stringify(docs),
9455
- "username": this.userName,
9456
- "reportformatvalues": reportformatvalues,
9457
- "reportformatschema": reportformatschema,
9458
- "userid": this.userProfileId,
9459
- "userrole": this.myRole,
9460
- "year": this.calendarStartYYYY,
9461
- "module": listEvent.isnotice != null ? "notices" : "events"
9462
- });
9463
- }
9418
+ // if(parseInt(makercheckersL) > 0) {
9419
+ // bulkBodyReview.push({
9420
+ // "mmddyyyy": mmddyyyy,
9421
+ // "projectid": this.projectId,
9422
+ // "type": "report",
9423
+ // "eventid": eventId,
9424
+ // "comments": reportercomments,
9425
+ // "dateofcompletion": reporterdoc,
9426
+ // "percentage": percentage,
9427
+ // "entityid": entityId,
9428
+ // "locationid": locationId,
9429
+ // "event": null,
9430
+ // "docs": JSON.stringify(docs),
9431
+ // "approved": true,
9432
+ // "username": this.userName,
9433
+ // "reportformatvalues": reportformatvalues,
9434
+ // "reportformatschema": reportformatschema,
9435
+ // "userid": this.userProfileId,
9436
+ // "userrole": this.myRole,
9437
+ // "year": this.calendarStartYYYY,
9438
+ // "module": listEvent.isnotice != null ? "notices" : "events"
9439
+ // } )
9440
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
9441
+ // }else{
9442
+ bulkBody.push({
9443
+ "mmddyyyy": mmddyyyy,
9444
+ "projectid": this.projectId,
9445
+ "type": "report",
9446
+ "eventid": eventId,
9447
+ "comments": reportercomments,
9448
+ "dateofcompletion": reporterdoc,
9449
+ "percentage": percentage,
9450
+ "entityid": entityId,
9451
+ "locationid": locationId,
9452
+ "event": null,
9453
+ "docs": JSON.stringify(docs),
9454
+ "username": this.userName,
9455
+ "reportformatvalues": reportformatvalues,
9456
+ "reportformatschema": reportformatschema,
9457
+ "userid": this.userProfileId,
9458
+ "userrole": this.myRole,
9459
+ "year": this.calendarStartYYYY,
9460
+ "module": listEvent.isnotice != null ? "notices" : "events",
9461
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
9462
+ });
9463
+ // }
9464
9464
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
9465
9465
  // await this.sleep(2000);
9466
9466
  // this.clearMessages();
@@ -9470,9 +9470,9 @@ let SfIEvents = class SfIEvents extends LitElement {
9470
9470
  if (bulkBody.length > 0) {
9471
9471
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
9472
9472
  }
9473
- if (bulkBodyReview.length > 0) {
9474
- await this.uploadReportsReviewsBulk(bulkBodyReview);
9475
- }
9473
+ // if(bulkBodyReview.length > 0){
9474
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
9475
+ // }
9476
9476
  await this.fetchBulkReportingData();
9477
9477
  console.log('uploadReport bulk');
9478
9478
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -10446,7 +10446,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10446
10446
  //console.log('makerscheckers', makercheckers, reportercomments);
10447
10447
  // console.log('reportformatvalues', reportformatvalues)
10448
10448
  // console.log('reportformatschema',reportformatschema)
10449
- await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage);
10449
+ await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers);
10450
10450
  console.log('this.events', this.events);
10451
10451
  for (var p = 0; p < this.events[mmdd].length; p++) {
10452
10452
  if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
@@ -10456,12 +10456,12 @@ let SfIEvents = class SfIEvents extends LitElement {
10456
10456
  }
10457
10457
  }
10458
10458
  if (makercheckers.length > 0) {
10459
- await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
10459
+ // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
10460
10460
  for (var p = 0; p < this.events[mmdd].length; p++) {
10461
10461
  if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10462
10462
  this.events[mmdd][p].approved = true;
10463
10463
  // this.events[mmdd][p].documents = docs
10464
- this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10464
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10465
10465
  this.events[mmdd][p].lastupdated = new Date().toString();
10466
10466
  }
10467
10467
  }
@@ -10503,52 +10503,52 @@ let SfIEvents = class SfIEvents extends LitElement {
10503
10503
  // "module": event.isnotice != null ? "notices" : "events"
10504
10504
  // })
10505
10505
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
10506
- if (parseInt(makercheckersL) > 0) {
10507
- bulkBodyReview.push({
10508
- "mmddyyyy": mmddyyyy,
10509
- "projectid": this.projectId,
10510
- "type": "report",
10511
- "eventid": eventId,
10512
- "comments": reportercomments,
10513
- "dateofcompletion": reporterdoc,
10514
- "percentage": percentage,
10515
- "entityid": entityId,
10516
- "locationid": locationId,
10517
- "event": null,
10518
- "docs": JSON.stringify(docs),
10519
- "approved": true,
10520
- "username": this.userName,
10521
- "reportformatvalues": reportformatvalues,
10522
- "reportformatschema": reportformatschema,
10523
- "userid": this.userProfileId,
10524
- "userrole": this.myRole,
10525
- "year": this.calendarStartYYYY,
10526
- "module": event.isnotice != null ? "notices" : "events"
10527
- });
10528
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
10529
- }
10530
- else {
10531
- bulkBody.push({
10532
- "mmddyyyy": mmddyyyy,
10533
- "projectid": this.projectId,
10534
- "type": "report",
10535
- "eventid": eventId,
10536
- "comments": reportercomments,
10537
- "dateofcompletion": reporterdoc,
10538
- "percentage": percentage,
10539
- "entityid": entityId,
10540
- "locationid": locationId,
10541
- "event": null,
10542
- "docs": JSON.stringify(docs),
10543
- "username": this.userName,
10544
- "reportformatvalues": reportformatvalues,
10545
- "reportformatschema": reportformatschema,
10546
- "userid": this.userProfileId,
10547
- "userrole": this.myRole,
10548
- "year": this.calendarStartYYYY,
10549
- "module": event.isnotice != null ? "notices" : "events"
10550
- });
10551
- }
10506
+ // if(parseInt(makercheckersL) > 0) {
10507
+ // bulkBodyReview.push({
10508
+ // "mmddyyyy": mmddyyyy,
10509
+ // "projectid": this.projectId,
10510
+ // "type": "report",
10511
+ // "eventid": eventId,
10512
+ // "comments": reportercomments,
10513
+ // "dateofcompletion": reporterdoc,
10514
+ // "percentage": percentage,
10515
+ // "entityid": entityId,
10516
+ // "locationid": locationId,
10517
+ // "event": null,
10518
+ // "docs": JSON.stringify(docs),
10519
+ // "approved": true,
10520
+ // "username": this.userName,
10521
+ // "reportformatvalues": reportformatvalues,
10522
+ // "reportformatschema": reportformatschema,
10523
+ // "userid": this.userProfileId,
10524
+ // "userrole": this.myRole,
10525
+ // "year": this.calendarStartYYYY,
10526
+ // "module": event.isnotice != null ? "notices" : "events"
10527
+ // } )
10528
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
10529
+ // }else{
10530
+ bulkBody.push({
10531
+ "mmddyyyy": mmddyyyy,
10532
+ "projectid": this.projectId,
10533
+ "type": "report",
10534
+ "eventid": eventId,
10535
+ "comments": reportercomments,
10536
+ "dateofcompletion": reporterdoc,
10537
+ "percentage": percentage,
10538
+ "entityid": entityId,
10539
+ "locationid": locationId,
10540
+ "event": null,
10541
+ "docs": JSON.stringify(docs),
10542
+ "username": this.userName,
10543
+ "reportformatvalues": reportformatvalues,
10544
+ "reportformatschema": reportformatschema,
10545
+ "userid": this.userProfileId,
10546
+ "userrole": this.myRole,
10547
+ "year": this.calendarStartYYYY,
10548
+ "module": event.isnotice != null ? "notices" : "events",
10549
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
10550
+ });
10551
+ // }
10552
10552
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
10553
10553
  // await this.sleep(2000);
10554
10554
  // this.clearMessages();
@@ -10557,9 +10557,9 @@ let SfIEvents = class SfIEvents extends LitElement {
10557
10557
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
10558
10558
  }
10559
10559
  // await this.fetchBulkReportingData();
10560
- if (bulkBodyReview.length > 0) {
10561
- await this.uploadReportsReviewsBulk(bulkBodyReview);
10562
- }
10560
+ // if(bulkBodyReview.length > 0){
10561
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
10562
+ // }
10563
10563
  for (var k = 0; k < this.selectedItemIds.length; k++) {
10564
10564
  const selectedId = this.selectedItemIds[k];
10565
10565
  //console.log('selectedid', selectedId);
@@ -17011,8 +17011,8 @@ let SfIEvents = class SfIEvents extends LitElement {
17011
17011
  }, 3000);
17012
17012
  }
17013
17013
  };
17014
- this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100") => {
17015
- let url = "https://" + this.apiId + "/uploadreport";
17014
+ this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100", makercheckers) => {
17015
+ let url = "https://" + this.apiId + "/uploadreport1";
17016
17016
  let body = {
17017
17017
  "mmddyyyy": mmddyyyy,
17018
17018
  "projectid": this.projectId,
@@ -17031,7 +17031,8 @@ let SfIEvents = class SfIEvents extends LitElement {
17031
17031
  "userid": this.userProfileId,
17032
17032
  "userrole": this.myRole,
17033
17033
  "year": this.calendarStartYYYY,
17034
- "module": module
17034
+ "module": module,
17035
+ "makercheckers": makercheckers
17035
17036
  };
17036
17037
  //console.log(body);
17037
17038
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
@@ -17061,7 +17062,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17061
17062
  }
17062
17063
  };
17063
17064
  this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
17064
- let url = "https://" + this.apiId + "/uploadreportsbulk";
17065
+ let url = "https://" + this.apiId + "/uploadreportsbulk1";
17065
17066
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17066
17067
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
17067
17068
  if (showSuccess) {
@@ -6052,7 +6052,7 @@ export class SfIEvents extends LitElement {
6052
6052
  let flagBulk = false;
6053
6053
  if(this.selectedItemIds.length == 0){
6054
6054
 
6055
- await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage)
6055
+ await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)
6056
6056
 
6057
6057
  console.log('this.events', this.events);
6058
6058
  if(this.mode != "next"){
@@ -6066,7 +6066,7 @@ export class SfIEvents extends LitElement {
6066
6066
 
6067
6067
  if(event.makercheckers.length > 0) {
6068
6068
 
6069
- await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
6069
+ // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
6070
6070
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
6071
6071
  if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
6072
6072
  this.events[mmdd][p].approved = true
@@ -6099,31 +6099,31 @@ export class SfIEvents extends LitElement {
6099
6099
  //console.log(entityId, locationId, eventId, mmddyyyy);
6100
6100
 
6101
6101
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
6102
- if(parseInt(makercheckersL) > 0) {
6103
- bulkBodyReview.push({
6104
- "mmddyyyy": mmddyyyy,
6105
- "projectid": this.projectId,
6106
- "type": "report",
6107
- "eventid": eventId,
6108
- "comments": reportercomments,
6109
- "dateofcompletion": reporterdoc,
6110
- "percentage": percentage,
6111
- "entityid": entityId,
6112
- "locationid": locationId,
6113
- "event": null,
6114
- "docs": JSON.stringify(docs),
6115
- "approved": true,
6116
- "username": this.userName,
6117
- "reportformatvalues": reportformatvalues,
6118
- "reportformatschema": reportformatschema,
6119
- "userid": this.userProfileId,
6120
- "userrole": this.myRole,
6121
- "year": this.calendarStartYYYY,
6122
- "module": event.isnotice != null ? "notices" : "events"
6123
- } )
6124
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
6125
-
6126
- }else{
6102
+ // if(parseInt(makercheckersL) > 0) {
6103
+ // bulkBodyReview.push({
6104
+ // "mmddyyyy": mmddyyyy,
6105
+ // "projectid": this.projectId,
6106
+ // "type": "report",
6107
+ // "eventid": eventId,
6108
+ // "comments": reportercomments,
6109
+ // "dateofcompletion": reporterdoc,
6110
+ // "percentage": percentage,
6111
+ // "entityid": entityId,
6112
+ // "locationid": locationId,
6113
+ // "event": null,
6114
+ // "docs": JSON.stringify(docs),
6115
+ // "approved": true,
6116
+ // "username": this.userName,
6117
+ // "reportformatvalues": reportformatvalues,
6118
+ // "reportformatschema": reportformatschema,
6119
+ // "userid": this.userProfileId,
6120
+ // "userrole": this.myRole,
6121
+ // "year": this.calendarStartYYYY,
6122
+ // "module": event.isnotice != null ? "notices" : "events"
6123
+ // } )
6124
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
6125
+
6126
+ // }else{
6127
6127
  bulkBody.push({
6128
6128
  "mmddyyyy": mmddyyyy,
6129
6129
  "projectid": this.projectId,
@@ -6142,9 +6142,10 @@ export class SfIEvents extends LitElement {
6142
6142
  "userid": this.userProfileId,
6143
6143
  "userrole": this.myRole,
6144
6144
  "year": this.calendarStartYYYY,
6145
- "module": event.isnotice != null ? "notices" : "events"
6145
+ "module": event.isnotice != null ? "notices" : "events",
6146
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
6146
6147
  })
6147
- }
6148
+ // }
6148
6149
 
6149
6150
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
6150
6151
  // await this.sleep(2000);
@@ -6158,9 +6159,9 @@ export class SfIEvents extends LitElement {
6158
6159
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
6159
6160
  }
6160
6161
 
6161
- if(bulkBodyReview.length > 0){
6162
- await this.uploadReportsReviewsBulk(bulkBodyReview)
6163
- }
6162
+ // if(bulkBodyReview.length > 0){
6163
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
6164
+ // }
6164
6165
  for(var k = 0; k < this.selectedItemIds.length; k++) {
6165
6166
 
6166
6167
  const selectedId = this.selectedItemIds[k];
@@ -12953,7 +12954,7 @@ export class SfIEvents extends LitElement {
12953
12954
  let flagBulk = false;
12954
12955
  if(this.selectedItemIds.length === 0) {
12955
12956
 
12956
- await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage)
12957
+ await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)
12957
12958
  console.log('this.events', this.events);
12958
12959
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
12959
12960
  if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
@@ -12965,7 +12966,7 @@ export class SfIEvents extends LitElement {
12965
12966
  console.log('uploadReport single')
12966
12967
  if(makercheckers.length > 0) {
12967
12968
 
12968
- await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
12969
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
12969
12970
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
12970
12971
  if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12971
12972
  this.events[mmdd][p].approved = true
@@ -12998,31 +12999,31 @@ export class SfIEvents extends LitElement {
12998
12999
  //console.log(entityId, locationId, eventId, mmddyyyy);
12999
13000
 
13000
13001
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
13001
- if(parseInt(makercheckersL) > 0) {
13002
- bulkBodyReview.push({
13003
- "mmddyyyy": mmddyyyy,
13004
- "projectid": this.projectId,
13005
- "type": "report",
13006
- "eventid": eventId,
13007
- "comments": reportercomments,
13008
- "dateofcompletion": reporterdoc,
13009
- "percentage": percentage,
13010
- "entityid": entityId,
13011
- "locationid": locationId,
13012
- "event": null,
13013
- "docs": JSON.stringify(docs),
13014
- "approved": true,
13015
- "username": this.userName,
13016
- "reportformatvalues": reportformatvalues,
13017
- "reportformatschema": reportformatschema,
13018
- "userid": this.userProfileId,
13019
- "userrole": this.myRole,
13020
- "year": this.calendarStartYYYY,
13021
- "module": listEvent.isnotice != null ? "notices" : "events"
13022
- } )
13023
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
13024
-
13025
- }else{
13002
+ // if(parseInt(makercheckersL) > 0) {
13003
+ // bulkBodyReview.push({
13004
+ // "mmddyyyy": mmddyyyy,
13005
+ // "projectid": this.projectId,
13006
+ // "type": "report",
13007
+ // "eventid": eventId,
13008
+ // "comments": reportercomments,
13009
+ // "dateofcompletion": reporterdoc,
13010
+ // "percentage": percentage,
13011
+ // "entityid": entityId,
13012
+ // "locationid": locationId,
13013
+ // "event": null,
13014
+ // "docs": JSON.stringify(docs),
13015
+ // "approved": true,
13016
+ // "username": this.userName,
13017
+ // "reportformatvalues": reportformatvalues,
13018
+ // "reportformatschema": reportformatschema,
13019
+ // "userid": this.userProfileId,
13020
+ // "userrole": this.myRole,
13021
+ // "year": this.calendarStartYYYY,
13022
+ // "module": listEvent.isnotice != null ? "notices" : "events"
13023
+ // } )
13024
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
13025
+
13026
+ // }else{
13026
13027
  bulkBody.push({
13027
13028
  "mmddyyyy": mmddyyyy,
13028
13029
  "projectid": this.projectId,
@@ -13041,9 +13042,10 @@ export class SfIEvents extends LitElement {
13041
13042
  "userid": this.userProfileId,
13042
13043
  "userrole": this.myRole,
13043
13044
  "year": this.calendarStartYYYY,
13044
- "module": listEvent.isnotice != null ? "notices" : "events"
13045
+ "module": listEvent.isnotice != null ? "notices" : "events",
13046
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
13045
13047
  })
13046
- }
13048
+ // }
13047
13049
 
13048
13050
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
13049
13051
  // await this.sleep(2000);
@@ -13057,9 +13059,9 @@ export class SfIEvents extends LitElement {
13057
13059
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
13058
13060
  }
13059
13061
 
13060
- if(bulkBodyReview.length > 0){
13061
- await this.uploadReportsReviewsBulk(bulkBodyReview)
13062
- }
13062
+ // if(bulkBodyReview.length > 0){
13063
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
13064
+ // }
13063
13065
  await this.fetchBulkReportingData();
13064
13066
  console.log('uploadReport bulk')
13065
13067
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -14230,7 +14232,7 @@ export class SfIEvents extends LitElement {
14230
14232
  //console.log('makerscheckers', makercheckers, reportercomments);
14231
14233
  // console.log('reportformatvalues', reportformatvalues)
14232
14234
  // console.log('reportformatschema',reportformatschema)
14233
- await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage)
14235
+ await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)
14234
14236
  console.log('this.events', this.events);
14235
14237
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
14236
14238
  if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
@@ -14241,12 +14243,12 @@ export class SfIEvents extends LitElement {
14241
14243
  }
14242
14244
  if(makercheckers.length > 0) {
14243
14245
 
14244
- await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
14246
+ // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
14245
14247
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
14246
14248
  if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14247
14249
  this.events[mmdd][p].approved = true
14248
14250
  // this.events[mmdd][p].documents = docs
14249
- this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
14251
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
14250
14252
  this.events[mmdd][p].lastupdated = new Date().toString()
14251
14253
  }
14252
14254
  }
@@ -14291,31 +14293,31 @@ export class SfIEvents extends LitElement {
14291
14293
  // "module": event.isnotice != null ? "notices" : "events"
14292
14294
  // })
14293
14295
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
14294
- if(parseInt(makercheckersL) > 0) {
14295
- bulkBodyReview.push({
14296
- "mmddyyyy": mmddyyyy,
14297
- "projectid": this.projectId,
14298
- "type": "report",
14299
- "eventid": eventId,
14300
- "comments": reportercomments,
14301
- "dateofcompletion": reporterdoc,
14302
- "percentage": percentage,
14303
- "entityid": entityId,
14304
- "locationid": locationId,
14305
- "event": null,
14306
- "docs": JSON.stringify(docs),
14307
- "approved": true,
14308
- "username": this.userName,
14309
- "reportformatvalues": reportformatvalues,
14310
- "reportformatschema": reportformatschema,
14311
- "userid": this.userProfileId,
14312
- "userrole": this.myRole,
14313
- "year": this.calendarStartYYYY,
14314
- "module": event.isnotice != null ? "notices" : "events"
14315
- } )
14316
- // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
14317
-
14318
- }else{
14296
+ // if(parseInt(makercheckersL) > 0) {
14297
+ // bulkBodyReview.push({
14298
+ // "mmddyyyy": mmddyyyy,
14299
+ // "projectid": this.projectId,
14300
+ // "type": "report",
14301
+ // "eventid": eventId,
14302
+ // "comments": reportercomments,
14303
+ // "dateofcompletion": reporterdoc,
14304
+ // "percentage": percentage,
14305
+ // "entityid": entityId,
14306
+ // "locationid": locationId,
14307
+ // "event": null,
14308
+ // "docs": JSON.stringify(docs),
14309
+ // "approved": true,
14310
+ // "username": this.userName,
14311
+ // "reportformatvalues": reportformatvalues,
14312
+ // "reportformatschema": reportformatschema,
14313
+ // "userid": this.userProfileId,
14314
+ // "userrole": this.myRole,
14315
+ // "year": this.calendarStartYYYY,
14316
+ // "module": event.isnotice != null ? "notices" : "events"
14317
+ // } )
14318
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
14319
+
14320
+ // }else{
14319
14321
  bulkBody.push({
14320
14322
  "mmddyyyy": mmddyyyy,
14321
14323
  "projectid": this.projectId,
@@ -14334,9 +14336,10 @@ export class SfIEvents extends LitElement {
14334
14336
  "userid": this.userProfileId,
14335
14337
  "userrole": this.myRole,
14336
14338
  "year": this.calendarStartYYYY,
14337
- "module": event.isnotice != null ? "notices" : "events"
14339
+ "module": event.isnotice != null ? "notices" : "events",
14340
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
14338
14341
  })
14339
- }
14342
+ // }
14340
14343
 
14341
14344
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
14342
14345
  // await this.sleep(2000);
@@ -14348,9 +14351,9 @@ export class SfIEvents extends LitElement {
14348
14351
  await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
14349
14352
  }
14350
14353
  // await this.fetchBulkReportingData();
14351
- if(bulkBodyReview.length > 0){
14352
- await this.uploadReportsReviewsBulk(bulkBodyReview)
14353
- }
14354
+ // if(bulkBodyReview.length > 0){
14355
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
14356
+ // }
14354
14357
  for(var k = 0; k < this.selectedItemIds.length; k++) {
14355
14358
 
14356
14359
  const selectedId = this.selectedItemIds[k];
@@ -22525,8 +22528,8 @@ export class SfIEvents extends LitElement {
22525
22528
  }
22526
22529
  }
22527
22530
 
22528
- uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "events", percentage: string = "100") => {
22529
- let url = "https://"+this.apiId+"/uploadreport";
22531
+ uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "events", percentage: string = "100", makercheckers: any) => {
22532
+ let url = "https://"+this.apiId+"/uploadreport1";
22530
22533
 
22531
22534
  let body = {
22532
22535
  "mmddyyyy": mmddyyyy,
@@ -22546,7 +22549,8 @@ export class SfIEvents extends LitElement {
22546
22549
  "userid": this.userProfileId,
22547
22550
  "userrole": this.myRole,
22548
22551
  "year": this.calendarStartYYYY,
22549
- "module": module
22552
+ "module": module,
22553
+ "makercheckers": makercheckers
22550
22554
  }
22551
22555
 
22552
22556
  //console.log(body);
@@ -22580,7 +22584,7 @@ export class SfIEvents extends LitElement {
22580
22584
  }
22581
22585
 
22582
22586
  uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
22583
- let url = "https://"+this.apiId+"/uploadreportsbulk"
22587
+ let url = "https://"+this.apiId+"/uploadreportsbulk1"
22584
22588
 
22585
22589
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22586
22590
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;