sf-i-events 1.0.879 → 1.0.881

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sf-i-events.js CHANGED
@@ -2519,7 +2519,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2519
2519
  return html;
2520
2520
  };
2521
2521
  this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus) => {
2522
- var _a, _b, _c, _f;
2522
+ var _a, _b, _c, _f, _g;
2523
2523
  var html = '';
2524
2524
  var remarks = "";
2525
2525
  var occurrenceDate = "";
@@ -2556,7 +2556,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2556
2556
  const moduleType = (_f = event.module) !== null && _f !== void 0 ? _f : 'compliance';
2557
2557
  const partStatusSanitized = partStatus.replace(/-/g, '_');
2558
2558
  const entityIdSanitized = event.entityid.replace(/-/g, '_');
2559
- const locationIdSanitized = event.locationid.replace(/-/g, '_');
2559
+ const locationIdSanitized = ((_g = event.locationid) !== null && _g !== void 0 ? _g : "").replace(/-/g, '_');
2560
2560
  const eventIdSanitized = event.id.replace(/-/g, '_');
2561
2561
  const mmddSanitized = mmdd.replace(/\//g, '-');
2562
2562
  const dueDateParts = event.duedate.split('/');
@@ -2888,7 +2888,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2888
2888
  };
2889
2889
  //(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton)
2890
2890
  this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
2891
- var _a, _b, _c, _f, _g, _h, _j, _k;
2891
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38;
2892
2892
  var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0, compliedWithGaps = 0, reportedNonCompliance = 0, active = 0, aboutToExpire = 0, expired = 0, terminated = 0;
2893
2893
  var html = '';
2894
2894
  this.selectedItemIds = [];
@@ -2906,10 +2906,27 @@ let SfIEvents = class SfIEvents extends LitElement {
2906
2906
  html += this.renderCalendarGraphs(showGraph, parametersTitle, showBackgroundButton);
2907
2907
  html += this.renderCalendarContainerDivStart(index);
2908
2908
  html += this.renderCalendarEventSummary();
2909
- // csvCols += 'Period,Status,Id,ObligationTitle,Obligation,Duedate'
2910
- csvCols += 'Id,Country,Entity,Location,Function,Reporter,Approver,Functionhead,State,Jurisdiction,Category,Subcategory,Statute,Reference,Applicability,ObligationType,ObligationTitle,Obligation,Firstlineofdefence,Secondlineofdefence,Thirdlineofdefence,Internalcontrols,Penalty,Form,AdditionalUrl,Definition,Authority,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter';
2911
- htmlCols += '<tr><th class="td-thin">Id</th><th class="td-thin">Country</th><th class="td-thin">State</th><th class="td-thin">Jurisdiction</th><th class="td-thin">Category</th><th class="td-thin">Subcategory</th><th class="td-wide">Statute</th><th class="td-thin">Reference</th><th class="td-thin">Applicability</th><th class="td-thin">ObligationType</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Obligation</th><th class="td-thin">Firstlineofdefence</th><th class="td-thin">Secondlineofdefence</th><th class="td-thin">Thirdlineofdefence</th><th>InternalControls</th><th class="td-wide">Penalty</th><th class="td-thin">Form</th><th class="td-thin">Additional URL</th><th class="td-thin">Definition</th><th class="td-thin">Authority</th><th class="td-thin">RiskSeverity</th><th class="td-wide">RiskAreas</th><th class="td-thin">Frequency</th><th class="td-thin">SubFrequency</th><th class="td-thin">DueDate</th><th class="td-wide">Status</th><th class="td-wide">ReportParameter</th></tr>';
2912
- htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>';
2909
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
2910
+ csvCols += 'Id,ReferenceNo.,Type,Country,Entity,Location,Party1,Party2,Party3,Reporter,Approver,Functionhead,DueDate,Status,ReportParameter';
2911
+ htmlCols += '<tr><th class="td-thin">Id</th><th class="td-thin">Reference No.</th><th class="td-thin">Type</th><th class="td-thin">Country</th><th class="td-thin">Entity</th><th class="td-thin">Location</th><th class="td-thin">Party 1</th><th class="td-thin">Party 2</th><th class="td-wide">Party 3</th><th class="td-thin">DueDate</th><th class="td-wide">Status</th><th class="td-wide">ReportParameter</th></tr>';
2912
+ }
2913
+ else if (this.selectedFeatures.indexOf('licenses') >= 0) {
2914
+ csvCols += 'Id,ReferenceNo.,Type,Country,Entity,Location,Reporter,Approver,Functionhead,State,Jurisdiction,Category,Subcategory,Statute,ObligationType,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter';
2915
+ htmlCols += '<tr><th class="td-thin">Id</th><th class="td-thin">Reference No.</th><th class="td-thin">Type</th><th class="td-thin">Country</th><th class="td-thin">Entity</th><th class="td-thin">Location</th><th class="td-thin">State</th><th class="td-thin">Jurisdiction</th><th class="td-thin">Category</th><th class="td-thin">Subcategory</th><th class="td-wide">Statute</th><th class="td-thin">ObligationType</th><th class="td-thin">RiskSeverity</th><th class="td-wide">RiskAreas</th><th class="td-thin">Frequency</th><th class="td-thin">SubFrequency</th><th class="td-thin">DueDate</th><th class="td-wide">Status</th><th class="td-wide">ReportParameter</th></tr>';
2916
+ }
2917
+ else {
2918
+ csvCols += 'Id,Country,Entity,Location,Function,Reporter,Approver,Functionhead,State,Jurisdiction,Category,Subcategory,Statute,Reference,Applicability,ObligationType,ObligationTitle,Obligation,Firstlineofdefence,Secondlineofdefence,Thirdlineofdefence,Internalcontrols,Penalty,Form,AdditionalUrl,Definition,Authority,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter';
2919
+ htmlCols += '<tr><th class="td-thin">Id</th><th class="td-thin">Country</th><th class="td-thin">State</th><th class="td-thin">Jurisdiction</th><th class="td-thin">Category</th><th class="td-thin">Subcategory</th><th class="td-wide">Statute</th><th class="td-thin">Reference</th><th class="td-thin">Applicability</th><th class="td-thin">ObligationType</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Obligation</th><th class="td-thin">Firstlineofdefence</th><th class="td-thin">Secondlineofdefence</th><th class="td-thin">Thirdlineofdefence</th><th>InternalControls</th><th class="td-wide">Penalty</th><th class="td-thin">Form</th><th class="td-thin">Additional URL</th><th class="td-thin">Definition</th><th class="td-thin">Authority</th><th class="td-thin">RiskSeverity</th><th class="td-wide">RiskAreas</th><th class="td-thin">Frequency</th><th class="td-thin">SubFrequency</th><th class="td-thin">DueDate</th><th class="td-wide">Status</th><th class="td-wide">ReportParameter</th></tr>';
2920
+ }
2921
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
2922
+ htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">Reference No.</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>';
2923
+ }
2924
+ else if (this.selectedFeatures.indexOf('licenses') >= 0) {
2925
+ htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">Reference No.</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>';
2926
+ }
2927
+ else {
2928
+ htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>';
2929
+ }
2913
2930
  for (var i = iInit; i <= iLast; i++) {
2914
2931
  let mmdd = "";
2915
2932
  if (firstDate == null) {
@@ -2979,90 +2996,195 @@ let SfIEvents = class SfIEvents extends LitElement {
2979
2996
  terminated = terminated + (complianceStatus == "terminated" ? 1 : 0);
2980
2997
  this.events[mmdd][j][this.FLOW_GRAPH_COMPLETENESS] = partStatus;
2981
2998
  this.events[mmdd][j][this.FLOW_GRAPH_TIMELINESS] = lateStatus;
2999
+ if (this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE] != null) {
3000
+ this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE + "obj"] = this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE];
3001
+ }
2982
3002
  this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE] = complianceStatus;
2983
3003
  this.updateStats(this.events[mmdd][j], partStatus, lateStatus, complianceStatus);
2984
3004
  if (this.events[mmdd][j]["documents"] != null) {
2985
- //Id,Country,Entity,Location,Function,Reporter,Approver,Functionhead,State
2986
- csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
2987
- csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
2988
- csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
2989
- csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
2990
- csvValues += ('"' + ((((_b = ((_a = this.events[mmdd][j]["functions"]) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
2991
- csvValues += ('"' + ((((_f = ((_c = this.events[mmdd][j]["reporters"]) !== null && _c !== void 0 ? _c : [])[0]) !== null && _f !== void 0 ? _f : "").split(';')[0] + "").replace(/"/g, "") + '",'));
2992
- csvValues += ('"' + ((((_h = ((_g = this.events[mmdd][j]["approvers"]) !== null && _g !== void 0 ? _g : [])[0]) !== null && _h !== void 0 ? _h : "").split(';')[0] + "").replace(/"/g, "") + '",'));
2993
- csvValues += ('"' + ((((_k = ((_j = this.events[mmdd][j]["functionheads"]) !== null && _j !== void 0 ? _j : [])[0]) !== null && _k !== void 0 ? _k : "").split(';')[0] + "").replace(/"/g, "") + '",'));
2994
- csvValues += ('"' + (this.events[mmdd][j]["state"] + '",'));
2995
- csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
2996
- csvValues += ('"' + (this.events[mmdd][j]["category"] + '",'));
2997
- csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
2998
- csvValues += ('"' + (this.events[mmdd][j]["statute"] + '",'));
2999
- csvValues += ('"' + ((this.events[mmdd][j]["reference"] + "").replace(/"/g, "") + '",'));
3000
- csvValues += ('"' + ((this.events[mmdd][j]["applicability"] + "").replace(/"/g, "") + '",'));
3001
- csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3002
- csvValues += ('"' + ((this.events[mmdd][j]["obligationtitle"] + "").replace(/"/g, "") + '",'));
3003
- csvValues += ('"' + ((this.events[mmdd][j]["obligation"] + "").replace(/"/g, "") + '",'));
3004
- csvValues += ('"' + ((this.events[mmdd][j]["firstlineofdefence"] + "").replace(/"/g, "") + '",'));
3005
- csvValues += ('"' + ((this.events[mmdd][j]["secondlineofdefence"] + "").replace(/"/g, "") + '",'));
3006
- csvValues += ('"' + ((this.events[mmdd][j]["thirdlineofdefence"] + "").replace(/"/g, "") + '",'));
3007
- csvValues += ('"' + ((this.events[mmdd][j]["internalcontrols"] + "").replace(/"/g, "") + '",'));
3008
- csvValues += ('"' + ((this.events[mmdd][j]["penalty"] + "").replace(/"/g, "") + '",'));
3009
- csvValues += ('"' + ((this.events[mmdd][j]["form"] + "").replace(/"/g, "") + '",'));
3010
- csvValues += ('"' + ((this.events[mmdd][j]["additionalurls"] + "").replace(/"/g, "") + '",'));
3011
- csvValues += ('"' + ((this.events[mmdd][j]["definition"] + "").replace(/"/g, "") + '",'));
3012
- csvValues += ('"' + ((this.events[mmdd][j]["authority"] + "").replace(/"/g, "") + '",'));
3013
- csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
3014
- csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
3015
- csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
3016
- csvValues += ('"' + ((this.events[mmdd][j]["subfrequency"] + "").replace(/"/g, "") + '",'));
3017
- csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3018
- csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3019
- csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
3020
- // csvValues += (period + ','
3021
- // + this.renderStatusString(partStatus, lateStatus, complianceStatus) + ','
3022
- // + this.events[mmdd][j]["id"] + ','
3023
- // + this.events[mmdd][j]["obligationtitle"] + ','
3024
- // + this.events[mmdd][j]["obligation"] + ','
3025
- // + this.events[mmdd][j]["duedate"]
3026
- // + '\n');
3027
- htmlValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["id"] + '</td>'
3028
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["country"] + '</td>'
3029
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["state"] + '</td>'
3030
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["jurisdiction"] + '</td>'
3031
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["category"] + '</td>'
3032
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["subcategory"] + '</td>'
3033
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["statute"] + '</td>'
3034
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["reference"] + '</td>'
3035
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["applicability"] + '</td>'
3036
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["obligationtype"] + '</td>'
3037
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligationtitle"] + '</td>'
3038
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligation"] + '</td>'
3039
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["firstlineofdefence"] + '</td>'
3040
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["secondlineofdefence"] + '</td>'
3041
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["thirdlineofdefence"] + '</td>'
3042
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["internalcontrols"] + '</td>'
3043
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["penalty"] + '</td>'
3044
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["form"] + '</td>'
3045
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["additionalurls"] + '</td>'
3046
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["definition"] + '</td>'
3047
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["authority"] + '</td>'
3048
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["risk"] + '</td>'
3049
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["riskarea"] + '</td>'
3050
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["frequency"] + '</td>'
3051
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["subfrequency"] + '</td>'
3052
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3053
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3054
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
3055
- + '</tr>');
3056
- htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
3057
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3058
- // + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligation"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3059
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3060
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3061
- for (let document of this.events[mmdd][j].documents) {
3062
- htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3005
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
3006
+ //Id,ReferenceNo.,Type,Country,Entity,Location,Party1,Party2,Party3,Reporter,Approver,Functionhead,DueDate,Status,ReportParameter
3007
+ csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
3008
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtitle"] + "").replace(/"/g, "") + '",'));
3009
+ csvValues += ('"' + ((this.events[mmdd][j]["contracttypename"] + "").replace(/"/g, "") + '",'));
3010
+ csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3011
+ csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3012
+ csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3013
+ csvValues += ('"' + ((this.events[mmdd][j]["party1"] + "").replace(/"/g, "") + '",'));
3014
+ csvValues += ('"' + ((this.events[mmdd][j]["party2"] + "").replace(/"/g, "") + '",'));
3015
+ csvValues += ('"' + ((this.events[mmdd][j]["party3"] + "").replace(/"/g, "") + '",'));
3016
+ csvValues += ('"' + ((((_b = ((_a = this.events[mmdd][j]["reporters"]) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3017
+ csvValues += ('"' + ((((_f = ((_c = this.events[mmdd][j]["approvers"]) !== null && _c !== void 0 ? _c : [])[0]) !== null && _f !== void 0 ? _f : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3018
+ csvValues += ('"' + ((((_h = ((_g = this.events[mmdd][j]["functionheads"]) !== null && _g !== void 0 ? _g : [])[0]) !== null && _h !== void 0 ? _h : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3019
+ csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3020
+ csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3021
+ csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
3022
+ //Id,RefNo,Type,Country,Entity,Location,Party1,Party2,Party3,DueDate,Status,ReportParameter
3023
+ htmlValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["id"] + '</td>'
3024
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligationtitle"] + '</td>'
3025
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["contracttypename"] + '</td>'
3026
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3027
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3028
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3029
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["party1"] + '</td>'
3030
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["party2"] + '</td>'
3031
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["party3"] + '</td>'
3032
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3033
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3034
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
3035
+ + '</tr>');
3036
+ }
3037
+ else if (this.selectedFeatures.indexOf('licenses') >= 0) {
3038
+ //Id,ReferenceNo.,Type,Country,Entity,Location,Reporter,Approver,Functionhead,State,Jurisdiction,Category,Subcategory,Statute,ObligationType,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter
3039
+ csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
3040
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtitle"] + "").replace(/"/g, "") + '",'));
3041
+ csvValues += ('"' + ((this.events[mmdd][j]["licensetypename"] + "").replace(/"/g, "") + '",'));
3042
+ csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3043
+ csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3044
+ csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3045
+ csvValues += ('"' + ((((_k = ((_j = this.events[mmdd][j]["reporters"]) !== null && _j !== void 0 ? _j : [])[0]) !== null && _k !== void 0 ? _k : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3046
+ csvValues += ('"' + ((((_m = ((_l = this.events[mmdd][j]["approvers"]) !== null && _l !== void 0 ? _l : [])[0]) !== null && _m !== void 0 ? _m : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3047
+ csvValues += ('"' + ((((_p = ((_o = this.events[mmdd][j]["functionheads"]) !== null && _o !== void 0 ? _o : [])[0]) !== null && _p !== void 0 ? _p : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3048
+ csvValues += ('"' + ((_u = (_t = (_s = (_r = (_q = this.events) === null || _q === void 0 ? void 0 : _q[mmdd]) === null || _r === void 0 ? void 0 : _r[j]) === null || _s === void 0 ? void 0 : _s.statute) === null || _t === void 0 ? void 0 : _t.state) !== null && _u !== void 0 ? _u : "" + '",'));
3049
+ csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3050
+ csvValues += ('"' + ((_z = (_y = (_x = (_w = (_v = this.events) === null || _v === void 0 ? void 0 : _v[mmdd]) === null || _w === void 0 ? void 0 : _w[j]) === null || _x === void 0 ? void 0 : _x.complianceobj) === null || _y === void 0 ? void 0 : _y.category) !== null && _z !== void 0 ? _z : "" + '",'));
3051
+ csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
3052
+ csvValues += ('"' + (((_3 = (_2 = (_1 = (_0 = this.events) === null || _0 === void 0 ? void 0 : _0[mmdd]) === null || _1 === void 0 ? void 0 : _1[j]) === null || _2 === void 0 ? void 0 : _2.statute) === null || _3 === void 0 ? void 0 : _3.name) + '",'));
3053
+ csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
3054
+ csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
3055
+ csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
3056
+ csvValues += ('"' + ((((_8 = (_7 = (_6 = (_5 = (_4 = this.events) === null || _4 === void 0 ? void 0 : _4[mmdd]) === null || _5 === void 0 ? void 0 : _5[j]) === null || _6 === void 0 ? void 0 : _6.complianceobj) === null || _7 === void 0 ? void 0 : _7.subfrequency) !== null && _8 !== void 0 ? _8 : "") + "").replace(/"/g, "") + '",'));
3057
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3058
+ csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3059
+ csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3060
+ csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
3061
+ //Id,ReferenceNo.,Type,Country,Entity,Location,State,Jurisdiction,Category,Subcategory,Statute,ObligationType,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter
3062
+ htmlValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["id"] + '</td>'
3063
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligationtitle"] + '</td>'
3064
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["licensetypename"] + '</td>'
3065
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3066
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3067
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3068
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + ((_13 = (_12 = (_11 = (_10 = (_9 = this.events) === null || _9 === void 0 ? void 0 : _9[mmdd]) === null || _10 === void 0 ? void 0 : _10[j]) === null || _11 === void 0 ? void 0 : _11.statute) === null || _12 === void 0 ? void 0 : _12.state) !== null && _13 !== void 0 ? _13 : "") + '</td>'
3069
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["jurisdiction"] + '</td>'
3070
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_18 = (_17 = (_16 = (_15 = (_14 = this.events) === null || _14 === void 0 ? void 0 : _14[mmdd]) === null || _15 === void 0 ? void 0 : _15[j]) === null || _16 === void 0 ? void 0 : _16.complianceobj) === null || _17 === void 0 ? void 0 : _17.category) !== null && _18 !== void 0 ? _18 : "") + '</td>'
3071
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["subcategory"] + '</td>'
3072
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_23 = (_22 = (_21 = (_20 = (_19 = this.events) === null || _19 === void 0 ? void 0 : _19[mmdd]) === null || _20 === void 0 ? void 0 : _20[j]) === null || _21 === void 0 ? void 0 : _21.statute) === null || _22 === void 0 ? void 0 : _22.name) !== null && _23 !== void 0 ? _23 : "") + '</td>'
3073
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["obligationtype"] + '</td>'
3074
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["risk"] + '</td>'
3075
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["riskarea"] + '</td>'
3076
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["frequency"] + '</td>'
3077
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (((_28 = (_27 = (_26 = (_25 = (_24 = this.events) === null || _24 === void 0 ? void 0 : _24[mmdd]) === null || _25 === void 0 ? void 0 : _25[j]) === null || _26 === void 0 ? void 0 : _26.complianceobj) === null || _27 === void 0 ? void 0 : _27.subfrequency) !== null && _28 !== void 0 ? _28 : "") + "").replace(/"/g, "") + '</td>'
3078
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3079
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3080
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
3081
+ + '</tr>');
3082
+ }
3083
+ else {
3084
+ //Id,Country,Entity,Location,Function,Reporter,Approver,Functionhead,State
3085
+ csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
3086
+ csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3087
+ csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3088
+ csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3089
+ csvValues += ('"' + ((((_30 = ((_29 = this.events[mmdd][j]["functions"]) !== null && _29 !== void 0 ? _29 : [])[0]) !== null && _30 !== void 0 ? _30 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
3090
+ csvValues += ('"' + ((((_32 = ((_31 = this.events[mmdd][j]["reporters"]) !== null && _31 !== void 0 ? _31 : [])[0]) !== null && _32 !== void 0 ? _32 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3091
+ csvValues += ('"' + ((((_34 = ((_33 = this.events[mmdd][j]["approvers"]) !== null && _33 !== void 0 ? _33 : [])[0]) !== null && _34 !== void 0 ? _34 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3092
+ csvValues += ('"' + ((((_36 = ((_35 = this.events[mmdd][j]["functionheads"]) !== null && _35 !== void 0 ? _35 : [])[0]) !== null && _36 !== void 0 ? _36 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3093
+ csvValues += ('"' + (this.events[mmdd][j]["state"] + '",'));
3094
+ csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3095
+ csvValues += ('"' + (this.events[mmdd][j]["category"] + '",'));
3096
+ csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
3097
+ csvValues += ('"' + (this.events[mmdd][j]["statute"] + '",'));
3098
+ csvValues += ('"' + ((this.events[mmdd][j]["reference"] + "").replace(/"/g, "") + '",'));
3099
+ csvValues += ('"' + ((this.events[mmdd][j]["applicability"] + "").replace(/"/g, "") + '",'));
3100
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3101
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtitle"] + "").replace(/"/g, "") + '",'));
3102
+ csvValues += ('"' + ((this.events[mmdd][j]["obligation"] + "").replace(/"/g, "") + '",'));
3103
+ csvValues += ('"' + ((this.events[mmdd][j]["firstlineofdefence"] + "").replace(/"/g, "") + '",'));
3104
+ csvValues += ('"' + ((this.events[mmdd][j]["secondlineofdefence"] + "").replace(/"/g, "") + '",'));
3105
+ csvValues += ('"' + ((this.events[mmdd][j]["thirdlineofdefence"] + "").replace(/"/g, "") + '",'));
3106
+ csvValues += ('"' + ((this.events[mmdd][j]["internalcontrols"] + "").replace(/"/g, "") + '",'));
3107
+ csvValues += ('"' + ((this.events[mmdd][j]["penalty"] + "").replace(/"/g, "") + '",'));
3108
+ csvValues += ('"' + ((this.events[mmdd][j]["form"] + "").replace(/"/g, "") + '",'));
3109
+ csvValues += ('"' + ((this.events[mmdd][j]["additionalurls"] + "").replace(/"/g, "") + '",'));
3110
+ csvValues += ('"' + ((this.events[mmdd][j]["definition"] + "").replace(/"/g, "") + '",'));
3111
+ csvValues += ('"' + ((this.events[mmdd][j]["authority"] + "").replace(/"/g, "") + '",'));
3112
+ csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
3113
+ csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
3114
+ csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
3115
+ csvValues += ('"' + ((this.events[mmdd][j]["subfrequency"] + "").replace(/"/g, "") + '",'));
3116
+ csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3117
+ csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3118
+ csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
3119
+ // csvValues += (period + ','
3120
+ // + this.renderStatusString(partStatus, lateStatus, complianceStatus) + ','
3121
+ // + this.events[mmdd][j]["id"] + ','
3122
+ // + this.events[mmdd][j]["obligationtitle"] + ','
3123
+ // + this.events[mmdd][j]["obligation"] + ','
3124
+ // + this.events[mmdd][j]["duedate"]
3125
+ // + '\n');
3126
+ htmlValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["id"] + '</td>'
3127
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["country"] + '</td>'
3128
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["state"] + '</td>'
3129
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["jurisdiction"] + '</td>'
3130
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["category"] + '</td>'
3131
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["subcategory"] + '</td>'
3132
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["statute"] + '</td>'
3133
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["reference"] + '</td>'
3134
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["applicability"] + '</td>'
3135
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["obligationtype"] + '</td>'
3136
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligationtitle"] + '</td>'
3137
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligation"] + '</td>'
3138
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["firstlineofdefence"] + '</td>'
3139
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["secondlineofdefence"] + '</td>'
3140
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["thirdlineofdefence"] + '</td>'
3141
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["internalcontrols"] + '</td>'
3142
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["penalty"] + '</td>'
3143
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["form"] + '</td>'
3144
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["additionalurls"] + '</td>'
3145
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["definition"] + '</td>'
3146
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["authority"] + '</td>'
3147
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["risk"] + '</td>'
3148
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["riskarea"] + '</td>'
3149
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["frequency"] + '</td>'
3150
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["subfrequency"] + '</td>'
3151
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3152
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3153
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
3154
+ + '</tr>');
3155
+ }
3156
+ if (this.selectedFeatures.indexOf('contracts') >= 0) {
3157
+ htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
3158
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3159
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3160
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3161
+ for (let document of (_37 = this.events[mmdd][j].contractdocuments) !== null && _37 !== void 0 ? _37 : []) {
3162
+ htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3163
+ }
3164
+ htmlSummaryValues += '</td></tr>';
3165
+ }
3166
+ else if (this.selectedFeatures.indexOf('licenses') >= 0) {
3167
+ htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
3168
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3169
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3170
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3171
+ for (let document of (_38 = this.events[mmdd][j].licensedocuments) !== null && _38 !== void 0 ? _38 : []) {
3172
+ htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3173
+ }
3174
+ htmlSummaryValues += '</td></tr>';
3175
+ }
3176
+ else {
3177
+ htmlSummaryValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin"><sf-i-elastic-text text="' + this.events[mmdd][j]["id"] + '" minLength="10"></sf-i-elastic-text></td>'
3178
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3179
+ // + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligation"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3180
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3181
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3182
+ for (let document of this.events[mmdd][j].documents) {
3183
+ htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3184
+ }
3185
+ // htmlSummaryValues += this.renderCalendarAnnotations(this.events[mmdd][j]);
3186
+ htmlSummaryValues += '</td></tr>';
3063
3187
  }
3064
- // htmlSummaryValues += this.renderCalendarAnnotations(this.events[mmdd][j]);
3065
- htmlSummaryValues += '</td></tr>';
3066
3188
  }
3067
3189
  html += this.renderCalendarRowDivItemDivStart(mmdd, this.events[mmdd][j], j, partStatus, bgStatus);
3068
3190
  if (this.events[mmdd][j]["countryname"] != null) {
@@ -3369,7 +3491,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3369
3491
  html += '<button class="invisible" part="button">Save</button>';
3370
3492
  html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>';
3371
3493
  html += '</div>';
3372
- if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract' && event.module != 'license') {
3494
+ if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3373
3495
  html += '<div class="m-20">';
3374
3496
  html += '<label part="input-label">Supporting Documents</label>';
3375
3497
  html += '<slot name="uploader"></slot>';
@@ -3379,7 +3501,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3379
3501
  html += '<div class="d-flex m-20 flex-col">';
3380
3502
  html += '<label part="input-label">Approver Comments*</label>';
3381
3503
  html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
3382
- if (event.module != 'contract' && event.module != 'license') {
3504
+ if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3383
3505
  html += '<label part="input-label">Date of Completion*</label>';
3384
3506
  html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
3385
3507
  html += '<label part="input-label">Percentage</label>';
@@ -3428,7 +3550,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3428
3550
  html += '<div class="d-flex m-20 flex-col">';
3429
3551
  html += '<label part="input-label">Reporter Comments*</label>';
3430
3552
  html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
3431
- if (event.module != 'contract' && event.module != 'license') {
3553
+ if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3432
3554
  html += '<label part="input-label">Date of Completion*</label>';
3433
3555
  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 />';
3434
3556
  html += '<label part="input-label">Completion Percentage*</label>';
@@ -3479,7 +3601,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3479
3601
  html += '<div class="d-flex m-20 flex-col">';
3480
3602
  html += '<label part="input-label">Auditor Comments</label>';
3481
3603
  html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
3482
- if (event.module != 'contract' && event.module != 'license') {
3604
+ if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3483
3605
  html += '<label part="input-label">Date of Completion</label>';
3484
3606
  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 />';
3485
3607
  html += '<label part="input-label">Percentage</label>';
@@ -3542,6 +3664,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3542
3664
  event.docsOptional = event['docs'] == null ? [] : event['docs'];
3543
3665
  html = this.renderReporting(event, mmddyyyy);
3544
3666
  console.log('reporting html', html);
3667
+ let ddmmyyyy = mmddyyyy.split('/')[1] + '/' + mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[2];
3668
+ let emailcontent = `<table border="0" cellspacing="0" style="color:#666666;border-radius:5px;border:solid 1px #efefef;width:100%; margin-top:20px"><tbody><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Compliance ID</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.id}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Country</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.countryname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Entity</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.entityname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Location</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.locationname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Statute</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.statute}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Subcategory</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.subcategory}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Due Date</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${ddmmyyyy}</td></tr></tbody></table>`;
3669
+ this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
3545
3670
  let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container');
3546
3671
  for (let tempReportingContainer of listReportingContainers) {
3547
3672
  tempReportingContainer.style.display = 'none';
@@ -4370,6 +4495,9 @@ let SfIEvents = class SfIEvents extends LitElement {
4370
4495
  else if (module === "license") {
4371
4496
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
4372
4497
  }
4498
+ else if (module === "rcmresource") {
4499
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
4500
+ }
4373
4501
  else {
4374
4502
  let found = false;
4375
4503
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -4406,6 +4534,9 @@ let SfIEvents = class SfIEvents extends LitElement {
4406
4534
  else if (module === "license") {
4407
4535
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
4408
4536
  }
4537
+ else if (module === "rcmresource") {
4538
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
4539
+ }
4409
4540
  else {
4410
4541
  let found = false;
4411
4542
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -7832,6 +7963,9 @@ let SfIEvents = class SfIEvents extends LitElement {
7832
7963
  else if (module === "license") {
7833
7964
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
7834
7965
  }
7966
+ else if (module === "rcmresource") {
7967
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
7968
+ }
7835
7969
  else {
7836
7970
  let found = false;
7837
7971
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -7867,6 +8001,9 @@ let SfIEvents = class SfIEvents extends LitElement {
7867
8001
  else if (module === "license") {
7868
8002
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
7869
8003
  }
8004
+ else if (module === "rcmresource") {
8005
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
8006
+ }
7870
8007
  else {
7871
8008
  let found = false;
7872
8009
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -8344,6 +8481,9 @@ let SfIEvents = class SfIEvents extends LitElement {
8344
8481
  else if (module === "license") {
8345
8482
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
8346
8483
  }
8484
+ else if (module === "rcmresource") {
8485
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
8486
+ }
8347
8487
  else {
8348
8488
  let found = false;
8349
8489
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -8382,6 +8522,9 @@ let SfIEvents = class SfIEvents extends LitElement {
8382
8522
  else if (module === "license") {
8383
8523
  this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
8384
8524
  }
8525
+ else if (module === "rcmresource") {
8526
+ this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
8527
+ }
8385
8528
  else {
8386
8529
  let found = false;
8387
8530
  for (var k = 0; k < this.selectedItemIds.length; k++) {
@@ -9972,31 +10115,818 @@ let SfIEvents = class SfIEvents extends LitElement {
9972
10115
  }
9973
10116
  }
9974
10117
  }
9975
- if (this.mode == "next") {
9976
- this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
9977
- }
9978
- else {
9979
- // if(this.getCurrentTab() == this.TAB_CUSTOM) {
9980
- // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
9981
- // } else
9982
- if (this.getCurrentTab() == this.TAB_FIND) {
9983
- const searchString = this._SfFindContainer.querySelector('#stream-search').value;
9984
- this.processFindSelection(this._SfFindContainer, searchString);
9985
- }
9986
- else {
9987
- if (this.selectedItemIds.length > 0) {
9988
- await this.fetchBulkReportingData();
9989
- }
9990
- this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
9991
- // if(currentColumnButton != null) {
9992
- // currentColumnButton.click();
9993
- // }
10118
+ if (this.mode == "next") {
10119
+ this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
10120
+ }
10121
+ else {
10122
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10123
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10124
+ // } else
10125
+ if (this.getCurrentTab() == this.TAB_FIND) {
10126
+ const searchString = this._SfFindContainer.querySelector('#stream-search').value;
10127
+ this.processFindSelection(this._SfFindContainer, searchString);
10128
+ }
10129
+ else {
10130
+ if (this.selectedItemIds.length > 0) {
10131
+ await this.fetchBulkReportingData();
10132
+ }
10133
+ this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
10134
+ // if(currentColumnButton != null) {
10135
+ // currentColumnButton.click();
10136
+ // }
10137
+ }
10138
+ }
10139
+ }
10140
+ }
10141
+ }
10142
+ }
10143
+ });
10144
+ }
10145
+ }
10146
+ }
10147
+ if (this._SfUploader[0] != null) {
10148
+ this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "none";
10149
+ this._SfUploader[0].querySelector('#uploader').addEventListener('analysisInProgress', (_ev) => {
10150
+ console.log('uploader analysisInProgress', _ev);
10151
+ this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "block";
10152
+ });
10153
+ this._SfUploader[0].querySelector('#uploader').addEventListener('analysisCompleted', (_ev) => {
10154
+ console.log('uploader analysisInProgress', _ev);
10155
+ this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "none";
10156
+ });
10157
+ //console.log('documentType checking', documentType);
10158
+ if (documentType != null) {
10159
+ this._SfUploader[0].querySelector('#uploader').docType = documentType;
10160
+ }
10161
+ this._SfUploader[0].querySelector('#uploader').prepopulatedInputArr = JSON.stringify([]);
10162
+ console.log('uploader', this._SfUploader[0].querySelector('#uploader'));
10163
+ this._SfUploader[0].querySelector('#uploader').loadMode();
10164
+ if (docs.length > 0) {
10165
+ this._SfUploader[0].querySelector('#uploader').prepopulatedInputArr = JSON.stringify(docs);
10166
+ this._SfUploader[0].querySelector('#uploader').loadMode();
10167
+ }
10168
+ if (this.myRole == this.TAB_APPROVER || approved) {
10169
+ this._SfUploader[0].querySelector('#uploader').readOnly = true;
10170
+ this._SfUploader[0].querySelector('#uploader').loadMode();
10171
+ }
10172
+ else {
10173
+ this._SfUploader[0].querySelector('#uploader').readOnly = false;
10174
+ this._SfUploader[0].querySelector('#uploader').loadMode();
10175
+ }
10176
+ const dataPassthrough = {
10177
+ projectId: this.projectId,
10178
+ countryId: this.countryId,
10179
+ entityId: listEvent.entityid,
10180
+ locationId: listEvent.locationid,
10181
+ mmddyyyy: mmddyyyy,
10182
+ complianceId: listEvent['id'],
10183
+ path: "uploadextract"
10184
+ };
10185
+ const callbackUrlHost = "8icpy39ru0.execute-api.us-east-1.amazonaws.com";
10186
+ const callbackUrlPath = "test/uploadextract";
10187
+ this._SfUploader[0].querySelector('#uploader').projectId = this.projectId;
10188
+ this._SfUploader[0].querySelector('#uploader').dataPassthrough = JSON.stringify(dataPassthrough);
10189
+ this._SfUploader[0].querySelector('#uploader').callbackUrlHost = callbackUrlHost;
10190
+ this._SfUploader[0].querySelector('#uploader').callbackUrlPath = callbackUrlPath;
10191
+ this._SfUploader[0].querySelector('#uploader').loadMode();
10192
+ }
10193
+ //console.log('approved 1', event["approved"], this.myRole, this.TAB_APPROVER);
10194
+ if (this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_VIEWER || this.myRole == this.TAB_AUDITOR || this.myRole == this.TAB_FUNCTION_HEAD) {
10195
+ //console.log('approved 1', event["approved"], this.myRole, this.TAB_APPROVER);
10196
+ if (listEvent["approved"] != null) {
10197
+ if (listEvent["approved"] === true) {
10198
+ //console.log('approved 2', event["approved"], this.myRole, this.TAB_APPROVER);
10199
+ if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
10200
+ this._SfDetailContainer.querySelector('#input-approve-yes').checked = true;
10201
+ }
10202
+ if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
10203
+ this._SfDetailContainer.querySelector('#input-approve-no').checked = false;
10204
+ }
10205
+ }
10206
+ else {
10207
+ if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
10208
+ this._SfDetailContainer.querySelector('#input-approve-yes').checked = false;
10209
+ }
10210
+ if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
10211
+ this._SfDetailContainer.querySelector('#input-approve-no').checked = true;
10212
+ }
10213
+ }
10214
+ }
10215
+ else {
10216
+ if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
10217
+ this._SfDetailContainer.querySelector('#input-approve-yes').checked = false;
10218
+ }
10219
+ if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
10220
+ this._SfDetailContainer.querySelector('#input-approve-no').checked = true;
10221
+ }
10222
+ }
10223
+ }
10224
+ }
10225
+ };
10226
+ this.fetchContractDetails = async (listEvent, mmddyyyy) => {
10227
+ let entityId = listEvent.entityid;
10228
+ let locationId = listEvent.locationid;
10229
+ let url = "https://" + this.apiIdAgreements + "/getallobjectdetails";
10230
+ //console.log('fetch calendar url', url);
10231
+ let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
10232
+ //console.log('urlbody', urlBody);
10233
+ const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
10234
+ const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
10235
+ this._SfLoader.innerHTML = '';
10236
+ if (xhr.status == 200) {
10237
+ const jsonRespose = JSON.parse(xhr.responseText);
10238
+ console.log('jsonRespose agreement details', jsonRespose);
10239
+ this.renderContractDetails(jsonRespose.object, mmddyyyy);
10240
+ }
10241
+ else {
10242
+ if (xhr.status == 401) {
10243
+ let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
10244
+ this.dispatchEvent(changeEvent);
10245
+ }
10246
+ else {
10247
+ const jsonRespose = JSON.parse(xhr.responseText);
10248
+ this.setError(jsonRespose.error);
10249
+ }
10250
+ }
10251
+ };
10252
+ this.renewContract = async (listEvent, reportformatvalues) => {
10253
+ var _a;
10254
+ let url = "https://" + this.apiIdAgreements + "/reopen";
10255
+ console.log('renewing', reportformatvalues);
10256
+ //console.log('fetch calendar url', url);
10257
+ let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
10258
+ // console.log('reopen body', url, urlBody)
10259
+ const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
10260
+ const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
10261
+ this._SfLoader.innerHTML = '';
10262
+ if (xhr.status == 200) {
10263
+ const jsonRespose = JSON.parse(xhr.responseText);
10264
+ console.log('jsonRespose agreement reopen', jsonRespose);
10265
+ }
10266
+ else {
10267
+ if (xhr.status == 401) {
10268
+ let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
10269
+ this.dispatchEvent(changeEvent);
10270
+ }
10271
+ else {
10272
+ const jsonRespose = JSON.parse(xhr.responseText);
10273
+ this.setError(jsonRespose.error);
10274
+ }
10275
+ }
10276
+ };
10277
+ this.renderContractDetails = async (listEvent, mmddyyyy) => {
10278
+ var _a, _b, _c, _f, _g, _h;
10279
+ // await this.fetchAgreementDetails(listEvent, mmddyyyy);
10280
+ // return;
10281
+ let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
10282
+ let entityId = listEvent.entityid;
10283
+ let locationId = listEvent.locationid;
10284
+ let comments = listEvent['comments'];
10285
+ let docs = listEvent['documents'] == null ? [] : listEvent['documents'] == null ? [] : (listEvent['documents']);
10286
+ let approved = listEvent['approved'] == null ? false : listEvent['approved'] == null ? false : listEvent['approved'];
10287
+ let makercheckers = listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'];
10288
+ // let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
10289
+ let html = '';
10290
+ let documentType = listEvent['documenttype'] == null ? null : listEvent['documenttype'][0] == null ? null : listEvent['documenttype'][0].split(" ")[0];
10291
+ html += `
10292
+ <div part="compliance-detail-title" class="d-flex justify-between">
10293
+ <button part="button-icon" class="material-icons invisible">close</button>
10294
+ <h3 part="results-title" class="m-0">Agreement Details</h3>
10295
+ <button id="button-detail-close" part="button-icon" class="material-icons">close</button>
10296
+ </div>
10297
+ `;
10298
+ html += `
10299
+ <div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
10300
+ </div>
10301
+ `;
10302
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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>';
10303
+ html += '<div part="reporting-view-container">';
10304
+ html += this.renderReporting(listEvent, mmddyyyy);
10305
+ html += "</div>";
10306
+ html += '<div class="d-flex justify-between m-20">';
10307
+ html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
10308
+ html += '</div>';
10309
+ html += '<div class="m-20">';
10310
+ html += '<div class="d-flex flex-col">';
10311
+ for (var i = 0; i < comments.length; i++) {
10312
+ html += '<div part="commentbox" class="d-flex commentbox ' + (comments[i].author + "").toLowerCase() + 'box">';
10313
+ html += '<div class="mr-20 d-flex flex-col align-end"><span part="comment-username">' + (comments[i].username != null ? comments[i].username : '') + '</span><span part="td-head">' + comments[i].author + '</span>' + ((i === (comments.length - 1) && this.enableDeleteLatestReport) ? '<br /><button class="mt-5 button-delete" part="button">Delete</button>' : '') + '</div>';
10314
+ const onlyCommentText = (comments[i].comment + "").replace(/ *\([^)]*\) */g, "").trim();
10315
+ try {
10316
+ const jsonComments = JSON.parse(onlyCommentText);
10317
+ if (Util.isInteger(jsonComments)) {
10318
+ html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
10319
+ }
10320
+ else {
10321
+ //console.log('json comments', jsonComments);
10322
+ var htmlTable = '';
10323
+ for (var j = 0; j < Object.keys(jsonComments).length; j++) {
10324
+ htmlTable += '<div class="mb-20">';
10325
+ htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
10326
+ htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
10327
+ htmlTable += '</div>';
10328
+ }
10329
+ html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
10330
+ }
10331
+ }
10332
+ catch (e) {
10333
+ //console.log('json comments exception', comments[i]);
10334
+ html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
10335
+ }
10336
+ html += '</div>';
10337
+ }
10338
+ if (comments.length === 0) {
10339
+ html += '<div><strong>No comments yet!</strong></div>';
10340
+ }
10341
+ html += '</div>';
10342
+ html += '</div>';
10343
+ console.log('selected event', JSON.stringify(listEvent));
10344
+ this._SfDetailContainer.innerHTML = html;
10345
+ this._SfDetailContainer.style.display = 'block';
10346
+ let usermap = Util.getUsermap();
10347
+ let sfireporting = this._SfDetailContainer.querySelector('#detail-reporting');
10348
+ sfireporting.usermap = JSON.stringify(usermap);
10349
+ sfireporting.selectedItem = listEvent;
10350
+ sfireporting.editdisable = "true";
10351
+ setTimeout(() => {
10352
+ console.log('sfireporting', sfireporting._SfReportingContainer);
10353
+ sfireporting.loadMode();
10354
+ }, 500);
10355
+ sfireporting.addEventListener('valueChanged', () => {
10356
+ sfireporting.classList.remove('hide');
10357
+ this._SfDetailContainer.querySelector('#shimmer-container-agreements').classList.add('hide');
10358
+ });
10359
+ let reportingSchemaJson = "";
10360
+ let reportingSchemaValues = "";
10361
+ if (listEvent.reportformatschema != null) {
10362
+ reportingSchemaJson = listEvent.reportformatschema;
10363
+ reportingSchemaValues = listEvent.reportformatvalues;
10364
+ }
10365
+ else if (listEvent.customreporting != null) {
10366
+ reportingSchemaJson = listEvent.customreporting;
10367
+ }
10368
+ if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
10369
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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>';
10370
+ let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
10371
+ if (reportFormatContainer != null) {
10372
+ reportFormatContainer.innerHTML = reportingHtml;
10373
+ }
10374
+ }
10375
+ let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
10376
+ if (reportingSchemaJson != "" && reportingReporting != null) {
10377
+ reportingReporting.configjson = reportingSchemaJson;
10378
+ if (reportingSchemaValues != "")
10379
+ reportingReporting.prepopulateValJson = reportingSchemaValues;
10380
+ reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
10381
+ reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
10382
+ reportingReporting.flow = "reporting";
10383
+ setTimeout(() => {
10384
+ reportingReporting.loadMode();
10385
+ console.log('list-customreporting', reportingSchemaJson);
10386
+ console.log('list-customreporting1', reportingSchemaValues);
10387
+ console.log('list-customreporting2', reportingReporting.mode);
10388
+ }, 500);
10389
+ }
10390
+ (_a = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
10391
+ this._SfDetailContainer.innerHTML = '';
10392
+ this._SfDetailContainer.style.display = 'none';
10393
+ });
10394
+ (_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
10395
+ // await this.fetchDeleteReview(listEvent["id"], mmddyyyy, entityId, locationId);
10396
+ // this.setSuccess('Deleted successfully!')
10397
+ // setTimeout(() => {
10398
+ // this.clearMessages()
10399
+ // }, 3000);
10400
+ // //console.log('deleted', resultDelete);
10401
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10402
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10403
+ // } else {
10404
+ // if(currentColumnButton != null) {
10405
+ // currentColumnButton.click();
10406
+ // }
10407
+ // }
10408
+ console.log('delete review clicked');
10409
+ var clickEvent = new MouseEvent("click", {
10410
+ "view": window,
10411
+ "bubbles": true,
10412
+ "cancelable": false
10413
+ });
10414
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10415
+ });
10416
+ (_c = this._SfDetailContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
10417
+ if (this.selectedItemIds.length === 0) {
10418
+ console.log('audto approve single');
10419
+ }
10420
+ else {
10421
+ console.log('auto approve bulk');
10422
+ }
10423
+ //console.log('deleted', resultDelete);
10424
+ if (this.getCurrentTab() == this.TAB_CUSTOM) {
10425
+ this.processDateSelection(this._SfCustomContainer);
10426
+ }
10427
+ else {
10428
+ // if(currentColumnButton != null) {
10429
+ // currentColumnButton.click();
10430
+ // }
10431
+ }
10432
+ var clickEvent = new MouseEvent("click", {
10433
+ "view": window,
10434
+ "bubbles": true,
10435
+ "cancelable": false
10436
+ });
10437
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10438
+ });
10439
+ if (this.mode == "consumer" || this.mode == "next") {
10440
+ (_f = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async (ev) => {
10441
+ var _a, _b, _c, _f, _g;
10442
+ let buttonClick = ev.target;
10443
+ buttonClick.innerHTML = "Saving...";
10444
+ const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
10445
+ const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
10446
+ let currStatus = this.getCompletenessStatus(listEvent);
10447
+ let newEvent = { ...listEvent };
10448
+ newEvent.comments = comments;
10449
+ newEvent.approved = approved;
10450
+ let newStatus = this.getCompletenessStatus(newEvent);
10451
+ if (currStatus == newStatus) {
10452
+ buttonClick.innerHTML = "Save";
10453
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
10454
+ setTimeout(() => {
10455
+ this.clearMessages();
10456
+ }, 3000);
10457
+ return;
10458
+ }
10459
+ let reportformatvalues = "";
10460
+ let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
10461
+ console.log('renew reporting', reportingReporting);
10462
+ if (reportingReporting != null) {
10463
+ reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
10464
+ }
10465
+ var clickEvent = new MouseEvent("click", {
10466
+ "view": window,
10467
+ "bubbles": true,
10468
+ "cancelable": false
10469
+ });
10470
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10471
+ // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved)
10472
+ let flagBulk = false;
10473
+ if (this.selectedItemIds.length <= 1) {
10474
+ console.log('mmddyyyy', mmddyyyy);
10475
+ if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "events")) {
10476
+ if (approved) {
10477
+ await this.renewContract(listEvent, reportformatvalues);
10478
+ }
10479
+ else {
10480
+ console.log('renew reporting', reportformatvalues);
10481
+ }
10482
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10483
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10484
+ this.events[mmdd][p].approved = approved;
10485
+ this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
10486
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10487
+ this.events[mmdd][p].lastupdated = new Date().toString();
10488
+ }
10489
+ }
10490
+ if (this.recentlyReported[mmdd] == null) {
10491
+ this.recentlyReported[mmdd] = [];
10492
+ }
10493
+ this.recentlyReported[mmdd].push(listEvent);
10494
+ console.log('review single');
10495
+ }
10496
+ }
10497
+ else {
10498
+ let bulkBodyReview = [];
10499
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10500
+ const selectedId = this.selectedItemIds[k];
10501
+ //console.log('selectedid', selectedId);
10502
+ entityId = selectedId.split('-')[7].replace(/_/g, '-');
10503
+ locationId = selectedId.split('-')[8].replace(/_/g, '-');
10504
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10505
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10506
+ //console.log(entityId, locationId, eventId, mmddyyyy);
10507
+ bulkBodyReview.push({
10508
+ "mmddyyyy": mmddyyyy,
10509
+ "projectid": this.projectId,
10510
+ "type": "review",
10511
+ "eventid": eventId,
10512
+ "comments": comments,
10513
+ "approved": approved,
10514
+ "entityid": entityId,
10515
+ "locationid": locationId,
10516
+ "username": this.userName,
10517
+ "userid": this.userProfileId,
10518
+ "userrole": this.myRole,
10519
+ "year": this.calendarStartYYYY,
10520
+ "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "events"
10521
+ });
10522
+ // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
10523
+ // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
10524
+ // await this.sleep(2000);
10525
+ // this.clearMessages();
10526
+ }
10527
+ await this.uploadReviewsBulk(bulkBodyReview);
10528
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10529
+ const selectedId = this.selectedItemIds[k];
10530
+ //console.log('selectedid', selectedId);
10531
+ entityId = selectedId.split('-')[7].replace(/_/g, '-');
10532
+ locationId = selectedId.split('-')[8].replace(/_/g, '-');
10533
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10534
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10535
+ let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
10536
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10537
+ if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10538
+ this.events[mmdd][p].isbulk = true;
10539
+ flagBulk = true;
10540
+ if (this.recentlyReported[mmdd] == null) {
10541
+ this.recentlyReported[mmdd] = [];
10542
+ }
10543
+ this.recentlyReported[mmdd].push(this.events[mmdd][p]);
10544
+ }
10545
+ }
10546
+ }
10547
+ console.log('review bulk');
10548
+ }
10549
+ if (this.mode == "next") {
10550
+ // this.fetchNext(this.nextPage)
10551
+ this.renderRoleTabsNext(this.nextPage);
10552
+ }
10553
+ else {
10554
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10555
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10556
+ // } else
10557
+ if (this.getCurrentTab() == this.TAB_FIND) {
10558
+ const searchString = this._SfFindContainer.querySelector('#stream-search').value;
10559
+ this.processFindSelection(this._SfFindContainer, searchString);
10560
+ }
10561
+ else {
10562
+ if (this.selectedItemIds.length > 0) {
10563
+ await this.fetchBulkReportingData();
10564
+ }
10565
+ this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
10566
+ var clickEvent = new MouseEvent("click", {
10567
+ "view": window,
10568
+ "bubbles": true,
10569
+ "cancelable": false
10570
+ });
10571
+ (_g = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _g === void 0 ? void 0 : _g.dispatchEvent(clickEvent);
10572
+ // if(currentColumnButton != null) {
10573
+ // currentColumnButton.click();
10574
+ // }
10575
+ }
10576
+ }
10577
+ });
10578
+ (_g = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async (ev) => {
10579
+ var _a, _b;
10580
+ let buttonClick = ev.target;
10581
+ buttonClick.innerHTML = "Saving...";
10582
+ const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
10583
+ const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
10584
+ let currStatus = this.getCompletenessStatus(listEvent);
10585
+ let newEvent = { ...listEvent };
10586
+ newEvent.comments = comments;
10587
+ newEvent.approved = approved;
10588
+ let newStatus = this.getCompletenessStatus(newEvent);
10589
+ if (currStatus == newStatus) {
10590
+ buttonClick.innerHTML = "Save";
10591
+ this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
10592
+ setTimeout(() => {
10593
+ this.clearMessages();
10594
+ }, 3000);
10595
+ return;
10596
+ }
10597
+ if (comments.trim().length === 0) {
10598
+ buttonClick.innerHTML = "Save";
10599
+ this.setError('Comments cannot be blank!');
10600
+ setTimeout(() => {
10601
+ this.clearMessages();
10602
+ }, 3000);
10603
+ }
10604
+ else {
10605
+ let flagBulk = false;
10606
+ if (this.selectedItemIds.length <= 1) {
10607
+ if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "events")) {
10608
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10609
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10610
+ this.events[mmdd][p].approved = approved;
10611
+ this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10612
+ this.events[mmdd][p].lastupdated = new Date().toString();
10613
+ }
10614
+ }
10615
+ if (this.recentlyReported[mmdd] == null) {
10616
+ this.recentlyReported[mmdd] = [];
10617
+ }
10618
+ this.recentlyReported[mmdd].push(listEvent);
10619
+ }
10620
+ console.log('uploadaudit single');
10621
+ }
10622
+ else {
10623
+ let bulkBodyAudit = [];
10624
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10625
+ const selectedId = this.selectedItemIds[k];
10626
+ //console.log('selectedid', selectedId);
10627
+ entityId = selectedId.split('-')[7].replace(/_/g, '-');
10628
+ locationId = selectedId.split('-')[8].replace(/_/g, '-');
10629
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10630
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10631
+ //console.log(entityId, locationId, eventId, mmddyyyy);
10632
+ bulkBodyAudit.push({
10633
+ "mmddyyyy": mmddyyyy,
10634
+ "projectid": this.projectId,
10635
+ "type": "audit",
10636
+ "eventid": eventId,
10637
+ "comments": comments,
10638
+ "approved": approved,
10639
+ "entityid": entityId,
10640
+ "locationid": locationId,
10641
+ "username": this.userName,
10642
+ "userid": this.userProfileId,
10643
+ "userrole": this.myRole,
10644
+ "year": this.calendarStartYYYY,
10645
+ "module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "events"
10646
+ });
10647
+ // await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
10648
+ }
10649
+ await this.uploadAuditsBulk(bulkBodyAudit);
10650
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10651
+ const selectedId = this.selectedItemIds[k];
10652
+ //console.log('selectedid', selectedId);
10653
+ let entityId = selectedId.split('-')[7].replace(/_/g, '-');
10654
+ let locationId = selectedId.split('-')[8].replace(/_/g, '-');
10655
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10656
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10657
+ let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
10658
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10659
+ if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10660
+ this.events[mmdd][p].isbulk = true;
10661
+ flagBulk = true;
10662
+ if (this.recentlyReported[mmdd] == null) {
10663
+ this.recentlyReported[mmdd] = [];
10664
+ }
10665
+ this.recentlyReported[mmdd].push(this.events[mmdd][p]);
10666
+ }
10667
+ }
10668
+ }
10669
+ console.log('uploadAudit bulk');
10670
+ }
10671
+ var clickEvent = new MouseEvent("click", {
10672
+ "view": window,
10673
+ "bubbles": true,
10674
+ "cancelable": false
10675
+ });
10676
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10677
+ if (this.mode == "next") {
10678
+ this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
10679
+ }
10680
+ else {
10681
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10682
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10683
+ // } else
10684
+ if (this.getCurrentTab() == this.TAB_FIND) {
10685
+ const searchString = this._SfFindContainer.querySelector('#stream-search').value;
10686
+ this.processFindSelection(this._SfFindContainer, searchString);
10687
+ }
10688
+ else {
10689
+ if (this.selectedItemIds.length > 0) {
10690
+ await this.fetchBulkReportingData();
10691
+ }
10692
+ this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
10693
+ // if(currentColumnButton != null) {
10694
+ // currentColumnButton.click();
10695
+ // }
10696
+ }
10697
+ }
10698
+ }
10699
+ });
10700
+ if (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) {
10701
+ if (approved) {
10702
+ if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
10703
+ this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'hidden';
10704
+ }
10705
+ }
10706
+ else {
10707
+ if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
10708
+ this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
10709
+ (_h = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
10710
+ var _a, _b, _c, _f;
10711
+ let buttonClick = ev.target;
10712
+ buttonClick.innerHTML = "Saving...";
10713
+ const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
10714
+ //console.log('reporter comments 1', reportercomments);
10715
+ // const reporterdoc = ((((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement) != null) && ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value.length > 0) ? (new Date(((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "") : "";
10716
+ const reporterdoc = new Date().getTime() + "";
10717
+ let docs = [];
10718
+ //console.log('reporter comments 2', reportercomments);
10719
+ // if(docsOptional.length === 0) {
10720
+ // docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
10721
+ // }
10722
+ //console.log('docs', docs);
10723
+ let reportformatvalues = "";
10724
+ let reportformatschema = "";
10725
+ if (listEvent.customreporting != null) {
10726
+ let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
10727
+ console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()));
10728
+ reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
10729
+ reportformatschema = (_b = reportingReporting.configjson) !== null && _b !== void 0 ? _b : "";
10730
+ }
10731
+ let percentage = "100";
10732
+ if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
10733
+ percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
10734
+ }
10735
+ // if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
10736
+ // //console.log('reporter comments 3', reportercomments);
10737
+ // buttonClick.innerHTML = "Save"
10738
+ // this.setError('Invalid Percentage!');
10739
+ // setTimeout(() => {
10740
+ // this.clearMessages();
10741
+ // }, 3000);
10742
+ // } else {
10743
+ // if (docs.length === 0 && docsOptional.length === 0) {
10744
+ // //console.log('reporter comments 3', reportercomments);
10745
+ // buttonClick.innerHTML = "Save"
10746
+ // this.setError('No documents uploaded!');
10747
+ // setTimeout(() => {
10748
+ // this.clearMessages();
10749
+ // }, 3000);
10750
+ // } else {
10751
+ // //console.log('reporterdoc', reporterdoc);
10752
+ // if (reporterdoc.length === 0) {
10753
+ // buttonClick.innerHTML = "Save"
10754
+ // this.setError('Date of completion not selected!');
10755
+ // setTimeout(() => {
10756
+ // this.clearMessages();
10757
+ // }, 3000);
10758
+ // } else if (parseInt(reporterdoc) > new Date().getTime()) {
10759
+ // buttonClick.innerHTML = "Save"
10760
+ // this.setError('Date of completion cannot be in future!');
10761
+ // setTimeout(() => {
10762
+ // this.clearMessages();
10763
+ // }, 3000);
10764
+ // } else {
10765
+ //console.log('makerscheckers 1', reportercomments);
10766
+ if (reportercomments.trim().length === 0) {
10767
+ buttonClick.innerHTML = "Save";
10768
+ this.setError('Comments cannot be blank!');
10769
+ setTimeout(() => {
10770
+ this.clearMessages();
10771
+ }, 3000);
10772
+ }
10773
+ else {
10774
+ var clickEvent = new MouseEvent("click", {
10775
+ "view": window,
10776
+ "bubbles": true,
10777
+ "cancelable": false
10778
+ });
10779
+ this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
10780
+ let flagBulk = false;
10781
+ if (this.selectedItemIds.length <= 1) {
10782
+ if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
10783
+ console.log('this.events', this.events);
10784
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10785
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10786
+ this.events[mmdd][p].documents = docs;
10787
+ this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
10788
+ this.events[mmdd][p].lastupdated = new Date().toString();
10789
+ }
10790
+ }
10791
+ console.log('uploadReport single');
10792
+ if (makercheckers.length > 0) {
10793
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
10794
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10795
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10796
+ this.events[mmdd][p].approved = true;
10797
+ this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
10798
+ // this.events[mmdd][p].documents = docs
10799
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10800
+ this.events[mmdd][p].lastupdated = new Date().toString();
10801
+ }
10802
+ }
10803
+ await this.renewContract(listEvent, reportformatvalues);
10804
+ console.log('upload report auto approve single');
10805
+ }
10806
+ if (this.recentlyReported[mmdd] == null) {
10807
+ this.recentlyReported[mmdd] = [];
10808
+ }
10809
+ this.recentlyReported[mmdd].push(listEvent);
10810
+ }
10811
+ }
10812
+ else {
10813
+ let bulkBody = [];
10814
+ let bulkBodyReview = [];
10815
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10816
+ const selectedId = this.selectedItemIds[k];
10817
+ //console.log('selectedid', selectedId);
10818
+ const makercheckersL = selectedId.split('-')[5];
10819
+ entityId = selectedId.split('-')[7].replace(/_/g, '-');
10820
+ locationId = selectedId.split('-')[8].replace(/_/g, '-');
10821
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10822
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10823
+ //console.log(entityId, locationId, eventId, mmddyyyy);
10824
+ // await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
10825
+ // if(parseInt(makercheckersL) > 0) {
10826
+ // bulkBodyReview.push({
10827
+ // "mmddyyyy": mmddyyyy,
10828
+ // "projectid": this.projectId,
10829
+ // "type": "report",
10830
+ // "eventid": eventId,
10831
+ // "comments": reportercomments,
10832
+ // "dateofcompletion": reporterdoc,
10833
+ // "percentage": percentage,
10834
+ // "entityid": entityId,
10835
+ // "locationid": locationId,
10836
+ // "event": null,
10837
+ // "docs": JSON.stringify(docs),
10838
+ // "approved": true,
10839
+ // "username": this.userName,
10840
+ // "reportformatvalues": reportformatvalues,
10841
+ // "reportformatschema": reportformatschema,
10842
+ // "userid": this.userProfileId,
10843
+ // "userrole": this.myRole,
10844
+ // "year": this.calendarStartYYYY,
10845
+ // "module": listEvent.module ?? "events"
10846
+ // } )
10847
+ // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
10848
+ // }else{
10849
+ bulkBody.push({
10850
+ "mmddyyyy": mmddyyyy,
10851
+ "projectid": this.projectId,
10852
+ "type": "report",
10853
+ "eventid": eventId,
10854
+ "comments": reportercomments,
10855
+ "dateofcompletion": reporterdoc,
10856
+ "percentage": percentage,
10857
+ "entityid": entityId,
10858
+ "locationid": locationId,
10859
+ "event": null,
10860
+ "docs": JSON.stringify(docs),
10861
+ "username": this.userName,
10862
+ "reportformatvalues": reportformatvalues,
10863
+ "reportformatschema": reportformatschema,
10864
+ "userid": this.userProfileId,
10865
+ "userrole": this.myRole,
10866
+ "year": this.calendarStartYYYY,
10867
+ "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "events",
10868
+ "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
10869
+ });
10870
+ // }
10871
+ // this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
10872
+ // await this.sleep(2000);
10873
+ // this.clearMessages();
10874
+ }
10875
+ // await this.uploadReportsBulk(bulkBody);
10876
+ // await this.fetchBulkReportingData();
10877
+ if (bulkBody.length > 0) {
10878
+ await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
10879
+ }
10880
+ // if(bulkBodyReview.length > 0){
10881
+ // await this.uploadReportsReviewsBulk(bulkBodyReview)
10882
+ // }
10883
+ await this.fetchBulkReportingData();
10884
+ console.log('uploadReport bulk');
10885
+ for (var k = 0; k < this.selectedItemIds.length; k++) {
10886
+ const selectedId = this.selectedItemIds[k];
10887
+ //console.log('selectedid', selectedId);
10888
+ let entityId = selectedId.split('-')[7].replace(/_/g, '-');
10889
+ let locationId = selectedId.split('-')[8].replace(/_/g, '-');
10890
+ const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10891
+ mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10892
+ let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
10893
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10894
+ if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10895
+ this.events[mmdd][p].isbulk = true;
10896
+ flagBulk = true;
10897
+ if (this.recentlyReported[mmdd] == null) {
10898
+ this.recentlyReported[mmdd] = [];
9994
10899
  }
10900
+ this.recentlyReported[mmdd].push(this.events[mmdd][p]);
9995
10901
  }
9996
10902
  }
9997
10903
  }
9998
10904
  }
10905
+ if (this.mode == "next") {
10906
+ this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
10907
+ }
10908
+ else {
10909
+ // if(this.getCurrentTab() == this.TAB_CUSTOM) {
10910
+ // this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
10911
+ // } else
10912
+ if (this.getCurrentTab() == this.TAB_FIND) {
10913
+ const searchString = this._SfFindContainer.querySelector('#stream-search').value;
10914
+ this.processFindSelection(this._SfFindContainer, searchString);
10915
+ }
10916
+ else {
10917
+ if (this.selectedItemIds.length > 0) {
10918
+ await this.fetchBulkReportingData();
10919
+ }
10920
+ this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
10921
+ // if(currentColumnButton != null) {
10922
+ // currentColumnButton.click();
10923
+ // }
10924
+ }
10925
+ }
9999
10926
  }
10927
+ // }
10928
+ // }
10929
+ // }
10000
10930
  });
10001
10931
  }
10002
10932
  }
@@ -10080,20 +11010,20 @@ let SfIEvents = class SfIEvents extends LitElement {
10080
11010
  }
10081
11011
  }
10082
11012
  };
10083
- this.fetchContractDetails = async (listEvent, mmddyyyy) => {
11013
+ this.fetchLicenseDetails = async (listEvent, mmddyyyy) => {
10084
11014
  let entityId = listEvent.entityid;
10085
11015
  let locationId = listEvent.locationid;
10086
- let url = "https://" + this.apiIdAgreements + "/getallobjectdetails";
10087
- //console.log('fetch calendar url', url);
11016
+ let url = "https://" + this.apiIdLicenses + "/getallobjectdetails";
11017
+ console.log('fetch license details url', url);
10088
11018
  let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
10089
- //console.log('urlbody', urlBody);
11019
+ console.log('fetch license details urlbody', urlBody);
10090
11020
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
10091
11021
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
10092
11022
  this._SfLoader.innerHTML = '';
10093
11023
  if (xhr.status == 200) {
10094
11024
  const jsonRespose = JSON.parse(xhr.responseText);
10095
11025
  console.log('jsonRespose agreement details', jsonRespose);
10096
- this.renderContractDetails(jsonRespose.object, mmddyyyy);
11026
+ this.renderLicenseDetails(jsonRespose.object, mmddyyyy);
10097
11027
  }
10098
11028
  else {
10099
11029
  if (xhr.status == 401) {
@@ -10106,9 +11036,9 @@ let SfIEvents = class SfIEvents extends LitElement {
10106
11036
  }
10107
11037
  }
10108
11038
  };
10109
- this.renewContract = async (listEvent, reportformatvalues) => {
11039
+ this.renewLicense = async (listEvent, reportformatvalues) => {
10110
11040
  var _a;
10111
- let url = "https://" + this.apiIdAgreements + "/reopen";
11041
+ let url = "https://" + this.apiIdLicenses + "/reopen";
10112
11042
  console.log('renewing', reportformatvalues);
10113
11043
  //console.log('fetch calendar url', url);
10114
11044
  let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
@@ -10131,7 +11061,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10131
11061
  }
10132
11062
  }
10133
11063
  };
10134
- this.renderContractDetails = async (listEvent, mmddyyyy) => {
11064
+ this.renderLicenseDetails = async (listEvent, mmddyyyy) => {
10135
11065
  var _a, _b, _c, _f, _g, _h;
10136
11066
  // await this.fetchAgreementDetails(listEvent, mmddyyyy);
10137
11067
  // return;
@@ -10148,7 +11078,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10148
11078
  html += `
10149
11079
  <div part="compliance-detail-title" class="d-flex justify-between">
10150
11080
  <button part="button-icon" class="material-icons invisible">close</button>
10151
- <h3 part="results-title" class="m-0">Agreement Details</h3>
11081
+ <h3 part="results-title" class="m-0">License Details</h3>
10152
11082
  <button id="button-detail-close" part="button-icon" class="material-icons">close</button>
10153
11083
  </div>
10154
11084
  `;
@@ -10156,7 +11086,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10156
11086
  <div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
10157
11087
  </div>
10158
11088
  `;
10159
- 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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>';
11089
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="License Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdLicenses + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
10160
11090
  html += '<div part="reporting-view-container">';
10161
11091
  html += this.renderReporting(listEvent, mmddyyyy);
10162
11092
  html += "</div>";
@@ -10207,6 +11137,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10207
11137
  sfireporting.editdisable = "true";
10208
11138
  setTimeout(() => {
10209
11139
  console.log('sfireporting', sfireporting._SfReportingContainer);
11140
+ console.log('sfireporting', sfireporting.selectedItem);
10210
11141
  sfireporting.loadMode();
10211
11142
  }, 500);
10212
11143
  sfireporting.addEventListener('valueChanged', () => {
@@ -10223,7 +11154,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10223
11154
  reportingSchemaJson = listEvent.customreporting;
10224
11155
  }
10225
11156
  if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
10226
- 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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>';
11157
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="License Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
10227
11158
  let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
10228
11159
  if (reportFormatContainer != null) {
10229
11160
  reportFormatContainer.innerHTML = reportingHtml;
@@ -10331,7 +11262,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10331
11262
  console.log('mmddyyyy', mmddyyyy);
10332
11263
  if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "events")) {
10333
11264
  if (approved) {
10334
- await this.renewContract(listEvent, reportformatvalues);
11265
+ await this.renewLicense(listEvent, reportformatvalues);
10335
11266
  }
10336
11267
  else {
10337
11268
  console.log('renew reporting', reportformatvalues);
@@ -10657,7 +11588,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10657
11588
  this.events[mmdd][p].lastupdated = new Date().toString();
10658
11589
  }
10659
11590
  }
10660
- await this.renewContract(listEvent, reportformatvalues);
11591
+ await this.renewLicense(listEvent, reportformatvalues);
10661
11592
  console.log('upload report auto approve single');
10662
11593
  }
10663
11594
  if (this.recentlyReported[mmdd] == null) {
@@ -10867,20 +11798,20 @@ let SfIEvents = class SfIEvents extends LitElement {
10867
11798
  }
10868
11799
  }
10869
11800
  };
10870
- this.fetchLicenseDetails = async (listEvent, mmddyyyy) => {
11801
+ this.fetchRCMResourceDetails = async (listEvent, mmddyyyy) => {
10871
11802
  let entityId = listEvent.entityid;
10872
11803
  let locationId = listEvent.locationid;
10873
- let url = "https://" + this.apiIdLicenses + "/getallobjectdetails";
10874
- console.log('fetch license details url', url);
11804
+ let url = "https://" + this.apiIdRCMResources + "/getallobjectdetails";
11805
+ console.log('fetch rcm resource details url', url);
10875
11806
  let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
10876
- console.log('fetch license details urlbody', urlBody);
11807
+ console.log('fetch rcm resource details urlbody', urlBody);
10877
11808
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
10878
11809
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
10879
11810
  this._SfLoader.innerHTML = '';
10880
11811
  if (xhr.status == 200) {
10881
11812
  const jsonRespose = JSON.parse(xhr.responseText);
10882
11813
  console.log('jsonRespose agreement details', jsonRespose);
10883
- this.renderLicenseDetails(jsonRespose.object, mmddyyyy);
11814
+ this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy);
10884
11815
  }
10885
11816
  else {
10886
11817
  if (xhr.status == 401) {
@@ -10893,13 +11824,13 @@ let SfIEvents = class SfIEvents extends LitElement {
10893
11824
  }
10894
11825
  }
10895
11826
  };
10896
- this.renewLicense = async (listEvent, reportformatvalues) => {
11827
+ this.renewRCMResource = async (listEvent, reportformatvalues) => {
10897
11828
  var _a;
10898
- let url = "https://" + this.apiIdLicenses + "/reopen";
11829
+ let url = "https://" + this.apiIdRCMResources + "/reopen";
10899
11830
  console.log('renewing', reportformatvalues);
10900
11831
  //console.log('fetch calendar url', url);
10901
11832
  let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
10902
- // console.log('reopen body', url, urlBody)
11833
+ console.log('reopen body', url, urlBody);
10903
11834
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
10904
11835
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
10905
11836
  this._SfLoader.innerHTML = '';
@@ -10918,7 +11849,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10918
11849
  }
10919
11850
  }
10920
11851
  };
10921
- this.renderLicenseDetails = async (listEvent, mmddyyyy) => {
11852
+ this.renderRCMResourceDetails = async (listEvent, mmddyyyy) => {
10922
11853
  var _a, _b, _c, _f, _g, _h;
10923
11854
  // await this.fetchAgreementDetails(listEvent, mmddyyyy);
10924
11855
  // return;
@@ -10935,7 +11866,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10935
11866
  html += `
10936
11867
  <div part="compliance-detail-title" class="d-flex justify-between">
10937
11868
  <button part="button-icon" class="material-icons invisible">close</button>
10938
- <h3 part="results-title" class="m-0">License Details</h3>
11869
+ <h3 part="results-title" class="m-0">RCM Resource Details</h3>
10939
11870
  <button id="button-detail-close" part="button-icon" class="material-icons">close</button>
10940
11871
  </div>
10941
11872
  `;
@@ -10943,7 +11874,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10943
11874
  <div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
10944
11875
  </div>
10945
11876
  `;
10946
- 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="License Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdLicenses + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
11877
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="RCM Resource Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdRCMResources + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
10947
11878
  html += '<div part="reporting-view-container">';
10948
11879
  html += this.renderReporting(listEvent, mmddyyyy);
10949
11880
  html += "</div>";
@@ -11011,7 +11942,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11011
11942
  reportingSchemaJson = listEvent.customreporting;
11012
11943
  }
11013
11944
  if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
11014
- 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="License Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
11945
+ 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-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, 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-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, 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="RCM Resource Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
11015
11946
  let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
11016
11947
  if (reportFormatContainer != null) {
11017
11948
  reportFormatContainer.innerHTML = reportingHtml;
@@ -11119,7 +12050,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11119
12050
  console.log('mmddyyyy', mmddyyyy);
11120
12051
  if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "events")) {
11121
12052
  if (approved) {
11122
- await this.renewLicense(listEvent, reportformatvalues);
12053
+ await this.renewRCMResource(listEvent, reportformatvalues);
11123
12054
  }
11124
12055
  else {
11125
12056
  console.log('renew reporting', reportformatvalues);
@@ -11445,7 +12376,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11445
12376
  this.events[mmdd][p].lastupdated = new Date().toString();
11446
12377
  }
11447
12378
  }
11448
- await this.renewLicense(listEvent, reportformatvalues);
12379
+ await this.renewRCMResource(listEvent, reportformatvalues);
11449
12380
  console.log('upload report auto approve single');
11450
12381
  }
11451
12382
  if (this.recentlyReported[mmdd] == null) {
@@ -12034,6 +12965,9 @@ let SfIEvents = class SfIEvents extends LitElement {
12034
12965
  // for(let attachmentUploader of attachmentUploaders){
12035
12966
  // attachmentUploader.loadMode();
12036
12967
  // }
12968
+ let ddmmyyyy = mmddyyyy.split('/')[1] + '/' + mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[2];
12969
+ let emailcontent = `<table border="0" cellspacing="0" style="color:#666666;border-radius:5px;border:solid 1px #efefef;width:100%; margin-top:20px"><tbody><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Compliance ID</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.id}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Country</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.countryname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Entity</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.entityname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Location</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.locationname}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%;font-weight:bold">Statute</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#fbfbfb;font-size:110%">${event.statute}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Subcategory</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.subcategory}</td></tr><tr><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%;font-weight:bold">Due Date</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${ddmmyyyy}</td></tr></tbody></table>`;
12970
+ this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
12037
12971
  (_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
12038
12972
  await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
12039
12973
  this.setSuccess('Deleted successfully!');
@@ -13857,17 +14791,26 @@ let SfIEvents = class SfIEvents extends LitElement {
13857
14791
  console.log('csv data', tempArr);
13858
14792
  let changeCount = 0;
13859
14793
  for (let [i, obj] of tempArr.entries()) {
13860
- if (JSON.stringify(taggingArray.data.mappings.mappings[i]) !== JSON.stringify(obj)) {
14794
+ let tempObj = taggingArray.data.mappings.mappings[i];
14795
+ delete tempObj['delta'];
14796
+ delete tempObj['lastupdated'];
14797
+ if (tempObj["id"].indexOf("6fb88c28-d572-4b55-b16c-957a519733b9") >= 0 || tempObj["id"].indexOf("90dbfbcc-a009-4778-b28e-a463867ceea9") >= 0 || tempObj["id"].indexOf("62330e24-298d-4ef2-9449-c0e400e37cac") >= 0 || tempObj["id"].indexOf("b9370711-024a-498a-8ce2-21c549824600") >= 0) {
14798
+ console.log('changed onboarding item', tempObj, obj, JSON.stringify(tempObj) !== JSON.stringify(obj));
14799
+ }
14800
+ if (JSON.stringify(tempObj) !== JSON.stringify(obj)) {
13861
14801
  // console.log('item changed', taggingArray.data.mappings.mappings[i], obj)
13862
14802
  let changedId = "";
13863
14803
  for (let [k, col] of uniqCols.entries()) {
13864
- changedId += taggingArray.data.mappings.mappings[i][col];
14804
+ changedId += tempObj[col];
13865
14805
  if (k < (uniqCols.length - 1)) {
13866
14806
  changedId += ";";
13867
14807
  }
13868
14808
  }
13869
14809
  // this.changedOnboardingItemIds.push(taggingArray.data.mappings.mappings[i].id + ";" + taggingArray.data.mappings.mappings[i].entityid + ";" + taggingArray.data.mappings.mappings[i].locationid)
13870
14810
  this.changedOnboardingItemIds.push(changedId);
14811
+ // if(changedId.indexOf("6fb88c28-d572-4b55-b16c-957a519733b9") >= 0){
14812
+ // console.log('changed onboarding item', tempObj, obj)
14813
+ // }
13871
14814
  changeCount++;
13872
14815
  }
13873
14816
  }
@@ -14904,84 +15847,84 @@ let SfIEvents = class SfIEvents extends LitElement {
14904
15847
  html += '</div>';
14905
15848
  this._SfOnboardingTriggersContainer.innerHTML = html;
14906
15849
  //console.log('rendering triggers...', (this._SfOnboardingTriggersContainer as HTMLDivElement).innerHTML);
14907
- this.renderTaggingTable(this._SfOnboardingTriggersListContainer, mappedSerializedAlertSchedules, mappedTriggers, ["obligationtitle", "obligationtype"], this.uploadTriggersMapping, this.loadOnboardingTriggers, "triggers", ["id", "entityname", "locationname"], '', "", ["triggers"], triggersJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15850
+ this.renderTaggingTable(this._SfOnboardingTriggersListContainer, mappedSerializedAlertSchedules, mappedTriggers, ["shortid", "obligationtitle", "obligationtype"], this.uploadTriggersMapping, this.loadOnboardingTriggers, "triggers", ["id", "entityname", "locationname"], '', "", ["triggers"], triggersJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14908
15851
  };
14909
15852
  this.renderOnboardingInternalControls = (mappedInternalControls, mappedSerializedTriggers, internalcontrolsJobs) => {
14910
15853
  var html = '';
14911
15854
  html += '<div id="internalcontrols-list-container" class="d-flex flex-col w-100 scroll-x">';
14912
15855
  html += '</div>';
14913
15856
  this._SfOnboardingInternalControlsContainer.innerHTML = html;
14914
- this.renderTaggingTable(this._SfOnboardingInternalControlsListContainer, mappedSerializedTriggers, mappedInternalControls, ["obligationtitle", "obligationtype"], this.uploadInternalControlsMapping, this.loadOnboardingInternalControls, "internalcontrols", ["id", "entityname", "locationname"], '', "", ["internalcontrols"], internalcontrolsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15857
+ this.renderTaggingTable(this._SfOnboardingInternalControlsListContainer, mappedSerializedTriggers, mappedInternalControls, ["shortid", "obligationtitle", "obligationtype"], this.uploadInternalControlsMapping, this.loadOnboardingInternalControls, "internalcontrols", ["id", "entityname", "locationname"], '', "", ["internalcontrols"], internalcontrolsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14915
15858
  };
14916
15859
  this.renderOnboardingActivations = (mappedActivations, mappedSerializedExtensions, activationsJobs) => {
14917
15860
  var html = '';
14918
15861
  html += '<div id="activations-list-container" class="d-flex flex-col w-100 scroll-x">';
14919
15862
  html += '</div>';
14920
15863
  this._SfOnboardingActivationsContainer.innerHTML = html;
14921
- this.renderTaggingTable(this._SfOnboardingActivationListContainer, mappedSerializedExtensions, mappedActivations, ["obligationtitle", "obligationtype"], this.uploadActivationsMapping, this.loadOnboardingActivations, "activations", ["id", "entityname", "locationname"], '', "", ["activations"], activationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15864
+ this.renderTaggingTable(this._SfOnboardingActivationListContainer, mappedSerializedExtensions, mappedActivations, ["shortid", "obligationtitle", "obligationtype"], this.uploadActivationsMapping, this.loadOnboardingActivations, "activations", ["id", "entityname", "locationname"], '', "", ["activations"], activationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14922
15865
  };
14923
15866
  this.renderOnboardingInvalidations = (mappedInvalidations, mappedSerializedExtensions, invalidationsJobs) => {
14924
15867
  var html = '';
14925
15868
  html += '<div id="invalidations-list-container" class="d-flex flex-col w-100 scroll-x">';
14926
15869
  html += '</div>';
14927
15870
  this._SfOnboardingInvalidationsContainer.innerHTML = html;
14928
- this.renderTaggingTable(this._SfOnboardingInvalidationListContainer, mappedSerializedExtensions, mappedInvalidations, ["obligationtitle", "obligationtype"], this.uploadInvalidationsMapping, this.loadOnboardingInvalidations, "invalidations", ["id", "entityname", "locationname"], '', "", ["invalidations"], invalidationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15871
+ this.renderTaggingTable(this._SfOnboardingInvalidationListContainer, mappedSerializedExtensions, mappedInvalidations, ["shortid", "obligationtitle", "obligationtype"], this.uploadInvalidationsMapping, this.loadOnboardingInvalidations, "invalidations", ["id", "entityname", "locationname"], '', "", ["invalidations"], invalidationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14929
15872
  };
14930
15873
  this.renderOnboardingAlertSchedules = (mappedAlertSchedules, mappedSerializedExtensions, alertschedulesJobs) => {
14931
15874
  var html = '';
14932
15875
  html += '<div id="alertschedules-list-container" class="d-flex flex-col w-100 scroll-x">';
14933
15876
  html += '</div>';
14934
15877
  this._SfOnboardingAlertSchedulesContainer.innerHTML = html;
14935
- this.renderTaggingTable(this._SfOnboardingAlertSchedulesListContainer, mappedSerializedExtensions, mappedAlertSchedules, ["obligationtitle", "obligationtype"], this.uploadAlertSchedulesMapping, this.loadOnboardingAlertSchedules, "alertschedules", ["id", "entityname", "locationname"], '', "", ["alertschedules"], alertschedulesJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15878
+ this.renderTaggingTable(this._SfOnboardingAlertSchedulesListContainer, mappedSerializedExtensions, mappedAlertSchedules, ["shortid", "obligationtitle", "obligationtype"], this.uploadAlertSchedulesMapping, this.loadOnboardingAlertSchedules, "alertschedules", ["id", "entityname", "locationname"], '', "", ["alertschedules"], alertschedulesJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14936
15879
  };
14937
15880
  this.renderOnboardingExtensions = (mappedExtensions, mappedSerializedDuedates, extensionsJobs) => {
14938
15881
  var html = '';
14939
15882
  html += '<div id="extensions-list-container" class="d-flex flex-col w-100 scroll-x">';
14940
15883
  html += '</div>';
14941
15884
  this._SfOnboardingExtensionsContainer.innerHTML = html;
14942
- this.renderTaggingTable(this._SfOnboardingExtensionsListContainer, mappedSerializedDuedates, mappedExtensions, ["obligationtitle", "obligationtype"], this.uploadExtensionsMapping, this.loadOnboardingExtensions, "extensions", ["id", "entityname", "locationname"], '', "", ["extensions"], extensionsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15885
+ this.renderTaggingTable(this._SfOnboardingExtensionsListContainer, mappedSerializedDuedates, mappedExtensions, ["shortid", "obligationtitle", "obligationtype"], this.uploadExtensionsMapping, this.loadOnboardingExtensions, "extensions", ["id", "entityname", "locationname"], '', "", ["extensions"], extensionsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14943
15886
  };
14944
15887
  this.renderOnboardingDuedates = (mappedDuedates, mappedSerializedMakerCheckers, duedatesJobs) => {
14945
15888
  var html = '';
14946
15889
  html += '<div id="duedates-list-container" class="d-flex flex-col w-100 scroll-x">';
14947
15890
  html += '</div>';
14948
15891
  this._SfOnboardingDuedatesContainer.innerHTML = html;
14949
- this.renderTaggingTable(this._SfOnboardingDuedatesListContainer, mappedSerializedMakerCheckers, mappedDuedates, ["obligationtitle", "obligationtype"], this.uploadDuedatesMapping, this.loadOnboardingDuedates, "duedates", ["id", "entityname", "locationname"], '', "", ["duedates"], duedatesJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15892
+ this.renderTaggingTable(this._SfOnboardingDuedatesListContainer, mappedSerializedMakerCheckers, mappedDuedates, ["shortid", "obligationtitle", "obligationtype"], this.uploadDuedatesMapping, this.loadOnboardingDuedates, "duedates", ["id", "entityname", "locationname"], '', "", ["duedates"], duedatesJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14950
15893
  };
14951
15894
  this.renderOnboardingReporters = (mappedReporters, mappedSerializedTags, reportersJobs, _arrFeedbackReference) => {
14952
15895
  var html = '';
14953
15896
  html += '<div id="reporters-list-container" class="d-flex flex-col w-100 scroll-x">';
14954
15897
  html += '</div>';
14955
15898
  this._SfOnboardingReportersContainer.innerHTML = html;
14956
- this.renderTaggingTable(this._SfOnboardingReportersListContainer, mappedSerializedTags, mappedReporters, ["obligationtitle", "obligationtype"], this.uploadReportersMapping, this.loadOnboardingReporters, "reporters", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["reporters"], reportersJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15899
+ this.renderTaggingTable(this._SfOnboardingReportersListContainer, mappedSerializedTags, mappedReporters, ["shortid", "obligationtitle", "obligationtype"], this.uploadReportersMapping, this.loadOnboardingReporters, "reporters", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["reporters"], reportersJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
14957
15900
  };
14958
15901
  this.renderOnboardingApprovers = (mappedApprovers, mappedSerializedReporters, approversJobs, _arrFeedbackReference) => {
14959
15902
  var html = '';
14960
15903
  html += '<div id="approvers-list-container" class="d-flex flex-col w-100 scroll-x">';
14961
15904
  html += '</div>';
14962
15905
  this._SfOnboardingApproversContainer.innerHTML = html;
14963
- this.renderTaggingTable(this._SfOnboardingApproversListContainer, mappedSerializedReporters, mappedApprovers, ["obligationtitle", "obligationtype"], this.uploadApproversMapping, this.loadOnboardingApprovers, "approvers", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["approvers"], approversJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15906
+ this.renderTaggingTable(this._SfOnboardingApproversListContainer, mappedSerializedReporters, mappedApprovers, ["shortid", "obligationtitle", "obligationtype"], this.uploadApproversMapping, this.loadOnboardingApprovers, "approvers", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["approvers"], approversJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
14964
15907
  };
14965
15908
  this.renderOnboardingFunctionHeads = (mappedFunctionHeads, mappedSerializedApprovers, functionHeadsJobs, _arrFeedbackReference) => {
14966
15909
  var html = '';
14967
15910
  html += '<div id="functionheads-list-container" class="d-flex flex-col w-100 scroll-x">';
14968
15911
  html += '</div>';
14969
15912
  this._SfOnboardingFunctionHeadsContainer.innerHTML = html;
14970
- this.renderTaggingTable(this._SfOnboardingFunctionHeadsListContainer, mappedSerializedApprovers, mappedFunctionHeads, ["obligationtitle", "obligationtype"], this.uploadFunctionHeadsMapping, this.loadOnboardingFunctionHeads, "functionheads", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["functionheads"], functionHeadsJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15913
+ this.renderTaggingTable(this._SfOnboardingFunctionHeadsListContainer, mappedSerializedApprovers, mappedFunctionHeads, ["shortid", "obligationtitle", "obligationtype"], this.uploadFunctionHeadsMapping, this.loadOnboardingFunctionHeads, "functionheads", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["functionheads"], functionHeadsJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
14971
15914
  };
14972
15915
  this.renderOnboardingMakerCheckers = (mappedMakerCheckers, mappedSerializedDocs, makerCheckerJobs) => {
14973
15916
  var html = '';
14974
15917
  html += '<div id="makercheckers-list-container" class="d-flex flex-col w-100 scroll-x">';
14975
15918
  html += '</div>';
14976
15919
  this._SfOnboardingMakerCheckersContainer.innerHTML = html;
14977
- this.renderTaggingTable(this._SfOnboardingMakerCheckersListContainer, mappedSerializedDocs, mappedMakerCheckers, ["obligationtitle", "obligationtype"], this.uploadMakerCheckersMapping, this.loadOnboardingMakerCheckers, "makercheckers", ["id", "entityname", "locationname"], this.apiIdTags, "&MakerChecker", ["makercheckers"], makerCheckerJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15920
+ this.renderTaggingTable(this._SfOnboardingMakerCheckersListContainer, mappedSerializedDocs, mappedMakerCheckers, ["shortid", "obligationtitle", "obligationtype"], this.uploadMakerCheckersMapping, this.loadOnboardingMakerCheckers, "makercheckers", ["id", "entityname", "locationname"], this.apiIdTags, "&MakerChecker", ["makercheckers"], makerCheckerJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14978
15921
  };
14979
15922
  this.renderOnboardingDocs = (mappedDocs, mappedSerializedViewers, docsJobs) => {
14980
15923
  var html = '';
14981
15924
  html += '<div id="docs-list-container" class="d-flex flex-col w-100 scroll-x">';
14982
15925
  html += '</div>';
14983
15926
  this._SfOnboardingDocsContainer.innerHTML = html;
14984
- this.renderTaggingTable(this._SfOnboardingDocsListContainer, mappedSerializedViewers, mappedDocs, ["obligationtitle", "obligationtype"], this.uploadDocsMapping, this.loadOnboardingDocs, "docs", ["id", "entityname", "locationname"], this.apiIdTags, "&MakerChecker", ["docs"], docsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15927
+ this.renderTaggingTable(this._SfOnboardingDocsListContainer, mappedSerializedViewers, mappedDocs, ["shortid", "obligationtitle", "obligationtype"], this.uploadDocsMapping, this.loadOnboardingDocs, "docs", ["id", "entityname", "locationname"], this.apiIdTags, "&MakerChecker", ["docs"], docsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
14985
15928
  };
14986
15929
  this.renderOnboardingAuditors = (mappedAuditors, mappedSerializedFunctionheads, auditorsJobs, _arrFeedbackReference) => {
14987
15930
  //console.log('inside rendering auditors..');
@@ -14989,7 +15932,7 @@ let SfIEvents = class SfIEvents extends LitElement {
14989
15932
  html += '<div id="auditors-list-container" class="d-flex flex-col w-100 scroll-x">';
14990
15933
  html += '</div>';
14991
15934
  this._SfOnboardingAuditorsContainer.innerHTML = html;
14992
- this.renderTaggingTable(this._SfOnboardingAuditorsListContainer, mappedSerializedFunctionheads, mappedAuditors, ["obligationtitle", "obligationtype"], this.uploadAuditorsMapping, this.loadOnboardingAuditors, "auditors", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["auditors"], auditorsJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15935
+ this.renderTaggingTable(this._SfOnboardingAuditorsListContainer, mappedSerializedFunctionheads, mappedAuditors, ["shortid", "obligationtitle", "obligationtype"], this.uploadAuditorsMapping, this.loadOnboardingAuditors, "auditors", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["auditors"], auditorsJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
14993
15936
  };
14994
15937
  this.renderOnboardingViewers = (mappedViewers, mappedSerializedAuditors, viewersJobs, _arrFeedbackReference) => {
14995
15938
  //console.log('inside rendering viewers..');
@@ -14997,14 +15940,14 @@ let SfIEvents = class SfIEvents extends LitElement {
14997
15940
  html += '<div id="viewers-list-container" class="d-flex flex-col w-100 scroll-x">';
14998
15941
  html += '</div>';
14999
15942
  this._SfOnboardingViewersContainer.innerHTML = html;
15000
- this.renderTaggingTable(this._SfOnboardingViewersListContainer, mappedSerializedAuditors, mappedViewers, ["obligationtitle", "obligationtype"], this.uploadViewersMapping, this.loadOnboardingViewers, "viewers", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["viewers"], viewersJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15943
+ this.renderTaggingTable(this._SfOnboardingViewersListContainer, mappedSerializedAuditors, mappedViewers, ["shortid", "obligationtitle", "obligationtype"], this.uploadViewersMapping, this.loadOnboardingViewers, "viewers", ["id", "entityname", "locationname"], this.apiIdUsers, "", ["viewers"], viewersJobs, null, ["Client remarks", "FlaggGRC response"], null, "Guidelines", "");
15001
15944
  };
15002
15945
  this.renderOnboardingTags = (mappedTags, mappedSerializedFunctions, tagsJobs) => {
15003
15946
  var html = '';
15004
15947
  html += '<div id="tags-list-container" class="d-flex flex-col w-100 scroll-x">';
15005
15948
  html += '</div>';
15006
15949
  this._SfOnboardingTagsContainer.innerHTML = html;
15007
- this.renderTaggingTable(this._SfOnboardingTagsListContainer, mappedSerializedFunctions, mappedTags, ["obligationtitle", "obligationtype"], this.uploadTagsMapping, this.loadOnboardingTags, "tags", ["id", "countryname", "entityname", "locationname"], this.apiIdTags, "&Tag", ["tags"], tagsJobs, "tagtype", ["Client remarks", "FlaggGRC response"], null, "", "");
15950
+ this.renderTaggingTable(this._SfOnboardingTagsListContainer, mappedSerializedFunctions, mappedTags, ["shortid", "obligationtitle", "obligationtype"], this.uploadTagsMapping, this.loadOnboardingTags, "tags", ["id", "countryname", "entityname", "locationname"], this.apiIdTags, "&Tag", ["tags"], tagsJobs, "tagtype", ["Client remarks", "FlaggGRC response"], null, "", "");
15008
15951
  };
15009
15952
  this.renderOnboardingFunctions = (mappedFunctions, mappedSerializedLocations, functionsJobs) => {
15010
15953
  var html = '';
@@ -15016,14 +15959,14 @@ let SfIEvents = class SfIEvents extends LitElement {
15016
15959
  }
15017
15960
  }
15018
15961
  this._SfOnboardingFunctionsContainer.innerHTML = html;
15019
- this.renderTaggingTable(this._SfOnboardingFunctionsListContainer, mappedSerializedLocations, mappedFunctions, ["obligationtitle", "obligationtype"], this.uploadFunctionsMapping, this.loadOnboardingFunctions, "functions", ["id", "countryname", "entityname", "locationname"], this.apiIdTags, "&Function", ["functions"], functionsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15962
+ this.renderTaggingTable(this._SfOnboardingFunctionsListContainer, mappedSerializedLocations, mappedFunctions, ["shortid", "obligationtitle", "obligationtype"], this.uploadFunctionsMapping, this.loadOnboardingFunctions, "functions", ["id", "countryname", "entityname", "locationname"], this.apiIdTags, "&Function", ["functions"], functionsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15020
15963
  };
15021
15964
  this.renderOnboardingLocations = (mappedLocations, mappedSerializedEntities, locationsJobs) => {
15022
15965
  var html = '';
15023
15966
  html += '<div id="locations-list-container" class="d-flex flex-col w-100 scroll-x">';
15024
15967
  html += '</div>';
15025
15968
  this._SfOnboardingLocationsContainer.innerHTML = html;
15026
- this.renderTaggingTable(this._SfOnboardingLocationsListContainer, mappedSerializedEntities, mappedLocations, ["shortid", "firstlineofdefence", "obligationtitle", "obligationtype", "country", "statute", "reference"], this.uploadLocationsMapping, this.loadOnboardingLocations, "locations", ["id", "countryname", "entityname"], this.apiIdTags, "&Location", ["locations"], locationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15969
+ this.renderTaggingTable(this._SfOnboardingLocationsListContainer, mappedSerializedEntities, mappedLocations, ["shortid", "applicability", "firstlineofdefence", "obligationtitle", "obligationtype", "country", "statute", "reference"], this.uploadLocationsMapping, this.loadOnboardingLocations, "locations", ["id", "countryname", "entityname"], this.apiIdTags, "&Location", ["locations"], locationsJobs, null, ["Client remarks", "FlaggGRC response"], null, "", "");
15027
15970
  };
15028
15971
  this.renderOnboardingCompliances = (mappedStatutes, mappedCompliances) => {
15029
15972
  //console.log('mappedcompliances', mappedCompliances);
@@ -15138,7 +16081,7 @@ let SfIEvents = class SfIEvents extends LitElement {
15138
16081
  html += '<div id="entities-list-container" class="d-flex flex-col w-100 scroll-x">';
15139
16082
  html += '</div>';
15140
16083
  this._SfOnboardingEntitiesContainer.innerHTML = html;
15141
- this.renderTaggingTable(this._SfOnboardingEntitiesListContainer, mappedSerializedCountries, mappedEntities, ["shortid", "firstlineofdefence", "obligationtitle", "obligationtype", "country", "statute"], this.uploadEntitiesMapping, this.loadOnboardingEntities, "entities", ["id", "countryname"], this.apiIdTags, "&Entity", ["entities"], entitiesJobs, null, ["Client remarks", "FlaggGRC response"], arrFeedbackReference, "Guideline", "");
16084
+ this.renderTaggingTable(this._SfOnboardingEntitiesListContainer, mappedSerializedCountries, mappedEntities, ["shortid", "applicability", "firstlineofdefence", "obligationtitle", "obligationtype", "country", "statute"], this.uploadEntitiesMapping, this.loadOnboardingEntities, "entities", ["id", "countryname"], this.apiIdTags, "&Entity", ["entities"], entitiesJobs, null, ["Client remarks", "FlaggGRC response"], arrFeedbackReference, "Guideline", "");
15142
16085
  };
15143
16086
  this.renderOnboardingCountries = (mappedCountries, mappedCompliances, countriesJobs) => {
15144
16087
  var html = '';
@@ -16294,6 +17237,9 @@ let SfIEvents = class SfIEvents extends LitElement {
16294
17237
  else if (this.selectedFeatures.indexOf('licenses') >= 0) {
16295
17238
  await this.fetchAndRenderLicenses(this.sdate, this.edate, "", "no");
16296
17239
  }
17240
+ else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
17241
+ await this.fetchAndRenderRCMResources(this.sdate, this.edate, "", "no");
17242
+ }
16297
17243
  // await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no");
16298
17244
  }
16299
17245
  const radioCsv = container.querySelector('#radio-csv');
@@ -16807,7 +17753,7 @@ let SfIEvents = class SfIEvents extends LitElement {
16807
17753
  }
16808
17754
  }
16809
17755
  }
16810
- //console.log('newarrlist', newArrList);
17756
+ console.log('newarrlist', newArrList);
16811
17757
  let filteredHTML = '';
16812
17758
  if (this.selectedFilters != null) {
16813
17759
  if (this.selectedFilters.selected) {
@@ -16831,6 +17777,7 @@ let SfIEvents = class SfIEvents extends LitElement {
16831
17777
  filteredHTML += newArrList[i].outerHTML;
16832
17778
  }
16833
17779
  filteredHTML += '</table></div>';
17780
+ // console.log('filteredHTML', filteredHTML);
16834
17781
  return filteredHTML;
16835
17782
  };
16836
17783
  this.getFilteredStringSummary = () => {
@@ -20487,6 +21434,9 @@ let SfIEvents = class SfIEvents extends LitElement {
20487
21434
  else if (this.selectedFeatures.indexOf('licenses') >= 0) {
20488
21435
  this.fetchAndRenderLicenses(startDate, endDate, searchString, list, month, year);
20489
21436
  }
21437
+ else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
21438
+ this.fetchAndRenderRCMResources(startDate, endDate, searchString, list, month, year);
21439
+ }
20490
21440
  };
20491
21441
  this.fetchAndYearlyRenderUserCalendar_2 = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
20492
21442
  let path = "", view = "";
@@ -20664,7 +21614,6 @@ let SfIEvents = class SfIEvents extends LitElement {
20664
21614
  }
20665
21615
  };
20666
21616
  this.fetchAndRenderContracts = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
20667
- var _a;
20668
21617
  let path = "", view = "";
20669
21618
  this.sdate = startDate;
20670
21619
  this.edate = endDate;
@@ -20705,16 +21654,17 @@ let SfIEvents = class SfIEvents extends LitElement {
20705
21654
  if (xhr.status == 200) {
20706
21655
  const jsonRespose = JSON.parse(xhr.responseText);
20707
21656
  console.log('jsonRespose', jsonRespose);
20708
- let agreements = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
21657
+ let contracts = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
20709
21658
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
20710
21659
  this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
20711
- let tempEvents = this.events;
20712
- for (let mmddyyyy of Object.keys(agreements)) {
20713
- tempEvents[mmddyyyy] = [...((_a = tempEvents[mmddyyyy]) !== null && _a !== void 0 ? _a : []), ...agreements[mmddyyyy]];
20714
- }
20715
- this.events = tempEvents;
21660
+ // let tempEvents = this.events
21661
+ // for (let mmddyyyy of Object.keys(contracts)) {
21662
+ // tempEvents[mmddyyyy] = [...(tempEvents[mmddyyyy] ?? []), ...contracts[mmddyyyy]]
21663
+ // }
21664
+ // this.events = tempEvents;
21665
+ this.events = contracts;
20716
21666
  this.renderAppropriateStream(this.sdate, this.edate, true);
20717
- console.log('contracts', agreements, tempEvents);
21667
+ console.log('contracts', contracts);
20718
21668
  }
20719
21669
  else {
20720
21670
  if (xhr.status == 401) {
@@ -20733,7 +21683,6 @@ let SfIEvents = class SfIEvents extends LitElement {
20733
21683
  }
20734
21684
  };
20735
21685
  this.fetchAndRenderLicenses = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
20736
- var _a;
20737
21686
  let path = "", view = "";
20738
21687
  this.sdate = startDate;
20739
21688
  this.edate = endDate;
@@ -20777,13 +21726,78 @@ let SfIEvents = class SfIEvents extends LitElement {
20777
21726
  let licenses = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
20778
21727
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
20779
21728
  this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
20780
- let tempEvents = this.events;
20781
- for (let mmddyyyy of Object.keys(licenses)) {
20782
- tempEvents[mmddyyyy] = [...((_a = tempEvents[mmddyyyy]) !== null && _a !== void 0 ? _a : []), ...licenses[mmddyyyy]];
21729
+ // let tempEvents = this.events
21730
+ // for (let mmddyyyy of Object.keys(licenses)) {
21731
+ // tempEvents[mmddyyyy] = [...(tempEvents[mmddyyyy] ?? []), ...licenses[mmddyyyy]]
21732
+ // }
21733
+ // this.events = tempEvents;
21734
+ this.events = licenses;
21735
+ this.renderAppropriateStream(this.sdate, this.edate, true);
21736
+ console.log('licenses', licenses);
21737
+ }
21738
+ else {
21739
+ if (xhr.status == 401) {
21740
+ let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
21741
+ this.dispatchEvent(changeEvent);
20783
21742
  }
20784
- this.events = tempEvents;
21743
+ if (xhr.status === 404) {
21744
+ this.showChosenProject();
21745
+ this._SfTitleChosenProject.innerHTML = this._SfProject[0].querySelector('#sf-i-project').selectedTexts()[0];
21746
+ this.renderChosenProject();
21747
+ }
21748
+ else {
21749
+ const jsonRespose = JSON.parse(xhr.responseText);
21750
+ this.setError(jsonRespose.error);
21751
+ }
21752
+ }
21753
+ };
21754
+ this.fetchAndRenderRCMResources = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
21755
+ let path = "", view = "";
21756
+ this.sdate = startDate;
21757
+ this.edate = endDate;
21758
+ if (this.tagId != null && this.tagId != "") {
21759
+ view = "tag";
21760
+ }
21761
+ else if (this.countryId != null && this.countryId != "") {
21762
+ view = "country";
21763
+ }
21764
+ else if (this.locationId != null && this.locationId != "") {
21765
+ view = "location";
21766
+ }
21767
+ else {
21768
+ view = "entity";
21769
+ }
21770
+ path = "getallcountryobjects";
21771
+ let sDate = "";
21772
+ let eDate = "";
21773
+ //console.log('currenttab', this.getCurrentTab());
21774
+ if (this.getCurrentTab() == this.TAB_YEAR) {
21775
+ sDate = "03/31/" + this.calendarStartYYYY;
21776
+ eDate = "04/01/" + (parseInt(this.calendarStartYYYY) + 1);
21777
+ }
21778
+ else {
21779
+ sDate = startDate;
21780
+ eDate = endDate;
21781
+ }
21782
+ let url = "https://" + this.apiIdRCMResources + "/" + path;
21783
+ //console.log('fetch calendar url', url);
21784
+ let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": this.entityId, "countryid": this.countryId, "functionid": this.functionId, "locationid": this.locationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": view, "year": year, "list": list, "month": month };
21785
+ if (searchString.length > 0) {
21786
+ urlBody["searchstring"] = searchString;
21787
+ }
21788
+ //console.log('urlbody', urlBody);
21789
+ const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
21790
+ const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
21791
+ this._SfLoader.innerHTML = '';
21792
+ if (xhr.status == 200) {
21793
+ const jsonRespose = JSON.parse(xhr.responseText);
21794
+ console.log('jsonRespose', jsonRespose);
21795
+ let rcmresources = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
21796
+ await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
21797
+ this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
21798
+ this.events = rcmresources;
20785
21799
  this.renderAppropriateStream(this.sdate, this.edate, true);
20786
- console.log('licenses', licenses, tempEvents);
21800
+ console.log('rcmresources', rcmresources);
20787
21801
  }
20788
21802
  else {
20789
21803
  if (xhr.status == 401) {
@@ -20831,6 +21845,9 @@ let SfIEvents = class SfIEvents extends LitElement {
20831
21845
  else if (this.selectedFeatures.indexOf('licenses') >= 0) {
20832
21846
  url = "https://" + this.apiIdLicenses + "/" + path;
20833
21847
  }
21848
+ else if (this.selectedFeatures.indexOf('rcmresource') >= 0) {
21849
+ url = "https://" + this.apiIdRCMResources + "/" + path;
21850
+ }
20834
21851
  //console.log('fetch calendar url', url);
20835
21852
  let urlBody = { "projectid": this.projectId, "userid": this.userProfileId, "role": this.myRole, "sdate": sDate, "edate": eDate, "filtercriteria": filtercriteria, "subfiltercriteria": subfiltercriteria, "subfilterid": subfilterid };
20836
21853
  if (filtercriteria == 'function') {
@@ -23977,6 +24994,9 @@ __decorate([
23977
24994
  __decorate([
23978
24995
  property()
23979
24996
  ], SfIEvents.prototype, "apiIdLicenses", void 0);
24997
+ __decorate([
24998
+ property()
24999
+ ], SfIEvents.prototype, "apiIdRCMResources", void 0);
23980
25000
  __decorate([
23981
25001
  property()
23982
25002
  ], SfIEvents.prototype, "apiMethodList", void 0);