sf-i-events 1.0.965 → 1.0.967
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 +38 -2
- package/package.json +1 -1
- package/sf-i-events.d.ts +4 -4
- package/sf-i-events.js +242 -110
- package/src/sf-i-events.ts +225 -99
package/dev/index.html
CHANGED
|
@@ -864,7 +864,15 @@
|
|
|
864
864
|
allowdownload="yes"></sf-i-uploader></div>
|
|
865
865
|
<div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div>
|
|
866
866
|
</sf-i-events> -->
|
|
867
|
-
<sf-i-events
|
|
867
|
+
<!-- <sf-i-events projectid="7f928276-a9ff-4bcd-a8db-874f618a92ea" projectname="Transvolt" mode="onboarding"
|
|
868
|
+
locations="{"India":{"Maharashtra":["Head Office"]}}" contractstartdate="01/04/2024"
|
|
869
|
+
apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
|
|
870
|
+
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
871
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile"
|
|
872
|
+
disablesignoff="yes" disableclientresponse="yes">
|
|
873
|
+
|
|
874
|
+
</sf-i-events> -->
|
|
875
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api" mode="consumer"
|
|
868
876
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
869
877
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
870
878
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -893,7 +901,7 @@
|
|
|
893
901
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
894
902
|
</div>
|
|
895
903
|
|
|
896
|
-
</sf-i-events>
|
|
904
|
+
</sf-i-events> -->
|
|
897
905
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
898
906
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
899
907
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -1092,6 +1100,34 @@
|
|
|
1092
1100
|
</div>
|
|
1093
1101
|
|
|
1094
1102
|
</sf-i-events> -->
|
|
1103
|
+
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event" mode="consumer"
|
|
1104
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1105
|
+
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
1106
|
+
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
1107
|
+
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
1108
|
+
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
1109
|
+
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
1110
|
+
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="solid" username="Mihir Vasa"
|
|
1111
|
+
userprofileid="ee4609a3-1223-4f54-b0d4-f08b1b5053f7" projectid="7f928276-a9ff-4bcd-a8db-874f618a92ea"
|
|
1112
|
+
projectname="Transvolt" countryid="8c5ebfbc-f1c7-4f77-84ee-0f2234f29ded" selectedcriteria="Country - India"
|
|
1113
|
+
myrole="viewer" showregisterexport="false" features="["contracts"]"
|
|
1114
|
+
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
1115
|
+
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"}]"
|
|
1116
|
+
eventpreviewfields="["obligation"]"
|
|
1117
|
+
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
1118
|
+
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
1119
|
+
|
|
1120
|
+
<div slot="uploader">
|
|
1121
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
1122
|
+
allowedextensions="["jpg","jpeg","png","pdf","xls","xlsx","doc","docx","zip"]"
|
|
1123
|
+
extract="yes" projectid="7f928276-a9ff-4bcd-a8db-874f618a92ea" maxsize="31457280"
|
|
1124
|
+
allowdownload="yes"></sf-i-uploader>
|
|
1125
|
+
</div>
|
|
1126
|
+
<div slot="reporting">
|
|
1127
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1128
|
+
</div>
|
|
1129
|
+
|
|
1130
|
+
</sf-i-events>
|
|
1095
1131
|
<!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
|
|
1096
1132
|
locations="{"India":{"Maharashtra":["Pune","Mumbai"],"Telangana":["Telangana"]},"Canada":{"CanadaSO":["CanadaLO"]},"Singapore":{"SingaporeSO":["Orchard","Raffles","Robinson","Tanjong","Tras"]},"United Kingdom":{"UnitedSO":["UnitedLO"]},"United States of America":{"AmericaSO":["AmericaLO"]}}"
|
|
1097
1133
|
contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -503,7 +503,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
503
503
|
getCalendarRowHide: (events: any, i: number, lastDay: number, month: number, firstDate?: any, currDate?: any) => boolean;
|
|
504
504
|
renderCalendarRowDivStart: (i: number, firstDate?: any, ddmm?: string) => string;
|
|
505
505
|
renderCalendarRowDivEnd: () => string;
|
|
506
|
-
renderCalendarRowDivItemDivStart: (mmdd: string, event: any, itemNumber: number, partStatus: string, bgStatus: string) => string;
|
|
506
|
+
renderCalendarRowDivItemDivStart: (mmdd: string, event: any, itemNumber: number, partStatus: string, bgStatus: string, fromDrilldown: boolean) => string;
|
|
507
507
|
renderCalendarRowDivItemDivEnd: () => string;
|
|
508
508
|
renderCalendarBlankRowDiv: (hide: boolean, slice: number, i: number, firstDate?: any, ddmm?: string) => {
|
|
509
509
|
html: string;
|
|
@@ -514,7 +514,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
514
514
|
renderStatusHtml: (partStatus: string, lateStatus: string, complianceStatus: string, i: number) => string;
|
|
515
515
|
renderStatusString: (partStatus: string, lateStatus: string, complianceStatus: string) => string;
|
|
516
516
|
getGraphParam: (event: any) => string;
|
|
517
|
-
renderCalendarAnnotations: (event: any, mmdd: string, j: number) => string;
|
|
517
|
+
renderCalendarAnnotations: (event: any, mmdd: string, j: number, fromDrilldown: boolean) => string;
|
|
518
518
|
renderEvents: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string, showBackgroundButton: boolean, fromDrilldown?: boolean) => string;
|
|
519
519
|
renderStatistics: (_firstDay: any, _endDay: any, iInit: number, iLast: number, showGraph: boolean, index: number, month: number, period: string, firstDate: any, parametersTitle: string) => string;
|
|
520
520
|
renderReporting: (event: any, mmddyyyy: any) => string;
|
|
@@ -648,8 +648,8 @@ export declare class SfIEvents extends LitElement {
|
|
|
648
648
|
fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
649
649
|
renewRCMResource: (listEvent: any, reportformatvalues: any) => Promise<void>;
|
|
650
650
|
renderRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
|
|
651
|
-
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) => Promise<void>;
|
|
652
|
-
renderEventDetail: (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string, nextId: string) => void;
|
|
651
|
+
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>;
|
|
652
|
+
renderEventDetail: (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string, nextId: string, fromDrilldown: boolean) => void;
|
|
653
653
|
renderEventDetailReporting: (eventDetailReportingContainer: HTMLDivElement, event: any, mmddyyyy: any, eventDetailContainer: HTMLDivElement) => void;
|
|
654
654
|
renderCalendar: () => void;
|
|
655
655
|
matchesOnBoardingFilter: (country: string, state: string, subcategory: string, statute: string) => boolean;
|
package/sf-i-events.js
CHANGED
|
@@ -2597,7 +2597,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2597
2597
|
html += '</div>';
|
|
2598
2598
|
return html;
|
|
2599
2599
|
};
|
|
2600
|
-
this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus) => {
|
|
2600
|
+
this.renderCalendarRowDivItemDivStart = (mmdd, event, itemNumber, partStatus, bgStatus, fromDrilldown) => {
|
|
2601
2601
|
var _a, _b, _c, _f, _g;
|
|
2602
2602
|
var html = '';
|
|
2603
2603
|
var remarks = "";
|
|
@@ -2644,7 +2644,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2644
2644
|
const isReviewed = event.review == true;
|
|
2645
2645
|
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting || isReportedLocation);
|
|
2646
2646
|
// const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
2647
|
-
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation;
|
|
2647
|
+
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation && !fromDrilldown;
|
|
2648
2648
|
const showLocationRisk = event.concise != null;
|
|
2649
2649
|
const configHome = Util.getProjectConfigHome();
|
|
2650
2650
|
const showReview = event.concise != null && configHome.features != null && configHome.features.indexOf("understood") >= 0;
|
|
@@ -2983,7 +2983,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2983
2983
|
}
|
|
2984
2984
|
return graphParam;
|
|
2985
2985
|
};
|
|
2986
|
-
this.renderCalendarAnnotations = (event, mmdd, j) => {
|
|
2986
|
+
this.renderCalendarAnnotations = (event, mmdd, j, fromDrilldown) => {
|
|
2987
2987
|
var html = '';
|
|
2988
2988
|
html += '<div class="hidden-filtername hide"><table><thead><th part="badge-filter-name" class="filtername"></th></thead></table></div>';
|
|
2989
2989
|
// if(event.concise == null && event.approvers != null){
|
|
@@ -2993,7 +2993,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2993
2993
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
2994
2994
|
const configHome = Util.getProjectConfigHome();
|
|
2995
2995
|
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))) ? ('<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>';
|
|
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
2997
|
// }
|
|
2998
2998
|
return html;
|
|
2999
2999
|
};
|
|
@@ -3378,13 +3378,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3378
3378
|
htmlSummaryValues += '</td></tr>';
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
|
-
html += this.renderCalendarRowDivItemDivStart(mmdd, this.events[mmdd][j], j, partStatus, bgStatus);
|
|
3381
|
+
html += this.renderCalendarRowDivItemDivStart(mmdd, this.events[mmdd][j], j, partStatus, bgStatus, fromDrilldown);
|
|
3382
3382
|
// if (this.events[mmdd][j]["countryname"] != null) {
|
|
3383
3383
|
if (this.events[mmdd][j]["concise"] == null) {
|
|
3384
3384
|
html += this.renderCalendarRowDivItemDivTableHead(this.events[mmdd][j], partStatus);
|
|
3385
3385
|
html += this.renderCalendarRowDivItemDivTableBody(this.events[mmdd][j], partStatus, lateStatus, complianceStatus, mmdd, i, j);
|
|
3386
3386
|
}
|
|
3387
|
-
html += this.renderCalendarAnnotations(this.events[mmdd][j], mmdd, j);
|
|
3387
|
+
html += this.renderCalendarAnnotations(this.events[mmdd][j], mmdd, j, fromDrilldown);
|
|
3388
3388
|
html += '<div class="list-reporting-container d-flex flex-col hide" part="list-reporting-container" id="list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j + '"></div>';
|
|
3389
3389
|
html += this.renderCalendarRowDivItemDivEnd();
|
|
3390
3390
|
}
|
|
@@ -3932,7 +3932,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3932
3932
|
return html;
|
|
3933
3933
|
};
|
|
3934
3934
|
this.renderListReporting = (listReportingContainer, event, mmddyyyy, eventsContainer) => {
|
|
3935
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m
|
|
3935
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m;
|
|
3936
3936
|
console.log('listreporting event', event, this.graphFilter);
|
|
3937
3937
|
let html = '';
|
|
3938
3938
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
@@ -3982,23 +3982,26 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3982
3982
|
if (this._SfUploader[0] != null) {
|
|
3983
3983
|
this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
|
|
3984
3984
|
}
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
this.
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
3985
|
+
let deleteButtons = listReportingContainer.querySelectorAll('.button-delete');
|
|
3986
|
+
for (let deleteButton of deleteButtons) {
|
|
3987
|
+
deleteButton === null || deleteButton === void 0 ? void 0 : deleteButton.addEventListener('click', async () => {
|
|
3988
|
+
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
3989
|
+
this.setSuccess('Deleted successfully!');
|
|
3990
|
+
setTimeout(() => {
|
|
3991
|
+
this.clearMessages();
|
|
3992
|
+
}, 3000);
|
|
3993
|
+
//console.log('deleted', resultDelete);
|
|
3994
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
3995
|
+
this.processDateSelection(this._SfCustomContainer);
|
|
3996
|
+
}
|
|
3997
|
+
else {
|
|
3998
|
+
// if(currentColumnButton != null) {
|
|
3999
|
+
// currentColumnButton.click();
|
|
4000
|
+
// }
|
|
4001
|
+
}
|
|
4002
|
+
});
|
|
4003
|
+
}
|
|
4004
|
+
(_f = listReportingContainer.querySelector('#button-auto-approve')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
4002
4005
|
var _a, _b;
|
|
4003
4006
|
if (this.selectedItemIds.length <= 1) {
|
|
4004
4007
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
|
|
@@ -4045,7 +4048,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4045
4048
|
// }
|
|
4046
4049
|
}
|
|
4047
4050
|
});
|
|
4048
|
-
(
|
|
4051
|
+
(_g = listReportingContainer.querySelector('#upload-guidance-button')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async () => {
|
|
4049
4052
|
var _a, _b, _c, _f, _g, _h;
|
|
4050
4053
|
console.log('upload guidance clicked', event);
|
|
4051
4054
|
let inputReportingPercentage = (_b = (_a = listReportingContainer.querySelector('#input-reporter-percentage')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "100";
|
|
@@ -4240,7 +4243,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4240
4243
|
selectReportingLocation.value = "";
|
|
4241
4244
|
}
|
|
4242
4245
|
}
|
|
4243
|
-
(
|
|
4246
|
+
(_h = listReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
|
|
4244
4247
|
var _a, _b;
|
|
4245
4248
|
let buttonClick = ev.target;
|
|
4246
4249
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -4369,7 +4372,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4369
4372
|
}
|
|
4370
4373
|
}
|
|
4371
4374
|
});
|
|
4372
|
-
(
|
|
4375
|
+
(_j = listReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
|
|
4373
4376
|
var _a, _b;
|
|
4374
4377
|
let buttonClick = ev.target;
|
|
4375
4378
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -4497,7 +4500,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4497
4500
|
else {
|
|
4498
4501
|
if (listReportingContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
4499
4502
|
listReportingContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
4500
|
-
(
|
|
4503
|
+
(_k = listReportingContainer.querySelector('#button-uploader-submit-report')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', async (ev) => {
|
|
4501
4504
|
var _a, _b, _c, _f;
|
|
4502
4505
|
let buttonClick = ev.target;
|
|
4503
4506
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -4880,7 +4883,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
4880
4883
|
}
|
|
4881
4884
|
}
|
|
4882
4885
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
4883
|
-
this.fetchReportFormat(listReportingContainer, reportformatName, (
|
|
4886
|
+
this.fetchReportFormat(listReportingContainer, reportformatName, (_l = event['reportformatschema']) !== null && _l !== void 0 ? _l : "", (_m = event['reportformatvalues']) !== null && _m !== void 0 ? _m : "");
|
|
4884
4887
|
}
|
|
4885
4888
|
};
|
|
4886
4889
|
this.attachListReportingListeners = (eventsContainer) => {
|
|
@@ -8243,10 +8246,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8243
8246
|
chooseDateInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
|
|
8244
8247
|
submitFlag = false;
|
|
8245
8248
|
}
|
|
8246
|
-
if (remarks == "") {
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
}
|
|
8249
|
+
// if (remarks == "") {
|
|
8250
|
+
// remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
|
|
8251
|
+
// submitFlag = false;
|
|
8252
|
+
// }
|
|
8250
8253
|
if (submitFlag) {
|
|
8251
8254
|
triggeredCompliances.push({
|
|
8252
8255
|
compliances: compliances,
|
|
@@ -10742,42 +10745,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10742
10745
|
html += `
|
|
10743
10746
|
<div id="list-container" class="list-container m-20 pb-20" part="list-container"></div>
|
|
10744
10747
|
`;
|
|
10745
|
-
// html += `
|
|
10746
|
-
// <sf-i-events id="statistics-drilldown" name="Statistics" apiid="dwqyez2puoxmu.cloudfront.net/event" exportparts="detail-container" mode="viewer"
|
|
10747
|
-
// apiidtags="${this.apiIdTags}"
|
|
10748
|
-
// apiidusers="${this.apiIdUsers}"
|
|
10749
|
-
// apiidstatutes="${this.apiIdStatutes}"
|
|
10750
|
-
// apiiddefinitions="${this.apiIdDefinitions}"
|
|
10751
|
-
// apiidreportformats="${this.apiidReportformats}"
|
|
10752
|
-
// apiidnotices="${this.apiIdNotices}"
|
|
10753
|
-
// apiidagreements="${this.apiIdAgreements}"
|
|
10754
|
-
// apiidlicenses="${this.apiIdLicenses}" username="${username}"
|
|
10755
|
-
// userprofileid="${userid}" projectid="${this.projectId}"
|
|
10756
|
-
// projectname="${this.projectName}" ${filterString}
|
|
10757
|
-
// myrole="${rolestr}" showregisterexport="false"
|
|
10758
|
-
// features="${this.features.replace(/"/g, """)}"
|
|
10759
|
-
// selectedfeatures="${JSON.stringify(this.selectedFeatures).replace(/"/g, """)}"
|
|
10760
|
-
// eventfielddependencies="${this.eventFieldDependencies.replace(/"/g, """)}"
|
|
10761
|
-
// eventfields="${this.eventFields.replace(/"/g, """)}"
|
|
10762
|
-
// eventpreviewfields="${this.eventPreviewFields.replace(/"/g, """)}"
|
|
10763
|
-
// eventhidefields="${this.eventHideFields.replace(/"/g, """)}"
|
|
10764
|
-
// calendarstartdd="${this.calendarStartDD}" calendarstartmm="${this.calendarStartMM}" calendarstartyyyy="${this.calendarStartYYYY}"
|
|
10765
|
-
// sdate="${this.sdate}" edate="${this.edate}"
|
|
10766
|
-
// flowgraphcompleteness="${this.FLOW_GRAPH_COMPLETENESS}">
|
|
10767
|
-
// <div slot="uploader">
|
|
10768
|
-
// <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
10769
|
-
// allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
10770
|
-
// extract="yes" projectid="${this.projectId}" maxsize="31457280"
|
|
10771
|
-
// allowdownload="yes"></sf-i-uploader>
|
|
10772
|
-
// </div>
|
|
10773
|
-
// <div slot="reporting">
|
|
10774
|
-
// <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
10775
|
-
// </div>
|
|
10776
|
-
// </sf-i-events>
|
|
10777
|
-
// `;
|
|
10778
10748
|
this._SfDetailListContainer.style.display = 'block';
|
|
10779
10749
|
this._SfDetailListContainer.innerHTML = html;
|
|
10780
|
-
// this.renderRangeEvents(new Date(this.sdate), ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24), (this._SfDetailListContainer as HTMLDivElement).querySelector('.list-container') as HTMLDivElement);
|
|
10781
10750
|
const lastDay = ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24);
|
|
10782
10751
|
let firstDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
10783
10752
|
let endDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
@@ -10803,13 +10772,179 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10803
10772
|
this._SfDetailListContainer.innerHTML = '';
|
|
10804
10773
|
this._SfDetailListContainer.style.display = 'none';
|
|
10805
10774
|
});
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
|
|
10775
|
+
const buttonArr = this._SfDetailListContainer.querySelectorAll('.button-expand');
|
|
10776
|
+
for (i = 0; i < buttonArr.length; i++) {
|
|
10777
|
+
let indexPrevNext = i;
|
|
10778
|
+
buttonArr[i].addEventListener('click', (ev) => {
|
|
10779
|
+
const id = ev.target.id;
|
|
10780
|
+
const idArr = id.split("-");
|
|
10781
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
10782
|
+
const j = idArr[5];
|
|
10783
|
+
const module = idArr[6];
|
|
10784
|
+
var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
10785
|
+
if (module === "notice") {
|
|
10786
|
+
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10787
|
+
}
|
|
10788
|
+
else if (module === "contract") {
|
|
10789
|
+
this.fetchContractDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10790
|
+
}
|
|
10791
|
+
else if (module === "license") {
|
|
10792
|
+
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10793
|
+
}
|
|
10794
|
+
else if (module === "rcmresource") {
|
|
10795
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10796
|
+
}
|
|
10797
|
+
else {
|
|
10798
|
+
let found = false;
|
|
10799
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10800
|
+
console.log('selectedItems', this.selectedItemIds[k], idArr[3] + '-' + idArr[4] + '-' + idArr[5], this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]));
|
|
10801
|
+
if (this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]) >= 0) {
|
|
10802
|
+
found = true;
|
|
10803
|
+
}
|
|
10804
|
+
}
|
|
10805
|
+
if (!found) {
|
|
10806
|
+
this.selectedItemIds = [];
|
|
10807
|
+
this.clearButtonSelection();
|
|
10808
|
+
}
|
|
10809
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block';
|
|
10810
|
+
//console.log('commentsinlist', (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-month-'+this.currentColumnIndex) as HTMLButtonElement, this.events[mmdd][j].comments, mmdd, j);
|
|
10811
|
+
let prevString = "";
|
|
10812
|
+
let flagPrev = true;
|
|
10813
|
+
let indexPrev = indexPrevNext;
|
|
10814
|
+
while (flagPrev) {
|
|
10815
|
+
if (indexPrev > 0) {
|
|
10816
|
+
if (Util.isVisible(buttonArr[indexPrev - 1])) {
|
|
10817
|
+
prevString = buttonArr[indexPrev - 1].id;
|
|
10818
|
+
flagPrev = false;
|
|
10819
|
+
}
|
|
10820
|
+
else {
|
|
10821
|
+
prevString = "";
|
|
10822
|
+
indexPrev--;
|
|
10823
|
+
}
|
|
10824
|
+
}
|
|
10825
|
+
else {
|
|
10826
|
+
flagPrev = false;
|
|
10827
|
+
}
|
|
10828
|
+
}
|
|
10829
|
+
let nextString = "";
|
|
10830
|
+
let flagNext = true;
|
|
10831
|
+
let indexNext = indexPrevNext;
|
|
10832
|
+
while (flagNext) {
|
|
10833
|
+
if (indexNext < buttonArr.length - 1) {
|
|
10834
|
+
if (Util.isVisible(buttonArr[indexNext + 1])) {
|
|
10835
|
+
nextString = buttonArr[indexNext + 1].id;
|
|
10836
|
+
flagNext = false;
|
|
10837
|
+
}
|
|
10838
|
+
else {
|
|
10839
|
+
nextString = "";
|
|
10840
|
+
indexNext++;
|
|
10841
|
+
}
|
|
10842
|
+
}
|
|
10843
|
+
else {
|
|
10844
|
+
flagNext = false;
|
|
10845
|
+
}
|
|
10846
|
+
}
|
|
10847
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-month-'+this.currentColumnIndex) as HTMLButtonElement);
|
|
10848
|
+
// console.log('errorFetchEvent', mmdd, j, buttonArr[i].outerHTML, idArr);
|
|
10849
|
+
console.log('previous event clicked', buttonArr[indexPrevNext - 1], prevString, indexPrevNext);
|
|
10850
|
+
this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, this._SfStreamContainer.querySelector('#stream-month-' + this.currentColumnIndex), this._SfStreamContainer, prevString, nextString, false, null, null, null, null, null, null, null, true);
|
|
10851
|
+
}
|
|
10852
|
+
});
|
|
10853
|
+
}
|
|
10854
|
+
const titleArr = this._SfDetailListContainer.querySelectorAll('.button-event-title');
|
|
10855
|
+
for (var i = 0; i < titleArr.length; i++) {
|
|
10856
|
+
let indexPrevNext = i;
|
|
10857
|
+
titleArr[i].addEventListener('click', (ev) => {
|
|
10858
|
+
var _a, _b;
|
|
10859
|
+
const id = ev.target.id;
|
|
10860
|
+
const idArr = id.split("-");
|
|
10861
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
10862
|
+
const j = idArr[5];
|
|
10863
|
+
const module = idArr[6];
|
|
10864
|
+
const flag = idArr[7];
|
|
10865
|
+
if (flag != null && flag == "reportedlocations") {
|
|
10866
|
+
return;
|
|
10867
|
+
}
|
|
10868
|
+
var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
10869
|
+
if (module === "notice") {
|
|
10870
|
+
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10871
|
+
}
|
|
10872
|
+
else if (module === "contract") {
|
|
10873
|
+
this.fetchContractDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10874
|
+
}
|
|
10875
|
+
else if (module === "license") {
|
|
10876
|
+
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10877
|
+
}
|
|
10878
|
+
else if (module === "rcmresource") {
|
|
10879
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy);
|
|
10880
|
+
}
|
|
10881
|
+
else {
|
|
10882
|
+
let found = false;
|
|
10883
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
10884
|
+
if (this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]) >= 0) {
|
|
10885
|
+
found = true;
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10888
|
+
if (!found) {
|
|
10889
|
+
this.selectedItemIds = [];
|
|
10890
|
+
this.selectedItems = [];
|
|
10891
|
+
this.clearButtonSelection();
|
|
10892
|
+
}
|
|
10893
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block'
|
|
10894
|
+
let prevString = "";
|
|
10895
|
+
let flagPrev = true;
|
|
10896
|
+
let indexPrev = indexPrevNext;
|
|
10897
|
+
while (flagPrev) {
|
|
10898
|
+
if (indexPrev > 0) {
|
|
10899
|
+
if (Util.isVisible(titleArr[indexPrev - 1])) {
|
|
10900
|
+
prevString = titleArr[indexPrev - 1].id;
|
|
10901
|
+
let prevIdArr = prevString.split("-");
|
|
10902
|
+
if (((_a = prevIdArr[7]) !== null && _a !== void 0 ? _a : "") == "reportedlocations") {
|
|
10903
|
+
prevString = "";
|
|
10904
|
+
indexPrev--;
|
|
10905
|
+
}
|
|
10906
|
+
else {
|
|
10907
|
+
flagPrev = false;
|
|
10908
|
+
}
|
|
10909
|
+
}
|
|
10910
|
+
else {
|
|
10911
|
+
prevString = "";
|
|
10912
|
+
indexPrev--;
|
|
10913
|
+
}
|
|
10914
|
+
}
|
|
10915
|
+
else {
|
|
10916
|
+
flagPrev = false;
|
|
10917
|
+
}
|
|
10918
|
+
}
|
|
10919
|
+
let nextString = "";
|
|
10920
|
+
let flagNext = true;
|
|
10921
|
+
let indexNext = indexPrevNext;
|
|
10922
|
+
while (flagNext) {
|
|
10923
|
+
if (indexNext < titleArr.length - 1) {
|
|
10924
|
+
if (Util.isVisible(titleArr[indexNext + 1])) {
|
|
10925
|
+
nextString = titleArr[indexNext + 1].id;
|
|
10926
|
+
let nextIdArr = nextString.split("-");
|
|
10927
|
+
if (((_b = nextIdArr[7]) !== null && _b !== void 0 ? _b : "") == "reportedlocations") {
|
|
10928
|
+
nextString = "";
|
|
10929
|
+
indexNext++;
|
|
10930
|
+
}
|
|
10931
|
+
else {
|
|
10932
|
+
flagNext = false;
|
|
10933
|
+
}
|
|
10934
|
+
}
|
|
10935
|
+
else {
|
|
10936
|
+
indexNext++;
|
|
10937
|
+
}
|
|
10938
|
+
}
|
|
10939
|
+
else {
|
|
10940
|
+
flagNext = false;
|
|
10941
|
+
}
|
|
10942
|
+
}
|
|
10943
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
|
|
10944
|
+
this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, this._SfStreamContainer, prevString, nextString, false, null, null, null, null, null, null, null, true);
|
|
10945
|
+
}
|
|
10946
|
+
});
|
|
10947
|
+
}
|
|
10813
10948
|
};
|
|
10814
10949
|
this.renderEventDetailShort = (compliance) => {
|
|
10815
10950
|
var _a, _b, _c, _f, _g;
|
|
@@ -14104,7 +14239,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14104
14239
|
}
|
|
14105
14240
|
}
|
|
14106
14241
|
};
|
|
14107
|
-
this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, previousId = "", nextId = "", flagUploadGuidance = false, listEventContainer = null, reportercomments = null, approvercomments = null, inputReportingPercentage = null, selectReportedLocation = null, documents = null, dateOfCompletion = null) => {
|
|
14242
|
+
this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, previousId = "", nextId = "", flagUploadGuidance = false, listEventContainer = null, reportercomments = null, approvercomments = null, inputReportingPercentage = null, selectReportedLocation = null, documents = null, dateOfCompletion = null, fromDrilldown = false) => {
|
|
14108
14243
|
console.log('listEvent', listEvent, listEvent.id);
|
|
14109
14244
|
let url = "https://" + this.apiId + "/getalleventdetails";
|
|
14110
14245
|
//console.log('fetch calendar url', url);
|
|
@@ -14144,7 +14279,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14144
14279
|
}
|
|
14145
14280
|
}
|
|
14146
14281
|
else {
|
|
14147
|
-
this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId);
|
|
14282
|
+
this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId, fromDrilldown);
|
|
14148
14283
|
}
|
|
14149
14284
|
}
|
|
14150
14285
|
else {
|
|
@@ -14163,7 +14298,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14163
14298
|
}
|
|
14164
14299
|
}
|
|
14165
14300
|
};
|
|
14166
|
-
this.renderEventDetail = (event, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId) => {
|
|
14301
|
+
this.renderEventDetail = (event, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId, fromDrilldown) => {
|
|
14167
14302
|
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
14168
14303
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
14169
14304
|
console.log('previousid', previousId, 'nextid', nextId);
|
|
@@ -14473,7 +14608,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14473
14608
|
html += '</div>';
|
|
14474
14609
|
html += '</div>';
|
|
14475
14610
|
if (this.mode == "consumer" || this.mode == "next" || this.mode == "viewer") {
|
|
14476
|
-
if (this.mode != "viewer") {
|
|
14611
|
+
if (this.mode != "viewer" && !fromDrilldown) {
|
|
14477
14612
|
html += '<div part="reporting-view-container" id="reporting-view-container">';
|
|
14478
14613
|
html += this.renderReporting(event, mmddyyyy);
|
|
14479
14614
|
html += "</div>";
|
|
@@ -14719,14 +14854,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14719
14854
|
obligationtitle: event.obligationtitle,
|
|
14720
14855
|
obligation: event.obligation,
|
|
14721
14856
|
});
|
|
14722
|
-
// this.uploadTriggerMyEvent(
|
|
14723
|
-
// event.id + ";" + event.shortid,
|
|
14724
|
-
// feedbackMessage.value,
|
|
14725
|
-
// event.countries.join(",").replace(/ *\([^)]*\) */g, ""),
|
|
14726
|
-
// event.entities.join(',').replace(/ *\([^)]*\) */g, ""),
|
|
14727
|
-
// event.locations.join(',').replace(/ *\([^)]*\) */g, ""),
|
|
14728
|
-
// event.statute[0],
|
|
14729
|
-
// event.subcategory[0]);
|
|
14730
14857
|
buttonCancel.click();
|
|
14731
14858
|
buttonClose.click();
|
|
14732
14859
|
}
|
|
@@ -14764,7 +14891,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14764
14891
|
}
|
|
14765
14892
|
};
|
|
14766
14893
|
this.renderEventDetailReporting = (eventDetailReportingContainer, event, mmddyyyy, eventDetailContainer) => {
|
|
14767
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l
|
|
14894
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l;
|
|
14768
14895
|
console.log('detailreporting event', event, this.graphFilter);
|
|
14769
14896
|
let html = '';
|
|
14770
14897
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
@@ -14785,23 +14912,26 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14785
14912
|
if (this._SfUploader[0] != null) {
|
|
14786
14913
|
this._SfUploader[0].querySelector('#uploader').emailcontent = emailcontent;
|
|
14787
14914
|
}
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
this.
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14915
|
+
let deleteButtons = eventDetailContainer.querySelectorAll('.button-delete');
|
|
14916
|
+
for (let deleteButton of deleteButtons) {
|
|
14917
|
+
deleteButton === null || deleteButton === void 0 ? void 0 : deleteButton.addEventListener('click', async () => {
|
|
14918
|
+
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
14919
|
+
this.setSuccess('Deleted successfully!');
|
|
14920
|
+
setTimeout(() => {
|
|
14921
|
+
this.clearMessages();
|
|
14922
|
+
}, 3000);
|
|
14923
|
+
//console.log('deleted', resultDelete);
|
|
14924
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
14925
|
+
this.processDateSelection(this._SfCustomContainer);
|
|
14926
|
+
}
|
|
14927
|
+
else {
|
|
14928
|
+
// if(currentColumnButton != null) {
|
|
14929
|
+
// currentColumnButton.click();
|
|
14930
|
+
// }
|
|
14931
|
+
}
|
|
14932
|
+
});
|
|
14933
|
+
}
|
|
14934
|
+
(_c = eventDetailReportingContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
14805
14935
|
var _a, _b;
|
|
14806
14936
|
if (this.selectedItemIds.length <= 1) {
|
|
14807
14937
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, (_a = event.module) !== null && _a !== void 0 ? _a : "compliance");
|
|
@@ -14848,7 +14978,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14848
14978
|
// }
|
|
14849
14979
|
}
|
|
14850
14980
|
});
|
|
14851
|
-
(
|
|
14981
|
+
(_f = eventDetailReportingContainer.querySelector('#upload-guidance-button')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', async () => {
|
|
14852
14982
|
var _a, _b, _c, _f, _g, _h;
|
|
14853
14983
|
console.log('upload guidance clicked', event);
|
|
14854
14984
|
let inputReportingPercentage = (_b = (_a = eventDetailReportingContainer.querySelector('#input-reporter-percentage')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "100";
|
|
@@ -15043,7 +15173,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15043
15173
|
selectReportingLocation.value = "";
|
|
15044
15174
|
}
|
|
15045
15175
|
}
|
|
15046
|
-
(
|
|
15176
|
+
(_g = eventDetailReportingContainer.querySelector('#button-uploader-submit-approve')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', async (ev) => {
|
|
15047
15177
|
var _a, _b;
|
|
15048
15178
|
let buttonClick = ev.target;
|
|
15049
15179
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -15172,7 +15302,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15172
15302
|
}
|
|
15173
15303
|
}
|
|
15174
15304
|
});
|
|
15175
|
-
(
|
|
15305
|
+
(_h = eventDetailReportingContainer.querySelector('#button-uploader-submit-audit')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async (ev) => {
|
|
15176
15306
|
var _a, _b;
|
|
15177
15307
|
let buttonClick = ev.target;
|
|
15178
15308
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -15300,7 +15430,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15300
15430
|
else {
|
|
15301
15431
|
if (eventDetailReportingContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
15302
15432
|
eventDetailReportingContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
15303
|
-
(
|
|
15433
|
+
(_j = eventDetailReportingContainer.querySelector('#button-uploader-submit-report')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', async (ev) => {
|
|
15304
15434
|
var _a, _b, _c, _f;
|
|
15305
15435
|
let buttonClick = ev.target;
|
|
15306
15436
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -15683,7 +15813,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
15683
15813
|
}
|
|
15684
15814
|
}
|
|
15685
15815
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
15686
|
-
this.fetchReportFormat(eventDetailReportingContainer, reportformatName, (
|
|
15816
|
+
this.fetchReportFormat(eventDetailReportingContainer, reportformatName, (_k = event['reportformatschema']) !== null && _k !== void 0 ? _k : "", (_l = event['reportformatvalues']) !== null && _l !== void 0 ? _l : "");
|
|
15687
15817
|
}
|
|
15688
15818
|
};
|
|
15689
15819
|
this.renderCalendar = () => {
|
|
@@ -17911,6 +18041,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17911
18041
|
tempCsvObj['cols_' + colKey] = dataArr[j];
|
|
17912
18042
|
}
|
|
17913
18043
|
}
|
|
18044
|
+
let suspenseKey = tempCsvObj.entityid + ';' + tempCsvObj.locationid + ';' + tempCsvObj.id;
|
|
18045
|
+
tempCsvObj.suspense = (suspenseList[suspenseKey] != null && suspenseList[suspenseKey] != false) ? true : false;
|
|
17914
18046
|
csvArray[i] = tempCsvObj;
|
|
17915
18047
|
}
|
|
17916
18048
|
console.log('csv array', csvArray);
|
|
@@ -22434,7 +22566,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22434
22566
|
}
|
|
22435
22567
|
};
|
|
22436
22568
|
this.uploadTriggerEvent = async (triggeredCompliances) => {
|
|
22437
|
-
let url = "https://" + this.apiId + "/
|
|
22569
|
+
let url = "https://" + this.apiId + "/triggerevent1";
|
|
22438
22570
|
const body = {
|
|
22439
22571
|
"projectid": this.projectId,
|
|
22440
22572
|
"triggers": triggeredCompliances
|
package/src/sf-i-events.ts
CHANGED
|
@@ -4842,7 +4842,7 @@ export class SfIEvents extends LitElement {
|
|
|
4842
4842
|
|
|
4843
4843
|
}
|
|
4844
4844
|
|
|
4845
|
-
renderCalendarRowDivItemDivStart = (mmdd: string, event: any, itemNumber: number, partStatus: string, bgStatus: string) => {
|
|
4845
|
+
renderCalendarRowDivItemDivStart = (mmdd: string, event: any, itemNumber: number, partStatus: string, bgStatus: string, fromDrilldown: boolean) => {
|
|
4846
4846
|
|
|
4847
4847
|
var html = '';
|
|
4848
4848
|
|
|
@@ -4899,7 +4899,7 @@ export class SfIEvents extends LitElement {
|
|
|
4899
4899
|
const isReviewed = event.review == true
|
|
4900
4900
|
const showCheckbox = !(hasReportFormat || isBulk || hasCustomReporting || isReportedLocation);
|
|
4901
4901
|
// const showReportingButton = !hasReportFormat && !hasCustomReporting && event.reporters == null;
|
|
4902
|
-
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation;
|
|
4902
|
+
const showReportingButton = !hasReportFormat && !hasCustomReporting && event.concise != null && !isReportedLocation && !fromDrilldown;
|
|
4903
4903
|
const showLocationRisk = event.concise != null;
|
|
4904
4904
|
const configHome = Util.getProjectConfigHome();
|
|
4905
4905
|
const showReview = event.concise != null && configHome.features != null && configHome.features.indexOf("understood") >= 0;
|
|
@@ -5276,7 +5276,7 @@ export class SfIEvents extends LitElement {
|
|
|
5276
5276
|
return graphParam;
|
|
5277
5277
|
}
|
|
5278
5278
|
|
|
5279
|
-
renderCalendarAnnotations = (event: any, mmdd: string, j: number) => {
|
|
5279
|
+
renderCalendarAnnotations = (event: any, mmdd: string, j: number, fromDrilldown: boolean) => {
|
|
5280
5280
|
|
|
5281
5281
|
var html = '';
|
|
5282
5282
|
|
|
@@ -5289,7 +5289,7 @@ export class SfIEvents extends LitElement {
|
|
|
5289
5289
|
// console.log("graphParam", graphParam.split(';')[0]);
|
|
5290
5290
|
const configHome = Util.getProjectConfigHome();
|
|
5291
5291
|
const configFlag = configHome.features != null && configHome.features.indexOf("understood") >= 0
|
|
5292
|
-
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))) ? ('<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>';
|
|
5292
|
+
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>';
|
|
5293
5293
|
// }
|
|
5294
5294
|
|
|
5295
5295
|
return html;
|
|
@@ -5691,13 +5691,13 @@ export class SfIEvents extends LitElement {
|
|
|
5691
5691
|
}
|
|
5692
5692
|
}
|
|
5693
5693
|
|
|
5694
|
-
html += this.renderCalendarRowDivItemDivStart(mmdd, this.events[mmdd][j], j, partStatus, bgStatus);
|
|
5694
|
+
html += this.renderCalendarRowDivItemDivStart(mmdd, this.events[mmdd][j], j, partStatus, bgStatus, fromDrilldown);
|
|
5695
5695
|
// if (this.events[mmdd][j]["countryname"] != null) {
|
|
5696
5696
|
if (this.events[mmdd][j]["concise"] == null) {
|
|
5697
5697
|
html += this.renderCalendarRowDivItemDivTableHead(this.events[mmdd][j], partStatus);
|
|
5698
5698
|
html += this.renderCalendarRowDivItemDivTableBody(this.events[mmdd][j], partStatus, lateStatus, complianceStatus, mmdd, i, j);
|
|
5699
5699
|
}
|
|
5700
|
-
html += this.renderCalendarAnnotations(this.events[mmdd][j], mmdd, j);
|
|
5700
|
+
html += this.renderCalendarAnnotations(this.events[mmdd][j], mmdd, j, fromDrilldown);
|
|
5701
5701
|
html += '<div class="list-reporting-container d-flex flex-col hide" part="list-reporting-container" id="list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j + '"></div>'
|
|
5702
5702
|
html += this.renderCalendarRowDivItemDivEnd();
|
|
5703
5703
|
|
|
@@ -6378,23 +6378,26 @@ export class SfIEvents extends LitElement {
|
|
|
6378
6378
|
if (this._SfUploader[0] != null) {
|
|
6379
6379
|
(this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.emailcontent = emailcontent;
|
|
6380
6380
|
}
|
|
6381
|
-
listReportingContainer.
|
|
6381
|
+
let deleteButtons = listReportingContainer.querySelectorAll('.button-delete') as NodeListOf<HTMLButtonElement>
|
|
6382
|
+
for (let deleteButton of deleteButtons) {
|
|
6383
|
+
deleteButton?.addEventListener('click', async () => {
|
|
6382
6384
|
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6385
|
+
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
6386
|
+
this.setSuccess('Deleted successfully!')
|
|
6387
|
+
setTimeout(() => {
|
|
6388
|
+
this.clearMessages()
|
|
6389
|
+
}, 3000);
|
|
6390
|
+
//console.log('deleted', resultDelete);
|
|
6391
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
6392
|
+
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
6393
|
+
} else {
|
|
6394
|
+
// if(currentColumnButton != null) {
|
|
6395
|
+
// currentColumnButton.click();
|
|
6396
|
+
// }
|
|
6397
|
+
}
|
|
6396
6398
|
|
|
6397
|
-
|
|
6399
|
+
});
|
|
6400
|
+
}
|
|
6398
6401
|
listReportingContainer.querySelector('#button-auto-approve')?.addEventListener('click', async () => {
|
|
6399
6402
|
if (this.selectedItemIds.length <= 1) {
|
|
6400
6403
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
|
|
@@ -6596,7 +6599,7 @@ export class SfIEvents extends LitElement {
|
|
|
6596
6599
|
// }
|
|
6597
6600
|
}
|
|
6598
6601
|
selectReportingLocation.addEventListener('change', (e: any) => {
|
|
6599
|
-
if(selectReportingEntity.value == ""){
|
|
6602
|
+
if (selectReportingEntity.value == "") {
|
|
6600
6603
|
return;
|
|
6601
6604
|
}
|
|
6602
6605
|
let index = parseInt(e.target.id.split('-')[3])
|
|
@@ -11245,10 +11248,10 @@ export class SfIEvents extends LitElement {
|
|
|
11245
11248
|
chooseDateInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
|
|
11246
11249
|
submitFlag = false;
|
|
11247
11250
|
}
|
|
11248
|
-
if (remarks == "") {
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
}
|
|
11251
|
+
// if (remarks == "") {
|
|
11252
|
+
// remarksInput.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
|
|
11253
|
+
// submitFlag = false;
|
|
11254
|
+
// }
|
|
11252
11255
|
if (submitFlag) {
|
|
11253
11256
|
triggeredCompliances.push({
|
|
11254
11257
|
compliances: compliances,
|
|
@@ -14221,46 +14224,9 @@ export class SfIEvents extends LitElement {
|
|
|
14221
14224
|
html += `
|
|
14222
14225
|
<div id="list-container" class="list-container m-20 pb-20" part="list-container"></div>
|
|
14223
14226
|
`;
|
|
14224
|
-
// html += `
|
|
14225
|
-
// <sf-i-events id="statistics-drilldown" name="Statistics" apiid="dwqyez2puoxmu.cloudfront.net/event" exportparts="detail-container" mode="viewer"
|
|
14226
|
-
// apiidtags="${this.apiIdTags}"
|
|
14227
|
-
// apiidusers="${this.apiIdUsers}"
|
|
14228
|
-
// apiidstatutes="${this.apiIdStatutes}"
|
|
14229
|
-
// apiiddefinitions="${this.apiIdDefinitions}"
|
|
14230
|
-
// apiidreportformats="${this.apiidReportformats}"
|
|
14231
|
-
// apiidnotices="${this.apiIdNotices}"
|
|
14232
|
-
// apiidagreements="${this.apiIdAgreements}"
|
|
14233
|
-
// apiidlicenses="${this.apiIdLicenses}" username="${username}"
|
|
14234
|
-
// userprofileid="${userid}" projectid="${this.projectId}"
|
|
14235
|
-
// projectname="${this.projectName}" ${filterString}
|
|
14236
|
-
// myrole="${rolestr}" showregisterexport="false"
|
|
14237
|
-
// features="${this.features.replace(/"/g, """)}"
|
|
14238
|
-
// selectedfeatures="${JSON.stringify(this.selectedFeatures).replace(/"/g, """)}"
|
|
14239
|
-
// eventfielddependencies="${this.eventFieldDependencies.replace(/"/g, """)}"
|
|
14240
|
-
// eventfields="${this.eventFields.replace(/"/g, """)}"
|
|
14241
|
-
// eventpreviewfields="${this.eventPreviewFields.replace(/"/g, """)}"
|
|
14242
|
-
// eventhidefields="${this.eventHideFields.replace(/"/g, """)}"
|
|
14243
|
-
// calendarstartdd="${this.calendarStartDD}" calendarstartmm="${this.calendarStartMM}" calendarstartyyyy="${this.calendarStartYYYY}"
|
|
14244
|
-
// sdate="${this.sdate}" edate="${this.edate}"
|
|
14245
|
-
// flowgraphcompleteness="${this.FLOW_GRAPH_COMPLETENESS}">
|
|
14246
|
-
|
|
14247
|
-
// <div slot="uploader">
|
|
14248
|
-
// <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
14249
|
-
// allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
14250
|
-
// extract="yes" projectid="${this.projectId}" maxsize="31457280"
|
|
14251
|
-
// allowdownload="yes"></sf-i-uploader>
|
|
14252
|
-
// </div>
|
|
14253
|
-
// <div slot="reporting">
|
|
14254
|
-
// <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
14255
|
-
// </div>
|
|
14256
|
-
|
|
14257
|
-
// </sf-i-events>
|
|
14258
|
-
// `;
|
|
14259
14227
|
(this._SfDetailListContainer as HTMLDivElement).style.display = 'block';
|
|
14260
14228
|
(this._SfDetailListContainer as HTMLDivElement).innerHTML = html;
|
|
14261
14229
|
|
|
14262
|
-
// this.renderRangeEvents(new Date(this.sdate), ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24), (this._SfDetailListContainer as HTMLDivElement).querySelector('.list-container') as HTMLDivElement);
|
|
14263
|
-
|
|
14264
14230
|
const lastDay = ((new Date(this.edate).getTime()) - new Date(this.sdate).getTime()) / (1000 * 60 * 60 * 24)
|
|
14265
14231
|
let firstDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
14266
14232
|
let endDay = new Date((new Date(this.sdate)).getFullYear(), (new Date(this.sdate)).getMonth(), (new Date(this.sdate)).getDate());
|
|
@@ -14292,13 +14258,175 @@ export class SfIEvents extends LitElement {
|
|
|
14292
14258
|
|
|
14293
14259
|
});
|
|
14294
14260
|
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
|
|
14261
|
+
const buttonArr = (this._SfDetailListContainer as HTMLDivElement).querySelectorAll('.button-expand') as NodeListOf<HTMLButtonElement>;
|
|
14262
|
+
|
|
14263
|
+
for (i = 0; i < buttonArr.length; i++) {
|
|
14264
|
+
let indexPrevNext = i;
|
|
14265
|
+
buttonArr[i].addEventListener('click', (ev: any) => {
|
|
14266
|
+
const id = ev.target.id;
|
|
14267
|
+
const idArr = id.split("-")
|
|
14268
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
14269
|
+
const j = idArr[5];
|
|
14270
|
+
const module = idArr[6];
|
|
14271
|
+
var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
14272
|
+
if (module === "notice") {
|
|
14273
|
+
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14274
|
+
} else if (module === "contract") {
|
|
14275
|
+
this.fetchContractDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14276
|
+
} else if (module === "license") {
|
|
14277
|
+
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14278
|
+
} else if (module === "rcmresource") {
|
|
14279
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14280
|
+
} else {
|
|
14281
|
+
let found = false;
|
|
14282
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14283
|
+
console.log('selectedItems', this.selectedItemIds[k], idArr[3] + '-' + idArr[4] + '-' + idArr[5], this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]));
|
|
14284
|
+
if (this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]) >= 0) {
|
|
14285
|
+
found = true;
|
|
14286
|
+
}
|
|
14287
|
+
}
|
|
14288
|
+
if (!found) {
|
|
14289
|
+
this.selectedItemIds = [];
|
|
14290
|
+
this.clearButtonSelection();
|
|
14291
|
+
}
|
|
14292
|
+
|
|
14293
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block';
|
|
14294
|
+
|
|
14295
|
+
//console.log('commentsinlist', (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-month-'+this.currentColumnIndex) as HTMLButtonElement, this.events[mmdd][j].comments, mmdd, j);
|
|
14296
|
+
|
|
14297
|
+
|
|
14298
|
+
let prevString = "";
|
|
14299
|
+
let flagPrev = true;
|
|
14300
|
+
let indexPrev = indexPrevNext
|
|
14301
|
+
while (flagPrev) {
|
|
14302
|
+
if (indexPrev > 0) {
|
|
14303
|
+
if (Util.isVisible((buttonArr[indexPrev - 1] as HTMLButtonElement))) {
|
|
14304
|
+
prevString = (buttonArr[indexPrev - 1] as HTMLButtonElement).id;
|
|
14305
|
+
flagPrev = false;
|
|
14306
|
+
} else {
|
|
14307
|
+
prevString = "";
|
|
14308
|
+
indexPrev--
|
|
14309
|
+
}
|
|
14310
|
+
} else {
|
|
14311
|
+
flagPrev = false;
|
|
14312
|
+
}
|
|
14313
|
+
}
|
|
14314
|
+
let nextString = "";
|
|
14315
|
+
let flagNext = true;
|
|
14316
|
+
let indexNext = indexPrevNext
|
|
14317
|
+
while (flagNext) {
|
|
14318
|
+
if (indexNext < buttonArr.length - 1) {
|
|
14319
|
+
if (Util.isVisible((buttonArr[indexNext + 1] as HTMLButtonElement))) {
|
|
14320
|
+
nextString = (buttonArr[indexNext + 1] as HTMLButtonElement).id;
|
|
14321
|
+
flagNext = false;
|
|
14322
|
+
} else {
|
|
14323
|
+
nextString = "";
|
|
14324
|
+
indexNext++
|
|
14325
|
+
}
|
|
14326
|
+
} else {
|
|
14327
|
+
flagNext = false;
|
|
14328
|
+
}
|
|
14329
|
+
}
|
|
14330
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-month-'+this.currentColumnIndex) as HTMLButtonElement);
|
|
14331
|
+
// console.log('errorFetchEvent', mmdd, j, buttonArr[i].outerHTML, idArr);
|
|
14332
|
+
console.log('previous event clicked', buttonArr[indexPrevNext - 1], prevString, indexPrevNext);
|
|
14333
|
+
this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, (this._SfStreamContainer as HTMLDivElement).querySelector('#stream-month-' + this.currentColumnIndex) as HTMLButtonElement, this._SfStreamContainer as HTMLDivElement, prevString, nextString, false, null, null, null, null, null, null, null, true);
|
|
14334
|
+
}
|
|
14335
|
+
|
|
14336
|
+
})
|
|
14337
|
+
|
|
14338
|
+
}
|
|
14339
|
+
|
|
14340
|
+
const titleArr = (this._SfDetailListContainer as HTMLDivElement).querySelectorAll('.button-event-title') as NodeListOf<HTMLButtonElement>;
|
|
14341
|
+
|
|
14342
|
+
for (var i = 0; i < titleArr.length; i++) {
|
|
14343
|
+
let indexPrevNext = i;
|
|
14344
|
+
titleArr[i].addEventListener('click', (ev: any) => {
|
|
14345
|
+
|
|
14346
|
+
const id = ev.target.id;
|
|
14347
|
+
const idArr = id.split("-")
|
|
14348
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
14349
|
+
const j = idArr[5];
|
|
14350
|
+
const module = idArr[6];
|
|
14351
|
+
const flag = idArr[7];
|
|
14352
|
+
if (flag != null && flag == "reportedlocations") {
|
|
14353
|
+
return;
|
|
14354
|
+
}
|
|
14355
|
+
var yyyy = this.getYearFromMonthBetween(this.sdate, this.edate, idArr[3]);
|
|
14356
|
+
if (module === "notice") {
|
|
14357
|
+
this.renderNoticeDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14358
|
+
} else if (module === "contract") {
|
|
14359
|
+
this.fetchContractDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14360
|
+
} else if (module === "license") {
|
|
14361
|
+
this.fetchLicenseDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14362
|
+
} else if (module === "rcmresource") {
|
|
14363
|
+
this.fetchRCMResourceDetails(this.events[mmdd][j], mmdd + "/" + yyyy)
|
|
14364
|
+
} else {
|
|
14365
|
+
let found = false;
|
|
14366
|
+
for (var k = 0; k < this.selectedItemIds.length; k++) {
|
|
14367
|
+
if (this.selectedItemIds[k].indexOf(idArr[3] + '-' + idArr[4] + '-' + idArr[5]) >= 0) {
|
|
14368
|
+
found = true;
|
|
14369
|
+
}
|
|
14370
|
+
}
|
|
14371
|
+
if (!found) {
|
|
14372
|
+
this.selectedItemIds = [];
|
|
14373
|
+
this.selectedItems = [];
|
|
14374
|
+
this.clearButtonSelection();
|
|
14375
|
+
}
|
|
14376
|
+
|
|
14377
|
+
// (this._SfDetailContainer as HTMLDivElement).style.display = 'block'
|
|
14378
|
+
|
|
14379
|
+
|
|
14380
|
+
let prevString = "";
|
|
14381
|
+
let flagPrev = true;
|
|
14382
|
+
let indexPrev = indexPrevNext
|
|
14383
|
+
while (flagPrev) {
|
|
14384
|
+
if (indexPrev > 0) {
|
|
14385
|
+
if (Util.isVisible((titleArr[indexPrev - 1] as HTMLButtonElement))) {
|
|
14386
|
+
prevString = (titleArr[indexPrev - 1] as HTMLButtonElement).id;
|
|
14387
|
+
let prevIdArr = prevString.split("-")
|
|
14388
|
+
if ((prevIdArr[7] ?? "") == "reportedlocations") {
|
|
14389
|
+
prevString = "";
|
|
14390
|
+
indexPrev--;
|
|
14391
|
+
} else {
|
|
14392
|
+
flagPrev = false;
|
|
14393
|
+
}
|
|
14394
|
+
} else {
|
|
14395
|
+
prevString = "";
|
|
14396
|
+
indexPrev--;
|
|
14397
|
+
}
|
|
14398
|
+
} else {
|
|
14399
|
+
flagPrev = false;
|
|
14400
|
+
}
|
|
14401
|
+
}
|
|
14402
|
+
let nextString = "";
|
|
14403
|
+
let flagNext = true;
|
|
14404
|
+
let indexNext = indexPrevNext
|
|
14405
|
+
while (flagNext) {
|
|
14406
|
+
if (indexNext < titleArr.length - 1) {
|
|
14407
|
+
if (Util.isVisible((titleArr[indexNext + 1] as HTMLButtonElement))) {
|
|
14408
|
+
nextString = (titleArr[indexNext + 1] as HTMLButtonElement).id;
|
|
14409
|
+
let nextIdArr = nextString.split("-")
|
|
14410
|
+
if ((nextIdArr[7] ?? "") == "reportedlocations") {
|
|
14411
|
+
nextString = "";
|
|
14412
|
+
indexNext++;
|
|
14413
|
+
} else {
|
|
14414
|
+
flagNext = false;
|
|
14415
|
+
}
|
|
14416
|
+
} else {
|
|
14417
|
+
indexNext++;
|
|
14418
|
+
}
|
|
14419
|
+
} else {
|
|
14420
|
+
flagNext = false;
|
|
14421
|
+
}
|
|
14422
|
+
}
|
|
14423
|
+
// this.renderEventDetail(this.events[mmdd][j], mmdd + "/" + yyyy, null);
|
|
14424
|
+
this.fetchEventDetails(this.events[mmdd][j], mmdd + "/" + yyyy, null, (this._SfStreamContainer as HTMLDivElement), prevString, nextString, false, null, null, null, null, null, null, null, true);
|
|
14425
|
+
}
|
|
14426
|
+
})
|
|
14427
|
+
|
|
14428
|
+
}
|
|
14429
|
+
|
|
14302
14430
|
}
|
|
14303
14431
|
renderEventDetailShort = (compliance: any) => {
|
|
14304
14432
|
var html = `
|
|
@@ -18046,7 +18174,7 @@ export class SfIEvents extends LitElement {
|
|
|
18046
18174
|
}
|
|
18047
18175
|
}
|
|
18048
18176
|
|
|
18049
|
-
fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string = "", nextId: string = "", flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null, reportercomments: string | null = null, approvercomments: string | null = null, inputReportingPercentage: string | null = null, selectReportedLocation: string | null = null, documents: any | null = null, dateOfCompletion: string | null = null) => {
|
|
18177
|
+
fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string = "", nextId: string = "", flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null, reportercomments: string | null = null, approvercomments: string | null = null, inputReportingPercentage: string | null = null, selectReportedLocation: string | null = null, documents: any | null = null, dateOfCompletion: string | null = null, fromDrilldown: boolean = false) => {
|
|
18050
18178
|
console.log('listEvent', listEvent, listEvent.id)
|
|
18051
18179
|
let url = "https://" + this.apiId + "/getalleventdetails";
|
|
18052
18180
|
|
|
@@ -18088,7 +18216,7 @@ export class SfIEvents extends LitElement {
|
|
|
18088
18216
|
this.renderListReporting(listEventContainer, data, mmddyyyy, eventsContainer)
|
|
18089
18217
|
}
|
|
18090
18218
|
} else {
|
|
18091
|
-
this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId);
|
|
18219
|
+
this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer, previousId, nextId, fromDrilldown);
|
|
18092
18220
|
}
|
|
18093
18221
|
|
|
18094
18222
|
} else {
|
|
@@ -18110,7 +18238,7 @@ export class SfIEvents extends LitElement {
|
|
|
18110
18238
|
}
|
|
18111
18239
|
}
|
|
18112
18240
|
|
|
18113
|
-
renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string, nextId: string) => {
|
|
18241
|
+
renderEventDetail = (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, previousId: string, nextId: string, fromDrilldown: boolean) => {
|
|
18114
18242
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
18115
18243
|
console.log('previousid', previousId, 'nextid', nextId);
|
|
18116
18244
|
console.log('confighome', Util.getProjectConfigHome())
|
|
@@ -18470,7 +18598,7 @@ export class SfIEvents extends LitElement {
|
|
|
18470
18598
|
html += '</div>';
|
|
18471
18599
|
|
|
18472
18600
|
if (this.mode == "consumer" || this.mode == "next" || this.mode == "viewer") {
|
|
18473
|
-
if (this.mode != "viewer") {
|
|
18601
|
+
if (this.mode != "viewer" && !fromDrilldown) {
|
|
18474
18602
|
html += '<div part="reporting-view-container" id="reporting-view-container">'
|
|
18475
18603
|
html += this.renderReporting(event, mmddyyyy);
|
|
18476
18604
|
html += "</div>"
|
|
@@ -18776,14 +18904,6 @@ export class SfIEvents extends LitElement {
|
|
|
18776
18904
|
obligation: event.obligation,
|
|
18777
18905
|
}
|
|
18778
18906
|
);
|
|
18779
|
-
// this.uploadTriggerMyEvent(
|
|
18780
|
-
// event.id + ";" + event.shortid,
|
|
18781
|
-
// feedbackMessage.value,
|
|
18782
|
-
// event.countries.join(",").replace(/ *\([^)]*\) */g, ""),
|
|
18783
|
-
// event.entities.join(',').replace(/ *\([^)]*\) */g, ""),
|
|
18784
|
-
// event.locations.join(',').replace(/ *\([^)]*\) */g, ""),
|
|
18785
|
-
// event.statute[0],
|
|
18786
|
-
// event.subcategory[0]);
|
|
18787
18907
|
buttonCancel.click();
|
|
18788
18908
|
buttonClose.click();
|
|
18789
18909
|
}
|
|
@@ -18851,23 +18971,26 @@ export class SfIEvents extends LitElement {
|
|
|
18851
18971
|
if (this._SfUploader[0] != null) {
|
|
18852
18972
|
(this._SfUploader[0].querySelector('#uploader') as SfIUploader)!.emailcontent = emailcontent;
|
|
18853
18973
|
}
|
|
18854
|
-
|
|
18974
|
+
let deleteButtons = eventDetailContainer.querySelectorAll('.button-delete') as NodeListOf<HTMLButtonElement>
|
|
18975
|
+
for (let deleteButton of deleteButtons) {
|
|
18976
|
+
deleteButton?.addEventListener('click', async () => {
|
|
18855
18977
|
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18868
|
-
|
|
18978
|
+
await this.fetchDeleteReview(event["id"], mmddyyyy, event.entityid, event.locationid);
|
|
18979
|
+
this.setSuccess('Deleted successfully!')
|
|
18980
|
+
setTimeout(() => {
|
|
18981
|
+
this.clearMessages()
|
|
18982
|
+
}, 3000);
|
|
18983
|
+
//console.log('deleted', resultDelete);
|
|
18984
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
18985
|
+
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
18986
|
+
} else {
|
|
18987
|
+
// if(currentColumnButton != null) {
|
|
18988
|
+
// currentColumnButton.click();
|
|
18989
|
+
// }
|
|
18990
|
+
}
|
|
18869
18991
|
|
|
18870
|
-
|
|
18992
|
+
});
|
|
18993
|
+
}
|
|
18871
18994
|
eventDetailReportingContainer.querySelector('#button-auto-approve')?.addEventListener('click', async () => {
|
|
18872
18995
|
if (this.selectedItemIds.length <= 1) {
|
|
18873
18996
|
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.module ?? "compliance");
|
|
@@ -19070,7 +19193,7 @@ export class SfIEvents extends LitElement {
|
|
|
19070
19193
|
// }
|
|
19071
19194
|
}
|
|
19072
19195
|
selectReportingLocation.addEventListener('change', (e: any) => {
|
|
19073
|
-
if(selectReportingEntity.value == ""){
|
|
19196
|
+
if (selectReportingEntity.value == "") {
|
|
19074
19197
|
return;
|
|
19075
19198
|
}
|
|
19076
19199
|
let index = parseInt(e.target.id.split('-')[3])
|
|
@@ -22703,6 +22826,9 @@ export class SfIEvents extends LitElement {
|
|
|
22703
22826
|
tempCsvObj['cols_' + colKey] = dataArr[j]
|
|
22704
22827
|
}
|
|
22705
22828
|
}
|
|
22829
|
+
let suspenseKey = tempCsvObj.entityid + ';' + tempCsvObj.locationid + ';' + tempCsvObj.id;
|
|
22830
|
+
tempCsvObj.suspense = (suspenseList[suspenseKey] != null && suspenseList[suspenseKey] != false) ? true : false;
|
|
22831
|
+
|
|
22706
22832
|
csvArray[i] = tempCsvObj
|
|
22707
22833
|
}
|
|
22708
22834
|
console.log('csv array', csvArray)
|
|
@@ -28306,7 +28432,7 @@ export class SfIEvents extends LitElement {
|
|
|
28306
28432
|
|
|
28307
28433
|
uploadTriggerEvent = async (triggeredCompliances: any) => {
|
|
28308
28434
|
|
|
28309
|
-
let url = "https://" + this.apiId + "/
|
|
28435
|
+
let url = "https://" + this.apiId + "/triggerevent1";
|
|
28310
28436
|
|
|
28311
28437
|
const body = {
|
|
28312
28438
|
"projectid": this.projectId,
|