sf-i-events 1.0.969 → 1.0.970
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 +31 -2
- package/package.json +1 -1
- package/sf-i-events.d.ts +1 -1
- package/sf-i-events.js +74 -7
- package/src/sf-i-events.ts +81 -8
package/dev/index.html
CHANGED
|
@@ -1231,11 +1231,40 @@
|
|
|
1231
1231
|
</div>
|
|
1232
1232
|
|
|
1233
1233
|
</sf-i-events> -->
|
|
1234
|
-
<sf-i-events name="Calendar" apiid="
|
|
1234
|
+
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api" mode="consumer"
|
|
1235
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1236
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1237
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1238
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1239
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1240
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1241
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="solid"
|
|
1242
|
+
username="Madhura Zende Internal" userprofileid="8d3edbb1-8318-4525-978a-ecc4c5a8e713"
|
|
1243
|
+
projectid="d7d4d17e-3e20-4eaa-a06a-fb1c87f26532" projectname="FlaggGRC Global"
|
|
1244
|
+
countryid="c48d7cc1-62df-41b3-807a-5744973db3d9" selectedcriteria="Country - India" myrole="approver"
|
|
1245
|
+
showregisterexport="false" features="["rcmresources"]"
|
|
1246
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1247
|
+
eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]"
|
|
1248
|
+
eventpreviewfields="["obligation"]"
|
|
1249
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1250
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
1251
|
+
|
|
1252
|
+
<div slot="uploader">
|
|
1253
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1254
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1255
|
+
extract="yes" projectid="d7d4d17e-3e20-4eaa-a06a-fb1c87f26532" maxsize="31457280"
|
|
1256
|
+
allowdownload="yes"></sf-i-uploader>
|
|
1257
|
+
</div>
|
|
1258
|
+
<div slot="reporting">
|
|
1259
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1260
|
+
</div>
|
|
1261
|
+
|
|
1262
|
+
</sf-i-events>
|
|
1263
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiIdUserProfiles="dnytrdlrmxgsy.cloudfront.net/userprofile" mode="reports" fill="pattern"
|
|
1235
1264
|
username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410"
|
|
1236
1265
|
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" calendarstartyyyy="2025"
|
|
1237
1266
|
myrole="reporter">
|
|
1238
|
-
</sf-i-events>
|
|
1267
|
+
</sf-i-events> -->
|
|
1239
1268
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" mode="reports" fill="pattern"
|
|
1240
1269
|
username="Pushti Goenka" userprofileid="8ac7f984-a9e2-46ef-a815-c5116f3e4638"
|
|
1241
1270
|
projectid="7f928276-a9ff-4bcd-a8db-874f618a92ea" projectname="Transvolt" calendarstartyyyy="2025" myrole="reporter">
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -646,7 +646,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
646
646
|
fetchLicenseDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
647
647
|
renewLicense: (listEvent: any, reportformatvalues: any) => Promise<void>;
|
|
648
648
|
renderLicenseDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
649
|
-
fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<
|
|
649
|
+
fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string, flagReturn?: boolean) => Promise<any>;
|
|
650
650
|
renewRCMResource: (listEvent: any, reportformatvalues: any) => Promise<void>;
|
|
651
651
|
renderRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
652
652
|
fetchEventDetails: (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId?: string, nextId?: string, flagUploadGuidance?: boolean, listEventContainer?: HTMLDivElement | null, reportercomments?: string | null, approvercomments?: string | null, inputReportingPercentage?: string | null, selectReportedLocation?: string | null, documents?: any | null, dateOfCompletion?: string | null, fromDrilldown?: boolean) => Promise<void>;
|
package/sf-i-events.js
CHANGED
|
@@ -2985,6 +2985,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2985
2985
|
};
|
|
2986
2986
|
this.renderCalendarAnnotations = (event, mmdd, j, fromDrilldown) => {
|
|
2987
2987
|
var html = '';
|
|
2988
|
+
console.log('rendering Annotations', event.module, event.completenessstatus);
|
|
2988
2989
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>';
|
|
2989
2990
|
// if(event.concise == null && event.approvers != null){
|
|
2990
2991
|
let reporterStr = event.concise == null ? this.getReporterStringFromEvent(event) : "";
|
|
@@ -2993,7 +2994,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2993
2994
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
2994
2995
|
const configHome = Util.getProjectConfigHome();
|
|
2995
2996
|
const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0;
|
|
2996
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span> Mark Understood</button>')) : '') + '</div>';
|
|
2997
|
+
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span> Mark Understood</button>')) : '') + ((event.module == "rcmresource" && event.completenessstatus == "approved") ? '<button id="button-renew-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="d-flex align-center mb-20 ml-10 button-icon button-renew"><span class="material-symbols-outlined" title="Renew">replay</span> Renew</button>' : '') + '</div>';
|
|
2997
2998
|
// }
|
|
2998
2999
|
return html;
|
|
2999
3000
|
};
|
|
@@ -3098,6 +3099,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3098
3099
|
// const tempEvents1 = JSON.parse(JSON.stringify(this.events));
|
|
3099
3100
|
// //console.log('eventlog1', tempEvents1['06/30'][7].comments, mmdd, j);
|
|
3100
3101
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
3102
|
+
this.events[mmdd][j].completenessstatus = partStatus;
|
|
3101
3103
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(this.events[mmdd][j])), partStatus);
|
|
3102
3104
|
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage, JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
3103
3105
|
console.log("agreement partStatus", partStatus, lateStatus, complianceStatus);
|
|
@@ -5270,6 +5272,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
5270
5272
|
}
|
|
5271
5273
|
});
|
|
5272
5274
|
}
|
|
5275
|
+
const buttonRenewArr = eventsContainer.querySelectorAll('.button-renew');
|
|
5276
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
5277
|
+
buttonRenewArr[i].addEventListener('click', async (ev) => {
|
|
5278
|
+
const id = ev.target.id;
|
|
5279
|
+
const idArr = id.split("-");
|
|
5280
|
+
console.log('idArr', idArr);
|
|
5281
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
5282
|
+
const j = idArr[4];
|
|
5283
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
5284
|
+
let renewEvent = this.events[mmdd][j];
|
|
5285
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
5286
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
5287
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
5288
|
+
});
|
|
5289
|
+
}
|
|
5273
5290
|
const streamEventsContainer = eventsContainer.querySelectorAll('.stream-events-container');
|
|
5274
5291
|
const buttonSelect = eventsContainer.querySelectorAll('.button-select');
|
|
5275
5292
|
if (eventsContainer.innerHTML.indexOf('button-select-all') >= 0) {
|
|
@@ -9249,6 +9266,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9249
9266
|
}
|
|
9250
9267
|
});
|
|
9251
9268
|
}
|
|
9269
|
+
const buttonRenewArr = this._SfThisContainer.querySelectorAll('.button-renew');
|
|
9270
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
9271
|
+
buttonRenewArr[i].addEventListener('click', async (ev) => {
|
|
9272
|
+
const id = ev.target.id;
|
|
9273
|
+
const idArr = id.split("-");
|
|
9274
|
+
console.log('idArr', idArr);
|
|
9275
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
9276
|
+
const j = idArr[4];
|
|
9277
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
9278
|
+
let renewEvent = this.events[mmdd][j];
|
|
9279
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
9280
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
9281
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
9282
|
+
});
|
|
9283
|
+
}
|
|
9252
9284
|
const streamEventsContainer = this._SfThisContainer.querySelectorAll('.stream-events-container');
|
|
9253
9285
|
const buttonSelect = this._SfThisContainer.querySelectorAll('.button-select');
|
|
9254
9286
|
let selectAllArr = this.attachSelectAllListeners(this._SfThisContainer, buttonSelect);
|
|
@@ -9879,6 +9911,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9879
9911
|
}
|
|
9880
9912
|
});
|
|
9881
9913
|
}
|
|
9914
|
+
const buttonRenewArr = this._SfStreamContainer.querySelectorAll('.button-renew');
|
|
9915
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
9916
|
+
buttonRenewArr[i].addEventListener('click', async (ev) => {
|
|
9917
|
+
const id = ev.target.id;
|
|
9918
|
+
const idArr = id.split("-");
|
|
9919
|
+
console.log('idArr', idArr);
|
|
9920
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
9921
|
+
const j = idArr[4];
|
|
9922
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
9923
|
+
let renewEvent = this.events[mmdd][j];
|
|
9924
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
9925
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
9926
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
9927
|
+
});
|
|
9928
|
+
}
|
|
9882
9929
|
const streamEventsContainer = this._SfStreamContainer.querySelectorAll('.stream-events-container');
|
|
9883
9930
|
const buttonSelect = this._SfStreamContainer.querySelectorAll('.button-select');
|
|
9884
9931
|
let selectAllArr = this.attachSelectAllListeners(this._SfStreamContainer, buttonSelect);
|
|
@@ -10945,6 +10992,21 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10945
10992
|
}
|
|
10946
10993
|
});
|
|
10947
10994
|
}
|
|
10995
|
+
const buttonRenewArr = this._SfDetailListContainer.querySelectorAll('.button-renew');
|
|
10996
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
10997
|
+
buttonRenewArr[i].addEventListener('click', async (ev) => {
|
|
10998
|
+
const id = ev.target.id;
|
|
10999
|
+
const idArr = id.split("-");
|
|
11000
|
+
console.log('idArr', idArr);
|
|
11001
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
11002
|
+
const j = idArr[4];
|
|
11003
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
11004
|
+
let renewEvent = this.events[mmdd][j];
|
|
11005
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
11006
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
11007
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
11008
|
+
});
|
|
11009
|
+
}
|
|
10948
11010
|
};
|
|
10949
11011
|
this.renderEventDetailShort = (compliance) => {
|
|
10950
11012
|
var _a, _b, _c, _f, _g;
|
|
@@ -13456,7 +13518,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13456
13518
|
}
|
|
13457
13519
|
}
|
|
13458
13520
|
};
|
|
13459
|
-
this.fetchRCMResourceDetails = async (listEvent, mmddyyyy) => {
|
|
13521
|
+
this.fetchRCMResourceDetails = async (listEvent, mmddyyyy, flagReturn = false) => {
|
|
13460
13522
|
let entityId = listEvent.entityid;
|
|
13461
13523
|
let locationId = listEvent.locationid;
|
|
13462
13524
|
let url = "https://" + this.apiIdRCMResources + "/getallobjectdetails";
|
|
@@ -13469,7 +13531,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13469
13531
|
if (xhr.status == 200) {
|
|
13470
13532
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
13471
13533
|
console.log('jsonRespose agreement details', jsonRespose);
|
|
13472
|
-
|
|
13534
|
+
if (flagReturn) {
|
|
13535
|
+
return jsonRespose.object;
|
|
13536
|
+
}
|
|
13537
|
+
else {
|
|
13538
|
+
this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy);
|
|
13539
|
+
}
|
|
13473
13540
|
}
|
|
13474
13541
|
else {
|
|
13475
13542
|
if (xhr.status == 401) {
|
|
@@ -13704,12 +13771,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13704
13771
|
return;
|
|
13705
13772
|
}
|
|
13706
13773
|
let reportformatvalues = {};
|
|
13707
|
-
let reportformatvaluesStr = ""
|
|
13774
|
+
// let reportformatvaluesStr: string = ""
|
|
13708
13775
|
let reportingReporting = this._SfDetailContainer.querySelector('#reporting-reporting-0');
|
|
13709
13776
|
console.log('renew reporting', reportingReporting);
|
|
13710
13777
|
if (reportingReporting != null) {
|
|
13711
13778
|
reportformatvalues = reportingReporting.selectedValues();
|
|
13712
|
-
reportformatvaluesStr = JSON.stringify(reportingReporting
|
|
13779
|
+
// reportformatvaluesStr = JSON.stringify(reportingReporting!.selectedValues())
|
|
13713
13780
|
}
|
|
13714
13781
|
let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues));
|
|
13715
13782
|
console.log('reportformatvalues', reportformatvalues, JSON.parse(listEvent.reportformatvalues), comparedObj);
|
|
@@ -13729,7 +13796,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13729
13796
|
console.log('mmddyyyy', mmddyyyy);
|
|
13730
13797
|
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, (_a = listEvent.module) !== null && _a !== void 0 ? _a : "compliance")) {
|
|
13731
13798
|
if (approved) {
|
|
13732
|
-
await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
13799
|
+
// await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
13733
13800
|
}
|
|
13734
13801
|
else {
|
|
13735
13802
|
console.log('renew reporting', reportformatvalues);
|
|
@@ -14028,7 +14095,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14028
14095
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
14029
14096
|
}
|
|
14030
14097
|
}
|
|
14031
|
-
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
14098
|
+
// await this.renewRCMResource(listEvent, reportformatvalues);
|
|
14032
14099
|
console.log('upload report auto approve single');
|
|
14033
14100
|
}
|
|
14034
14101
|
if (this.recentlyReported[mmdd] == null) {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -5282,7 +5282,7 @@ export class SfIEvents extends LitElement {
|
|
|
5282
5282
|
renderCalendarAnnotations = (event: any, mmdd: string, j: number, fromDrilldown: boolean) => {
|
|
5283
5283
|
|
|
5284
5284
|
var html = '';
|
|
5285
|
-
|
|
5285
|
+
console.log('rendering Annotations', event.module, event.completenessstatus)
|
|
5286
5286
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>'
|
|
5287
5287
|
// if(event.concise == null && event.approvers != null){
|
|
5288
5288
|
let reporterStr = event.concise == null ? this.getReporterStringFromEvent(event) : "";
|
|
@@ -5292,7 +5292,7 @@ export class SfIEvents extends LitElement {
|
|
|
5292
5292
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5293
5293
|
const configHome = Util.getProjectConfigHome();
|
|
5294
5294
|
const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0
|
|
5295
|
-
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span> Mark Understood</button>')) : '') + '</div>';
|
|
5295
|
+
html += '<div class="d-flex align-center event-user-labels-container"><div part="badge-filter-name" class="graphparamname graphparamname1 mb-20' + (event.concise == null ? "" : ' hide') + '">' + graphParam.split(';')[0] + '</div>' + reporterStr + approverStr + (((event.module == "compliances" || event.module == null) && event.concise == null && ((event.reportformat == null || event.reportformat.length == 0) && (event.customreporting == null) && (event.reportedlocationsflag != true)) && !fromDrilldown) ? ('<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '-" part="button-list-reporting" class="material-icons ml-10 mb-20 button-list-reporting">edit_note</button>') : '') + (((event.module == "compliances" || event.module == null) && event.concise == null && configFlag) ? (event.review ? ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-reviewed" class="material-symbols-outlined d-flex align-center mb-20 ml-10 button-icon-review">flag_check</button>') : ('<button id="input-checkbox-review-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-review" class="d-flex align-center mb-20 ml-10 button-icon-review"><span class="material-symbols-outlined" title="Mark as reviewed">flag</span> Mark Understood</button>')) : '') + ((event.module == "rcmresource" && event.completenessstatus == "approved") ? '<button id="button-renew-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="d-flex align-center mb-20 ml-10 button-icon button-renew"><span class="material-symbols-outlined" title="Renew">replay</span> Renew</button>' : '') +'</div>';
|
|
5296
5296
|
// }
|
|
5297
5297
|
|
|
5298
5298
|
return html;
|
|
@@ -5410,6 +5410,7 @@ export class SfIEvents extends LitElement {
|
|
|
5410
5410
|
// //console.log('eventlog1', tempEvents1['06/30'][7].comments, mmdd, j);
|
|
5411
5411
|
|
|
5412
5412
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
5413
|
+
this.events[mmdd][j].completenessstatus = partStatus;
|
|
5413
5414
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(this.events[mmdd][j])), partStatus);
|
|
5414
5415
|
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage, JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
5415
5416
|
console.log("agreement partStatus", partStatus, lateStatus, complianceStatus);
|
|
@@ -7742,6 +7743,23 @@ export class SfIEvents extends LitElement {
|
|
|
7742
7743
|
|
|
7743
7744
|
}
|
|
7744
7745
|
|
|
7746
|
+
const buttonRenewArr = eventsContainer.querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
7747
|
+
|
|
7748
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
7749
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
7750
|
+
const id = ev.target.id;
|
|
7751
|
+
const idArr = id.split("-")
|
|
7752
|
+
console.log('idArr', idArr);
|
|
7753
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
7754
|
+
const j = idArr[4];
|
|
7755
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
7756
|
+
let renewEvent = this.events[mmdd][j];
|
|
7757
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
7758
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
7759
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
7760
|
+
})
|
|
7761
|
+
}
|
|
7762
|
+
|
|
7745
7763
|
const streamEventsContainer = eventsContainer.querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
7746
7764
|
const buttonSelect = eventsContainer.querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
7747
7765
|
if (eventsContainer.innerHTML.indexOf('button-select-all') >= 0) {
|
|
@@ -12437,6 +12455,23 @@ export class SfIEvents extends LitElement {
|
|
|
12437
12455
|
|
|
12438
12456
|
}
|
|
12439
12457
|
|
|
12458
|
+
const buttonRenewArr = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
12459
|
+
|
|
12460
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
12461
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
12462
|
+
const id = ev.target.id;
|
|
12463
|
+
const idArr = id.split("-")
|
|
12464
|
+
console.log('idArr', idArr);
|
|
12465
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
12466
|
+
const j = idArr[4];
|
|
12467
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
12468
|
+
let renewEvent = this.events[mmdd][j];
|
|
12469
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
12470
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
12471
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
12472
|
+
})
|
|
12473
|
+
}
|
|
12474
|
+
|
|
12440
12475
|
const streamEventsContainer = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
12441
12476
|
const buttonSelect = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
12442
12477
|
let selectAllArr = this.attachSelectAllListeners((this._SfThisContainer as HTMLDivElement), buttonSelect)
|
|
@@ -13153,6 +13188,23 @@ export class SfIEvents extends LitElement {
|
|
|
13153
13188
|
|
|
13154
13189
|
}
|
|
13155
13190
|
|
|
13191
|
+
const buttonRenewArr = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
13192
|
+
|
|
13193
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
13194
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
13195
|
+
const id = ev.target.id;
|
|
13196
|
+
const idArr = id.split("-")
|
|
13197
|
+
console.log('idArr', idArr);
|
|
13198
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
13199
|
+
const j = idArr[4];
|
|
13200
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
13201
|
+
let renewEvent = this.events[mmdd][j];
|
|
13202
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
13203
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
13204
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
13205
|
+
})
|
|
13206
|
+
}
|
|
13207
|
+
|
|
13156
13208
|
const streamEventsContainer = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
13157
13209
|
const buttonSelect = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
13158
13210
|
let selectAllArr = this.attachSelectAllListeners((this._SfStreamContainer as HTMLDivElement), buttonSelect)
|
|
@@ -14430,6 +14482,23 @@ export class SfIEvents extends LitElement {
|
|
|
14430
14482
|
|
|
14431
14483
|
}
|
|
14432
14484
|
|
|
14485
|
+
const buttonRenewArr = (this._SfDetailListContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
14486
|
+
|
|
14487
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
14488
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
14489
|
+
const id = ev.target.id;
|
|
14490
|
+
const idArr = id.split("-")
|
|
14491
|
+
console.log('idArr', idArr);
|
|
14492
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
14493
|
+
const j = idArr[4];
|
|
14494
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
14495
|
+
let renewEvent = this.events[mmdd][j];
|
|
14496
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
14497
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
14498
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
14499
|
+
})
|
|
14500
|
+
}
|
|
14501
|
+
|
|
14433
14502
|
}
|
|
14434
14503
|
renderEventDetailShort = (compliance: any) => {
|
|
14435
14504
|
var html = `
|
|
@@ -17299,7 +17368,7 @@ export class SfIEvents extends LitElement {
|
|
|
17299
17368
|
}
|
|
17300
17369
|
}
|
|
17301
17370
|
|
|
17302
|
-
fetchRCMResourceDetails = async (listEvent: any, mmddyyyy: string) => {
|
|
17371
|
+
fetchRCMResourceDetails = async (listEvent: any, mmddyyyy: string, flagReturn: boolean = false) => {
|
|
17303
17372
|
let entityId = listEvent.entityid;
|
|
17304
17373
|
let locationId = listEvent.locationid;
|
|
17305
17374
|
let url = "https://" + this.apiIdRCMResources + "/getallobjectdetails";
|
|
@@ -17316,7 +17385,11 @@ export class SfIEvents extends LitElement {
|
|
|
17316
17385
|
|
|
17317
17386
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
17318
17387
|
console.log('jsonRespose agreement details', jsonRespose);
|
|
17319
|
-
|
|
17388
|
+
if (flagReturn) {
|
|
17389
|
+
return jsonRespose.object;
|
|
17390
|
+
}else{
|
|
17391
|
+
this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy)
|
|
17392
|
+
}
|
|
17320
17393
|
} else {
|
|
17321
17394
|
if (xhr.status == 401) {
|
|
17322
17395
|
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
@@ -17574,12 +17647,12 @@ export class SfIEvents extends LitElement {
|
|
|
17574
17647
|
return;
|
|
17575
17648
|
}
|
|
17576
17649
|
let reportformatvalues: any = {}
|
|
17577
|
-
let reportformatvaluesStr: string = ""
|
|
17650
|
+
// let reportformatvaluesStr: string = ""
|
|
17578
17651
|
let reportingReporting = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-reporting-0') as SfIReporting
|
|
17579
17652
|
console.log('renew reporting', reportingReporting)
|
|
17580
17653
|
if (reportingReporting != null) {
|
|
17581
17654
|
reportformatvalues = reportingReporting!.selectedValues()
|
|
17582
|
-
reportformatvaluesStr = JSON.stringify(reportingReporting!.selectedValues())
|
|
17655
|
+
// reportformatvaluesStr = JSON.stringify(reportingReporting!.selectedValues())
|
|
17583
17656
|
}
|
|
17584
17657
|
let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues))
|
|
17585
17658
|
console.log('reportformatvalues', reportformatvalues, JSON.parse(listEvent.reportformatvalues), comparedObj)
|
|
@@ -17600,7 +17673,7 @@ export class SfIEvents extends LitElement {
|
|
|
17600
17673
|
console.log('mmddyyyy', mmddyyyy)
|
|
17601
17674
|
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.module ?? "compliance")) {
|
|
17602
17675
|
if (approved) {
|
|
17603
|
-
await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
17676
|
+
// await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
17604
17677
|
} else {
|
|
17605
17678
|
console.log('renew reporting', reportformatvalues)
|
|
17606
17679
|
}
|
|
@@ -17936,7 +18009,7 @@ export class SfIEvents extends LitElement {
|
|
|
17936
18009
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
17937
18010
|
}
|
|
17938
18011
|
}
|
|
17939
|
-
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
18012
|
+
// await this.renewRCMResource(listEvent, reportformatvalues);
|
|
17940
18013
|
console.log('upload report auto approve single')
|
|
17941
18014
|
}
|
|
17942
18015
|
if (this.recentlyReported[mmdd] == null) {
|