sf-i-events 1.0.865 → 1.0.867
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 +23 -22
- package/package.json +1 -1
- package/sf-i-events.js +277 -231
- package/src/sf-i-events.ts +300 -247
package/src/sf-i-events.ts
CHANGED
|
@@ -3661,7 +3661,7 @@ export class SfIEvents extends LitElement {
|
|
|
3661
3661
|
|
|
3662
3662
|
// console.log('about to expire', mmdd, event.duedate)
|
|
3663
3663
|
|
|
3664
|
-
let dateArr
|
|
3664
|
+
let dateArr = event.duedate.split('/')
|
|
3665
3665
|
const dd = dateArr[0];
|
|
3666
3666
|
const mm = dateArr[1];
|
|
3667
3667
|
|
|
@@ -4737,7 +4737,7 @@ export class SfIEvents extends LitElement {
|
|
|
4737
4737
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
4738
4738
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
|
|
4739
4739
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
4740
|
-
html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' +
|
|
4740
|
+
html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
4741
4741
|
if (event.reporters != null && remarks.length > 0) {
|
|
4742
4742
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
4743
4743
|
}
|
|
@@ -5060,7 +5060,7 @@ export class SfIEvents extends LitElement {
|
|
|
5060
5060
|
|
|
5061
5061
|
let graphParam = this.getGraphParam(event);
|
|
5062
5062
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5063
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.reporters != null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (event.reporters != null ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + '</div>';
|
|
5063
|
+
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.reporters != null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + ((event.reporters != null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null))) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + '</div>';
|
|
5064
5064
|
// }
|
|
5065
5065
|
|
|
5066
5066
|
return html;
|
|
@@ -5626,7 +5626,7 @@ export class SfIEvents extends LitElement {
|
|
|
5626
5626
|
html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
|
|
5627
5627
|
html += '</div>'
|
|
5628
5628
|
|
|
5629
|
-
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
|
|
5629
|
+
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'agreement') {
|
|
5630
5630
|
html += '<div class="m-20">';
|
|
5631
5631
|
html += '<label part="input-label">Supporting Documents</label>';
|
|
5632
5632
|
html += '<slot name="uploader"></slot>';
|
|
@@ -5637,10 +5637,12 @@ export class SfIEvents extends LitElement {
|
|
|
5637
5637
|
html += '<div class="d-flex m-20 flex-col">';
|
|
5638
5638
|
html += '<label part="input-label">Approver Comments*</label>';
|
|
5639
5639
|
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5640
|
+
if (event.module != 'agreement') {
|
|
5641
|
+
html += '<label part="input-label">Date of Completion*</label>';
|
|
5642
|
+
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
5643
|
+
html += '<label part="input-label">Percentage</label>';
|
|
5644
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
5645
|
+
}
|
|
5644
5646
|
html += '<div>'
|
|
5645
5647
|
html += '<label part="input-label">Approve?*</label><br />';
|
|
5646
5648
|
html += '<div class="mt-5">'
|
|
@@ -5696,24 +5698,28 @@ export class SfIEvents extends LitElement {
|
|
|
5696
5698
|
html += '<div class="d-flex m-20 flex-col">';
|
|
5697
5699
|
html += '<label part="input-label">Reporter Comments*</label>';
|
|
5698
5700
|
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
5701
|
+
if (event.module != 'agreement') {
|
|
5702
|
+
html += '<label part="input-label">Date of Completion*</label>';
|
|
5703
|
+
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
5704
|
+
html += '<label part="input-label">Completion Percentage*</label>';
|
|
5705
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
|
|
5706
|
+
html += '<div part="input-reporter-percentage-message" class="input-reporter-percentage-message mb-20">For reporting full non-compliance, choose 0%. For reporting compliance with gaps, choose the appropriate % value.</div><br />'
|
|
5706
5707
|
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
html += '<
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5708
|
+
// if(docsOptional.length === 0) {
|
|
5709
|
+
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
5710
|
+
|
|
5711
|
+
|
|
5712
|
+
html += '<slot name="uploader"></slot>';
|
|
5713
|
+
if (uploadGuidance == 1) {
|
|
5714
|
+
html += '<div id="upload-guidance-button" part="upload-guidance-button" class="d-flex button-icon-small align-center align-self-start mt-10"><span class="material-symbols-outlined">help</span> <span>Get Help</span></div>'
|
|
5715
|
+
} else if (uploadGuidance != 0) {
|
|
5716
|
+
html += '<div part="upload-guidance-content">'
|
|
5717
|
+
html += '<div part="detail-head" class="mb-5"><strong>Upload Guidance</strong></div>'
|
|
5718
|
+
html += '<sf-i-elastic-text text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
|
|
5719
|
+
html += '</div>'
|
|
5720
|
+
}
|
|
5721
|
+
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
5715
5722
|
}
|
|
5716
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
5717
5723
|
// }
|
|
5718
5724
|
html += '<br />';
|
|
5719
5725
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
@@ -5750,11 +5756,13 @@ export class SfIEvents extends LitElement {
|
|
|
5750
5756
|
html += '<div class="d-flex m-20 flex-col">';
|
|
5751
5757
|
html += '<label part="input-label">Auditor Comments</label>';
|
|
5752
5758
|
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5759
|
+
if (event.module != 'agreement') {
|
|
5760
|
+
html += '<label part="input-label">Date of Completion</label>';
|
|
5761
|
+
html += '<input id="input-auditor-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '" readonly/><br />';
|
|
5762
|
+
html += '<label part="input-label">Percentage</label>';
|
|
5763
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
5764
|
+
html += '<div part="input-reporter-percentage-message" class="input-reporter-percentage-message mb-20">For reporting full non-compliance, choose 0%. For reporting compliance with gaps, choose the appropriate % value.</div><br />'
|
|
5765
|
+
}
|
|
5758
5766
|
html += '<div>'
|
|
5759
5767
|
html += '<label part="input-label">Approve?</label><br />';
|
|
5760
5768
|
html += '<div class="mt-5">'
|
|
@@ -6625,7 +6633,14 @@ export class SfIEvents extends LitElement {
|
|
|
6625
6633
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
6626
6634
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
6627
6635
|
filterSubmitButton.addEventListener('click', () => {
|
|
6628
|
-
this.
|
|
6636
|
+
this.enableCustom();
|
|
6637
|
+
this.renderTabs(this.selectedTab);
|
|
6638
|
+
// this.processDateSelection(eventsContainer);
|
|
6639
|
+
if (this.myRole == this.TAB_VIEWER) {
|
|
6640
|
+
this.renderCustomViewer()
|
|
6641
|
+
} else {
|
|
6642
|
+
this.renderCustom();
|
|
6643
|
+
}
|
|
6629
6644
|
})
|
|
6630
6645
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
6631
6646
|
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
@@ -7408,6 +7423,7 @@ export class SfIEvents extends LitElement {
|
|
|
7408
7423
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
|
|
7409
7424
|
const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
|
|
7410
7425
|
filterSubmitButton.addEventListener('click', () => {
|
|
7426
|
+
this.renderTabs(this.selectedTab)
|
|
7411
7427
|
this.processDateSelectionViewer(eventsContainer);
|
|
7412
7428
|
})
|
|
7413
7429
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
@@ -10199,8 +10215,23 @@ export class SfIEvents extends LitElement {
|
|
|
10199
10215
|
(this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year')?.addEventListener('click', () => {
|
|
10200
10216
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date-mobile') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10201
10217
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-start-date') as HTMLInputElement).value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
10202
|
-
|
|
10203
|
-
|
|
10218
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
10219
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
10220
|
+
|
|
10221
|
+
if (month === 0) {
|
|
10222
|
+
month = 12;
|
|
10223
|
+
year -= 1;
|
|
10224
|
+
}
|
|
10225
|
+
|
|
10226
|
+
// Pad month
|
|
10227
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
10228
|
+
|
|
10229
|
+
// Determine last day of month (safe)
|
|
10230
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
10231
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
10232
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
10233
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date-mobile') as HTMLInputElement).value = finalDate;
|
|
10234
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#stream-end-date') as HTMLInputElement).value = finalDate;
|
|
10204
10235
|
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10205
10236
|
});
|
|
10206
10237
|
|
|
@@ -10271,7 +10302,9 @@ export class SfIEvents extends LitElement {
|
|
|
10271
10302
|
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10272
10303
|
});
|
|
10273
10304
|
|
|
10274
|
-
|
|
10305
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
10306
|
+
((this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year') as HTMLButtonElement).click();
|
|
10307
|
+
}
|
|
10275
10308
|
// for(var i = 0; i < 3; i++) {
|
|
10276
10309
|
// (this._SfCustomContainer as HTMLDivElement).querySelector('#stream-month-' + i)?.addEventListener('click', (ev: any)=> {
|
|
10277
10310
|
// const target = parseInt((ev.target as HTMLDivElement).id.split('-')[2]);
|
|
@@ -11192,11 +11225,26 @@ export class SfIEvents extends LitElement {
|
|
|
11192
11225
|
console.log('dateresult', dateResult, index);
|
|
11193
11226
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
11194
11227
|
this.currentColumnIndex = index + "";
|
|
11195
|
-
|
|
11196
|
-
|
|
11228
|
+
|
|
11229
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
11230
|
+
|
|
11231
|
+
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
11232
|
+
this.enableCustom();
|
|
11233
|
+
this.renderTabs(this.TAB_CUSTOM);
|
|
11234
|
+
console.log('stats clicked');
|
|
11235
|
+
if (this.myRole == this.TAB_VIEWER) {
|
|
11236
|
+
this.renderCustomViewer()
|
|
11237
|
+
} else {
|
|
11238
|
+
this.renderCustom();
|
|
11239
|
+
}
|
|
11240
|
+
} else {
|
|
11241
|
+
if (dateResult != null) {
|
|
11242
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
|
|
11243
|
+
}
|
|
11244
|
+
this.renderTabs(this.TAB_STREAM);
|
|
11245
|
+
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
11246
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
11197
11247
|
}
|
|
11198
|
-
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
11199
|
-
this.renderStream(index, showGraph, showBackgroundButton);
|
|
11200
11248
|
})
|
|
11201
11249
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
11202
11250
|
// selectFeatureAll?.addEventListener('click',async(ev: any) => {
|
|
@@ -13623,7 +13671,8 @@ export class SfIEvents extends LitElement {
|
|
|
13623
13671
|
let docs = listEvent['documents'] == null ? [] : listEvent['documents'] == null ? [] : (listEvent['documents']);
|
|
13624
13672
|
let approved = listEvent['approved'] == null ? false : listEvent['approved'] == null ? false : listEvent['approved'];
|
|
13625
13673
|
let makercheckers = listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'];
|
|
13626
|
-
let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
|
|
13674
|
+
// let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
|
|
13675
|
+
let html: string = '';
|
|
13627
13676
|
let documentType = listEvent['documenttype'] == null ? null : listEvent['documenttype'][0] == null ? null : listEvent['documenttype'][0].split(" ")[0];
|
|
13628
13677
|
html += `
|
|
13629
13678
|
<div part="compliance-detail-title" class="d-flex justify-between">
|
|
@@ -13729,6 +13778,7 @@ export class SfIEvents extends LitElement {
|
|
|
13729
13778
|
if (reportingSchemaJson != "" && reportingReporting != null) {
|
|
13730
13779
|
reportingReporting.configjson = reportingSchemaJson;
|
|
13731
13780
|
if (reportingSchemaValues != "") reportingReporting.prepopulateValJson = reportingSchemaValues
|
|
13781
|
+
reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view"
|
|
13732
13782
|
reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true"
|
|
13733
13783
|
reportingReporting.flow = "reporting"
|
|
13734
13784
|
setTimeout(() => {
|
|
@@ -13833,11 +13883,10 @@ export class SfIEvents extends LitElement {
|
|
|
13833
13883
|
await this.renewAgreement(listEvent, reportformatvalues);
|
|
13834
13884
|
} else {
|
|
13835
13885
|
console.log('renew reporting', reportformatvalues)
|
|
13836
|
-
return;
|
|
13837
13886
|
}
|
|
13838
13887
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
13839
13888
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
13840
|
-
|
|
13889
|
+
this.events[mmdd][p].approved = approved
|
|
13841
13890
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() })
|
|
13842
13891
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
13843
13892
|
}
|
|
@@ -13945,7 +13994,7 @@ export class SfIEvents extends LitElement {
|
|
|
13945
13994
|
const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
|
|
13946
13995
|
if (approved == listEvent.approved) {
|
|
13947
13996
|
buttonClick.innerHTML = "Save"
|
|
13948
|
-
this.setError('Already Approved!');
|
|
13997
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
13949
13998
|
setTimeout(() => {
|
|
13950
13999
|
this.clearMessages();
|
|
13951
14000
|
}, 3000);
|
|
@@ -14090,13 +14139,14 @@ export class SfIEvents extends LitElement {
|
|
|
14090
14139
|
|
|
14091
14140
|
//console.log('reporter comments 1', reportercomments);
|
|
14092
14141
|
|
|
14093
|
-
const reporterdoc = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value.length > 0 ? (new Date(((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "") : "";
|
|
14142
|
+
// const reporterdoc = ((((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement) != null) && ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value.length > 0) ? (new Date(((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "") : "";
|
|
14143
|
+
const reporterdoc = new Date().getTime() + "";
|
|
14094
14144
|
let docs: any[] = [];
|
|
14095
14145
|
|
|
14096
14146
|
//console.log('reporter comments 2', reportercomments);
|
|
14097
14147
|
|
|
14098
14148
|
// if(docsOptional.length === 0) {
|
|
14099
|
-
docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
14149
|
+
// docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
14100
14150
|
// }
|
|
14101
14151
|
|
|
14102
14152
|
//console.log('docs', docs);
|
|
@@ -14104,6 +14154,7 @@ export class SfIEvents extends LitElement {
|
|
|
14104
14154
|
let reportformatschema: string = "";
|
|
14105
14155
|
if (listEvent.customreporting != null) {
|
|
14106
14156
|
let reportingReporting = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-reporting') as SfIReporting
|
|
14157
|
+
console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()))
|
|
14107
14158
|
reportformatvalues = JSON.stringify(reportingReporting!.selectedValues()) ?? "";
|
|
14108
14159
|
reportformatschema = reportingReporting!.configjson ?? "";
|
|
14109
14160
|
}
|
|
@@ -14112,228 +14163,228 @@ export class SfIEvents extends LitElement {
|
|
|
14112
14163
|
if (((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement) != null) {
|
|
14113
14164
|
percentage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-percentage') as HTMLInputElement).value
|
|
14114
14165
|
}
|
|
14115
|
-
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
14116
|
-
|
|
14117
|
-
//console.log('reporter comments 3', reportercomments);
|
|
14118
|
-
buttonClick.innerHTML = "Save"
|
|
14119
|
-
this.setError('Invalid Percentage!');
|
|
14120
|
-
setTimeout(() => {
|
|
14121
|
-
this.clearMessages();
|
|
14122
|
-
}, 3000);
|
|
14123
|
-
|
|
14124
|
-
} else {
|
|
14125
|
-
if (docs.length === 0 && docsOptional.length === 0) {
|
|
14126
|
-
|
|
14127
|
-
//console.log('reporter comments 3', reportercomments);
|
|
14128
|
-
buttonClick.innerHTML = "Save"
|
|
14129
|
-
this.setError('No documents uploaded!');
|
|
14130
|
-
setTimeout(() => {
|
|
14131
|
-
this.clearMessages();
|
|
14132
|
-
}, 3000);
|
|
14133
|
-
|
|
14134
|
-
} else {
|
|
14135
|
-
|
|
14136
|
-
//console.log('reporterdoc', reporterdoc);
|
|
14137
|
-
|
|
14138
|
-
if (reporterdoc.length === 0) {
|
|
14139
|
-
buttonClick.innerHTML = "Save"
|
|
14140
|
-
this.setError('Date of completion not selected!');
|
|
14141
|
-
setTimeout(() => {
|
|
14142
|
-
this.clearMessages();
|
|
14143
|
-
}, 3000);
|
|
14166
|
+
// if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
14144
14167
|
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14168
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
14169
|
+
// buttonClick.innerHTML = "Save"
|
|
14170
|
+
// this.setError('Invalid Percentage!');
|
|
14171
|
+
// setTimeout(() => {
|
|
14172
|
+
// this.clearMessages();
|
|
14173
|
+
// }, 3000);
|
|
14151
14174
|
|
|
14152
|
-
|
|
14175
|
+
// } else {
|
|
14176
|
+
// if (docs.length === 0 && docsOptional.length === 0) {
|
|
14153
14177
|
|
|
14154
|
-
|
|
14178
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
14179
|
+
// buttonClick.innerHTML = "Save"
|
|
14180
|
+
// this.setError('No documents uploaded!');
|
|
14181
|
+
// setTimeout(() => {
|
|
14182
|
+
// this.clearMessages();
|
|
14183
|
+
// }, 3000);
|
|
14155
14184
|
|
|
14156
|
-
|
|
14157
|
-
buttonClick.innerHTML = "Save"
|
|
14158
|
-
this.setError('Comments cannot be blank!');
|
|
14159
|
-
setTimeout(() => {
|
|
14160
|
-
this.clearMessages();
|
|
14161
|
-
}, 3000);
|
|
14162
|
-
|
|
14163
|
-
} else {
|
|
14185
|
+
// } else {
|
|
14164
14186
|
|
|
14187
|
+
// //console.log('reporterdoc', reporterdoc);
|
|
14165
14188
|
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
|
|
14170
|
-
|
|
14171
|
-
|
|
14172
|
-
((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement)!.dispatchEvent(clickEvent);
|
|
14173
|
-
let flagBulk = false;
|
|
14174
|
-
if (this.selectedItemIds.length <= 1) {
|
|
14189
|
+
// if (reporterdoc.length === 0) {
|
|
14190
|
+
// buttonClick.innerHTML = "Save"
|
|
14191
|
+
// this.setError('Date of completion not selected!');
|
|
14192
|
+
// setTimeout(() => {
|
|
14193
|
+
// this.clearMessages();
|
|
14194
|
+
// }, 3000);
|
|
14175
14195
|
|
|
14176
|
-
|
|
14177
|
-
|
|
14178
|
-
|
|
14179
|
-
|
|
14180
|
-
|
|
14181
|
-
|
|
14182
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14183
|
-
}
|
|
14184
|
-
}
|
|
14185
|
-
console.log('uploadReport single')
|
|
14186
|
-
if (makercheckers.length > 0) {
|
|
14196
|
+
// } else if (parseInt(reporterdoc) > new Date().getTime()) {
|
|
14197
|
+
// buttonClick.innerHTML = "Save"
|
|
14198
|
+
// this.setError('Date of completion cannot be in future!');
|
|
14199
|
+
// setTimeout(() => {
|
|
14200
|
+
// this.clearMessages();
|
|
14201
|
+
// }, 3000);
|
|
14187
14202
|
|
|
14188
|
-
|
|
14189
|
-
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
14190
|
-
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
14191
|
-
this.events[mmdd][p].approved = true
|
|
14192
|
-
// this.events[mmdd][p].documents = docs
|
|
14193
|
-
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() })
|
|
14194
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14195
|
-
}
|
|
14196
|
-
}
|
|
14197
|
-
await this.renewAgreement(listEvent, reportformatvalues);
|
|
14198
|
-
console.log('upload report auto approve single')
|
|
14199
|
-
}
|
|
14200
|
-
if (this.recentlyReported[mmdd] == null) {
|
|
14201
|
-
this.recentlyReported[mmdd] = []
|
|
14202
|
-
}
|
|
14203
|
-
this.recentlyReported[mmdd].push(listEvent)
|
|
14204
|
-
}
|
|
14205
|
-
} else {
|
|
14206
|
-
let bulkBody = []
|
|
14207
|
-
let bulkBodyReview = []
|
|
14208
|
-
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14203
|
+
// } else {
|
|
14209
14204
|
|
|
14210
|
-
|
|
14211
|
-
//console.log('selectedid', selectedId);
|
|
14205
|
+
//console.log('makerscheckers 1', reportercomments);
|
|
14212
14206
|
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
|
|
14219
|
-
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
14220
|
-
|
|
14221
|
-
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
14222
|
-
// if(parseInt(makercheckersL) > 0) {
|
|
14223
|
-
// bulkBodyReview.push({
|
|
14224
|
-
// "mmddyyyy": mmddyyyy,
|
|
14225
|
-
// "projectid": this.projectId,
|
|
14226
|
-
// "type": "report",
|
|
14227
|
-
// "eventid": eventId,
|
|
14228
|
-
// "comments": reportercomments,
|
|
14229
|
-
// "dateofcompletion": reporterdoc,
|
|
14230
|
-
// "percentage": percentage,
|
|
14231
|
-
// "entityid": entityId,
|
|
14232
|
-
// "locationid": locationId,
|
|
14233
|
-
// "event": null,
|
|
14234
|
-
// "docs": JSON.stringify(docs),
|
|
14235
|
-
// "approved": true,
|
|
14236
|
-
// "username": this.userName,
|
|
14237
|
-
// "reportformatvalues": reportformatvalues,
|
|
14238
|
-
// "reportformatschema": reportformatschema,
|
|
14239
|
-
// "userid": this.userProfileId,
|
|
14240
|
-
// "userrole": this.myRole,
|
|
14241
|
-
// "year": this.calendarStartYYYY,
|
|
14242
|
-
// "module": listEvent.module ?? "events"
|
|
14243
|
-
// } )
|
|
14244
|
-
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
14207
|
+
if (reportercomments.trim().length === 0) {
|
|
14208
|
+
buttonClick.innerHTML = "Save"
|
|
14209
|
+
this.setError('Comments cannot be blank!');
|
|
14210
|
+
setTimeout(() => {
|
|
14211
|
+
this.clearMessages();
|
|
14212
|
+
}, 3000);
|
|
14245
14213
|
|
|
14246
|
-
|
|
14247
|
-
bulkBody.push({
|
|
14248
|
-
"mmddyyyy": mmddyyyy,
|
|
14249
|
-
"projectid": this.projectId,
|
|
14250
|
-
"type": "report",
|
|
14251
|
-
"eventid": eventId,
|
|
14252
|
-
"comments": reportercomments,
|
|
14253
|
-
"dateofcompletion": reporterdoc,
|
|
14254
|
-
"percentage": percentage,
|
|
14255
|
-
"entityid": entityId,
|
|
14256
|
-
"locationid": locationId,
|
|
14257
|
-
"event": null,
|
|
14258
|
-
"docs": JSON.stringify(docs),
|
|
14259
|
-
"username": this.userName,
|
|
14260
|
-
"reportformatvalues": reportformatvalues,
|
|
14261
|
-
"reportformatschema": reportformatschema,
|
|
14262
|
-
"userid": this.userProfileId,
|
|
14263
|
-
"userrole": this.myRole,
|
|
14264
|
-
"year": this.calendarStartYYYY,
|
|
14265
|
-
"module": listEvent.module ?? "events",
|
|
14266
|
-
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
14267
|
-
})
|
|
14268
|
-
// }
|
|
14214
|
+
} else {
|
|
14269
14215
|
|
|
14270
|
-
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
14271
|
-
// await this.sleep(2000);
|
|
14272
|
-
// this.clearMessages();
|
|
14273
14216
|
|
|
14274
|
-
|
|
14217
|
+
var clickEvent = new MouseEvent("click", {
|
|
14218
|
+
"view": window,
|
|
14219
|
+
"bubbles": true,
|
|
14220
|
+
"cancelable": false
|
|
14221
|
+
});
|
|
14275
14222
|
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14223
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement)!.dispatchEvent(clickEvent);
|
|
14224
|
+
let flagBulk = false;
|
|
14225
|
+
if (this.selectedItemIds.length <= 1) {
|
|
14226
|
+
|
|
14227
|
+
if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
|
|
14228
|
+
console.log('this.events', this.events);
|
|
14229
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
14230
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
14231
|
+
this.events[mmdd][p].documents = docs
|
|
14232
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() })
|
|
14233
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14234
|
+
}
|
|
14235
|
+
}
|
|
14236
|
+
console.log('uploadReport single')
|
|
14237
|
+
if (makercheckers.length > 0) {
|
|
14238
|
+
|
|
14239
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
14240
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
14241
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
14242
|
+
this.events[mmdd][p].approved = true
|
|
14243
|
+
// this.events[mmdd][p].documents = docs
|
|
14244
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() })
|
|
14245
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
14280
14246
|
}
|
|
14247
|
+
}
|
|
14248
|
+
await this.renewAgreement(listEvent, reportformatvalues);
|
|
14249
|
+
console.log('upload report auto approve single')
|
|
14250
|
+
}
|
|
14251
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
14252
|
+
this.recentlyReported[mmdd] = []
|
|
14253
|
+
}
|
|
14254
|
+
this.recentlyReported[mmdd].push(listEvent)
|
|
14255
|
+
}
|
|
14256
|
+
} else {
|
|
14257
|
+
let bulkBody = []
|
|
14258
|
+
let bulkBodyReview = []
|
|
14259
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14260
|
+
|
|
14261
|
+
const selectedId = this.selectedItemIds[k];
|
|
14262
|
+
//console.log('selectedid', selectedId);
|
|
14263
|
+
|
|
14264
|
+
const makercheckersL = selectedId.split('-')[5];
|
|
14265
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
14266
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
14267
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
14268
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
14269
|
+
|
|
14270
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
14271
|
+
|
|
14272
|
+
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
14273
|
+
// if(parseInt(makercheckersL) > 0) {
|
|
14274
|
+
// bulkBodyReview.push({
|
|
14275
|
+
// "mmddyyyy": mmddyyyy,
|
|
14276
|
+
// "projectid": this.projectId,
|
|
14277
|
+
// "type": "report",
|
|
14278
|
+
// "eventid": eventId,
|
|
14279
|
+
// "comments": reportercomments,
|
|
14280
|
+
// "dateofcompletion": reporterdoc,
|
|
14281
|
+
// "percentage": percentage,
|
|
14282
|
+
// "entityid": entityId,
|
|
14283
|
+
// "locationid": locationId,
|
|
14284
|
+
// "event": null,
|
|
14285
|
+
// "docs": JSON.stringify(docs),
|
|
14286
|
+
// "approved": true,
|
|
14287
|
+
// "username": this.userName,
|
|
14288
|
+
// "reportformatvalues": reportformatvalues,
|
|
14289
|
+
// "reportformatschema": reportformatschema,
|
|
14290
|
+
// "userid": this.userProfileId,
|
|
14291
|
+
// "userrole": this.myRole,
|
|
14292
|
+
// "year": this.calendarStartYYYY,
|
|
14293
|
+
// "module": listEvent.module ?? "events"
|
|
14294
|
+
// } )
|
|
14295
|
+
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
14296
|
+
|
|
14297
|
+
// }else{
|
|
14298
|
+
bulkBody.push({
|
|
14299
|
+
"mmddyyyy": mmddyyyy,
|
|
14300
|
+
"projectid": this.projectId,
|
|
14301
|
+
"type": "report",
|
|
14302
|
+
"eventid": eventId,
|
|
14303
|
+
"comments": reportercomments,
|
|
14304
|
+
"dateofcompletion": reporterdoc,
|
|
14305
|
+
"percentage": percentage,
|
|
14306
|
+
"entityid": entityId,
|
|
14307
|
+
"locationid": locationId,
|
|
14308
|
+
"event": null,
|
|
14309
|
+
"docs": JSON.stringify(docs),
|
|
14310
|
+
"username": this.userName,
|
|
14311
|
+
"reportformatvalues": reportformatvalues,
|
|
14312
|
+
"reportformatschema": reportformatschema,
|
|
14313
|
+
"userid": this.userProfileId,
|
|
14314
|
+
"userrole": this.myRole,
|
|
14315
|
+
"year": this.calendarStartYYYY,
|
|
14316
|
+
"module": listEvent.module ?? "events",
|
|
14317
|
+
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
14318
|
+
})
|
|
14319
|
+
// }
|
|
14320
|
+
|
|
14321
|
+
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
14322
|
+
// await this.sleep(2000);
|
|
14323
|
+
// this.clearMessages();
|
|
14281
14324
|
|
|
14282
|
-
|
|
14283
|
-
// await this.uploadReportsReviewsBulk(bulkBodyReview)
|
|
14284
|
-
// }
|
|
14285
|
-
await this.fetchBulkReportingData();
|
|
14286
|
-
console.log('uploadReport bulk')
|
|
14287
|
-
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14288
|
-
|
|
14289
|
-
const selectedId = this.selectedItemIds[k];
|
|
14290
|
-
//console.log('selectedid', selectedId);
|
|
14291
|
-
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
14292
|
-
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
14293
|
-
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
14294
|
-
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
14295
|
-
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1]
|
|
14296
|
-
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
14297
|
-
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
14298
|
-
|
|
14299
|
-
this.events[mmdd][p].isbulk = true
|
|
14300
|
-
flagBulk = true;
|
|
14301
|
-
if (this.recentlyReported[mmdd] == null) {
|
|
14302
|
-
this.recentlyReported[mmdd] = []
|
|
14303
|
-
}
|
|
14304
|
-
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
14305
|
-
}
|
|
14306
|
-
}
|
|
14307
|
-
}
|
|
14325
|
+
}
|
|
14308
14326
|
|
|
14309
|
-
|
|
14327
|
+
// await this.uploadReportsBulk(bulkBody);
|
|
14328
|
+
// await this.fetchBulkReportingData();
|
|
14329
|
+
if (bulkBody.length > 0) {
|
|
14330
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
14331
|
+
}
|
|
14310
14332
|
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14333
|
+
// if(bulkBodyReview.length > 0){
|
|
14334
|
+
// await this.uploadReportsReviewsBulk(bulkBodyReview)
|
|
14335
|
+
// }
|
|
14336
|
+
await this.fetchBulkReportingData();
|
|
14337
|
+
console.log('uploadReport bulk')
|
|
14338
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14339
|
+
|
|
14340
|
+
const selectedId = this.selectedItemIds[k];
|
|
14341
|
+
//console.log('selectedid', selectedId);
|
|
14342
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
14343
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
14344
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
14345
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
14346
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1]
|
|
14347
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
14348
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
14349
|
+
|
|
14350
|
+
this.events[mmdd][p].isbulk = true
|
|
14351
|
+
flagBulk = true;
|
|
14352
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
14353
|
+
this.recentlyReported[mmdd] = []
|
|
14328
14354
|
}
|
|
14355
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p])
|
|
14329
14356
|
}
|
|
14330
|
-
|
|
14331
14357
|
}
|
|
14358
|
+
}
|
|
14332
14359
|
|
|
14360
|
+
}
|
|
14333
14361
|
|
|
14362
|
+
if (this.mode == "next") {
|
|
14363
|
+
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus)
|
|
14364
|
+
} else {
|
|
14365
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
14366
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
14367
|
+
// } else
|
|
14368
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
14369
|
+
const searchString = ((this._SfFindContainer as HTMLDivElement).querySelector('#stream-search') as HTMLInputElement).value;
|
|
14370
|
+
this.processFindSelection((this._SfFindContainer as HTMLDivElement), searchString);
|
|
14371
|
+
} else {
|
|
14372
|
+
if (this.selectedItemIds.length > 0) {
|
|
14373
|
+
await this.fetchBulkReportingData();
|
|
14374
|
+
}
|
|
14375
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk)
|
|
14376
|
+
// if(currentColumnButton != null) {
|
|
14377
|
+
// currentColumnButton.click();
|
|
14378
|
+
// }
|
|
14334
14379
|
}
|
|
14335
14380
|
}
|
|
14381
|
+
|
|
14336
14382
|
}
|
|
14383
|
+
|
|
14384
|
+
|
|
14385
|
+
// }
|
|
14386
|
+
// }
|
|
14387
|
+
// }
|
|
14337
14388
|
});
|
|
14338
14389
|
|
|
14339
14390
|
}
|
|
@@ -22245,7 +22296,7 @@ export class SfIEvents extends LitElement {
|
|
|
22245
22296
|
buttonListReporting[i].style.display = 'block';
|
|
22246
22297
|
}
|
|
22247
22298
|
}
|
|
22248
|
-
if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0) buttonSelect[i].style.display = "flex"
|
|
22299
|
+
if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0 && buttonSelect[i].id.indexOf('-reportformat') < 0) buttonSelect[i].style.display = "flex"
|
|
22249
22300
|
if (eventTitles[i] != null) (eventTitles[i]).style.display = 'flex';
|
|
22250
22301
|
divs[i].style.display = 'block'
|
|
22251
22302
|
} else {
|
|
@@ -22556,12 +22607,14 @@ export class SfIEvents extends LitElement {
|
|
|
22556
22607
|
|
|
22557
22608
|
html += '<button class="tab-button mb-10" id="calendar-tab-month" part="' + (selectedTab == this.TAB_STREAM ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Month</button>';
|
|
22558
22609
|
html += '<button class="tab-button mb-10" id="calendar-tab-custom" part="' + (selectedTab == this.TAB_CUSTOM ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">' + (this.myRole == this.TAB_VIEWER ? "Statistics" : "Range") + '</button>';
|
|
22559
|
-
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
|
|
22564
|
-
|
|
22610
|
+
if (this.selectedFeatures.indexOf('agreements') < 0) {
|
|
22611
|
+
html += '<button class="tab-button mb-10" id="calendar-tab-register" part="' + (selectedTab == this.TAB_REGISTERS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Registers</button>';
|
|
22612
|
+
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_FIND ? '' : 'hide') + '" id="calendar-tab-find" part="' + (selectedTab == this.TAB_FIND ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Search</button>';
|
|
22613
|
+
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_THIS ? '' : 'hide') + '" id="calendar-tab-this" part="' + (selectedTab == this.TAB_THIS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Current</button>';
|
|
22614
|
+
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_YEAR ? '' : 'hide') + '" id="calendar-tab-year" part="' + (selectedTab == this.TAB_YEAR ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Overview</button>';
|
|
22615
|
+
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_ADHOC ? '' : 'hide') + '" id="calendar-tab-adhoc" part="' + (selectedTab == this.TAB_ADHOC ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Adhoc</button>';
|
|
22616
|
+
html += '<button class="tab-button mb-10" id="calendar-tab-next" part="calendar-tab-button-not-selected"><span class="material-symbols-outlined">arrow_forward_ios</span></button>';
|
|
22617
|
+
}
|
|
22565
22618
|
|
|
22566
22619
|
|
|
22567
22620
|
// html += '<button class="tab-button mb-10" id="calendar-tab-upcoming" part="'+(selectedTab == this.TAB_UPCOMING ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected')+'">Upcoming</button>';
|
|
@@ -23894,7 +23947,7 @@ export class SfIEvents extends LitElement {
|
|
|
23894
23947
|
"makercheckers": makercheckers
|
|
23895
23948
|
}
|
|
23896
23949
|
|
|
23897
|
-
|
|
23950
|
+
console.log(body);
|
|
23898
23951
|
let retValue = true;
|
|
23899
23952
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23900
23953
|
const xhr: any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
|