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/sf-i-events.js CHANGED
@@ -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>' + (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><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) ? ('&nbsp;&nbsp;<div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</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") + (((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) ? ('&nbsp;&nbsp;<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
  };
@@ -3311,7 +3311,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3311
3311
  html += '<button class="invisible" part="button">Save</button>';
3312
3312
  html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>';
3313
3313
  html += '</div>';
3314
- if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
3314
+ if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'agreement') {
3315
3315
  html += '<div class="m-20">';
3316
3316
  html += '<label part="input-label">Supporting Documents</label>';
3317
3317
  html += '<slot name="uploader"></slot>';
@@ -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
- html += '<label part="input-label">Date of Completion*</label>';
3325
- html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
3326
- html += '<label part="input-label">Percentage</label>';
3327
- html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
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,26 @@ 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
- html += '<label part="input-label">Date of Completion*</label>';
3372
- 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 />';
3373
- html += '<label part="input-label">Completion Percentage*</label>';
3374
- html += '<input id="input-reporter-percentage" part="input" type="number" value="' + percentage + '" max="100" min="0" step="1"/><br />';
3375
- 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 />';
3376
- // if(docsOptional.length === 0) {
3377
- html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
3378
- html += '<slot name="uploader"></slot>';
3379
- if (uploadGuidance == 1) {
3380
- 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>&nbsp;<span>Get Help</span></div>';
3381
- }
3382
- else if (uploadGuidance != 0) {
3383
- html += '<div part="upload-guidance-content">';
3384
- html += '<div part="detail-head" class="mb-5"><strong>Upload Guidance</strong></div>';
3385
- html += '<sf-i-elastic-text text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
3386
- html += '</div>';
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
+ // if(docsOptional.length === 0) {
3380
+ html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
3381
+ html += '<slot name="uploader"></slot>';
3382
+ if (uploadGuidance == 1) {
3383
+ 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>&nbsp;<span>Get Help</span></div>';
3384
+ }
3385
+ else if (uploadGuidance != 0) {
3386
+ html += '<div part="upload-guidance-content">';
3387
+ html += '<div part="detail-head" class="mb-5"><strong>Upload Guidance</strong></div>';
3388
+ html += '<sf-i-elastic-text text="' + (event['uploadguidance'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="150"></sf-i-elastic-text>';
3389
+ html += '</div>';
3390
+ }
3391
+ 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
3392
  }
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
3393
  // }
3390
3394
  html += '<br />';
3391
3395
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
@@ -3417,11 +3421,13 @@ let SfIEvents = class SfIEvents extends LitElement {
3417
3421
  html += '<div class="d-flex m-20 flex-col">';
3418
3422
  html += '<label part="input-label">Auditor Comments</label>';
3419
3423
  html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
3420
- html += '<label part="input-label">Date of Completion</label>';
3421
- 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 />';
3422
- html += '<label part="input-label">Percentage</label>';
3423
- html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
3424
- 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 />';
3424
+ if (event.module != 'agreement') {
3425
+ html += '<label part="input-label">Date of Completion</label>';
3426
+ 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 />';
3427
+ html += '<label part="input-label">Percentage</label>';
3428
+ html += '<input id="input-reporter-percentage" part="input" type="number" max="100" min="0" step="1" value="' + percentage + '" disabled/><br />';
3429
+ 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 />';
3430
+ }
3425
3431
  html += '<div>';
3426
3432
  html += '<label part="input-label">Approve?</label><br />';
3427
3433
  html += '<div class="mt-5">';
@@ -4205,7 +4211,15 @@ let SfIEvents = class SfIEvents extends LitElement {
4205
4211
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
4206
4212
  const filterSubmitButton = filterList.querySelector('#button-submit-features');
4207
4213
  filterSubmitButton.addEventListener('click', () => {
4208
- this.processDateSelection(eventsContainer);
4214
+ this.enableCustom();
4215
+ this.renderTabs(this.selectedTab);
4216
+ // this.processDateSelection(eventsContainer);
4217
+ if (this.myRole == this.TAB_VIEWER) {
4218
+ this.renderCustomViewer();
4219
+ }
4220
+ else {
4221
+ this.renderCustom();
4222
+ }
4209
4223
  });
4210
4224
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
4211
4225
  // selectFeatureAll.addEventListener('click',async(ev: any) => {
@@ -4877,6 +4891,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4877
4891
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
4878
4892
  const filterSubmitButton = filterList.querySelector('#button-submit-features');
4879
4893
  filterSubmitButton.addEventListener('click', () => {
4894
+ this.renderTabs(this.selectedTab);
4880
4895
  this.processDateSelectionViewer(eventsContainer);
4881
4896
  });
4882
4897
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
@@ -7182,8 +7197,20 @@ let SfIEvents = class SfIEvents extends LitElement {
7182
7197
  (_k = this._SfCustomContainer.querySelector('#button-this-year')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', () => {
7183
7198
  this._SfCustomContainer.querySelector('#stream-start-date-mobile').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
7184
7199
  this._SfCustomContainer.querySelector('#stream-start-date').value = this.calendarStartYYYY + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
7185
- this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = (parseInt(this.calendarStartYYYY) + 1) + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
7186
- this._SfCustomContainer.querySelector('#stream-end-date').value = (parseInt(this.calendarStartYYYY) + 1) + '-' + this.calendarStartMM + '-' + this.calendarStartDD;
7200
+ let year = parseInt(this.calendarStartYYYY);
7201
+ let month = parseInt(this.calendarStartMM) - 1;
7202
+ if (month === 0) {
7203
+ month = 12;
7204
+ year -= 1;
7205
+ }
7206
+ // Pad month
7207
+ const monthStr = month < 10 ? '0' + month : '' + month;
7208
+ // Determine last day of month (safe)
7209
+ const lastDay = new Date(year, month, 0).getDate(); // day 0 of next month gives last day of `month`
7210
+ const dayStr = lastDay < 10 ? '0' + lastDay : '' + lastDay;
7211
+ const finalDate = `${year + 1}-${monthStr}-${dayStr}`;
7212
+ this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = finalDate;
7213
+ this._SfCustomContainer.querySelector('#stream-end-date').value = finalDate;
7187
7214
  this.processDateSelection(this._SfCustomContainer);
7188
7215
  });
7189
7216
  (_l = this._SfCustomContainer.querySelector('#button-this-quarter-mobile')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', () => {
@@ -7238,6 +7265,9 @@ let SfIEvents = class SfIEvents extends LitElement {
7238
7265
  this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
7239
7266
  this.processDateSelection(this._SfCustomContainer);
7240
7267
  });
7268
+ if (this.selectedFeatures.indexOf('agreements') >= 0) {
7269
+ this._SfCustomContainer.querySelector('#button-this-year').click();
7270
+ }
7241
7271
  // for(var i = 0; i < 3; i++) {
7242
7272
  // (this._SfCustomContainer as HTMLDivElement).querySelector('#stream-month-' + i)?.addEventListener('click', (ev: any)=> {
7243
7273
  // const target = parseInt((ev.target as HTMLDivElement).id.split('-')[2]);
@@ -8005,11 +8035,26 @@ let SfIEvents = class SfIEvents extends LitElement {
8005
8035
  console.log('dateresult', dateResult, index);
8006
8036
  console.log('selectedfeatures', this.selectedFeatures);
8007
8037
  this.currentColumnIndex = index + "";
8008
- if (dateResult != null) {
8009
- await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
8038
+ if (this.selectedFeatures.indexOf('agreements') >= 0) {
8039
+ this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
8040
+ this.enableCustom();
8041
+ this.renderTabs(this.TAB_CUSTOM);
8042
+ console.log('stats clicked');
8043
+ if (this.myRole == this.TAB_VIEWER) {
8044
+ this.renderCustomViewer();
8045
+ }
8046
+ else {
8047
+ this.renderCustom();
8048
+ }
8049
+ }
8050
+ else {
8051
+ if (dateResult != null) {
8052
+ await this.renderWithFeatures(dateResult.startDate, dateResult.endDate, "", "no", ("0" + monthResult).slice(-2));
8053
+ }
8054
+ this.renderTabs(this.TAB_STREAM);
8055
+ this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
8056
+ this.renderStream(index, showGraph, showBackgroundButton);
8010
8057
  }
8011
- this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
8012
- this.renderStream(index, showGraph, showBackgroundButton);
8013
8058
  });
8014
8059
  // const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
8015
8060
  // selectFeatureAll?.addEventListener('click',async(ev: any) => {
@@ -10006,7 +10051,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10006
10051
  let docs = listEvent['documents'] == null ? [] : listEvent['documents'] == null ? [] : (listEvent['documents']);
10007
10052
  let approved = listEvent['approved'] == null ? false : listEvent['approved'] == null ? false : listEvent['approved'];
10008
10053
  let makercheckers = listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'];
10009
- let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
10054
+ // let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
10010
10055
  let html = '';
10011
10056
  let documentType = listEvent['documenttype'] == null ? null : listEvent['documenttype'][0] == null ? null : listEvent['documenttype'][0].split(" ")[0];
10012
10057
  html += `
@@ -10098,6 +10143,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10098
10143
  reportingReporting.configjson = reportingSchemaJson;
10099
10144
  if (reportingSchemaValues != "")
10100
10145
  reportingReporting.prepopulateValJson = reportingSchemaValues;
10146
+ reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
10101
10147
  reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
10102
10148
  reportingReporting.flow = "reporting";
10103
10149
  setTimeout(() => {
@@ -10193,10 +10239,10 @@ let SfIEvents = class SfIEvents extends LitElement {
10193
10239
  }
10194
10240
  else {
10195
10241
  console.log('renew reporting', reportformatvalues);
10196
- return;
10197
10242
  }
10198
10243
  for (var p = 0; p < this.events[mmdd].length; p++) {
10199
10244
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10245
+ this.events[mmdd][p].approved = approved;
10200
10246
  this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10201
10247
  this.events[mmdd][p].lastupdated = new Date().toString();
10202
10248
  }
@@ -10297,7 +10343,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10297
10343
  const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
10298
10344
  if (approved == listEvent.approved) {
10299
10345
  buttonClick.innerHTML = "Save";
10300
- this.setError('Already Approved!');
10346
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
10301
10347
  setTimeout(() => {
10302
10348
  this.clearMessages();
10303
10349
  }, 3000);
@@ -10421,17 +10467,19 @@ let SfIEvents = class SfIEvents extends LitElement {
10421
10467
  buttonClick.innerHTML = "Saving...";
10422
10468
  const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
10423
10469
  //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() + "") : "";
10470
+ // 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() + "") : "";
10471
+ const reporterdoc = new Date().getTime() + "";
10425
10472
  let docs = [];
10426
10473
  //console.log('reporter comments 2', reportercomments);
10427
10474
  // if(docsOptional.length === 0) {
10428
- docs = this._SfUploader[0].querySelector('#uploader').selectedValues();
10475
+ // docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
10429
10476
  // }
10430
10477
  //console.log('docs', docs);
10431
10478
  let reportformatvalues = "";
10432
10479
  let reportformatschema = "";
10433
10480
  if (listEvent.customreporting != null) {
10434
10481
  let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
10482
+ console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()));
10435
10483
  reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
10436
10484
  reportformatschema = (_b = reportingReporting.configjson) !== null && _b !== void 0 ? _b : "";
10437
10485
  }
@@ -10439,204 +10487,200 @@ let SfIEvents = class SfIEvents extends LitElement {
10439
10487
  if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
10440
10488
  percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
10441
10489
  }
10442
- if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
10443
- //console.log('reporter comments 3', reportercomments);
10490
+ // if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
10491
+ // //console.log('reporter comments 3', reportercomments);
10492
+ // buttonClick.innerHTML = "Save"
10493
+ // this.setError('Invalid Percentage!');
10494
+ // setTimeout(() => {
10495
+ // this.clearMessages();
10496
+ // }, 3000);
10497
+ // } else {
10498
+ // if (docs.length === 0 && docsOptional.length === 0) {
10499
+ // //console.log('reporter comments 3', reportercomments);
10500
+ // buttonClick.innerHTML = "Save"
10501
+ // this.setError('No documents uploaded!');
10502
+ // setTimeout(() => {
10503
+ // this.clearMessages();
10504
+ // }, 3000);
10505
+ // } else {
10506
+ // //console.log('reporterdoc', reporterdoc);
10507
+ // if (reporterdoc.length === 0) {
10508
+ // buttonClick.innerHTML = "Save"
10509
+ // this.setError('Date of completion not selected!');
10510
+ // setTimeout(() => {
10511
+ // this.clearMessages();
10512
+ // }, 3000);
10513
+ // } else if (parseInt(reporterdoc) > new Date().getTime()) {
10514
+ // buttonClick.innerHTML = "Save"
10515
+ // this.setError('Date of completion cannot be in future!');
10516
+ // setTimeout(() => {
10517
+ // this.clearMessages();
10518
+ // }, 3000);
10519
+ // } else {
10520
+ //console.log('makerscheckers 1', reportercomments);
10521
+ if (reportercomments.trim().length === 0) {
10444
10522
  buttonClick.innerHTML = "Save";
10445
- this.setError('Invalid Percentage!');
10523
+ this.setError('Comments cannot be blank!');
10446
10524
  setTimeout(() => {
10447
10525
  this.clearMessages();
10448
10526
  }, 3000);
10449
10527
  }
10450
10528
  else {
10451
- if (docs.length === 0 && docsOptional.length === 0) {
10452
- //console.log('reporter comments 3', reportercomments);
10453
- buttonClick.innerHTML = "Save";
10454
- this.setError('No documents uploaded!');
10455
- setTimeout(() => {
10456
- this.clearMessages();
10457
- }, 3000);
10529
+ var clickEvent = new MouseEvent("click", {
10530
+ "view": window,
10531
+ "bubbles": true,
10532
+ "cancelable": false
10533
+ });
10534
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10535
+ let flagBulk = false;
10536
+ if (this.selectedItemIds.length <= 1) {
10537
+ if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
10538
+ console.log('this.events', this.events);
10539
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10540
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10541
+ this.events[mmdd][p].documents = docs;
10542
+ this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
10543
+ this.events[mmdd][p].lastupdated = new Date().toString();
10544
+ }
10545
+ }
10546
+ console.log('uploadReport single');
10547
+ if (makercheckers.length > 0) {
10548
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
10549
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10550
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10551
+ this.events[mmdd][p].approved = true;
10552
+ // this.events[mmdd][p].documents = docs
10553
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10554
+ this.events[mmdd][p].lastupdated = new Date().toString();
10555
+ }
10556
+ }
10557
+ await this.renewAgreement(listEvent, reportformatvalues);
10558
+ console.log('upload report auto approve single');
10559
+ }
10560
+ if (this.recentlyReported[mmdd] == null) {
10561
+ this.recentlyReported[mmdd] = [];
10562
+ }
10563
+ this.recentlyReported[mmdd].push(listEvent);
10564
+ }
10458
10565
  }
10459
10566
  else {
10460
- //console.log('reporterdoc', reporterdoc);
10461
- if (reporterdoc.length === 0) {
10462
- buttonClick.innerHTML = "Save";
10463
- this.setError('Date of completion not selected!');
10464
- setTimeout(() => {
10465
- this.clearMessages();
10466
- }, 3000);
10567
+ let bulkBody = [];
10568
+ let bulkBodyReview = [];
10569
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10570
+ const selectedId = this.selectedItemIds[k];
10571
+ //console.log('selectedid', selectedId);
10572
+ const makercheckersL = selectedId.split('-')[5];
10573
+ entityId = selectedId.split('-')[7].replace(/_/g, '-');
10574
+ locationId = selectedId.split('-')[8].replace(/_/g, '-');
10575
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10576
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10577
+ //console.log(entityId, locationId, eventId, mmddyyyy);
10578
+ // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
10579
+ // if(parseInt(makercheckersL) > 0) {
10580
+ // bulkBodyReview.push({
10581
+ // "mmddyyyy": mmddyyyy,
10582
+ // "projectid": this.projectId,
10583
+ // "type": "report",
10584
+ // "eventid": eventId,
10585
+ // "comments": reportercomments,
10586
+ // "dateofcompletion": reporterdoc,
10587
+ // "percentage": percentage,
10588
+ // "entityid": entityId,
10589
+ // "locationid": locationId,
10590
+ // "event": null,
10591
+ // "docs": JSON.stringify(docs),
10592
+ // "approved": true,
10593
+ // "username": this.userName,
10594
+ // "reportformatvalues": reportformatvalues,
10595
+ // "reportformatschema": reportformatschema,
10596
+ // "userid": this.userProfileId,
10597
+ // "userrole": this.myRole,
10598
+ // "year": this.calendarStartYYYY,
10599
+ // "module": listEvent.module ?? "events"
10600
+ // } )
10601
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
10602
+ // }else{
10603
+ bulkBody.push({
10604
+ "mmddyyyy": mmddyyyy,
10605
+ "projectid": this.projectId,
10606
+ "type": "report",
10607
+ "eventid": eventId,
10608
+ "comments": reportercomments,
10609
+ "dateofcompletion": reporterdoc,
10610
+ "percentage": percentage,
10611
+ "entityid": entityId,
10612
+ "locationid": locationId,
10613
+ "event": null,
10614
+ "docs": JSON.stringify(docs),
10615
+ "username": this.userName,
10616
+ "reportformatvalues": reportformatvalues,
10617
+ "reportformatschema": reportformatschema,
10618
+ "userid": this.userProfileId,
10619
+ "userrole": this.myRole,
10620
+ "year": this.calendarStartYYYY,
10621
+ "module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "events",
10622
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
10623
+ });
10624
+ // }
10625
+ // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
10626
+ // await this.sleep(2000);
10627
+ // this.clearMessages();
10467
10628
  }
10468
- else if (parseInt(reporterdoc) > new Date().getTime()) {
10469
- buttonClick.innerHTML = "Save";
10470
- this.setError('Date of completion cannot be in future!');
10471
- setTimeout(() => {
10472
- this.clearMessages();
10473
- }, 3000);
10629
+ // await this.uploadReportsBulk(bulkBody);
10630
+ // await this.fetchBulkReportingData();
10631
+ if (bulkBody.length > 0) {
10632
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
10474
10633
  }
10475
- else {
10476
- //console.log('makerscheckers 1', reportercomments);
10477
- if (reportercomments.trim().length === 0) {
10478
- buttonClick.innerHTML = "Save";
10479
- this.setError('Comments cannot be blank!');
10480
- setTimeout(() => {
10481
- this.clearMessages();
10482
- }, 3000);
10483
- }
10484
- else {
10485
- var clickEvent = new MouseEvent("click", {
10486
- "view": window,
10487
- "bubbles": true,
10488
- "cancelable": false
10489
- });
10490
- this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10491
- let flagBulk = false;
10492
- if (this.selectedItemIds.length <= 1) {
10493
- if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
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
- // }
10634
+ // if(bulkBodyReview.length > 0){
10635
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
10636
+ // }
10637
+ await this.fetchBulkReportingData();
10638
+ console.log('uploadReport bulk');
10639
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10640
+ const selectedId = this.selectedItemIds[k];
10641
+ //console.log('selectedid', selectedId);
10642
+ let entityId = selectedId.split('-')[7].replace(/_/g, '-');
10643
+ let locationId = selectedId.split('-')[8].replace(/_/g, '-');
10644
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10645
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10646
+ let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
10647
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10648
+ if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10649
+ this.events[mmdd][p].isbulk = true;
10650
+ flagBulk = true;
10651
+ if (this.recentlyReported[mmdd] == null) {
10652
+ this.recentlyReported[mmdd] = [];
10634
10653
  }
10654
+ this.recentlyReported[mmdd].push(this.events[mmdd][p]);
10635
10655
  }
10636
10656
  }
10637
10657
  }
10638
10658
  }
10659
+ if (this.mode == "next") {
10660
+ this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
10661
+ }
10662
+ else {
10663
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10664
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10665
+ // } else
10666
+ if (this.getCurrentTab() == this.TAB_FIND) {
10667
+ const searchString = this._SfFindContainer.querySelector('#stream-search').value;
10668
+ this.processFindSelection(this._SfFindContainer, searchString);
10669
+ }
10670
+ else {
10671
+ if (this.selectedItemIds.length > 0) {
10672
+ await this.fetchBulkReportingData();
10673
+ }
10674
+ this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
10675
+ // if(currentColumnButton != null) {
10676
+ // currentColumnButton.click();
10677
+ // }
10678
+ }
10679
+ }
10639
10680
  }
10681
+ // }
10682
+ // }
10683
+ // }
10640
10684
  });
10641
10685
  }
10642
10686
  }
@@ -16948,7 +16992,7 @@ let SfIEvents = class SfIEvents extends LitElement {
16948
16992
  buttonListReporting[i].style.display = 'block';
16949
16993
  }
16950
16994
  }
16951
- if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0)
16995
+ if (buttonSelect[i] != null && buttonSelect[i].id.indexOf('-bulk') < 0 && buttonSelect[i].id.indexOf('-reportformat') < 0)
16952
16996
  buttonSelect[i].style.display = "flex";
16953
16997
  if (eventTitles[i] != null)
16954
16998
  (eventTitles[i]).style.display = 'flex';
@@ -17202,12 +17246,14 @@ let SfIEvents = class SfIEvents extends LitElement {
17202
17246
  var html = '';
17203
17247
  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
17248
  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
- 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>';
17206
- 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>';
17207
- 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>';
17208
- 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>';
17209
- 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>';
17210
- 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>';
17249
+ if (this.selectedFeatures.indexOf('agreements') < 0) {
17250
+ 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>';
17251
+ 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>';
17252
+ 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>';
17253
+ 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>';
17254
+ 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>';
17255
+ 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>';
17256
+ }
17211
17257
  // 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
17258
  // 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
17259
  this._SfTabContainer.innerHTML = html;
@@ -18286,7 +18332,7 @@ let SfIEvents = class SfIEvents extends LitElement {
18286
18332
  "module": module,
18287
18333
  "makercheckers": makercheckers
18288
18334
  };
18289
- //console.log(body);
18335
+ console.log(body);
18290
18336
  let retValue = true;
18291
18337
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
18292
18338
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));