sf-i-events 1.0.969 → 1.0.971
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 +2 -1
- package/sf-i-events.js +83 -7
- package/src/sf-i-events.ts +90 -9
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
|
@@ -141,6 +141,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
141
141
|
disableclientresponse: string;
|
|
142
142
|
disablesignoff: string;
|
|
143
143
|
apiId: string;
|
|
144
|
+
apiId2: string;
|
|
144
145
|
apiIdStatutes: string;
|
|
145
146
|
apiIdDefinitions: string;
|
|
146
147
|
apiidReportformats: string;
|
|
@@ -646,7 +647,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
646
647
|
fetchLicenseDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
647
648
|
renewLicense: (listEvent: any, reportformatvalues: any) => Promise<void>;
|
|
648
649
|
renderLicenseDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
649
|
-
fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<
|
|
650
|
+
fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string, flagReturn?: boolean) => Promise<any>;
|
|
650
651
|
renewRCMResource: (listEvent: any, reportformatvalues: any) => Promise<void>;
|
|
651
652
|
renderRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
652
653
|
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) {
|
|
@@ -22688,6 +22755,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22688
22755
|
};
|
|
22689
22756
|
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "compliance") => {
|
|
22690
22757
|
let url = "https://" + this.apiId + "/uploadreview1";
|
|
22758
|
+
if (module == "rcmresource" && this.apiId2 != null) {
|
|
22759
|
+
url = "https://" + this.apiId2 + "/uploadreview1";
|
|
22760
|
+
}
|
|
22691
22761
|
const body = {
|
|
22692
22762
|
"mmddyyyy": mmddyyyy,
|
|
22693
22763
|
"projectid": this.projectId,
|
|
@@ -22783,6 +22853,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22783
22853
|
};
|
|
22784
22854
|
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "compliance", percentage = "100", makercheckers, reportedlocations = "") => {
|
|
22785
22855
|
let url = "https://" + this.apiId + "/uploadreport2";
|
|
22856
|
+
if (module == "rcmresource" && this.apiId2 != null) {
|
|
22857
|
+
url = "https://" + this.apiId2 + "/uploadreport2";
|
|
22858
|
+
}
|
|
22786
22859
|
let yearStr = this.getFinancialYear(mmddyyyy);
|
|
22787
22860
|
let body = {
|
|
22788
22861
|
"mmddyyyy": mmddyyyy,
|
|
@@ -27906,6 +27979,9 @@ __decorate([
|
|
|
27906
27979
|
__decorate([
|
|
27907
27980
|
property()
|
|
27908
27981
|
], SfIEvents.prototype, "apiId", void 0);
|
|
27982
|
+
__decorate([
|
|
27983
|
+
property()
|
|
27984
|
+
], SfIEvents.prototype, "apiId2", void 0);
|
|
27909
27985
|
__decorate([
|
|
27910
27986
|
property()
|
|
27911
27987
|
], SfIEvents.prototype, "apiIdStatutes", void 0);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -1234,6 +1234,9 @@ export class SfIEvents extends LitElement {
|
|
|
1234
1234
|
@property()
|
|
1235
1235
|
apiId!: string;
|
|
1236
1236
|
|
|
1237
|
+
@property()
|
|
1238
|
+
apiId2!: string;
|
|
1239
|
+
|
|
1237
1240
|
@property()
|
|
1238
1241
|
apiIdStatutes!: string;
|
|
1239
1242
|
|
|
@@ -5282,7 +5285,7 @@ export class SfIEvents extends LitElement {
|
|
|
5282
5285
|
renderCalendarAnnotations = (event: any, mmdd: string, j: number, fromDrilldown: boolean) => {
|
|
5283
5286
|
|
|
5284
5287
|
var html = '';
|
|
5285
|
-
|
|
5288
|
+
console.log('rendering Annotations', event.module, event.completenessstatus)
|
|
5286
5289
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>'
|
|
5287
5290
|
// if(event.concise == null && event.approvers != null){
|
|
5288
5291
|
let reporterStr = event.concise == null ? this.getReporterStringFromEvent(event) : "";
|
|
@@ -5292,7 +5295,7 @@ export class SfIEvents extends LitElement {
|
|
|
5292
5295
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5293
5296
|
const configHome = Util.getProjectConfigHome();
|
|
5294
5297
|
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>';
|
|
5298
|
+
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
5299
|
// }
|
|
5297
5300
|
|
|
5298
5301
|
return html;
|
|
@@ -5410,6 +5413,7 @@ export class SfIEvents extends LitElement {
|
|
|
5410
5413
|
// //console.log('eventlog1', tempEvents1['06/30'][7].comments, mmdd, j);
|
|
5411
5414
|
|
|
5412
5415
|
partStatus = this.getCompletenessStatus(JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
5416
|
+
this.events[mmdd][j].completenessstatus = partStatus;
|
|
5413
5417
|
lateStatus = this.getTimelinessStatus(mmdd, JSON.parse(JSON.stringify(this.events[mmdd][j])), partStatus);
|
|
5414
5418
|
complianceStatus = this.getComplianceStatus(partStatus, lateStatus, JSON.parse(JSON.stringify(this.events[mmdd][j])).percentage, JSON.parse(JSON.stringify(this.events[mmdd][j])));
|
|
5415
5419
|
console.log("agreement partStatus", partStatus, lateStatus, complianceStatus);
|
|
@@ -7742,6 +7746,23 @@ export class SfIEvents extends LitElement {
|
|
|
7742
7746
|
|
|
7743
7747
|
}
|
|
7744
7748
|
|
|
7749
|
+
const buttonRenewArr = eventsContainer.querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
7750
|
+
|
|
7751
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
7752
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
7753
|
+
const id = ev.target.id;
|
|
7754
|
+
const idArr = id.split("-")
|
|
7755
|
+
console.log('idArr', idArr);
|
|
7756
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
7757
|
+
const j = idArr[4];
|
|
7758
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
7759
|
+
let renewEvent = this.events[mmdd][j];
|
|
7760
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
7761
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
7762
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
7763
|
+
})
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7745
7766
|
const streamEventsContainer = eventsContainer.querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
7746
7767
|
const buttonSelect = eventsContainer.querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
7747
7768
|
if (eventsContainer.innerHTML.indexOf('button-select-all') >= 0) {
|
|
@@ -12437,6 +12458,23 @@ export class SfIEvents extends LitElement {
|
|
|
12437
12458
|
|
|
12438
12459
|
}
|
|
12439
12460
|
|
|
12461
|
+
const buttonRenewArr = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
12462
|
+
|
|
12463
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
12464
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
12465
|
+
const id = ev.target.id;
|
|
12466
|
+
const idArr = id.split("-")
|
|
12467
|
+
console.log('idArr', idArr);
|
|
12468
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
12469
|
+
const j = idArr[4];
|
|
12470
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
12471
|
+
let renewEvent = this.events[mmdd][j];
|
|
12472
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
12473
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
12474
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
12475
|
+
})
|
|
12476
|
+
}
|
|
12477
|
+
|
|
12440
12478
|
const streamEventsContainer = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
12441
12479
|
const buttonSelect = (this._SfThisContainer as HTMLDivElement).querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
12442
12480
|
let selectAllArr = this.attachSelectAllListeners((this._SfThisContainer as HTMLDivElement), buttonSelect)
|
|
@@ -13153,6 +13191,23 @@ export class SfIEvents extends LitElement {
|
|
|
13153
13191
|
|
|
13154
13192
|
}
|
|
13155
13193
|
|
|
13194
|
+
const buttonRenewArr = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
13195
|
+
|
|
13196
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
13197
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
13198
|
+
const id = ev.target.id;
|
|
13199
|
+
const idArr = id.split("-")
|
|
13200
|
+
console.log('idArr', idArr);
|
|
13201
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
13202
|
+
const j = idArr[4];
|
|
13203
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
13204
|
+
let renewEvent = this.events[mmdd][j];
|
|
13205
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
13206
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
13207
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
13208
|
+
})
|
|
13209
|
+
}
|
|
13210
|
+
|
|
13156
13211
|
const streamEventsContainer = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.stream-events-container') as NodeListOf<HTMLDivElement>;
|
|
13157
13212
|
const buttonSelect = (this._SfStreamContainer as HTMLDivElement).querySelectorAll('.button-select') as NodeListOf<HTMLButtonElement>;
|
|
13158
13213
|
let selectAllArr = this.attachSelectAllListeners((this._SfStreamContainer as HTMLDivElement), buttonSelect)
|
|
@@ -14430,6 +14485,23 @@ export class SfIEvents extends LitElement {
|
|
|
14430
14485
|
|
|
14431
14486
|
}
|
|
14432
14487
|
|
|
14488
|
+
const buttonRenewArr = (this._SfDetailListContainer as HTMLDivElement).querySelectorAll('.button-renew') as NodeListOf<HTMLButtonElement>;
|
|
14489
|
+
|
|
14490
|
+
for (var i = 0; i < buttonRenewArr.length; i++) {
|
|
14491
|
+
buttonRenewArr[i].addEventListener('click', async (ev: any) => {
|
|
14492
|
+
const id = ev.target.id;
|
|
14493
|
+
const idArr = id.split("-")
|
|
14494
|
+
console.log('idArr', idArr);
|
|
14495
|
+
const mmdd = idArr[2] + "/" + idArr[3];
|
|
14496
|
+
const j = idArr[4];
|
|
14497
|
+
const yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
14498
|
+
let renewEvent = this.events[mmdd][j];
|
|
14499
|
+
let fullEvent = await this.fetchRCMResourceDetails(renewEvent, mmdd + "/" + yyyy, true);
|
|
14500
|
+
console.log('renew clicked', fullEvent, fullEvent.reportformatvalues);
|
|
14501
|
+
this.renewRCMResource(fullEvent, fullEvent.reportformatvalues);
|
|
14502
|
+
})
|
|
14503
|
+
}
|
|
14504
|
+
|
|
14433
14505
|
}
|
|
14434
14506
|
renderEventDetailShort = (compliance: any) => {
|
|
14435
14507
|
var html = `
|
|
@@ -17299,7 +17371,7 @@ export class SfIEvents extends LitElement {
|
|
|
17299
17371
|
}
|
|
17300
17372
|
}
|
|
17301
17373
|
|
|
17302
|
-
fetchRCMResourceDetails = async (listEvent: any, mmddyyyy: string) => {
|
|
17374
|
+
fetchRCMResourceDetails = async (listEvent: any, mmddyyyy: string, flagReturn: boolean = false) => {
|
|
17303
17375
|
let entityId = listEvent.entityid;
|
|
17304
17376
|
let locationId = listEvent.locationid;
|
|
17305
17377
|
let url = "https://" + this.apiIdRCMResources + "/getallobjectdetails";
|
|
@@ -17316,7 +17388,11 @@ export class SfIEvents extends LitElement {
|
|
|
17316
17388
|
|
|
17317
17389
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
17318
17390
|
console.log('jsonRespose agreement details', jsonRespose);
|
|
17319
|
-
|
|
17391
|
+
if (flagReturn) {
|
|
17392
|
+
return jsonRespose.object;
|
|
17393
|
+
}else{
|
|
17394
|
+
this.renderRCMResourceDetails(jsonRespose.object, mmddyyyy)
|
|
17395
|
+
}
|
|
17320
17396
|
} else {
|
|
17321
17397
|
if (xhr.status == 401) {
|
|
17322
17398
|
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
@@ -17574,12 +17650,12 @@ export class SfIEvents extends LitElement {
|
|
|
17574
17650
|
return;
|
|
17575
17651
|
}
|
|
17576
17652
|
let reportformatvalues: any = {}
|
|
17577
|
-
let reportformatvaluesStr: string = ""
|
|
17653
|
+
// let reportformatvaluesStr: string = ""
|
|
17578
17654
|
let reportingReporting = (this._SfDetailContainer as HTMLDivElement).querySelector('#reporting-reporting-0') as SfIReporting
|
|
17579
17655
|
console.log('renew reporting', reportingReporting)
|
|
17580
17656
|
if (reportingReporting != null) {
|
|
17581
17657
|
reportformatvalues = reportingReporting!.selectedValues()
|
|
17582
|
-
reportformatvaluesStr = JSON.stringify(reportingReporting!.selectedValues())
|
|
17658
|
+
// reportformatvaluesStr = JSON.stringify(reportingReporting!.selectedValues())
|
|
17583
17659
|
}
|
|
17584
17660
|
let comparedObj = Util.compareObjects(reportformatvalues, JSON.parse(listEvent.reportformatvalues))
|
|
17585
17661
|
console.log('reportformatvalues', reportformatvalues, JSON.parse(listEvent.reportformatvalues), comparedObj)
|
|
@@ -17600,7 +17676,7 @@ export class SfIEvents extends LitElement {
|
|
|
17600
17676
|
console.log('mmddyyyy', mmddyyyy)
|
|
17601
17677
|
if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.module ?? "compliance")) {
|
|
17602
17678
|
if (approved) {
|
|
17603
|
-
await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
17679
|
+
// await this.renewRCMResource(listEvent, reportformatvaluesStr);
|
|
17604
17680
|
} else {
|
|
17605
17681
|
console.log('renew reporting', reportformatvalues)
|
|
17606
17682
|
}
|
|
@@ -17936,7 +18012,7 @@ export class SfIEvents extends LitElement {
|
|
|
17936
18012
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
17937
18013
|
}
|
|
17938
18014
|
}
|
|
17939
|
-
await this.renewRCMResource(listEvent, reportformatvalues);
|
|
18015
|
+
// await this.renewRCMResource(listEvent, reportformatvalues);
|
|
17940
18016
|
console.log('upload report auto approve single')
|
|
17941
18017
|
}
|
|
17942
18018
|
if (this.recentlyReported[mmdd] == null) {
|
|
@@ -28567,7 +28643,9 @@ export class SfIEvents extends LitElement {
|
|
|
28567
28643
|
|
|
28568
28644
|
uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "compliance") => {
|
|
28569
28645
|
let url = "https://" + this.apiId + "/uploadreview1";
|
|
28570
|
-
|
|
28646
|
+
if(module == "rcmresource" && this.apiId2 != null) {
|
|
28647
|
+
url = "https://" + this.apiId2 + "/uploadreview1";
|
|
28648
|
+
}
|
|
28571
28649
|
const body = {
|
|
28572
28650
|
"mmddyyyy": mmddyyyy,
|
|
28573
28651
|
"projectid": this.projectId,
|
|
@@ -28667,6 +28745,9 @@ export class SfIEvents extends LitElement {
|
|
|
28667
28745
|
|
|
28668
28746
|
uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "compliance", percentage: string = "100", makercheckers: any, reportedlocations: string = "") => {
|
|
28669
28747
|
let url = "https://" + this.apiId + "/uploadreport2";
|
|
28748
|
+
if(module == "rcmresource" && this.apiId2 != null) {
|
|
28749
|
+
url = "https://" + this.apiId2 + "/uploadreport2";
|
|
28750
|
+
}
|
|
28670
28751
|
let yearStr = this.getFinancialYear(mmddyyyy)
|
|
28671
28752
|
let body = {
|
|
28672
28753
|
"mmddyyyy": mmddyyyy,
|