sf-i-events 1.0.685 → 1.0.687
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 +1 -1
- package/sf-i-events.js +43 -10
- package/src/sf-i-events.ts +44 -15
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -6353,12 +6353,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6353
6353
|
};
|
|
6354
6354
|
this.renderEventDetail = (event, mmddyyyy, currentColumnButton) => {
|
|
6355
6355
|
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
6356
|
-
console.log('event details', event, mmddyyyy);
|
|
6356
|
+
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
6357
6357
|
let comments, docs, approved, dateOfCompletion, makercheckers, docsOptional, documentType;
|
|
6358
6358
|
let entityId = "";
|
|
6359
6359
|
let locationId = "";
|
|
6360
6360
|
let statuteName = "";
|
|
6361
6361
|
let reportformatName = "";
|
|
6362
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
6362
6363
|
entityId = event.entityid;
|
|
6363
6364
|
locationId = event.locationid;
|
|
6364
6365
|
comments = event['comments'] == null ? [] : (event['comments']);
|
|
@@ -6854,6 +6855,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6854
6855
|
if (this.selectedItemIds.length === 0) {
|
|
6855
6856
|
// console.log('mmddyyyy', mmddyyyy)
|
|
6856
6857
|
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved);
|
|
6858
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
6859
|
+
if (this.events[mmdd][p].id == event.id) {
|
|
6860
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toISOString() });
|
|
6861
|
+
}
|
|
6862
|
+
}
|
|
6857
6863
|
}
|
|
6858
6864
|
else {
|
|
6859
6865
|
let bulkBodyReview = [];
|
|
@@ -6899,9 +6905,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6899
6905
|
this.processFindSelection(this._SfFindContainer, searchString);
|
|
6900
6906
|
}
|
|
6901
6907
|
else {
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6908
|
+
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
6909
|
+
var clickEvent = new MouseEvent("click", {
|
|
6910
|
+
"view": window,
|
|
6911
|
+
"bubbles": true,
|
|
6912
|
+
"cancelable": false
|
|
6913
|
+
});
|
|
6914
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
6915
|
+
// if(currentColumnButton != null) {
|
|
6916
|
+
// currentColumnButton.click();
|
|
6917
|
+
// }
|
|
6905
6918
|
}
|
|
6906
6919
|
}
|
|
6907
6920
|
});
|
|
@@ -6917,6 +6930,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6917
6930
|
else {
|
|
6918
6931
|
if (this.selectedItemIds.length === 0) {
|
|
6919
6932
|
await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved);
|
|
6933
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
6934
|
+
if (this.events[mmdd][p].id == event.id) {
|
|
6935
|
+
this.events[mmdd][p].approved = approved;
|
|
6936
|
+
this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toISOString() });
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6920
6939
|
}
|
|
6921
6940
|
else {
|
|
6922
6941
|
let bulkBodyAudit = [];
|
|
@@ -6964,9 +6983,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6964
6983
|
this.processFindSelection(this._SfFindContainer, searchString);
|
|
6965
6984
|
}
|
|
6966
6985
|
else {
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6986
|
+
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
6987
|
+
// if(currentColumnButton != null) {
|
|
6988
|
+
// currentColumnButton.click();
|
|
6989
|
+
// }
|
|
6970
6990
|
}
|
|
6971
6991
|
}
|
|
6972
6992
|
}
|
|
@@ -7032,8 +7052,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7032
7052
|
// console.log('reportformatvalues', reportformatvalues)
|
|
7033
7053
|
// console.log('reportformatschema',reportformatschema)
|
|
7034
7054
|
await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema);
|
|
7055
|
+
console.log('this.events', this.events);
|
|
7056
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
7057
|
+
if (this.events[mmdd][p].id == event.id) {
|
|
7058
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toISOString() });
|
|
7059
|
+
}
|
|
7060
|
+
}
|
|
7035
7061
|
if (makercheckers.length > 0) {
|
|
7036
7062
|
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true);
|
|
7063
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
7064
|
+
if (this.events[mmdd][p].id == event.id) {
|
|
7065
|
+
this.events[mmdd][p].approved = true;
|
|
7066
|
+
this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': `Auto Approved (Approved: Yes})`, 'timestamp': new Date().toISOString() });
|
|
7067
|
+
}
|
|
7068
|
+
}
|
|
7037
7069
|
}
|
|
7038
7070
|
}
|
|
7039
7071
|
else {
|
|
@@ -7105,9 +7137,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7105
7137
|
this.processFindSelection(this._SfFindContainer, searchString);
|
|
7106
7138
|
}
|
|
7107
7139
|
else {
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7140
|
+
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
7141
|
+
// if(currentColumnButton != null) {
|
|
7142
|
+
// currentColumnButton.click();
|
|
7143
|
+
// }
|
|
7111
7144
|
}
|
|
7112
7145
|
}
|
|
7113
7146
|
}
|
package/src/sf-i-events.ts
CHANGED
|
@@ -9559,14 +9559,14 @@ export class SfIEvents extends LitElement {
|
|
|
9559
9559
|
}
|
|
9560
9560
|
|
|
9561
9561
|
renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null) => {
|
|
9562
|
-
console.log('event details', event, mmddyyyy);
|
|
9562
|
+
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
9563
9563
|
|
|
9564
9564
|
let comments, docs, approved, dateOfCompletion, makercheckers: Array<string>, docsOptional, documentType;
|
|
9565
9565
|
let entityId: string = "";
|
|
9566
9566
|
let locationId: string = "";
|
|
9567
9567
|
let statuteName: string = "";
|
|
9568
9568
|
let reportformatName: string = "";
|
|
9569
|
-
|
|
9569
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1]
|
|
9570
9570
|
entityId = event.entityid;
|
|
9571
9571
|
locationId = event.locationid;
|
|
9572
9572
|
comments = event['comments'] == null ? [] : (event['comments']);
|
|
@@ -10190,7 +10190,12 @@ export class SfIEvents extends LitElement {
|
|
|
10190
10190
|
if(this.selectedItemIds.length === 0) {
|
|
10191
10191
|
// console.log('mmddyyyy', mmddyyyy)
|
|
10192
10192
|
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved)
|
|
10193
|
-
|
|
10193
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
10194
|
+
if(this.events[mmdd][p].id == event.id){
|
|
10195
|
+
|
|
10196
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toISOString()})
|
|
10197
|
+
}
|
|
10198
|
+
}
|
|
10194
10199
|
} else {
|
|
10195
10200
|
let bulkBodyReview = []
|
|
10196
10201
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -10225,7 +10230,6 @@ export class SfIEvents extends LitElement {
|
|
|
10225
10230
|
|
|
10226
10231
|
}
|
|
10227
10232
|
await this.uploadReviewsBulk(bulkBodyReview);
|
|
10228
|
-
|
|
10229
10233
|
}
|
|
10230
10234
|
|
|
10231
10235
|
if(this.mode == "next"){
|
|
@@ -10238,9 +10242,16 @@ export class SfIEvents extends LitElement {
|
|
|
10238
10242
|
const searchString = ((this._SfFindContainer as HTMLDivElement).querySelector('#stream-search') as HTMLInputElement).value;
|
|
10239
10243
|
this.processFindSelection((this._SfFindContainer as HTMLDivElement), searchString);
|
|
10240
10244
|
} else {
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10245
|
+
this.renderAppropriateStream(this.sdate,this.edate, true);
|
|
10246
|
+
var clickEvent = new MouseEvent("click", {
|
|
10247
|
+
"view": window,
|
|
10248
|
+
"bubbles": true,
|
|
10249
|
+
"cancelable": false
|
|
10250
|
+
});
|
|
10251
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement)!.dispatchEvent(clickEvent);
|
|
10252
|
+
// if(currentColumnButton != null) {
|
|
10253
|
+
// currentColumnButton.click();
|
|
10254
|
+
// }
|
|
10244
10255
|
}
|
|
10245
10256
|
}
|
|
10246
10257
|
|
|
@@ -10263,7 +10274,12 @@ export class SfIEvents extends LitElement {
|
|
|
10263
10274
|
if(this.selectedItemIds.length === 0) {
|
|
10264
10275
|
|
|
10265
10276
|
await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved)
|
|
10266
|
-
|
|
10277
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
10278
|
+
if(this.events[mmdd][p].id == event.id){
|
|
10279
|
+
this.events[mmdd][p].approved = approved
|
|
10280
|
+
this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toISOString()})
|
|
10281
|
+
}
|
|
10282
|
+
}
|
|
10267
10283
|
} else {
|
|
10268
10284
|
let bulkBodyAudit = []
|
|
10269
10285
|
for(var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -10314,9 +10330,10 @@ export class SfIEvents extends LitElement {
|
|
|
10314
10330
|
const searchString = ((this._SfFindContainer as HTMLDivElement).querySelector('#stream-search') as HTMLInputElement).value;
|
|
10315
10331
|
this.processFindSelection((this._SfFindContainer as HTMLDivElement), searchString);
|
|
10316
10332
|
} else {
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10333
|
+
this.renderAppropriateStream(this.sdate,this.edate,true);
|
|
10334
|
+
// if(currentColumnButton != null) {
|
|
10335
|
+
// currentColumnButton.click();
|
|
10336
|
+
// }
|
|
10320
10337
|
}
|
|
10321
10338
|
}
|
|
10322
10339
|
|
|
@@ -10414,10 +10431,21 @@ export class SfIEvents extends LitElement {
|
|
|
10414
10431
|
// console.log('reportformatvalues', reportformatvalues)
|
|
10415
10432
|
// console.log('reportformatschema',reportformatschema)
|
|
10416
10433
|
await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema)
|
|
10434
|
+
console.log('this.events', this.events);
|
|
10435
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
10436
|
+
if(this.events[mmdd][p].id == event.id){
|
|
10437
|
+
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toISOString()})
|
|
10438
|
+
}
|
|
10439
|
+
}
|
|
10417
10440
|
if(makercheckers.length > 0) {
|
|
10418
10441
|
|
|
10419
10442
|
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true);
|
|
10420
|
-
|
|
10443
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
10444
|
+
if(this.events[mmdd][p].id == event.id){
|
|
10445
|
+
this.events[mmdd][p].approved = true
|
|
10446
|
+
this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': `Auto Approved (Approved: Yes})`, 'timestamp': new Date().toISOString()})
|
|
10447
|
+
}
|
|
10448
|
+
}
|
|
10421
10449
|
}
|
|
10422
10450
|
|
|
10423
10451
|
} else {
|
|
@@ -10495,9 +10523,10 @@ export class SfIEvents extends LitElement {
|
|
|
10495
10523
|
const searchString = ((this._SfFindContainer as HTMLDivElement).querySelector('#stream-search') as HTMLInputElement).value;
|
|
10496
10524
|
this.processFindSelection((this._SfFindContainer as HTMLDivElement), searchString);
|
|
10497
10525
|
} else {
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10526
|
+
this.renderAppropriateStream(this.sdate,this.edate,true)
|
|
10527
|
+
// if(currentColumnButton != null) {
|
|
10528
|
+
// currentColumnButton.click();
|
|
10529
|
+
// }
|
|
10501
10530
|
}
|
|
10502
10531
|
}
|
|
10503
10532
|
|