sf-i-events 1.0.842 → 1.0.844

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.842",
4
+ "version": "1.0.844",
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
@@ -3705,6 +3705,13 @@ let SfIEvents = class SfIEvents extends LitElement {
3705
3705
  this.clearMessages();
3706
3706
  }, 3000);
3707
3707
  }
3708
+ else if (parseInt(reporterdoc) > new Date().getTime()) {
3709
+ buttonClick.innerHTML = "Save";
3710
+ this.setError('Date of completion cannot be in future!');
3711
+ setTimeout(() => {
3712
+ this.clearMessages();
3713
+ }, 3000);
3714
+ }
3708
3715
  else {
3709
3716
  //console.log('makerscheckers 1', reportercomments);
3710
3717
  if (reportercomments.trim().length === 0) {
@@ -9440,6 +9447,13 @@ let SfIEvents = class SfIEvents extends LitElement {
9440
9447
  this.clearMessages();
9441
9448
  }, 3000);
9442
9449
  }
9450
+ else if (parseInt(reporterdoc) > new Date().getTime()) {
9451
+ buttonClick.innerHTML = "Save";
9452
+ this.setError('Date of completion cannot be in future!');
9453
+ setTimeout(() => {
9454
+ this.clearMessages();
9455
+ }, 3000);
9456
+ }
9443
9457
  else {
9444
9458
  //console.log('makerscheckers 1', reportercomments);
9445
9459
  if (reportercomments.trim().length === 0) {
@@ -9689,7 +9703,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9689
9703
  };
9690
9704
  this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null) => {
9691
9705
  console.log('listEvent', listEvent, listEvent.id);
9692
- let url = "https://" + this.apiId + "/getalleventdetails1";
9706
+ let url = "https://" + this.apiId + "/getalleventdetails";
9693
9707
  //console.log('fetch calendar url', url);
9694
9708
  let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "eventid": listEvent.id, "entityid": listEvent.entityid, "locationid": listEvent.locationid, "mmddyyyy": mmddyyyy, "year": this.calendarStartYYYY };
9695
9709
  //console.log('urlbody', urlBody);
@@ -10562,6 +10576,13 @@ let SfIEvents = class SfIEvents extends LitElement {
10562
10576
  this.clearMessages();
10563
10577
  }, 3000);
10564
10578
  }
10579
+ else if (parseInt(reporterdoc) > new Date().getTime()) {
10580
+ buttonClick.innerHTML = "Save";
10581
+ this.setError('Date of completion cannot be in future!');
10582
+ setTimeout(() => {
10583
+ this.clearMessages();
10584
+ }, 3000);
10585
+ }
10565
10586
  else {
10566
10587
  //console.log('makerscheckers 1', reportercomments);
10567
10588
  if (reportercomments.trim().length === 0) {
@@ -17046,7 +17067,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17046
17067
  }
17047
17068
  };
17048
17069
  this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "events") => {
17049
- let url = "https://" + this.apiId + "/uploadaudit1";
17070
+ let url = "https://" + this.apiId + "/uploadaudit";
17050
17071
  const body = {
17051
17072
  "mmddyyyy": mmddyyyy,
17052
17073
  "projectid": this.projectId,
@@ -17091,7 +17112,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17091
17112
  return retValue;
17092
17113
  };
17093
17114
  this.uploadAuditsBulk = async (bulkBody) => {
17094
- let url = "https://" + this.apiId + "/uploadauditsbulk2";
17115
+ let url = "https://" + this.apiId + "/uploadauditsbulk";
17095
17116
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17096
17117
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
17097
17118
  this._SfLoader.innerHTML = '';
@@ -17111,7 +17132,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17111
17132
  }
17112
17133
  };
17113
17134
  this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "events") => {
17114
- let url = "https://" + this.apiId + "/uploadreview1";
17135
+ let url = "https://" + this.apiId + "/uploadreview";
17115
17136
  const body = {
17116
17137
  "mmddyyyy": mmddyyyy,
17117
17138
  "projectid": this.projectId,
@@ -17183,7 +17204,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17183
17204
  }
17184
17205
  };
17185
17206
  this.uploadReviewsBulk = async (bulkBody) => {
17186
- let url = "https://" + this.apiId + "/uploadreviewsbulk2";
17207
+ let url = "https://" + this.apiId + "/uploadreviewsbulk";
17187
17208
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17188
17209
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
17189
17210
  this._SfLoader.innerHTML = '';
@@ -17206,7 +17227,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17206
17227
  }
17207
17228
  };
17208
17229
  this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100", makercheckers) => {
17209
- let url = "https://" + this.apiId + "/uploadreport3";
17230
+ let url = "https://" + this.apiId + "/uploadreport";
17210
17231
  let body = {
17211
17232
  "mmddyyyy": mmddyyyy,
17212
17233
  "projectid": this.projectId,
@@ -17264,7 +17285,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17264
17285
  return retValue;
17265
17286
  };
17266
17287
  this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
17267
- let url = "https://" + this.apiId + "/uploadreportsbulk4";
17288
+ let url = "https://" + this.apiId + "/uploadreportsbulk";
17268
17289
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17269
17290
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
17270
17291
  if (showSuccess) {
@@ -17566,7 +17587,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17566
17587
  }
17567
17588
  };
17568
17589
  this.fetchDeleteReview = async (eventId, mmddyyyy, entityId, locationId) => {
17569
- let url = "https://" + this.apiId + "/deletereview1";
17590
+ let url = "https://" + this.apiId + "/deletereview";
17570
17591
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17571
17592
  const xhr = (await this.prepareXhr({ "projectid": this.projectId, "entityid": entityId, "locationid": locationId, "mmddyyyy": mmddyyyy, "eventid": eventId, }, url, this._SfLoader, authorization));
17572
17593
  this._SfLoader.innerHTML = '';
@@ -18427,7 +18448,7 @@ let SfIEvents = class SfIEvents extends LitElement {
18427
18448
  else {
18428
18449
  view = "entity";
18429
18450
  }
18430
- path = "getallcountryevents2";
18451
+ path = "getallcountryevents";
18431
18452
  let sDate = "";
18432
18453
  let eDate = "";
18433
18454
  //console.log('currenttab', this.getCurrentTab());
@@ -18591,7 +18612,7 @@ let SfIEvents = class SfIEvents extends LitElement {
18591
18612
  let path = "";
18592
18613
  this.sdate = startDate;
18593
18614
  this.edate = endDate;
18594
- path = "getstatistics1";
18615
+ path = "getstatistics";
18595
18616
  let sDate = "";
18596
18617
  let eDate = "";
18597
18618
  //console.log('currenttab', this.getCurrentTab());
@@ -18803,7 +18824,7 @@ let SfIEvents = class SfIEvents extends LitElement {
18803
18824
  }
18804
18825
  };
18805
18826
  this.fetchAdhoc = async () => {
18806
- let path = "getallmyevents1", view = "";
18827
+ let path = "getallmyevents", view = "";
18807
18828
  if (this.tagId != null && this.tagId != "") {
18808
18829
  view = "tag";
18809
18830
  }
@@ -19137,7 +19158,7 @@ let SfIEvents = class SfIEvents extends LitElement {
19137
19158
  this.fetchNext = async (page, role, status) => {
19138
19159
  //this.apiBodyList = '{"id": "' +(this._SfProject[0].querySelector('#sf-i-project') as SfIForm).selectedValues()[0]+ '"}'
19139
19160
  this.nextPage = page;
19140
- let url = "https://" + this.apiId + "/getnextuserevents1";
19161
+ let url = "https://" + this.apiId + "/getnextuserevents";
19141
19162
  let statusArr = [];
19142
19163
  if (status == this.TAB_ALL) {
19143
19164
  statusArr = [this.STATUS_NOT_STARTED, this.STATUS_PENDING_APPROVAL, this.STATUS_REJECTED, this.STATUS_APPROVED];
@@ -19709,7 +19730,7 @@ let SfIEvents = class SfIEvents extends LitElement {
19709
19730
  day = '0' + day;
19710
19731
  let eDate = month + "/" + day + "/" + year;
19711
19732
  let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY };
19712
- let url = "https://" + this.apiId + "/getallcountryevents2";
19733
+ let url = "https://" + this.apiId + "/getallcountryevents";
19713
19734
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
19714
19735
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
19715
19736
  this._SfLoader.innerHTML = '';
@@ -19794,7 +19815,7 @@ let SfIEvents = class SfIEvents extends LitElement {
19794
19815
  console.log('fetching compliances', sortid);
19795
19816
  let complianceEntityId = sortid.split(';')[1];
19796
19817
  let complianceLocationId = sortid.split(';')[2];
19797
- let url = "https://" + this.apiId + "/getallcountryevents2";
19818
+ let url = "https://" + this.apiId + "/getallcountryevents";
19798
19819
  let sDateObj = selectedDate;
19799
19820
  sDateObj.setDate(selectedDate.getDate() - 60);
19800
19821
  let day = '' + sDateObj.getDate();
@@ -6075,6 +6075,13 @@ export class SfIEvents extends LitElement {
6075
6075
  this.clearMessages();
6076
6076
  }, 3000);
6077
6077
 
6078
+ } else if(parseInt(reporterdoc) > new Date().getTime()) {
6079
+ buttonClick.innerHTML = "Save"
6080
+ this.setError('Date of completion cannot be in future!');
6081
+ setTimeout(() => {
6082
+ this.clearMessages();
6083
+ }, 3000);
6084
+
6078
6085
  } else {
6079
6086
 
6080
6087
  //console.log('makerscheckers 1', reportercomments);
@@ -13014,6 +13021,13 @@ export class SfIEvents extends LitElement {
13014
13021
  this.clearMessages();
13015
13022
  }, 3000);
13016
13023
 
13024
+ } else if(parseInt(reporterdoc) > new Date().getTime()) {
13025
+ buttonClick.innerHTML = "Save"
13026
+ this.setError('Date of completion cannot be in future!');
13027
+ setTimeout(() => {
13028
+ this.clearMessages();
13029
+ }, 3000);
13030
+
13017
13031
  } else {
13018
13032
 
13019
13033
  //console.log('makerscheckers 1', reportercomments);
@@ -13300,7 +13314,7 @@ export class SfIEvents extends LitElement {
13300
13314
 
13301
13315
  fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null) => {
13302
13316
  console.log('listEvent', listEvent, listEvent.id)
13303
- let url = "https://"+this.apiId+"/getalleventdetails1";
13317
+ let url = "https://"+this.apiId+"/getalleventdetails";
13304
13318
 
13305
13319
  //console.log('fetch calendar url', url);
13306
13320
  let urlBody :any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "eventid": listEvent.id, "entityid": listEvent.entityid, "locationid": listEvent.locationid, "mmddyyyy": mmddyyyy, "year": this.calendarStartYYYY};
@@ -14339,6 +14353,13 @@ export class SfIEvents extends LitElement {
14339
14353
  this.clearMessages();
14340
14354
  }, 3000);
14341
14355
 
14356
+ } else if(parseInt(reporterdoc) > new Date().getTime()) {
14357
+ buttonClick.innerHTML = "Save"
14358
+ this.setError('Date of completion cannot be in future!');
14359
+ setTimeout(() => {
14360
+ this.clearMessages();
14361
+ }, 3000);
14362
+
14342
14363
  } else {
14343
14364
 
14344
14365
  //console.log('makerscheckers 1', reportercomments);
@@ -22545,7 +22566,7 @@ export class SfIEvents extends LitElement {
22545
22566
  }
22546
22567
 
22547
22568
  uploadAudit = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "events") => {
22548
- let url = "https://"+this.apiId+"/uploadaudit1";
22569
+ let url = "https://"+this.apiId+"/uploadaudit";
22549
22570
 
22550
22571
  const body = {
22551
22572
  "mmddyyyy": mmddyyyy,
@@ -22592,7 +22613,7 @@ export class SfIEvents extends LitElement {
22592
22613
  return retValue;
22593
22614
  }
22594
22615
  uploadAuditsBulk = async (bulkBody: any) => {
22595
- let url = "https://"+this.apiId+"/uploadauditsbulk2";
22616
+ let url = "https://"+this.apiId+"/uploadauditsbulk";
22596
22617
 
22597
22618
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22598
22619
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
@@ -22615,7 +22636,7 @@ export class SfIEvents extends LitElement {
22615
22636
  }
22616
22637
 
22617
22638
  uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "events") => {
22618
- let url = "https://"+this.apiId+"/uploadreview1";
22639
+ let url = "https://"+this.apiId+"/uploadreview";
22619
22640
 
22620
22641
  const body = {
22621
22642
  "mmddyyyy": mmddyyyy,
@@ -22690,7 +22711,7 @@ export class SfIEvents extends LitElement {
22690
22711
  }
22691
22712
  }
22692
22713
  uploadReviewsBulk = async (bulkBody: any) => {
22693
- let url = "https://"+this.apiId+"/uploadreviewsbulk2";
22714
+ let url = "https://"+this.apiId+"/uploadreviewsbulk";
22694
22715
 
22695
22716
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22696
22717
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
@@ -22715,7 +22736,7 @@ export class SfIEvents extends LitElement {
22715
22736
  }
22716
22737
 
22717
22738
  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) => {
22718
- let url = "https://"+this.apiId+"/uploadreport3";
22739
+ let url = "https://"+this.apiId+"/uploadreport";
22719
22740
 
22720
22741
  let body = {
22721
22742
  "mmddyyyy": mmddyyyy,
@@ -22777,7 +22798,7 @@ export class SfIEvents extends LitElement {
22777
22798
  }
22778
22799
 
22779
22800
  uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
22780
- let url = "https://"+this.apiId+"/uploadreportsbulk4"
22801
+ let url = "https://"+this.apiId+"/uploadreportsbulk"
22781
22802
 
22782
22803
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22783
22804
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
@@ -23173,7 +23194,7 @@ export class SfIEvents extends LitElement {
23173
23194
 
23174
23195
  fetchDeleteReview = async (eventId: string, mmddyyyy: string, entityId: string, locationId: string) => {
23175
23196
 
23176
- let url = "https://"+this.apiId+"/deletereview1";
23197
+ let url = "https://"+this.apiId+"/deletereview";
23177
23198
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
23178
23199
  const xhr : any = (await this.prepareXhr({"projectid": this.projectId, "entityid": entityId, "locationid": locationId, "mmddyyyy": mmddyyyy, "eventid": eventId, }, url, this._SfLoader, authorization)) as any;
23179
23200
  this._SfLoader.innerHTML = '';
@@ -24316,7 +24337,7 @@ export class SfIEvents extends LitElement {
24316
24337
  view = "entity";
24317
24338
  }
24318
24339
 
24319
- path = "getallcountryevents2";
24340
+ path = "getallcountryevents";
24320
24341
 
24321
24342
  let sDate = "";
24322
24343
  let eDate = "";
@@ -24527,7 +24548,7 @@ export class SfIEvents extends LitElement {
24527
24548
  this.edate = endDate;
24528
24549
 
24529
24550
 
24530
- path = "getstatistics1";
24551
+ path = "getstatistics";
24531
24552
 
24532
24553
  let sDate = "";
24533
24554
  let eDate = "";
@@ -24766,7 +24787,7 @@ export class SfIEvents extends LitElement {
24766
24787
 
24767
24788
  fetchAdhoc = async () => {
24768
24789
 
24769
- let path = "getallmyevents1", view = "";
24790
+ let path = "getallmyevents", view = "";
24770
24791
 
24771
24792
  if(this.tagId != null && this.tagId != "") {
24772
24793
  view = "tag";
@@ -25175,7 +25196,7 @@ export class SfIEvents extends LitElement {
25175
25196
 
25176
25197
  //this.apiBodyList = '{"id": "' +(this._SfProject[0].querySelector('#sf-i-project') as SfIForm).selectedValues()[0]+ '"}'
25177
25198
  this.nextPage = page;
25178
- let url = "https://"+this.apiId+"/getnextuserevents1";
25199
+ let url = "https://"+this.apiId+"/getnextuserevents";
25179
25200
  let statusArr: string[] = []
25180
25201
  if(status == this.TAB_ALL){
25181
25202
  statusArr = [this.STATUS_NOT_STARTED, this.STATUS_PENDING_APPROVAL, this.STATUS_REJECTED, this.STATUS_APPROVED]
@@ -25848,7 +25869,7 @@ export class SfIEvents extends LitElement {
25848
25869
  day = '0' + day;
25849
25870
  let eDate = month + "/" + day + "/" + year
25850
25871
  let urlBody :any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY};
25851
- let url = "https://"+this.apiId+"/getallcountryevents2";
25872
+ let url = "https://"+this.apiId+"/getallcountryevents";
25852
25873
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
25853
25874
  const xhr : any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
25854
25875
  this._SfLoader.innerHTML = '';
@@ -25941,7 +25962,7 @@ export class SfIEvents extends LitElement {
25941
25962
  console.log('fetching compliances', sortid)
25942
25963
  let complianceEntityId = sortid.split(';')[1]
25943
25964
  let complianceLocationId = sortid.split(';')[2]
25944
- let url = "https://"+this.apiId+"/getallcountryevents2";
25965
+ let url = "https://"+this.apiId+"/getallcountryevents";
25945
25966
  let sDateObj = selectedDate
25946
25967
  sDateObj.setDate(selectedDate.getDate() - 60)
25947
25968
  let day = '' + sDateObj.getDate();