sf-i-events 1.0.824 → 1.0.826
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 +9 -4
- package/package.json +1 -1
- package/sf-i-events.d.ts +3 -3
- package/sf-i-events.js +393 -353
- package/src/sf-i-events.ts +398 -514
package/src/sf-i-events.ts
CHANGED
|
@@ -5775,21 +5775,22 @@ export class SfIEvents extends LitElement {
|
|
|
5775
5775
|
let flagBulk = false;
|
|
5776
5776
|
if(this.selectedItemIds.length == 0){
|
|
5777
5777
|
|
|
5778
|
-
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5778
|
+
if(await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
|
|
5779
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
5780
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
5781
|
+
this.events[mmdd][p].approved = approved
|
|
5782
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
5783
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5784
|
+
if(approved){
|
|
5785
|
+
this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
|
|
5786
|
+
}
|
|
5786
5787
|
}
|
|
5787
5788
|
}
|
|
5789
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5790
|
+
this.recentlyReported[mmdd] = []
|
|
5791
|
+
}
|
|
5792
|
+
this.recentlyReported[mmdd].push(event)
|
|
5788
5793
|
}
|
|
5789
|
-
if(this.recentlyReported[mmdd] == null){
|
|
5790
|
-
this.recentlyReported[mmdd] = []
|
|
5791
|
-
}
|
|
5792
|
-
this.recentlyReported[mmdd].push(event)
|
|
5793
5794
|
}else{
|
|
5794
5795
|
let bulkBodyReview = []
|
|
5795
5796
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5886,21 +5887,22 @@ export class SfIEvents extends LitElement {
|
|
|
5886
5887
|
} else {
|
|
5887
5888
|
let flagBulk = false;
|
|
5888
5889
|
if(this.selectedItemIds.length == 0){
|
|
5889
|
-
await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5890
|
+
if(await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
|
|
5891
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
5892
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
5893
|
+
this.events[mmdd][p].approved = approved
|
|
5894
|
+
this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
5895
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
5896
|
+
if(approved){
|
|
5897
|
+
this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
|
|
5898
|
+
}
|
|
5897
5899
|
}
|
|
5898
5900
|
}
|
|
5901
|
+
if(this.recentlyReported[mmdd] == null){
|
|
5902
|
+
this.recentlyReported[mmdd] = []
|
|
5903
|
+
}
|
|
5904
|
+
this.recentlyReported[mmdd].push(event)
|
|
5899
5905
|
}
|
|
5900
|
-
if(this.recentlyReported[mmdd] == null){
|
|
5901
|
-
this.recentlyReported[mmdd] = []
|
|
5902
|
-
}
|
|
5903
|
-
this.recentlyReported[mmdd].push(event)
|
|
5904
5906
|
}else{
|
|
5905
5907
|
let bulkBodyAudit = []
|
|
5906
5908
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -6071,35 +6073,36 @@ export class SfIEvents extends LitElement {
|
|
|
6071
6073
|
let flagBulk = false;
|
|
6072
6074
|
if(this.selectedItemIds.length == 0){
|
|
6073
6075
|
|
|
6074
|
-
await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)
|
|
6076
|
+
if(await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)){
|
|
6075
6077
|
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
6079
|
-
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6080
|
-
this.events[mmdd][p].documents = docs
|
|
6081
|
-
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
6082
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6083
|
-
}
|
|
6084
|
-
}
|
|
6085
|
-
|
|
6086
|
-
if(event.makercheckers.length > 0) {
|
|
6087
|
-
|
|
6088
|
-
// await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
6078
|
+
console.log('this.events', this.events);
|
|
6079
|
+
if(this.mode != "next"){
|
|
6089
6080
|
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
6090
6081
|
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6091
|
-
this.events[mmdd][p].
|
|
6092
|
-
|
|
6093
|
-
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
6082
|
+
this.events[mmdd][p].documents = docs
|
|
6083
|
+
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
6094
6084
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6095
6085
|
}
|
|
6096
6086
|
}
|
|
6087
|
+
|
|
6088
|
+
if(event.makercheckers.length > 0) {
|
|
6089
|
+
|
|
6090
|
+
// await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
6091
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
6092
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6093
|
+
this.events[mmdd][p].approved = true
|
|
6094
|
+
// this.events[mmdd][p].documents = docs
|
|
6095
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
6096
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6101
|
+
this.recentlyReported[mmdd] = []
|
|
6102
|
+
}
|
|
6103
|
+
this.recentlyReported[mmdd].push(event)
|
|
6104
|
+
console.log('recently reported', this.recentlyReported)
|
|
6097
6105
|
}
|
|
6098
|
-
if(this.recentlyReported[mmdd] == null){
|
|
6099
|
-
this.recentlyReported[mmdd] = []
|
|
6100
|
-
}
|
|
6101
|
-
this.recentlyReported[mmdd].push(event)
|
|
6102
|
-
console.log('recently reported', this.recentlyReported)
|
|
6103
6106
|
}
|
|
6104
6107
|
}else{
|
|
6105
6108
|
let bulkBody = []
|
|
@@ -12443,7 +12446,10 @@ export class SfIEvents extends LitElement {
|
|
|
12443
12446
|
console.log('jsonRespose notice details', jsonRespose);
|
|
12444
12447
|
|
|
12445
12448
|
} else {
|
|
12446
|
-
|
|
12449
|
+
if(xhr.status == 401){
|
|
12450
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
12451
|
+
this.dispatchEvent(changeEvent);
|
|
12452
|
+
}
|
|
12447
12453
|
if(xhr.status === 404) {
|
|
12448
12454
|
|
|
12449
12455
|
this.showChosenProject();
|
|
@@ -12658,19 +12664,20 @@ export class SfIEvents extends LitElement {
|
|
|
12658
12664
|
let flagBulk = false;
|
|
12659
12665
|
if(this.selectedItemIds.length === 0) {
|
|
12660
12666
|
console.log('mmddyyyy', mmddyyyy)
|
|
12661
|
-
await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
+
if(await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")){
|
|
12668
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
12669
|
+
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
12670
|
+
|
|
12671
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
12672
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12673
|
+
}
|
|
12667
12674
|
}
|
|
12675
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12676
|
+
this.recentlyReported[mmdd] = []
|
|
12677
|
+
}
|
|
12678
|
+
this.recentlyReported[mmdd].push(listEvent)
|
|
12679
|
+
console.log('review single')
|
|
12668
12680
|
}
|
|
12669
|
-
if(this.recentlyReported[mmdd] == null){
|
|
12670
|
-
this.recentlyReported[mmdd] = []
|
|
12671
|
-
}
|
|
12672
|
-
this.recentlyReported[mmdd].push(event)
|
|
12673
|
-
console.log('review single')
|
|
12674
12681
|
} else {
|
|
12675
12682
|
let bulkBodyReview = []
|
|
12676
12683
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -12785,18 +12792,19 @@ export class SfIEvents extends LitElement {
|
|
|
12785
12792
|
let flagBulk = false;
|
|
12786
12793
|
if(this.selectedItemIds.length === 0) {
|
|
12787
12794
|
|
|
12788
|
-
await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12795
|
+
if(await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")){
|
|
12796
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
12797
|
+
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
12798
|
+
this.events[mmdd][p].approved = approved
|
|
12799
|
+
this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
12800
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12801
|
+
}
|
|
12794
12802
|
}
|
|
12803
|
+
if(this.recentlyReported[mmdd] == null){
|
|
12804
|
+
this.recentlyReported[mmdd] = []
|
|
12805
|
+
}
|
|
12806
|
+
this.recentlyReported[mmdd].push(listEvent)
|
|
12795
12807
|
}
|
|
12796
|
-
if(this.recentlyReported[mmdd] == null){
|
|
12797
|
-
this.recentlyReported[mmdd] = []
|
|
12798
|
-
}
|
|
12799
|
-
this.recentlyReported[mmdd].push(event)
|
|
12800
12808
|
console.log('uploadaudit single')
|
|
12801
12809
|
} else {
|
|
12802
12810
|
let bulkBodyAudit = []
|
|
@@ -12987,34 +12995,34 @@ export class SfIEvents extends LitElement {
|
|
|
12987
12995
|
let flagBulk = false;
|
|
12988
12996
|
if(this.selectedItemIds.length === 0) {
|
|
12989
12997
|
|
|
12990
|
-
await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)
|
|
12991
|
-
|
|
12992
|
-
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
12993
|
-
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
12994
|
-
this.events[mmdd][p].documents = docs
|
|
12995
|
-
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
12996
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
12997
|
-
}
|
|
12998
|
-
}
|
|
12999
|
-
console.log('uploadReport single')
|
|
13000
|
-
if(makercheckers.length > 0) {
|
|
13001
|
-
|
|
13002
|
-
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
12998
|
+
if(await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)){
|
|
12999
|
+
console.log('this.events', this.events);
|
|
13003
13000
|
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
13004
13001
|
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
13005
|
-
this.events[mmdd][p].
|
|
13006
|
-
|
|
13007
|
-
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
13002
|
+
this.events[mmdd][p].documents = docs
|
|
13003
|
+
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
13008
13004
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13009
13005
|
}
|
|
13010
13006
|
}
|
|
13011
|
-
console.log('
|
|
13012
|
-
|
|
13013
|
-
if(this.recentlyReported[mmdd] == null){
|
|
13014
|
-
this.recentlyReported[mmdd] = []
|
|
13015
|
-
}
|
|
13016
|
-
this.recentlyReported[mmdd].push(event)
|
|
13007
|
+
console.log('uploadReport single')
|
|
13008
|
+
if(makercheckers.length > 0) {
|
|
13017
13009
|
|
|
13010
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
13011
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
13012
|
+
if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
13013
|
+
this.events[mmdd][p].approved = true
|
|
13014
|
+
// this.events[mmdd][p].documents = docs
|
|
13015
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
13016
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13017
|
+
}
|
|
13018
|
+
}
|
|
13019
|
+
console.log('upload report auto approve single')
|
|
13020
|
+
}
|
|
13021
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13022
|
+
this.recentlyReported[mmdd] = []
|
|
13023
|
+
}
|
|
13024
|
+
this.recentlyReported[mmdd].push(listEvent)
|
|
13025
|
+
}
|
|
13018
13026
|
} else {
|
|
13019
13027
|
let bulkBody = []
|
|
13020
13028
|
let bulkBodyReview = []
|
|
@@ -13280,7 +13288,10 @@ export class SfIEvents extends LitElement {
|
|
|
13280
13288
|
}
|
|
13281
13289
|
|
|
13282
13290
|
} else {
|
|
13283
|
-
|
|
13291
|
+
if(xhr.status == 401){
|
|
13292
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
13293
|
+
this.dispatchEvent(changeEvent);
|
|
13294
|
+
}
|
|
13284
13295
|
if(xhr.status === 404) {
|
|
13285
13296
|
|
|
13286
13297
|
this.showChosenProject();
|
|
@@ -13953,18 +13964,19 @@ export class SfIEvents extends LitElement {
|
|
|
13953
13964
|
let flagBulk = false;
|
|
13954
13965
|
if(this.selectedItemIds.length === 0) {
|
|
13955
13966
|
// console.log('mmddyyyy', mmddyyyy)
|
|
13956
|
-
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
|
|
13957
|
-
|
|
13958
|
-
|
|
13959
|
-
|
|
13960
|
-
|
|
13961
|
-
|
|
13967
|
+
if(await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
|
|
13968
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
13969
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
13970
|
+
|
|
13971
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
13972
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13973
|
+
}
|
|
13962
13974
|
}
|
|
13975
|
+
if(this.recentlyReported[mmdd] == null){
|
|
13976
|
+
this.recentlyReported[mmdd] = []
|
|
13977
|
+
}
|
|
13978
|
+
this.recentlyReported[mmdd].push(event)
|
|
13963
13979
|
}
|
|
13964
|
-
if(this.recentlyReported[mmdd] == null){
|
|
13965
|
-
this.recentlyReported[mmdd] = []
|
|
13966
|
-
}
|
|
13967
|
-
this.recentlyReported[mmdd].push(event)
|
|
13968
13980
|
} else {
|
|
13969
13981
|
let bulkBodyReview = []
|
|
13970
13982
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -14057,7 +14069,7 @@ export class SfIEvents extends LitElement {
|
|
|
14057
14069
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-audit')?.addEventListener('click', async (ev: any) => {
|
|
14058
14070
|
let buttonClick = ev.target as HTMLButtonElement
|
|
14059
14071
|
buttonClick.innerHTML = "Saving..."
|
|
14060
|
-
const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
|
|
14072
|
+
const comments: string = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
|
|
14061
14073
|
const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
|
|
14062
14074
|
if(approved == event.approved){
|
|
14063
14075
|
buttonClick.innerHTML = "Save"
|
|
@@ -14078,18 +14090,19 @@ export class SfIEvents extends LitElement {
|
|
|
14078
14090
|
let flagBulk = false;
|
|
14079
14091
|
if(this.selectedItemIds.length === 0) {
|
|
14080
14092
|
|
|
14081
|
-
await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
|
|
14082
|
-
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
|
|
14086
|
-
|
|
14093
|
+
if(await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
|
|
14094
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
14095
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
14096
|
+
this.events[mmdd][p].approved = approved
|
|
14097
|
+
this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
|
|
14098
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14099
|
+
}
|
|
14087
14100
|
}
|
|
14101
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14102
|
+
this.recentlyReported[mmdd] = []
|
|
14103
|
+
}
|
|
14104
|
+
this.recentlyReported[mmdd].push(event)
|
|
14088
14105
|
}
|
|
14089
|
-
if(this.recentlyReported[mmdd] == null){
|
|
14090
|
-
this.recentlyReported[mmdd] = []
|
|
14091
|
-
}
|
|
14092
|
-
this.recentlyReported[mmdd].push(event)
|
|
14093
14106
|
} else {
|
|
14094
14107
|
let bulkBodyAudit = []
|
|
14095
14108
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -14280,32 +14293,32 @@ export class SfIEvents extends LitElement {
|
|
|
14280
14293
|
//console.log('makerscheckers', makercheckers, reportercomments);
|
|
14281
14294
|
// console.log('reportformatvalues', reportformatvalues)
|
|
14282
14295
|
// console.log('reportformatschema',reportformatschema)
|
|
14283
|
-
await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)
|
|
14284
|
-
|
|
14285
|
-
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
14286
|
-
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
14287
|
-
this.events[mmdd][p].documents = docs
|
|
14288
|
-
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
14289
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14290
|
-
}
|
|
14291
|
-
}
|
|
14292
|
-
if(makercheckers.length > 0) {
|
|
14293
|
-
|
|
14294
|
-
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
14296
|
+
if(await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)){
|
|
14297
|
+
console.log('this.events', this.events);
|
|
14295
14298
|
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
14296
14299
|
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
14297
|
-
this.events[mmdd][p].
|
|
14298
|
-
|
|
14299
|
-
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
14300
|
+
this.events[mmdd][p].documents = docs
|
|
14301
|
+
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
14300
14302
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14301
14303
|
}
|
|
14302
14304
|
}
|
|
14303
|
-
|
|
14304
|
-
if(this.recentlyReported[mmdd] == null){
|
|
14305
|
-
this.recentlyReported[mmdd] = []
|
|
14306
|
-
}
|
|
14307
|
-
this.recentlyReported[mmdd].push(event)
|
|
14305
|
+
if(makercheckers.length > 0) {
|
|
14308
14306
|
|
|
14307
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
14308
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
14309
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
|
|
14310
|
+
this.events[mmdd][p].approved = true
|
|
14311
|
+
// this.events[mmdd][p].documents = docs
|
|
14312
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
14313
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14314
|
+
}
|
|
14315
|
+
}
|
|
14316
|
+
}
|
|
14317
|
+
if(this.recentlyReported[mmdd] == null){
|
|
14318
|
+
this.recentlyReported[mmdd] = []
|
|
14319
|
+
}
|
|
14320
|
+
this.recentlyReported[mmdd].push(event)
|
|
14321
|
+
}
|
|
14309
14322
|
} else {
|
|
14310
14323
|
let bulkBody = []
|
|
14311
14324
|
let bulkBodyReview = []
|
|
@@ -22215,6 +22228,10 @@ export class SfIEvents extends LitElement {
|
|
|
22215
22228
|
this._SfLoader.innerHTML = '';
|
|
22216
22229
|
|
|
22217
22230
|
} else {
|
|
22231
|
+
if(xhr.status == 401){
|
|
22232
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22233
|
+
this.dispatchEvent(changeEvent);
|
|
22234
|
+
}
|
|
22218
22235
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22219
22236
|
this.setError(jsonRespose.error);
|
|
22220
22237
|
setTimeout(() => {
|
|
@@ -22260,6 +22277,10 @@ export class SfIEvents extends LitElement {
|
|
|
22260
22277
|
this._SfLoader.innerHTML = '';
|
|
22261
22278
|
|
|
22262
22279
|
} else {
|
|
22280
|
+
if(xhr.status == 401){
|
|
22281
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22282
|
+
this.dispatchEvent(changeEvent);
|
|
22283
|
+
}
|
|
22263
22284
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22264
22285
|
this.setError(jsonRespose.error);
|
|
22265
22286
|
setTimeout(() => {
|
|
@@ -22318,6 +22339,10 @@ export class SfIEvents extends LitElement {
|
|
|
22318
22339
|
this._SfLoader.innerHTML = '';
|
|
22319
22340
|
|
|
22320
22341
|
} else {
|
|
22342
|
+
if(xhr.status == 401){
|
|
22343
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22344
|
+
this.dispatchEvent(changeEvent);
|
|
22345
|
+
}
|
|
22321
22346
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22322
22347
|
this.setError(jsonRespose.error);
|
|
22323
22348
|
setTimeout(() => {
|
|
@@ -22348,6 +22373,10 @@ export class SfIEvents extends LitElement {
|
|
|
22348
22373
|
}, 3000);
|
|
22349
22374
|
|
|
22350
22375
|
} else {
|
|
22376
|
+
if(xhr.status == 401){
|
|
22377
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22378
|
+
this.dispatchEvent(changeEvent);
|
|
22379
|
+
}
|
|
22351
22380
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22352
22381
|
this.setError(jsonRespose.error);
|
|
22353
22382
|
setTimeout(() => {
|
|
@@ -22389,6 +22418,10 @@ export class SfIEvents extends LitElement {
|
|
|
22389
22418
|
}, 5000);
|
|
22390
22419
|
|
|
22391
22420
|
} else {
|
|
22421
|
+
if(xhr.status == 401){
|
|
22422
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22423
|
+
this.dispatchEvent(changeEvent);
|
|
22424
|
+
}
|
|
22392
22425
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22393
22426
|
this.setError(jsonRespose.error);
|
|
22394
22427
|
setTimeout(() => {
|
|
@@ -22422,6 +22455,10 @@ export class SfIEvents extends LitElement {
|
|
|
22422
22455
|
}, 3000);
|
|
22423
22456
|
|
|
22424
22457
|
} else {
|
|
22458
|
+
if(xhr.status == 401){
|
|
22459
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22460
|
+
this.dispatchEvent(changeEvent);
|
|
22461
|
+
}
|
|
22425
22462
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22426
22463
|
this.setError(jsonRespose.error);
|
|
22427
22464
|
setTimeout(() => {
|
|
@@ -22447,6 +22484,7 @@ export class SfIEvents extends LitElement {
|
|
|
22447
22484
|
"username": this.userName,
|
|
22448
22485
|
"module" : module
|
|
22449
22486
|
}
|
|
22487
|
+
let retValue = true;
|
|
22450
22488
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22451
22489
|
const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
|
|
22452
22490
|
this._SfLoader.innerHTML = '';
|
|
@@ -22467,9 +22505,15 @@ export class SfIEvents extends LitElement {
|
|
|
22467
22505
|
}, 2000);
|
|
22468
22506
|
|
|
22469
22507
|
} else {
|
|
22508
|
+
if(xhr.status == 401){
|
|
22509
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22510
|
+
this.dispatchEvent(changeEvent);
|
|
22511
|
+
}
|
|
22470
22512
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22471
22513
|
this.setError(jsonRespose.error);
|
|
22514
|
+
retValue = false;
|
|
22472
22515
|
}
|
|
22516
|
+
return retValue;
|
|
22473
22517
|
}
|
|
22474
22518
|
uploadAuditsBulk = async (bulkBody: any) => {
|
|
22475
22519
|
let url = "https://"+this.apiId+"/uploadauditsbulk";
|
|
@@ -22485,6 +22529,10 @@ export class SfIEvents extends LitElement {
|
|
|
22485
22529
|
}, 10000);
|
|
22486
22530
|
|
|
22487
22531
|
} else {
|
|
22532
|
+
if(xhr.status == 401){
|
|
22533
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22534
|
+
this.dispatchEvent(changeEvent);
|
|
22535
|
+
}
|
|
22488
22536
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22489
22537
|
this.setError(jsonRespose.error);
|
|
22490
22538
|
}
|
|
@@ -22506,7 +22554,7 @@ export class SfIEvents extends LitElement {
|
|
|
22506
22554
|
"username": this.userName,
|
|
22507
22555
|
"module" : module
|
|
22508
22556
|
}
|
|
22509
|
-
|
|
22557
|
+
let retValue = true;
|
|
22510
22558
|
//console.log('uploading review', body);
|
|
22511
22559
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22512
22560
|
const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
|
|
@@ -22528,12 +22576,18 @@ export class SfIEvents extends LitElement {
|
|
|
22528
22576
|
}, 2000);
|
|
22529
22577
|
|
|
22530
22578
|
} else {
|
|
22579
|
+
if(xhr.status == 401){
|
|
22580
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22581
|
+
this.dispatchEvent(changeEvent);
|
|
22582
|
+
}
|
|
22531
22583
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22532
|
-
this.setError(jsonRespose.
|
|
22584
|
+
this.setError(jsonRespose.error);
|
|
22533
22585
|
setTimeout(() => {
|
|
22534
22586
|
this.clearMessages();
|
|
22535
22587
|
}, 3000);
|
|
22588
|
+
retValue = false;
|
|
22536
22589
|
}
|
|
22590
|
+
return retValue;
|
|
22537
22591
|
}
|
|
22538
22592
|
uploadReportsReviewsBulk = async (bulkBody: any) => {
|
|
22539
22593
|
let url = "https://"+this.apiId+"/uploadreportsreviewsbulk";
|
|
@@ -22548,8 +22602,12 @@ export class SfIEvents extends LitElement {
|
|
|
22548
22602
|
}, 10000);
|
|
22549
22603
|
|
|
22550
22604
|
} else {
|
|
22605
|
+
if(xhr.status == 401){
|
|
22606
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22607
|
+
this.dispatchEvent(changeEvent);
|
|
22608
|
+
}
|
|
22551
22609
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22552
|
-
this.setError(jsonRespose.
|
|
22610
|
+
this.setError(jsonRespose.error);
|
|
22553
22611
|
setTimeout(() => {
|
|
22554
22612
|
this.clearMessages();
|
|
22555
22613
|
}, 3000);
|
|
@@ -22568,8 +22626,12 @@ export class SfIEvents extends LitElement {
|
|
|
22568
22626
|
}, 10000);
|
|
22569
22627
|
|
|
22570
22628
|
} else {
|
|
22629
|
+
if(xhr.status == 401){
|
|
22630
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22631
|
+
this.dispatchEvent(changeEvent);
|
|
22632
|
+
}
|
|
22571
22633
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22572
|
-
this.setError(jsonRespose.
|
|
22634
|
+
this.setError(jsonRespose.error);
|
|
22573
22635
|
setTimeout(() => {
|
|
22574
22636
|
this.clearMessages();
|
|
22575
22637
|
}, 3000);
|
|
@@ -22577,7 +22639,7 @@ export class SfIEvents extends LitElement {
|
|
|
22577
22639
|
}
|
|
22578
22640
|
|
|
22579
22641
|
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) => {
|
|
22580
|
-
let url = "https://"+this.apiId+"/
|
|
22642
|
+
let url = "https://"+this.apiId+"/uploadreport2";
|
|
22581
22643
|
|
|
22582
22644
|
let body = {
|
|
22583
22645
|
"mmddyyyy": mmddyyyy,
|
|
@@ -22602,7 +22664,7 @@ export class SfIEvents extends LitElement {
|
|
|
22602
22664
|
}
|
|
22603
22665
|
|
|
22604
22666
|
//console.log(body);
|
|
22605
|
-
|
|
22667
|
+
let retValue = true;
|
|
22606
22668
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22607
22669
|
const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
|
|
22608
22670
|
this._SfLoader.innerHTML = '';
|
|
@@ -22623,16 +22685,23 @@ export class SfIEvents extends LitElement {
|
|
|
22623
22685
|
}, 2000);
|
|
22624
22686
|
|
|
22625
22687
|
} else {
|
|
22688
|
+
if(xhr.status == 401){
|
|
22689
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22690
|
+
this.dispatchEvent(changeEvent);
|
|
22691
|
+
}
|
|
22626
22692
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22627
|
-
|
|
22693
|
+
console.log()
|
|
22694
|
+
this.setError(jsonRespose.error);
|
|
22628
22695
|
setTimeout(() => {
|
|
22629
22696
|
this.clearMessages();
|
|
22630
22697
|
}, 3000);
|
|
22698
|
+
retValue = false;
|
|
22631
22699
|
}
|
|
22700
|
+
return retValue;
|
|
22632
22701
|
}
|
|
22633
22702
|
|
|
22634
22703
|
uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
|
|
22635
|
-
let url = "https://"+this.apiId+"/
|
|
22704
|
+
let url = "https://"+this.apiId+"/uploadreportsbulk2"
|
|
22636
22705
|
|
|
22637
22706
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22638
22707
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
@@ -22648,8 +22717,12 @@ export class SfIEvents extends LitElement {
|
|
|
22648
22717
|
}
|
|
22649
22718
|
|
|
22650
22719
|
} else {
|
|
22720
|
+
if(xhr.status == 401){
|
|
22721
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22722
|
+
this.dispatchEvent(changeEvent);
|
|
22723
|
+
}
|
|
22651
22724
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22652
|
-
this.setError(jsonRespose.
|
|
22725
|
+
this.setError(jsonRespose.error);
|
|
22653
22726
|
setTimeout(() => {
|
|
22654
22727
|
this.clearMessages();
|
|
22655
22728
|
}, 3000);
|
|
@@ -22687,6 +22760,10 @@ export class SfIEvents extends LitElement {
|
|
|
22687
22760
|
}, 2000);
|
|
22688
22761
|
|
|
22689
22762
|
} else {
|
|
22763
|
+
if(xhr.status == 401){
|
|
22764
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22765
|
+
this.dispatchEvent(changeEvent);
|
|
22766
|
+
}
|
|
22690
22767
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22691
22768
|
this.setError(jsonRespose.error);
|
|
22692
22769
|
}
|
|
@@ -22711,6 +22788,10 @@ export class SfIEvents extends LitElement {
|
|
|
22711
22788
|
this.renderMappingTabs(this.TAB_REPORTER);
|
|
22712
22789
|
|
|
22713
22790
|
} else {
|
|
22791
|
+
if(xhr.status == 401){
|
|
22792
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22793
|
+
this.dispatchEvent(changeEvent);
|
|
22794
|
+
}
|
|
22714
22795
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22715
22796
|
this.setError(jsonRespose.error);
|
|
22716
22797
|
}
|
|
@@ -22730,6 +22811,10 @@ export class SfIEvents extends LitElement {
|
|
|
22730
22811
|
//console.log('jsonResponse sync', jsonRespose);
|
|
22731
22812
|
|
|
22732
22813
|
} else {
|
|
22814
|
+
if(xhr.status == 401){
|
|
22815
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22816
|
+
this.dispatchEvent(changeEvent);
|
|
22817
|
+
}
|
|
22733
22818
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22734
22819
|
this.setError(jsonRespose.error);
|
|
22735
22820
|
}
|
|
@@ -22869,7 +22954,10 @@ export class SfIEvents extends LitElement {
|
|
|
22869
22954
|
return jsonRespose;
|
|
22870
22955
|
|
|
22871
22956
|
} else {
|
|
22872
|
-
|
|
22957
|
+
if(xhr.status == 401){
|
|
22958
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22959
|
+
this.dispatchEvent(changeEvent);
|
|
22960
|
+
}
|
|
22873
22961
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22874
22962
|
this.setError(jsonRespose.error);
|
|
22875
22963
|
|
|
@@ -22891,7 +22979,10 @@ export class SfIEvents extends LitElement {
|
|
|
22891
22979
|
return jsonRespose;
|
|
22892
22980
|
|
|
22893
22981
|
} else {
|
|
22894
|
-
|
|
22982
|
+
if(xhr.status == 401){
|
|
22983
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
22984
|
+
this.dispatchEvent(changeEvent);
|
|
22985
|
+
}
|
|
22895
22986
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22896
22987
|
this.setError(jsonRespose.error);
|
|
22897
22988
|
|
|
@@ -22912,7 +23003,10 @@ export class SfIEvents extends LitElement {
|
|
|
22912
23003
|
return jsonRespose;
|
|
22913
23004
|
|
|
22914
23005
|
} else {
|
|
22915
|
-
|
|
23006
|
+
if(xhr.status == 401){
|
|
23007
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23008
|
+
this.dispatchEvent(changeEvent);
|
|
23009
|
+
}
|
|
22916
23010
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22917
23011
|
this.setError(jsonRespose.error);
|
|
22918
23012
|
|
|
@@ -22964,7 +23058,10 @@ export class SfIEvents extends LitElement {
|
|
|
22964
23058
|
return jsonRespose;
|
|
22965
23059
|
|
|
22966
23060
|
} else {
|
|
22967
|
-
|
|
23061
|
+
if(xhr.status == 401){
|
|
23062
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23063
|
+
this.dispatchEvent(changeEvent);
|
|
23064
|
+
}
|
|
22968
23065
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22969
23066
|
this.setError(jsonRespose.error);
|
|
22970
23067
|
|
|
@@ -22987,7 +23084,10 @@ export class SfIEvents extends LitElement {
|
|
|
22987
23084
|
return jsonRespose;
|
|
22988
23085
|
|
|
22989
23086
|
} else {
|
|
22990
|
-
|
|
23087
|
+
if(xhr.status == 401){
|
|
23088
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23089
|
+
this.dispatchEvent(changeEvent);
|
|
23090
|
+
}
|
|
22991
23091
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22992
23092
|
this.setError(jsonRespose.error);
|
|
22993
23093
|
|
|
@@ -23008,7 +23108,10 @@ export class SfIEvents extends LitElement {
|
|
|
23008
23108
|
return jsonRespose;
|
|
23009
23109
|
|
|
23010
23110
|
} else {
|
|
23011
|
-
|
|
23111
|
+
if(xhr.status == 401){
|
|
23112
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23113
|
+
this.dispatchEvent(changeEvent);
|
|
23114
|
+
}
|
|
23012
23115
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23013
23116
|
this.setError(jsonRespose.error);
|
|
23014
23117
|
|
|
@@ -23098,7 +23201,10 @@ export class SfIEvents extends LitElement {
|
|
|
23098
23201
|
return jsonRespose;
|
|
23099
23202
|
|
|
23100
23203
|
} else {
|
|
23101
|
-
|
|
23204
|
+
if(xhr.status == 401){
|
|
23205
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23206
|
+
this.dispatchEvent(changeEvent);
|
|
23207
|
+
}
|
|
23102
23208
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23103
23209
|
this.setError(jsonRespose.error);
|
|
23104
23210
|
|
|
@@ -23183,7 +23289,10 @@ export class SfIEvents extends LitElement {
|
|
|
23183
23289
|
return jsonRespose;
|
|
23184
23290
|
|
|
23185
23291
|
} else {
|
|
23186
|
-
|
|
23292
|
+
if(xhr.status == 401){
|
|
23293
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23294
|
+
this.dispatchEvent(changeEvent);
|
|
23295
|
+
}
|
|
23187
23296
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23188
23297
|
this.setError(jsonRespose.error);
|
|
23189
23298
|
|
|
@@ -23231,7 +23340,10 @@ export class SfIEvents extends LitElement {
|
|
|
23231
23340
|
return jsonRespose;
|
|
23232
23341
|
|
|
23233
23342
|
} else {
|
|
23234
|
-
|
|
23343
|
+
if(xhr.status == 401){
|
|
23344
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23345
|
+
this.dispatchEvent(changeEvent);
|
|
23346
|
+
}
|
|
23235
23347
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23236
23348
|
this.setError(jsonRespose.error);
|
|
23237
23349
|
|
|
@@ -23278,7 +23390,10 @@ export class SfIEvents extends LitElement {
|
|
|
23278
23390
|
return jsonRespose;
|
|
23279
23391
|
|
|
23280
23392
|
} else {
|
|
23281
|
-
|
|
23393
|
+
if(xhr.status == 401){
|
|
23394
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23395
|
+
this.dispatchEvent(changeEvent);
|
|
23396
|
+
}
|
|
23282
23397
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23283
23398
|
this.setError(jsonRespose.error);
|
|
23284
23399
|
|
|
@@ -23299,7 +23414,10 @@ export class SfIEvents extends LitElement {
|
|
|
23299
23414
|
return jsonRespose;
|
|
23300
23415
|
|
|
23301
23416
|
} else {
|
|
23302
|
-
|
|
23417
|
+
if(xhr.status == 401){
|
|
23418
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23419
|
+
this.dispatchEvent(changeEvent);
|
|
23420
|
+
}
|
|
23303
23421
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23304
23422
|
this.setError(jsonRespose.error);
|
|
23305
23423
|
|
|
@@ -23320,7 +23438,10 @@ export class SfIEvents extends LitElement {
|
|
|
23320
23438
|
return jsonRespose;
|
|
23321
23439
|
|
|
23322
23440
|
} else {
|
|
23323
|
-
|
|
23441
|
+
if(xhr.status == 401){
|
|
23442
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23443
|
+
this.dispatchEvent(changeEvent);
|
|
23444
|
+
}
|
|
23324
23445
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23325
23446
|
this.setError(jsonRespose.error);
|
|
23326
23447
|
|
|
@@ -23341,7 +23462,10 @@ export class SfIEvents extends LitElement {
|
|
|
23341
23462
|
return jsonRespose;
|
|
23342
23463
|
|
|
23343
23464
|
} else {
|
|
23344
|
-
|
|
23465
|
+
if(xhr.status == 401){
|
|
23466
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23467
|
+
this.dispatchEvent(changeEvent);
|
|
23468
|
+
}
|
|
23345
23469
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23346
23470
|
this.setError(jsonRespose.error);
|
|
23347
23471
|
|
|
@@ -23362,7 +23486,10 @@ export class SfIEvents extends LitElement {
|
|
|
23362
23486
|
return jsonRespose;
|
|
23363
23487
|
|
|
23364
23488
|
} else {
|
|
23365
|
-
|
|
23489
|
+
if(xhr.status == 401){
|
|
23490
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23491
|
+
this.dispatchEvent(changeEvent);
|
|
23492
|
+
}
|
|
23366
23493
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23367
23494
|
this.setError(jsonRespose.error);
|
|
23368
23495
|
|
|
@@ -23391,7 +23518,10 @@ export class SfIEvents extends LitElement {
|
|
|
23391
23518
|
// return jsonRespose;
|
|
23392
23519
|
|
|
23393
23520
|
} else {
|
|
23394
|
-
|
|
23521
|
+
if(xhr.status == 401){
|
|
23522
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23523
|
+
this.dispatchEvent(changeEvent);
|
|
23524
|
+
}
|
|
23395
23525
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23396
23526
|
this.setError(jsonRespose.error);
|
|
23397
23527
|
|
|
@@ -23590,7 +23720,10 @@ export class SfIEvents extends LitElement {
|
|
|
23590
23720
|
// }
|
|
23591
23721
|
|
|
23592
23722
|
} else {
|
|
23593
|
-
|
|
23723
|
+
if(xhr.status == 401){
|
|
23724
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23725
|
+
this.dispatchEvent(changeEvent);
|
|
23726
|
+
}
|
|
23594
23727
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23595
23728
|
this.setError(jsonRespose.error);
|
|
23596
23729
|
|
|
@@ -23636,7 +23769,10 @@ export class SfIEvents extends LitElement {
|
|
|
23636
23769
|
}
|
|
23637
23770
|
|
|
23638
23771
|
} else {
|
|
23639
|
-
|
|
23772
|
+
if(xhr.status == 401){
|
|
23773
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23774
|
+
this.dispatchEvent(changeEvent);
|
|
23775
|
+
}
|
|
23640
23776
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23641
23777
|
this.setError(jsonRespose.error);
|
|
23642
23778
|
|
|
@@ -23788,7 +23924,10 @@ export class SfIEvents extends LitElement {
|
|
|
23788
23924
|
return resultPresigned;
|
|
23789
23925
|
|
|
23790
23926
|
} else {
|
|
23791
|
-
|
|
23927
|
+
if(xhr.status == 401){
|
|
23928
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23929
|
+
this.dispatchEvent(changeEvent);
|
|
23930
|
+
}
|
|
23792
23931
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23793
23932
|
this.setError(jsonRespose.error);
|
|
23794
23933
|
|
|
@@ -23809,7 +23948,10 @@ export class SfIEvents extends LitElement {
|
|
|
23809
23948
|
return jsonRespose;
|
|
23810
23949
|
|
|
23811
23950
|
} else {
|
|
23812
|
-
|
|
23951
|
+
if(xhr.status == 401){
|
|
23952
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23953
|
+
this.dispatchEvent(changeEvent);
|
|
23954
|
+
}
|
|
23813
23955
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23814
23956
|
this.setError(jsonRespose.error);
|
|
23815
23957
|
|
|
@@ -23830,7 +23972,10 @@ export class SfIEvents extends LitElement {
|
|
|
23830
23972
|
return jsonRespose;
|
|
23831
23973
|
|
|
23832
23974
|
} else {
|
|
23833
|
-
|
|
23975
|
+
if(xhr.status == 401){
|
|
23976
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
23977
|
+
this.dispatchEvent(changeEvent);
|
|
23978
|
+
}
|
|
23834
23979
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23835
23980
|
this.setError(jsonRespose.error);
|
|
23836
23981
|
|
|
@@ -23857,7 +24002,10 @@ export class SfIEvents extends LitElement {
|
|
|
23857
24002
|
return jsonRespose;
|
|
23858
24003
|
|
|
23859
24004
|
} else {
|
|
23860
|
-
|
|
24005
|
+
if(xhr.status == 401){
|
|
24006
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24007
|
+
this.dispatchEvent(changeEvent);
|
|
24008
|
+
}
|
|
23861
24009
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23862
24010
|
this.setError(jsonRespose.error);
|
|
23863
24011
|
|
|
@@ -23878,7 +24026,10 @@ export class SfIEvents extends LitElement {
|
|
|
23878
24026
|
return jsonRespose;
|
|
23879
24027
|
|
|
23880
24028
|
} else {
|
|
23881
|
-
|
|
24029
|
+
if(xhr.status == 401){
|
|
24030
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24031
|
+
this.dispatchEvent(changeEvent);
|
|
24032
|
+
}
|
|
23882
24033
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23883
24034
|
this.setError(jsonRespose.error);
|
|
23884
24035
|
|
|
@@ -23899,7 +24050,10 @@ export class SfIEvents extends LitElement {
|
|
|
23899
24050
|
return jsonRespose;
|
|
23900
24051
|
|
|
23901
24052
|
} else {
|
|
23902
|
-
|
|
24053
|
+
if(xhr.status == 401){
|
|
24054
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24055
|
+
this.dispatchEvent(changeEvent);
|
|
24056
|
+
}
|
|
23903
24057
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
23904
24058
|
this.setError(jsonRespose.error);
|
|
23905
24059
|
|
|
@@ -23907,342 +24061,7 @@ export class SfIEvents extends LitElement {
|
|
|
23907
24061
|
|
|
23908
24062
|
}
|
|
23909
24063
|
|
|
23910
|
-
// fetchInternalControlsJobs = async () => {
|
|
23911
|
-
|
|
23912
|
-
// let url = "https://"+this.apiId+"/getinternalcontrolsjobs";
|
|
23913
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23914
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
23915
|
-
// this._SfLoader.innerHTML = '';
|
|
23916
|
-
// if(xhr.status == 200) {
|
|
23917
|
-
|
|
23918
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23919
|
-
// //console.log(jsonRespose);
|
|
23920
|
-
// return jsonRespose;
|
|
23921
|
-
|
|
23922
|
-
// } else {
|
|
23923
|
-
|
|
23924
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23925
|
-
// this.setError(jsonRespose.error);
|
|
23926
|
-
|
|
23927
|
-
// }
|
|
23928
|
-
|
|
23929
|
-
// }
|
|
23930
|
-
|
|
23931
|
-
// fetchExtensionsJobs = async () => {
|
|
23932
|
-
|
|
23933
|
-
// let url = "https://"+this.apiId+"/getalertschedulesjobs";
|
|
23934
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23935
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
23936
|
-
// this._SfLoader.innerHTML = '';
|
|
23937
|
-
// if(xhr.status == 200) {
|
|
23938
|
-
|
|
23939
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23940
|
-
// //console.log(jsonRespose);
|
|
23941
|
-
// return jsonRespose;
|
|
23942
|
-
|
|
23943
|
-
// } else {
|
|
23944
|
-
|
|
23945
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23946
|
-
// this.setError(jsonRespose.error);
|
|
23947
|
-
|
|
23948
|
-
// }
|
|
23949
|
-
|
|
23950
|
-
// }
|
|
23951
|
-
|
|
23952
|
-
// fetchAlertSchedulesJobs = async () => {
|
|
23953
|
-
|
|
23954
|
-
// let url = "https://"+this.apiId+"/getalertschedulesjobs";
|
|
23955
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23956
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
23957
|
-
// this._SfLoader.innerHTML = '';
|
|
23958
|
-
// if(xhr.status == 200) {
|
|
23959
|
-
|
|
23960
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23961
|
-
// //console.log(jsonRespose);
|
|
23962
|
-
// return jsonRespose;
|
|
23963
|
-
|
|
23964
|
-
// } else {
|
|
23965
|
-
|
|
23966
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23967
|
-
// this.setError(jsonRespose.error);
|
|
23968
|
-
|
|
23969
|
-
// }
|
|
23970
|
-
|
|
23971
|
-
// }
|
|
23972
|
-
|
|
23973
|
-
// fetchDueDatesJobs = async () => {
|
|
23974
|
-
|
|
23975
|
-
// let url = "https://"+this.apiId+"/getduedatesjobs";
|
|
23976
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23977
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
23978
|
-
// this._SfLoader.innerHTML = '';
|
|
23979
|
-
// if(xhr.status == 200) {
|
|
23980
|
-
|
|
23981
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23982
|
-
// //console.log(jsonRespose);
|
|
23983
|
-
// return jsonRespose;
|
|
23984
|
-
|
|
23985
|
-
// } else {
|
|
23986
|
-
|
|
23987
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
23988
|
-
// this.setError(jsonRespose.error);
|
|
23989
|
-
|
|
23990
|
-
// }
|
|
23991
|
-
|
|
23992
|
-
// }
|
|
23993
|
-
|
|
23994
|
-
// fetchApproversJobs = async () => {
|
|
23995
|
-
|
|
23996
|
-
// let url = "https://"+this.apiId+"/getapproversjobs";
|
|
23997
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23998
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
23999
|
-
// this._SfLoader.innerHTML = '';
|
|
24000
|
-
// if(xhr.status == 200) {
|
|
24001
|
-
|
|
24002
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24003
|
-
// //console.log(jsonRespose);
|
|
24004
|
-
// return jsonRespose;
|
|
24005
|
-
|
|
24006
|
-
// } else {
|
|
24007
|
-
|
|
24008
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24009
|
-
// this.setError(jsonRespose.error);
|
|
24010
|
-
|
|
24011
|
-
// }
|
|
24012
|
-
|
|
24013
|
-
// }
|
|
24014
|
-
|
|
24015
|
-
// fetchFunctionHeadsJobs = async () => {
|
|
24016
|
-
|
|
24017
|
-
// let url = "https://"+this.apiId+"/getfunctionheadsjobs";
|
|
24018
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24019
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24020
|
-
// this._SfLoader.innerHTML = '';
|
|
24021
|
-
// if(xhr.status == 200) {
|
|
24022
|
-
|
|
24023
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24024
|
-
// //console.log(jsonRespose);
|
|
24025
|
-
// return jsonRespose;
|
|
24026
|
-
|
|
24027
|
-
// } else {
|
|
24028
|
-
|
|
24029
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24030
|
-
// this.setError(jsonRespose.error);
|
|
24031
|
-
|
|
24032
|
-
// }
|
|
24033
|
-
|
|
24034
|
-
// }
|
|
24035
|
-
|
|
24036
|
-
// fetchMakerCheckersJobs = async () => {
|
|
24037
|
-
|
|
24038
|
-
// let url = "https://"+this.apiId+"/getmakercheckersjobs";
|
|
24039
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24040
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24041
|
-
// this._SfLoader.innerHTML = '';
|
|
24042
|
-
// if(xhr.status == 200) {
|
|
24043
|
-
|
|
24044
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24045
|
-
// //console.log(jsonRespose);
|
|
24046
|
-
// return jsonRespose;
|
|
24047
|
-
|
|
24048
|
-
// } else {
|
|
24049
|
-
|
|
24050
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24051
|
-
// this.setError(jsonRespose.error);
|
|
24052
|
-
|
|
24053
|
-
// }
|
|
24054
|
-
|
|
24055
|
-
// }
|
|
24056
|
-
|
|
24057
|
-
// fetchDocsJobs = async () => {
|
|
24058
|
-
|
|
24059
|
-
// let url = "https://"+this.apiId+"/getdocsjobs";
|
|
24060
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24061
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24062
|
-
// this._SfLoader.innerHTML = '';
|
|
24063
|
-
// if(xhr.status == 200) {
|
|
24064
|
-
|
|
24065
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24066
|
-
// //console.log(jsonRespose);
|
|
24067
|
-
// return jsonRespose;
|
|
24068
|
-
|
|
24069
|
-
// } else {
|
|
24070
|
-
|
|
24071
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24072
|
-
// this.setError(jsonRespose.error);
|
|
24073
|
-
|
|
24074
|
-
// }
|
|
24075
|
-
|
|
24076
|
-
// }
|
|
24077
|
-
|
|
24078
|
-
// fetchAuditorsJobs = async () => {
|
|
24079
|
-
|
|
24080
|
-
// let url = "https://"+this.apiId+"/getauditorsjobs";
|
|
24081
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24082
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24083
|
-
// this._SfLoader.innerHTML = '';
|
|
24084
|
-
// if(xhr.status == 200) {
|
|
24085
|
-
|
|
24086
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24087
|
-
// //console.log(jsonRespose);
|
|
24088
|
-
// return jsonRespose;
|
|
24089
|
-
|
|
24090
|
-
// } else {
|
|
24091
|
-
|
|
24092
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24093
|
-
// this.setError(jsonRespose.error);
|
|
24094
|
-
|
|
24095
|
-
// }
|
|
24096
|
-
|
|
24097
|
-
// }
|
|
24098
|
-
|
|
24099
|
-
// fetchViewersJobs = async () => {
|
|
24100
|
-
|
|
24101
|
-
// let url = "https://"+this.apiId+"/getviewersjobs";
|
|
24102
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24103
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24104
|
-
// this._SfLoader.innerHTML = '';
|
|
24105
|
-
// if(xhr.status == 200) {
|
|
24106
|
-
|
|
24107
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24108
|
-
// //console.log(jsonRespose);
|
|
24109
|
-
// return jsonRespose;
|
|
24110
|
-
|
|
24111
|
-
// } else {
|
|
24112
|
-
|
|
24113
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24114
|
-
// this.setError(jsonRespose.error);
|
|
24115
|
-
|
|
24116
|
-
// }
|
|
24117
|
-
|
|
24118
|
-
// }
|
|
24119
|
-
|
|
24120
|
-
// fetchReportersJobs = async () => {
|
|
24121
|
-
|
|
24122
|
-
// let url = "https://"+this.apiId+"/getreportersjobs";
|
|
24123
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24124
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24125
|
-
// this._SfLoader.innerHTML = '';
|
|
24126
|
-
// if(xhr.status == 200) {
|
|
24127
|
-
|
|
24128
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24129
|
-
// //console.log(jsonRespose);
|
|
24130
|
-
// return jsonRespose;
|
|
24131
|
-
|
|
24132
|
-
// } else {
|
|
24133
|
-
|
|
24134
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24135
|
-
// this.setError(jsonRespose.error);
|
|
24136
|
-
|
|
24137
|
-
// }
|
|
24138
|
-
|
|
24139
|
-
// }
|
|
24140
|
-
|
|
24141
|
-
// fetchTagsJobs = async () => {
|
|
24142
|
-
|
|
24143
|
-
// let url = "https://"+this.apiId+"/gettagsjobs";
|
|
24144
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24145
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24146
|
-
// this._SfLoader.innerHTML = '';
|
|
24147
|
-
// if(xhr.status == 200) {
|
|
24148
|
-
|
|
24149
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24150
|
-
// //console.log(jsonRespose);
|
|
24151
|
-
// return jsonRespose;
|
|
24152
|
-
|
|
24153
|
-
// } else {
|
|
24154
|
-
|
|
24155
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24156
|
-
// this.setError(jsonRespose.error);
|
|
24157
|
-
|
|
24158
|
-
// }
|
|
24159
|
-
|
|
24160
|
-
// }
|
|
24161
|
-
|
|
24162
|
-
// fetchLocationsJobs = async () => {
|
|
24163
|
-
|
|
24164
|
-
// let url = "https://"+this.apiId+"/getlocationsjobs";
|
|
24165
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24166
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24167
|
-
// this._SfLoader.innerHTML = '';
|
|
24168
|
-
// if(xhr.status == 200) {
|
|
24169
|
-
|
|
24170
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24171
|
-
// //console.log(jsonRespose);
|
|
24172
|
-
// return jsonRespose;
|
|
24173
|
-
|
|
24174
|
-
// } else {
|
|
24175
|
-
|
|
24176
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24177
|
-
// this.setError(jsonRespose.error);
|
|
24178
|
-
|
|
24179
|
-
// }
|
|
24180
|
-
|
|
24181
|
-
// }
|
|
24182
|
-
|
|
24183
|
-
// fetchCountriesJobs = async () => {
|
|
24184
|
-
|
|
24185
|
-
// let url = "https://"+this.apiId+"/getcountriesjobs";
|
|
24186
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24187
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24188
|
-
// this._SfLoader.innerHTML = '';
|
|
24189
|
-
// if(xhr.status == 200) {
|
|
24190
|
-
|
|
24191
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24192
|
-
// //console.log(jsonRespose);
|
|
24193
|
-
// return jsonRespose;
|
|
24194
|
-
|
|
24195
|
-
// } else {
|
|
24196
|
-
|
|
24197
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24198
|
-
// this.setError(jsonRespose.error);
|
|
24199
|
-
|
|
24200
|
-
// }
|
|
24201
|
-
|
|
24202
|
-
// }
|
|
24203
24064
|
|
|
24204
|
-
// fetchEntitiesJobs = async () => {
|
|
24205
|
-
|
|
24206
|
-
// let url = "https://"+this.apiId+"/getentitiesjobs";
|
|
24207
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24208
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24209
|
-
// this._SfLoader.innerHTML = '';
|
|
24210
|
-
// if(xhr.status == 200) {
|
|
24211
|
-
|
|
24212
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24213
|
-
// //console.log(jsonRespose);
|
|
24214
|
-
// return jsonRespose;
|
|
24215
|
-
|
|
24216
|
-
// } else {
|
|
24217
|
-
|
|
24218
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24219
|
-
// this.setError(jsonRespose.error);
|
|
24220
|
-
|
|
24221
|
-
// }
|
|
24222
|
-
|
|
24223
|
-
// }
|
|
24224
|
-
|
|
24225
|
-
// fetchFunctionJobs = async () => {
|
|
24226
|
-
|
|
24227
|
-
// let url = "https://"+this.apiId+"/getfunctionsjobs";
|
|
24228
|
-
// const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
24229
|
-
// const xhr : any = (await this.prepareXhr({"projectid": this.projectId}, url, this._SfLoader, authorization)) as any;
|
|
24230
|
-
// this._SfLoader.innerHTML = '';
|
|
24231
|
-
// if(xhr.status == 200) {
|
|
24232
|
-
|
|
24233
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24234
|
-
// //console.log(jsonRespose);
|
|
24235
|
-
// return jsonRespose;
|
|
24236
|
-
|
|
24237
|
-
// } else {
|
|
24238
|
-
|
|
24239
|
-
// const jsonRespose = JSON.parse(xhr.responseText);
|
|
24240
|
-
// this.setError(jsonRespose.error);
|
|
24241
|
-
|
|
24242
|
-
// }
|
|
24243
|
-
|
|
24244
|
-
// }
|
|
24245
|
-
|
|
24246
24065
|
fetchCalendarJobs = async () => {
|
|
24247
24066
|
|
|
24248
24067
|
let url = "https://"+this.apiId+"/getcalendarjobs";
|
|
@@ -24256,7 +24075,10 @@ export class SfIEvents extends LitElement {
|
|
|
24256
24075
|
return jsonRespose;
|
|
24257
24076
|
|
|
24258
24077
|
} else {
|
|
24259
|
-
|
|
24078
|
+
if(xhr.status == 401){
|
|
24079
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24080
|
+
this.dispatchEvent(changeEvent);
|
|
24081
|
+
}
|
|
24260
24082
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24261
24083
|
this.setError(jsonRespose.error);
|
|
24262
24084
|
|
|
@@ -24284,6 +24106,10 @@ export class SfIEvents extends LitElement {
|
|
|
24284
24106
|
this.processEvent(jsonRespose.data.value)
|
|
24285
24107
|
|
|
24286
24108
|
} else {
|
|
24109
|
+
if(xhr.status == 401){
|
|
24110
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24111
|
+
this.dispatchEvent(changeEvent);
|
|
24112
|
+
}
|
|
24287
24113
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24288
24114
|
this.setError(jsonRespose.error);
|
|
24289
24115
|
}
|
|
@@ -24307,6 +24133,10 @@ export class SfIEvents extends LitElement {
|
|
|
24307
24133
|
return jsonRespose;
|
|
24308
24134
|
|
|
24309
24135
|
} else {
|
|
24136
|
+
if(xhr.status == 401){
|
|
24137
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24138
|
+
this.dispatchEvent(changeEvent);
|
|
24139
|
+
}
|
|
24310
24140
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24311
24141
|
return jsonRespose;
|
|
24312
24142
|
|
|
@@ -24379,6 +24209,9 @@ export class SfIEvents extends LitElement {
|
|
|
24379
24209
|
//console.log(jsonRespose);
|
|
24380
24210
|
return registers;
|
|
24381
24211
|
|
|
24212
|
+
}else if(xhr.status == 401){
|
|
24213
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24214
|
+
this.dispatchEvent(changeEvent);
|
|
24382
24215
|
}
|
|
24383
24216
|
|
|
24384
24217
|
}
|
|
@@ -24513,7 +24346,10 @@ export class SfIEvents extends LitElement {
|
|
|
24513
24346
|
|
|
24514
24347
|
|
|
24515
24348
|
} else {
|
|
24516
|
-
|
|
24349
|
+
if(xhr.status == 401){
|
|
24350
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24351
|
+
this.dispatchEvent(changeEvent);
|
|
24352
|
+
}
|
|
24517
24353
|
if(xhr.status === 404) {
|
|
24518
24354
|
|
|
24519
24355
|
this.showChosenProject();
|
|
@@ -24589,7 +24425,10 @@ export class SfIEvents extends LitElement {
|
|
|
24589
24425
|
this.renderAppropriateStream(this.sdate,this.edate,true);
|
|
24590
24426
|
console.log('notices', notices, tempEvents);
|
|
24591
24427
|
} else {
|
|
24592
|
-
|
|
24428
|
+
if(xhr.status == 401){
|
|
24429
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24430
|
+
this.dispatchEvent(changeEvent);
|
|
24431
|
+
}
|
|
24593
24432
|
if(xhr.status === 404) {
|
|
24594
24433
|
|
|
24595
24434
|
this.showChosenProject();
|
|
@@ -24672,6 +24511,10 @@ export class SfIEvents extends LitElement {
|
|
|
24672
24511
|
return jsonRespose.meta
|
|
24673
24512
|
|
|
24674
24513
|
} else {
|
|
24514
|
+
if(xhr.status == 401){
|
|
24515
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24516
|
+
this.dispatchEvent(changeEvent);
|
|
24517
|
+
}
|
|
24675
24518
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24676
24519
|
this.setError(jsonRespose.error);
|
|
24677
24520
|
}
|
|
@@ -24731,6 +24574,9 @@ export class SfIEvents extends LitElement {
|
|
|
24731
24574
|
// backgroundProcessButton.style.display = 'none'
|
|
24732
24575
|
}
|
|
24733
24576
|
}
|
|
24577
|
+
}else if(xhr.status == 401){
|
|
24578
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24579
|
+
this.dispatchEvent(changeEvent);
|
|
24734
24580
|
}
|
|
24735
24581
|
}
|
|
24736
24582
|
|
|
@@ -24755,7 +24601,10 @@ export class SfIEvents extends LitElement {
|
|
|
24755
24601
|
// this.renderChosenProject(events);
|
|
24756
24602
|
|
|
24757
24603
|
} else {
|
|
24758
|
-
|
|
24604
|
+
if(xhr.status == 401){
|
|
24605
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24606
|
+
this.dispatchEvent(changeEvent);
|
|
24607
|
+
}
|
|
24759
24608
|
if(xhr.status === 404) {
|
|
24760
24609
|
|
|
24761
24610
|
this.showChosenProject();
|
|
@@ -24794,7 +24643,10 @@ export class SfIEvents extends LitElement {
|
|
|
24794
24643
|
// this.renderChosenProject(events);
|
|
24795
24644
|
|
|
24796
24645
|
} else {
|
|
24797
|
-
|
|
24646
|
+
if(xhr.status == 401){
|
|
24647
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24648
|
+
this.dispatchEvent(changeEvent);
|
|
24649
|
+
}
|
|
24798
24650
|
if(xhr.status === 404) {
|
|
24799
24651
|
|
|
24800
24652
|
this.showChosenProject();
|
|
@@ -24822,7 +24674,10 @@ export class SfIEvents extends LitElement {
|
|
|
24822
24674
|
//console.log(jsonRespose);
|
|
24823
24675
|
|
|
24824
24676
|
} else {
|
|
24825
|
-
|
|
24677
|
+
if(xhr.status == 401){
|
|
24678
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24679
|
+
this.dispatchEvent(changeEvent);
|
|
24680
|
+
}
|
|
24826
24681
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24827
24682
|
this.setError(jsonRespose.error);
|
|
24828
24683
|
this.fetchList();
|
|
@@ -24862,7 +24717,10 @@ export class SfIEvents extends LitElement {
|
|
|
24862
24717
|
return jsonRespose;
|
|
24863
24718
|
|
|
24864
24719
|
} else {
|
|
24865
|
-
|
|
24720
|
+
if(xhr.status == 401){
|
|
24721
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24722
|
+
this.dispatchEvent(changeEvent);
|
|
24723
|
+
}
|
|
24866
24724
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24867
24725
|
this.setError(jsonRespose.error);
|
|
24868
24726
|
this.fetchList();
|
|
@@ -24900,7 +24758,10 @@ export class SfIEvents extends LitElement {
|
|
|
24900
24758
|
}
|
|
24901
24759
|
|
|
24902
24760
|
} else {
|
|
24903
|
-
|
|
24761
|
+
if(xhr.status == 401){
|
|
24762
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24763
|
+
this.dispatchEvent(changeEvent);
|
|
24764
|
+
}
|
|
24904
24765
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24905
24766
|
this.setError(jsonRespose.error);
|
|
24906
24767
|
this.fetchList();
|
|
@@ -24953,6 +24814,10 @@ export class SfIEvents extends LitElement {
|
|
|
24953
24814
|
//await this.fetchAdhoc(true);
|
|
24954
24815
|
|
|
24955
24816
|
} else {
|
|
24817
|
+
if(xhr.status == 401){
|
|
24818
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
24819
|
+
this.dispatchEvent(changeEvent);
|
|
24820
|
+
}
|
|
24956
24821
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
24957
24822
|
this.setError(jsonRespose.error);
|
|
24958
24823
|
}
|
|
@@ -25215,6 +25080,10 @@ export class SfIEvents extends LitElement {
|
|
|
25215
25080
|
}, 2000);
|
|
25216
25081
|
|
|
25217
25082
|
} else {
|
|
25083
|
+
if(xhr.status == 401){
|
|
25084
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
25085
|
+
this.dispatchEvent(changeEvent);
|
|
25086
|
+
}
|
|
25218
25087
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
25219
25088
|
this.setError(jsonRespose.error);
|
|
25220
25089
|
setTimeout(() => {
|
|
@@ -25258,7 +25127,10 @@ export class SfIEvents extends LitElement {
|
|
|
25258
25127
|
// this.renderRoleTabsNext(jsonRespose.data, page)
|
|
25259
25128
|
this.renderNextEvents(jsonRespose.data, page, role);
|
|
25260
25129
|
} else {
|
|
25261
|
-
|
|
25130
|
+
if(xhr.status == 401){
|
|
25131
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
25132
|
+
this.dispatchEvent(changeEvent);
|
|
25133
|
+
}
|
|
25262
25134
|
if(xhr.status === 404) {
|
|
25263
25135
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
25264
25136
|
this.setError(jsonRespose.error);
|
|
@@ -25761,7 +25633,10 @@ export class SfIEvents extends LitElement {
|
|
|
25761
25633
|
console.log('report',arrReports['3/31/*,30;c989a44e-7d3d-427e-b712-90eacf585075;38dc8c53-643f-4fee-83fe-f15239606277;0a5fb99f-c36f-46c0-85b4-7fa3d48fa134']);
|
|
25762
25634
|
this.renderReports(arrReports)
|
|
25763
25635
|
} else {
|
|
25764
|
-
|
|
25636
|
+
if(xhr.status == 401){
|
|
25637
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
25638
|
+
this.dispatchEvent(changeEvent);
|
|
25639
|
+
}
|
|
25765
25640
|
if(xhr.status === 404) {
|
|
25766
25641
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
25767
25642
|
this.setError(jsonRespose.error);
|
|
@@ -25938,7 +25813,10 @@ export class SfIEvents extends LitElement {
|
|
|
25938
25813
|
console.log('receivedCompliacnes', arrCompliances)
|
|
25939
25814
|
// this.renderReportsComplainces(arrCompliances, sortid);
|
|
25940
25815
|
} else {
|
|
25941
|
-
|
|
25816
|
+
if(xhr.status == 401){
|
|
25817
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
25818
|
+
this.dispatchEvent(changeEvent);
|
|
25819
|
+
}
|
|
25942
25820
|
if(xhr.status === 404) {
|
|
25943
25821
|
|
|
25944
25822
|
this.showChosenProject();
|
|
@@ -26020,7 +25898,10 @@ export class SfIEvents extends LitElement {
|
|
|
26020
25898
|
console.log('receivedCompliacnes', arrCompliances)
|
|
26021
25899
|
this.renderReportsComplainces(arrCompliances, sortid);
|
|
26022
25900
|
} else {
|
|
26023
|
-
|
|
25901
|
+
if(xhr.status == 401){
|
|
25902
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
25903
|
+
this.dispatchEvent(changeEvent);
|
|
25904
|
+
}
|
|
26024
25905
|
if(xhr.status === 404) {
|
|
26025
25906
|
|
|
26026
25907
|
this.showChosenProject();
|
|
@@ -26170,7 +26051,10 @@ export class SfIEvents extends LitElement {
|
|
|
26170
26051
|
}, 3000)
|
|
26171
26052
|
|
|
26172
26053
|
} else {
|
|
26173
|
-
|
|
26054
|
+
if(xhr.status == 401){
|
|
26055
|
+
let changeEvent = new CustomEvent('tokenExpired',{bubbles:true});
|
|
26056
|
+
this.dispatchEvent(changeEvent);
|
|
26057
|
+
}
|
|
26174
26058
|
if(xhr.status === 404) {
|
|
26175
26059
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
26176
26060
|
this.setError(jsonRespose.error);
|
|
@@ -26586,7 +26470,7 @@ export class SfIEvents extends LitElement {
|
|
|
26586
26470
|
`;
|
|
26587
26471
|
|
|
26588
26472
|
} else if(this.mode == "downloader") {
|
|
26589
|
-
|
|
26473
|
+
/* eslint-disable lit/no-unknown-attribute */
|
|
26590
26474
|
return html`
|
|
26591
26475
|
|
|
26592
26476
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
@@ -26636,7 +26520,7 @@ export class SfIEvents extends LitElement {
|
|
|
26636
26520
|
</div>
|
|
26637
26521
|
|
|
26638
26522
|
`;
|
|
26639
|
-
|
|
26523
|
+
/* eslint-disable lit/no-unknown-attribute */
|
|
26640
26524
|
} else if(this.mode == "next"){
|
|
26641
26525
|
|
|
26642
26526
|
return html`
|