sf-i-events 1.0.867 → 1.0.869

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.
@@ -859,7 +859,7 @@ export class SfIEvents extends LitElement {
859
859
 
860
860
  EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "entities", "locations", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"]
861
861
 
862
- CHARTS_LIST_BY_MODULES: { [key: string]: Array<string> } = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "agreements": ["compliance", "timeliness", "completeness", "location"] };
862
+ CHARTS_LIST_BY_MODULES: { [key: string]: Array<string> } = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"] };
863
863
 
864
864
  chartSelectedLegend: Array<number> = [];
865
865
 
@@ -4214,7 +4214,7 @@ export class SfIEvents extends LitElement {
4214
4214
  }
4215
4215
 
4216
4216
  getTimelinessStatus = (mmdd: string, event: any, completeness: string) => {
4217
- // if(event.module == "agreement"){
4217
+ // if(event.module == "contract"){
4218
4218
  // if (completeness == "not-started") {
4219
4219
  // if (this.getPastDueDate(mmdd)) {
4220
4220
  // return "past-due-date";
@@ -4262,7 +4262,11 @@ export class SfIEvents extends LitElement {
4262
4262
  }
4263
4263
 
4264
4264
  getComplianceStatus = (completeness: string, timeliness: string, percentage?: string, event: any = {}) => {
4265
- if (event.module == "agreement") {
4265
+ if (event.module == "contract") {
4266
+ console.log('compliance status', event.terminated)
4267
+ if(event.terminated){
4268
+ return "terminated"
4269
+ }
4266
4270
  if (completeness == "not-started") {
4267
4271
 
4268
4272
  if (timeliness == "in-time") {
@@ -4549,7 +4553,7 @@ export class SfIEvents extends LitElement {
4549
4553
  html += '<div part="badge-dashboard" id="chip-timeliness-3" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-approved">remove_done</span>&nbsp;&nbsp;<span>Late Approved:</span>&nbsp;<span id="graph-late-approved">DASHBOARD_LATE_APPROVED</span></div>';
4550
4554
  html += '<div part="badge-dashboard" id="chip-timeliness-4" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-executed">running_with_errors</span>&nbsp;&nbsp;<span>Late Executed:</span>&nbsp;<span id="graph-late-executed">DASHBOARD_LATE_EXECUTED</span></div>';
4551
4555
 
4552
- if (this.selectedFeatures.indexOf("agreements") >= 0) {
4556
+ if (this.selectedFeatures.indexOf("contracts") >= 0) {
4553
4557
  html += '<div part="badge-dashboard" id="chip-compliance-0" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-scheduled">schedule</span>&nbsp;&nbsp;<span>Active:</span>&nbsp;<span id="graph-active">DASHBOARD_ACTIVE</span></div>';
4554
4558
  html += '<div part="badge-dashboard" id="chip-compliance-1" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-not-complied">disabled_by_default</span>&nbsp;&nbsp;<span>About To Expire:</span>&nbsp;<span id="graph-about-to-expire">DASHBOARD_ABOUT_TO_EXPIRE</span></div>';
4555
4559
  html += '<div part="badge-dashboard" id="chip-compliance-2" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-partially-complied">rule</span>&nbsp;&nbsp;<span>Expired:</span>&nbsp;<span id="graph-expired">DASHBOARD_EXPIRED</span></div>';
@@ -4737,11 +4741,67 @@ export class SfIEvents extends LitElement {
4737
4741
  html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
4738
4742
  html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>'
4739
4743
  html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
4740
- html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? ('&nbsp;&nbsp;<div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
4744
+ // html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? ('&nbsp;&nbsp;<div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
4745
+
4746
+ const isBulk = event.isbulk === true;
4747
+ const hasReportFormat = event.reportformat?.length > 0;
4748
+ const hasCustomReporting = event.customreporting != null;
4749
+ const hasMakerCheckers = event.makercheckers?.length > 0;
4750
+ const hasDocs = event.docs?.length > 0;
4751
+ const moduleType = event.module ?? 'compliance';
4752
+ const partStatusSanitized = partStatus.replace(/-/g, '_');
4753
+ const entityIdSanitized = event.entityid.replace(/-/g, '_');
4754
+ const locationIdSanitized = event.locationid.replace(/-/g, '_');
4755
+ const eventIdSanitized = event.id.replace(/-/g, '_');
4756
+ const mmddSanitized = mmdd.replace(/\//g, '-');
4757
+ const dueDateParts = event.duedate.split('/');
4758
+ const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
4759
+ const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
4760
+ const showLocationRisk = event.reporters == null;
4761
+ const showLastUpdated = event.reporters != null && lastUpdated.length > 0;
4762
+
4763
+ html += `
4764
+ <div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
4765
+ <input
4766
+ id="button-select-${mmddSanitized}-${itemNumber}-${hasMakerCheckers ? '1' : '0'}-${hasDocs ? '1' : '0'}-${entityIdSanitized}-${locationIdSanitized}-${eventIdSanitized}-${dueDateParts[1]}-${dueDateParts[0]}-${dueDateParts[2]}-${partStatusSanitized}-${moduleType}-${isBulk ? 'bulk' : ''}${(hasReportFormat || isBulk || hasCustomReporting) ? 'reportformat' : ''}"
4767
+ class="button-select mr-10 ${showCheckbox ? '' : 'hide'}"
4768
+ type="checkbox"
4769
+ />
4770
+ ${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
4771
+ <sf-i-elastic-text
4772
+ class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
4773
+ id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
4774
+ text="${event.obligationtitle}"
4775
+ minLength="${event.reporters != null ? '100' : '60'}">
4776
+ </sf-i-elastic-text>
4777
+ ${showLocationRisk ? `
4778
+ <div part="stream-event-location" class="stream-event-location ml-5">
4779
+ ${event.locationname.replace(/ *\([^)]*\) */g, "")}
4780
+ </div>
4781
+ <div part="stream-event-risk-${event.risk[0].toLowerCase().replace(/ /g, '-')}" class="stream-event-risk ml-5">
4782
+ ${event.risk[0]}
4783
+ </div>
4784
+ ` : ''}
4785
+ ${showReportingButton ? `
4786
+ <button
4787
+ id="button-list-reporting-${mmddSanitized}-${itemNumber}"
4788
+ part="button-list-reporting"
4789
+ class="material-icons ml-10 button-list-reporting">
4790
+ edit_note
4791
+ </button>
4792
+ ` : ''}
4793
+ ${showLastUpdated ? `
4794
+ &nbsp;&nbsp;<div part="event-last-updated-time" class="d-flex align-center">
4795
+ ${lastUpdated}
4796
+ </div>
4797
+ ` : ''}
4798
+ </div>
4799
+ `;
4800
+
4741
4801
  if (event.reporters != null && remarks.length > 0) {
4742
4802
  html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
4743
4803
  }
4744
-
4804
+ console.log('returning divstarthtml', html);
4745
4805
  return html;
4746
4806
 
4747
4807
  }
@@ -5173,7 +5233,7 @@ export class SfIEvents extends LitElement {
5173
5233
  active = active + (complianceStatus == "active" ? 1 : 0);
5174
5234
  aboutToExpire = aboutToExpire + (complianceStatus == "about-to-expire" ? 1 : 0);
5175
5235
  expired = expired + (complianceStatus == "expired" ? 1 : 0);
5176
- terminated = terminated + (complianceStatus == "teminated" ? 1 : 0);
5236
+ terminated = terminated + (complianceStatus == "terminated" ? 1 : 0);
5177
5237
 
5178
5238
  this.events[mmdd][j][this.FLOW_GRAPH_COMPLETENESS] = partStatus;
5179
5239
  this.events[mmdd][j][this.FLOW_GRAPH_TIMELINESS] = lateStatus;
@@ -5328,7 +5388,7 @@ export class SfIEvents extends LitElement {
5328
5388
  html = html.replace("DASHBOARD_EXPIRED", expired + "");
5329
5389
  html = html.replace("DASHBOARD_TERMINATED", terminated + "");
5330
5390
 
5331
- if (this.selectedFeatures.indexOf("agreements") >= 0) {
5391
+ if (this.selectedFeatures.indexOf("contracts") >= 0) {
5332
5392
  this.csvDataStats = 'Period,Total,Not Started,Approved,Pending Approval,Rejected,Past Due Date,Late Reported,Late Executed,Late Approved,Active,About To Expire,Expired,Terminated\n';
5333
5393
  this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + active + "," + aboutToExpire + "," + expired + "," + terminated;
5334
5394
  } else {
@@ -5341,7 +5401,7 @@ export class SfIEvents extends LitElement {
5341
5401
 
5342
5402
  this.htmlDataStats += '<br /><br />Timeliness<br /><br /><table class="mt-20 w-100"><tr><th class="w-14">Total</th><th class="w-14">In Time</th><th class="w-14">Past Due Date</th><th class="w-14">Late Reported</th><th class="w-14">Late Executed</th><th class="w-14">Late Approved</th><tr>';
5343
5403
  this.htmlDataStats += '<tr><td class="w-14 text-center td-odd">' + total + '</td><td class="w-14 text-center td-odd">' + (total - (pastDueDate + lateApproved + lateExecuted)) + '</td><td class="w-14 text-center td-odd">' + pastDueDate + '</td><td class="w-14 text-center td-odd">' + lateReported + '</td><td class="w-14 text-center td-odd">' + lateExecuted + '</td><td class="w-14 text-center td-odd">' + lateApproved + '</td><tr></table>'
5344
- if (this.selectedFeatures.indexOf("agreements") >= 0) {
5404
+ if (this.selectedFeatures.indexOf("contracts") >= 0) {
5345
5405
  this.htmlDataStats += '<br /><br />Compliance<br /><br /><table class="w-100"><tr><th class="w-14">Total</th><th class="w-14">Active</th><th class="w-14">About To Expire</th><th class="w-14">Expired</th><th class="w-14">Terminated</th><tr>';
5346
5406
  this.htmlDataStats += '<tr><td class="w-14 text-center td-odd">' + total + '</td><td class="w-14 text-center td-odd">' + active + '</td><td class="w-14 text-center td-odd">' + aboutToExpire + '</td><td class="w-14 text-center td-odd">' + expired + '</td><td class="w-14 text-center td-odd">' + terminated + '</td><tr></table>'
5347
5407
  } else {
@@ -5626,7 +5686,7 @@ export class SfIEvents extends LitElement {
5626
5686
  html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
5627
5687
  html += '</div>'
5628
5688
 
5629
- if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'agreement') {
5689
+ if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract') {
5630
5690
  html += '<div class="m-20">';
5631
5691
  html += '<label part="input-label">Supporting Documents</label>';
5632
5692
  html += '<slot name="uploader"></slot>';
@@ -5637,7 +5697,7 @@ export class SfIEvents extends LitElement {
5637
5697
  html += '<div class="d-flex m-20 flex-col">';
5638
5698
  html += '<label part="input-label">Approver Comments*</label>';
5639
5699
  html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
5640
- if (event.module != 'agreement') {
5700
+ if (event.module != 'contract') {
5641
5701
  html += '<label part="input-label">Date of Completion*</label>';
5642
5702
  html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
5643
5703
  html += '<label part="input-label">Percentage</label>';
@@ -5650,9 +5710,9 @@ export class SfIEvents extends LitElement {
5650
5710
  html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
5651
5711
  html += '</div>'
5652
5712
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
5653
- html += '<div id="report-format-container"><div class="box"></div></div>'
5713
+ html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>'
5654
5714
  } else if (event['customreporting'] != null && event['customreporting'].length > 0) {
5655
- html += '<div id="report-format-container"><div class="box"></div></div>'
5715
+ html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>'
5656
5716
  }
5657
5717
  html += '</div>';
5658
5718
  html += '</div>';
@@ -5698,7 +5758,7 @@ export class SfIEvents extends LitElement {
5698
5758
  html += '<div class="d-flex m-20 flex-col">';
5699
5759
  html += '<label part="input-label">Reporter Comments*</label>';
5700
5760
  html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
5701
- if (event.module != 'agreement') {
5761
+ if (event.module != 'contract') {
5702
5762
  html += '<label part="input-label">Date of Completion*</label>';
5703
5763
  html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
5704
5764
  html += '<label part="input-label">Completion Percentage*</label>';
@@ -5723,9 +5783,9 @@ export class SfIEvents extends LitElement {
5723
5783
  // }
5724
5784
  html += '<br />';
5725
5785
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
5726
- html += '<div id="report-format-container"><div class="box"></div></div>'
5786
+ html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>'
5727
5787
  } else if (event['customreporting'] != null && event['customreporting'].length > 0) {
5728
- html += '<div id="report-format-container"><div class="box"></div></div>'
5788
+ html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>'
5729
5789
  }
5730
5790
  html += '<br />';
5731
5791
  if (makercheckers.length > 0) {
@@ -5756,7 +5816,7 @@ export class SfIEvents extends LitElement {
5756
5816
  html += '<div class="d-flex m-20 flex-col">';
5757
5817
  html += '<label part="input-label">Auditor Comments</label>';
5758
5818
  html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
5759
- if (event.module != 'agreement') {
5819
+ if (event.module != 'contract') {
5760
5820
  html += '<label part="input-label">Date of Completion</label>';
5761
5821
  html += '<input id="input-auditor-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '" readonly/><br />';
5762
5822
  html += '<label part="input-label">Percentage</label>';
@@ -5936,7 +5996,7 @@ export class SfIEvents extends LitElement {
5936
5996
  let newStatus = this.getCompletenessStatus(newEvent);
5937
5997
  if (currStatus == newStatus) {
5938
5998
  buttonClick.innerHTML = "Save"
5939
- this.setError('Already Approved!');
5999
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
5940
6000
  setTimeout(() => {
5941
6001
  this.clearMessages();
5942
6002
  }, 3000);
@@ -6633,6 +6693,7 @@ export class SfIEvents extends LitElement {
6633
6693
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
6634
6694
  const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
6635
6695
  filterSubmitButton.addEventListener('click', () => {
6696
+ Util.setFeatures(this.selectedFeatures);
6636
6697
  this.enableCustom();
6637
6698
  this.renderTabs(this.selectedTab);
6638
6699
  // this.processDateSelection(eventsContainer);
@@ -6732,7 +6793,7 @@ export class SfIEvents extends LitElement {
6732
6793
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
6733
6794
  if (module === "notice") {
6734
6795
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
6735
- } else if (module === "agreement") {
6796
+ } else if (module === "contract") {
6736
6797
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
6737
6798
  } else {
6738
6799
  let found = false;
@@ -6771,7 +6832,7 @@ export class SfIEvents extends LitElement {
6771
6832
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
6772
6833
  if (module === "notice") {
6773
6834
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
6774
- } else if (module === "agreement") {
6835
+ } else if (module === "contract") {
6775
6836
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
6776
6837
  } else {
6777
6838
  let found = false;
@@ -7423,6 +7484,7 @@ export class SfIEvents extends LitElement {
7423
7484
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
7424
7485
  const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
7425
7486
  filterSubmitButton.addEventListener('click', () => {
7487
+ Util.setFeatures(this.selectedFeatures);
7426
7488
  this.renderTabs(this.selectedTab)
7427
7489
  this.processDateSelectionViewer(eventsContainer);
7428
7490
  })
@@ -10302,7 +10364,7 @@ export class SfIEvents extends LitElement {
10302
10364
  this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10303
10365
  });
10304
10366
 
10305
- if (this.selectedFeatures.indexOf('agreements') >= 0) {
10367
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
10306
10368
  ((this._SfCustomContainer as HTMLDivElement).querySelector('#button-this-year') as HTMLButtonElement).click();
10307
10369
  }
10308
10370
  // for(var i = 0; i < 3; i++) {
@@ -10648,6 +10710,7 @@ export class SfIEvents extends LitElement {
10648
10710
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
10649
10711
  const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
10650
10712
  filterSubmitButton.addEventListener('click', async () => {
10713
+ Util.setFeatures(this.selectedFeatures);
10651
10714
  const dateResult = this.calculateStartAndEndDateOfStream(index);
10652
10715
  console.log('dateresult', dateResult, index);
10653
10716
  console.log('selectedfeatures', this.selectedFeatures);
@@ -10895,7 +10958,7 @@ export class SfIEvents extends LitElement {
10895
10958
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
10896
10959
  if (module === "notice") {
10897
10960
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
10898
- } else if (module === "agreement") {
10961
+ } else if (module === "contract") {
10899
10962
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
10900
10963
  } else {
10901
10964
  let found = false;
@@ -10934,7 +10997,7 @@ export class SfIEvents extends LitElement {
10934
10997
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
10935
10998
  if (module === "notice") {
10936
10999
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
10937
- } else if (module === "agreement") {
11000
+ } else if (module === "contract") {
10938
11001
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
10939
11002
  } else {
10940
11003
  let found = false;
@@ -11219,6 +11282,7 @@ export class SfIEvents extends LitElement {
11219
11282
  filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close')
11220
11283
  const filterSubmitButton = filterList.querySelector('#button-submit-features') as HTMLButtonElement
11221
11284
  filterSubmitButton.addEventListener('click', async () => {
11285
+ Util.setFeatures(this.selectedFeatures);
11222
11286
  const dateResult = this.calculateStartAndEndDateOfStream(index);
11223
11287
  const monthResult = this.calculateMonthFromIndex(index);
11224
11288
  console.log('monthResult', monthResult);
@@ -11226,7 +11290,7 @@ export class SfIEvents extends LitElement {
11226
11290
  console.log('selectedfeatures', this.selectedFeatures);
11227
11291
  this.currentColumnIndex = index + "";
11228
11292
 
11229
- if (this.selectedFeatures.indexOf('agreements') >= 0) {
11293
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
11230
11294
 
11231
11295
  this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
11232
11296
  this.enableCustom();
@@ -11502,7 +11566,7 @@ export class SfIEvents extends LitElement {
11502
11566
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
11503
11567
  if (module === "notice") {
11504
11568
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
11505
- } else if (module === "agreement") {
11569
+ } else if (module === "contract") {
11506
11570
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
11507
11571
  } else {
11508
11572
  let found = false;
@@ -11546,7 +11610,7 @@ export class SfIEvents extends LitElement {
11546
11610
  var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
11547
11611
  if (module === "notice") {
11548
11612
  this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
11549
- } else if (module === "agreement") {
11613
+ } else if (module === "contract") {
11550
11614
  this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
11551
11615
  } else {
11552
11616
  let found = false;
@@ -12098,10 +12162,10 @@ export class SfIEvents extends LitElement {
12098
12162
  this.csvCompletenessStats = "";
12099
12163
  this.csvTimelinessStats = "";
12100
12164
  this.csvComplianceStats = "";
12101
- console.log('agreements')
12165
+ console.log('contracts')
12102
12166
  let data: any = null;
12103
12167
  let ctx: any = null;
12104
- if (this.selectedFeatures.indexOf('agreements') >= 0) {
12168
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
12105
12169
  var dataTotal = (divContainer.querySelector('#graph-total') as HTMLSpanElement).innerHTML;
12106
12170
  var dataActive = (divContainer.querySelector('#graph-active') as HTMLSpanElement).innerHTML;
12107
12171
  var dataAboutToExpire = (divContainer.querySelector('#graph-about-to-expire') as HTMLSpanElement).innerHTML;
@@ -12828,7 +12892,7 @@ export class SfIEvents extends LitElement {
12828
12892
  <div class="box-large" id="shimmer-container-notices" part="shimmer-container-notices">
12829
12893
  </div>
12830
12894
  `
12831
- html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:repoortiinig-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:repoortiinig-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" name="Notice Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdNotices + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
12895
+ html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:repoortiinig-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:repoortiinig-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" name="Notice Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdNotices + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
12832
12896
 
12833
12897
  html += '<div part="reporting-view-container">'
12834
12898
  html += this.renderReporting(listEvent, mmddyyyy);
@@ -12988,9 +13052,14 @@ export class SfIEvents extends LitElement {
12988
13052
  buttonClick.innerHTML = "Saving..."
12989
13053
  const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approver-comments') as HTMLInputElement).value;
12990
13054
  const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
12991
- if (approved == listEvent.approved) {
13055
+ let currStatus = this.getCompletenessStatus(listEvent);
13056
+ let newEvent = { ...listEvent };
13057
+ newEvent.comments = comments;
13058
+ newEvent.approved = approved;
13059
+ let newStatus = this.getCompletenessStatus(newEvent);
13060
+ if (currStatus == newStatus) {
12992
13061
  buttonClick.innerHTML = "Save"
12993
- this.setError('Already Approved!');
13062
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
12994
13063
  setTimeout(() => {
12995
13064
  this.clearMessages();
12996
13065
  }, 3000);
@@ -13116,9 +13185,14 @@ export class SfIEvents extends LitElement {
13116
13185
  buttonClick.innerHTML = "Saving..."
13117
13186
  const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
13118
13187
  const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
13119
- if (approved == listEvent.approved) {
13188
+ let currStatus = this.getCompletenessStatus(listEvent);
13189
+ let newEvent = { ...listEvent };
13190
+ newEvent.comments = comments;
13191
+ newEvent.approved = approved;
13192
+ let newStatus = this.getCompletenessStatus(newEvent);
13193
+ if (currStatus == newStatus) {
13120
13194
  buttonClick.innerHTML = "Save"
13121
- this.setError('Already Approved!');
13195
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
13122
13196
  setTimeout(() => {
13123
13197
  this.clearMessages();
13124
13198
  }, 3000);
@@ -13642,7 +13716,7 @@ export class SfIEvents extends LitElement {
13642
13716
  console.log('renewing', reportformatvalues)
13643
13717
  //console.log('fetch calendar url', url);
13644
13718
  let urlBody: any = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: (JSON.parse(reportformatvalues).terminated ?? false) };
13645
-
13719
+ // console.log('reopen body', url, urlBody)
13646
13720
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
13647
13721
  const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
13648
13722
  this._SfLoader.innerHTML = '';
@@ -13685,7 +13759,7 @@ export class SfIEvents extends LitElement {
13685
13759
  <div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
13686
13760
  </div>
13687
13761
  `
13688
- html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" name="Contract Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdAgreements + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
13762
+ html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" name="Contract Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdAgreements + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
13689
13763
 
13690
13764
  html += '<div part="reporting-view-container">'
13691
13765
 
@@ -13765,7 +13839,7 @@ export class SfIEvents extends LitElement {
13765
13839
  reportingSchemaJson = listEvent.customreporting
13766
13840
  }
13767
13841
  if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
13768
- let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" mode="edit" flow="reporting" name="Contract Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>'
13842
+ let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="Contract Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>'
13769
13843
 
13770
13844
  let reportFormatContainer = (this._SfDetailContainer as HTMLDivElement).querySelector('#report-format-container') as HTMLDivElement;
13771
13845
  if (reportFormatContainer != null) {
@@ -13853,9 +13927,14 @@ export class SfIEvents extends LitElement {
13853
13927
  buttonClick.innerHTML = "Saving..."
13854
13928
  const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approver-comments') as HTMLInputElement).value;
13855
13929
  const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
13856
- if (approved == listEvent.approved) {
13930
+ let currStatus = this.getCompletenessStatus(listEvent);
13931
+ let newEvent = { ...listEvent };
13932
+ newEvent.comments = comments;
13933
+ newEvent.approved = approved;
13934
+ let newStatus = this.getCompletenessStatus(newEvent);
13935
+ if (currStatus == newStatus) {
13857
13936
  buttonClick.innerHTML = "Save"
13858
- this.setError('Already Approved!');
13937
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
13859
13938
  setTimeout(() => {
13860
13939
  this.clearMessages();
13861
13940
  }, 3000);
@@ -13887,6 +13966,7 @@ export class SfIEvents extends LitElement {
13887
13966
  for (var p = 0; p < this.events[mmdd].length; p++) {
13888
13967
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
13889
13968
  this.events[mmdd][p].approved = approved
13969
+ this.events[mmdd][p].terminated = (JSON.parse(reportformatvalues).terminated) ?? false
13890
13970
  this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() })
13891
13971
  this.events[mmdd][p].lastupdated = new Date().toString()
13892
13972
  }
@@ -13992,7 +14072,12 @@ export class SfIEvents extends LitElement {
13992
14072
  buttonClick.innerHTML = "Saving..."
13993
14073
  const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
13994
14074
  const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
13995
- if (approved == listEvent.approved) {
14075
+ let currStatus = this.getCompletenessStatus(listEvent);
14076
+ let newEvent = { ...listEvent };
14077
+ newEvent.comments = comments;
14078
+ newEvent.approved = approved;
14079
+ let newStatus = this.getCompletenessStatus(newEvent);
14080
+ if (currStatus == newStatus) {
13996
14081
  buttonClick.innerHTML = "Save"
13997
14082
  this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
13998
14083
  setTimeout(() => {
@@ -14240,6 +14325,7 @@ export class SfIEvents extends LitElement {
14240
14325
  for (var p = 0; p < this.events[mmdd].length; p++) {
14241
14326
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
14242
14327
  this.events[mmdd][p].approved = true
14328
+ this.events[mmdd][p].terminated = (JSON.parse(reportformatvalues).terminated) ?? false
14243
14329
  // this.events[mmdd][p].documents = docs
14244
14330
  this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() })
14245
14331
  this.events[mmdd][p].lastupdated = new Date().toString()
@@ -15201,7 +15287,7 @@ export class SfIEvents extends LitElement {
15201
15287
  let newStatus = this.getCompletenessStatus(newEvent);
15202
15288
  if (currStatus == newStatus) {
15203
15289
  buttonClick.innerHTML = "Save"
15204
- this.setError('Already Approved!');
15290
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
15205
15291
  setTimeout(() => {
15206
15292
  this.clearMessages();
15207
15293
  }, 3000);
@@ -15333,7 +15419,7 @@ export class SfIEvents extends LitElement {
15333
15419
  console.log('status', currStatus, newStatus)
15334
15420
  if (currStatus == newStatus) {
15335
15421
  buttonClick.innerHTML = "Save"
15336
- this.setError('Already Approved!');
15422
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
15337
15423
  setTimeout(() => {
15338
15424
  this.clearMessages();
15339
15425
  }, 3000);
@@ -20089,7 +20175,11 @@ export class SfIEvents extends LitElement {
20089
20175
  this.myRole = this.TAB_REPORTER;
20090
20176
  this.renderRoleTabs();
20091
20177
  // this.proceedToCalendar();
20092
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20178
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
20179
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
20180
+ } else {
20181
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20182
+ }
20093
20183
 
20094
20184
  });
20095
20185
 
@@ -20098,7 +20188,11 @@ export class SfIEvents extends LitElement {
20098
20188
  this.myRole = this.TAB_APPROVER;
20099
20189
  this.renderRoleTabs();
20100
20190
  // this.proceedToCalendar();
20101
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20191
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
20192
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
20193
+ } else {
20194
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20195
+ }
20102
20196
 
20103
20197
  });
20104
20198
 
@@ -20107,7 +20201,11 @@ export class SfIEvents extends LitElement {
20107
20201
  this.myRole = this.TAB_FUNCTION_HEAD;
20108
20202
  this.renderRoleTabs();
20109
20203
  // this.proceedToCalendar();
20110
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20204
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
20205
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
20206
+ } else {
20207
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20208
+ }
20111
20209
 
20112
20210
  });
20113
20211
 
@@ -20116,7 +20214,11 @@ export class SfIEvents extends LitElement {
20116
20214
  this.myRole = this.TAB_AUDITOR;
20117
20215
  this.renderRoleTabs();
20118
20216
  // this.proceedToCalendar();
20119
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20217
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
20218
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
20219
+ } else {
20220
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20221
+ }
20120
20222
 
20121
20223
  });
20122
20224
 
@@ -20126,7 +20228,11 @@ export class SfIEvents extends LitElement {
20126
20228
  this.myRole = this.TAB_VIEWER;
20127
20229
  this.renderRoleTabs();
20128
20230
  // this.proceedToCalendar();
20129
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20231
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
20232
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
20233
+ } else {
20234
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
20235
+ }
20130
20236
 
20131
20237
  });
20132
20238
 
@@ -22607,7 +22713,7 @@ export class SfIEvents extends LitElement {
22607
22713
 
22608
22714
  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>';
22609
22715
  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>';
22610
- if (this.selectedFeatures.indexOf('agreements') < 0) {
22716
+ if (this.selectedFeatures.indexOf('contracts') < 0) {
22611
22717
  html += '<button class="tab-button mb-10" id="calendar-tab-register" part="' + (selectedTab == this.TAB_REGISTERS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Registers</button>';
22612
22718
  html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_FIND ? '' : 'hide') + '" id="calendar-tab-find" part="' + (selectedTab == this.TAB_FIND ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Search</button>';
22613
22719
  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>';
@@ -25501,13 +25607,20 @@ export class SfIEvents extends LitElement {
25501
25607
  }
25502
25608
 
25503
25609
  renderWithFeatures = async (startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00", year: string = this.calendarStartYYYY) => {
25610
+ this.selectedFeatures = Util.getFeatures();
25611
+ for (let feature of this.selectedFeatures) {
25612
+ if (this.getFeatures().indexOf(feature) < 0) {
25613
+ this.selectedFeatures = ['compliances']
25614
+ break;
25615
+ }
25616
+ }
25504
25617
  this.events = []
25505
25618
  console.log('rendering and fetching', startDate, endDate, searchString, list, month)
25506
25619
  if (this.selectedFeatures.indexOf('compliances') >= 0) {
25507
25620
  this.fetchAndYearlyRenderUserCalendar_2(startDate, endDate, searchString, list, month, year)
25508
25621
  } else if (this.selectedFeatures.indexOf('notices') >= 0) {
25509
25622
  this.fetchAndRenderNotices(startDate, endDate, searchString, list, month, year);
25510
- } else if (this.selectedFeatures.indexOf('agreements') >= 0) {
25623
+ } else if (this.selectedFeatures.indexOf('contracts') >= 0) {
25511
25624
  this.fetchAndRenderAgreements(startDate, endDate, searchString, list, month, year);
25512
25625
  }
25513
25626
  }
@@ -25788,7 +25901,7 @@ export class SfIEvents extends LitElement {
25788
25901
  }
25789
25902
  this.events = tempEvents;
25790
25903
  this.renderAppropriateStream(this.sdate, this.edate, true);
25791
- console.log('agreements', agreements, tempEvents);
25904
+ console.log('contracts', agreements, tempEvents);
25792
25905
  } else {
25793
25906
  if (xhr.status == 401) {
25794
25907
  let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
@@ -25836,7 +25949,7 @@ export class SfIEvents extends LitElement {
25836
25949
  url = "https://" + this.apiId + "/" + path;
25837
25950
  } else if (this.selectedFeatures.indexOf('notices') >= 0) {
25838
25951
  url = "https://" + this.apiIdNotices + "/" + path;
25839
- } else if (this.selectedFeatures.indexOf('agreements') >= 0) {
25952
+ } else if (this.selectedFeatures.indexOf('contracts') >= 0) {
25840
25953
  url = "https://" + this.apiIdAgreements + "/" + path;
25841
25954
  }
25842
25955
 
@@ -27493,8 +27606,22 @@ export class SfIEvents extends LitElement {
27493
27606
  ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-year') as HTMLButtonElement)?.click();
27494
27607
  } else {
27495
27608
  //console.log('stream received rendering year', this.stream);
27496
- this.renderTabs(this.TAB_STREAM);
27497
- ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
27609
+ this.selectedFeatures = Util.getFeatures();
27610
+ for (let feature of this.selectedFeatures) {
27611
+ if (this.getFeatures().indexOf(feature) < 0) {
27612
+ this.selectedFeatures = ['compliances']
27613
+ break;
27614
+ }
27615
+ }
27616
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
27617
+ this.renderTabs(this.TAB_CUSTOM);
27618
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-custom') as HTMLButtonElement)?.click();
27619
+ } else {
27620
+ this.renderTabs(this.TAB_STREAM);
27621
+ ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
27622
+ }
27623
+ // this.renderTabs(this.TAB_STREAM);
27624
+ // ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
27498
27625
  }
27499
27626
  //await this.fetchUserCalendar_2();
27500
27627