sf-i-events 1.0.880 → 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 +64 -16
- package/package.json +2 -2
- package/sf-i-events.d.ts +12 -3
- package/sf-i-events.js +1335 -204
- package/src/sf-i-events.ts +1464 -224
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
|
};
|
|
@@ -2519,7 +2519,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2519
2519
|
return html;
|
|
2520
2520
|
};
|
|
2521
2521
|
this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus) => {
|
|
2522
|
-
var _a, _b, _c, _f;
|
|
2522
|
+
var _a, _b, _c, _f, _g;
|
|
2523
2523
|
var html = '';
|
|
2524
2524
|
var remarks = "";
|
|
2525
2525
|
var occurrenceDate = "";
|
|
@@ -2556,7 +2556,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2556
2556
|
const moduleType = (_f = event.module) !== null && _f !== void 0 ? _f : 'compliance';
|
|
2557
2557
|
const partStatusSanitized = partStatus.replace(/-/g, '_');
|
|
2558
2558
|
const entityIdSanitized = event.entityid.replace(/-/g, '_');
|
|
2559
|
-
const locationIdSanitized = event.locationid.replace(/-/g, '_');
|
|
2559
|
+
const locationIdSanitized = ((_g = event.locationid) !== null && _g !== void 0 ? _g : "").replace(/-/g, '_');
|
|
2560
2560
|
const eventIdSanitized = event.id.replace(/-/g, '_');
|
|
2561
2561
|
const mmddSanitized = mmdd.replace(/\//g, '-');
|
|
2562
2562
|
const dueDateParts = event.duedate.split('/');
|
|
@@ -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
|
}
|
|
@@ -3491,7 +3538,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3491
3538
|
html += '<button class="invisible" part="button">Save</button>';
|
|
3492
3539
|
html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>';
|
|
3493
3540
|
html += '</div>';
|
|
3494
|
-
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract' && event.module != 'license') {
|
|
3541
|
+
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3495
3542
|
html += '<div class="m-20">';
|
|
3496
3543
|
html += '<label part="input-label">Supporting Documents</label>';
|
|
3497
3544
|
html += '<slot name="uploader"></slot>';
|
|
@@ -3501,7 +3548,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3501
3548
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3502
3549
|
html += '<label part="input-label">Approver Comments*</label>';
|
|
3503
3550
|
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
3504
|
-
if (event.module != 'contract' && event.module != 'license') {
|
|
3551
|
+
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3505
3552
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3506
3553
|
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
3507
3554
|
html += '<label part="input-label">Percentage</label>';
|
|
@@ -3550,7 +3597,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3550
3597
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3551
3598
|
html += '<label part="input-label">Reporter Comments*</label>';
|
|
3552
3599
|
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
3553
|
-
if (event.module != 'contract' && event.module != 'license') {
|
|
3600
|
+
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3554
3601
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3555
3602
|
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
3556
3603
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
@@ -3601,7 +3648,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3601
3648
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3602
3649
|
html += '<label part="input-label">Auditor Comments</label>';
|
|
3603
3650
|
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
3604
|
-
if (event.module != 'contract' && event.module != 'license') {
|
|
3651
|
+
if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
|
|
3605
3652
|
html += '<label part="input-label">Date of Completion</label>';
|
|
3606
3653
|
html += '<input id="input-auditor-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '" readonly/><br />';
|
|
3607
3654
|
html += '<label part="input-label">Percentage</label>';
|
|
@@ -3664,6 +3711,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3664
3711
|
event.docsOptional = event['docs'] == null ? [] : event['docs'];
|
|
3665
3712
|
html = this.renderReporting(event, mmddyyyy);
|
|
3666
3713
|
console.log('reporting html', html);
|
|
3714
|
+
let ddmmyyyy = mmddyyyy.split('/')[1] + '/' + mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[2];
|
|
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>`;
|
|
3667
3716
|
let listReportingContainers = eventsContainer.querySelectorAll('.list-reporting-container');
|
|
3668
3717
|
for (let tempReportingContainer of listReportingContainers) {
|
|
3669
3718
|
tempReportingContainer.style.display = 'none';
|
|
@@ -3694,6 +3743,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3694
3743
|
}
|
|
3695
3744
|
}
|
|
3696
3745
|
listReportingContainer.innerHTML = html;
|
|
3746
|
+
this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
|
|
3697
3747
|
(_c = listReportingContainer.querySelector('.button-delete')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
3698
3748
|
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
3699
3749
|
this.setSuccess('Deleted successfully!');
|
|
@@ -3713,7 +3763,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3713
3763
|
(_f = listReportingContainer.querySelector('#button-auto-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
3714
3764
|
var _a, _b;
|
|
3715
3765
|
if (this.selectedItemIds.length <= 1) {
|
|
3716
|
-
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");
|
|
3717
3767
|
this.setSuccess('Auto-Approved successfully!');
|
|
3718
3768
|
setTimeout(() => {
|
|
3719
3769
|
this.clearMessages();
|
|
@@ -3742,7 +3792,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3742
3792
|
"userid": this.userProfileId,
|
|
3743
3793
|
"userrole": this.myRole,
|
|
3744
3794
|
"year": this.calendarStartYYYY,
|
|
3745
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3795
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3746
3796
|
});
|
|
3747
3797
|
}
|
|
3748
3798
|
await this.uploadReviewsBulk(bulkBodyReview);
|
|
@@ -3784,7 +3834,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3784
3834
|
let flagBulk = false;
|
|
3785
3835
|
if (this.selectedItemIds.length <= 1) {
|
|
3786
3836
|
console.log('selectedevent', JSON.stringify(event));
|
|
3787
|
-
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")) {
|
|
3788
3838
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3789
3839
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3790
3840
|
this.events[mmdd][p].approved = approved;
|
|
@@ -3825,7 +3875,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3825
3875
|
"userid": this.userProfileId,
|
|
3826
3876
|
"userrole": this.myRole,
|
|
3827
3877
|
"year": this.calendarStartYYYY,
|
|
3828
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3878
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3829
3879
|
});
|
|
3830
3880
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
3831
3881
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -3890,7 +3940,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3890
3940
|
else {
|
|
3891
3941
|
let flagBulk = false;
|
|
3892
3942
|
if (this.selectedItemIds.length <= 1) {
|
|
3893
|
-
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")) {
|
|
3894
3944
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3895
3945
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3896
3946
|
this.events[mmdd][p].approved = approved;
|
|
@@ -3930,7 +3980,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3930
3980
|
"userid": this.userProfileId,
|
|
3931
3981
|
"userrole": this.myRole,
|
|
3932
3982
|
"year": this.calendarStartYYYY,
|
|
3933
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
3983
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
3934
3984
|
});
|
|
3935
3985
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
3936
3986
|
}
|
|
@@ -4056,7 +4106,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4056
4106
|
else {
|
|
4057
4107
|
let flagBulk = false;
|
|
4058
4108
|
if (this.selectedItemIds.length <= 1) {
|
|
4059
|
-
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)) {
|
|
4060
4110
|
console.log('this.events', this.events);
|
|
4061
4111
|
if (this.mode != "next") {
|
|
4062
4112
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
@@ -4067,7 +4117,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4067
4117
|
}
|
|
4068
4118
|
}
|
|
4069
4119
|
if (event.makercheckers.length > 0) {
|
|
4070
|
-
// 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");
|
|
4071
4121
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
4072
4122
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
4073
4123
|
this.events[mmdd][p].approved = true;
|
|
@@ -4118,7 +4168,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4118
4168
|
// "userid": this.userProfileId,
|
|
4119
4169
|
// "userrole": this.myRole,
|
|
4120
4170
|
// "year": this.calendarStartYYYY,
|
|
4121
|
-
// "module": event.module ?? "
|
|
4171
|
+
// "module": event.module ?? "compliance"
|
|
4122
4172
|
// } )
|
|
4123
4173
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
4124
4174
|
// }else{
|
|
@@ -4140,7 +4190,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4140
4190
|
"userid": this.userProfileId,
|
|
4141
4191
|
"userrole": this.myRole,
|
|
4142
4192
|
"year": this.calendarStartYYYY,
|
|
4143
|
-
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "
|
|
4193
|
+
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
4144
4194
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
4145
4195
|
});
|
|
4146
4196
|
// }
|
|
@@ -4492,6 +4542,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4492
4542
|
else if (module === "license") {
|
|
4493
4543
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4494
4544
|
}
|
|
4545
|
+
else if (module === "rcmresource") {
|
|
4546
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4547
|
+
}
|
|
4495
4548
|
else {
|
|
4496
4549
|
let found = false;
|
|
4497
4550
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -4528,6 +4581,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4528
4581
|
else if (module === "license") {
|
|
4529
4582
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4530
4583
|
}
|
|
4584
|
+
else if (module === "rcmresource") {
|
|
4585
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4586
|
+
}
|
|
4531
4587
|
else {
|
|
4532
4588
|
let found = false;
|
|
4533
4589
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -5082,32 +5138,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5082
5138
|
this.renderTabs(this.selectedTab);
|
|
5083
5139
|
this.processDateSelectionViewer(eventsContainer);
|
|
5084
5140
|
});
|
|
5085
|
-
// const selectFeatureAll = filterList.querySelector('.input-select-feature-all') as HTMLInputElement
|
|
5086
|
-
// selectFeatureAll.addEventListener('click',async(ev: any) => {
|
|
5087
|
-
// let target = ev.target;
|
|
5088
|
-
// if(target.checked){
|
|
5089
|
-
// for(let feature of this.getFeatures()){
|
|
5090
|
-
// if(this.selectedFeatures.indexOf(feature) < 0){
|
|
5091
|
-
// this.selectedFeatures.push(feature);
|
|
5092
|
-
// }
|
|
5093
|
-
// }
|
|
5094
|
-
// }else{
|
|
5095
|
-
// this.selectedFeatures = []
|
|
5096
|
-
// }
|
|
5097
|
-
// const selectFeatures = filterList.querySelectorAll('.input-select-feature') as NodeListOf<HTMLInputElement>
|
|
5098
|
-
// for(let selectFeature of selectFeatures){
|
|
5099
|
-
// let id = selectFeature.id;
|
|
5100
|
-
// let i = id.split('-')[3];
|
|
5101
|
-
// let selectedFeature = this.getFeatures()[parseInt(i)]
|
|
5102
|
-
// selectFeature.checked = this.selectedFeatures.indexOf(selectedFeature) >= 0
|
|
5103
|
-
// }
|
|
5104
|
-
// filterSubmitButton.style.visibility = 'visible'
|
|
5105
|
-
// })
|
|
5106
|
-
// const selectFeatureAllLabel = filterList.querySelector('#input-select-feature-label-all') as HTMLLabelElement
|
|
5107
|
-
// selectFeatureAllLabel.addEventListener('click',()=>{
|
|
5108
|
-
// selectFeatureAll.checked = !selectFeatureAll.checked
|
|
5109
|
-
// selectFeatureAll.click();
|
|
5110
|
-
// })
|
|
5111
5141
|
const selectFeatures = filterList.querySelectorAll('.input-select-feature');
|
|
5112
5142
|
const selectFeatureLabels = filterList.querySelectorAll('.input-select-feature-label');
|
|
5113
5143
|
for (let [i, selectFeature] of selectFeatures.entries()) {
|
|
@@ -5122,13 +5152,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5122
5152
|
this.selectedFeatures = [selectedFeature];
|
|
5123
5153
|
}
|
|
5124
5154
|
}
|
|
5125
|
-
// else{
|
|
5126
|
-
// // selectFeatureAll.checked = false;
|
|
5127
|
-
// if(this.selectedFeatures.indexOf(selectedFeature) >= 0){
|
|
5128
|
-
// this.selectedFeatures.splice(this.selectedFeatures.indexOf(selectedFeature),1);
|
|
5129
|
-
// }
|
|
5130
|
-
// }
|
|
5131
|
-
// filterSubmitButton.style.visibility = 'visible'
|
|
5132
5155
|
filterSubmitButton.click();
|
|
5133
5156
|
});
|
|
5134
5157
|
selectFeatureLabels[i].addEventListener('click', () => {
|
|
@@ -5137,23 +5160,56 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5137
5160
|
});
|
|
5138
5161
|
}
|
|
5139
5162
|
});
|
|
5140
|
-
// let innerhtml = eventsContainer.innerHTML;
|
|
5141
|
-
// innerhtml += this.renderSelectAllButtons();
|
|
5142
|
-
// eventsContainer.innerHTML = innerhtml
|
|
5143
|
-
// this.attachTimelineFilterHandlers(eventsContainer);
|
|
5144
|
-
// const radioExpander = eventsContainer.querySelector('#graph-radios-expander') as HTMLButtonElement;
|
|
5145
|
-
// radioExpander?.addEventListener('click', (e: any) => {
|
|
5146
|
-
// const button = (e.currentTarget as HTMLButtonElement);
|
|
5147
|
-
// button.style.display = 'none';
|
|
5148
|
-
// const arrRadios = eventsContainer.querySelectorAll('.chart-radio-item-secondary') as NodeListOf<HTMLDivElement>;
|
|
5149
|
-
// arrRadios.forEach(div => {
|
|
5150
|
-
// div.style.display = 'block';
|
|
5151
|
-
// });
|
|
5152
|
-
// });
|
|
5153
5163
|
const buttonRefresh = eventsContainer.querySelector('#button-refresh');
|
|
5154
5164
|
buttonRefresh.addEventListener('click', async () => {
|
|
5155
5165
|
this.processDateSelectionViewer(eventsContainer);
|
|
5156
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
|
+
}
|
|
5157
5213
|
};
|
|
5158
5214
|
this.renderStatisticsFilters = (eventsContainer) => {
|
|
5159
5215
|
var _a;
|
|
@@ -5214,6 +5270,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5214
5270
|
let inputLabelSubfilters = eventsContainer.querySelector('#input-label-subfilter');
|
|
5215
5271
|
let selectSubfilterCriteria = eventsContainer.querySelector('#select-subfilter-criteria');
|
|
5216
5272
|
selectSubfilterCriteria.value = "";
|
|
5273
|
+
selectSubfilterCriteria.length = 0;
|
|
5217
5274
|
selectFilterValues.innerHTML = "";
|
|
5218
5275
|
let option = new Option();
|
|
5219
5276
|
option.value = "";
|
|
@@ -5634,6 +5691,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5634
5691
|
if (valueEnd == "") {
|
|
5635
5692
|
valueEnd = this._SfCustomContainer.querySelector('#stream-end-date-mobile').value;
|
|
5636
5693
|
}
|
|
5694
|
+
if (this.mode == "viewer") {
|
|
5695
|
+
valueStart = this.sdate;
|
|
5696
|
+
valueEnd = this.edate;
|
|
5697
|
+
}
|
|
5637
5698
|
//console.log('valuestart', valueStart);
|
|
5638
5699
|
//console.log('valueend', valueEnd);
|
|
5639
5700
|
if (valueStart != "" && valueEnd != "") {
|
|
@@ -7313,7 +7374,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7313
7374
|
html += '</div>';
|
|
7314
7375
|
html += '</div>';
|
|
7315
7376
|
html += '<div class="d-flex w-100">';
|
|
7316
|
-
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 += '">';
|
|
7317
7382
|
html += '<div class="title-item-date">';
|
|
7318
7383
|
html += '<label part="input-label">Start Date</label><br />';
|
|
7319
7384
|
html += '<input id="stream-start-date" part="input" type="date" />';
|
|
@@ -7453,7 +7518,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7453
7518
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
7454
7519
|
this.processDateSelection(this._SfCustomContainer);
|
|
7455
7520
|
});
|
|
7456
|
-
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
7521
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0 && this.mode != "viewer") {
|
|
7457
7522
|
this._SfCustomContainer.querySelector('#button-this-year').click();
|
|
7458
7523
|
}
|
|
7459
7524
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -7954,6 +8019,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7954
8019
|
else if (module === "license") {
|
|
7955
8020
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7956
8021
|
}
|
|
8022
|
+
else if (module === "rcmresource") {
|
|
8023
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8024
|
+
}
|
|
7957
8025
|
else {
|
|
7958
8026
|
let found = false;
|
|
7959
8027
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -7989,6 +8057,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7989
8057
|
else if (module === "license") {
|
|
7990
8058
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7991
8059
|
}
|
|
8060
|
+
else if (module === "rcmresource") {
|
|
8061
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8062
|
+
}
|
|
7992
8063
|
else {
|
|
7993
8064
|
let found = false;
|
|
7994
8065
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -8466,6 +8537,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8466
8537
|
else if (module === "license") {
|
|
8467
8538
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8468
8539
|
}
|
|
8540
|
+
else if (module === "rcmresource") {
|
|
8541
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8542
|
+
}
|
|
8469
8543
|
else {
|
|
8470
8544
|
let found = false;
|
|
8471
8545
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -8504,6 +8578,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8504
8578
|
else if (module === "license") {
|
|
8505
8579
|
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8506
8580
|
}
|
|
8581
|
+
else if (module === "rcmresource") {
|
|
8582
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8583
|
+
}
|
|
8507
8584
|
else {
|
|
8508
8585
|
let found = false;
|
|
8509
8586
|
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
@@ -9288,7 +9365,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9288
9365
|
return csv;
|
|
9289
9366
|
};
|
|
9290
9367
|
this.renderGraph = (divContainer, pieData, partData, lateData, complianceData, param) => {
|
|
9291
|
-
console.log('rendering graph chart2');
|
|
9368
|
+
console.log('rendering graph chart2', pieData, partData);
|
|
9292
9369
|
this.clearSelectedGraphParam();
|
|
9293
9370
|
// this.clearSelectedLegend();
|
|
9294
9371
|
this.csvGraphStats = "";
|
|
@@ -9346,6 +9423,110 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9346
9423
|
this.graphFilter = "";
|
|
9347
9424
|
}
|
|
9348
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
|
+
};
|
|
9349
9530
|
this.renderEventDetailShort = (compliance) => {
|
|
9350
9531
|
var _a, _b, _c, _f, _g;
|
|
9351
9532
|
var html = `
|
|
@@ -9515,9 +9696,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9515
9696
|
</div>
|
|
9516
9697
|
`;
|
|
9517
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>';
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9699
|
+
if (this.mode != "viewer") {
|
|
9700
|
+
html += '<div part="reporting-view-container">';
|
|
9701
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
9702
|
+
html += "</div>";
|
|
9703
|
+
}
|
|
9521
9704
|
html += '<div class="d-flex justify-between m-20">';
|
|
9522
9705
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
9523
9706
|
html += '</div>';
|
|
@@ -9673,7 +9856,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9673
9856
|
let flagBulk = false;
|
|
9674
9857
|
if (this.selectedItemIds.length <= 1) {
|
|
9675
9858
|
console.log('mmddyyyy', mmddyyyy);
|
|
9676
|
-
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")) {
|
|
9677
9860
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9678
9861
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9679
9862
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
@@ -9710,7 +9893,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9710
9893
|
"userid": this.userProfileId,
|
|
9711
9894
|
"userrole": this.myRole,
|
|
9712
9895
|
"year": this.calendarStartYYYY,
|
|
9713
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
9896
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
9714
9897
|
});
|
|
9715
9898
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
9716
9899
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -9797,7 +9980,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9797
9980
|
else {
|
|
9798
9981
|
let flagBulk = false;
|
|
9799
9982
|
if (this.selectedItemIds.length <= 1) {
|
|
9800
|
-
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")) {
|
|
9801
9984
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
9802
9985
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
9803
9986
|
this.events[mmdd][p].approved = approved;
|
|
@@ -9835,7 +10018,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9835
10018
|
"userid": this.userProfileId,
|
|
9836
10019
|
"userrole": this.myRole,
|
|
9837
10020
|
"year": this.calendarStartYYYY,
|
|
9838
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
10021
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
9839
10022
|
});
|
|
9840
10023
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
9841
10024
|
}
|
|
@@ -10034,7 +10217,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10034
10217
|
// "userid": this.userProfileId,
|
|
10035
10218
|
// "userrole": this.myRole,
|
|
10036
10219
|
// "year": this.calendarStartYYYY,
|
|
10037
|
-
// "module": listEvent.module ?? "
|
|
10220
|
+
// "module": listEvent.module ?? "compliance"
|
|
10038
10221
|
// } )
|
|
10039
10222
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10040
10223
|
// }else{
|
|
@@ -10056,7 +10239,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10056
10239
|
"userid": this.userProfileId,
|
|
10057
10240
|
"userrole": this.myRole,
|
|
10058
10241
|
"year": this.calendarStartYYYY,
|
|
10059
|
-
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "
|
|
10242
|
+
"module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "compliance",
|
|
10060
10243
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10061
10244
|
});
|
|
10062
10245
|
// }
|
|
@@ -10202,20 +10385,809 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10202
10385
|
}
|
|
10203
10386
|
}
|
|
10204
10387
|
};
|
|
10205
|
-
this.fetchContractDetails = async (listEvent, mmddyyyy) => {
|
|
10388
|
+
this.fetchContractDetails = async (listEvent, mmddyyyy) => {
|
|
10389
|
+
let entityId = listEvent.entityid;
|
|
10390
|
+
let locationId = listEvent.locationid;
|
|
10391
|
+
let url = "https://" + this.apiIdAgreements + "/getallobjectdetails";
|
|
10392
|
+
//console.log('fetch calendar url', url);
|
|
10393
|
+
let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
|
|
10394
|
+
//console.log('urlbody', urlBody);
|
|
10395
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
10396
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
10397
|
+
this._SfLoader.innerHTML = '';
|
|
10398
|
+
if (xhr.status == 200) {
|
|
10399
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
10400
|
+
console.log('jsonRespose agreement details', jsonRespose);
|
|
10401
|
+
this.renderContractDetails(jsonRespose.object, mmddyyyy);
|
|
10402
|
+
}
|
|
10403
|
+
else {
|
|
10404
|
+
if (xhr.status == 401) {
|
|
10405
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
10406
|
+
this.dispatchEvent(changeEvent);
|
|
10407
|
+
}
|
|
10408
|
+
else {
|
|
10409
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
10410
|
+
this.setError(jsonRespose.error);
|
|
10411
|
+
}
|
|
10412
|
+
}
|
|
10413
|
+
};
|
|
10414
|
+
this.renewContract = async (listEvent, reportformatvalues) => {
|
|
10415
|
+
var _a;
|
|
10416
|
+
let url = "https://" + this.apiIdAgreements + "/reopen";
|
|
10417
|
+
console.log('renewing', reportformatvalues);
|
|
10418
|
+
//console.log('fetch calendar url', url);
|
|
10419
|
+
let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
|
|
10420
|
+
// console.log('reopen body', url, urlBody)
|
|
10421
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
10422
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
10423
|
+
this._SfLoader.innerHTML = '';
|
|
10424
|
+
if (xhr.status == 200) {
|
|
10425
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
10426
|
+
console.log('jsonRespose agreement reopen', jsonRespose);
|
|
10427
|
+
}
|
|
10428
|
+
else {
|
|
10429
|
+
if (xhr.status == 401) {
|
|
10430
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
10431
|
+
this.dispatchEvent(changeEvent);
|
|
10432
|
+
}
|
|
10433
|
+
else {
|
|
10434
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
10435
|
+
this.setError(jsonRespose.error);
|
|
10436
|
+
}
|
|
10437
|
+
}
|
|
10438
|
+
};
|
|
10439
|
+
this.renderContractDetails = async (listEvent, mmddyyyy) => {
|
|
10440
|
+
var _a, _b, _c, _f, _g, _h;
|
|
10441
|
+
// await this.fetchAgreementDetails(listEvent, mmddyyyy);
|
|
10442
|
+
// return;
|
|
10443
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
10444
|
+
let entityId = listEvent.entityid;
|
|
10445
|
+
let locationId = listEvent.locationid;
|
|
10446
|
+
let comments = listEvent['comments'];
|
|
10447
|
+
let docs = listEvent['documents'] == null ? [] : listEvent['documents'] == null ? [] : (listEvent['documents']);
|
|
10448
|
+
let approved = listEvent['approved'] == null ? false : listEvent['approved'] == null ? false : listEvent['approved'];
|
|
10449
|
+
let makercheckers = listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'] == null ? [] : listEvent['makercheckers'];
|
|
10450
|
+
// let docsOptional = listEvent['docs'] == null ? [] : listEvent['docs'] == null ? [] : listEvent['docs'];
|
|
10451
|
+
let html = '';
|
|
10452
|
+
let documentType = listEvent['documenttype'] == null ? null : listEvent['documenttype'][0] == null ? null : listEvent['documenttype'][0].split(" ")[0];
|
|
10453
|
+
html += `
|
|
10454
|
+
<div part="compliance-detail-title" class="d-flex justify-between">
|
|
10455
|
+
<button part="button-icon" class="material-icons invisible">close</button>
|
|
10456
|
+
<h3 part="results-title" class="m-0">Agreement Details</h3>
|
|
10457
|
+
<button id="button-detail-close" part="button-icon" class="material-icons">close</button>
|
|
10458
|
+
</div>
|
|
10459
|
+
`;
|
|
10460
|
+
html += `
|
|
10461
|
+
<div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
|
|
10462
|
+
</div>
|
|
10463
|
+
`;
|
|
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>';
|
|
10465
|
+
if (this.mode != "viewer") {
|
|
10466
|
+
html += '<div part="reporting-view-container">';
|
|
10467
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
10468
|
+
html += "</div>";
|
|
10469
|
+
}
|
|
10470
|
+
html += '<div class="d-flex justify-between m-20">';
|
|
10471
|
+
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
10472
|
+
html += '</div>';
|
|
10473
|
+
html += '<div class="m-20">';
|
|
10474
|
+
html += '<div class="d-flex flex-col">';
|
|
10475
|
+
for (var i = 0; i < comments.length; i++) {
|
|
10476
|
+
html += '<div part="commentbox" class="d-flex commentbox ' + (comments[i].author + "").toLowerCase() + 'box">';
|
|
10477
|
+
html += '<div class="mr-20 d-flex flex-col align-end"><span part="comment-username">' + (comments[i].username != null ? comments[i].username : '') + '</span><span part="td-head">' + comments[i].author + '</span>' + ((i === (comments.length - 1) && this.enableDeleteLatestReport) ? '<br /><button class="mt-5 button-delete" part="button">Delete</button>' : '') + '</div>';
|
|
10478
|
+
const onlyCommentText = (comments[i].comment + "").replace(/ *\([^)]*\) */g, "").trim();
|
|
10479
|
+
try {
|
|
10480
|
+
const jsonComments = JSON.parse(onlyCommentText);
|
|
10481
|
+
if (Util.isInteger(jsonComments)) {
|
|
10482
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10483
|
+
}
|
|
10484
|
+
else {
|
|
10485
|
+
//console.log('json comments', jsonComments);
|
|
10486
|
+
var htmlTable = '';
|
|
10487
|
+
for (var j = 0; j < Object.keys(jsonComments).length; j++) {
|
|
10488
|
+
htmlTable += '<div class="mb-20">';
|
|
10489
|
+
htmlTable += ('<div part="detail-head">' + Object.keys(jsonComments)[j] + '</div>');
|
|
10490
|
+
htmlTable += ('<sf-i-elastic-text text="' + jsonComments[Object.keys(jsonComments)[j]] + '" minLength="20"></sf-i-elastic-text>');
|
|
10491
|
+
htmlTable += '</div>';
|
|
10492
|
+
}
|
|
10493
|
+
html += '<div class="">' + htmlTable + '<small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10494
|
+
}
|
|
10495
|
+
}
|
|
10496
|
+
catch (e) {
|
|
10497
|
+
//console.log('json comments exception', comments[i]);
|
|
10498
|
+
html += '<div class="">' + comments[i].comment + '<br /><small><span class="muted">' + Util.getDateTimeStrings(new Date(comments[i].timestamp).getTime()) + '</span></small></div>';
|
|
10499
|
+
}
|
|
10500
|
+
html += '</div>';
|
|
10501
|
+
}
|
|
10502
|
+
if (comments.length === 0) {
|
|
10503
|
+
html += '<div><strong>No comments yet!</strong></div>';
|
|
10504
|
+
}
|
|
10505
|
+
html += '</div>';
|
|
10506
|
+
html += '</div>';
|
|
10507
|
+
console.log('selected event', JSON.stringify(listEvent));
|
|
10508
|
+
this._SfDetailContainer.innerHTML = html;
|
|
10509
|
+
this._SfDetailContainer.style.display = 'block';
|
|
10510
|
+
let usermap = Util.getUsermap();
|
|
10511
|
+
let sfireporting = this._SfDetailContainer.querySelector('#detail-reporting');
|
|
10512
|
+
sfireporting.usermap = JSON.stringify(usermap);
|
|
10513
|
+
sfireporting.selectedItem = listEvent;
|
|
10514
|
+
sfireporting.editdisable = "true";
|
|
10515
|
+
setTimeout(() => {
|
|
10516
|
+
console.log('sfireporting', sfireporting._SfReportingContainer);
|
|
10517
|
+
sfireporting.loadMode();
|
|
10518
|
+
}, 500);
|
|
10519
|
+
sfireporting.addEventListener('valueChanged', () => {
|
|
10520
|
+
sfireporting.classList.remove('hide');
|
|
10521
|
+
this._SfDetailContainer.querySelector('#shimmer-container-agreements').classList.add('hide');
|
|
10522
|
+
});
|
|
10523
|
+
let reportingSchemaJson = "";
|
|
10524
|
+
let reportingSchemaValues = "";
|
|
10525
|
+
if (listEvent.reportformatschema != null) {
|
|
10526
|
+
reportingSchemaJson = listEvent.reportformatschema;
|
|
10527
|
+
reportingSchemaValues = listEvent.reportformatvalues;
|
|
10528
|
+
}
|
|
10529
|
+
else if (listEvent.customreporting != null) {
|
|
10530
|
+
reportingSchemaJson = listEvent.customreporting;
|
|
10531
|
+
}
|
|
10532
|
+
if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
|
|
10533
|
+
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="Contract Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
|
|
10534
|
+
let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
|
|
10535
|
+
if (reportFormatContainer != null) {
|
|
10536
|
+
reportFormatContainer.innerHTML = reportingHtml;
|
|
10537
|
+
}
|
|
10538
|
+
}
|
|
10539
|
+
let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
|
|
10540
|
+
if (reportingSchemaJson != "" && reportingReporting != null) {
|
|
10541
|
+
reportingReporting.configjson = reportingSchemaJson;
|
|
10542
|
+
if (reportingSchemaValues != "")
|
|
10543
|
+
reportingReporting.prepopulateValJson = reportingSchemaValues;
|
|
10544
|
+
reportingReporting.mode = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "edit" : "view";
|
|
10545
|
+
reportingReporting.editdisable = (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) ? "false" : "true";
|
|
10546
|
+
reportingReporting.flow = "reporting";
|
|
10547
|
+
setTimeout(() => {
|
|
10548
|
+
reportingReporting.loadMode();
|
|
10549
|
+
console.log('list-customreporting', reportingSchemaJson);
|
|
10550
|
+
console.log('list-customreporting1', reportingSchemaValues);
|
|
10551
|
+
console.log('list-customreporting2', reportingReporting.mode);
|
|
10552
|
+
}, 500);
|
|
10553
|
+
}
|
|
10554
|
+
(_a = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
10555
|
+
this._SfDetailContainer.innerHTML = '';
|
|
10556
|
+
this._SfDetailContainer.style.display = 'none';
|
|
10557
|
+
});
|
|
10558
|
+
(_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
10559
|
+
// await this.fetchDeleteReview(listEvent["id"], mmddyyyy, entityId, locationId);
|
|
10560
|
+
// this.setSuccess('Deleted successfully!')
|
|
10561
|
+
// setTimeout(() => {
|
|
10562
|
+
// this.clearMessages()
|
|
10563
|
+
// }, 3000);
|
|
10564
|
+
// //console.log('deleted', resultDelete);
|
|
10565
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10566
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10567
|
+
// } else {
|
|
10568
|
+
// if(currentColumnButton != null) {
|
|
10569
|
+
// currentColumnButton.click();
|
|
10570
|
+
// }
|
|
10571
|
+
// }
|
|
10572
|
+
console.log('delete review clicked');
|
|
10573
|
+
var clickEvent = new MouseEvent("click", {
|
|
10574
|
+
"view": window,
|
|
10575
|
+
"bubbles": true,
|
|
10576
|
+
"cancelable": false
|
|
10577
|
+
});
|
|
10578
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10579
|
+
});
|
|
10580
|
+
(_c = this._SfDetailContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
10581
|
+
if (this.selectedItemIds.length === 0) {
|
|
10582
|
+
console.log('audto approve single');
|
|
10583
|
+
}
|
|
10584
|
+
else {
|
|
10585
|
+
console.log('auto approve bulk');
|
|
10586
|
+
}
|
|
10587
|
+
//console.log('deleted', resultDelete);
|
|
10588
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10589
|
+
this.processDateSelection(this._SfCustomContainer);
|
|
10590
|
+
}
|
|
10591
|
+
else {
|
|
10592
|
+
// if(currentColumnButton != null) {
|
|
10593
|
+
// currentColumnButton.click();
|
|
10594
|
+
// }
|
|
10595
|
+
}
|
|
10596
|
+
var clickEvent = new MouseEvent("click", {
|
|
10597
|
+
"view": window,
|
|
10598
|
+
"bubbles": true,
|
|
10599
|
+
"cancelable": false
|
|
10600
|
+
});
|
|
10601
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10602
|
+
});
|
|
10603
|
+
if (this.mode == "consumer" || this.mode == "next") {
|
|
10604
|
+
(_f = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async (ev) => {
|
|
10605
|
+
var _a, _b, _c, _f, _g;
|
|
10606
|
+
let buttonClick = ev.target;
|
|
10607
|
+
buttonClick.innerHTML = "Saving...";
|
|
10608
|
+
const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
|
|
10609
|
+
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
10610
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
10611
|
+
let newEvent = { ...listEvent };
|
|
10612
|
+
newEvent.comments = comments;
|
|
10613
|
+
newEvent.approved = approved;
|
|
10614
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
10615
|
+
if (currStatus == newStatus) {
|
|
10616
|
+
buttonClick.innerHTML = "Save";
|
|
10617
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
10618
|
+
setTimeout(() => {
|
|
10619
|
+
this.clearMessages();
|
|
10620
|
+
}, 3000);
|
|
10621
|
+
return;
|
|
10622
|
+
}
|
|
10623
|
+
let reportformatvalues = "";
|
|
10624
|
+
let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
|
|
10625
|
+
console.log('renew reporting', reportingReporting);
|
|
10626
|
+
if (reportingReporting != null) {
|
|
10627
|
+
reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
10628
|
+
}
|
|
10629
|
+
var clickEvent = new MouseEvent("click", {
|
|
10630
|
+
"view": window,
|
|
10631
|
+
"bubbles": true,
|
|
10632
|
+
"cancelable": false
|
|
10633
|
+
});
|
|
10634
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10635
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved)
|
|
10636
|
+
let flagBulk = false;
|
|
10637
|
+
if (this.selectedItemIds.length <= 1) {
|
|
10638
|
+
console.log('mmddyyyy', mmddyyyy);
|
|
10639
|
+
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance")) {
|
|
10640
|
+
if (approved) {
|
|
10641
|
+
await this.renewContract(listEvent, reportformatvalues);
|
|
10642
|
+
}
|
|
10643
|
+
else {
|
|
10644
|
+
console.log('renew reporting', reportformatvalues);
|
|
10645
|
+
}
|
|
10646
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10647
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10648
|
+
this.events[mmdd][p].approved = approved;
|
|
10649
|
+
this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
|
|
10650
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
10651
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10652
|
+
}
|
|
10653
|
+
}
|
|
10654
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10655
|
+
this.recentlyReported[mmdd] = [];
|
|
10656
|
+
}
|
|
10657
|
+
this.recentlyReported[mmdd].push(listEvent);
|
|
10658
|
+
console.log('review single');
|
|
10659
|
+
}
|
|
10660
|
+
}
|
|
10661
|
+
else {
|
|
10662
|
+
let bulkBodyReview = [];
|
|
10663
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10664
|
+
const selectedId = this.selectedItemIds[k];
|
|
10665
|
+
//console.log('selectedid', selectedId);
|
|
10666
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10667
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10668
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10669
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10670
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
10671
|
+
bulkBodyReview.push({
|
|
10672
|
+
"mmddyyyy": mmddyyyy,
|
|
10673
|
+
"projectid": this.projectId,
|
|
10674
|
+
"type": "review",
|
|
10675
|
+
"eventid": eventId,
|
|
10676
|
+
"comments": comments,
|
|
10677
|
+
"approved": approved,
|
|
10678
|
+
"entityid": entityId,
|
|
10679
|
+
"locationid": locationId,
|
|
10680
|
+
"username": this.userName,
|
|
10681
|
+
"userid": this.userProfileId,
|
|
10682
|
+
"userrole": this.myRole,
|
|
10683
|
+
"year": this.calendarStartYYYY,
|
|
10684
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
10685
|
+
});
|
|
10686
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
10687
|
+
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
10688
|
+
// await this.sleep(2000);
|
|
10689
|
+
// this.clearMessages();
|
|
10690
|
+
}
|
|
10691
|
+
await this.uploadReviewsBulk(bulkBodyReview);
|
|
10692
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10693
|
+
const selectedId = this.selectedItemIds[k];
|
|
10694
|
+
//console.log('selectedid', selectedId);
|
|
10695
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10696
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10697
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10698
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10699
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
10700
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10701
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10702
|
+
this.events[mmdd][p].isbulk = true;
|
|
10703
|
+
flagBulk = true;
|
|
10704
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10705
|
+
this.recentlyReported[mmdd] = [];
|
|
10706
|
+
}
|
|
10707
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10708
|
+
}
|
|
10709
|
+
}
|
|
10710
|
+
}
|
|
10711
|
+
console.log('review bulk');
|
|
10712
|
+
}
|
|
10713
|
+
if (this.mode == "next") {
|
|
10714
|
+
// this.fetchNext(this.nextPage)
|
|
10715
|
+
this.renderRoleTabsNext(this.nextPage);
|
|
10716
|
+
}
|
|
10717
|
+
else {
|
|
10718
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10719
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10720
|
+
// } else
|
|
10721
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
10722
|
+
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
10723
|
+
this.processFindSelection(this._SfFindContainer, searchString);
|
|
10724
|
+
}
|
|
10725
|
+
else {
|
|
10726
|
+
if (this.selectedItemIds.length > 0) {
|
|
10727
|
+
await this.fetchBulkReportingData();
|
|
10728
|
+
}
|
|
10729
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
10730
|
+
var clickEvent = new MouseEvent("click", {
|
|
10731
|
+
"view": window,
|
|
10732
|
+
"bubbles": true,
|
|
10733
|
+
"cancelable": false
|
|
10734
|
+
});
|
|
10735
|
+
(_g = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _g === void 0 ? void 0 : _g.dispatchEvent(clickEvent);
|
|
10736
|
+
// if(currentColumnButton != null) {
|
|
10737
|
+
// currentColumnButton.click();
|
|
10738
|
+
// }
|
|
10739
|
+
}
|
|
10740
|
+
}
|
|
10741
|
+
});
|
|
10742
|
+
(_g = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async (ev) => {
|
|
10743
|
+
var _a, _b;
|
|
10744
|
+
let buttonClick = ev.target;
|
|
10745
|
+
buttonClick.innerHTML = "Saving...";
|
|
10746
|
+
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
10747
|
+
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
10748
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
10749
|
+
let newEvent = { ...listEvent };
|
|
10750
|
+
newEvent.comments = comments;
|
|
10751
|
+
newEvent.approved = approved;
|
|
10752
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
10753
|
+
if (currStatus == newStatus) {
|
|
10754
|
+
buttonClick.innerHTML = "Save";
|
|
10755
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
10756
|
+
setTimeout(() => {
|
|
10757
|
+
this.clearMessages();
|
|
10758
|
+
}, 3000);
|
|
10759
|
+
return;
|
|
10760
|
+
}
|
|
10761
|
+
if (comments.trim().length === 0) {
|
|
10762
|
+
buttonClick.innerHTML = "Save";
|
|
10763
|
+
this.setError('Comments cannot be blank!');
|
|
10764
|
+
setTimeout(() => {
|
|
10765
|
+
this.clearMessages();
|
|
10766
|
+
}, 3000);
|
|
10767
|
+
}
|
|
10768
|
+
else {
|
|
10769
|
+
let flagBulk = false;
|
|
10770
|
+
if (this.selectedItemIds.length <= 1) {
|
|
10771
|
+
if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
10772
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10773
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10774
|
+
this.events[mmdd][p].approved = approved;
|
|
10775
|
+
this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
10776
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10777
|
+
}
|
|
10778
|
+
}
|
|
10779
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10780
|
+
this.recentlyReported[mmdd] = [];
|
|
10781
|
+
}
|
|
10782
|
+
this.recentlyReported[mmdd].push(listEvent);
|
|
10783
|
+
}
|
|
10784
|
+
console.log('uploadaudit single');
|
|
10785
|
+
}
|
|
10786
|
+
else {
|
|
10787
|
+
let bulkBodyAudit = [];
|
|
10788
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10789
|
+
const selectedId = this.selectedItemIds[k];
|
|
10790
|
+
//console.log('selectedid', selectedId);
|
|
10791
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10792
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10793
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10794
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10795
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
10796
|
+
bulkBodyAudit.push({
|
|
10797
|
+
"mmddyyyy": mmddyyyy,
|
|
10798
|
+
"projectid": this.projectId,
|
|
10799
|
+
"type": "audit",
|
|
10800
|
+
"eventid": eventId,
|
|
10801
|
+
"comments": comments,
|
|
10802
|
+
"approved": approved,
|
|
10803
|
+
"entityid": entityId,
|
|
10804
|
+
"locationid": locationId,
|
|
10805
|
+
"username": this.userName,
|
|
10806
|
+
"userid": this.userProfileId,
|
|
10807
|
+
"userrole": this.myRole,
|
|
10808
|
+
"year": this.calendarStartYYYY,
|
|
10809
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
10810
|
+
});
|
|
10811
|
+
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
10812
|
+
}
|
|
10813
|
+
await this.uploadAuditsBulk(bulkBodyAudit);
|
|
10814
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10815
|
+
const selectedId = this.selectedItemIds[k];
|
|
10816
|
+
//console.log('selectedid', selectedId);
|
|
10817
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10818
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10819
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10820
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10821
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
10822
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10823
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10824
|
+
this.events[mmdd][p].isbulk = true;
|
|
10825
|
+
flagBulk = true;
|
|
10826
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10827
|
+
this.recentlyReported[mmdd] = [];
|
|
10828
|
+
}
|
|
10829
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
10830
|
+
}
|
|
10831
|
+
}
|
|
10832
|
+
}
|
|
10833
|
+
console.log('uploadAudit bulk');
|
|
10834
|
+
}
|
|
10835
|
+
var clickEvent = new MouseEvent("click", {
|
|
10836
|
+
"view": window,
|
|
10837
|
+
"bubbles": true,
|
|
10838
|
+
"cancelable": false
|
|
10839
|
+
});
|
|
10840
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10841
|
+
if (this.mode == "next") {
|
|
10842
|
+
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
10843
|
+
}
|
|
10844
|
+
else {
|
|
10845
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10846
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10847
|
+
// } else
|
|
10848
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
10849
|
+
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
10850
|
+
this.processFindSelection(this._SfFindContainer, searchString);
|
|
10851
|
+
}
|
|
10852
|
+
else {
|
|
10853
|
+
if (this.selectedItemIds.length > 0) {
|
|
10854
|
+
await this.fetchBulkReportingData();
|
|
10855
|
+
}
|
|
10856
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
10857
|
+
// if(currentColumnButton != null) {
|
|
10858
|
+
// currentColumnButton.click();
|
|
10859
|
+
// }
|
|
10860
|
+
}
|
|
10861
|
+
}
|
|
10862
|
+
}
|
|
10863
|
+
});
|
|
10864
|
+
if (this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
10865
|
+
if (approved) {
|
|
10866
|
+
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
10867
|
+
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'hidden';
|
|
10868
|
+
}
|
|
10869
|
+
}
|
|
10870
|
+
else {
|
|
10871
|
+
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
10872
|
+
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
10873
|
+
(_h = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
|
|
10874
|
+
var _a, _b, _c, _f;
|
|
10875
|
+
let buttonClick = ev.target;
|
|
10876
|
+
buttonClick.innerHTML = "Saving...";
|
|
10877
|
+
const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
|
|
10878
|
+
//console.log('reporter comments 1', reportercomments);
|
|
10879
|
+
// const reporterdoc = ((((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement) != null) && ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value.length > 0) ? (new Date(((this._SfDetailContainer as HTMLDivElement).querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "") : "";
|
|
10880
|
+
const reporterdoc = new Date().getTime() + "";
|
|
10881
|
+
let docs = [];
|
|
10882
|
+
//console.log('reporter comments 2', reportercomments);
|
|
10883
|
+
// if(docsOptional.length === 0) {
|
|
10884
|
+
// docs = (this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.selectedValues();
|
|
10885
|
+
// }
|
|
10886
|
+
//console.log('docs', docs);
|
|
10887
|
+
let reportformatvalues = "";
|
|
10888
|
+
let reportformatschema = "";
|
|
10889
|
+
if (listEvent.customreporting != null) {
|
|
10890
|
+
let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting');
|
|
10891
|
+
console.log('reportformatvalues', JSON.stringify(reportingReporting.selectedValues()));
|
|
10892
|
+
reportformatvalues = (_a = JSON.stringify(reportingReporting.selectedValues())) !== null && _a !== void 0 ? _a : "";
|
|
10893
|
+
reportformatschema = (_b = reportingReporting.configjson) !== null && _b !== void 0 ? _b : "";
|
|
10894
|
+
}
|
|
10895
|
+
let percentage = "100";
|
|
10896
|
+
if (this._SfDetailContainer.querySelector('#input-reporter-percentage') != null) {
|
|
10897
|
+
percentage = this._SfDetailContainer.querySelector('#input-reporter-percentage').value;
|
|
10898
|
+
}
|
|
10899
|
+
// if (Number.isNaN(parseInt(percentage)) || parseInt(percentage) < 0 || parseInt(percentage) > 100) {
|
|
10900
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
10901
|
+
// buttonClick.innerHTML = "Save"
|
|
10902
|
+
// this.setError('Invalid Percentage!');
|
|
10903
|
+
// setTimeout(() => {
|
|
10904
|
+
// this.clearMessages();
|
|
10905
|
+
// }, 3000);
|
|
10906
|
+
// } else {
|
|
10907
|
+
// if (docs.length === 0 && docsOptional.length === 0) {
|
|
10908
|
+
// //console.log('reporter comments 3', reportercomments);
|
|
10909
|
+
// buttonClick.innerHTML = "Save"
|
|
10910
|
+
// this.setError('No documents uploaded!');
|
|
10911
|
+
// setTimeout(() => {
|
|
10912
|
+
// this.clearMessages();
|
|
10913
|
+
// }, 3000);
|
|
10914
|
+
// } else {
|
|
10915
|
+
// //console.log('reporterdoc', reporterdoc);
|
|
10916
|
+
// if (reporterdoc.length === 0) {
|
|
10917
|
+
// buttonClick.innerHTML = "Save"
|
|
10918
|
+
// this.setError('Date of completion not selected!');
|
|
10919
|
+
// setTimeout(() => {
|
|
10920
|
+
// this.clearMessages();
|
|
10921
|
+
// }, 3000);
|
|
10922
|
+
// } else if (parseInt(reporterdoc) > new Date().getTime()) {
|
|
10923
|
+
// buttonClick.innerHTML = "Save"
|
|
10924
|
+
// this.setError('Date of completion cannot be in future!');
|
|
10925
|
+
// setTimeout(() => {
|
|
10926
|
+
// this.clearMessages();
|
|
10927
|
+
// }, 3000);
|
|
10928
|
+
// } else {
|
|
10929
|
+
//console.log('makerscheckers 1', reportercomments);
|
|
10930
|
+
if (reportercomments.trim().length === 0) {
|
|
10931
|
+
buttonClick.innerHTML = "Save";
|
|
10932
|
+
this.setError('Comments cannot be blank!');
|
|
10933
|
+
setTimeout(() => {
|
|
10934
|
+
this.clearMessages();
|
|
10935
|
+
}, 3000);
|
|
10936
|
+
}
|
|
10937
|
+
else {
|
|
10938
|
+
var clickEvent = new MouseEvent("click", {
|
|
10939
|
+
"view": window,
|
|
10940
|
+
"bubbles": true,
|
|
10941
|
+
"cancelable": false
|
|
10942
|
+
});
|
|
10943
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
10944
|
+
let flagBulk = false;
|
|
10945
|
+
if (this.selectedItemIds.length <= 1) {
|
|
10946
|
+
if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, listEvent.module, percentage, makercheckers)) {
|
|
10947
|
+
console.log('this.events', this.events);
|
|
10948
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10949
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10950
|
+
this.events[mmdd][p].documents = docs;
|
|
10951
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
10952
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10953
|
+
}
|
|
10954
|
+
}
|
|
10955
|
+
console.log('uploadReport single');
|
|
10956
|
+
if (makercheckers.length > 0) {
|
|
10957
|
+
// await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
|
|
10958
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10959
|
+
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10960
|
+
this.events[mmdd][p].approved = true;
|
|
10961
|
+
this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
|
|
10962
|
+
// this.events[mmdd][p].documents = docs
|
|
10963
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
10964
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10965
|
+
}
|
|
10966
|
+
}
|
|
10967
|
+
await this.renewContract(listEvent, reportformatvalues);
|
|
10968
|
+
console.log('upload report auto approve single');
|
|
10969
|
+
}
|
|
10970
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
10971
|
+
this.recentlyReported[mmdd] = [];
|
|
10972
|
+
}
|
|
10973
|
+
this.recentlyReported[mmdd].push(listEvent);
|
|
10974
|
+
}
|
|
10975
|
+
}
|
|
10976
|
+
else {
|
|
10977
|
+
let bulkBody = [];
|
|
10978
|
+
let bulkBodyReview = [];
|
|
10979
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10980
|
+
const selectedId = this.selectedItemIds[k];
|
|
10981
|
+
//console.log('selectedid', selectedId);
|
|
10982
|
+
const makercheckersL = selectedId.split('-')[5];
|
|
10983
|
+
entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
10984
|
+
locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
10985
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
10986
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
10987
|
+
//console.log(entityId, locationId, eventId, mmddyyyy);
|
|
10988
|
+
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
10989
|
+
// if(parseInt(makercheckersL) > 0) {
|
|
10990
|
+
// bulkBodyReview.push({
|
|
10991
|
+
// "mmddyyyy": mmddyyyy,
|
|
10992
|
+
// "projectid": this.projectId,
|
|
10993
|
+
// "type": "report",
|
|
10994
|
+
// "eventid": eventId,
|
|
10995
|
+
// "comments": reportercomments,
|
|
10996
|
+
// "dateofcompletion": reporterdoc,
|
|
10997
|
+
// "percentage": percentage,
|
|
10998
|
+
// "entityid": entityId,
|
|
10999
|
+
// "locationid": locationId,
|
|
11000
|
+
// "event": null,
|
|
11001
|
+
// "docs": JSON.stringify(docs),
|
|
11002
|
+
// "approved": true,
|
|
11003
|
+
// "username": this.userName,
|
|
11004
|
+
// "reportformatvalues": reportformatvalues,
|
|
11005
|
+
// "reportformatschema": reportformatschema,
|
|
11006
|
+
// "userid": this.userProfileId,
|
|
11007
|
+
// "userrole": this.myRole,
|
|
11008
|
+
// "year": this.calendarStartYYYY,
|
|
11009
|
+
// "module": listEvent.module ?? "compliance"
|
|
11010
|
+
// } )
|
|
11011
|
+
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
11012
|
+
// }else{
|
|
11013
|
+
bulkBody.push({
|
|
11014
|
+
"mmddyyyy": mmddyyyy,
|
|
11015
|
+
"projectid": this.projectId,
|
|
11016
|
+
"type": "report",
|
|
11017
|
+
"eventid": eventId,
|
|
11018
|
+
"comments": reportercomments,
|
|
11019
|
+
"dateofcompletion": reporterdoc,
|
|
11020
|
+
"percentage": percentage,
|
|
11021
|
+
"entityid": entityId,
|
|
11022
|
+
"locationid": locationId,
|
|
11023
|
+
"event": null,
|
|
11024
|
+
"docs": JSON.stringify(docs),
|
|
11025
|
+
"username": this.userName,
|
|
11026
|
+
"reportformatvalues": reportformatvalues,
|
|
11027
|
+
"reportformatschema": reportformatschema,
|
|
11028
|
+
"userid": this.userProfileId,
|
|
11029
|
+
"userrole": this.myRole,
|
|
11030
|
+
"year": this.calendarStartYYYY,
|
|
11031
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
11032
|
+
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
11033
|
+
});
|
|
11034
|
+
// }
|
|
11035
|
+
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
11036
|
+
// await this.sleep(2000);
|
|
11037
|
+
// this.clearMessages();
|
|
11038
|
+
}
|
|
11039
|
+
// await this.uploadReportsBulk(bulkBody);
|
|
11040
|
+
// await this.fetchBulkReportingData();
|
|
11041
|
+
if (bulkBody.length > 0) {
|
|
11042
|
+
await this.uploadReportsBulk(bulkBody, bulkBodyReview.length == 0);
|
|
11043
|
+
}
|
|
11044
|
+
// if(bulkBodyReview.length > 0){
|
|
11045
|
+
// await this.uploadReportsReviewsBulk(bulkBodyReview)
|
|
11046
|
+
// }
|
|
11047
|
+
await this.fetchBulkReportingData();
|
|
11048
|
+
console.log('uploadReport bulk');
|
|
11049
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
11050
|
+
const selectedId = this.selectedItemIds[k];
|
|
11051
|
+
//console.log('selectedid', selectedId);
|
|
11052
|
+
let entityId = selectedId.split('-')[7].replace(/_/g, '-');
|
|
11053
|
+
let locationId = selectedId.split('-')[8].replace(/_/g, '-');
|
|
11054
|
+
const eventId = selectedId.split('-')[9].replace(/_/g, '-');
|
|
11055
|
+
mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
|
|
11056
|
+
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
11057
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
11058
|
+
if (this.events[mmdd][p].id == eventId && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
11059
|
+
this.events[mmdd][p].isbulk = true;
|
|
11060
|
+
flagBulk = true;
|
|
11061
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
11062
|
+
this.recentlyReported[mmdd] = [];
|
|
11063
|
+
}
|
|
11064
|
+
this.recentlyReported[mmdd].push(this.events[mmdd][p]);
|
|
11065
|
+
}
|
|
11066
|
+
}
|
|
11067
|
+
}
|
|
11068
|
+
}
|
|
11069
|
+
if (this.mode == "next") {
|
|
11070
|
+
this.fetchNext(this.nextPage, this.nextTabRole, this.nextTabStatus);
|
|
11071
|
+
}
|
|
11072
|
+
else {
|
|
11073
|
+
// if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
11074
|
+
// this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
11075
|
+
// } else
|
|
11076
|
+
if (this.getCurrentTab() == this.TAB_FIND) {
|
|
11077
|
+
const searchString = this._SfFindContainer.querySelector('#stream-search').value;
|
|
11078
|
+
this.processFindSelection(this._SfFindContainer, searchString);
|
|
11079
|
+
}
|
|
11080
|
+
else {
|
|
11081
|
+
if (this.selectedItemIds.length > 0) {
|
|
11082
|
+
await this.fetchBulkReportingData();
|
|
11083
|
+
}
|
|
11084
|
+
this.renderAppropriateStream(this.sdate, this.edate, true, flagBulk);
|
|
11085
|
+
// if(currentColumnButton != null) {
|
|
11086
|
+
// currentColumnButton.click();
|
|
11087
|
+
// }
|
|
11088
|
+
}
|
|
11089
|
+
}
|
|
11090
|
+
}
|
|
11091
|
+
// }
|
|
11092
|
+
// }
|
|
11093
|
+
// }
|
|
11094
|
+
});
|
|
11095
|
+
}
|
|
11096
|
+
}
|
|
11097
|
+
}
|
|
11098
|
+
if (this._SfUploader[0] != null) {
|
|
11099
|
+
this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "none";
|
|
11100
|
+
this._SfUploader[0].querySelector('#uploader').addEventListener('analysisInProgress', (_ev) => {
|
|
11101
|
+
console.log('uploader analysisInProgress', _ev);
|
|
11102
|
+
this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "block";
|
|
11103
|
+
});
|
|
11104
|
+
this._SfUploader[0].querySelector('#uploader').addEventListener('analysisCompleted', (_ev) => {
|
|
11105
|
+
console.log('uploader analysisInProgress', _ev);
|
|
11106
|
+
this._SfDetailContainer.querySelector('.uploader-analysis-message').style.display = "none";
|
|
11107
|
+
});
|
|
11108
|
+
//console.log('documentType checking', documentType);
|
|
11109
|
+
if (documentType != null) {
|
|
11110
|
+
this._SfUploader[0].querySelector('#uploader').docType = documentType;
|
|
11111
|
+
}
|
|
11112
|
+
this._SfUploader[0].querySelector('#uploader').prepopulatedInputArr = JSON.stringify([]);
|
|
11113
|
+
console.log('uploader', this._SfUploader[0].querySelector('#uploader'));
|
|
11114
|
+
this._SfUploader[0].querySelector('#uploader').loadMode();
|
|
11115
|
+
if (docs.length > 0) {
|
|
11116
|
+
this._SfUploader[0].querySelector('#uploader').prepopulatedInputArr = JSON.stringify(docs);
|
|
11117
|
+
this._SfUploader[0].querySelector('#uploader').loadMode();
|
|
11118
|
+
}
|
|
11119
|
+
if (this.myRole == this.TAB_APPROVER || approved) {
|
|
11120
|
+
this._SfUploader[0].querySelector('#uploader').readOnly = true;
|
|
11121
|
+
this._SfUploader[0].querySelector('#uploader').loadMode();
|
|
11122
|
+
}
|
|
11123
|
+
else {
|
|
11124
|
+
this._SfUploader[0].querySelector('#uploader').readOnly = false;
|
|
11125
|
+
this._SfUploader[0].querySelector('#uploader').loadMode();
|
|
11126
|
+
}
|
|
11127
|
+
const dataPassthrough = {
|
|
11128
|
+
projectId: this.projectId,
|
|
11129
|
+
countryId: this.countryId,
|
|
11130
|
+
entityId: listEvent.entityid,
|
|
11131
|
+
locationId: listEvent.locationid,
|
|
11132
|
+
mmddyyyy: mmddyyyy,
|
|
11133
|
+
complianceId: listEvent['id'],
|
|
11134
|
+
path: "uploadextract"
|
|
11135
|
+
};
|
|
11136
|
+
const callbackUrlHost = "8icpy39ru0.execute-api.us-east-1.amazonaws.com";
|
|
11137
|
+
const callbackUrlPath = "test/uploadextract";
|
|
11138
|
+
this._SfUploader[0].querySelector('#uploader').projectId = this.projectId;
|
|
11139
|
+
this._SfUploader[0].querySelector('#uploader').dataPassthrough = JSON.stringify(dataPassthrough);
|
|
11140
|
+
this._SfUploader[0].querySelector('#uploader').callbackUrlHost = callbackUrlHost;
|
|
11141
|
+
this._SfUploader[0].querySelector('#uploader').callbackUrlPath = callbackUrlPath;
|
|
11142
|
+
this._SfUploader[0].querySelector('#uploader').loadMode();
|
|
11143
|
+
}
|
|
11144
|
+
//console.log('approved 1', event["approved"], this.myRole, this.TAB_APPROVER);
|
|
11145
|
+
if (this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_VIEWER || this.myRole == this.TAB_AUDITOR || this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
11146
|
+
//console.log('approved 1', event["approved"], this.myRole, this.TAB_APPROVER);
|
|
11147
|
+
if (listEvent["approved"] != null) {
|
|
11148
|
+
if (listEvent["approved"] === true) {
|
|
11149
|
+
//console.log('approved 2', event["approved"], this.myRole, this.TAB_APPROVER);
|
|
11150
|
+
if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
|
|
11151
|
+
this._SfDetailContainer.querySelector('#input-approve-yes').checked = true;
|
|
11152
|
+
}
|
|
11153
|
+
if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
|
|
11154
|
+
this._SfDetailContainer.querySelector('#input-approve-no').checked = false;
|
|
11155
|
+
}
|
|
11156
|
+
}
|
|
11157
|
+
else {
|
|
11158
|
+
if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
|
|
11159
|
+
this._SfDetailContainer.querySelector('#input-approve-yes').checked = false;
|
|
11160
|
+
}
|
|
11161
|
+
if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
|
|
11162
|
+
this._SfDetailContainer.querySelector('#input-approve-no').checked = true;
|
|
11163
|
+
}
|
|
11164
|
+
}
|
|
11165
|
+
}
|
|
11166
|
+
else {
|
|
11167
|
+
if (this._SfDetailContainer.querySelector('#input-approve-yes') != null) {
|
|
11168
|
+
this._SfDetailContainer.querySelector('#input-approve-yes').checked = false;
|
|
11169
|
+
}
|
|
11170
|
+
if (this._SfDetailContainer.querySelector('#input-approve-no') != null) {
|
|
11171
|
+
this._SfDetailContainer.querySelector('#input-approve-no').checked = true;
|
|
11172
|
+
}
|
|
11173
|
+
}
|
|
11174
|
+
}
|
|
11175
|
+
}
|
|
11176
|
+
};
|
|
11177
|
+
this.fetchLicenseDetails = async (listEvent, mmddyyyy) => {
|
|
10206
11178
|
let entityId = listEvent.entityid;
|
|
10207
11179
|
let locationId = listEvent.locationid;
|
|
10208
|
-
let url = "https://" + this.
|
|
10209
|
-
|
|
11180
|
+
let url = "https://" + this.apiIdLicenses + "/getallobjectdetails";
|
|
11181
|
+
console.log('fetch license details url', url);
|
|
10210
11182
|
let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
|
|
10211
|
-
|
|
11183
|
+
console.log('fetch license details urlbody', urlBody);
|
|
10212
11184
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
10213
11185
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
10214
11186
|
this._SfLoader.innerHTML = '';
|
|
10215
11187
|
if (xhr.status == 200) {
|
|
10216
11188
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
10217
11189
|
console.log('jsonRespose agreement details', jsonRespose);
|
|
10218
|
-
this.
|
|
11190
|
+
this.renderLicenseDetails(jsonRespose.object, mmddyyyy);
|
|
10219
11191
|
}
|
|
10220
11192
|
else {
|
|
10221
11193
|
if (xhr.status == 401) {
|
|
@@ -10228,9 +11200,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10228
11200
|
}
|
|
10229
11201
|
}
|
|
10230
11202
|
};
|
|
10231
|
-
this.
|
|
11203
|
+
this.renewLicense = async (listEvent, reportformatvalues) => {
|
|
10232
11204
|
var _a;
|
|
10233
|
-
let url = "https://" + this.
|
|
11205
|
+
let url = "https://" + this.apiIdLicenses + "/reopen";
|
|
10234
11206
|
console.log('renewing', reportformatvalues);
|
|
10235
11207
|
//console.log('fetch calendar url', url);
|
|
10236
11208
|
let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
|
|
@@ -10253,7 +11225,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10253
11225
|
}
|
|
10254
11226
|
}
|
|
10255
11227
|
};
|
|
10256
|
-
this.
|
|
11228
|
+
this.renderLicenseDetails = async (listEvent, mmddyyyy) => {
|
|
10257
11229
|
var _a, _b, _c, _f, _g, _h;
|
|
10258
11230
|
// await this.fetchAgreementDetails(listEvent, mmddyyyy);
|
|
10259
11231
|
// return;
|
|
@@ -10270,7 +11242,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10270
11242
|
html += `
|
|
10271
11243
|
<div part="compliance-detail-title" class="d-flex justify-between">
|
|
10272
11244
|
<button part="button-icon" class="material-icons invisible">close</button>
|
|
10273
|
-
<h3 part="results-title" class="m-0">
|
|
11245
|
+
<h3 part="results-title" class="m-0">License Details</h3>
|
|
10274
11246
|
<button id="button-detail-close" part="button-icon" class="material-icons">close</button>
|
|
10275
11247
|
</div>
|
|
10276
11248
|
`;
|
|
@@ -10278,10 +11250,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10278
11250
|
<div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
|
|
10279
11251
|
</div>
|
|
10280
11252
|
`;
|
|
10281
|
-
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="
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
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>';
|
|
11254
|
+
if (this.mode != "viewer") {
|
|
11255
|
+
html += '<div part="reporting-view-container">';
|
|
11256
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
11257
|
+
html += "</div>";
|
|
11258
|
+
}
|
|
10285
11259
|
html += '<div class="d-flex justify-between m-20">';
|
|
10286
11260
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
10287
11261
|
html += '</div>';
|
|
@@ -10329,6 +11303,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10329
11303
|
sfireporting.editdisable = "true";
|
|
10330
11304
|
setTimeout(() => {
|
|
10331
11305
|
console.log('sfireporting', sfireporting._SfReportingContainer);
|
|
11306
|
+
console.log('sfireporting', sfireporting.selectedItem);
|
|
10332
11307
|
sfireporting.loadMode();
|
|
10333
11308
|
}, 500);
|
|
10334
11309
|
sfireporting.addEventListener('valueChanged', () => {
|
|
@@ -10345,7 +11320,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10345
11320
|
reportingSchemaJson = listEvent.customreporting;
|
|
10346
11321
|
}
|
|
10347
11322
|
if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
|
|
10348
|
-
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="
|
|
11323
|
+
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="License Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
|
|
10349
11324
|
let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
|
|
10350
11325
|
if (reportFormatContainer != null) {
|
|
10351
11326
|
reportFormatContainer.innerHTML = reportingHtml;
|
|
@@ -10451,9 +11426,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10451
11426
|
let flagBulk = false;
|
|
10452
11427
|
if (this.selectedItemIds.length <= 1) {
|
|
10453
11428
|
console.log('mmddyyyy', mmddyyyy);
|
|
10454
|
-
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")) {
|
|
10455
11430
|
if (approved) {
|
|
10456
|
-
await this.
|
|
11431
|
+
await this.renewLicense(listEvent, reportformatvalues);
|
|
10457
11432
|
}
|
|
10458
11433
|
else {
|
|
10459
11434
|
console.log('renew reporting', reportformatvalues);
|
|
@@ -10496,7 +11471,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10496
11471
|
"userid": this.userProfileId,
|
|
10497
11472
|
"userrole": this.myRole,
|
|
10498
11473
|
"year": this.calendarStartYYYY,
|
|
10499
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
11474
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
10500
11475
|
});
|
|
10501
11476
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
10502
11477
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -10583,7 +11558,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10583
11558
|
else {
|
|
10584
11559
|
let flagBulk = false;
|
|
10585
11560
|
if (this.selectedItemIds.length <= 1) {
|
|
10586
|
-
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")) {
|
|
10587
11562
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10588
11563
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10589
11564
|
this.events[mmdd][p].approved = approved;
|
|
@@ -10621,7 +11596,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10621
11596
|
"userid": this.userProfileId,
|
|
10622
11597
|
"userrole": this.myRole,
|
|
10623
11598
|
"year": this.calendarStartYYYY,
|
|
10624
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
11599
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
10625
11600
|
});
|
|
10626
11601
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
10627
11602
|
}
|
|
@@ -10779,7 +11754,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10779
11754
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10780
11755
|
}
|
|
10781
11756
|
}
|
|
10782
|
-
await this.
|
|
11757
|
+
await this.renewLicense(listEvent, reportformatvalues);
|
|
10783
11758
|
console.log('upload report auto approve single');
|
|
10784
11759
|
}
|
|
10785
11760
|
if (this.recentlyReported[mmdd] == null) {
|
|
@@ -10821,7 +11796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10821
11796
|
// "userid": this.userProfileId,
|
|
10822
11797
|
// "userrole": this.myRole,
|
|
10823
11798
|
// "year": this.calendarStartYYYY,
|
|
10824
|
-
// "module": listEvent.module ?? "
|
|
11799
|
+
// "module": listEvent.module ?? "compliance"
|
|
10825
11800
|
// } )
|
|
10826
11801
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
10827
11802
|
// }else{
|
|
@@ -10843,7 +11818,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10843
11818
|
"userid": this.userProfileId,
|
|
10844
11819
|
"userrole": this.myRole,
|
|
10845
11820
|
"year": this.calendarStartYYYY,
|
|
10846
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
11821
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
10847
11822
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10848
11823
|
});
|
|
10849
11824
|
// }
|
|
@@ -10989,20 +11964,20 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10989
11964
|
}
|
|
10990
11965
|
}
|
|
10991
11966
|
};
|
|
10992
|
-
this.
|
|
11967
|
+
this.fetchRCMResourceDetails = async (listEvent, mmddyyyy) => {
|
|
10993
11968
|
let entityId = listEvent.entityid;
|
|
10994
11969
|
let locationId = listEvent.locationid;
|
|
10995
|
-
let url = "https://" + this.
|
|
10996
|
-
console.log('fetch
|
|
11970
|
+
let url = "https://" + this.apiIdRCMResources + "/getallobjectdetails";
|
|
11971
|
+
console.log('fetch rcm resource details url', url);
|
|
10997
11972
|
let urlBody = { projectid: this.projectId, objectid: listEvent.id, entityid: entityId, locationid: locationId, userprofileid: this.userProfileId, role: this.myRole, year: this.calendarStartYYYY, mmddyyyy: mmddyyyy };
|
|
10998
|
-
console.log('fetch
|
|
11973
|
+
console.log('fetch rcm resource details urlbody', urlBody);
|
|
10999
11974
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
11000
11975
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
11001
11976
|
this._SfLoader.innerHTML = '';
|
|
11002
11977
|
if (xhr.status == 200) {
|
|
11003
11978
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
11004
11979
|
console.log('jsonRespose agreement details', jsonRespose);
|
|
11005
|
-
this.
|
|
11980
|
+
this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy);
|
|
11006
11981
|
}
|
|
11007
11982
|
else {
|
|
11008
11983
|
if (xhr.status == 401) {
|
|
@@ -11015,13 +11990,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11015
11990
|
}
|
|
11016
11991
|
}
|
|
11017
11992
|
};
|
|
11018
|
-
this.
|
|
11993
|
+
this.renewRCMResource = async (listEvent, reportformatvalues) => {
|
|
11019
11994
|
var _a;
|
|
11020
|
-
let url = "https://" + this.
|
|
11995
|
+
let url = "https://" + this.apiIdRCMResources + "/reopen";
|
|
11021
11996
|
console.log('renewing', reportformatvalues);
|
|
11022
11997
|
//console.log('fetch calendar url', url);
|
|
11023
11998
|
let urlBody = { projectid: this.projectId, objectid: listEvent.id, newvalues: reportformatvalues == "" ? null : JSON.parse(reportformatvalues), published: true, terminated: ((_a = JSON.parse(reportformatvalues).terminated) !== null && _a !== void 0 ? _a : false) };
|
|
11024
|
-
|
|
11999
|
+
console.log('reopen body', url, urlBody);
|
|
11025
12000
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
11026
12001
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
11027
12002
|
this._SfLoader.innerHTML = '';
|
|
@@ -11040,7 +12015,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11040
12015
|
}
|
|
11041
12016
|
}
|
|
11042
12017
|
};
|
|
11043
|
-
this.
|
|
12018
|
+
this.renderRCMResourceDetails = async (listEvent, mmddyyyy) => {
|
|
11044
12019
|
var _a, _b, _c, _f, _g, _h;
|
|
11045
12020
|
// await this.fetchAgreementDetails(listEvent, mmddyyyy);
|
|
11046
12021
|
// return;
|
|
@@ -11057,7 +12032,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11057
12032
|
html += `
|
|
11058
12033
|
<div part="compliance-detail-title" class="d-flex justify-between">
|
|
11059
12034
|
<button part="button-icon" class="material-icons invisible">close</button>
|
|
11060
|
-
<h3 part="results-title" class="m-0">
|
|
12035
|
+
<h3 part="results-title" class="m-0">RCM Resource Details</h3>
|
|
11061
12036
|
<button id="button-detail-close" part="button-icon" class="material-icons">close</button>
|
|
11062
12037
|
</div>
|
|
11063
12038
|
`;
|
|
@@ -11065,10 +12040,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11065
12040
|
<div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
|
|
11066
12041
|
</div>
|
|
11067
12042
|
`;
|
|
11068
|
-
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="
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
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>';
|
|
12044
|
+
if (this.mode != "viewer") {
|
|
12045
|
+
html += '<div part="reporting-view-container">';
|
|
12046
|
+
html += this.renderReporting(listEvent, mmddyyyy);
|
|
12047
|
+
html += "</div>";
|
|
12048
|
+
}
|
|
11072
12049
|
html += '<div class="d-flex justify-between m-20">';
|
|
11073
12050
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
11074
12051
|
html += '</div>';
|
|
@@ -11133,7 +12110,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11133
12110
|
reportingSchemaJson = listEvent.customreporting;
|
|
11134
12111
|
}
|
|
11135
12112
|
if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
|
|
11136
|
-
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="
|
|
12113
|
+
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-textarea-disabled:reporting-input-textarea-disabled, input-date:reporting-input-date, input-date-disabled:reporting-input-date-disabled, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-textarea-disabled:reporting-reporting-input-textarea-disabled, reporting-input-date:reporting-reporting-input-date, reporting-input-date-disabled:reporting-reporting-input-date-disabled, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="RCM Resource Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
|
|
11137
12114
|
let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
|
|
11138
12115
|
if (reportFormatContainer != null) {
|
|
11139
12116
|
reportFormatContainer.innerHTML = reportingHtml;
|
|
@@ -11239,9 +12216,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11239
12216
|
let flagBulk = false;
|
|
11240
12217
|
if (this.selectedItemIds.length <= 1) {
|
|
11241
12218
|
console.log('mmddyyyy', mmddyyyy);
|
|
11242
|
-
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")) {
|
|
11243
12220
|
if (approved) {
|
|
11244
|
-
await this.
|
|
12221
|
+
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
11245
12222
|
}
|
|
11246
12223
|
else {
|
|
11247
12224
|
console.log('renew reporting', reportformatvalues);
|
|
@@ -11284,7 +12261,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11284
12261
|
"userid": this.userProfileId,
|
|
11285
12262
|
"userrole": this.myRole,
|
|
11286
12263
|
"year": this.calendarStartYYYY,
|
|
11287
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
12264
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
|
|
11288
12265
|
});
|
|
11289
12266
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
11290
12267
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -11371,7 +12348,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11371
12348
|
else {
|
|
11372
12349
|
let flagBulk = false;
|
|
11373
12350
|
if (this.selectedItemIds.length <= 1) {
|
|
11374
|
-
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")) {
|
|
11375
12352
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
11376
12353
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
11377
12354
|
this.events[mmdd][p].approved = approved;
|
|
@@ -11409,7 +12386,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11409
12386
|
"userid": this.userProfileId,
|
|
11410
12387
|
"userrole": this.myRole,
|
|
11411
12388
|
"year": this.calendarStartYYYY,
|
|
11412
|
-
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "
|
|
12389
|
+
"module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
11413
12390
|
});
|
|
11414
12391
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
11415
12392
|
}
|
|
@@ -11567,7 +12544,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11567
12544
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
11568
12545
|
}
|
|
11569
12546
|
}
|
|
11570
|
-
await this.
|
|
12547
|
+
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
11571
12548
|
console.log('upload report auto approve single');
|
|
11572
12549
|
}
|
|
11573
12550
|
if (this.recentlyReported[mmdd] == null) {
|
|
@@ -11609,7 +12586,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11609
12586
|
// "userid": this.userProfileId,
|
|
11610
12587
|
// "userrole": this.myRole,
|
|
11611
12588
|
// "year": this.calendarStartYYYY,
|
|
11612
|
-
// "module": listEvent.module ?? "
|
|
12589
|
+
// "module": listEvent.module ?? "compliance"
|
|
11613
12590
|
// } )
|
|
11614
12591
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
11615
12592
|
// }else{
|
|
@@ -11631,7 +12608,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11631
12608
|
"userid": this.userProfileId,
|
|
11632
12609
|
"userrole": this.myRole,
|
|
11633
12610
|
"year": this.calendarStartYYYY,
|
|
11634
|
-
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "
|
|
12611
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
11635
12612
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
11636
12613
|
});
|
|
11637
12614
|
// }
|
|
@@ -12085,10 +13062,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12085
13062
|
html += '</div>';
|
|
12086
13063
|
html += '</div>';
|
|
12087
13064
|
html += '</div>';
|
|
12088
|
-
if (this.mode == "consumer" || this.mode == "next") {
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
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
|
+
}
|
|
12092
13071
|
html += '<div class="d-flex justify-between m-20">';
|
|
12093
13072
|
html += '<h3 part="results-title" class="m-0"><br />Comments</h3>';
|
|
12094
13073
|
html += '</div>';
|
|
@@ -12156,6 +13135,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12156
13135
|
// for(let attachmentUploader of attachmentUploaders){
|
|
12157
13136
|
// attachmentUploader.loadMode();
|
|
12158
13137
|
// }
|
|
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
|
+
}
|
|
12159
13143
|
(_b = this._SfDetailContainer.querySelector('.button-delete')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
12160
13144
|
await this.fetchDeleteReview(event["id"], mmddyyyy, entityId, locationId);
|
|
12161
13145
|
this.setSuccess('Deleted successfully!');
|
|
@@ -12180,7 +13164,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12180
13164
|
(_c = this._SfDetailContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
12181
13165
|
var _a, _b;
|
|
12182
13166
|
if (this.selectedItemIds.length <= 1) {
|
|
12183
|
-
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");
|
|
12184
13168
|
this.setSuccess('Auto-Approved successfully!');
|
|
12185
13169
|
setTimeout(() => {
|
|
12186
13170
|
this.clearMessages();
|
|
@@ -12209,7 +13193,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12209
13193
|
"userid": this.userProfileId,
|
|
12210
13194
|
"userrole": this.myRole,
|
|
12211
13195
|
"year": this.calendarStartYYYY,
|
|
12212
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13196
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
12213
13197
|
});
|
|
12214
13198
|
}
|
|
12215
13199
|
await this.uploadReviewsBulk(bulkBodyReview);
|
|
@@ -12392,7 +13376,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12392
13376
|
let flagBulk = false;
|
|
12393
13377
|
if (this.selectedItemIds.length <= 1) {
|
|
12394
13378
|
// console.log('mmddyyyy', mmddyyyy)
|
|
12395
|
-
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")) {
|
|
12396
13380
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
12397
13381
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
12398
13382
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
@@ -12428,7 +13412,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12428
13412
|
"userid": this.userProfileId,
|
|
12429
13413
|
"userrole": this.myRole,
|
|
12430
13414
|
"year": this.calendarStartYYYY,
|
|
12431
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13415
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
12432
13416
|
});
|
|
12433
13417
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
12434
13418
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -12515,7 +13499,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12515
13499
|
else {
|
|
12516
13500
|
let flagBulk = false;
|
|
12517
13501
|
if (this.selectedItemIds.length <= 1) {
|
|
12518
|
-
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")) {
|
|
12519
13503
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
12520
13504
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
12521
13505
|
this.events[mmdd][p].approved = approved;
|
|
@@ -12552,7 +13536,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12552
13536
|
"userid": this.userProfileId,
|
|
12553
13537
|
"userrole": this.myRole,
|
|
12554
13538
|
"year": this.calendarStartYYYY,
|
|
12555
|
-
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "
|
|
13539
|
+
"module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
|
|
12556
13540
|
});
|
|
12557
13541
|
// await this.uploadAudit(entityId, locationId, mmddyyyy, eventId, comments, approved);
|
|
12558
13542
|
}
|
|
@@ -12692,7 +13676,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12692
13676
|
//console.log('makerscheckers', makercheckers, reportercomments);
|
|
12693
13677
|
// console.log('reportformatvalues', reportformatvalues)
|
|
12694
13678
|
// console.log('reportformatschema',reportformatschema)
|
|
12695
|
-
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)) {
|
|
12696
13680
|
console.log('this.events', this.events);
|
|
12697
13681
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
12698
13682
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
@@ -12702,7 +13686,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12702
13686
|
}
|
|
12703
13687
|
}
|
|
12704
13688
|
if (makercheckers.length > 0) {
|
|
12705
|
-
// 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");
|
|
12706
13690
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
12707
13691
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
12708
13692
|
this.events[mmdd][p].approved = true;
|
|
@@ -12747,7 +13731,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12747
13731
|
// "userid": this.userProfileId,
|
|
12748
13732
|
// "userrole": this.myRole,
|
|
12749
13733
|
// "year": this.calendarStartYYYY,
|
|
12750
|
-
// "module": event.module ?? "
|
|
13734
|
+
// "module": event.module ?? "compliance"
|
|
12751
13735
|
// })
|
|
12752
13736
|
// await this.uploadReport(entityId, locationId, mmddyyyy, eventId, reportercomments, reporterdoc, docs, null)
|
|
12753
13737
|
// if(parseInt(makercheckersL) > 0) {
|
|
@@ -12770,7 +13754,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12770
13754
|
// "userid": this.userProfileId,
|
|
12771
13755
|
// "userrole": this.myRole,
|
|
12772
13756
|
// "year": this.calendarStartYYYY,
|
|
12773
|
-
// "module": event.module ?? "
|
|
13757
|
+
// "module": event.module ?? "compliance"
|
|
12774
13758
|
// } )
|
|
12775
13759
|
// // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
|
|
12776
13760
|
// }else{
|
|
@@ -12792,7 +13776,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
12792
13776
|
"userid": this.userProfileId,
|
|
12793
13777
|
"userrole": this.myRole,
|
|
12794
13778
|
"year": this.calendarStartYYYY,
|
|
12795
|
-
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "
|
|
13779
|
+
"module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
|
|
12796
13780
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
12797
13781
|
});
|
|
12798
13782
|
// }
|
|
@@ -16425,6 +17409,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16425
17409
|
else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
16426
17410
|
await this.fetchAndRenderLicenses(this.sdate, this.edate, "", "no");
|
|
16427
17411
|
}
|
|
17412
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
17413
|
+
await this.fetchAndRenderRCMResources(this.sdate, this.edate, "", "no");
|
|
17414
|
+
}
|
|
16428
17415
|
// await this.fetchAndYearlyRenderUserCalendar_2(this.sdate, this.edate, "", "no");
|
|
16429
17416
|
}
|
|
16430
17417
|
const radioCsv = container.querySelector('#radio-csv');
|
|
@@ -17967,27 +18954,29 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17967
18954
|
// }
|
|
17968
18955
|
}
|
|
17969
18956
|
};
|
|
17970
|
-
this.processGraphFilter = (clickedValue) => {
|
|
18957
|
+
this.processGraphFilter = (clickedValue, detailsListContainer) => {
|
|
17971
18958
|
var _a;
|
|
17972
|
-
let eventContainer =
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
|
|
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
|
+
}
|
|
17991
18980
|
}
|
|
17992
18981
|
if (eventContainer == null)
|
|
17993
18982
|
return;
|
|
@@ -18027,7 +19016,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18027
19016
|
value: clickedValue
|
|
18028
19017
|
};
|
|
18029
19018
|
streamEventFilters.style.display = 'block';
|
|
18030
|
-
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>';
|
|
18031
19020
|
(_a = streamEventFilters.querySelector('#button-filter-cancel')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', () => {
|
|
18032
19021
|
this.graphFilter = "";
|
|
18033
19022
|
this.clearSelectedGraphParam();
|
|
@@ -18338,7 +19327,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18338
19327
|
var html = '';
|
|
18339
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>';
|
|
18340
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>';
|
|
18341
|
-
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) {
|
|
18342
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>';
|
|
18343
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>';
|
|
18344
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>';
|
|
@@ -19241,7 +20230,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19241
20230
|
}, 10000);
|
|
19242
20231
|
}
|
|
19243
20232
|
};
|
|
19244
|
-
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "
|
|
20233
|
+
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "compliance") => {
|
|
19245
20234
|
let url = "https://" + this.apiId + "/uploadaudit1";
|
|
19246
20235
|
const body = {
|
|
19247
20236
|
"mmddyyyy": mmddyyyy,
|
|
@@ -19306,7 +20295,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19306
20295
|
this.setError(jsonRespose.error);
|
|
19307
20296
|
}
|
|
19308
20297
|
};
|
|
19309
|
-
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "
|
|
20298
|
+
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "compliance") => {
|
|
19310
20299
|
let url = "https://" + this.apiId + "/uploadreview1";
|
|
19311
20300
|
const body = {
|
|
19312
20301
|
"mmddyyyy": mmddyyyy,
|
|
@@ -19401,7 +20390,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19401
20390
|
}, 3000);
|
|
19402
20391
|
}
|
|
19403
20392
|
};
|
|
19404
|
-
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) => {
|
|
19405
20394
|
let url = "https://" + this.apiId + "/uploadreport1";
|
|
19406
20395
|
let body = {
|
|
19407
20396
|
"mmddyyyy": mmddyyyy,
|
|
@@ -19524,7 +20513,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19524
20513
|
};
|
|
19525
20514
|
this.uploadEvents = async () => {
|
|
19526
20515
|
let url = "https://" + this.apiId + "/synccalendar";
|
|
19527
|
-
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) };
|
|
19528
20517
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
19529
20518
|
const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
|
|
19530
20519
|
this._SfLoader.innerHTML = '';
|
|
@@ -20619,6 +21608,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20619
21608
|
else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
20620
21609
|
this.fetchAndRenderLicenses(startDate, endDate, searchString, list, month, year);
|
|
20621
21610
|
}
|
|
21611
|
+
else if (this.selectedFeatures.indexOf('rcmresources') >= 0) {
|
|
21612
|
+
this.fetchAndRenderRCMResources(startDate, endDate, searchString, list, month, year);
|
|
21613
|
+
}
|
|
20622
21614
|
};
|
|
20623
21615
|
this.fetchAndYearlyRenderUserCalendar_2 = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
20624
21616
|
let path = "", view = "";
|
|
@@ -20668,7 +21660,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20668
21660
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
20669
21661
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
20670
21662
|
this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
|
|
20671
|
-
console.log('rendering appropriate string', list);
|
|
21663
|
+
console.log('rendering appropriate string', list, this.selectedTab);
|
|
20672
21664
|
this.renderAppropriateStream(startDate, endDate, true);
|
|
20673
21665
|
this.fetchBulkReportingData();
|
|
20674
21666
|
}
|
|
@@ -20726,6 +21718,54 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20726
21718
|
}
|
|
20727
21719
|
}
|
|
20728
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
|
+
};
|
|
20729
21769
|
this.fetchAndRenderNotices = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
20730
21770
|
var _a;
|
|
20731
21771
|
let path = "", view = "";
|
|
@@ -20933,6 +21973,70 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20933
21973
|
}
|
|
20934
21974
|
}
|
|
20935
21975
|
};
|
|
21976
|
+
this.fetchAndRenderRCMResources = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
21977
|
+
let path = "", view = "";
|
|
21978
|
+
this.sdate = startDate;
|
|
21979
|
+
this.edate = endDate;
|
|
21980
|
+
if (this.tagId != null && this.tagId != "") {
|
|
21981
|
+
view = "tag";
|
|
21982
|
+
}
|
|
21983
|
+
else if (this.countryId != null && this.countryId != "") {
|
|
21984
|
+
view = "country";
|
|
21985
|
+
}
|
|
21986
|
+
else if (this.locationId != null && this.locationId != "") {
|
|
21987
|
+
view = "location";
|
|
21988
|
+
}
|
|
21989
|
+
else {
|
|
21990
|
+
view = "entity";
|
|
21991
|
+
}
|
|
21992
|
+
path = "getallcountryobjects";
|
|
21993
|
+
let sDate = "";
|
|
21994
|
+
let eDate = "";
|
|
21995
|
+
//console.log('currenttab', this.getCurrentTab());
|
|
21996
|
+
if (this.getCurrentTab() == this.TAB_YEAR) {
|
|
21997
|
+
sDate = "03/31/" + this.calendarStartYYYY;
|
|
21998
|
+
eDate = "04/01/" + (parseInt(this.calendarStartYYYY) + 1);
|
|
21999
|
+
}
|
|
22000
|
+
else {
|
|
22001
|
+
sDate = startDate;
|
|
22002
|
+
eDate = endDate;
|
|
22003
|
+
}
|
|
22004
|
+
let url = "https://" + this.apiIdRCMResources + "/" + path;
|
|
22005
|
+
//console.log('fetch calendar url', url);
|
|
22006
|
+
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": this.entityId, "countryid": this.countryId, "functionid": this.functionId, "locationid": this.locationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": view, "year": year, "list": list, "month": month };
|
|
22007
|
+
if (searchString.length > 0) {
|
|
22008
|
+
urlBody["searchstring"] = searchString;
|
|
22009
|
+
}
|
|
22010
|
+
//console.log('urlbody', urlBody);
|
|
22011
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22012
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
22013
|
+
this._SfLoader.innerHTML = '';
|
|
22014
|
+
if (xhr.status == 200) {
|
|
22015
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22016
|
+
console.log('jsonRespose', jsonRespose);
|
|
22017
|
+
let rcmresources = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
|
|
22018
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
22019
|
+
this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
|
|
22020
|
+
this.events = rcmresources;
|
|
22021
|
+
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
22022
|
+
console.log('rcmresources', rcmresources);
|
|
22023
|
+
}
|
|
22024
|
+
else {
|
|
22025
|
+
if (xhr.status == 401) {
|
|
22026
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22027
|
+
this.dispatchEvent(changeEvent);
|
|
22028
|
+
}
|
|
22029
|
+
if (xhr.status === 404) {
|
|
22030
|
+
this.showChosenProject();
|
|
22031
|
+
this._SfTitleChosenProject.innerHTML = this._SfProject[0].querySelector('#sf-i-project').selectedTexts()[0];
|
|
22032
|
+
this.renderChosenProject();
|
|
22033
|
+
}
|
|
22034
|
+
else {
|
|
22035
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22036
|
+
this.setError(jsonRespose.error);
|
|
22037
|
+
}
|
|
22038
|
+
}
|
|
22039
|
+
};
|
|
20936
22040
|
this.fetchStatistics = async (startDate = "", endDate = "", filtercriteria, filterid, subfiltercriteria, subfilterid) => {
|
|
20937
22041
|
var _a;
|
|
20938
22042
|
let path = "";
|
|
@@ -20963,6 +22067,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20963
22067
|
else if (this.selectedFeatures.indexOf('licenses') >= 0) {
|
|
20964
22068
|
url = "https://" + this.apiIdLicenses + "/" + path;
|
|
20965
22069
|
}
|
|
22070
|
+
else if (this.selectedFeatures.indexOf('rcmresource') >= 0) {
|
|
22071
|
+
url = "https://" + this.apiIdRCMResources + "/" + path;
|
|
22072
|
+
}
|
|
20966
22073
|
//console.log('fetch calendar url', url);
|
|
20967
22074
|
let urlBody = { "projectid": this.projectId, "userid": this.userProfileId, "role": this.myRole, "sdate": sDate, "edate": eDate, "filtercriteria": filtercriteria, "subfiltercriteria": subfiltercriteria, "subfilterid": subfilterid };
|
|
20968
22075
|
if (filtercriteria == 'function') {
|
|
@@ -22363,6 +23470,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22363
23470
|
else if (this.mode == "reports") {
|
|
22364
23471
|
this.fetchReports();
|
|
22365
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
|
+
}
|
|
22366
23479
|
else {
|
|
22367
23480
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
22368
23481
|
this.enableCalendar();
|
|
@@ -22743,7 +23856,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22743
23856
|
</div>
|
|
22744
23857
|
<div class="rb"></div>
|
|
22745
23858
|
</div>
|
|
22746
|
-
<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">
|
|
22747
23861
|
</div>
|
|
22748
23862
|
<div class="d-flex justify-between">
|
|
22749
23863
|
<div class="lb"></div>
|
|
@@ -22930,7 +24044,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22930
24044
|
</div>
|
|
22931
24045
|
<div id="report-summary-container" class="hide" part="report-summary-container">
|
|
22932
24046
|
</div>
|
|
22933
|
-
<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">
|
|
22934
24049
|
</div>
|
|
22935
24050
|
<div class="d-flex justify-between">
|
|
22936
24051
|
<div class="lb"></div>
|
|
@@ -23012,6 +24127,9 @@ SfIEvents.styles = css `
|
|
|
23012
24127
|
#detail-container {
|
|
23013
24128
|
z-index: 101;
|
|
23014
24129
|
}
|
|
24130
|
+
#detail-list-container {
|
|
24131
|
+
z-index: 100;
|
|
24132
|
+
}
|
|
23015
24133
|
|
|
23016
24134
|
.plain-filter-icon {
|
|
23017
24135
|
cursor: pointer;
|
|
@@ -23057,6 +24175,7 @@ SfIEvents.styles = css `
|
|
|
23057
24175
|
opacity: 0.4;
|
|
23058
24176
|
}
|
|
23059
24177
|
|
|
24178
|
+
.detail-list-container,
|
|
23060
24179
|
.detail-container,
|
|
23061
24180
|
.report-summary-container {
|
|
23062
24181
|
width: 60%;
|
|
@@ -24109,6 +25228,9 @@ __decorate([
|
|
|
24109
25228
|
__decorate([
|
|
24110
25229
|
property()
|
|
24111
25230
|
], SfIEvents.prototype, "apiIdLicenses", void 0);
|
|
25231
|
+
__decorate([
|
|
25232
|
+
property()
|
|
25233
|
+
], SfIEvents.prototype, "apiIdRCMResources", void 0);
|
|
24112
25234
|
__decorate([
|
|
24113
25235
|
property()
|
|
24114
25236
|
], SfIEvents.prototype, "apiMethodList", void 0);
|
|
@@ -24472,6 +25594,12 @@ __decorate([
|
|
|
24472
25594
|
__decorate([
|
|
24473
25595
|
property()
|
|
24474
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);
|
|
24475
25603
|
__decorate([
|
|
24476
25604
|
property()
|
|
24477
25605
|
], SfIEvents.prototype, "selectallblock", void 0);
|
|
@@ -24559,6 +25687,9 @@ __decorate([
|
|
|
24559
25687
|
__decorate([
|
|
24560
25688
|
query('#detail-container')
|
|
24561
25689
|
], SfIEvents.prototype, "_SfDetailContainer", void 0);
|
|
25690
|
+
__decorate([
|
|
25691
|
+
query('#detail-list-container')
|
|
25692
|
+
], SfIEvents.prototype, "_SfDetailListContainer", void 0);
|
|
24562
25693
|
__decorate([
|
|
24563
25694
|
query('#report-summary-container')
|
|
24564
25695
|
], SfIEvents.prototype, "_SfReportSummaryContainer", void 0);
|