sf-i-events 1.0.881 → 1.0.882
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/index.html +32 -3
- package/package.json +1 -1
- package/sf-i-events.d.ts +7 -3
- package/sf-i-events.js +428 -185
- package/src/sf-i-events.ts +448 -207
package/sf-i-events.js
CHANGED
|
@@ -850,7 +850,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
850
850
|
`;
|
|
851
851
|
this.AUTOSAVE_FLAG = true;
|
|
852
852
|
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "entities", "locations", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"];
|
|
853
|
-
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
853
|
+
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
|
|
854
854
|
this.chartSelectedLegend = [];
|
|
855
855
|
this.selectedFilters = null;
|
|
856
856
|
this.barCharDataSet2 = [];
|
|
@@ -1999,7 +1999,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
1999
1999
|
this.riskAreasComplianceStatusData = result.arrComplianceData;
|
|
2000
2000
|
};
|
|
2001
2001
|
this.updateRiskSeverityStats = (riskSeverities, partStatus, lateStatus, complianceStatus) => {
|
|
2002
|
-
|
|
2002
|
+
console.log('updateRiskSeverityStats', riskSeverities, complianceStatus);
|
|
2003
2003
|
const result = this.updateGraphStats(riskSeverities, this.riskSeverityData, this.riskSeverityPartStatusData, this.riskSeverityLateStatusData, this.riskSeverityComplianceStatusData, partStatus, lateStatus, complianceStatus);
|
|
2004
2004
|
this.riskSeverityData = result.arrData;
|
|
2005
2005
|
this.riskSeverityLateStatusData = result.arrLateData;
|
|
@@ -2330,9 +2330,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2330
2330
|
html += '<div part="chart-radio-item" class="chart-radio-item-secondary ' + (this.flowGraph == this.FLOW_GRAPH_FREQUENCY ? '' : 'hide') + '"><input type="radio" id="radio-frequency" name="graph-type" part="radio-graph" ' + ((this.flowGraph == this.FLOW_GRAPH_FREQUENCY) ? 'checked' : '') + '>';
|
|
2331
2331
|
html += '<label for="radio-frequency" part="input-label" class="mr-10">Frequency</label></div>';
|
|
2332
2332
|
}
|
|
2333
|
-
if (this.CHARTS_LIST_BY_MODULES[this.selectedFeatures[0]] != null && this.CHARTS_LIST_BY_MODULES[this.selectedFeatures[0]].indexOf("
|
|
2333
|
+
if (this.CHARTS_LIST_BY_MODULES[this.selectedFeatures[0]] != null && this.CHARTS_LIST_BY_MODULES[this.selectedFeatures[0]].indexOf("subCategory") >= 0) {
|
|
2334
2334
|
html += '<div part="chart-radio-item" class="chart-radio-item-secondary ' + (this.flowGraph == this.FLOW_GRAPH_SUBCATEGORY ? '' : 'hide') + '"><input type="radio" id="radio-subcategory" name="graph-type" part="radio-graph" ' + ((this.flowGraph == this.FLOW_GRAPH_SUBCATEGORY) ? 'checked' : '') + '>';
|
|
2335
|
-
html += '<label for="radio-
|
|
2335
|
+
html += '<label for="radio-subcategory" part="input-label">SubCategory</label></div>';
|
|
2336
2336
|
}
|
|
2337
2337
|
html += '<button id="graph-radios-expander" class="ml-10" part="calendar-tab-button-not-selected"><span class="material-symbols-outlined">chevron_right</span></button>';
|
|
2338
2338
|
html += '</div>';
|
|
@@ -2449,7 +2449,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2449
2449
|
html += '<table id="statistics-table" part="statistics-table" class="statistics-table w-100"><tbody>';
|
|
2450
2450
|
return html;
|
|
2451
2451
|
};
|
|
2452
|
-
this.renderStatisticsFiltersTableRow = (filterUser = false) => {
|
|
2452
|
+
this.renderStatisticsFiltersTableRow = (index, filterUser = false) => {
|
|
2453
2453
|
var html = '';
|
|
2454
2454
|
html += '<tr class="tablerow">';
|
|
2455
2455
|
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center">FILTER_CRITERIA_NAME</div><div>DASHBOARD_FILTER_NAME</div>';
|
|
@@ -2457,11 +2457,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2457
2457
|
html += '<div part="td-head" class="pl-0-imp w-100 d-flex align-center">Last Access</div><div>DASHBOARD_LAST_ACTIVE</div><div part="td-head" class="pl-0-imp w-100 d-flex align-center">Last Action</div><div>DASHBOARD_LAST_ACTION</div>';
|
|
2458
2458
|
}
|
|
2459
2459
|
html += '</div></td>';
|
|
2460
|
-
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-icons color-not-started">schedule</span> Not Started</div><div>DASHBOARD_NOT_STARTED</div></div></td>';
|
|
2461
|
-
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-pending">pending</span> Pending Approval</div><div>DASHBOARD_PENDING_APPROVAL</div></div></td>';
|
|
2462
|
-
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-rejected">block</span> Rejected</div><div>DASHBOARD_REJECTED</div></div></td>';
|
|
2463
|
-
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-done">check_circle</span> Approved</div><div>DASHBOARD_APPROVED</div></div></td>';
|
|
2464
|
-
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center">Total</div><div>DASHBOARD_TOTAL</div></div></td>';
|
|
2460
|
+
html += '<td part="td-body" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" id="filter-not-started-' + index + '" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-icons color-not-started">schedule</span> Not Started</div><div>DASHBOARD_NOT_STARTED</div></div></td>';
|
|
2461
|
+
html += '<td part="td-body" id="filter-pending-approval-' + index + '" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-pending">pending</span> Pending Approval</div><div>DASHBOARD_PENDING_APPROVAL</div></div></td>';
|
|
2462
|
+
html += '<td part="td-body" id="filter-rejected-' + index + '" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-rejected">block</span> Rejected</div><div>DASHBOARD_REJECTED</div></div></td>';
|
|
2463
|
+
html += '<td part="td-body" id="filter-approved-' + index + '" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center"><span class="small-icon material-symbols-outlined color-done">check_circle</span> Approved</div><div>DASHBOARD_APPROVED</div></div></td>';
|
|
2464
|
+
html += '<td part="td-body" id="filter-total-' + index + '" class="td-body TD_BODY_CLASS"><div class="d-flex align-center flex-wrap"><div part="td-head" class="pl-0-imp w-100 d-flex align-center">Total</div><div>DASHBOARD_TOTAL</div></div></td>';
|
|
2465
2465
|
html += '</tr>';
|
|
2466
2466
|
return html;
|
|
2467
2467
|
};
|
|
@@ -2887,8 +2887,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2887
2887
|
return html;
|
|
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
|
-
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton) => {
|
|
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;
|
|
2890
|
+
this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton, fromDrilldown = false) => {
|
|
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, _39, _40, _41, _42, _43, _44;
|
|
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 = [];
|
|
@@ -2903,29 +2903,40 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2903
2903
|
console.log('this.clearSelectedGraphParam(); 1', this.graphFilter);
|
|
2904
2904
|
this.clearSelectedGraphParam();
|
|
2905
2905
|
this.clearSelectedLegend();
|
|
2906
|
-
|
|
2906
|
+
if (!fromDrilldown) {
|
|
2907
|
+
html += this.renderCalendarGraphs(showGraph, parametersTitle, showBackgroundButton);
|
|
2908
|
+
}
|
|
2907
2909
|
html += this.renderCalendarContainerDivStart(index);
|
|
2908
2910
|
html += this.renderCalendarEventSummary();
|
|
2909
|
-
if (
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2911
|
+
if (!fromDrilldown) {
|
|
2912
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
2913
|
+
csvCols += 'Id,ReferenceNo.,Type,Country,Entity,Location,Party1,Party2,Party3,Reporter,Approver,Functionhead,DueDate,Status,ReportParameter';
|
|
2914
|
+
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>';
|
|
2915
|
+
}
|
|
2916
|
+
else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
2917
|
+
csvCols += 'Id,ReferenceNo.,Type,Country,Entity,Location,Reporter,Approver,Functionhead,State,Jurisdiction,Category,Subcategory,Statute,ObligationType,RiskSeverity,RiskAreas,Frequency,SubFrequency,DueDate,Status,ReportParameter';
|
|
2918
|
+
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>';
|
|
2919
|
+
}
|
|
2920
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
2921
|
+
csvCols += 'Id,Name,Url,Country,Entity,Location,Reporter,Approver,Functionhead,LastCheckedDate,DueDate,Terminated,Status,ReportParameter';
|
|
2922
|
+
htmlCols += '<tr><th class="td-thin">Id</th><th class="td-thin">Name</th><th class="td-thin">Url</th><th class="td-thin">Country</th><th class="td-thin">Entity</th><th class="td-thin">Location</th><th class="td-thin">LastCheckedDate</th><th class="td-thin">DueDate</th><th class="td-thin">Terminated</th><th class="td-wide">Status</th><th class="td-wide">ReportParameter</th></tr>';
|
|
2923
|
+
}
|
|
2924
|
+
else {
|
|
2925
|
+
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';
|
|
2926
|
+
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>';
|
|
2927
|
+
}
|
|
2928
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
2929
|
+
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>';
|
|
2930
|
+
}
|
|
2931
|
+
else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
2932
|
+
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>';
|
|
2933
|
+
}
|
|
2934
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
2935
|
+
htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">Name</th><th class="td-wide">Status</th><th class="td-wide">Url</th></tr>';
|
|
2936
|
+
}
|
|
2937
|
+
else {
|
|
2938
|
+
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>';
|
|
2939
|
+
}
|
|
2929
2940
|
}
|
|
2930
2941
|
for (var i = iInit; i <= iLast; i++) {
|
|
2931
2942
|
let mmdd = "";
|
|
@@ -3001,7 +3012,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3001
3012
|
}
|
|
3002
3013
|
this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE] = complianceStatus;
|
|
3003
3014
|
this.updateStats(this.events[mmdd][j], partStatus, lateStatus, complianceStatus);
|
|
3004
|
-
if (this.events[mmdd][j]["documents"] != null) {
|
|
3015
|
+
if (this.events[mmdd][j]["documents"] != null && !fromDrilldown) {
|
|
3005
3016
|
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
3006
3017
|
//Id,ReferenceNo.,Type,Country,Entity,Location,Party1,Party2,Party3,Reporter,Approver,Functionhead,DueDate,Status,ReportParameter
|
|
3007
3018
|
csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
|
|
@@ -3080,16 +3091,46 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3080
3091
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
|
|
3081
3092
|
+ '</tr>');
|
|
3082
3093
|
}
|
|
3094
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
3095
|
+
//Id,Name,Url,Country,Entity,Location,Reporter,Approver,Functionhead,LastCheckedDate,DueDate,Terminated,Status,ReportParameter
|
|
3096
|
+
csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
|
|
3097
|
+
csvValues += ('"' + ((this.events[mmdd][j]["obligationtitle"] + "").replace(/"/g, "") + '",'));
|
|
3098
|
+
csvValues += ('"' + ((this.events[mmdd][j]["url"] + "").replace(/"/g, "") + '",'));
|
|
3099
|
+
csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3100
|
+
csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3101
|
+
csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3102
|
+
csvValues += ('"' + ((((_30 = ((_29 = this.events[mmdd][j]["reporters"]) !== null && _29 !== void 0 ? _29 : [])[0]) !== null && _30 !== void 0 ? _30 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3103
|
+
csvValues += ('"' + ((((_32 = ((_31 = this.events[mmdd][j]["approvers"]) !== null && _31 !== void 0 ? _31 : [])[0]) !== null && _32 !== void 0 ? _32 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3104
|
+
csvValues += ('"' + ((((_34 = ((_33 = this.events[mmdd][j]["functionheads"]) !== null && _33 !== void 0 ? _33 : [])[0]) !== null && _34 !== void 0 ? _34 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3105
|
+
csvValues += ('"' + (this.events[mmdd][j]["lastcheckeddate"] + '",'));
|
|
3106
|
+
csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
|
|
3107
|
+
csvValues += ('"' + ((this.events[mmdd][j]["terminated"] ? "Yes" : "No").replace(/"/g, "") + '",'));
|
|
3108
|
+
csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
|
|
3109
|
+
csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
|
|
3110
|
+
//Id,Name,Url,Country,Entity,Location,LastCheckedDate,DueDate,Terminated,Status,ReportParameter
|
|
3111
|
+
htmlValues += ('<tr><td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["id"] + '</td>'
|
|
3112
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["obligationtitle"] + '</td>'
|
|
3113
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["url"] + '</td>'
|
|
3114
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
|
|
3115
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
|
|
3116
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
|
|
3117
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["lastcheckeddate"] + '</td>'
|
|
3118
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
|
|
3119
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["terminated"] ? "Yes" : "No") + '</td>'
|
|
3120
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
|
|
3121
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
|
|
3122
|
+
+ '</tr>');
|
|
3123
|
+
}
|
|
3083
3124
|
else {
|
|
3084
3125
|
//Id,Country,Entity,Location,Function,Reporter,Approver,Functionhead,State
|
|
3085
3126
|
csvValues += ('"' + (this.events[mmdd][j]["id"] + '",'));
|
|
3086
3127
|
csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3087
3128
|
csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3088
3129
|
csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3089
|
-
csvValues += ('"' + ((((
|
|
3090
|
-
csvValues += ('"' + ((((
|
|
3091
|
-
csvValues += ('"' + ((((
|
|
3092
|
-
csvValues += ('"' + ((((
|
|
3130
|
+
csvValues += ('"' + ((((_36 = ((_35 = this.events[mmdd][j]["functions"]) !== null && _35 !== void 0 ? _35 : [])[0]) !== null && _36 !== void 0 ? _36 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
|
|
3131
|
+
csvValues += ('"' + ((((_38 = ((_37 = this.events[mmdd][j]["reporters"]) !== null && _37 !== void 0 ? _37 : [])[0]) !== null && _38 !== void 0 ? _38 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3132
|
+
csvValues += ('"' + ((((_40 = ((_39 = this.events[mmdd][j]["approvers"]) !== null && _39 !== void 0 ? _39 : [])[0]) !== null && _40 !== void 0 ? _40 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3133
|
+
csvValues += ('"' + ((((_42 = ((_41 = this.events[mmdd][j]["functionheads"]) !== null && _41 !== void 0 ? _41 : [])[0]) !== null && _42 !== void 0 ? _42 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
|
|
3093
3134
|
csvValues += ('"' + (this.events[mmdd][j]["state"] + '",'));
|
|
3094
3135
|
csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
|
|
3095
3136
|
csvValues += ('"' + (this.events[mmdd][j]["category"] + '",'));
|
|
@@ -3158,7 +3199,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3158
3199
|
+ '<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
3200
|
+ '<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
3201
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
3161
|
-
for (let document of (
|
|
3202
|
+
for (let document of (_43 = this.events[mmdd][j].contractdocuments) !== null && _43 !== void 0 ? _43 : []) {
|
|
3162
3203
|
htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
|
|
3163
3204
|
}
|
|
3164
3205
|
htmlSummaryValues += '</td></tr>';
|
|
@@ -3168,11 +3209,17 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3168
3209
|
+ '<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
3210
|
+ '<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
3211
|
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
|
|
3171
|
-
for (let document of (
|
|
3212
|
+
for (let document of (_44 = this.events[mmdd][j].licensedocuments) !== null && _44 !== void 0 ? _44 : []) {
|
|
3172
3213
|
htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
|
|
3173
3214
|
}
|
|
3174
3215
|
htmlSummaryValues += '</td></tr>';
|
|
3175
3216
|
}
|
|
3217
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
3218
|
+
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>'
|
|
3219
|
+
+ '<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>'
|
|
3220
|
+
+ '<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>'
|
|
3221
|
+
+ '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["url"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td></tr>');
|
|
3222
|
+
}
|
|
3176
3223
|
else {
|
|
3177
3224
|
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
3225
|
+ '<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>'
|
|
@@ -3395,7 +3442,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3395
3442
|
}
|
|
3396
3443
|
}
|
|
3397
3444
|
}
|
|
3398
|
-
filtersTableHtml += this.renderStatisticsFiltersTableRow(lastAction != "" || lastActive != "");
|
|
3445
|
+
filtersTableHtml += this.renderStatisticsFiltersTableRow(filterindex, lastAction != "" || lastActive != "");
|
|
3399
3446
|
if (filterindex % 2 == 0) {
|
|
3400
3447
|
filtersTableHtml = filtersTableHtml.replace(/TD_BODY_CLASS/g, "td-light");
|
|
3401
3448
|
}
|
|
@@ -3665,8 +3712,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3665
3712
|
html = this.renderReporting(event, mmddyyyy);
|
|
3666
3713
|
console.log('reporting html', html);
|
|
3667
3714
|
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;
|
|
3715
|
+
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">Reporter</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.reporters[0].split(';')[0]}</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">Approver</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.approvers[0].split(';')[0]}</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>`;
|
|
3670
3716
|
let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container');
|
|
3671
3717
|
for (let tempReportingContainer of listReportingContainers) {
|
|
3672
3718
|
tempReportingContainer.style.display = 'none';
|
|
@@ -3697,6 +3743,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3697
3743
|
}
|
|
3698
3744
|
}
|
|
3699
3745
|
listReportingContainer.innerHTML = html;
|
|
3746
|
+
this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
|
|
3700
3747
|
(_c = listReportingContainer.querySelector('.button-delete')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
3701
3748
|
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
3702
3749
|
this.setSuccess('Deleted successfully!');
|
|
@@ -3716,7 +3763,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3716
3763
|
(_f = listReportingContainer.querySelector('#button-auto-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
3717
3764
|
var _a, _b;
|
|
3718
3765
|
if (this.selectedItemIds.length <= 1) {
|
|
3719
|
-
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
3766
|
+
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
|
|
3720
3767
|
this.setSuccess('Auto-Approved successfully!');
|
|
3721
3768
|
setTimeout(() => {
|
|
3722
3769
|
this.clearMessages();
|
|
@@ -3745,7 +3792,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3745
3792
|
"userid": this.userProfileId,
|
|
3746
3793
|
"userrole": this.myRole,
|
|
3747
3794
|
"year": this.calendarStartYYYY,
|
|
3748
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3795
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3749
3796
|
});
|
|
3750
3797
|
}
|
|
3751
3798
|
await this.uploadReviewsBulk(bulkBodyReview);
|
|
@@ -3787,7 +3834,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3787
3834
|
let flagBulk = false;
|
|
3788
3835
|
if (this.selectedItemIds.length <= 1) {
|
|
3789
3836
|
console.log('selectedevent', JSON.stringify(event));
|
|
3790
|
-
if (await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
3837
|
+
if (await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
3791
3838
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3792
3839
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3793
3840
|
this.events[mmdd][p].approved = approved;
|
|
@@ -3828,7 +3875,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3828
3875
|
"userid": this.userProfileId,
|
|
3829
3876
|
"userrole": this.myRole,
|
|
3830
3877
|
"year": this.calendarStartYYYY,
|
|
3831
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3878
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3832
3879
|
});
|
|
3833
3880
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
3834
3881
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -3893,7 +3940,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3893
3940
|
else {
|
|
3894
3941
|
let flagBulk = false;
|
|
3895
3942
|
if (this.selectedItemIds.length <= 1) {
|
|
3896
|
-
if (await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
3943
|
+
if (await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
3897
3944
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3898
3945
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3899
3946
|
this.events[mmdd][p].approved = approved;
|
|
@@ -3933,7 +3980,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3933
3980
|
"userid": this.userProfileId,
|
|
3934
3981
|
"userrole": this.myRole,
|
|
3935
3982
|
"year": this.calendarStartYYYY,
|
|
3936
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3983
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3937
3984
|
});
|
|
3938
3985
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
3939
3986
|
}
|
|
@@ -4059,7 +4106,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4059
4106
|
else {
|
|
4060
4107
|
let flagBulk = false;
|
|
4061
4108
|
if (this.selectedItemIds.length <= 1) {
|
|
4062
|
-
if (await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, (_c = event.module) !== null && _c !== void 0 ? _c : "
|
|
4109
|
+
if (await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, (_c = event.module) !== null && _c !== void 0 ? _c : "compliance", percentage, event.makercheckers)) {
|
|
4063
4110
|
console.log('this.events', this.events);
|
|
4064
4111
|
if (this.mode != "next") {
|
|
4065
4112
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -4070,7 +4117,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4070
4117
|
}
|
|
4071
4118
|
}
|
|
4072
4119
|
if (event.makercheckers.length > 0) {
|
|
4073
|
-
// await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "
|
|
4120
|
+
// await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
|
|
4074
4121
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
4075
4122
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
4076
4123
|
this.events[mmdd][p].approved = true;
|
|
@@ -4121,7 +4168,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4121
4168
|
// "userid": this.userProfileId,
|
|
4122
4169
|
// "userrole": this.myRole,
|
|
4123
4170
|
// "year": this.calendarStartYYYY,
|
|
4124
|
-
// "module": event.module ?? "
|
|
4171
|
+
// "module": event.module ?? "compliance"
|
|
4125
4172
|
// } )
|
|
4126
4173
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
4127
4174
|
// }else{
|
|
@@ -4143,7 +4190,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4143
4190
|
"userid": this.userProfileId,
|
|
4144
4191
|
"userrole": this.myRole,
|
|
4145
4192
|
"year": this.calendarStartYYYY,
|
|
4146
|
-
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "
|
|
4193
|
+
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
4147
4194
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
4148
4195
|
});
|
|
4149
4196
|
// }
|
|
@@ -5091,32 +5138,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5091
5138
|
this.renderTabs(this.selectedTab);
|
|
5092
5139
|
this.processDateSelectionViewer(eventsContainer);
|
|
5093
5140
|
});
|
|
5094
|
-
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
5095
|
-
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
5096
|
-
// let target = ev.target;
|
|
5097
|
-
// if(target.checked){
|
|
5098
|
-
// for(let feature of this.getFeatures()){
|
|
5099
|
-
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
5100
|
-
// this.selectedFeatures.push(feature);
|
|
5101
|
-
// }
|
|
5102
|
-
// }
|
|
5103
|
-
// }else{
|
|
5104
|
-
// this.selectedFeatures = []
|
|
5105
|
-
// }
|
|
5106
|
-
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
5107
|
-
// for(let selectFeature of selectFeatures){
|
|
5108
|
-
// let id = selectFeature.id;
|
|
5109
|
-
// let i = id.split('-')[3];
|
|
5110
|
-
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
5111
|
-
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
5112
|
-
// }
|
|
5113
|
-
// filterSubmitButton.style.visibility = 'visible'
|
|
5114
|
-
// })
|
|
5115
|
-
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
5116
|
-
// selectFeatureAllLabel.addEventListener('click',()=>{
|
|
5117
|
-
// selectFeatureAll.checked = !selectFeatureAll.checked
|
|
5118
|
-
// selectFeatureAll.click();
|
|
5119
|
-
// })
|
|
5120
5141
|
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
5121
5142
|
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
5122
5143
|
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
@@ -5131,13 +5152,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5131
5152
|
this.selectedFeatures = [selectedFeature];
|
|
5132
5153
|
}
|
|
5133
5154
|
}
|
|
5134
|
-
// else{
|
|
5135
|
-
// // selectFeatureAll.checked = false;
|
|
5136
|
-
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
5137
|
-
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
5138
|
-
// }
|
|
5139
|
-
// }
|
|
5140
|
-
// filterSubmitButton.style.visibility = 'visible'
|
|
5141
5155
|
filterSubmitButton.click();
|
|
5142
5156
|
});
|
|
5143
5157
|
selectFeatureLabels[i].addEventListener('click', () => {
|
|
@@ -5146,23 +5160,56 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5146
5160
|
});
|
|
5147
5161
|
}
|
|
5148
5162
|
});
|
|
5149
|
-
// let innerhtml = eventsContainer.innerHTML;
|
|
5150
|
-
// innerhtml += this.renderSelectAllButtons();
|
|
5151
|
-
// eventsContainer.innerHTML = innerhtml
|
|
5152
|
-
// this.attachTimelineFilterHandlers(eventsContainer);
|
|
5153
|
-
// const radioExpander = eventsContainer.querySelector('#graph-radios-expander') as HTMLButtonElement;
|
|
5154
|
-
// radioExpander?.addEventListener('click', (e: any) => {
|
|
5155
|
-
// const button = (e.currentTarget as HTMLButtonElement);
|
|
5156
|
-
// button.style.display = 'none';
|
|
5157
|
-
// const arrRadios = eventsContainer.querySelectorAll('.chart-radio-item-secondary') as NodeListOf<HTMLDivElement>;
|
|
5158
|
-
// arrRadios.forEach(div => {
|
|
5159
|
-
// div.style.display = 'block';
|
|
5160
|
-
// });
|
|
5161
|
-
// });
|
|
5162
5163
|
const buttonRefresh = eventsContainer.querySelector('#button-refresh');
|
|
5163
5164
|
buttonRefresh.addEventListener('click', async () => {
|
|
5164
5165
|
this.processDateSelectionViewer(eventsContainer);
|
|
5165
5166
|
});
|
|
5167
|
+
if (Object.keys(this.statisticsFiltersData).length > 0) {
|
|
5168
|
+
this.renderDrilldownListeners(eventsContainer);
|
|
5169
|
+
}
|
|
5170
|
+
};
|
|
5171
|
+
this.renderDrilldownListeners = async (eventsContainer) => {
|
|
5172
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
5173
|
+
console.log('rendering drilldown listeners', this.statisticsFiltersData, this.statisticsMeta);
|
|
5174
|
+
let rows = eventsContainer.querySelectorAll('.tablerow');
|
|
5175
|
+
let filtercriteria = Object.keys(this.statisticsFiltersData)[0];
|
|
5176
|
+
console.log('rendering statistics filters for criteria', filtercriteria, this.statisticsMeta[filtercriteria]);
|
|
5177
|
+
let sortedFilters = Util.alphabeticalSort(this.statisticsMeta[filtercriteria]);
|
|
5178
|
+
for (let [rowIndex, row] of rows.entries()) {
|
|
5179
|
+
let filterVal = sortedFilters[rowIndex];
|
|
5180
|
+
let filterValue = filterVal.split(';')[1];
|
|
5181
|
+
let filterName = filterVal.split(';')[0].replace(/\([^)]*\)/g, "");
|
|
5182
|
+
let notStartedDiv = row.querySelector('#filter-not-started-' + rowIndex);
|
|
5183
|
+
notStartedDiv.addEventListener('click', () => {
|
|
5184
|
+
console.log('clicked not started filter', rowIndex);
|
|
5185
|
+
console.log('filter', filtercriteria, filterValue, filterName);
|
|
5186
|
+
this.renderStatisticsDetails(filtercriteria, filterValue, filterName, "not-started");
|
|
5187
|
+
});
|
|
5188
|
+
let pendingApprovalDiv = row.querySelector('#filter-pending-approval-' + rowIndex);
|
|
5189
|
+
pendingApprovalDiv.addEventListener('click', () => {
|
|
5190
|
+
console.log('clicked pending approval filter', rowIndex);
|
|
5191
|
+
console.log('filter', filtercriteria, filterValue, filterName);
|
|
5192
|
+
this.renderStatisticsDetails(filtercriteria, filterValue, filterName, "pending-approval");
|
|
5193
|
+
});
|
|
5194
|
+
let rejectedDiv = row.querySelector('#filter-rejected-' + rowIndex);
|
|
5195
|
+
rejectedDiv.addEventListener('click', () => {
|
|
5196
|
+
console.log('clicked rejected filter', rowIndex);
|
|
5197
|
+
console.log('filter', filtercriteria, filterValue, filterName);
|
|
5198
|
+
this.renderStatisticsDetails(filtercriteria, filterValue, filterName, "rejected");
|
|
5199
|
+
});
|
|
5200
|
+
let approvedDiv = row.querySelector('#filter-approved-' + rowIndex);
|
|
5201
|
+
approvedDiv.addEventListener('click', () => {
|
|
5202
|
+
console.log('clicked approved filter', rowIndex);
|
|
5203
|
+
console.log('filter', filtercriteria, filterValue, filterName);
|
|
5204
|
+
this.renderStatisticsDetails(filtercriteria, filterValue, filterName, "approved");
|
|
5205
|
+
});
|
|
5206
|
+
let totalDiv = row.querySelector('#filter-total-' + rowIndex);
|
|
5207
|
+
totalDiv.addEventListener('click', () => {
|
|
5208
|
+
console.log('clicked total filter', rowIndex);
|
|
5209
|
+
console.log('filter', filtercriteria, filterValue, filterName);
|
|
5210
|
+
this.renderStatisticsDetails(filtercriteria, filterValue, filterName);
|
|
5211
|
+
});
|
|
5212
|
+
}
|
|
5166
5213
|
};
|
|
5167
5214
|
this.renderStatisticsFilters = (eventsContainer) => {
|
|
5168
5215
|
var _a;
|
|
@@ -5223,6 +5270,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5223
5270
|
let inputLabelSubfilters = eventsContainer.querySelector('#input-label-subfilter');
|
|
5224
5271
|
let selectSubfilterCriteria = eventsContainer.querySelector('#select-subfilter-criteria');
|
|
5225
5272
|
selectSubfilterCriteria.value = "";
|
|
5273
|
+
selectSubfilterCriteria.length = 0;
|
|
5226
5274
|
selectFilterValues.innerHTML = "";
|
|
5227
5275
|
let option = new Option();
|
|
5228
5276
|
option.value = "";
|
|
@@ -5643,6 +5691,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5643
5691
|
if (valueEnd == "") {
|
|
5644
5692
|
valueEnd = this._SfCustomContainer.querySelector('#stream-end-date-mobile').value;
|
|
5645
5693
|
}
|
|
5694
|
+
if (this.mode == "viewer") {
|
|
5695
|
+
valueStart = this.sdate;
|
|
5696
|
+
valueEnd = this.edate;
|
|
5697
|
+
}
|
|
5646
5698
|
//console.log('valuestart', valueStart);
|
|
5647
5699
|
//console.log('valueend', valueEnd);
|
|
5648
5700
|
if (valueStart != "" && valueEnd != "") {
|
|
@@ -7322,7 +7374,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7322
7374
|
html += '</div>';
|
|
7323
7375
|
html += '</div>';
|
|
7324
7376
|
html += '<div class="d-flex w-100">';
|
|
7325
|
-
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end
|
|
7377
|
+
html += '<div class="calendar-left-col desktop-only flex-col justify-start align-end';
|
|
7378
|
+
if (this.mode == "viewer") {
|
|
7379
|
+
html += ' hide';
|
|
7380
|
+
}
|
|
7381
|
+
html += '">';
|
|
7326
7382
|
html += '<div class="title-item-date">';
|
|
7327
7383
|
html += '<label part="input-label">Start Date</label><br />';
|
|
7328
7384
|
html += '<input id="stream-start-date" part="input" type="date" />';
|
|
@@ -7462,7 +7518,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7462
7518
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
7463
7519
|
this.processDateSelection(this._SfCustomContainer);
|
|
7464
7520
|
});
|
|
7465
|
-
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
7521
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0 && this.mode != "viewer") {
|
|
7466
7522
|
this._SfCustomContainer.querySelector('#button-this-year').click();
|
|
7467
7523
|
}
|
|
7468
7524
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -9309,7 +9365,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9309
9365
|
return csv;
|
|
9310
9366
|
};
|
|
9311
9367
|
this.renderGraph = (divContainer, pieData, partData, lateData, complianceData, param) => {
|
|
9312
|
-
console.log('rendering graph chart2');
|
|
9368
|
+
console.log('rendering graph chart2', pieData, partData);
|
|
9313
9369
|
this.clearSelectedGraphParam();
|
|
9314
9370
|
// this.clearSelectedLegend();
|
|
9315
9371
|
this.csvGraphStats = "";
|
|
@@ -9367,6 +9423,110 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9367
9423
|
this.graphFilter = "";
|
|
9368
9424
|
}
|
|
9369
9425
|
};
|
|
9426
|
+
this.renderStatisticsDetails = async (filter, filterid, filtervalue, filterstatus = "") => {
|
|
9427
|
+
var _a;
|
|
9428
|
+
let userid = this.userProfileId;
|
|
9429
|
+
// let username = this.userName;
|
|
9430
|
+
let filterString = `countryid="${this.countryId}" locationid="${this.locationId}" entityid="${this.entityId}" tagid="${this.tagId}" selectedcriteria="${this.selectedCriteria}"`;
|
|
9431
|
+
let rolestr = "viewer";
|
|
9432
|
+
if (filter == "reporter" || filter == "approver" || filter == "functionhead") {
|
|
9433
|
+
userid = filterid;
|
|
9434
|
+
// username = filtervalue;
|
|
9435
|
+
rolestr = filter;
|
|
9436
|
+
await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, userid, rolestr, this.entityId, this.countryId, this.locationId, this.tagId, this.functionId);
|
|
9437
|
+
filterString = `${filter} - ${filtervalue}`;
|
|
9438
|
+
}
|
|
9439
|
+
else if (filter == "function") {
|
|
9440
|
+
await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, this.locationId, filterid, this.functionId);
|
|
9441
|
+
// filterString = `tagid="${filterid}" selectedcriteria="Tag - ${filtervalue}"`;
|
|
9442
|
+
filterString = `Function - ${filtervalue}`;
|
|
9443
|
+
}
|
|
9444
|
+
else if (filter == "location") {
|
|
9445
|
+
await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, filterid, this.tagId, this.functionId);
|
|
9446
|
+
// filterString = `locationid="${filterid}" selectedcriteria="Location - ${filtervalue}"`;
|
|
9447
|
+
filterString = `Location - ${filtervalue}`;
|
|
9448
|
+
}
|
|
9449
|
+
var html = `
|
|
9450
|
+
|
|
9451
|
+
<div class="d-flex justify-between m-20">
|
|
9452
|
+
<button part="button-icon" class="material-icons invisible">close</button>
|
|
9453
|
+
<h3 part="results-title" class="m-0">Statistics Details: <strong>${filterString}</strong></h3>
|
|
9454
|
+
<button id="button-detail-close" part="button-icon" class="material-icons">close</button>
|
|
9455
|
+
</div>
|
|
9456
|
+
|
|
9457
|
+
`;
|
|
9458
|
+
html += `
|
|
9459
|
+
<div id="list-container" class="list-container m-20 pb-20" part="list-container"></div>
|
|
9460
|
+
`;
|
|
9461
|
+
// html += `
|
|
9462
|
+
// <sf-i-events id="statistics-drilldown" name="Statistics" apiid="dwqyez2puoxmu.cloudfront.net/event" exportparts="detail-container" mode="viewer"
|
|
9463
|
+
// apiidtags="${this.apiIdTags}"
|
|
9464
|
+
// apiidusers="${this.apiIdUsers}"
|
|
9465
|
+
// apiidstatutes="${this.apiIdStatutes}"
|
|
9466
|
+
// apiiddefinitions="${this.apiIdDefinitions}"
|
|
9467
|
+
// apiidreportformats="${this.apiidReportformats}"
|
|
9468
|
+
// apiidnotices="${this.apiIdNotices}"
|
|
9469
|
+
// apiidagreements="${this.apiIdAgreements}"
|
|
9470
|
+
// apiidlicenses="${this.apiIdLicenses}" username="${username}"
|
|
9471
|
+
// userprofileid="${userid}" projectid="${this.projectId}"
|
|
9472
|
+
// projectname="${this.projectName}" ${filterString}
|
|
9473
|
+
// myrole="${rolestr}" showregisterexport="false"
|
|
9474
|
+
// features="${this.features.replace(/"/g, """)}"
|
|
9475
|
+
// selectedfeatures="${JSON.stringify(this.selectedFeatures).replace(/"/g, """)}"
|
|
9476
|
+
// eventfielddependencies="${this.eventFieldDependencies.replace(/"/g, """)}"
|
|
9477
|
+
// eventfields="${this.eventFields.replace(/"/g, """)}"
|
|
9478
|
+
// eventpreviewfields="${this.eventPreviewFields.replace(/"/g, """)}"
|
|
9479
|
+
// eventhidefields="${this.eventHideFields.replace(/"/g, """)}"
|
|
9480
|
+
// calendarstartdd="${this.calendarStartDD}" calendarstartmm="${this.calendarStartMM}" calendarstartyyyy="${this.calendarStartYYYY}"
|
|
9481
|
+
// sdate="${this.sdate}" edate="${this.edate}"
|
|
9482
|
+
// flowgraphcompleteness="${this.FLOW_GRAPH_COMPLETENESS}">
|
|
9483
|
+
// <div slot="uploader">
|
|
9484
|
+
// <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
9485
|
+
// allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
9486
|
+
// extract="yes" projectid="${this.projectId}" maxsize="31457280"
|
|
9487
|
+
// allowdownload="yes"></sf-i-uploader>
|
|
9488
|
+
// </div>
|
|
9489
|
+
// <div slot="reporting">
|
|
9490
|
+
// <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
9491
|
+
// </div>
|
|
9492
|
+
// </sf-i-events>
|
|
9493
|
+
// `;
|
|
9494
|
+
this._SfDetailListContainer.style.display = 'block';
|
|
9495
|
+
this._SfDetailListContainer.innerHTML = html;
|
|
9496
|
+
// this.renderRangeEvents(new Date(this.sdate), ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24), (this._SfDetailListContainer as HTMLDivElement).querySelector('.list-container') as HTMLDivElement);
|
|
9497
|
+
const lastDay = ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24);
|
|
9498
|
+
let firstDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
9499
|
+
let endDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
9500
|
+
endDay === null || endDay === void 0 ? void 0 : endDay.setDate(endDay.getDate() + lastDay);
|
|
9501
|
+
console.log('firstday', firstDay, endDay);
|
|
9502
|
+
var period = ("0" + (firstDay.getMonth() + 1)).slice(-2) + "/" + ("0" + firstDay.getDate()).slice(-2) + '/' + firstDay.getFullYear() + ' - ' + ("0" + (endDay.getMonth() + 1)).slice(-2) + "/" + ("0" + endDay.getDate()).slice(-2) + '/' + endDay.getFullYear();
|
|
9503
|
+
console.log('rangeperiod', period, lastDay);
|
|
9504
|
+
var htmlEvents = this.renderEvents(firstDay, endDay, 0, lastDay, false, 0, ((new Date(this.sdate)).getMonth()), period, (new Date(this.sdate)), "From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), false, true);
|
|
9505
|
+
this._SfDetailListContainer.querySelector('#list-container').innerHTML = htmlEvents;
|
|
9506
|
+
let divContainer = this._SfDetailListContainer.querySelector('#list-container');
|
|
9507
|
+
const itemsTimeliness = divContainer.querySelectorAll('.stat-timeliness');
|
|
9508
|
+
for (var i = 0; i < itemsTimeliness.length; i++) {
|
|
9509
|
+
itemsTimeliness[i].style.display = 'none';
|
|
9510
|
+
}
|
|
9511
|
+
const itemsCompliance = divContainer.querySelectorAll('.stat-compliance');
|
|
9512
|
+
for (var i = 0; i < itemsCompliance.length; i++) {
|
|
9513
|
+
itemsCompliance[i].style.display = 'none';
|
|
9514
|
+
}
|
|
9515
|
+
if (filterstatus != "") {
|
|
9516
|
+
this.processGraphFilter(filterstatus, divContainer);
|
|
9517
|
+
}
|
|
9518
|
+
(_a = this._SfDetailListContainer.querySelector('#button-detail-close')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
9519
|
+
this._SfDetailListContainer.innerHTML = '';
|
|
9520
|
+
this._SfDetailListContainer.style.display = 'none';
|
|
9521
|
+
});
|
|
9522
|
+
// let statisticsDrilldown = (this._SfDetailContainer as HTMLDivElement).querySelector('#statistics-drilldown') as SfIEvents;
|
|
9523
|
+
// statisticsDrilldown.sdate = this.sdate
|
|
9524
|
+
// statisticsDrilldown.edate = this.edate
|
|
9525
|
+
// statisticsDrilldown.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
9526
|
+
// setTimeout(() => {
|
|
9527
|
+
// statisticsDrilldown.loadMode();
|
|
9528
|
+
// }, 1000);
|
|
9529
|
+
};
|
|
9370
9530
|
this.renderEventDetailShort = (compliance) => {
|
|
9371
9531
|
var _a, _b, _c, _f, _g;
|
|
9372
9532
|
var html = `
|
|
@@ -9536,9 +9696,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9536
9696
|
</div>
|
|
9537
9697
|
`;
|
|
9538
9698
|
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, reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:repoortiinig-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:repoortiinig-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected, " name="Notice Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdNotices + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9699
|
+
if (this.mode != "viewer") {
|
|
9700
|
+
html += '<div part="reporting-view-container">';
|
|
9701
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
9702
|
+
html += "</div>";
|
|
9703
|
+
}
|
|
9542
9704
|
html += '<div class="d-flex justify-between m-20">';
|
|
9543
9705
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
9544
9706
|
html += '</div>';
|
|
@@ -9694,7 +9856,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9694
9856
|
let flagBulk = false;
|
|
9695
9857
|
if (this.selectedItemIds.length <= 1) {
|
|
9696
9858
|
console.log('mmddyyyy', mmddyyyy);
|
|
9697
|
-
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "
|
|
9859
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
9698
9860
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9699
9861
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9700
9862
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
@@ -9731,7 +9893,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9731
9893
|
"userid": this.userProfileId,
|
|
9732
9894
|
"userrole": this.myRole,
|
|
9733
9895
|
"year": this.calendarStartYYYY,
|
|
9734
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
9896
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
9735
9897
|
});
|
|
9736
9898
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
9737
9899
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -9818,7 +9980,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9818
9980
|
else {
|
|
9819
9981
|
let flagBulk = false;
|
|
9820
9982
|
if (this.selectedItemIds.length <= 1) {
|
|
9821
|
-
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "
|
|
9983
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
9822
9984
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9823
9985
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9824
9986
|
this.events[mmdd][p].approved = approved;
|
|
@@ -9856,7 +10018,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9856
10018
|
"userid": this.userProfileId,
|
|
9857
10019
|
"userrole": this.myRole,
|
|
9858
10020
|
"year": this.calendarStartYYYY,
|
|
9859
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
10021
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
9860
10022
|
});
|
|
9861
10023
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
9862
10024
|
}
|
|
@@ -10055,7 +10217,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10055
10217
|
// "userid": this.userProfileId,
|
|
10056
10218
|
// "userrole": this.myRole,
|
|
10057
10219
|
// "year": this.calendarStartYYYY,
|
|
10058
|
-
// "module": listEvent.module ?? "
|
|
10220
|
+
// "module": listEvent.module ?? "compliance"
|
|
10059
10221
|
// } )
|
|
10060
10222
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10061
10223
|
// }else{
|
|
@@ -10077,7 +10239,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10077
10239
|
"userid": this.userProfileId,
|
|
10078
10240
|
"userrole": this.myRole,
|
|
10079
10241
|
"year": this.calendarStartYYYY,
|
|
10080
|
-
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "
|
|
10242
|
+
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "compliance",
|
|
10081
10243
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10082
10244
|
});
|
|
10083
10245
|
// }
|
|
@@ -10300,9 +10462,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10300
10462
|
</div>
|
|
10301
10463
|
`;
|
|
10302
10464
|
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
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10465
|
+
if (this.mode != "viewer") {
|
|
10466
|
+
html += '<div part="reporting-view-container">';
|
|
10467
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
10468
|
+
html += "</div>";
|
|
10469
|
+
}
|
|
10306
10470
|
html += '<div class="d-flex justify-between m-20">';
|
|
10307
10471
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
10308
10472
|
html += '</div>';
|
|
@@ -10472,7 +10636,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10472
10636
|
let flagBulk = false;
|
|
10473
10637
|
if (this.selectedItemIds.length <= 1) {
|
|
10474
10638
|
console.log('mmddyyyy', mmddyyyy);
|
|
10475
|
-
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
10639
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance")) {
|
|
10476
10640
|
if (approved) {
|
|
10477
10641
|
await this.renewContract(listEvent, reportformatvalues);
|
|
10478
10642
|
}
|
|
@@ -10517,7 +10681,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10517
10681
|
"userid": this.userProfileId,
|
|
10518
10682
|
"userrole": this.myRole,
|
|
10519
10683
|
"year": this.calendarStartYYYY,
|
|
10520
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
10684
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
10521
10685
|
});
|
|
10522
10686
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
10523
10687
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -10604,7 +10768,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10604
10768
|
else {
|
|
10605
10769
|
let flagBulk = false;
|
|
10606
10770
|
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 : "
|
|
10771
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
10608
10772
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10609
10773
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10610
10774
|
this.events[mmdd][p].approved = approved;
|
|
@@ -10642,7 +10806,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10642
10806
|
"userid": this.userProfileId,
|
|
10643
10807
|
"userrole": this.myRole,
|
|
10644
10808
|
"year": this.calendarStartYYYY,
|
|
10645
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
10809
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
10646
10810
|
});
|
|
10647
10811
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
10648
10812
|
}
|
|
@@ -10842,7 +11006,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10842
11006
|
// "userid": this.userProfileId,
|
|
10843
11007
|
// "userrole": this.myRole,
|
|
10844
11008
|
// "year": this.calendarStartYYYY,
|
|
10845
|
-
// "module": listEvent.module ?? "
|
|
11009
|
+
// "module": listEvent.module ?? "compliance"
|
|
10846
11010
|
// } )
|
|
10847
11011
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10848
11012
|
// }else{
|
|
@@ -10864,7 +11028,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10864
11028
|
"userid": this.userProfileId,
|
|
10865
11029
|
"userrole": this.myRole,
|
|
10866
11030
|
"year": this.calendarStartYYYY,
|
|
10867
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
11031
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
10868
11032
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10869
11033
|
});
|
|
10870
11034
|
// }
|
|
@@ -11087,9 +11251,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11087
11251
|
</div>
|
|
11088
11252
|
`;
|
|
11089
11253
|
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>';
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11254
|
+
if (this.mode != "viewer") {
|
|
11255
|
+
html += '<div part="reporting-view-container">';
|
|
11256
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
11257
|
+
html += "</div>";
|
|
11258
|
+
}
|
|
11093
11259
|
html += '<div class="d-flex justify-between m-20">';
|
|
11094
11260
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
11095
11261
|
html += '</div>';
|
|
@@ -11260,7 +11426,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11260
11426
|
let flagBulk = false;
|
|
11261
11427
|
if (this.selectedItemIds.length <= 1) {
|
|
11262
11428
|
console.log('mmddyyyy', mmddyyyy);
|
|
11263
|
-
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
11429
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance")) {
|
|
11264
11430
|
if (approved) {
|
|
11265
11431
|
await this.renewLicense(listEvent, reportformatvalues);
|
|
11266
11432
|
}
|
|
@@ -11305,7 +11471,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11305
11471
|
"userid": this.userProfileId,
|
|
11306
11472
|
"userrole": this.myRole,
|
|
11307
11473
|
"year": this.calendarStartYYYY,
|
|
11308
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
11474
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
11309
11475
|
});
|
|
11310
11476
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
11311
11477
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -11392,7 +11558,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11392
11558
|
else {
|
|
11393
11559
|
let flagBulk = false;
|
|
11394
11560
|
if (this.selectedItemIds.length <= 1) {
|
|
11395
|
-
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "
|
|
11561
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
11396
11562
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
11397
11563
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
11398
11564
|
this.events[mmdd][p].approved = approved;
|
|
@@ -11430,7 +11596,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11430
11596
|
"userid": this.userProfileId,
|
|
11431
11597
|
"userrole": this.myRole,
|
|
11432
11598
|
"year": this.calendarStartYYYY,
|
|
11433
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
11599
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
11434
11600
|
});
|
|
11435
11601
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
11436
11602
|
}
|
|
@@ -11630,7 +11796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11630
11796
|
// "userid": this.userProfileId,
|
|
11631
11797
|
// "userrole": this.myRole,
|
|
11632
11798
|
// "year": this.calendarStartYYYY,
|
|
11633
|
-
// "module": listEvent.module ?? "
|
|
11799
|
+
// "module": listEvent.module ?? "compliance"
|
|
11634
11800
|
// } )
|
|
11635
11801
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
11636
11802
|
// }else{
|
|
@@ -11652,7 +11818,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11652
11818
|
"userid": this.userProfileId,
|
|
11653
11819
|
"userrole": this.myRole,
|
|
11654
11820
|
"year": this.calendarStartYYYY,
|
|
11655
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
11821
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
11656
11822
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
11657
11823
|
});
|
|
11658
11824
|
// }
|
|
@@ -11875,9 +12041,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11875
12041
|
</div>
|
|
11876
12042
|
`;
|
|
11877
12043
|
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>';
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
12044
|
+
if (this.mode != "viewer") {
|
|
12045
|
+
html += '<div part="reporting-view-container">';
|
|
12046
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
12047
|
+
html += "</div>";
|
|
12048
|
+
}
|
|
11881
12049
|
html += '<div class="d-flex justify-between m-20">';
|
|
11882
12050
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
11883
12051
|
html += '</div>';
|
|
@@ -12048,7 +12216,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12048
12216
|
let flagBulk = false;
|
|
12049
12217
|
if (this.selectedItemIds.length <= 1) {
|
|
12050
12218
|
console.log('mmddyyyy', mmddyyyy);
|
|
12051
|
-
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
12219
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance")) {
|
|
12052
12220
|
if (approved) {
|
|
12053
12221
|
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
12054
12222
|
}
|
|
@@ -12093,7 +12261,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12093
12261
|
"userid": this.userProfileId,
|
|
12094
12262
|
"userrole": this.myRole,
|
|
12095
12263
|
"year": this.calendarStartYYYY,
|
|
12096
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
12264
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
12097
12265
|
});
|
|
12098
12266
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
12099
12267
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -12180,7 +12348,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12180
12348
|
else {
|
|
12181
12349
|
let flagBulk = false;
|
|
12182
12350
|
if (this.selectedItemIds.length <= 1) {
|
|
12183
|
-
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "
|
|
12351
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
12184
12352
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
12185
12353
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
12186
12354
|
this.events[mmdd][p].approved = approved;
|
|
@@ -12218,7 +12386,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12218
12386
|
"userid": this.userProfileId,
|
|
12219
12387
|
"userrole": this.myRole,
|
|
12220
12388
|
"year": this.calendarStartYYYY,
|
|
12221
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
12389
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
12222
12390
|
});
|
|
12223
12391
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
12224
12392
|
}
|
|
@@ -12418,7 +12586,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12418
12586
|
// "userid": this.userProfileId,
|
|
12419
12587
|
// "userrole": this.myRole,
|
|
12420
12588
|
// "year": this.calendarStartYYYY,
|
|
12421
|
-
// "module": listEvent.module ?? "
|
|
12589
|
+
// "module": listEvent.module ?? "compliance"
|
|
12422
12590
|
// } )
|
|
12423
12591
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
12424
12592
|
// }else{
|
|
@@ -12440,7 +12608,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12440
12608
|
"userid": this.userProfileId,
|
|
12441
12609
|
"userrole": this.myRole,
|
|
12442
12610
|
"year": this.calendarStartYYYY,
|
|
12443
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
12611
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
12444
12612
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
12445
12613
|
});
|
|
12446
12614
|
// }
|
|
@@ -12894,10 +13062,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12894
13062
|
html += '</div>';
|
|
12895
13063
|
html += '</div>';
|
|
12896
13064
|
html += '</div>';
|
|
12897
|
-
if (this.mode == "consumer" || this.mode == "next") {
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
13065
|
+
if (this.mode == "consumer" || this.mode == "next" || this.mode == "viewer") {
|
|
13066
|
+
if (this.mode != "viewer") {
|
|
13067
|
+
html += '<div part="reporting-view-container">';
|
|
13068
|
+
html += this.renderReporting(event, mmddyyyy);
|
|
13069
|
+
html += "</div>";
|
|
13070
|
+
}
|
|
12901
13071
|
html += '<div class="d-flex justify-between m-20">';
|
|
12902
13072
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
12903
13073
|
html += '</div>';
|
|
@@ -12965,9 +13135,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12965
13135
|
// for(let attachmentUploader of attachmentUploaders){
|
|
12966
13136
|
// attachmentUploader.loadMode();
|
|
12967
13137
|
// }
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
13138
|
+
if (this.mode != "viewer") {
|
|
13139
|
+
let ddmmyyyy = mmddyyyy.split('/')[1] + '/' + mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[2];
|
|
13140
|
+
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">Reporter</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.reporters[0].split(';')[0]}</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">Approver</td><td style="padding:10px;padding-top:10px;padding-bottom:10px;vertical-align:top;background-color:#f5f5f5;font-size:110%">${event.approvers[0].split(';')[0]}</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>`;
|
|
13141
|
+
this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
|
|
13142
|
+
}
|
|
12971
13143
|
(_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
12972
13144
|
await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
|
|
12973
13145
|
this.setSuccess('Deleted successfully!');
|
|
@@ -12992,7 +13164,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12992
13164
|
(_c = this._SfDetailContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
12993
13165
|
var _a, _b;
|
|
12994
13166
|
if (this.selectedItemIds.length <= 1) {
|
|
12995
|
-
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
13167
|
+
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
|
|
12996
13168
|
this.setSuccess('Auto-Approved successfully!');
|
|
12997
13169
|
setTimeout(() => {
|
|
12998
13170
|
this.clearMessages();
|
|
@@ -13021,7 +13193,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13021
13193
|
"userid": this.userProfileId,
|
|
13022
13194
|
"userrole": this.myRole,
|
|
13023
13195
|
"year": this.calendarStartYYYY,
|
|
13024
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13196
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
13025
13197
|
});
|
|
13026
13198
|
}
|
|
13027
13199
|
await this.uploadReviewsBulk(bulkBodyReview);
|
|
@@ -13204,7 +13376,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13204
13376
|
let flagBulk = false;
|
|
13205
13377
|
if (this.selectedItemIds.length <= 1) {
|
|
13206
13378
|
// console.log('mmddyyyy', mmddyyyy)
|
|
13207
|
-
if (await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
13379
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
13208
13380
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
13209
13381
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
13210
13382
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
@@ -13240,7 +13412,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13240
13412
|
"userid": this.userProfileId,
|
|
13241
13413
|
"userrole": this.myRole,
|
|
13242
13414
|
"year": this.calendarStartYYYY,
|
|
13243
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13415
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
13244
13416
|
});
|
|
13245
13417
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
13246
13418
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -13327,7 +13499,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13327
13499
|
else {
|
|
13328
13500
|
let flagBulk = false;
|
|
13329
13501
|
if (this.selectedItemIds.length <= 1) {
|
|
13330
|
-
if (await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "
|
|
13502
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
13331
13503
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
13332
13504
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
13333
13505
|
this.events[mmdd][p].approved = approved;
|
|
@@ -13364,7 +13536,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13364
13536
|
"userid": this.userProfileId,
|
|
13365
13537
|
"userrole": this.myRole,
|
|
13366
13538
|
"year": this.calendarStartYYYY,
|
|
13367
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13539
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
13368
13540
|
});
|
|
13369
13541
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
13370
13542
|
}
|
|
@@ -13504,7 +13676,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13504
13676
|
//console.log('makerscheckers', makercheckers, reportercomments);
|
|
13505
13677
|
// console.log('reportformatvalues', reportformatvalues)
|
|
13506
13678
|
// console.log('reportformatschema',reportformatschema)
|
|
13507
|
-
if (await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, (_c = event.module) !== null && _c !== void 0 ? _c : "
|
|
13679
|
+
if (await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, (_c = event.module) !== null && _c !== void 0 ? _c : "compliance", percentage, makercheckers)) {
|
|
13508
13680
|
console.log('this.events', this.events);
|
|
13509
13681
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
13510
13682
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
@@ -13514,7 +13686,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13514
13686
|
}
|
|
13515
13687
|
}
|
|
13516
13688
|
if (makercheckers.length > 0) {
|
|
13517
|
-
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "
|
|
13689
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
|
|
13518
13690
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
13519
13691
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
13520
13692
|
this.events[mmdd][p].approved = true;
|
|
@@ -13559,7 +13731,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13559
13731
|
// "userid": this.userProfileId,
|
|
13560
13732
|
// "userrole": this.myRole,
|
|
13561
13733
|
// "year": this.calendarStartYYYY,
|
|
13562
|
-
// "module": event.module ?? "
|
|
13734
|
+
// "module": event.module ?? "compliance"
|
|
13563
13735
|
// })
|
|
13564
13736
|
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
13565
13737
|
// if(parseInt(makercheckersL) > 0) {
|
|
@@ -13582,7 +13754,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13582
13754
|
// "userid": this.userProfileId,
|
|
13583
13755
|
// "userrole": this.myRole,
|
|
13584
13756
|
// "year": this.calendarStartYYYY,
|
|
13585
|
-
// "module": event.module ?? "
|
|
13757
|
+
// "module": event.module ?? "compliance"
|
|
13586
13758
|
// } )
|
|
13587
13759
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
13588
13760
|
// }else{
|
|
@@ -13604,7 +13776,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13604
13776
|
"userid": this.userProfileId,
|
|
13605
13777
|
"userrole": this.myRole,
|
|
13606
13778
|
"year": this.calendarStartYYYY,
|
|
13607
|
-
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "
|
|
13779
|
+
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
13608
13780
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
13609
13781
|
});
|
|
13610
13782
|
// }
|
|
@@ -18782,27 +18954,29 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18782
18954
|
// }
|
|
18783
18955
|
}
|
|
18784
18956
|
};
|
|
18785
|
-
this.processGraphFilter = (clickedValue) => {
|
|
18957
|
+
this.processGraphFilter = (clickedValue, detailsListContainer) => {
|
|
18786
18958
|
var _a;
|
|
18787
|
-
let eventContainer =
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18959
|
+
let eventContainer = detailsListContainer;
|
|
18960
|
+
if (eventContainer == null) {
|
|
18961
|
+
console.log('processGraphFilter called', clickedValue);
|
|
18962
|
+
if (this.getCurrentTab() == this.TAB_STREAM) {
|
|
18963
|
+
eventContainer = this._SfStreamContainer;
|
|
18964
|
+
}
|
|
18965
|
+
// if(this.getCurrentTab() == this.TAB_UPCOMING) {
|
|
18966
|
+
// eventContainer = (this._SfUpcomingContainer as HTMLDivElement);
|
|
18967
|
+
// }
|
|
18968
|
+
if (this.getCurrentTab() == this.TAB_THIS) {
|
|
18969
|
+
eventContainer = this._SfThisContainer;
|
|
18970
|
+
}
|
|
18971
|
+
// if(this.getCurrentTab() == this.TAB_PAST) {
|
|
18972
|
+
// eventContainer = (this._SfPastContainer as HTMLDivElement);
|
|
18973
|
+
// }
|
|
18974
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
18975
|
+
eventContainer = this._SfCustomContainer;
|
|
18976
|
+
}
|
|
18977
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
18978
|
+
eventContainer = this._SfFindContainer;
|
|
18979
|
+
}
|
|
18806
18980
|
}
|
|
18807
18981
|
if (eventContainer == null)
|
|
18808
18982
|
return;
|
|
@@ -18842,7 +19016,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18842
19016
|
value: clickedValue
|
|
18843
19017
|
};
|
|
18844
19018
|
streamEventFilters.style.display = 'block';
|
|
18845
|
-
streamEventFilters.innerHTML = '<div part="badge-dashboard" class="d-flex align-center justify-between mr-10 mb-10 no-shrink"><div><span>Filtered by</span> <span id="graph-total" part="badge-filter-name">' + clickedValue + '</span></div
|
|
19019
|
+
streamEventFilters.innerHTML = '<div part="badge-dashboard" class="d-flex align-center justify-between mr-10 mb-10 no-shrink"><div><span>Filtered by</span> <span id="graph-total" part="badge-filter-name">' + clickedValue + '</span></div>' + (detailsListContainer == null ? '<button id="button-filter-cancel" part="button-icon"><span class="material-symbols-outlined">close</span></button>' : '') + '</div>';
|
|
18846
19020
|
(_a = streamEventFilters.querySelector('#button-filter-cancel')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
18847
19021
|
this.graphFilter = "";
|
|
18848
19022
|
this.clearSelectedGraphParam();
|
|
@@ -19153,7 +19327,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19153
19327
|
var html = '';
|
|
19154
19328
|
html += '<button class="tab-button mb-10" id="calendar-tab-month" part="' + (selectedTab == this.TAB_STREAM ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Month</button>';
|
|
19155
19329
|
html += '<button class="tab-button mb-10" id="calendar-tab-custom" part="' + (selectedTab == this.TAB_CUSTOM ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">' + (this.myRole == this.TAB_VIEWER ? "Statistics" : "Range") + '</button>';
|
|
19156
|
-
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('licenses') < 0) {
|
|
19330
|
+
if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0) {
|
|
19157
19331
|
html += '<button class="tab-button mb-10" id="calendar-tab-register" part="' + (selectedTab == this.TAB_REGISTERS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Registers</button>';
|
|
19158
19332
|
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_FIND ? '' : 'hide') + '" id="calendar-tab-find" part="' + (selectedTab == this.TAB_FIND ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Search</button>';
|
|
19159
19333
|
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_THIS ? '' : 'hide') + '" id="calendar-tab-this" part="' + (selectedTab == this.TAB_THIS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Current</button>';
|
|
@@ -20056,7 +20230,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20056
20230
|
}, 10000);
|
|
20057
20231
|
}
|
|
20058
20232
|
};
|
|
20059
|
-
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "
|
|
20233
|
+
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "compliance") => {
|
|
20060
20234
|
let url = "https://" + this.apiId + "/uploadaudit1";
|
|
20061
20235
|
const body = {
|
|
20062
20236
|
"mmddyyyy": mmddyyyy,
|
|
@@ -20121,7 +20295,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20121
20295
|
this.setError(jsonRespose.error);
|
|
20122
20296
|
}
|
|
20123
20297
|
};
|
|
20124
|
-
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "
|
|
20298
|
+
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "compliance") => {
|
|
20125
20299
|
let url = "https://" + this.apiId + "/uploadreview1";
|
|
20126
20300
|
const body = {
|
|
20127
20301
|
"mmddyyyy": mmddyyyy,
|
|
@@ -20216,7 +20390,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20216
20390
|
}, 3000);
|
|
20217
20391
|
}
|
|
20218
20392
|
};
|
|
20219
|
-
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "
|
|
20393
|
+
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "compliance", percentage = "100", makercheckers) => {
|
|
20220
20394
|
let url = "https://" + this.apiId + "/uploadreport1";
|
|
20221
20395
|
let body = {
|
|
20222
20396
|
"mmddyyyy": mmddyyyy,
|
|
@@ -20339,7 +20513,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20339
20513
|
};
|
|
20340
20514
|
this.uploadEvents = async () => {
|
|
20341
20515
|
let url = "https://" + this.apiId + "/synccalendar";
|
|
20342
|
-
const body = { "projectid": this._SfProject[0].querySelector('#sf-i-project').selectedValues()[0], "
|
|
20516
|
+
const body = { "projectid": this._SfProject[0].querySelector('#sf-i-project').selectedValues()[0], "compliance": JSON.stringify(this.events) };
|
|
20343
20517
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
20344
20518
|
const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
|
|
20345
20519
|
this._SfLoader.innerHTML = '';
|
|
@@ -21486,7 +21660,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21486
21660
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
21487
21661
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
21488
21662
|
this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
|
|
21489
|
-
console.log('rendering appropriate string', list);
|
|
21663
|
+
console.log('rendering appropriate string', list, this.selectedTab);
|
|
21490
21664
|
this.renderAppropriateStream(startDate, endDate, true);
|
|
21491
21665
|
this.fetchBulkReportingData();
|
|
21492
21666
|
}
|
|
@@ -21544,6 +21718,54 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21544
21718
|
}
|
|
21545
21719
|
}
|
|
21546
21720
|
};
|
|
21721
|
+
this.fetchOnlyYearlyUserCalendar = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY, userprofileid = this.userProfileId, userrole = this.myRole, entityid = this.entityId, countryid = this.countryId, locationid = this.locationId, tagid = this.tagId, functionid = this.functionId) => {
|
|
21722
|
+
let path = "", view = "";
|
|
21723
|
+
if (this.tagId != null && this.tagId != "") {
|
|
21724
|
+
view = "tag";
|
|
21725
|
+
}
|
|
21726
|
+
else if (this.countryId != null && this.countryId != "") {
|
|
21727
|
+
view = "country";
|
|
21728
|
+
}
|
|
21729
|
+
else if (this.locationId != null && this.locationId != "") {
|
|
21730
|
+
view = "location";
|
|
21731
|
+
}
|
|
21732
|
+
else {
|
|
21733
|
+
view = "entity";
|
|
21734
|
+
}
|
|
21735
|
+
path = "getallcountryevents";
|
|
21736
|
+
let url = "https://" + this.apiId + "/" + path;
|
|
21737
|
+
//console.log('fetch calendar url', url);
|
|
21738
|
+
let urlBody = { "projectid": this.projectId, "userprofileid": userprofileid, "role": userrole, "entityid": entityid, "countryid": countryid, "functionid": functionid, "locationid": locationid, "tagid": tagid, "adhoc": "false", "exclusivestartkey": 0, "sdate": startDate, "edate": endDate, "view": view, "year": year, "list": list, "month": month };
|
|
21739
|
+
if (searchString.length > 0) {
|
|
21740
|
+
urlBody["searchstring"] = searchString;
|
|
21741
|
+
}
|
|
21742
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
21743
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
21744
|
+
this._SfLoader.innerHTML = '';
|
|
21745
|
+
if (xhr.status == 200) {
|
|
21746
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
21747
|
+
console.log('jsonRespose', jsonRespose);
|
|
21748
|
+
// if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
21749
|
+
this.events = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
21750
|
+
// }
|
|
21751
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
21752
|
+
}
|
|
21753
|
+
else {
|
|
21754
|
+
if (xhr.status == 401) {
|
|
21755
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
21756
|
+
this.dispatchEvent(changeEvent);
|
|
21757
|
+
}
|
|
21758
|
+
if (xhr.status === 404) {
|
|
21759
|
+
this.showChosenProject();
|
|
21760
|
+
this._SfTitleChosenProject.innerHTML = this._SfProject[0].querySelector('#sf-i-project').selectedTexts()[0];
|
|
21761
|
+
this.renderChosenProject();
|
|
21762
|
+
}
|
|
21763
|
+
else {
|
|
21764
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
21765
|
+
this.setError(jsonRespose.error);
|
|
21766
|
+
}
|
|
21767
|
+
}
|
|
21768
|
+
};
|
|
21547
21769
|
this.fetchAndRenderNotices = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
21548
21770
|
var _a;
|
|
21549
21771
|
let path = "", view = "";
|
|
@@ -23248,6 +23470,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23248
23470
|
else if (this.mode == "reports") {
|
|
23249
23471
|
this.fetchReports();
|
|
23250
23472
|
}
|
|
23473
|
+
else if (this.mode == "viewer") {
|
|
23474
|
+
this.enableCustom();
|
|
23475
|
+
this.selectedTab = this.TAB_CUSTOM;
|
|
23476
|
+
this.renderCustom();
|
|
23477
|
+
this.renderWithFeatures(this.sdate, this.edate, "", "yes");
|
|
23478
|
+
}
|
|
23251
23479
|
else {
|
|
23252
23480
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
23253
23481
|
this.enableCalendar();
|
|
@@ -23628,7 +23856,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23628
23856
|
</div>
|
|
23629
23857
|
<div class="rb"></div>
|
|
23630
23858
|
</div>
|
|
23631
|
-
<div id="detail-container" class="hide" part="detail-container">
|
|
23859
|
+
<div id="detail-container" class="hide" part="detail-container"></div>
|
|
23860
|
+
<div id="detail-list-container" class="hide" part="detail-list-container">
|
|
23632
23861
|
</div>
|
|
23633
23862
|
<div class="d-flex justify-between">
|
|
23634
23863
|
<div class="lb"></div>
|
|
@@ -23815,7 +24044,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
23815
24044
|
</div>
|
|
23816
24045
|
<div id="report-summary-container" class="hide" part="report-summary-container">
|
|
23817
24046
|
</div>
|
|
23818
|
-
<div id="detail-container" class="hide" part="detail-container">
|
|
24047
|
+
<div id="detail-container" class="hide" part="detail-container"></div>
|
|
24048
|
+
<div id="detail-list-container" class="hide" part="detail-list-container">
|
|
23819
24049
|
</div>
|
|
23820
24050
|
<div class="d-flex justify-between">
|
|
23821
24051
|
<div class="lb"></div>
|
|
@@ -23897,6 +24127,9 @@ SfIEvents.styles = css `
|
|
|
23897
24127
|
#detail-container {
|
|
23898
24128
|
z-index: 101;
|
|
23899
24129
|
}
|
|
24130
|
+
#detail-list-container {
|
|
24131
|
+
z-index: 100;
|
|
24132
|
+
}
|
|
23900
24133
|
|
|
23901
24134
|
.plain-filter-icon {
|
|
23902
24135
|
cursor: pointer;
|
|
@@ -23942,6 +24175,7 @@ SfIEvents.styles = css `
|
|
|
23942
24175
|
opacity: 0.4;
|
|
23943
24176
|
}
|
|
23944
24177
|
|
|
24178
|
+
.detail-list-container,
|
|
23945
24179
|
.detail-container,
|
|
23946
24180
|
.report-summary-container {
|
|
23947
24181
|
width: 60%;
|
|
@@ -25360,6 +25594,12 @@ __decorate([
|
|
|
25360
25594
|
__decorate([
|
|
25361
25595
|
property()
|
|
25362
25596
|
], SfIEvents.prototype, "features", void 0);
|
|
25597
|
+
__decorate([
|
|
25598
|
+
property()
|
|
25599
|
+
], SfIEvents.prototype, "sdate", void 0);
|
|
25600
|
+
__decorate([
|
|
25601
|
+
property()
|
|
25602
|
+
], SfIEvents.prototype, "edate", void 0);
|
|
25363
25603
|
__decorate([
|
|
25364
25604
|
property()
|
|
25365
25605
|
], SfIEvents.prototype, "selectallblock", void 0);
|
|
@@ -25447,6 +25687,9 @@ __decorate([
|
|
|
25447
25687
|
__decorate([
|
|
25448
25688
|
query('#detail-container')
|
|
25449
25689
|
], SfIEvents.prototype, "_SfDetailContainer", void 0);
|
|
25690
|
+
__decorate([
|
|
25691
|
+
query('#detail-list-container')
|
|
25692
|
+
], SfIEvents.prototype, "_SfDetailListContainer", void 0);
|
|
25450
25693
|
__decorate([
|
|
25451
25694
|
query('#report-summary-container')
|
|
25452
25695
|
], SfIEvents.prototype, "_SfReportSummaryContainer", void 0);
|