sf-i-events 1.0.864 → 1.0.866
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 +19 -18
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -1
- package/sf-i-events.js +278 -231
- package/src/sf-i-events.ts +299 -247
package/sf-i-events.js
CHANGED
|
@@ -2133,7 +2133,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2133
2133
|
}
|
|
2134
2134
|
}
|
|
2135
2135
|
};
|
|
2136
|
-
this.getComplianceStatus = (completeness, timeliness, percentage, event = {}
|
|
2136
|
+
this.getComplianceStatus = (completeness, timeliness, percentage, event = {}) => {
|
|
2137
2137
|
if (event.module == "agreement") {
|
|
2138
2138
|
if (completeness == "not-started") {
|
|
2139
2139
|
if (timeliness == "in-time") {
|
|
@@ -2543,7 +2543,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2543
2543
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2544
2544
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
2545
2545
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
2546
|
-
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, '_') + '-' + (((_a = event.module) !== null && _a !== void 0 ? _a : 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 + '-' + (((_b = event.module) !== null && _b !== void 0 ? _b : false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' +
|
|
2546
|
+
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, '_') + '-' + (((_a = event.module) !== null && _a !== void 0 ? _a : 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 + '-' + (((_b = event.module) !== null && _b !== void 0 ? _b : 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>';
|
|
2547
2547
|
if (event.reporters != null && remarks.length > 0) {
|
|
2548
2548
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
2549
2549
|
}
|
|
@@ -2824,7 +2824,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2824
2824
|
let approverStr = event.approvers != null ? this.getApproverStringFromEvent(event) : "";
|
|
2825
2825
|
let graphParam = this.getGraphParam(event);
|
|
2826
2826
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
2827
|
-
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>';
|
|
2827
|
+
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>';
|
|
2828
2828
|
// }
|
|
2829
2829
|
return html;
|
|
2830
2830
|
};
|
|
@@ -2887,7 +2887,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2887
2887
|
// //console.log('eventlog1', tempEvents1['06/30'][7].comments, mmdd, j);
|
|
2888
2888
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
2889
2889
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(this.events[mmdd][j])), partStatus);
|
|
2890
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage, JSON.parse(JSON.stringify(this.events[mmdd][j]))
|
|
2890
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage, JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
2891
2891
|
console.log("agreement partStatus", partStatus, lateStatus, complianceStatus);
|
|
2892
2892
|
if (this.flowGraph == this.FLOW_GRAPH_TIMELINESS) {
|
|
2893
2893
|
bgStatus += lateStatus;
|
|
@@ -3321,10 +3321,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3321
3321
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3322
3322
|
html += '<label part="input-label">Approver Comments*</label>';
|
|
3323
3323
|
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3324
|
+
if (event.module != 'agreement') {
|
|
3325
|
+
html += '<label part="input-label">Date of Completion*</label>';
|
|
3326
|
+
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
3327
|
+
html += '<label part="input-label">Percentage</label>';
|
|
3328
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
3329
|
+
}
|
|
3328
3330
|
html += '<div>';
|
|
3329
3331
|
html += '<label part="input-label">Approve?*</label><br />';
|
|
3330
3332
|
html += '<div class="mt-5">';
|
|
@@ -3368,24 +3370,28 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3368
3370
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3369
3371
|
html += '<label part="input-label">Reporter Comments*</label>';
|
|
3370
3372
|
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3373
|
+
if (event.module != 'agreement') {
|
|
3374
|
+
html += '<label part="input-label">Date of Completion*</label>';
|
|
3375
|
+
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 />';
|
|
3376
|
+
html += '<label part="input-label">Completion Percentage*</label>';
|
|
3377
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
|
|
3378
|
+
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 />';
|
|
3379
|
+
}
|
|
3376
3380
|
// if(docsOptional.length === 0) {
|
|
3377
3381
|
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3382
|
+
if (event.module != 'agreement') {
|
|
3383
|
+
html += '<slot name="uploader"></slot>';
|
|
3384
|
+
if (uploadGuidance == 1) {
|
|
3385
|
+
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>';
|
|
3386
|
+
}
|
|
3387
|
+
else if (uploadGuidance != 0) {
|
|
3388
|
+
html += '<div part="upload-guidance-content">';
|
|
3389
|
+
html += '<div part="detail-head" class="mb-5"><strong>Upload Guidance</strong></div>';
|
|
3390
|
+
html += '<sf-i-elastic-text text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
|
|
3391
|
+
html += '</div>';
|
|
3392
|
+
}
|
|
3393
|
+
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>';
|
|
3387
3394
|
}
|
|
3388
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>';
|
|
3389
3395
|
// }
|
|
3390
3396
|
html += '<br />';
|
|
3391
3397
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
@@ -3417,11 +3423,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3417
3423
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3418
3424
|
html += '<label part="input-label">Auditor Comments</label>';
|
|
3419
3425
|
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3426
|
+
if (event.module != 'agreement') {
|
|
3427
|
+
html += '<label part="input-label">Date of Completion</label>';
|
|
3428
|
+
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 />';
|
|
3429
|
+
html += '<label part="input-label">Percentage</label>';
|
|
3430
|
+
html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
|
|
3431
|
+
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 />';
|
|
3432
|
+
}
|
|
3425
3433
|
html += '<div>';
|
|
3426
3434
|
html += '<label part="input-label">Approve?</label><br />';
|
|
3427
3435
|
html += '<div class="mt-5">';
|
|
@@ -4205,7 +4213,15 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4205
4213
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4206
4214
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4207
4215
|
filterSubmitButton.addEventListener('click', () => {
|
|
4208
|
-
this.
|
|
4216
|
+
this.enableCustom();
|
|
4217
|
+
this.renderTabs(this.selectedTab);
|
|
4218
|
+
// this.processDateSelection(eventsContainer);
|
|
4219
|
+
if (this.myRole == this.TAB_VIEWER) {
|
|
4220
|
+
this.renderCustomViewer();
|
|
4221
|
+
}
|
|
4222
|
+
else {
|
|
4223
|
+
this.renderCustom();
|
|
4224
|
+
}
|
|
4209
4225
|
});
|
|
4210
4226
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
4211
4227
|
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
@@ -4877,6 +4893,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4877
4893
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4878
4894
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4879
4895
|
filterSubmitButton.addEventListener('click', () => {
|
|
4896
|
+
this.renderTabs(this.selectedTab);
|
|
4880
4897
|
this.processDateSelectionViewer(eventsContainer);
|
|
4881
4898
|
});
|
|
4882
4899
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
@@ -7182,8 +7199,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7182
7199
|
(_k = this._SfCustomContainer.querySelector('#button-this-year')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', () => {
|
|
7183
7200
|
this._SfCustomContainer.querySelector('#stream-start-date-mobile').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7184
7201
|
this._SfCustomContainer.querySelector('#stream-start-date').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
|
|
7185
|
-
|
|
7186
|
-
|
|
7202
|
+
let year = parseInt(this.calendarStartYYYY);
|
|
7203
|
+
let month = parseInt(this.calendarStartMM) - 1;
|
|
7204
|
+
if (month === 0) {
|
|
7205
|
+
month = 12;
|
|
7206
|
+
year -= 1;
|
|
7207
|
+
}
|
|
7208
|
+
// Pad month
|
|
7209
|
+
const monthStr = month < 10 ? '0' + month : '' + month;
|
|
7210
|
+
// Determine last day of month (safe)
|
|
7211
|
+
const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
|
|
7212
|
+
const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
|
|
7213
|
+
const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
|
|
7214
|
+
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = finalDate;
|
|
7215
|
+
this._SfCustomContainer.querySelector('#stream-end-date').value = finalDate;
|
|
7187
7216
|
this.processDateSelection(this._SfCustomContainer);
|
|
7188
7217
|
});
|
|
7189
7218
|
(_l = this._SfCustomContainer.querySelector('#button-this-quarter-mobile')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', () => {
|
|
@@ -7238,6 +7267,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7238
7267
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
7239
7268
|
this.processDateSelection(this._SfCustomContainer);
|
|
7240
7269
|
});
|
|
7270
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
7271
|
+
this._SfCustomContainer.querySelector('#button-this-year').click();
|
|
7272
|
+
}
|
|
7241
7273
|
// for(var i = 0; i < 3; i++) {
|
|
7242
7274
|
// (this._SfCustomContainer as HTMLDivElement).querySelector('#stream-month-' + i)?.addEventListener('click', (ev: any)=> {
|
|
7243
7275
|
// const target = parseInt((ev.target as HTMLDivElement).id.split('-')[2]);
|
|
@@ -8005,11 +8037,26 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8005
8037
|
console.log('dateresult', dateResult, index);
|
|
8006
8038
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
8007
8039
|
this.currentColumnIndex = index + "";
|
|
8008
|
-
if (
|
|
8009
|
-
|
|
8040
|
+
if (this.selectedFeatures.indexOf('agreements') >= 0) {
|
|
8041
|
+
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
8042
|
+
this.enableCustom();
|
|
8043
|
+
this.renderTabs(this.TAB_CUSTOM);
|
|
8044
|
+
console.log('stats clicked');
|
|
8045
|
+
if (this.myRole == this.TAB_VIEWER) {
|
|
8046
|
+
this.renderCustomViewer();
|
|
8047
|
+
}
|
|
8048
|
+
else {
|
|
8049
|
+
this.renderCustom();
|
|
8050
|
+
}
|
|
8051
|
+
}
|
|
8052
|
+
else {
|
|
8053
|
+
if (dateResult != null) {
|
|
8054
|
+
await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
|
|
8055
|
+
}
|
|
8056
|
+
this.renderTabs(this.TAB_STREAM);
|
|
8057
|
+
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
8058
|
+
this.renderStream(index, showGraph, showBackgroundButton);
|
|
8010
8059
|
}
|
|
8011
|
-
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
8012
|
-
this.renderStream(index, showGraph, showBackgroundButton);
|
|
8013
8060
|
});
|
|
8014
8061
|
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
8015
8062
|
// selectFeatureAll?.addEventListener('click',async(ev: any) => {
|
|
@@ -10006,7 +10053,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10006
10053
|
let docs = listEvent['documents'] == null ? [] : listEvent['documents'] == null ? [] : (listEvent['documents']);
|
|
10007
10054
|
let approved = listEvent['approved'] == null ? false : listEvent['approved'] == null ? false : listEvent['approved'];
|
|
10008
10055
|
let makercheckers = listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'];
|
|
10009
|
-
let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
|
|
10056
|
+
// let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
|
|
10010
10057
|
let html = '';
|
|
10011
10058
|
let documentType = listEvent['documenttype'] == null ? null : listEvent['documenttype'][0] == null ? null : listEvent['documenttype'][0].split(" ")[0];
|
|
10012
10059
|
html += `
|
|
@@ -10193,10 +10240,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10193
10240
|
}
|
|
10194
10241
|
else {
|
|
10195
10242
|
console.log('renew reporting', reportformatvalues);
|
|
10196
|
-
return;
|
|
10197
10243
|
}
|
|
10198
10244
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10199
10245
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10246
|
+
this.events[mmdd][p].approved = approved;
|
|
10200
10247
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
10201
10248
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10202
10249
|
}
|
|
@@ -10421,17 +10468,19 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10421
10468
|
buttonClick.innerHTML = "Saving...";
|
|
10422
10469
|
const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
|
|
10423
10470
|
//console.log('reporter comments 1', reportercomments);
|
|
10424
|
-
const reporterdoc = this._SfDetailContainer.querySelector('#input-reporter-doc').value.length > 0 ? (new Date(this._SfDetailContainer.querySelector('#input-reporter-doc').value).getTime() + "") : "";
|
|
10471
|
+
// 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() + "") : "";
|
|
10472
|
+
const reporterdoc = new Date().getTime() + "";
|
|
10425
10473
|
let docs = [];
|
|
10426
10474
|
//console.log('reporter comments 2', reportercomments);
|
|
10427
10475
|
// if(docsOptional.length === 0) {
|
|
10428
|
-
docs = this._SfUploader[0].querySelector('#uploader')
|
|
10476
|
+
// docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
10429
10477
|
// }
|
|
10430
10478
|
//console.log('docs', docs);
|
|
10431
10479
|
let reportformatvalues = "";
|
|
10432
10480
|
let reportformatschema = "";
|
|
10433
10481
|
if (listEvent.customreporting != null) {
|
|
10434
10482
|
let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
|
|
10483
|
+
console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()));
|
|
10435
10484
|
reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
10436
10485
|
reportformatschema = (_b = reportingReporting.configjson) !== null && _b !== void 0 ? _b : "";
|
|
10437
10486
|
}
|
|
@@ -10439,204 +10488,200 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10439
10488
|
if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
|
|
10440
10489
|
percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
|
|
10441
10490
|
}
|
|
10442
|
-
if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
10443
|
-
|
|
10491
|
+
// if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
10492
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
10493
|
+
// buttonClick.innerHTML = "Save"
|
|
10494
|
+
// this.setError('Invalid Percentage!');
|
|
10495
|
+
// setTimeout(() => {
|
|
10496
|
+
// this.clearMessages();
|
|
10497
|
+
// }, 3000);
|
|
10498
|
+
// } else {
|
|
10499
|
+
// if (docs.length === 0 && docsOptional.length === 0) {
|
|
10500
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
10501
|
+
// buttonClick.innerHTML = "Save"
|
|
10502
|
+
// this.setError('No documents uploaded!');
|
|
10503
|
+
// setTimeout(() => {
|
|
10504
|
+
// this.clearMessages();
|
|
10505
|
+
// }, 3000);
|
|
10506
|
+
// } else {
|
|
10507
|
+
// //console.log('reporterdoc', reporterdoc);
|
|
10508
|
+
// if (reporterdoc.length === 0) {
|
|
10509
|
+
// buttonClick.innerHTML = "Save"
|
|
10510
|
+
// this.setError('Date of completion not selected!');
|
|
10511
|
+
// setTimeout(() => {
|
|
10512
|
+
// this.clearMessages();
|
|
10513
|
+
// }, 3000);
|
|
10514
|
+
// } else if (parseInt(reporterdoc) > new Date().getTime()) {
|
|
10515
|
+
// buttonClick.innerHTML = "Save"
|
|
10516
|
+
// this.setError('Date of completion cannot be in future!');
|
|
10517
|
+
// setTimeout(() => {
|
|
10518
|
+
// this.clearMessages();
|
|
10519
|
+
// }, 3000);
|
|
10520
|
+
// } else {
|
|
10521
|
+
//console.log('makerscheckers 1', reportercomments);
|
|
10522
|
+
if (reportercomments.trim().length === 0) {
|
|
10444
10523
|
buttonClick.innerHTML = "Save";
|
|
10445
|
-
this.setError('
|
|
10524
|
+
this.setError('Comments cannot be blank!');
|
|
10446
10525
|
setTimeout(() => {
|
|
10447
10526
|
this.clearMessages();
|
|
10448
10527
|
}, 3000);
|
|
10449
10528
|
}
|
|
10450
10529
|
else {
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10530
|
+
var clickEvent = new MouseEvent("click", {
|
|
10531
|
+
"view": window,
|
|
10532
|
+
"bubbles": true,
|
|
10533
|
+
"cancelable": false
|
|
10534
|
+
});
|
|
10535
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10536
|
+
let flagBulk = false;
|
|
10537
|
+
if (this.selectedItemIds.length <= 1) {
|
|
10538
|
+
if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
|
|
10539
|
+
console.log('this.events', this.events);
|
|
10540
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10541
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10542
|
+
this.events[mmdd][p].documents = docs;
|
|
10543
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
10544
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10545
|
+
}
|
|
10546
|
+
}
|
|
10547
|
+
console.log('uploadReport single');
|
|
10548
|
+
if (makercheckers.length > 0) {
|
|
10549
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
10550
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10551
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10552
|
+
this.events[mmdd][p].approved = true;
|
|
10553
|
+
// this.events[mmdd][p].documents = docs
|
|
10554
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
10555
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10556
|
+
}
|
|
10557
|
+
}
|
|
10558
|
+
await this.renewAgreement(listEvent, reportformatvalues);
|
|
10559
|
+
console.log('upload report auto approve single');
|
|
10560
|
+
}
|
|
10561
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10562
|
+
this.recentlyReported[mmdd] = [];
|
|
10563
|
+
}
|
|
10564
|
+
this.recentlyReported[mmdd].push(listEvent);
|
|
10565
|
+
}
|
|
10458
10566
|
}
|
|
10459
10567
|
else {
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10568
|
+
let bulkBody = [];
|
|
10569
|
+
let bulkBodyReview = [];
|
|
10570
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10571
|
+
const selectedId = this.selectedItemIds[k];
|
|
10572
|
+
//console.log('selectedid', selectedId);
|
|
10573
|
+
const makercheckersL = selectedId.split('-')[5];
|
|
10574
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10575
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10576
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10577
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10578
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
10579
|
+
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
10580
|
+
// if(parseInt(makercheckersL) > 0) {
|
|
10581
|
+
// bulkBodyReview.push({
|
|
10582
|
+
// "mmddyyyy": mmddyyyy,
|
|
10583
|
+
// "projectid": this.projectId,
|
|
10584
|
+
// "type": "report",
|
|
10585
|
+
// "eventid": eventId,
|
|
10586
|
+
// "comments": reportercomments,
|
|
10587
|
+
// "dateofcompletion": reporterdoc,
|
|
10588
|
+
// "percentage": percentage,
|
|
10589
|
+
// "entityid": entityId,
|
|
10590
|
+
// "locationid": locationId,
|
|
10591
|
+
// "event": null,
|
|
10592
|
+
// "docs": JSON.stringify(docs),
|
|
10593
|
+
// "approved": true,
|
|
10594
|
+
// "username": this.userName,
|
|
10595
|
+
// "reportformatvalues": reportformatvalues,
|
|
10596
|
+
// "reportformatschema": reportformatschema,
|
|
10597
|
+
// "userid": this.userProfileId,
|
|
10598
|
+
// "userrole": this.myRole,
|
|
10599
|
+
// "year": this.calendarStartYYYY,
|
|
10600
|
+
// "module": listEvent.module ?? "events"
|
|
10601
|
+
// } )
|
|
10602
|
+
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10603
|
+
// }else{
|
|
10604
|
+
bulkBody.push({
|
|
10605
|
+
"mmddyyyy": mmddyyyy,
|
|
10606
|
+
"projectid": this.projectId,
|
|
10607
|
+
"type": "report",
|
|
10608
|
+
"eventid": eventId,
|
|
10609
|
+
"comments": reportercomments,
|
|
10610
|
+
"dateofcompletion": reporterdoc,
|
|
10611
|
+
"percentage": percentage,
|
|
10612
|
+
"entityid": entityId,
|
|
10613
|
+
"locationid": locationId,
|
|
10614
|
+
"event": null,
|
|
10615
|
+
"docs": JSON.stringify(docs),
|
|
10616
|
+
"username": this.userName,
|
|
10617
|
+
"reportformatvalues": reportformatvalues,
|
|
10618
|
+
"reportformatschema": reportformatschema,
|
|
10619
|
+
"userid": this.userProfileId,
|
|
10620
|
+
"userrole": this.myRole,
|
|
10621
|
+
"year": this.calendarStartYYYY,
|
|
10622
|
+
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "events",
|
|
10623
|
+
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10624
|
+
});
|
|
10625
|
+
// }
|
|
10626
|
+
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
10627
|
+
// await this.sleep(2000);
|
|
10628
|
+
// this.clearMessages();
|
|
10467
10629
|
}
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
this.clearMessages();
|
|
10473
|
-
}, 3000);
|
|
10630
|
+
// await this.uploadReportsBulk(bulkBody);
|
|
10631
|
+
// await this.fetchBulkReportingData();
|
|
10632
|
+
if (bulkBody.length > 0) {
|
|
10633
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
10474
10634
|
}
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
console.log('this.events', this.events);
|
|
10495
|
-
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10496
|
-
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10497
|
-
this.events[mmdd][p].documents = docs;
|
|
10498
|
-
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
10499
|
-
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10500
|
-
}
|
|
10501
|
-
}
|
|
10502
|
-
console.log('uploadReport single');
|
|
10503
|
-
if (makercheckers.length > 0) {
|
|
10504
|
-
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
10505
|
-
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10506
|
-
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10507
|
-
this.events[mmdd][p].approved = true;
|
|
10508
|
-
// this.events[mmdd][p].documents = docs
|
|
10509
|
-
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
10510
|
-
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10511
|
-
}
|
|
10512
|
-
}
|
|
10513
|
-
await this.renewAgreement(listEvent, reportformatvalues);
|
|
10514
|
-
console.log('upload report auto approve single');
|
|
10515
|
-
}
|
|
10516
|
-
if (this.recentlyReported[mmdd] == null) {
|
|
10517
|
-
this.recentlyReported[mmdd] = [];
|
|
10518
|
-
}
|
|
10519
|
-
this.recentlyReported[mmdd].push(listEvent);
|
|
10520
|
-
}
|
|
10521
|
-
}
|
|
10522
|
-
else {
|
|
10523
|
-
let bulkBody = [];
|
|
10524
|
-
let bulkBodyReview = [];
|
|
10525
|
-
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10526
|
-
const selectedId = this.selectedItemIds[k];
|
|
10527
|
-
//console.log('selectedid', selectedId);
|
|
10528
|
-
const makercheckersL = selectedId.split('-')[5];
|
|
10529
|
-
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10530
|
-
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10531
|
-
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10532
|
-
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10533
|
-
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
10534
|
-
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
10535
|
-
// if(parseInt(makercheckersL) > 0) {
|
|
10536
|
-
// bulkBodyReview.push({
|
|
10537
|
-
// "mmddyyyy": mmddyyyy,
|
|
10538
|
-
// "projectid": this.projectId,
|
|
10539
|
-
// "type": "report",
|
|
10540
|
-
// "eventid": eventId,
|
|
10541
|
-
// "comments": reportercomments,
|
|
10542
|
-
// "dateofcompletion": reporterdoc,
|
|
10543
|
-
// "percentage": percentage,
|
|
10544
|
-
// "entityid": entityId,
|
|
10545
|
-
// "locationid": locationId,
|
|
10546
|
-
// "event": null,
|
|
10547
|
-
// "docs": JSON.stringify(docs),
|
|
10548
|
-
// "approved": true,
|
|
10549
|
-
// "username": this.userName,
|
|
10550
|
-
// "reportformatvalues": reportformatvalues,
|
|
10551
|
-
// "reportformatschema": reportformatschema,
|
|
10552
|
-
// "userid": this.userProfileId,
|
|
10553
|
-
// "userrole": this.myRole,
|
|
10554
|
-
// "year": this.calendarStartYYYY,
|
|
10555
|
-
// "module": listEvent.module ?? "events"
|
|
10556
|
-
// } )
|
|
10557
|
-
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10558
|
-
// }else{
|
|
10559
|
-
bulkBody.push({
|
|
10560
|
-
"mmddyyyy": mmddyyyy,
|
|
10561
|
-
"projectid": this.projectId,
|
|
10562
|
-
"type": "report",
|
|
10563
|
-
"eventid": eventId,
|
|
10564
|
-
"comments": reportercomments,
|
|
10565
|
-
"dateofcompletion": reporterdoc,
|
|
10566
|
-
"percentage": percentage,
|
|
10567
|
-
"entityid": entityId,
|
|
10568
|
-
"locationid": locationId,
|
|
10569
|
-
"event": null,
|
|
10570
|
-
"docs": JSON.stringify(docs),
|
|
10571
|
-
"username": this.userName,
|
|
10572
|
-
"reportformatvalues": reportformatvalues,
|
|
10573
|
-
"reportformatschema": reportformatschema,
|
|
10574
|
-
"userid": this.userProfileId,
|
|
10575
|
-
"userrole": this.myRole,
|
|
10576
|
-
"year": this.calendarStartYYYY,
|
|
10577
|
-
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "events",
|
|
10578
|
-
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10579
|
-
});
|
|
10580
|
-
// }
|
|
10581
|
-
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
10582
|
-
// await this.sleep(2000);
|
|
10583
|
-
// this.clearMessages();
|
|
10584
|
-
}
|
|
10585
|
-
// await this.uploadReportsBulk(bulkBody);
|
|
10586
|
-
// await this.fetchBulkReportingData();
|
|
10587
|
-
if (bulkBody.length > 0) {
|
|
10588
|
-
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
10589
|
-
}
|
|
10590
|
-
// if(bulkBodyReview.length > 0){
|
|
10591
|
-
// await this.uploadReportsReviewsBulk(bulkBodyReview)
|
|
10592
|
-
// }
|
|
10593
|
-
await this.fetchBulkReportingData();
|
|
10594
|
-
console.log('uploadReport bulk');
|
|
10595
|
-
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10596
|
-
const selectedId = this.selectedItemIds[k];
|
|
10597
|
-
//console.log('selectedid', selectedId);
|
|
10598
|
-
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10599
|
-
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10600
|
-
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10601
|
-
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10602
|
-
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
10603
|
-
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10604
|
-
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10605
|
-
this.events[mmdd][p].isbulk = true;
|
|
10606
|
-
flagBulk = true;
|
|
10607
|
-
if (this.recentlyReported[mmdd] == null) {
|
|
10608
|
-
this.recentlyReported[mmdd] = [];
|
|
10609
|
-
}
|
|
10610
|
-
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10611
|
-
}
|
|
10612
|
-
}
|
|
10613
|
-
}
|
|
10614
|
-
}
|
|
10615
|
-
if (this.mode == "next") {
|
|
10616
|
-
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
10617
|
-
}
|
|
10618
|
-
else {
|
|
10619
|
-
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10620
|
-
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10621
|
-
// } else
|
|
10622
|
-
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
10623
|
-
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
10624
|
-
this.processFindSelection(this._SfFindContainer, searchString);
|
|
10625
|
-
}
|
|
10626
|
-
else {
|
|
10627
|
-
if (this.selectedItemIds.length > 0) {
|
|
10628
|
-
await this.fetchBulkReportingData();
|
|
10629
|
-
}
|
|
10630
|
-
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
10631
|
-
// if(currentColumnButton != null) {
|
|
10632
|
-
// currentColumnButton.click();
|
|
10633
|
-
// }
|
|
10635
|
+
// if(bulkBodyReview.length > 0){
|
|
10636
|
+
// await this.uploadReportsReviewsBulk(bulkBodyReview)
|
|
10637
|
+
// }
|
|
10638
|
+
await this.fetchBulkReportingData();
|
|
10639
|
+
console.log('uploadReport bulk');
|
|
10640
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10641
|
+
const selectedId = this.selectedItemIds[k];
|
|
10642
|
+
//console.log('selectedid', selectedId);
|
|
10643
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10644
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10645
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10646
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10647
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
10648
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10649
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10650
|
+
this.events[mmdd][p].isbulk = true;
|
|
10651
|
+
flagBulk = true;
|
|
10652
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10653
|
+
this.recentlyReported[mmdd] = [];
|
|
10634
10654
|
}
|
|
10655
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10635
10656
|
}
|
|
10636
10657
|
}
|
|
10637
10658
|
}
|
|
10638
10659
|
}
|
|
10660
|
+
if (this.mode == "next") {
|
|
10661
|
+
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
10662
|
+
}
|
|
10663
|
+
else {
|
|
10664
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10665
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10666
|
+
// } else
|
|
10667
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
10668
|
+
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
10669
|
+
this.processFindSelection(this._SfFindContainer, searchString);
|
|
10670
|
+
}
|
|
10671
|
+
else {
|
|
10672
|
+
if (this.selectedItemIds.length > 0) {
|
|
10673
|
+
await this.fetchBulkReportingData();
|
|
10674
|
+
}
|
|
10675
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
10676
|
+
// if(currentColumnButton != null) {
|
|
10677
|
+
// currentColumnButton.click();
|
|
10678
|
+
// }
|
|
10679
|
+
}
|
|
10680
|
+
}
|
|
10639
10681
|
}
|
|
10682
|
+
// }
|
|
10683
|
+
// }
|
|
10684
|
+
// }
|
|
10640
10685
|
});
|
|
10641
10686
|
}
|
|
10642
10687
|
}
|
|
@@ -16948,7 +16993,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16948
16993
|
buttonListReporting[i].style.display = 'block';
|
|
16949
16994
|
}
|
|
16950
16995
|
}
|
|
16951
|
-
if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0)
|
|
16996
|
+
if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0 && buttonSelect[i].id.indexOf('-reportformat') < 0)
|
|
16952
16997
|
buttonSelect[i].style.display = "flex";
|
|
16953
16998
|
if (eventTitles[i] != null)
|
|
16954
16999
|
(eventTitles[i]).style.display = 'flex';
|
|
@@ -17202,12 +17247,14 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17202
17247
|
var html = '';
|
|
17203
17248
|
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>';
|
|
17204
17249
|
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>';
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17250
|
+
if (this.selectedFeatures.indexOf('agreements') < 0) {
|
|
17251
|
+
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>';
|
|
17252
|
+
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>';
|
|
17253
|
+
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>';
|
|
17254
|
+
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>';
|
|
17255
|
+
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>';
|
|
17256
|
+
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>';
|
|
17257
|
+
}
|
|
17211
17258
|
// 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>';
|
|
17212
17259
|
// html += '<button class="tab-button mb-10" id="calendar-tab-past" part="'+(selectedTab == this.TAB_PAST ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected')+'">Past</button>';
|
|
17213
17260
|
this._SfTabContainer.innerHTML = html;
|
|
@@ -18286,7 +18333,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18286
18333
|
"module": module,
|
|
18287
18334
|
"makercheckers": makercheckers
|
|
18288
18335
|
};
|
|
18289
|
-
|
|
18336
|
+
console.log(body);
|
|
18290
18337
|
let retValue = true;
|
|
18291
18338
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
18292
18339
|
const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
|
|
@@ -20479,7 +20526,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20479
20526
|
var complianceStatus = "";
|
|
20480
20527
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(eventsData[role][mmdd][j])));
|
|
20481
20528
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])), partStatus);
|
|
20482
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])).percentage, JSON.parse(JSON.stringify(eventsData[role][mmdd][j]))
|
|
20529
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])).percentage, JSON.parse(JSON.stringify(eventsData[role][mmdd][j])));
|
|
20483
20530
|
notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
|
|
20484
20531
|
pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
|
|
20485
20532
|
rejected = rejected + (partStatus == "rejected" ? 1 : 0);
|
|
@@ -21027,7 +21074,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21027
21074
|
continue;
|
|
21028
21075
|
}
|
|
21029
21076
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(eventsData[mmdd][j])), partStatus);
|
|
21030
|
-
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[mmdd][j])).percentage, JSON.parse(JSON.stringify(eventsData[mmdd][j]))
|
|
21077
|
+
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(eventsData[mmdd][j])).percentage, JSON.parse(JSON.stringify(eventsData[mmdd][j])));
|
|
21031
21078
|
// notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
|
|
21032
21079
|
// pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
|
|
21033
21080
|
// rejected = rejected + (partStatus == "rejected" ? 1 : 0);
|