sf-i-events 1.0.867 → 1.0.869
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/index.html +4 -4
- package/package.json +3 -3
- package/sf-i-events.d.ts +1 -1
- package/sf-i-events.js +194 -62
- package/src/sf-i-events.ts +179 -52
- package/src/util.ts +9 -1
- package/util.d.ts +4 -0
- package/util.js +9 -1
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"], "
|
|
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"] };
|
|
854
854
|
this.chartSelectedLegend = [];
|
|
855
855
|
this.selectedFilters = null;
|
|
856
856
|
this.barCharDataSet2 = [];
|
|
@@ -2086,7 +2086,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2086
2086
|
}
|
|
2087
2087
|
};
|
|
2088
2088
|
this.getTimelinessStatus = (mmdd, event, completeness) => {
|
|
2089
|
-
// if(event.module == "
|
|
2089
|
+
// if(event.module == "contract"){
|
|
2090
2090
|
// if (completeness == "not-started") {
|
|
2091
2091
|
// if (this.getPastDueDate(mmdd)) {
|
|
2092
2092
|
// return "past-due-date";
|
|
@@ -2134,7 +2134,11 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2134
2134
|
}
|
|
2135
2135
|
};
|
|
2136
2136
|
this.getComplianceStatus = (completeness, timeliness, percentage, event = {}) => {
|
|
2137
|
-
if (event.module == "
|
|
2137
|
+
if (event.module == "contract") {
|
|
2138
|
+
console.log('compliance status', event.terminated);
|
|
2139
|
+
if (event.terminated) {
|
|
2140
|
+
return "terminated";
|
|
2141
|
+
}
|
|
2138
2142
|
if (completeness == "not-started") {
|
|
2139
2143
|
if (timeliness == "in-time") {
|
|
2140
2144
|
if (this.getAboutToExpire(event)) {
|
|
@@ -2397,7 +2401,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2397
2401
|
html += '<div part="badge-dashboard" id="chip-timeliness-2" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-reported">report_off</span> <span>Late Reported:</span> <span id="graph-late-reported">DASHBOARD_LATE_REPORTED</span></div>';
|
|
2398
2402
|
html += '<div part="badge-dashboard" id="chip-timeliness-3" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-approved">remove_done</span> <span>Late Approved:</span> <span id="graph-late-approved">DASHBOARD_LATE_APPROVED</span></div>';
|
|
2399
2403
|
html += '<div part="badge-dashboard" id="chip-timeliness-4" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-executed">running_with_errors</span> <span>Late Executed:</span> <span id="graph-late-executed">DASHBOARD_LATE_EXECUTED</span></div>';
|
|
2400
|
-
if (this.selectedFeatures.indexOf("
|
|
2404
|
+
if (this.selectedFeatures.indexOf("contracts") >= 0) {
|
|
2401
2405
|
html += '<div part="badge-dashboard" id="chip-compliance-0" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-scheduled">schedule</span> <span>Active:</span> <span id="graph-active">DASHBOARD_ACTIVE</span></div>';
|
|
2402
2406
|
html += '<div part="badge-dashboard" id="chip-compliance-1" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-not-complied">disabled_by_default</span> <span>About To Expire:</span> <span id="graph-about-to-expire">DASHBOARD_ABOUT_TO_EXPIRE</span></div>';
|
|
2403
2407
|
html += '<div part="badge-dashboard" id="chip-compliance-2" class="chip stat-compliance justify-center align-center mr-10 mb-10 no-shrink compliance-statuses"><span class="material-icons color-partially-complied">rule</span> <span>Expired:</span> <span id="graph-expired">DASHBOARD_EXPIRED</span></div>';
|
|
@@ -2515,7 +2519,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2515
2519
|
return html;
|
|
2516
2520
|
};
|
|
2517
2521
|
this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus) => {
|
|
2518
|
-
var _a, _b;
|
|
2522
|
+
var _a, _b, _c, _f;
|
|
2519
2523
|
var html = '';
|
|
2520
2524
|
var remarks = "";
|
|
2521
2525
|
var occurrenceDate = "";
|
|
@@ -2543,10 +2547,64 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2543
2547
|
html += '<div class="stream-events-container flex-grow" part="' + bgStatus + '">';
|
|
2544
2548
|
html += '<div class="hidden-tags hide">' + JSON.stringify(event['tags']) + '</div>';
|
|
2545
2549
|
html += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
2546
|
-
html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((
|
|
2550
|
+
// html += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">' + '<input id="button-select-' + mmdd.replace('/', '-') + '-' + itemNumber + '-' + (((event.makercheckers != null && (event.makercheckers).length > 0)) ? '1' : '0') + '-' + (((event.docs != null && (event.docs).length > 0)) ? '1' : '0') + '-' + event.entityid.replace(/-/g, '_') + '-' + event.locationid.replace(/-/g, '_') + '-' + event.id.replace(/-/g, '_') + '-' + event.duedate.split('/')[1] + '-' + event.duedate.split('/')[0] + '-' + event.duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '-' + ((event.module ?? false) ? event.module : 'compliance') + '-' + ((event.isbulk == null || event.isbulk == false) ? "" : "bulk") + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? "reportformat" : "") + '" class="button-select mr-10 ' + (((event.reportformat != null && event.reportformat.length > 0) || (event.isbulk != null && event.isbulk == true) || (event.customreporting != null)) ? 'hide' : '') + '" type="checkbox"/>' + (event.isbulk != null && event.isbulk == true ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : '') + '<sf-i-elastic-text class="stream-event-title' + (event.isbulk == null || event.isbulk == false ? ' button-event-title' : '') + '" id="stream-event-title-' + mmdd.replace(/\//g, '-') + '-' + itemNumber + '-' + ((event.module ?? false) ? event.module : 'compliance') + '" text="' + event['obligationtitle'] + '" minLength="' + (event.reporters != null ? "100" : "60") + '"></sf-i-elastic-text>' + event.reporters != null ? ('') : ('<div part="stream-event-location" class="stream-event-location ml-5">' + event.locationname.replace(/ *\([^)]*\) */g, "") + '</div><div part="stream-event-risk-' + event.risk[0].toLowerCase().replace(/ /g, '-') + '" class="stream-event-risk ml-5">' + event.risk[0] + '</div>') + (((event.reportformat != null && event.reportformat.length > 0) || (event.customreporting != null)) ? '' : ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + itemNumber + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>')) + ((event.reporters != null && lastUpdated.length > 0) ? (' <div part="event-last-updated-time" class="d-flex align-center">' + lastUpdated + '</div>') : "") + '</div>';
|
|
2551
|
+
const isBulk = event.isbulk === true;
|
|
2552
|
+
const hasReportFormat = ((_a = event.reportformat) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
2553
|
+
const hasCustomReporting = event.customreporting != null;
|
|
2554
|
+
const hasMakerCheckers = ((_b = event.makercheckers) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
2555
|
+
const hasDocs = ((_c = event.docs) === null || _c === void 0 ? void 0 : _c.length) > 0;
|
|
2556
|
+
const moduleType = (_f = event.module) !== null && _f !== void 0 ? _f : 'compliance';
|
|
2557
|
+
const partStatusSanitized = partStatus.replace(/-/g, '_');
|
|
2558
|
+
const entityIdSanitized = event.entityid.replace(/-/g, '_');
|
|
2559
|
+
const locationIdSanitized = event.locationid.replace(/-/g, '_');
|
|
2560
|
+
const eventIdSanitized = event.id.replace(/-/g, '_');
|
|
2561
|
+
const mmddSanitized = mmdd.replace(/\//g, '-');
|
|
2562
|
+
const dueDateParts = event.duedate.split('/');
|
|
2563
|
+
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting);
|
|
2564
|
+
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
2565
|
+
const showLocationRisk = event.reporters == null;
|
|
2566
|
+
const showLastUpdated = event.reporters != null && lastUpdated.length > 0;
|
|
2567
|
+
html += `
|
|
2568
|
+
<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5">
|
|
2569
|
+
<input
|
|
2570
|
+
id="button-select-${mmddSanitized}-${itemNumber}-${hasMakerCheckers ? '1' : '0'}-${hasDocs ? '1' : '0'}-${entityIdSanitized}-${locationIdSanitized}-${eventIdSanitized}-${dueDateParts[1]}-${dueDateParts[0]}-${dueDateParts[2]}-${partStatusSanitized}-${moduleType}-${isBulk ? 'bulk' : ''}${(hasReportFormat || isBulk || hasCustomReporting) ? 'reportformat' : ''}"
|
|
2571
|
+
class="button-select mr-10 ${showCheckbox ? '' : 'hide'}"
|
|
2572
|
+
type="checkbox"
|
|
2573
|
+
/>
|
|
2574
|
+
${isBulk ? '<div class="lds-dual-ring1 bulk-loader mr-10"></div>' : ''}
|
|
2575
|
+
<sf-i-elastic-text
|
|
2576
|
+
class="stream-event-title${!isBulk ? ' button-event-title' : ''}"
|
|
2577
|
+
id="stream-event-title-${mmddSanitized}-${itemNumber}-${moduleType}"
|
|
2578
|
+
text="${event.obligationtitle}"
|
|
2579
|
+
minLength="${event.reporters != null ? '100' : '60'}">
|
|
2580
|
+
</sf-i-elastic-text>
|
|
2581
|
+
${showLocationRisk ? `
|
|
2582
|
+
<div part="stream-event-location" class="stream-event-location ml-5">
|
|
2583
|
+
${event.locationname.replace(/ *\([^)]*\) */g, "")}
|
|
2584
|
+
</div>
|
|
2585
|
+
<div part="stream-event-risk-${event.risk[0].toLowerCase().replace(/ /g, '-')}" class="stream-event-risk ml-5">
|
|
2586
|
+
${event.risk[0]}
|
|
2587
|
+
</div>
|
|
2588
|
+
` : ''}
|
|
2589
|
+
${showReportingButton ? `
|
|
2590
|
+
<button
|
|
2591
|
+
id="button-list-reporting-${mmddSanitized}-${itemNumber}"
|
|
2592
|
+
part="button-list-reporting"
|
|
2593
|
+
class="material-icons ml-10 button-list-reporting">
|
|
2594
|
+
edit_note
|
|
2595
|
+
</button>
|
|
2596
|
+
` : ''}
|
|
2597
|
+
${showLastUpdated ? `
|
|
2598
|
+
<div part="event-last-updated-time" class="d-flex align-center">
|
|
2599
|
+
${lastUpdated}
|
|
2600
|
+
</div>
|
|
2601
|
+
` : ''}
|
|
2602
|
+
</div>
|
|
2603
|
+
`;
|
|
2547
2604
|
if (event.reporters != null && remarks.length > 0) {
|
|
2548
2605
|
html += '<div part="stream-events-event-subtitle" class="stream-events-event-subtitle">' + remarks + ', occurred on ' + occurrenceDate + '</div>';
|
|
2549
2606
|
}
|
|
2607
|
+
console.log('returning divstarthtml', html);
|
|
2550
2608
|
return html;
|
|
2551
2609
|
};
|
|
2552
2610
|
this.renderCalendarRowDivItemDivEnd = () => {
|
|
@@ -2918,7 +2976,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2918
2976
|
active = active + (complianceStatus == "active" ? 1 : 0);
|
|
2919
2977
|
aboutToExpire = aboutToExpire + (complianceStatus == "about-to-expire" ? 1 : 0);
|
|
2920
2978
|
expired = expired + (complianceStatus == "expired" ? 1 : 0);
|
|
2921
|
-
terminated = terminated + (complianceStatus == "
|
|
2979
|
+
terminated = terminated + (complianceStatus == "terminated" ? 1 : 0);
|
|
2922
2980
|
this.events[mmdd][j][this.FLOW_GRAPH_COMPLETENESS] = partStatus;
|
|
2923
2981
|
this.events[mmdd][j][this.FLOW_GRAPH_TIMELINESS] = lateStatus;
|
|
2924
2982
|
this.events[mmdd][j][this.FLOW_GRAPH_COMPLIANCE] = complianceStatus;
|
|
@@ -3053,7 +3111,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3053
3111
|
html = html.replace("DASHBOARD_ABOUT_TO_EXPIRE", aboutToExpire + "");
|
|
3054
3112
|
html = html.replace("DASHBOARD_EXPIRED", expired + "");
|
|
3055
3113
|
html = html.replace("DASHBOARD_TERMINATED", terminated + "");
|
|
3056
|
-
if (this.selectedFeatures.indexOf("
|
|
3114
|
+
if (this.selectedFeatures.indexOf("contracts") >= 0) {
|
|
3057
3115
|
this.csvDataStats = 'Period,Total,Not Started,Approved,Pending Approval,Rejected,Past Due Date,Late Reported,Late Executed,Late Approved,Active,About To Expire,Expired,Terminated\n';
|
|
3058
3116
|
this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + active + "," + aboutToExpire + "," + expired + "," + terminated;
|
|
3059
3117
|
}
|
|
@@ -3065,7 +3123,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3065
3123
|
this.htmlDataStats += '<tr><td class="w-14 text-center td-odd">' + total + '</td><td class="w-14 text-center td-odd">' + notStarted + '</td><td class="w-14 text-center td-odd">' + approved + '</td><td class="w-14 text-center td-odd">' + pendingApproval + '</td><td class="w-14 text-center td-odd">' + rejected + '</td></table>';
|
|
3066
3124
|
this.htmlDataStats += '<br /><br />Timeliness<br /><br /><table class="mt-20 w-100"><tr><th class="w-14">Total</th><th class="w-14">In Time</th><th class="w-14">Past Due Date</th><th class="w-14">Late Reported</th><th class="w-14">Late Executed</th><th class="w-14">Late Approved</th><tr>';
|
|
3067
3125
|
this.htmlDataStats += '<tr><td class="w-14 text-center td-odd">' + total + '</td><td class="w-14 text-center td-odd">' + (total - (pastDueDate + lateApproved + lateExecuted)) + '</td><td class="w-14 text-center td-odd">' + pastDueDate + '</td><td class="w-14 text-center td-odd">' + lateReported + '</td><td class="w-14 text-center td-odd">' + lateExecuted + '</td><td class="w-14 text-center td-odd">' + lateApproved + '</td><tr></table>';
|
|
3068
|
-
if (this.selectedFeatures.indexOf("
|
|
3126
|
+
if (this.selectedFeatures.indexOf("contracts") >= 0) {
|
|
3069
3127
|
this.htmlDataStats += '<br /><br />Compliance<br /><br /><table class="w-100"><tr><th class="w-14">Total</th><th class="w-14">Active</th><th class="w-14">About To Expire</th><th class="w-14">Expired</th><th class="w-14">Terminated</th><tr>';
|
|
3070
3128
|
this.htmlDataStats += '<tr><td class="w-14 text-center td-odd">' + total + '</td><td class="w-14 text-center td-odd">' + active + '</td><td class="w-14 text-center td-odd">' + aboutToExpire + '</td><td class="w-14 text-center td-odd">' + expired + '</td><td class="w-14 text-center td-odd">' + terminated + '</td><tr></table>';
|
|
3071
3129
|
}
|
|
@@ -3311,7 +3369,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3311
3369
|
html += '<button class="invisible" part="button">Save</button>';
|
|
3312
3370
|
html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>';
|
|
3313
3371
|
html += '</div>';
|
|
3314
|
-
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != '
|
|
3372
|
+
if (this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0 && event.module != 'contract') {
|
|
3315
3373
|
html += '<div class="m-20">';
|
|
3316
3374
|
html += '<label part="input-label">Supporting Documents</label>';
|
|
3317
3375
|
html += '<slot name="uploader"></slot>';
|
|
@@ -3321,7 +3379,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3321
3379
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3322
3380
|
html += '<label part="input-label">Approver Comments*</label>';
|
|
3323
3381
|
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
3324
|
-
if (event.module != '
|
|
3382
|
+
if (event.module != 'contract') {
|
|
3325
3383
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3326
3384
|
html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
|
|
3327
3385
|
html += '<label part="input-label">Percentage</label>';
|
|
@@ -3334,10 +3392,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3334
3392
|
html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
|
|
3335
3393
|
html += '</div>';
|
|
3336
3394
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
3337
|
-
html += '<div id="report-format-container"><div class="box"></div></div>';
|
|
3395
|
+
html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>';
|
|
3338
3396
|
}
|
|
3339
3397
|
else if (event['customreporting'] != null && event['customreporting'].length > 0) {
|
|
3340
|
-
html += '<div id="report-format-container"><div class="box"></div></div>';
|
|
3398
|
+
html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>';
|
|
3341
3399
|
}
|
|
3342
3400
|
html += '</div>';
|
|
3343
3401
|
html += '</div>';
|
|
@@ -3370,7 +3428,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3370
3428
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3371
3429
|
html += '<label part="input-label">Reporter Comments*</label>';
|
|
3372
3430
|
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
3373
|
-
if (event.module != '
|
|
3431
|
+
if (event.module != 'contract') {
|
|
3374
3432
|
html += '<label part="input-label">Date of Completion*</label>';
|
|
3375
3433
|
html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
|
|
3376
3434
|
html += '<label part="input-label">Completion Percentage*</label>';
|
|
@@ -3393,10 +3451,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3393
3451
|
// }
|
|
3394
3452
|
html += '<br />';
|
|
3395
3453
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
3396
|
-
html += '<div id="report-format-container"><div class="box"></div></div>';
|
|
3454
|
+
html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>';
|
|
3397
3455
|
}
|
|
3398
3456
|
else if (event['customreporting'] != null && event['customreporting'].length > 0) {
|
|
3399
|
-
html += '<div id="report-format-container"><div class="box"></div></div>';
|
|
3457
|
+
html += '<div id="report-format-container" part="report-format-container"><div class="box"></div></div>';
|
|
3400
3458
|
}
|
|
3401
3459
|
html += '<br />';
|
|
3402
3460
|
if (makercheckers.length > 0) {
|
|
@@ -3421,7 +3479,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3421
3479
|
html += '<div class="d-flex m-20 flex-col">';
|
|
3422
3480
|
html += '<label part="input-label">Auditor Comments</label>';
|
|
3423
3481
|
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
3424
|
-
if (event.module != '
|
|
3482
|
+
if (event.module != 'contract') {
|
|
3425
3483
|
html += '<label part="input-label">Date of Completion</label>';
|
|
3426
3484
|
html += '<input id="input-auditor-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '" readonly/><br />';
|
|
3427
3485
|
html += '<label part="input-label">Percentage</label>';
|
|
@@ -3595,7 +3653,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3595
3653
|
let newStatus = this.getCompletenessStatus(newEvent);
|
|
3596
3654
|
if (currStatus == newStatus) {
|
|
3597
3655
|
buttonClick.innerHTML = "Save";
|
|
3598
|
-
this.setError('Already Approved!');
|
|
3656
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
3599
3657
|
setTimeout(() => {
|
|
3600
3658
|
this.clearMessages();
|
|
3601
3659
|
}, 3000);
|
|
@@ -4211,6 +4269,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4211
4269
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4212
4270
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4213
4271
|
filterSubmitButton.addEventListener('click', () => {
|
|
4272
|
+
Util.setFeatures(this.selectedFeatures);
|
|
4214
4273
|
this.enableCustom();
|
|
4215
4274
|
this.renderTabs(this.selectedTab);
|
|
4216
4275
|
// this.processDateSelection(eventsContainer);
|
|
@@ -4305,7 +4364,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4305
4364
|
if (module === "notice") {
|
|
4306
4365
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4307
4366
|
}
|
|
4308
|
-
else if (module === "
|
|
4367
|
+
else if (module === "contract") {
|
|
4309
4368
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4310
4369
|
}
|
|
4311
4370
|
else {
|
|
@@ -4338,7 +4397,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4338
4397
|
if (module === "notice") {
|
|
4339
4398
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4340
4399
|
}
|
|
4341
|
-
else if (module === "
|
|
4400
|
+
else if (module === "contract") {
|
|
4342
4401
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
4343
4402
|
}
|
|
4344
4403
|
else {
|
|
@@ -4891,6 +4950,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4891
4950
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
4892
4951
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
4893
4952
|
filterSubmitButton.addEventListener('click', () => {
|
|
4953
|
+
Util.setFeatures(this.selectedFeatures);
|
|
4894
4954
|
this.renderTabs(this.selectedTab);
|
|
4895
4955
|
this.processDateSelectionViewer(eventsContainer);
|
|
4896
4956
|
});
|
|
@@ -7265,7 +7325,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7265
7325
|
this._SfCustomContainer.querySelector('#stream-end-date-mobile').value = endDate;
|
|
7266
7326
|
this.processDateSelection(this._SfCustomContainer);
|
|
7267
7327
|
});
|
|
7268
|
-
if (this.selectedFeatures.indexOf('
|
|
7328
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
7269
7329
|
this._SfCustomContainer.querySelector('#button-this-year').click();
|
|
7270
7330
|
}
|
|
7271
7331
|
// for(var i = 0; i < 3; i++) {
|
|
@@ -7560,6 +7620,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7560
7620
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
7561
7621
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
7562
7622
|
filterSubmitButton.addEventListener('click', async () => {
|
|
7623
|
+
Util.setFeatures(this.selectedFeatures);
|
|
7563
7624
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
7564
7625
|
console.log('dateresult', dateResult, index);
|
|
7565
7626
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
@@ -7759,7 +7820,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7759
7820
|
if (module === "notice") {
|
|
7760
7821
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7761
7822
|
}
|
|
7762
|
-
else if (module === "
|
|
7823
|
+
else if (module === "contract") {
|
|
7763
7824
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7764
7825
|
}
|
|
7765
7826
|
else {
|
|
@@ -7791,7 +7852,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7791
7852
|
if (module === "notice") {
|
|
7792
7853
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7793
7854
|
}
|
|
7794
|
-
else if (module === "
|
|
7855
|
+
else if (module === "contract") {
|
|
7795
7856
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
7796
7857
|
}
|
|
7797
7858
|
else {
|
|
@@ -8029,13 +8090,14 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8029
8090
|
filterButton.innerHTML = (filterList.style.display != 'block' ? 'category' : 'close');
|
|
8030
8091
|
const filterSubmitButton = filterList.querySelector('#button-submit-features');
|
|
8031
8092
|
filterSubmitButton.addEventListener('click', async () => {
|
|
8093
|
+
Util.setFeatures(this.selectedFeatures);
|
|
8032
8094
|
const dateResult = this.calculateStartAndEndDateOfStream(index);
|
|
8033
8095
|
const monthResult = this.calculateMonthFromIndex(index);
|
|
8034
8096
|
console.log('monthResult', monthResult);
|
|
8035
8097
|
console.log('dateresult', dateResult, index);
|
|
8036
8098
|
console.log('selectedfeatures', this.selectedFeatures);
|
|
8037
8099
|
this.currentColumnIndex = index + "";
|
|
8038
|
-
if (this.selectedFeatures.indexOf('
|
|
8100
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
8039
8101
|
this.flowGraph = this.FLOW_GRAPH_COMPLETENESS;
|
|
8040
8102
|
this.enableCustom();
|
|
8041
8103
|
this.renderTabs(this.TAB_CUSTOM);
|
|
@@ -8264,7 +8326,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8264
8326
|
if (module === "notice") {
|
|
8265
8327
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8266
8328
|
}
|
|
8267
|
-
else if (module === "
|
|
8329
|
+
else if (module === "contract") {
|
|
8268
8330
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8269
8331
|
}
|
|
8270
8332
|
else {
|
|
@@ -8299,7 +8361,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8299
8361
|
if (module === "notice") {
|
|
8300
8362
|
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8301
8363
|
}
|
|
8302
|
-
else if (module === "
|
|
8364
|
+
else if (module === "contract") {
|
|
8303
8365
|
this.fetchAgreementDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
8304
8366
|
}
|
|
8305
8367
|
else {
|
|
@@ -8739,10 +8801,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8739
8801
|
this.csvCompletenessStats = "";
|
|
8740
8802
|
this.csvTimelinessStats = "";
|
|
8741
8803
|
this.csvComplianceStats = "";
|
|
8742
|
-
console.log('
|
|
8804
|
+
console.log('contracts');
|
|
8743
8805
|
let data = null;
|
|
8744
8806
|
let ctx = null;
|
|
8745
|
-
if (this.selectedFeatures.indexOf('
|
|
8807
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
8746
8808
|
var dataTotal = divContainer.querySelector('#graph-total').innerHTML;
|
|
8747
8809
|
var dataActive = divContainer.querySelector('#graph-active').innerHTML;
|
|
8748
8810
|
var dataAboutToExpire = divContainer.querySelector('#graph-about-to-expire').innerHTML;
|
|
@@ -9312,7 +9374,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9312
9374
|
<div class="box-large" id="shimmer-container-notices" part="shimmer-container-notices">
|
|
9313
9375
|
</div>
|
|
9314
9376
|
`;
|
|
9315
|
-
html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:repoortiinig-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:repoortiinig-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" name="Notice Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdNotices + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
|
|
9377
|
+
html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:repoortiinig-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:repoortiinig-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" name="Notice Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdNotices + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
|
|
9316
9378
|
html += '<div part="reporting-view-container">';
|
|
9317
9379
|
html += this.renderReporting(listEvent, mmddyyyy);
|
|
9318
9380
|
html += "</div>";
|
|
@@ -9448,9 +9510,14 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9448
9510
|
buttonClick.innerHTML = "Saving...";
|
|
9449
9511
|
const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
|
|
9450
9512
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
9451
|
-
|
|
9513
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
9514
|
+
let newEvent = { ...listEvent };
|
|
9515
|
+
newEvent.comments = comments;
|
|
9516
|
+
newEvent.approved = approved;
|
|
9517
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
9518
|
+
if (currStatus == newStatus) {
|
|
9452
9519
|
buttonClick.innerHTML = "Save";
|
|
9453
|
-
this.setError('Already Approved!');
|
|
9520
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
9454
9521
|
setTimeout(() => {
|
|
9455
9522
|
this.clearMessages();
|
|
9456
9523
|
}, 3000);
|
|
@@ -9567,9 +9634,14 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9567
9634
|
buttonClick.innerHTML = "Saving...";
|
|
9568
9635
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
9569
9636
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
9570
|
-
|
|
9637
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
9638
|
+
let newEvent = { ...listEvent };
|
|
9639
|
+
newEvent.comments = comments;
|
|
9640
|
+
newEvent.approved = approved;
|
|
9641
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
9642
|
+
if (currStatus == newStatus) {
|
|
9571
9643
|
buttonClick.innerHTML = "Save";
|
|
9572
|
-
this.setError('Already Approved!');
|
|
9644
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
9573
9645
|
setTimeout(() => {
|
|
9574
9646
|
this.clearMessages();
|
|
9575
9647
|
}, 3000);
|
|
@@ -10022,6 +10094,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10022
10094
|
console.log('renewing', reportformatvalues);
|
|
10023
10095
|
//console.log('fetch calendar url', url);
|
|
10024
10096
|
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) };
|
|
10097
|
+
// console.log('reopen body', url, urlBody)
|
|
10025
10098
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
10026
10099
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
10027
10100
|
this._SfLoader.innerHTML = '';
|
|
@@ -10065,7 +10138,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10065
10138
|
<div class="box-large" id="shimmer-container-agreements" part="shimmer-container-agreements">
|
|
10066
10139
|
</div>
|
|
10067
10140
|
`;
|
|
10068
|
-
html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" name="Contract Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdAgreements + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
|
|
10141
|
+
html += '<sf-i-reporting id="detail-reporting" class="hide" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" name="Contract Details" apiiduploader="1peg5170d3" apiid="' + this.apiIdAgreements + '" mode="admin" flow="details" projectid="' + this.projectId + '" projectname="' + this.projectName + '" editdisable="true" formviewclass="flex-wrap"></sf-i-reporting>';
|
|
10069
10142
|
html += '<div part="reporting-view-container">';
|
|
10070
10143
|
html += this.renderReporting(listEvent, mmddyyyy);
|
|
10071
10144
|
html += "</div>";
|
|
@@ -10132,7 +10205,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10132
10205
|
reportingSchemaJson = listEvent.customreporting;
|
|
10133
10206
|
}
|
|
10134
10207
|
if (listEvent.customreporting != null || listEvent.reportformatschema != null) {
|
|
10135
|
-
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container" mode="edit" flow="reporting" name="Contract Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
|
|
10208
|
+
let reportingHtml = '<sf-i-reporting id="reporting-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head, reporting-uploader-extracted-text:reporting-reporting-uploader-extracted-text, reporting-uploader-sf-upload-message:reporting-reporting-uploader-sf-upload-message, reporting-uploader-sf-upload-submessage:reporting-reporting-uploader-sf-upload-submessage, reporting-uploader-extracted-text-chip:reporting-reporting-uploader-extracted-text-chip, reporting-uploader-extracted-text-chip-failed:reporting-reporting-uploader-extracted-text-chip-failed, reporting-uploader-doctype-verify-badge:reporting-reporting-uploader-doctype-verify-badge, reporting-span-submit-published:reporting-reporting-span-submit-published, reporting-span-submit-unpublished:reporting-reporting-span-submit-unpublished, reporting-reporting-container:reporting-reporting-reporting-container, reporting-button-icon:reporting-reporting-button-icon, reporting-uploader-button-icon:reporting-reporting-uploader-button-icon, reporting-sf-i-form-modal-container:reporting-reporting-sf-i-form-modal-container, reporting-next-calendar-date:reporting-reporting-next-calendar-date, reporting-last-calendar-date:reporting-reporting-last-calendar-date, reporting-input-publish-checkbox:reporting-reporting-input-publish-checkbox, reporting-button-icon-light:reporting-reporting-button-icon-light, reporting-button-icon-small:reporting-reporting-button-icon-small, reporting-uploader-input-label:reporting-reporting-uploader-input-label, reporting-input-radio:reporting-reporting-input-radio, reporting-radio-label:reporting-reporting-radio-label, reporting-input-textarea:reporting-reporting-input-textarea, reporting-input-date:reporting-reporting-input-date, reporting-input-select-single:reporting-reporting-input-select-single, reporting-textarea-container:reporting-reporting-textarea-container, reporting-section-body:reporting-reporting-section-body, reporting-section-container:reporting-reporting-section-container, reporting-date-container:reporting-reporting-date-container, reporting-input-sf-i-uploader:reporting-reporting-input-sf-i-uploader, reporting-published-container:reporting-reporting-published-container, reporting-selected-option:reporting-reporting-selected-option, reporting-input-select-multi-option:reporting-reporting-input-select-multi-option, reporting-select-option-label:reporting-reporting-select-option-label, reporting-input-sf-i-form:reporting-reporting-input-sf-i-form, reporting-input-sf-i-bricks:reporting-reporting-input-sf-i-bricks, reporting-uploader-input:reporting-reporting-uploader-input, reporting-form-container:reporting-reporting-form-container, reporting-published-container:reporting-reporting-published-container, reporting-form-container-published:reporting-reporting-form-container-published, reporting-subsection:reporting-reporting-subsection, reporting-results-title:reporting-reporting-results-title, reporting-td-head:reporting-reporting-td-head, reporting-td-action:reporting-reporting-td-action, reporting-td-body:reporting-reporting-td-body, reporting-td-body-2:reporting-reporting-td-body-2, reporting-add-button:reporting-reporting-add-button, reporting-uploader-button:reporting-reporting-uploader-button, reporting-section-head-collapsed:reporting-reporting-section-head-collapsed, reporting-section-title-expanded:reporting-reporting-section-title-expanded, reporting-section-title-collapsed:reporting-reporting-section-title-collapsed, reporting-section-head-expanded:reporting-reporting-section-head-expanded, reporting-progress-bar-finished:reporting-reporting-progress-bar-finished, reporting-progress-bar-complete:reporting-reporting-progress-bar-complete, reporting-progress-bar-incomplete:reporting-reporting-progress-bar-incomplete, reporting-section-success-icon:reporting-reporting-section-success-icon, reporting-section-body:reporting-reporting-section-body, reporting-title-section:reporting-reporting-title-section, reporting-button-lg:reporting-reporting-button-lg, reporting-uploader-detail-container:reporting-reporting-uploader-detail-container, reporting-textarea-label:reporting-reporting-textarea-label, reporting-date-label:reporting-reporting-date-label, reporting-commentbox:reporting-reporting-commentbox, reporting-comment-username:reporting-reporting-comment-username, reporting-detail-head:reporting-reporting-detail-head, input-sf-i-select:reporting-input-sf-i-select,reporting-input-sf-i-select:reporting-reporting-input-sf-i-select, select-input-select:reporting-select-input-select, checklist-container:reporting-checklist-container, checklist-title:reporting-checklist-title, checklist-list:reporting-checklist-list, checklist-item:reporting-checklist-item, checklist-checkbox:reporting-checklist-checkbox, checklist-checkbox-label:reporting-checklist-checkbox-label, reporting-checklist-container:reporting-reporting-checklist-container, reporting-checklist-title:reporting-reporting-checklist-title, reporting-checklist-list:reporting-reporting-checklist-list, reporting-checklist-item:reporting-reporting-checklist-item, reporting-checklist-checkbox:reporting-reporting-checklist-checkbox, reporting-checklist-checkbox-label:reporting-reporting-checklist-checkbox-label, checklist-add-input:reporting-checklist-add-input, checklist-add-button:reporting-checklist-add-button, terminate-container:reporting-terminate-container, terminate-container-terminated:reporting-terminate-container-terminated, terminate-container-active:reporting-terminate-container-active, input-terminate-checkbox: reporting-input-terminate-checkbox, reporting-terminate-container:reporting-reporting-terminate-container, reporting-terminate-container-terminated:reporting-reporting-terminate-container-terminated, reporting-terminate-container-active:reporting-reporting-terminate-container-active, reporting-input-terminate-checkbox: reporting-reporting-input-terminate-checkbox, uploader-container:reporting-uploader-container, reporting-uploader-container:reporting-reporting-uploader-container, not-selected:reporting-not-selected, reporting-not-selected:reportinig-reporting-not-selected" mode="edit" flow="reporting" name="Contract Reporting" formviewclass="flex-wrap" showterminate="true" projectid="' + this.projectId + '"></sf-i-reporting>';
|
|
10136
10209
|
let reportFormatContainer = this._SfDetailContainer.querySelector('#report-format-container');
|
|
10137
10210
|
if (reportFormatContainer != null) {
|
|
10138
10211
|
reportFormatContainer.innerHTML = reportingHtml;
|
|
@@ -10204,14 +10277,19 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10204
10277
|
});
|
|
10205
10278
|
if (this.mode == "consumer" || this.mode == "next") {
|
|
10206
10279
|
(_f = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async (ev) => {
|
|
10207
|
-
var _a, _b, _c, _f;
|
|
10280
|
+
var _a, _b, _c, _f, _g;
|
|
10208
10281
|
let buttonClick = ev.target;
|
|
10209
10282
|
buttonClick.innerHTML = "Saving...";
|
|
10210
10283
|
const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
|
|
10211
10284
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
10212
|
-
|
|
10285
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
10286
|
+
let newEvent = { ...listEvent };
|
|
10287
|
+
newEvent.comments = comments;
|
|
10288
|
+
newEvent.approved = approved;
|
|
10289
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
10290
|
+
if (currStatus == newStatus) {
|
|
10213
10291
|
buttonClick.innerHTML = "Save";
|
|
10214
|
-
this.setError('Already Approved!');
|
|
10292
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
10215
10293
|
setTimeout(() => {
|
|
10216
10294
|
this.clearMessages();
|
|
10217
10295
|
}, 3000);
|
|
@@ -10243,6 +10321,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10243
10321
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10244
10322
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10245
10323
|
this.events[mmdd][p].approved = approved;
|
|
10324
|
+
this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
|
|
10246
10325
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
|
|
10247
10326
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
10248
10327
|
}
|
|
@@ -10277,7 +10356,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10277
10356
|
"userid": this.userProfileId,
|
|
10278
10357
|
"userrole": this.myRole,
|
|
10279
10358
|
"year": this.calendarStartYYYY,
|
|
10280
|
-
"module": (
|
|
10359
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "events"
|
|
10281
10360
|
});
|
|
10282
10361
|
// await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
|
|
10283
10362
|
// this.setSuccess("Updating " + (k + 1) + "/" + this.selectedItemIds.length + ", please wait...");
|
|
@@ -10328,7 +10407,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10328
10407
|
"bubbles": true,
|
|
10329
10408
|
"cancelable": false
|
|
10330
10409
|
});
|
|
10331
|
-
(
|
|
10410
|
+
(_g = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _g === void 0 ? void 0 : _g.dispatchEvent(clickEvent);
|
|
10332
10411
|
// if(currentColumnButton != null) {
|
|
10333
10412
|
// currentColumnButton.click();
|
|
10334
10413
|
// }
|
|
@@ -10341,7 +10420,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10341
10420
|
buttonClick.innerHTML = "Saving...";
|
|
10342
10421
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
10343
10422
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
10344
|
-
|
|
10423
|
+
let currStatus = this.getCompletenessStatus(listEvent);
|
|
10424
|
+
let newEvent = { ...listEvent };
|
|
10425
|
+
newEvent.comments = comments;
|
|
10426
|
+
newEvent.approved = approved;
|
|
10427
|
+
let newStatus = this.getCompletenessStatus(newEvent);
|
|
10428
|
+
if (currStatus == newStatus) {
|
|
10345
10429
|
buttonClick.innerHTML = "Save";
|
|
10346
10430
|
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
10347
10431
|
setTimeout(() => {
|
|
@@ -10462,7 +10546,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10462
10546
|
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
10463
10547
|
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
10464
10548
|
(_h = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
|
|
10465
|
-
var _a, _b, _c;
|
|
10549
|
+
var _a, _b, _c, _f;
|
|
10466
10550
|
let buttonClick = ev.target;
|
|
10467
10551
|
buttonClick.innerHTML = "Saving...";
|
|
10468
10552
|
const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
|
|
@@ -10549,6 +10633,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10549
10633
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
10550
10634
|
if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
|
|
10551
10635
|
this.events[mmdd][p].approved = true;
|
|
10636
|
+
this.events[mmdd][p].terminated = (_c = (JSON.parse(reportformatvalues).terminated)) !== null && _c !== void 0 ? _c : false;
|
|
10552
10637
|
// this.events[mmdd][p].documents = docs
|
|
10553
10638
|
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
10554
10639
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
@@ -10618,7 +10703,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10618
10703
|
"userid": this.userProfileId,
|
|
10619
10704
|
"userrole": this.myRole,
|
|
10620
10705
|
"year": this.calendarStartYYYY,
|
|
10621
|
-
"module": (
|
|
10706
|
+
"module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "events",
|
|
10622
10707
|
"makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
|
|
10623
10708
|
});
|
|
10624
10709
|
// }
|
|
@@ -11354,7 +11439,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11354
11439
|
let newStatus = this.getCompletenessStatus(newEvent);
|
|
11355
11440
|
if (currStatus == newStatus) {
|
|
11356
11441
|
buttonClick.innerHTML = "Save";
|
|
11357
|
-
this.setError('Already Approved!');
|
|
11442
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
11358
11443
|
setTimeout(() => {
|
|
11359
11444
|
this.clearMessages();
|
|
11360
11445
|
}, 3000);
|
|
@@ -11477,7 +11562,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
11477
11562
|
console.log('status', currStatus, newStatus);
|
|
11478
11563
|
if (currStatus == newStatus) {
|
|
11479
11564
|
buttonClick.innerHTML = "Save";
|
|
11480
|
-
this.setError('Already Approved!');
|
|
11565
|
+
this.setError(approved ? 'Already Approved!' : 'Already Rejected!');
|
|
11481
11566
|
setTimeout(() => {
|
|
11482
11567
|
this.clearMessages();
|
|
11483
11568
|
}, 3000);
|
|
@@ -15088,39 +15173,64 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15088
15173
|
html += '<button class="tab-button" id="consumer-tab-viewer" part="' + (this.myRole == this.TAB_VIEWER ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Viewer</button>';
|
|
15089
15174
|
this._SfRoleTabContainer.innerHTML = html;
|
|
15090
15175
|
(_a = this._SfRoleTabContainer.querySelector('#consumer-tab-reporter')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', async () => {
|
|
15091
|
-
var _a;
|
|
15176
|
+
var _a, _b;
|
|
15092
15177
|
this.myRole = this.TAB_REPORTER;
|
|
15093
15178
|
this.renderRoleTabs();
|
|
15094
15179
|
// this.proceedToCalendar();
|
|
15095
|
-
(
|
|
15180
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
15181
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15182
|
+
}
|
|
15183
|
+
else {
|
|
15184
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15185
|
+
}
|
|
15096
15186
|
});
|
|
15097
15187
|
(_b = this._SfRoleTabContainer.querySelector('#consumer-tab-approver')) === null || _b === void 0 ? void 0 : _b.addEventListener('click', async () => {
|
|
15098
|
-
var _a;
|
|
15188
|
+
var _a, _b;
|
|
15099
15189
|
this.myRole = this.TAB_APPROVER;
|
|
15100
15190
|
this.renderRoleTabs();
|
|
15101
15191
|
// this.proceedToCalendar();
|
|
15102
|
-
(
|
|
15192
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
15193
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15194
|
+
}
|
|
15195
|
+
else {
|
|
15196
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15197
|
+
}
|
|
15103
15198
|
});
|
|
15104
15199
|
(_c = this._SfRoleTabContainer.querySelector('#consumer-tab-functionhead')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
15105
|
-
var _a;
|
|
15200
|
+
var _a, _b;
|
|
15106
15201
|
this.myRole = this.TAB_FUNCTION_HEAD;
|
|
15107
15202
|
this.renderRoleTabs();
|
|
15108
15203
|
// this.proceedToCalendar();
|
|
15109
|
-
(
|
|
15204
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
15205
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15206
|
+
}
|
|
15207
|
+
else {
|
|
15208
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15209
|
+
}
|
|
15110
15210
|
});
|
|
15111
15211
|
(_f = this._SfRoleTabContainer.querySelector('#consumer-tab-auditor')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
15112
|
-
var _a;
|
|
15212
|
+
var _a, _b;
|
|
15113
15213
|
this.myRole = this.TAB_AUDITOR;
|
|
15114
15214
|
this.renderRoleTabs();
|
|
15115
15215
|
// this.proceedToCalendar();
|
|
15116
|
-
(
|
|
15216
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
15217
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15218
|
+
}
|
|
15219
|
+
else {
|
|
15220
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15221
|
+
}
|
|
15117
15222
|
});
|
|
15118
15223
|
(_g = this._SfRoleTabContainer.querySelector('#consumer-tab-viewer')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
|
|
15119
|
-
var _a;
|
|
15224
|
+
var _a, _b;
|
|
15120
15225
|
this.myRole = this.TAB_VIEWER;
|
|
15121
15226
|
this.renderRoleTabs();
|
|
15122
15227
|
// this.proceedToCalendar();
|
|
15123
|
-
(
|
|
15228
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
15229
|
+
(_a = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _a === void 0 ? void 0 : _a.click();
|
|
15230
|
+
}
|
|
15231
|
+
else {
|
|
15232
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _b === void 0 ? void 0 : _b.click();
|
|
15233
|
+
}
|
|
15124
15234
|
});
|
|
15125
15235
|
};
|
|
15126
15236
|
this.csvmaker = (data) => {
|
|
@@ -17246,7 +17356,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17246
17356
|
var html = '';
|
|
17247
17357
|
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>';
|
|
17248
17358
|
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>';
|
|
17249
|
-
if (this.selectedFeatures.indexOf('
|
|
17359
|
+
if (this.selectedFeatures.indexOf('contracts') < 0) {
|
|
17250
17360
|
html += '<button class="tab-button mb-10" id="calendar-tab-register" part="' + (selectedTab == this.TAB_REGISTERS ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Registers</button>';
|
|
17251
17361
|
html += '<button class="tab-button tab-button-secondary mb-10 ' + (selectedTab == this.TAB_FIND ? '' : 'hide') + '" id="calendar-tab-find" part="' + (selectedTab == this.TAB_FIND ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Search</button>';
|
|
17252
17362
|
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>';
|
|
@@ -19506,6 +19616,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19506
19616
|
}
|
|
19507
19617
|
};
|
|
19508
19618
|
this.renderWithFeatures = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
|
|
19619
|
+
this.selectedFeatures = Util.getFeatures();
|
|
19620
|
+
for (let feature of this.selectedFeatures) {
|
|
19621
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
19622
|
+
this.selectedFeatures = ['compliances'];
|
|
19623
|
+
break;
|
|
19624
|
+
}
|
|
19625
|
+
}
|
|
19509
19626
|
this.events = [];
|
|
19510
19627
|
console.log('rendering and fetching', startDate, endDate, searchString, list, month);
|
|
19511
19628
|
if (this.selectedFeatures.indexOf('compliances') >= 0) {
|
|
@@ -19514,7 +19631,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19514
19631
|
else if (this.selectedFeatures.indexOf('notices') >= 0) {
|
|
19515
19632
|
this.fetchAndRenderNotices(startDate, endDate, searchString, list, month, year);
|
|
19516
19633
|
}
|
|
19517
|
-
else if (this.selectedFeatures.indexOf('
|
|
19634
|
+
else if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
19518
19635
|
this.fetchAndRenderAgreements(startDate, endDate, searchString, list, month, year);
|
|
19519
19636
|
}
|
|
19520
19637
|
};
|
|
@@ -19744,7 +19861,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19744
19861
|
}
|
|
19745
19862
|
this.events = tempEvents;
|
|
19746
19863
|
this.renderAppropriateStream(this.sdate, this.edate, true);
|
|
19747
|
-
console.log('
|
|
19864
|
+
console.log('contracts', agreements, tempEvents);
|
|
19748
19865
|
}
|
|
19749
19866
|
else {
|
|
19750
19867
|
if (xhr.status == 401) {
|
|
@@ -19786,7 +19903,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19786
19903
|
else if (this.selectedFeatures.indexOf('notices') >= 0) {
|
|
19787
19904
|
url = "https://" + this.apiIdNotices + "/" + path;
|
|
19788
19905
|
}
|
|
19789
|
-
else if (this.selectedFeatures.indexOf('
|
|
19906
|
+
else if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
19790
19907
|
url = "https://" + this.apiIdAgreements + "/" + path;
|
|
19791
19908
|
}
|
|
19792
19909
|
//console.log('fetch calendar url', url);
|
|
@@ -21156,7 +21273,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21156
21273
|
}
|
|
21157
21274
|
};
|
|
21158
21275
|
this.loadMode = async () => {
|
|
21159
|
-
var _a, _b;
|
|
21276
|
+
var _a, _b, _c;
|
|
21160
21277
|
Chart.register(...registerables);
|
|
21161
21278
|
//Chart.register(Colors);
|
|
21162
21279
|
if (this.mode == "rcmnotifications") {
|
|
@@ -21210,8 +21327,23 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
21210
21327
|
}
|
|
21211
21328
|
else {
|
|
21212
21329
|
//console.log('stream received rendering year', this.stream);
|
|
21213
|
-
this.
|
|
21214
|
-
(
|
|
21330
|
+
this.selectedFeatures = Util.getFeatures();
|
|
21331
|
+
for (let feature of this.selectedFeatures) {
|
|
21332
|
+
if (this.getFeatures().indexOf(feature) < 0) {
|
|
21333
|
+
this.selectedFeatures = ['compliances'];
|
|
21334
|
+
break;
|
|
21335
|
+
}
|
|
21336
|
+
}
|
|
21337
|
+
if (this.selectedFeatures.indexOf('contracts') >= 0) {
|
|
21338
|
+
this.renderTabs(this.TAB_CUSTOM);
|
|
21339
|
+
(_b = this._SfTabContainer.querySelector('#calendar-tab-custom')) === null || _b === void 0 ? void 0 : _b.click();
|
|
21340
|
+
}
|
|
21341
|
+
else {
|
|
21342
|
+
this.renderTabs(this.TAB_STREAM);
|
|
21343
|
+
(_c = this._SfTabContainer.querySelector('#calendar-tab-month')) === null || _c === void 0 ? void 0 : _c.click();
|
|
21344
|
+
}
|
|
21345
|
+
// this.renderTabs(this.TAB_STREAM);
|
|
21346
|
+
// ((this._SfTabContainer as HTMLDivElement).querySelector('#calendar-tab-month') as HTMLButtonElement)?.click();
|
|
21215
21347
|
}
|
|
21216
21348
|
//await this.fetchUserCalendar_2();
|
|
21217
21349
|
// if(this.events != null && !this.foundCalendarInLocal()) {
|