sf-i-events 1.0.766 → 1.0.767

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
@@ -631,10 +631,10 @@
631
631
  <!-- <sf-i-events projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" projectname="Chitale" mode="onboarding" locations="{&quot;India&quot;:{&quot;Maharashtra&quot;:[&quot;Reg_Offce&quot;,&quot;SHRIKRISHNA&quot;,&quot;SHEDNO25&quot;,&quot;SHEDNO31&quot;,&quot;SHEDNO44&quot;,&quot;CBM_SADAN&quot;,&quot;RANJE_CBM&quot;,&quot;ISHITA_TOWER&quot;,&quot;CBM_ANAND&quot;,&quot;CBM_SADAN_WH&quot;,&quot;CBM_ANAND_SHED25&quot;,&quot;CBM_KATRAJ&quot;,&quot;CBM_KHADKI&quot;,&quot;CBM_PANVEL&quot;,&quot;CBM_NAGPUR&quot;,&quot;CBM_ISHITA&quot;,&quot;Dugdhalaya&quot;,&quot;ExpressStores_MH&quot;,&quot;FranchiseStore_MH&quot;],&quot;Goa&quot;:[&quot;ExpressStores_Goa&quot;]},&quot;United States of America&quot;:{&quot;USA&quot;:[&quot;North_Carolina&quot;]}}" 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">
632
632
 
633
633
  </sf-i-events> -->
634
- <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="Ankur Singhal" userprofileid="010834e8-108e-4a87-b58d-f5b429f184be" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" countryid="4ab8901c-4407-4c4d-a2c7-df1a690aa0a3" myrole="viewer" showregisterexport="false" features="[]" 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">
634
+ <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
635
 
636
636
  <div slot="uploader">
637
- <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="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
637
+ <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>
638
638
  </div>
639
639
  <div slot="reporting">
640
640
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.766",
4
+ "version": "1.0.767",
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
@@ -711,6 +711,7 @@ export declare class SfIEvents extends LitElement {
711
711
  uploadAudit: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<void>;
712
712
  uploadAuditsBulk: (bulkBody: any) => Promise<void>;
713
713
  uploadReview: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<void>;
714
+ uploadReportsReviewsBulk: (bulkBody: any) => Promise<void>;
714
715
  uploadReviewsBulk: (bulkBody: any) => Promise<void>;
715
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>;
716
717
  uploadReportsBulk: (bulkBody: any) => Promise<void>;
package/sf-i-events.js CHANGED
@@ -3445,37 +3445,23 @@ let SfIEvents = class SfIEvents extends LitElement {
3445
3445
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
3446
3446
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
3447
3447
  //console.log(entityId, locationId, eventId, mmddyyyy);
3448
- bulkBody.push({
3449
- "mmddyyyy": mmddyyyy,
3450
- "projectid": this.projectId,
3451
- "type": "report",
3452
- "eventid": eventId,
3453
- "comments": reportercomments,
3454
- "dateofcompletion": reporterdoc,
3455
- "entityid": entityId,
3456
- "locationid": locationId,
3457
- "event": null,
3458
- "docs": JSON.stringify(docs),
3459
- "username": this.userName,
3460
- "reportformatvalues": reportformatvalues,
3461
- "reportformatschema": reportformatschema,
3462
- "userid": this.userProfileId,
3463
- "userrole": this.myRole,
3464
- "year": this.calendarStartYYYY,
3465
- "module": event.isnotice != null ? "notices" : "events"
3466
- });
3467
3448
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
3468
3449
  if (parseInt(makercheckersL) > 0) {
3469
3450
  bulkBodyReview.push({
3470
3451
  "mmddyyyy": mmddyyyy,
3471
3452
  "projectid": this.projectId,
3472
- "type": "review",
3453
+ "type": "report",
3473
3454
  "eventid": eventId,
3474
- "comments": "Auto approved",
3475
- "approved": true,
3455
+ "comments": reportercomments,
3456
+ "dateofcompletion": reporterdoc,
3476
3457
  "entityid": entityId,
3477
3458
  "locationid": locationId,
3459
+ "event": null,
3460
+ "docs": JSON.stringify(docs),
3461
+ "approved": true,
3478
3462
  "username": this.userName,
3463
+ "reportformatvalues": reportformatvalues,
3464
+ "reportformatschema": reportformatschema,
3479
3465
  "userid": this.userProfileId,
3480
3466
  "userrole": this.myRole,
3481
3467
  "year": this.calendarStartYYYY,
@@ -3483,14 +3469,38 @@ let SfIEvents = class SfIEvents extends LitElement {
3483
3469
  });
3484
3470
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
3485
3471
  }
3472
+ else {
3473
+ bulkBody.push({
3474
+ "mmddyyyy": mmddyyyy,
3475
+ "projectid": this.projectId,
3476
+ "type": "report",
3477
+ "eventid": eventId,
3478
+ "comments": reportercomments,
3479
+ "dateofcompletion": reporterdoc,
3480
+ "entityid": entityId,
3481
+ "locationid": locationId,
3482
+ "event": null,
3483
+ "docs": JSON.stringify(docs),
3484
+ "username": this.userName,
3485
+ "reportformatvalues": reportformatvalues,
3486
+ "reportformatschema": reportformatschema,
3487
+ "userid": this.userProfileId,
3488
+ "userrole": this.myRole,
3489
+ "year": this.calendarStartYYYY,
3490
+ "module": event.isnotice != null ? "notices" : "events"
3491
+ });
3492
+ }
3486
3493
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
3487
3494
  // await this.sleep(2000);
3488
3495
  // this.clearMessages();
3489
3496
  }
3490
- await this.uploadReportsBulk(bulkBody);
3497
+ // await this.uploadReportsBulk(bulkBody);
3491
3498
  // await this.fetchBulkReportingData();
3499
+ if (bulkBody.length > 0) {
3500
+ await this.uploadReportsBulk(bulkBody);
3501
+ }
3492
3502
  if (bulkBodyReview.length > 0) {
3493
- await this.uploadReviewsBulk(bulkBodyReview);
3503
+ await this.uploadReportsReviewsBulk(bulkBodyReview);
3494
3504
  }
3495
3505
  for (var k = 0; k < this.selectedItemIds.length; k++) {
3496
3506
  const selectedId = this.selectedItemIds[k];
@@ -8741,37 +8751,23 @@ let SfIEvents = class SfIEvents extends LitElement {
8741
8751
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
8742
8752
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
8743
8753
  //console.log(entityId, locationId, eventId, mmddyyyy);
8744
- bulkBody.push({
8745
- "mmddyyyy": mmddyyyy,
8746
- "projectid": this.projectId,
8747
- "type": "report",
8748
- "eventid": eventId,
8749
- "comments": reportercomments,
8750
- "dateofcompletion": reporterdoc,
8751
- "entityid": entityId,
8752
- "locationid": locationId,
8753
- "event": null,
8754
- "docs": JSON.stringify(docs),
8755
- "username": this.userName,
8756
- "reportformatvalues": reportformatvalues,
8757
- "reportformatschema": reportformatschema,
8758
- "userid": this.userProfileId,
8759
- "userrole": this.myRole,
8760
- "year": this.calendarStartYYYY,
8761
- "module": listEvent.isnotice != null ? "notices" : "events"
8762
- });
8763
8754
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
8764
8755
  if (parseInt(makercheckersL) > 0) {
8765
8756
  bulkBodyReview.push({
8766
8757
  "mmddyyyy": mmddyyyy,
8767
8758
  "projectid": this.projectId,
8768
- "type": "review",
8759
+ "type": "report",
8769
8760
  "eventid": eventId,
8770
- "comments": "Auto approved",
8771
- "approved": true,
8761
+ "comments": reportercomments,
8762
+ "dateofcompletion": reporterdoc,
8772
8763
  "entityid": entityId,
8773
8764
  "locationid": locationId,
8765
+ "event": null,
8766
+ "docs": JSON.stringify(docs),
8767
+ "approved": true,
8774
8768
  "username": this.userName,
8769
+ "reportformatvalues": reportformatvalues,
8770
+ "reportformatschema": reportformatschema,
8775
8771
  "userid": this.userProfileId,
8776
8772
  "userrole": this.myRole,
8777
8773
  "year": this.calendarStartYYYY,
@@ -8779,15 +8775,40 @@ let SfIEvents = class SfIEvents extends LitElement {
8779
8775
  });
8780
8776
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
8781
8777
  }
8778
+ else {
8779
+ bulkBody.push({
8780
+ "mmddyyyy": mmddyyyy,
8781
+ "projectid": this.projectId,
8782
+ "type": "report",
8783
+ "eventid": eventId,
8784
+ "comments": reportercomments,
8785
+ "dateofcompletion": reporterdoc,
8786
+ "entityid": entityId,
8787
+ "locationid": locationId,
8788
+ "event": null,
8789
+ "docs": JSON.stringify(docs),
8790
+ "username": this.userName,
8791
+ "reportformatvalues": reportformatvalues,
8792
+ "reportformatschema": reportformatschema,
8793
+ "userid": this.userProfileId,
8794
+ "userrole": this.myRole,
8795
+ "year": this.calendarStartYYYY,
8796
+ "module": listEvent.isnotice != null ? "notices" : "events"
8797
+ });
8798
+ }
8782
8799
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
8783
8800
  // await this.sleep(2000);
8784
8801
  // this.clearMessages();
8785
8802
  }
8786
- await this.uploadReportsBulk(bulkBody);
8787
- await this.fetchBulkReportingData();
8803
+ // await this.uploadReportsBulk(bulkBody);
8804
+ // await this.fetchBulkReportingData();
8805
+ if (bulkBody.length > 0) {
8806
+ await this.uploadReportsBulk(bulkBody);
8807
+ }
8788
8808
  if (bulkBodyReview.length > 0) {
8789
- await this.uploadReviewsBulk(bulkBodyReview);
8809
+ await this.uploadReportsReviewsBulk(bulkBodyReview);
8790
8810
  }
8811
+ await this.fetchBulkReportingData();
8791
8812
  console.log('uploadReport bulk');
8792
8813
  for (var k = 0; k < this.selectedItemIds.length; k++) {
8793
8814
  const selectedId = this.selectedItemIds[k];
@@ -9819,37 +9840,42 @@ let SfIEvents = class SfIEvents extends LitElement {
9819
9840
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
9820
9841
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
9821
9842
  //console.log(entityId, locationId, eventId, mmddyyyy);
9822
- bulkBody.push({
9823
- "mmddyyyy": mmddyyyy,
9824
- "projectid": this.projectId,
9825
- "type": "report",
9826
- "eventid": eventId,
9827
- "comments": reportercomments,
9828
- "dateofcompletion": reporterdoc,
9829
- "entityid": entityId,
9830
- "locationid": locationId,
9831
- "event": null,
9832
- "docs": JSON.stringify(docs),
9833
- "username": this.userName,
9834
- "reportformatvalues": reportformatvalues,
9835
- "reportformatschema": reportformatschema,
9836
- "userid": this.userProfileId,
9837
- "userrole": this.myRole,
9838
- "year": this.calendarStartYYYY,
9839
- "module": event.isnotice != null ? "notices" : "events"
9840
- });
9843
+ // bulkBody.push({
9844
+ // "mmddyyyy": mmddyyyy,
9845
+ // "projectid": this.projectId,
9846
+ // "type": "report",
9847
+ // "eventid": eventId,
9848
+ // "comments": reportercomments,
9849
+ // "dateofcompletion": reporterdoc,
9850
+ // "entityid": entityId,
9851
+ // "locationid": locationId,
9852
+ // "event": null,
9853
+ // "docs": JSON.stringify(docs),
9854
+ // "username": this.userName,
9855
+ // "reportformatvalues": reportformatvalues,
9856
+ // "reportformatschema": reportformatschema,
9857
+ // "userid": this.userProfileId,
9858
+ // "userrole": this.myRole,
9859
+ // "year": this.calendarStartYYYY,
9860
+ // "module": event.isnotice != null ? "notices" : "events"
9861
+ // })
9841
9862
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
9842
9863
  if (parseInt(makercheckersL) > 0) {
9843
9864
  bulkBodyReview.push({
9844
9865
  "mmddyyyy": mmddyyyy,
9845
9866
  "projectid": this.projectId,
9846
- "type": "review",
9867
+ "type": "report",
9847
9868
  "eventid": eventId,
9848
- "comments": "Auto approved",
9849
- "approved": true,
9869
+ "comments": reportercomments,
9870
+ "dateofcompletion": reporterdoc,
9850
9871
  "entityid": entityId,
9851
9872
  "locationid": locationId,
9873
+ "event": null,
9874
+ "docs": JSON.stringify(docs),
9875
+ "approved": true,
9852
9876
  "username": this.userName,
9877
+ "reportformatvalues": reportformatvalues,
9878
+ "reportformatschema": reportformatschema,
9853
9879
  "userid": this.userProfileId,
9854
9880
  "userrole": this.myRole,
9855
9881
  "year": this.calendarStartYYYY,
@@ -9857,14 +9883,37 @@ let SfIEvents = class SfIEvents extends LitElement {
9857
9883
  });
9858
9884
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
9859
9885
  }
9886
+ else {
9887
+ bulkBody.push({
9888
+ "mmddyyyy": mmddyyyy,
9889
+ "projectid": this.projectId,
9890
+ "type": "report",
9891
+ "eventid": eventId,
9892
+ "comments": reportercomments,
9893
+ "dateofcompletion": reporterdoc,
9894
+ "entityid": entityId,
9895
+ "locationid": locationId,
9896
+ "event": null,
9897
+ "docs": JSON.stringify(docs),
9898
+ "username": this.userName,
9899
+ "reportformatvalues": reportformatvalues,
9900
+ "reportformatschema": reportformatschema,
9901
+ "userid": this.userProfileId,
9902
+ "userrole": this.myRole,
9903
+ "year": this.calendarStartYYYY,
9904
+ "module": event.isnotice != null ? "notices" : "events"
9905
+ });
9906
+ }
9860
9907
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
9861
9908
  // await this.sleep(2000);
9862
9909
  // this.clearMessages();
9863
9910
  }
9864
- await this.uploadReportsBulk(bulkBody);
9911
+ if (bulkBody.length > 0) {
9912
+ await this.uploadReportsBulk(bulkBody);
9913
+ }
9865
9914
  // await this.fetchBulkReportingData();
9866
9915
  if (bulkBodyReview.length > 0) {
9867
- await this.uploadReviewsBulk(bulkBodyReview);
9916
+ await this.uploadReportsReviewsBulk(bulkBodyReview);
9868
9917
  }
9869
9918
  for (var k = 0; k < this.selectedItemIds.length; k++) {
9870
9919
  const selectedId = this.selectedItemIds[k];
@@ -16200,6 +16249,22 @@ let SfIEvents = class SfIEvents extends LitElement {
16200
16249
  this.setError(jsonRespose.error);
16201
16250
  }
16202
16251
  };
16252
+ this.uploadReportsReviewsBulk = async (bulkBody) => {
16253
+ let url = "https://" + this.apiId + "/uploadreportsreviewsbulk1";
16254
+ const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
16255
+ const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
16256
+ this._SfLoader.innerHTML = '';
16257
+ if (xhr.status == 200) {
16258
+ this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
16259
+ setTimeout(() => {
16260
+ this.clearMessages();
16261
+ }, 10000);
16262
+ }
16263
+ else {
16264
+ const jsonRespose = JSON.parse(xhr.responseText);
16265
+ this.setError(jsonRespose.error);
16266
+ }
16267
+ };
16203
16268
  this.uploadReviewsBulk = async (bulkBody) => {
16204
16269
  let url = "https://" + this.apiId + "/uploadreviewsbulk1";
16205
16270
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
@@ -5806,37 +5806,24 @@ export class SfIEvents extends LitElement {
5806
5806
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
5807
5807
 
5808
5808
  //console.log(entityId, locationId, eventId, mmddyyyy);
5809
- bulkBody.push({
5810
- "mmddyyyy": mmddyyyy,
5811
- "projectid": this.projectId,
5812
- "type": "report",
5813
- "eventid": eventId,
5814
- "comments": reportercomments,
5815
- "dateofcompletion": reporterdoc,
5816
- "entityid": entityId,
5817
- "locationid": locationId,
5818
- "event": null,
5819
- "docs": JSON.stringify(docs),
5820
- "username": this.userName,
5821
- "reportformatvalues": reportformatvalues,
5822
- "reportformatschema": reportformatschema,
5823
- "userid": this.userProfileId,
5824
- "userrole": this.myRole,
5825
- "year": this.calendarStartYYYY,
5826
- "module": event.isnotice != null ? "notices" : "events"
5827
- })
5809
+
5828
5810
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
5829
5811
  if(parseInt(makercheckersL) > 0) {
5830
5812
  bulkBodyReview.push({
5831
5813
  "mmddyyyy": mmddyyyy,
5832
5814
  "projectid": this.projectId,
5833
- "type": "review",
5815
+ "type": "report",
5834
5816
  "eventid": eventId,
5835
- "comments": "Auto approved",
5836
- "approved": true,
5817
+ "comments": reportercomments,
5818
+ "dateofcompletion": reporterdoc,
5837
5819
  "entityid": entityId,
5838
5820
  "locationid": locationId,
5821
+ "event": null,
5822
+ "docs": JSON.stringify(docs),
5823
+ "approved": true,
5839
5824
  "username": this.userName,
5825
+ "reportformatvalues": reportformatvalues,
5826
+ "reportformatschema": reportformatschema,
5840
5827
  "userid": this.userProfileId,
5841
5828
  "userrole": this.myRole,
5842
5829
  "year": this.calendarStartYYYY,
@@ -5844,6 +5831,26 @@ export class SfIEvents extends LitElement {
5844
5831
  } )
5845
5832
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
5846
5833
 
5834
+ }else{
5835
+ bulkBody.push({
5836
+ "mmddyyyy": mmddyyyy,
5837
+ "projectid": this.projectId,
5838
+ "type": "report",
5839
+ "eventid": eventId,
5840
+ "comments": reportercomments,
5841
+ "dateofcompletion": reporterdoc,
5842
+ "entityid": entityId,
5843
+ "locationid": locationId,
5844
+ "event": null,
5845
+ "docs": JSON.stringify(docs),
5846
+ "username": this.userName,
5847
+ "reportformatvalues": reportformatvalues,
5848
+ "reportformatschema": reportformatschema,
5849
+ "userid": this.userProfileId,
5850
+ "userrole": this.myRole,
5851
+ "year": this.calendarStartYYYY,
5852
+ "module": event.isnotice != null ? "notices" : "events"
5853
+ })
5847
5854
  }
5848
5855
 
5849
5856
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
@@ -5851,11 +5858,15 @@ export class SfIEvents extends LitElement {
5851
5858
  // this.clearMessages();
5852
5859
 
5853
5860
  }
5854
- await this.uploadReportsBulk(bulkBody);
5861
+ // await this.uploadReportsBulk(bulkBody);
5855
5862
 
5856
5863
  // await this.fetchBulkReportingData();
5864
+ if(bulkBody.length > 0){
5865
+ await this.uploadReportsBulk(bulkBody);
5866
+ }
5867
+
5857
5868
  if(bulkBodyReview.length > 0){
5858
- await this.uploadReviewsBulk(bulkBodyReview)
5869
+ await this.uploadReportsReviewsBulk(bulkBodyReview)
5859
5870
  }
5860
5871
  for(var k = 0; k < this.selectedItemIds.length; k++) {
5861
5872
 
@@ -12295,37 +12306,24 @@ export class SfIEvents extends LitElement {
12295
12306
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
12296
12307
 
12297
12308
  //console.log(entityId, locationId, eventId, mmddyyyy);
12298
- bulkBody.push({
12299
- "mmddyyyy": mmddyyyy,
12300
- "projectid": this.projectId,
12301
- "type": "report",
12302
- "eventid": eventId,
12303
- "comments": reportercomments,
12304
- "dateofcompletion": reporterdoc,
12305
- "entityid": entityId,
12306
- "locationid": locationId,
12307
- "event": null,
12308
- "docs": JSON.stringify(docs),
12309
- "username": this.userName,
12310
- "reportformatvalues": reportformatvalues,
12311
- "reportformatschema": reportformatschema,
12312
- "userid": this.userProfileId,
12313
- "userrole": this.myRole,
12314
- "year": this.calendarStartYYYY,
12315
- "module": listEvent.isnotice != null ? "notices" : "events"
12316
- })
12309
+
12317
12310
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
12318
12311
  if(parseInt(makercheckersL) > 0) {
12319
12312
  bulkBodyReview.push({
12320
12313
  "mmddyyyy": mmddyyyy,
12321
12314
  "projectid": this.projectId,
12322
- "type": "review",
12315
+ "type": "report",
12323
12316
  "eventid": eventId,
12324
- "comments": "Auto approved",
12325
- "approved": true,
12317
+ "comments": reportercomments,
12318
+ "dateofcompletion": reporterdoc,
12326
12319
  "entityid": entityId,
12327
12320
  "locationid": locationId,
12321
+ "event": null,
12322
+ "docs": JSON.stringify(docs),
12323
+ "approved": true,
12328
12324
  "username": this.userName,
12325
+ "reportformatvalues": reportformatvalues,
12326
+ "reportformatschema": reportformatschema,
12329
12327
  "userid": this.userProfileId,
12330
12328
  "userrole": this.myRole,
12331
12329
  "year": this.calendarStartYYYY,
@@ -12333,6 +12331,26 @@ export class SfIEvents extends LitElement {
12333
12331
  } )
12334
12332
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
12335
12333
 
12334
+ }else{
12335
+ bulkBody.push({
12336
+ "mmddyyyy": mmddyyyy,
12337
+ "projectid": this.projectId,
12338
+ "type": "report",
12339
+ "eventid": eventId,
12340
+ "comments": reportercomments,
12341
+ "dateofcompletion": reporterdoc,
12342
+ "entityid": entityId,
12343
+ "locationid": locationId,
12344
+ "event": null,
12345
+ "docs": JSON.stringify(docs),
12346
+ "username": this.userName,
12347
+ "reportformatvalues": reportformatvalues,
12348
+ "reportformatschema": reportformatschema,
12349
+ "userid": this.userProfileId,
12350
+ "userrole": this.myRole,
12351
+ "year": this.calendarStartYYYY,
12352
+ "module": listEvent.isnotice != null ? "notices" : "events"
12353
+ })
12336
12354
  }
12337
12355
 
12338
12356
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
@@ -12341,11 +12359,16 @@ export class SfIEvents extends LitElement {
12341
12359
 
12342
12360
  }
12343
12361
 
12344
- await this.uploadReportsBulk(bulkBody);
12345
- await this.fetchBulkReportingData();
12362
+ // await this.uploadReportsBulk(bulkBody);
12363
+ // await this.fetchBulkReportingData();
12364
+ if(bulkBody.length > 0){
12365
+ await this.uploadReportsBulk(bulkBody);
12366
+ }
12367
+
12346
12368
  if(bulkBodyReview.length > 0){
12347
- await this.uploadReviewsBulk(bulkBodyReview)
12369
+ await this.uploadReportsReviewsBulk(bulkBodyReview)
12348
12370
  }
12371
+ await this.fetchBulkReportingData();
12349
12372
  console.log('uploadReport bulk')
12350
12373
  for(var k = 0; k < this.selectedItemIds.length; k++) {
12351
12374
 
@@ -13556,37 +13579,42 @@ export class SfIEvents extends LitElement {
13556
13579
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
13557
13580
 
13558
13581
  //console.log(entityId, locationId, eventId, mmddyyyy);
13559
- bulkBody.push({
13560
- "mmddyyyy": mmddyyyy,
13561
- "projectid": this.projectId,
13562
- "type": "report",
13563
- "eventid": eventId,
13564
- "comments": reportercomments,
13565
- "dateofcompletion": reporterdoc,
13566
- "entityid": entityId,
13567
- "locationid": locationId,
13568
- "event": null,
13569
- "docs": JSON.stringify(docs),
13570
- "username": this.userName,
13571
- "reportformatvalues": reportformatvalues,
13572
- "reportformatschema": reportformatschema,
13573
- "userid": this.userProfileId,
13574
- "userrole": this.myRole,
13575
- "year": this.calendarStartYYYY,
13576
- "module": event.isnotice != null ? "notices" : "events"
13577
- })
13582
+ // bulkBody.push({
13583
+ // "mmddyyyy": mmddyyyy,
13584
+ // "projectid": this.projectId,
13585
+ // "type": "report",
13586
+ // "eventid": eventId,
13587
+ // "comments": reportercomments,
13588
+ // "dateofcompletion": reporterdoc,
13589
+ // "entityid": entityId,
13590
+ // "locationid": locationId,
13591
+ // "event": null,
13592
+ // "docs": JSON.stringify(docs),
13593
+ // "username": this.userName,
13594
+ // "reportformatvalues": reportformatvalues,
13595
+ // "reportformatschema": reportformatschema,
13596
+ // "userid": this.userProfileId,
13597
+ // "userrole": this.myRole,
13598
+ // "year": this.calendarStartYYYY,
13599
+ // "module": event.isnotice != null ? "notices" : "events"
13600
+ // })
13578
13601
  // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
13579
13602
  if(parseInt(makercheckersL) > 0) {
13580
13603
  bulkBodyReview.push({
13581
13604
  "mmddyyyy": mmddyyyy,
13582
13605
  "projectid": this.projectId,
13583
- "type": "review",
13606
+ "type": "report",
13584
13607
  "eventid": eventId,
13585
- "comments": "Auto approved",
13586
- "approved": true,
13608
+ "comments": reportercomments,
13609
+ "dateofcompletion": reporterdoc,
13587
13610
  "entityid": entityId,
13588
13611
  "locationid": locationId,
13612
+ "event": null,
13613
+ "docs": JSON.stringify(docs),
13614
+ "approved": true,
13589
13615
  "username": this.userName,
13616
+ "reportformatvalues": reportformatvalues,
13617
+ "reportformatschema": reportformatschema,
13590
13618
  "userid": this.userProfileId,
13591
13619
  "userrole": this.myRole,
13592
13620
  "year": this.calendarStartYYYY,
@@ -13594,6 +13622,26 @@ export class SfIEvents extends LitElement {
13594
13622
  } )
13595
13623
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
13596
13624
 
13625
+ }else{
13626
+ bulkBody.push({
13627
+ "mmddyyyy": mmddyyyy,
13628
+ "projectid": this.projectId,
13629
+ "type": "report",
13630
+ "eventid": eventId,
13631
+ "comments": reportercomments,
13632
+ "dateofcompletion": reporterdoc,
13633
+ "entityid": entityId,
13634
+ "locationid": locationId,
13635
+ "event": null,
13636
+ "docs": JSON.stringify(docs),
13637
+ "username": this.userName,
13638
+ "reportformatvalues": reportformatvalues,
13639
+ "reportformatschema": reportformatschema,
13640
+ "userid": this.userProfileId,
13641
+ "userrole": this.myRole,
13642
+ "year": this.calendarStartYYYY,
13643
+ "module": event.isnotice != null ? "notices" : "events"
13644
+ })
13597
13645
  }
13598
13646
 
13599
13647
  // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
@@ -13602,10 +13650,12 @@ export class SfIEvents extends LitElement {
13602
13650
 
13603
13651
  }
13604
13652
 
13605
- await this.uploadReportsBulk(bulkBody);
13653
+ if(bulkBody.length > 0){
13654
+ await this.uploadReportsBulk(bulkBody);
13655
+ }
13606
13656
  // await this.fetchBulkReportingData();
13607
13657
  if(bulkBodyReview.length > 0){
13608
- await this.uploadReviewsBulk(bulkBodyReview)
13658
+ await this.uploadReportsReviewsBulk(bulkBodyReview)
13609
13659
  }
13610
13660
  for(var k = 0; k < this.selectedItemIds.length; k++) {
13611
13661
 
@@ -21669,6 +21719,23 @@ export class SfIEvents extends LitElement {
21669
21719
  this.setError(jsonRespose.error);
21670
21720
  }
21671
21721
  }
21722
+ uploadReportsReviewsBulk = async (bulkBody: any) => {
21723
+ let url = "https://"+this.apiId+"/uploadreportsreviewsbulk1";
21724
+
21725
+ const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
21726
+ const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
21727
+ this._SfLoader.innerHTML = '';
21728
+ if(xhr.status == 200) {
21729
+ this.setSuccess("Bulk upload initiated. Processing will occur in the background, and you'll receive an email notification once it's complete.");
21730
+ setTimeout(() => {
21731
+ this.clearMessages()
21732
+ }, 10000);
21733
+
21734
+ } else {
21735
+ const jsonRespose = JSON.parse(xhr.responseText);
21736
+ this.setError(jsonRespose.error);
21737
+ }
21738
+ }
21672
21739
  uploadReviewsBulk = async (bulkBody: any) => {
21673
21740
  let url = "https://"+this.apiId+"/uploadreviewsbulk1";
21674
21741