sf-i-events 1.0.927 → 1.0.929
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dev/index.html +4 -4
- package/package.json +1 -1
- package/sf-i-events.d.ts +8 -1
- package/sf-i-events.js +178 -7
- package/src/sf-i-events.ts +205 -8
package/dev/index.html
CHANGED
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
</div>
|
|
809
809
|
|
|
810
810
|
</sf-i-events> -->
|
|
811
|
-
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
811
|
+
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
812
812
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
813
813
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
814
814
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
@@ -833,7 +833,7 @@
|
|
|
833
833
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
834
834
|
</div>
|
|
835
835
|
|
|
836
|
-
</sf-i-events>
|
|
836
|
+
</sf-i-events> -->
|
|
837
837
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
|
|
838
838
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
839
839
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -873,14 +873,14 @@
|
|
|
873
873
|
disablesignoff="yes" disableclientresponse="yes">
|
|
874
874
|
|
|
875
875
|
</sf-i-events> -->
|
|
876
|
-
|
|
876
|
+
<sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
|
|
877
877
|
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"]}}"
|
|
878
878
|
contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
|
|
879
879
|
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
880
880
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile"
|
|
881
881
|
disablesignoff="yes" disableclientresponse="yes">
|
|
882
882
|
|
|
883
|
-
</sf-i-events>
|
|
883
|
+
</sf-i-events>
|
|
884
884
|
<!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
|
|
885
885
|
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
886
886
|
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
package/package.json
CHANGED
package/sf-i-events.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
72
72
|
TAB_FUNCTIONS: string;
|
|
73
73
|
TAB_COUNTRIES: string;
|
|
74
74
|
TAB_CALENDAR: string;
|
|
75
|
+
TAB_SUSPENSE: string;
|
|
75
76
|
TAB_RCM_COMPLIANCES: string;
|
|
76
77
|
TAB_RCM_PROJECTS: string;
|
|
77
78
|
TAB_RCM_DATE: string;
|
|
@@ -270,7 +271,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
270
271
|
locationPartStatusData: any;
|
|
271
272
|
locationLateStatusData: any;
|
|
272
273
|
locationComplianceStatusData: any;
|
|
273
|
-
suspenseCount:
|
|
274
|
+
suspenseCount: number;
|
|
274
275
|
selectedItemIds: Array<string>;
|
|
275
276
|
selectedItems: Array<any>;
|
|
276
277
|
selectedStatus: string;
|
|
@@ -402,6 +403,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
402
403
|
_SfOnboardingSignoffContainer: any;
|
|
403
404
|
_SfOnboardingCalendarListContainer: any;
|
|
404
405
|
_SfOnboardingCalendarContainer: any;
|
|
406
|
+
_SfOnboardingSuspenseContainer: any;
|
|
405
407
|
_SfOnboardingTabGroup0: any;
|
|
406
408
|
_SfOnboardingTabGroup1: any;
|
|
407
409
|
_SfOnboardingTabGroup2: any;
|
|
@@ -572,6 +574,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
572
574
|
loadOnboardingReportedLocations: () => Promise<void>;
|
|
573
575
|
loadOnboardingSignoff: () => Promise<void>;
|
|
574
576
|
loadOnboardingCalendar: () => Promise<void>;
|
|
577
|
+
loadOnboardingSuspense: () => Promise<void>;
|
|
575
578
|
calculateStartAndEndDateOfPast: (index?: number) => {
|
|
576
579
|
startDate: string;
|
|
577
580
|
endDate: string;
|
|
@@ -598,6 +601,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
598
601
|
attachTimelineFilterHandlers: (divContainer: HTMLDivElement) => void;
|
|
599
602
|
getFinancialYear: (mmddyyyy: string) => string;
|
|
600
603
|
getYearFromMonthBetween: (startDateStr: string, endDateStr: string, monthStr: string) => string;
|
|
604
|
+
getCurrentYearGeneric: () => string;
|
|
601
605
|
getCurrentYear: (mm: string) => string;
|
|
602
606
|
clearButtonSelection: () => void;
|
|
603
607
|
clearGraphData: () => void;
|
|
@@ -651,6 +655,7 @@ export declare class SfIEvents extends LitElement {
|
|
|
651
655
|
refreshCalendar: () => Promise<void>;
|
|
652
656
|
renderNewOnboarding: () => void;
|
|
653
657
|
renderOnboardingSignoff: (signoff: any) => void;
|
|
658
|
+
renderOnboardingSuspense: (_suspenseList: any) => void;
|
|
654
659
|
renderOnboardingCalendar: (_calendarJobs: any) => void;
|
|
655
660
|
renderOnboardingTriggers: (mappedTriggers: any, mappedSerializedAlertSchedules: any, triggersJobs: any) => void;
|
|
656
661
|
renderOnboardingInternalControls: (mappedInternalControls: any, mappedSerializedTriggers: any, internalcontrolsJobs: any) => void;
|
|
@@ -832,6 +837,8 @@ export declare class SfIEvents extends LitElement {
|
|
|
832
837
|
fetchRcmNotifications: (projectid: string) => Promise<any>;
|
|
833
838
|
fetchRcmJobs: (complianceid: string) => Promise<any>;
|
|
834
839
|
fetchCalendarJobs: () => Promise<any>;
|
|
840
|
+
deleteFromSuspense: (suspenseKey: any, year: string) => Promise<any>;
|
|
841
|
+
fetchSuspenseList: () => Promise<any>;
|
|
835
842
|
fetchDetail: (value: any) => Promise<void>;
|
|
836
843
|
fetchGetMappedCalendar: (year: string) => Promise<any>;
|
|
837
844
|
sleepFunction: (ms: number) => Promise<unknown>;
|
package/sf-i-events.js
CHANGED
|
@@ -92,6 +92,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
92
92
|
this.TAB_FUNCTIONS = "functions";
|
|
93
93
|
this.TAB_COUNTRIES = "countries";
|
|
94
94
|
this.TAB_CALENDAR = "calendar";
|
|
95
|
+
this.TAB_SUSPENSE = "suspense";
|
|
95
96
|
this.TAB_RCM_COMPLIANCES = "compliances";
|
|
96
97
|
this.TAB_RCM_PROJECTS = "projects";
|
|
97
98
|
this.TAB_RCM_DATE = "date";
|
|
@@ -2403,7 +2404,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
2403
2404
|
html += '<div part="badge-dashboard" id="chip-completeness-1" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-pending">pending</span> <span>Pending Approval:</span> <span id="graph-pending-approval">DASHBOARD_PENDING_APPROVAL</span></div>';
|
|
2404
2405
|
html += '<div part="badge-dashboard" id="chip-completeness-2" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-rejected">block</span> <span>Rejected:</span> <span id="graph-rejected">DASHBOARD_REJECTED</span></div>';
|
|
2405
2406
|
html += '<div part="badge-dashboard" id="chip-completeness-3" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-done">check_circle</span> <span>Approved:</span> <span id="graph-approved">DASHBOARD_APPROVED</span></div>';
|
|
2406
|
-
html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink"><span>Suspense:</span> <span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
|
|
2407
|
+
html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink DASHBOARD_SUSPENSE_CLASS"><span>Suspense:</span> <span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
|
|
2407
2408
|
html += '<div part="badge-dashboard" id="chip-timeliness-0" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-in-time">schedule</span> <span>In Time:</span> <span id="graph-in-time">DASHBOARD_IN_TIME</span></div>';
|
|
2408
2409
|
html += '<div part="badge-dashboard" id="chip-timeliness-1" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-past-due-date">timer</span> <span>Past Due Date:</span> <span id="graph-past-due-date">DASHBOARD_PAST_DUE_DATE</span></div>';
|
|
2409
2410
|
html += '<div part="badge-dashboard" id="chip-timeliness-2" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-late-reported">report_off</span> <span>Late Reported:</span> <span id="graph-late-reported">DASHBOARD_LATE_REPORTED</span></div>';
|
|
@@ -3279,6 +3280,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3279
3280
|
//console.log('renderevents htmlcols', this.htmlDataCompliances);
|
|
3280
3281
|
//console.log('progress', this.period, total, notStarted, approved)
|
|
3281
3282
|
html = html.replace("DASHBOARD_TOTAL", total + "");
|
|
3283
|
+
html = html.replace("DASHBOARD_SUSPENSE_CLASS", (this.suspenseCount > 0) ? "" : " hide");
|
|
3282
3284
|
html = html.replace("DASHBOARD_SUSPENSE", this.suspenseCount + "");
|
|
3283
3285
|
html = html.replace("DASHBOARD_NOT_STARTED", notStarted + "");
|
|
3284
3286
|
html = html.replace("DASHBOARD_APPROVED", approved + "");
|
|
@@ -6766,6 +6768,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6766
6768
|
this._SfOnboardingReportedLocationsContainer.style.display = 'none';
|
|
6767
6769
|
this._SfOnboardingSignoffContainer.style.display = 'none';
|
|
6768
6770
|
this._SfOnboardingCalendarContainer.style.display = 'none';
|
|
6771
|
+
this._SfOnboardingSuspenseContainer.style.display = 'none';
|
|
6769
6772
|
this._SfOnboardingStatutesContainer.innerHTML = '';
|
|
6770
6773
|
this._SfOnboardingCompliancesContainer.innerHTML = '';
|
|
6771
6774
|
this._SfOnboardingCountriesContainer.innerHTML = '';
|
|
@@ -6790,6 +6793,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6790
6793
|
this._SfOnboardingReportedLocationsContainer.innerHTML = '';
|
|
6791
6794
|
this._SfOnboardingSignoffContainer.innerHTML = '';
|
|
6792
6795
|
this._SfOnboardingCalendarContainer.innerHTML = '';
|
|
6796
|
+
this._SfOnboardingSuspenseContainer.innerHTML = '';
|
|
6793
6797
|
};
|
|
6794
6798
|
this.hideRcmTabContainers = async () => {
|
|
6795
6799
|
this._SfRcmComplianceContainer.style.display = 'none';
|
|
@@ -7212,6 +7216,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7212
7216
|
const calendarJobs = await this.fetchCalendarJobs();
|
|
7213
7217
|
this.renderOnboardingCalendar(calendarJobs);
|
|
7214
7218
|
};
|
|
7219
|
+
this.loadOnboardingSuspense = async () => {
|
|
7220
|
+
this.hideTabContainers();
|
|
7221
|
+
this._SfOnboardingSuspenseContainer.style.display = 'flex';
|
|
7222
|
+
const suspenseList = await this.fetchSuspenseList();
|
|
7223
|
+
console.log('suspenseList', suspenseList);
|
|
7224
|
+
this.renderOnboardingSuspense(suspenseList);
|
|
7225
|
+
};
|
|
7215
7226
|
this.calculateStartAndEndDateOfPast = (index = 0) => {
|
|
7216
7227
|
//console.log('calculating start and end of past');
|
|
7217
7228
|
let block = 10;
|
|
@@ -9436,6 +9447,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9436
9447
|
// If no matching month found in the range
|
|
9437
9448
|
return this.calendarStartYYYY;
|
|
9438
9449
|
};
|
|
9450
|
+
this.getCurrentYearGeneric = () => {
|
|
9451
|
+
if (new Date().getMonth() >= 3) {
|
|
9452
|
+
return new Date().getFullYear() + "";
|
|
9453
|
+
}
|
|
9454
|
+
return (new Date().getFullYear() - 1) + "";
|
|
9455
|
+
};
|
|
9439
9456
|
this.getCurrentYear = (mm) => {
|
|
9440
9457
|
// var currMonth = new Date().getMonth() + 1;
|
|
9441
9458
|
// // if(parseInt(mm) < parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
|
|
@@ -13758,10 +13775,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13758
13775
|
html += '<div class="d-flex justify-end w-100 mb-10">';
|
|
13759
13776
|
html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>';
|
|
13760
13777
|
html += '</div>';
|
|
13761
|
-
if (this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
13762
|
-
html += '<div class="d-flex justify-
|
|
13763
|
-
html += '<input part="input" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>';
|
|
13764
|
-
html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">
|
|
13778
|
+
if (this.myRole == this.TAB_FUNCTION_HEAD || this.myRole == this.TAB_VIEWER) {
|
|
13779
|
+
html += '<div part="suspense-container" class="d-flex justify-start w-100">';
|
|
13780
|
+
html += '<input part="input-checkbox" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>';
|
|
13781
|
+
html += '<label part="input-checkbox-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Mark Suspense</label>';
|
|
13765
13782
|
html += '</div>';
|
|
13766
13783
|
}
|
|
13767
13784
|
html += '<div class="d-flex w-100">';
|
|
@@ -14073,7 +14090,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
14073
14090
|
mmddyyyy: mmddyyyy,
|
|
14074
14091
|
eventid: event.id,
|
|
14075
14092
|
entityid: entityId,
|
|
14076
|
-
locationid: locationId
|
|
14093
|
+
locationid: locationId,
|
|
14094
|
+
reporters: event.reporters,
|
|
14095
|
+
approvers: event.approvers,
|
|
14096
|
+
functionheads: event.functionheads,
|
|
14097
|
+
obligationtitle: event.obligationtitle,
|
|
14098
|
+
obligation: event.obligation,
|
|
14077
14099
|
});
|
|
14078
14100
|
// this.uploadTriggerMyEvent(
|
|
14079
14101
|
// event.id + ";" + event.shortid,
|
|
@@ -16916,6 +16938,91 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16916
16938
|
this.loadOnboardingSignoff();
|
|
16917
16939
|
});
|
|
16918
16940
|
};
|
|
16941
|
+
this.renderOnboardingSuspense = (_suspenseList) => {
|
|
16942
|
+
//console.log('calendarjobs', calendarJobs);
|
|
16943
|
+
var _a;
|
|
16944
|
+
var html = '';
|
|
16945
|
+
html += '<div id="suspense-list-container" class="pb-10 pt-10 w-100">';
|
|
16946
|
+
html += '<div class="d-flex justify-center align-center w-100 mt-20 scroll-x">';
|
|
16947
|
+
if (Object.keys(_suspenseList).length === 0) {
|
|
16948
|
+
html += '<div part="no-suspense-title-container" class="d-flex mb-20"><span part="no-suspense-title">No Suspense Items</span></div>';
|
|
16949
|
+
}
|
|
16950
|
+
else {
|
|
16951
|
+
html += '<table>';
|
|
16952
|
+
let tableBodyHtml = '';
|
|
16953
|
+
for (var j = 0; j < Object.keys(_suspenseList).length; j++) {
|
|
16954
|
+
let uniqueKey = Object.keys(_suspenseList)[j];
|
|
16955
|
+
console.log('uniqueKey', uniqueKey);
|
|
16956
|
+
let eventid = uniqueKey.split(';')[2];
|
|
16957
|
+
let suspenseObj = _suspenseList[uniqueKey];
|
|
16958
|
+
console.log('suspenseObj', suspenseObj);
|
|
16959
|
+
tableBodyHtml += '<tr>';
|
|
16960
|
+
tableBodyHtml += ('<td class="td-body left-sticky" part="td-body-suspense"><button part="button-icon" id="button-icon-suspense-done-' + j + '" class="button-icon-suspense-done d-flex align-center"><span class="material-symbols-outlined">done</span> Done</button></td>');
|
|
16961
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventid + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16962
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.obligationtitle + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16963
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.obligation + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16964
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.entityname + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16965
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.locationname + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16966
|
+
let reporters = "";
|
|
16967
|
+
if (suspenseObj.reporters != null && suspenseObj.reporters.length > 0 && Array.isArray(suspenseObj.reporters)) {
|
|
16968
|
+
for (let reporter of suspenseObj.reporters) {
|
|
16969
|
+
reporters += reporter.split(';')[0];
|
|
16970
|
+
if (suspenseObj.reporters.indexOf(reporter) < suspenseObj.reporters.length - 1) {
|
|
16971
|
+
reporters += ', ';
|
|
16972
|
+
}
|
|
16973
|
+
}
|
|
16974
|
+
}
|
|
16975
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + reporters + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16976
|
+
let approvers = "";
|
|
16977
|
+
if (suspenseObj.approvers != null && suspenseObj.approvers.length > 0 && Array.isArray(suspenseObj.approvers)) {
|
|
16978
|
+
for (let approver of suspenseObj.approvers) {
|
|
16979
|
+
approvers += approver.split(';')[0];
|
|
16980
|
+
if (suspenseObj.approvers.indexOf(approver) < suspenseObj.approvers.length - 1) {
|
|
16981
|
+
approvers += ', ';
|
|
16982
|
+
}
|
|
16983
|
+
}
|
|
16984
|
+
}
|
|
16985
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + approvers + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16986
|
+
let functionheads = "";
|
|
16987
|
+
if (suspenseObj.functionheads != null && suspenseObj.functionheads.length > 0 && Array.isArray(suspenseObj.functionheads)) {
|
|
16988
|
+
for (let functionhead of suspenseObj.functionheads) {
|
|
16989
|
+
functionheads += functionhead.split(';')[0];
|
|
16990
|
+
if (suspenseObj.functionheads.indexOf(functionhead) < suspenseObj.functionheads.length - 1) {
|
|
16991
|
+
functionheads += ', ';
|
|
16992
|
+
}
|
|
16993
|
+
}
|
|
16994
|
+
}
|
|
16995
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + functionheads + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16996
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + ((_a = suspenseObj.message) !== null && _a !== void 0 ? _a : "") + '" minLength="30" lineSize="4"></sf-i-elastic-text></td>');
|
|
16997
|
+
tableBodyHtml += '</tr>';
|
|
16998
|
+
}
|
|
16999
|
+
html += '<thead><tr>';
|
|
17000
|
+
html += '<th class="td-body" part="td-body-suspense"><span part="td-head" style="padding-left: 0px !important"></span></th>';
|
|
17001
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Complaince Id</span></th>';
|
|
17002
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Obligation Title</span></th>';
|
|
17003
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Obligation</span></th>';
|
|
17004
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Entity</span></th>';
|
|
17005
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Location</span></th>';
|
|
17006
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Reporter</span></th>';
|
|
17007
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Approver</span></th>';
|
|
17008
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Functionhead</span></th>';
|
|
17009
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Message</span></th>';
|
|
17010
|
+
html += '</tr></thead>';
|
|
17011
|
+
html += tableBodyHtml;
|
|
17012
|
+
html += '</table>';
|
|
17013
|
+
}
|
|
17014
|
+
html += '</div>';
|
|
17015
|
+
html += '</div>';
|
|
17016
|
+
this._SfOnboardingSuspenseContainer.innerHTML = html;
|
|
17017
|
+
const arrButtonsDone = this._SfOnboardingSuspenseContainer.querySelectorAll('.button-icon-suspense-done');
|
|
17018
|
+
for (var i = 0; i < arrButtonsDone.length; i++) {
|
|
17019
|
+
arrButtonsDone[i].addEventListener('click', async (e) => {
|
|
17020
|
+
const id = e.currentTarget.id;
|
|
17021
|
+
const index = id.split("-")[4];
|
|
17022
|
+
await this.deleteFromSuspense(Object.keys(_suspenseList)[index], this.getCurrentYearGeneric());
|
|
17023
|
+
});
|
|
17024
|
+
}
|
|
17025
|
+
};
|
|
16919
17026
|
this.renderOnboardingCalendar = (_calendarJobs) => {
|
|
16920
17027
|
//console.log('calendarjobs', calendarJobs);
|
|
16921
17028
|
var _a;
|
|
@@ -17353,6 +17460,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17353
17460
|
if (this.myOnboardingTab == this.TAB_CALENDAR) {
|
|
17354
17461
|
this._SfOnboardingTabContainer.querySelector('#onboarding-tab-calendar').click();
|
|
17355
17462
|
}
|
|
17463
|
+
if (this.myOnboardingTab == this.TAB_SUSPENSE) {
|
|
17464
|
+
this._SfOnboardingTabContainer.querySelector('#onboarding-tab-suspense').click();
|
|
17465
|
+
}
|
|
17356
17466
|
};
|
|
17357
17467
|
this.renderOnboardingStatus = (status) => {
|
|
17358
17468
|
for (var i = 0; i < status.length; i++) {
|
|
@@ -17444,7 +17554,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17444
17554
|
this._SfOnboardingReportedLocationsContainer.innerHTML = '';
|
|
17445
17555
|
};
|
|
17446
17556
|
this.renderOnboardingTabs = async () => {
|
|
17447
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
|
|
17557
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
17448
17558
|
//console.log('render onboarding tabs', this.myOnboardingTabGroup);
|
|
17449
17559
|
let initialLoad = false;
|
|
17450
17560
|
if (this.myOnboardingTabGroup == "") {
|
|
@@ -17496,6 +17606,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17496
17606
|
html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
|
|
17497
17607
|
html += '<button class="tab-button mb-10" id="onboarding-tab-signoff" part="' + (this.myOnboardingTab == this.TAB_SIGNOFF ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Sign Off<br /><span id="button-status-signoff" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
17498
17608
|
html += '<button class="tab-button mb-10" id="onboarding-tab-calendar" part="' + (this.myOnboardingTab == this.TAB_CALENDAR ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Calendar<br /><span id="button-status-calendar" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
17609
|
+
html += '<button class="tab-button mb-10" id="onboarding-tab-suspense" part="' + (this.myOnboardingTab == this.TAB_SUSPENSE ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Suspense<br /><span id="button-status-suspense" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
17499
17610
|
html += '</div>';
|
|
17500
17611
|
this._SfOnboardingTabContainer.innerHTML = html;
|
|
17501
17612
|
(_a = this._SfOnboardingTabContainer.querySelector('#onboarding-tab-statutes')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', async () => {
|
|
@@ -17618,6 +17729,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17618
17729
|
this.renderOnboardingTabs();
|
|
17619
17730
|
this.loadOnboardingCalendar();
|
|
17620
17731
|
});
|
|
17732
|
+
(_2 = this._SfOnboardingTabContainer.querySelector('#onboarding-tab-suspense')) === null || _2 === void 0 ? void 0 : _2.addEventListener('click', async () => {
|
|
17733
|
+
this.myOnboardingTab = this.TAB_SUSPENSE;
|
|
17734
|
+
this.renderOnboardingTabs();
|
|
17735
|
+
this.loadOnboardingSuspense();
|
|
17736
|
+
console.log('Suspense tab clicked');
|
|
17737
|
+
});
|
|
17621
17738
|
this._SfOnboardingTabGroupButton0.addEventListener('click', () => {
|
|
17622
17739
|
this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
|
|
17623
17740
|
this.hideTabContainers();
|
|
@@ -22512,6 +22629,52 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22512
22629
|
this.setError(jsonRespose.error);
|
|
22513
22630
|
}
|
|
22514
22631
|
};
|
|
22632
|
+
this.deleteFromSuspense = async (suspenseKey, year) => {
|
|
22633
|
+
let url = "https://" + this.apiId + "/deletefromsuspense";
|
|
22634
|
+
//console.log('fetch calendar url', url);
|
|
22635
|
+
let urlBody = { "projectid": this.projectId, "eventid": suspenseKey.split(';')[2], "entityid": suspenseKey.split(';')[0], "locationid": suspenseKey.split(';')[1], "year": year };
|
|
22636
|
+
//console.log('urlbody', urlBody);
|
|
22637
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22638
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
22639
|
+
this._SfLoader.innerHTML = '';
|
|
22640
|
+
if (xhr.status == 200) {
|
|
22641
|
+
const jsonResponse = JSON.parse(xhr.responseText);
|
|
22642
|
+
console.log('jsonResponse', jsonResponse);
|
|
22643
|
+
return jsonResponse;
|
|
22644
|
+
}
|
|
22645
|
+
else {
|
|
22646
|
+
if (xhr.status == 401) {
|
|
22647
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22648
|
+
this.dispatchEvent(changeEvent);
|
|
22649
|
+
}
|
|
22650
|
+
else {
|
|
22651
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22652
|
+
this.setError(jsonRespose.error);
|
|
22653
|
+
}
|
|
22654
|
+
}
|
|
22655
|
+
};
|
|
22656
|
+
this.fetchSuspenseList = async () => {
|
|
22657
|
+
let url = "https://" + this.apiId + "/getsuspenselist";
|
|
22658
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22659
|
+
const year = this.getCurrentYearGeneric();
|
|
22660
|
+
const xhr = (await this.prepareXhr({ "projectid": this.projectId, "year": year }, url, this._SfLoader, authorization));
|
|
22661
|
+
this._SfLoader.innerHTML = '';
|
|
22662
|
+
if (xhr.status == 200) {
|
|
22663
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22664
|
+
//console.log(jsonRespose);
|
|
22665
|
+
let retData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
22666
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
22667
|
+
return retData !== null && retData !== void 0 ? retData : {};
|
|
22668
|
+
}
|
|
22669
|
+
else {
|
|
22670
|
+
if (xhr.status == 401) {
|
|
22671
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22672
|
+
this.dispatchEvent(changeEvent);
|
|
22673
|
+
}
|
|
22674
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22675
|
+
this.setError(jsonRespose.error);
|
|
22676
|
+
}
|
|
22677
|
+
};
|
|
22515
22678
|
this.fetchDetail = async (value) => {
|
|
22516
22679
|
const body = this.getApiBodyList();
|
|
22517
22680
|
body.id = value;
|
|
@@ -22648,6 +22811,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22648
22811
|
let path = "", view = "";
|
|
22649
22812
|
this.sdate = startDate;
|
|
22650
22813
|
this.edate = endDate;
|
|
22814
|
+
this.suspenseCount = 0;
|
|
22651
22815
|
if (this.tagId != null && this.tagId != "") {
|
|
22652
22816
|
view = "tag";
|
|
22653
22817
|
}
|
|
@@ -22757,6 +22921,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22757
22921
|
this.fetchOnlyYearlyUserCalendar = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY, userprofileid = this.userProfileId, userrole = this.myRole, entityid = this.entityId, countryid = this.countryId, locationid = this.locationId, tagid = this.tagId, functionid = this.functionId) => {
|
|
22758
22922
|
var _a;
|
|
22759
22923
|
let path = "", view = "";
|
|
22924
|
+
this.suspenseCount = 0;
|
|
22760
22925
|
if (tagid != null && tagid != "") {
|
|
22761
22926
|
view = "tag";
|
|
22762
22927
|
}
|
|
@@ -24816,6 +24981,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
24816
24981
|
</div>
|
|
24817
24982
|
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
|
|
24818
24983
|
|
|
24984
|
+
</div>
|
|
24985
|
+
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
|
|
24986
|
+
|
|
24819
24987
|
</div>
|
|
24820
24988
|
</div>
|
|
24821
24989
|
|
|
@@ -26981,6 +27149,9 @@ __decorate([
|
|
|
26981
27149
|
__decorate([
|
|
26982
27150
|
query('#calendar-container')
|
|
26983
27151
|
], SfIEvents.prototype, "_SfOnboardingCalendarContainer", void 0);
|
|
27152
|
+
__decorate([
|
|
27153
|
+
query('#suspense-container')
|
|
27154
|
+
], SfIEvents.prototype, "_SfOnboardingSuspenseContainer", void 0);
|
|
26984
27155
|
__decorate([
|
|
26985
27156
|
query('#onboarding-tab-group-0')
|
|
26986
27157
|
], SfIEvents.prototype, "_SfOnboardingTabGroup0", void 0);
|
package/src/sf-i-events.ts
CHANGED
|
@@ -95,6 +95,7 @@ export class SfIEvents extends LitElement {
|
|
|
95
95
|
TAB_FUNCTIONS = "functions";
|
|
96
96
|
TAB_COUNTRIES = "countries";
|
|
97
97
|
TAB_CALENDAR = "calendar";
|
|
98
|
+
TAB_SUSPENSE = "suspense";
|
|
98
99
|
TAB_RCM_COMPLIANCES = "compliances";
|
|
99
100
|
TAB_RCM_PROJECTS = "projects";
|
|
100
101
|
TAB_RCM_DATE = "date";
|
|
@@ -1618,7 +1619,7 @@ export class SfIEvents extends LitElement {
|
|
|
1618
1619
|
locationComplianceStatusData: any = null;
|
|
1619
1620
|
|
|
1620
1621
|
@property()
|
|
1621
|
-
suspenseCount:
|
|
1622
|
+
suspenseCount: number = 0;
|
|
1622
1623
|
|
|
1623
1624
|
@property({ type: Array })
|
|
1624
1625
|
selectedItemIds: Array<string> = [];
|
|
@@ -3062,6 +3063,9 @@ export class SfIEvents extends LitElement {
|
|
|
3062
3063
|
@query('#calendar-container')
|
|
3063
3064
|
_SfOnboardingCalendarContainer: any;
|
|
3064
3065
|
|
|
3066
|
+
@query('#suspense-container')
|
|
3067
|
+
_SfOnboardingSuspenseContainer: any;
|
|
3068
|
+
|
|
3065
3069
|
@query('#onboarding-tab-group-0')
|
|
3066
3070
|
_SfOnboardingTabGroup0: any;
|
|
3067
3071
|
|
|
@@ -4581,7 +4585,7 @@ export class SfIEvents extends LitElement {
|
|
|
4581
4585
|
html += '<div part="badge-dashboard" id="chip-completeness-1" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-pending">pending</span> <span>Pending Approval:</span> <span id="graph-pending-approval">DASHBOARD_PENDING_APPROVAL</span></div>';
|
|
4582
4586
|
html += '<div part="badge-dashboard" id="chip-completeness-2" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-rejected">block</span> <span>Rejected:</span> <span id="graph-rejected">DASHBOARD_REJECTED</span></div>';
|
|
4583
4587
|
html += '<div part="badge-dashboard" id="chip-completeness-3" class="chip stat-completeness d-flex justify-center align-center mr-10 mb-10 no-shrink"><span class="material-symbols-outlined color-done">check_circle</span> <span>Approved:</span> <span id="graph-approved">DASHBOARD_APPROVED</span></div>';
|
|
4584
|
-
html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink"><span>Suspense:</span> <span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
|
|
4588
|
+
html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink DASHBOARD_SUSPENSE_CLASS"><span>Suspense:</span> <span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
|
|
4585
4589
|
|
|
4586
4590
|
html += '<div part="badge-dashboard" id="chip-timeliness-0" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-in-time">schedule</span> <span>In Time:</span> <span id="graph-in-time">DASHBOARD_IN_TIME</span></div>';
|
|
4587
4591
|
html += '<div part="badge-dashboard" id="chip-timeliness-1" class="chip stat-timeliness justify-center align-center mr-10 mb-10 no-shrink late-statuses"><span class="material-icons color-past-due-date">timer</span> <span>Past Due Date:</span> <span id="graph-past-due-date">DASHBOARD_PAST_DUE_DATE</span></div>';
|
|
@@ -5573,6 +5577,7 @@ export class SfIEvents extends LitElement {
|
|
|
5573
5577
|
//console.log('progress', this.period, total, notStarted, approved)
|
|
5574
5578
|
|
|
5575
5579
|
html = html.replace("DASHBOARD_TOTAL", total + "");
|
|
5580
|
+
html = html.replace("DASHBOARD_SUSPENSE_CLASS", (this.suspenseCount > 0) ? "" : " hide");
|
|
5576
5581
|
html = html.replace("DASHBOARD_SUSPENSE", this.suspenseCount + "");
|
|
5577
5582
|
html = html.replace("DASHBOARD_NOT_STARTED", notStarted + "");
|
|
5578
5583
|
html = html.replace("DASHBOARD_APPROVED", approved + "");
|
|
@@ -9521,6 +9526,7 @@ export class SfIEvents extends LitElement {
|
|
|
9521
9526
|
(this._SfOnboardingReportedLocationsContainer as HTMLDivElement).style.display = 'none';
|
|
9522
9527
|
(this._SfOnboardingSignoffContainer as HTMLDivElement).style.display = 'none';
|
|
9523
9528
|
(this._SfOnboardingCalendarContainer as HTMLDivElement).style.display = 'none';
|
|
9529
|
+
(this._SfOnboardingSuspenseContainer as HTMLDivElement).style.display = 'none';
|
|
9524
9530
|
|
|
9525
9531
|
(this._SfOnboardingStatutesContainer as HTMLDivElement).innerHTML = '';
|
|
9526
9532
|
(this._SfOnboardingCompliancesContainer as HTMLDivElement).innerHTML = '';
|
|
@@ -9546,6 +9552,7 @@ export class SfIEvents extends LitElement {
|
|
|
9546
9552
|
(this._SfOnboardingReportedLocationsContainer as HTMLDivElement).innerHTML = '';
|
|
9547
9553
|
(this._SfOnboardingSignoffContainer as HTMLDivElement).innerHTML = '';
|
|
9548
9554
|
(this._SfOnboardingCalendarContainer as HTMLDivElement).innerHTML = '';
|
|
9555
|
+
(this._SfOnboardingSuspenseContainer as HTMLDivElement).innerHTML = '';
|
|
9549
9556
|
|
|
9550
9557
|
}
|
|
9551
9558
|
|
|
@@ -10058,6 +10065,14 @@ export class SfIEvents extends LitElement {
|
|
|
10058
10065
|
this.renderOnboardingCalendar(calendarJobs);
|
|
10059
10066
|
}
|
|
10060
10067
|
|
|
10068
|
+
loadOnboardingSuspense = async () => {
|
|
10069
|
+
this.hideTabContainers();
|
|
10070
|
+
(this._SfOnboardingSuspenseContainer as HTMLDivElement).style.display = 'flex';
|
|
10071
|
+
const suspenseList = await this.fetchSuspenseList();
|
|
10072
|
+
console.log('suspenseList', suspenseList);
|
|
10073
|
+
this.renderOnboardingSuspense(suspenseList);
|
|
10074
|
+
}
|
|
10075
|
+
|
|
10061
10076
|
calculateStartAndEndDateOfPast = (index: number = 0) => {
|
|
10062
10077
|
|
|
10063
10078
|
//console.log('calculating start and end of past');
|
|
@@ -12749,6 +12764,12 @@ export class SfIEvents extends LitElement {
|
|
|
12749
12764
|
return this.calendarStartYYYY;
|
|
12750
12765
|
}
|
|
12751
12766
|
|
|
12767
|
+
getCurrentYearGeneric = () => {
|
|
12768
|
+
if (new Date().getMonth() >= 3) {
|
|
12769
|
+
return new Date().getFullYear() + ""
|
|
12770
|
+
}
|
|
12771
|
+
return (new Date().getFullYear() - 1) + ""
|
|
12772
|
+
}
|
|
12752
12773
|
|
|
12753
12774
|
getCurrentYear = (mm: string) => {
|
|
12754
12775
|
|
|
@@ -17771,10 +17792,10 @@ export class SfIEvents extends LitElement {
|
|
|
17771
17792
|
html += '<div class="d-flex justify-end w-100 mb-10">'
|
|
17772
17793
|
html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>'
|
|
17773
17794
|
html += '</div>'
|
|
17774
|
-
if(this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
17775
|
-
html += '<div class="d-flex justify-
|
|
17776
|
-
html += '<input part="input" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
|
|
17777
|
-
html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">
|
|
17795
|
+
if (this.myRole == this.TAB_FUNCTION_HEAD || this.myRole == this.TAB_VIEWER) {
|
|
17796
|
+
html += '<div part="suspense-container" class="d-flex justify-start w-100">'
|
|
17797
|
+
html += '<input part="input-checkbox" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
|
|
17798
|
+
html += '<label part="input-checkbox-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Mark Suspense</label>'
|
|
17778
17799
|
html += '</div>'
|
|
17779
17800
|
}
|
|
17780
17801
|
html += '<div class="d-flex w-100">'
|
|
@@ -18137,7 +18158,7 @@ export class SfIEvents extends LitElement {
|
|
|
18137
18158
|
} else {
|
|
18138
18159
|
feedbackMessage.setAttribute('style', 'border:');
|
|
18139
18160
|
let feedbackSuspenseVal = false
|
|
18140
|
-
if(feedbackSuspense != null && feedbackSuspense.checked){
|
|
18161
|
+
if (feedbackSuspense != null && feedbackSuspense.checked) {
|
|
18141
18162
|
feedbackSuspenseVal = true
|
|
18142
18163
|
}
|
|
18143
18164
|
this.uploadTriggerMyEvent(
|
|
@@ -18153,7 +18174,12 @@ export class SfIEvents extends LitElement {
|
|
|
18153
18174
|
mmddyyyy: mmddyyyy,
|
|
18154
18175
|
eventid: event.id,
|
|
18155
18176
|
entityid: entityId,
|
|
18156
|
-
locationid: locationId
|
|
18177
|
+
locationid: locationId,
|
|
18178
|
+
reporters: event.reporters,
|
|
18179
|
+
approvers: event.approvers,
|
|
18180
|
+
functionheads: event.functionheads,
|
|
18181
|
+
obligationtitle: event.obligationtitle,
|
|
18182
|
+
obligation: event.obligation,
|
|
18157
18183
|
}
|
|
18158
18184
|
);
|
|
18159
18185
|
// this.uploadTriggerMyEvent(
|
|
@@ -21698,6 +21724,104 @@ export class SfIEvents extends LitElement {
|
|
|
21698
21724
|
|
|
21699
21725
|
}
|
|
21700
21726
|
|
|
21727
|
+
renderOnboardingSuspense = (_suspenseList: any) => {
|
|
21728
|
+
|
|
21729
|
+
//console.log('calendarjobs', calendarJobs);
|
|
21730
|
+
|
|
21731
|
+
var html = '';
|
|
21732
|
+
|
|
21733
|
+
html += '<div id="suspense-list-container" class="pb-10 pt-10 w-100">';
|
|
21734
|
+
|
|
21735
|
+
|
|
21736
|
+
|
|
21737
|
+
html += '<div class="d-flex justify-center align-center w-100 mt-20 scroll-x">';
|
|
21738
|
+
if (Object.keys(_suspenseList).length === 0) {
|
|
21739
|
+
html += '<div part="no-suspense-title-container" class="d-flex mb-20"><span part="no-suspense-title">No Suspense Items</span></div>';
|
|
21740
|
+
} else {
|
|
21741
|
+
html += '<table>';
|
|
21742
|
+
let tableBodyHtml = ''
|
|
21743
|
+
for (var j = 0; j < Object.keys(_suspenseList).length; j++) {
|
|
21744
|
+
|
|
21745
|
+
let uniqueKey = Object.keys(_suspenseList)[j];
|
|
21746
|
+
console.log('uniqueKey', uniqueKey);
|
|
21747
|
+
let eventid = uniqueKey.split(';')[2];
|
|
21748
|
+
let suspenseObj = _suspenseList[uniqueKey];
|
|
21749
|
+
console.log('suspenseObj', suspenseObj);
|
|
21750
|
+
tableBodyHtml += '<tr>';
|
|
21751
|
+
tableBodyHtml += ('<td class="td-body left-sticky" part="td-body-suspense"><button part="button-icon" id="button-icon-suspense-done-' + j + '" class="button-icon-suspense-done d-flex align-center"><span class="material-symbols-outlined">done</span> Done</button></td>');
|
|
21752
|
+
|
|
21753
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + eventid + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21754
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.obligationtitle + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21755
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.obligation + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21756
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.entityname + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21757
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.locationname + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21758
|
+
let reporters = ""
|
|
21759
|
+
if (suspenseObj.reporters != null && suspenseObj.reporters.length > 0 && Array.isArray(suspenseObj.reporters)) {
|
|
21760
|
+
for (let reporter of suspenseObj.reporters) {
|
|
21761
|
+
reporters += reporter.split(';')[0]
|
|
21762
|
+
if (suspenseObj.reporters.indexOf(reporter) < suspenseObj.reporters.length - 1) {
|
|
21763
|
+
reporters += ', '
|
|
21764
|
+
}
|
|
21765
|
+
}
|
|
21766
|
+
}
|
|
21767
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + reporters + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21768
|
+
let approvers = ""
|
|
21769
|
+
if (suspenseObj.approvers != null && suspenseObj.approvers.length > 0 && Array.isArray(suspenseObj.approvers)) {
|
|
21770
|
+
for (let approver of suspenseObj.approvers) {
|
|
21771
|
+
approvers += approver.split(';')[0]
|
|
21772
|
+
if (suspenseObj.approvers.indexOf(approver) < suspenseObj.approvers.length - 1) {
|
|
21773
|
+
approvers += ', '
|
|
21774
|
+
}
|
|
21775
|
+
}
|
|
21776
|
+
}
|
|
21777
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + approvers + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21778
|
+
let functionheads = ""
|
|
21779
|
+
if (suspenseObj.functionheads != null && suspenseObj.functionheads.length > 0 && Array.isArray(suspenseObj.functionheads)) {
|
|
21780
|
+
for (let functionhead of suspenseObj.functionheads) {
|
|
21781
|
+
functionheads += functionhead.split(';')[0]
|
|
21782
|
+
if (suspenseObj.functionheads.indexOf(functionhead) < suspenseObj.functionheads.length - 1) {
|
|
21783
|
+
functionheads += ', '
|
|
21784
|
+
}
|
|
21785
|
+
}
|
|
21786
|
+
}
|
|
21787
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + functionheads + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21788
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + (suspenseObj.message ?? "") + '" minLength="30" lineSize="4"></sf-i-elastic-text></td>');
|
|
21789
|
+
tableBodyHtml += '</tr>';
|
|
21790
|
+
}
|
|
21791
|
+
html += '<thead><tr>';
|
|
21792
|
+
html += '<th class="td-body" part="td-body-suspense"><span part="td-head" style="padding-left: 0px !important"></span></th>'
|
|
21793
|
+
|
|
21794
|
+
|
|
21795
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Complaince Id</span></th>'
|
|
21796
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Obligation Title</span></th>'
|
|
21797
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Obligation</span></th>'
|
|
21798
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Entity</span></th>'
|
|
21799
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Location</span></th>'
|
|
21800
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Reporter</span></th>'
|
|
21801
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Approver</span></th>'
|
|
21802
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Functionhead</span></th>'
|
|
21803
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Message</span></th>'
|
|
21804
|
+
|
|
21805
|
+
html += '</tr></thead>';
|
|
21806
|
+
html += tableBodyHtml;
|
|
21807
|
+
html += '</table>';
|
|
21808
|
+
}
|
|
21809
|
+
html += '</div>';
|
|
21810
|
+
|
|
21811
|
+
html += '</div>';
|
|
21812
|
+
|
|
21813
|
+
(this._SfOnboardingSuspenseContainer as HTMLDivElement).innerHTML = html;
|
|
21814
|
+
|
|
21815
|
+
const arrButtonsDone = (this._SfOnboardingSuspenseContainer as HTMLDivElement).querySelectorAll('.button-icon-suspense-done') as NodeListOf<HTMLInputElement>;
|
|
21816
|
+
for (var i = 0; i < arrButtonsDone.length; i++) {
|
|
21817
|
+
arrButtonsDone[i].addEventListener('click', async (e: any) => {
|
|
21818
|
+
const id = e.currentTarget.id;
|
|
21819
|
+
const index = id.split("-")[4];
|
|
21820
|
+
await this.deleteFromSuspense(Object.keys(_suspenseList)[index], this.getCurrentYearGeneric());
|
|
21821
|
+
});
|
|
21822
|
+
}
|
|
21823
|
+
}
|
|
21824
|
+
|
|
21701
21825
|
renderOnboardingCalendar = (_calendarJobs: any) => {
|
|
21702
21826
|
|
|
21703
21827
|
//console.log('calendarjobs', calendarJobs);
|
|
@@ -22336,6 +22460,9 @@ export class SfIEvents extends LitElement {
|
|
|
22336
22460
|
if (this.myOnboardingTab == this.TAB_CALENDAR) {
|
|
22337
22461
|
((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-calendar') as HTMLButtonElement).click();
|
|
22338
22462
|
}
|
|
22463
|
+
if (this.myOnboardingTab == this.TAB_SUSPENSE) {
|
|
22464
|
+
((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-suspense') as HTMLButtonElement).click();
|
|
22465
|
+
}
|
|
22339
22466
|
|
|
22340
22467
|
}
|
|
22341
22468
|
|
|
@@ -22501,6 +22628,7 @@ export class SfIEvents extends LitElement {
|
|
|
22501
22628
|
html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
|
|
22502
22629
|
html += '<button class="tab-button mb-10" id="onboarding-tab-signoff" part="' + (this.myOnboardingTab == this.TAB_SIGNOFF ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Sign Off<br /><span id="button-status-signoff" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
22503
22630
|
html += '<button class="tab-button mb-10" id="onboarding-tab-calendar" part="' + (this.myOnboardingTab == this.TAB_CALENDAR ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Calendar<br /><span id="button-status-calendar" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
22631
|
+
html += '<button class="tab-button mb-10" id="onboarding-tab-suspense" part="' + (this.myOnboardingTab == this.TAB_SUSPENSE ? 'calendar-tab-button-selected' : 'calendar-tab-button-not-selected') + '">Suspense<br /><span id="button-status-suspense" class="d-flex button-status align-center justify-center" part="button-status">...</span></button>';
|
|
22504
22632
|
html += '</div>';
|
|
22505
22633
|
|
|
22506
22634
|
(this._SfOnboardingTabContainer as HTMLDivElement).innerHTML = html;
|
|
@@ -22697,6 +22825,15 @@ export class SfIEvents extends LitElement {
|
|
|
22697
22825
|
|
|
22698
22826
|
});
|
|
22699
22827
|
|
|
22828
|
+
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-suspense')?.addEventListener('click', async () => {
|
|
22829
|
+
|
|
22830
|
+
this.myOnboardingTab = this.TAB_SUSPENSE;
|
|
22831
|
+
this.renderOnboardingTabs();
|
|
22832
|
+
this.loadOnboardingSuspense();
|
|
22833
|
+
console.log('Suspense tab clicked')
|
|
22834
|
+
|
|
22835
|
+
});
|
|
22836
|
+
|
|
22700
22837
|
(this._SfOnboardingTabGroupButton0 as HTMLDivElement).addEventListener('click', () => {
|
|
22701
22838
|
|
|
22702
22839
|
this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
|
|
@@ -28714,6 +28851,61 @@ export class SfIEvents extends LitElement {
|
|
|
28714
28851
|
|
|
28715
28852
|
}
|
|
28716
28853
|
|
|
28854
|
+
deleteFromSuspense = async (suspenseKey: any, year: string) => {
|
|
28855
|
+
let url = "https://" + this.apiId + "/deletefromsuspense";
|
|
28856
|
+
|
|
28857
|
+
//console.log('fetch calendar url', url);
|
|
28858
|
+
let urlBody: any = { "projectid": this.projectId, "eventid": suspenseKey.split(';')[2], "entityid": suspenseKey.split(';')[0], "locationid": suspenseKey.split(';')[1], "year": year };
|
|
28859
|
+
|
|
28860
|
+
//console.log('urlbody', urlBody);
|
|
28861
|
+
|
|
28862
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
28863
|
+
const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
|
|
28864
|
+
this._SfLoader.innerHTML = '';
|
|
28865
|
+
if (xhr.status == 200) {
|
|
28866
|
+
|
|
28867
|
+
const jsonResponse = JSON.parse(xhr.responseText);
|
|
28868
|
+
console.log('jsonResponse', jsonResponse);
|
|
28869
|
+
return jsonResponse;
|
|
28870
|
+
} else {
|
|
28871
|
+
if (xhr.status == 401) {
|
|
28872
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28873
|
+
this.dispatchEvent(changeEvent);
|
|
28874
|
+
} else {
|
|
28875
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28876
|
+
this.setError(jsonRespose.error);
|
|
28877
|
+
}
|
|
28878
|
+
|
|
28879
|
+
}
|
|
28880
|
+
}
|
|
28881
|
+
|
|
28882
|
+
fetchSuspenseList = async () => {
|
|
28883
|
+
|
|
28884
|
+
let url = "https://" + this.apiId + "/getsuspenselist";
|
|
28885
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
28886
|
+
const year = this.getCurrentYearGeneric();
|
|
28887
|
+
const xhr: any = (await this.prepareXhr({ "projectid": this.projectId, "year": year }, url, this._SfLoader, authorization)) as any;
|
|
28888
|
+
this._SfLoader.innerHTML = '';
|
|
28889
|
+
if (xhr.status == 200) {
|
|
28890
|
+
|
|
28891
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28892
|
+
//console.log(jsonRespose);
|
|
28893
|
+
let retData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
28894
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
28895
|
+
return retData ?? {};
|
|
28896
|
+
|
|
28897
|
+
} else {
|
|
28898
|
+
if (xhr.status == 401) {
|
|
28899
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28900
|
+
this.dispatchEvent(changeEvent);
|
|
28901
|
+
}
|
|
28902
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28903
|
+
this.setError(jsonRespose.error);
|
|
28904
|
+
|
|
28905
|
+
}
|
|
28906
|
+
|
|
28907
|
+
}
|
|
28908
|
+
|
|
28717
28909
|
fetchDetail = async (value: any) => {
|
|
28718
28910
|
|
|
28719
28911
|
const body: any = this.getApiBodyList();
|
|
@@ -28871,6 +29063,7 @@ export class SfIEvents extends LitElement {
|
|
|
28871
29063
|
let path = "", view = "";
|
|
28872
29064
|
this.sdate = startDate;
|
|
28873
29065
|
this.edate = endDate;
|
|
29066
|
+
this.suspenseCount = 0;
|
|
28874
29067
|
if (this.tagId != null && this.tagId != "") {
|
|
28875
29068
|
view = "tag";
|
|
28876
29069
|
} else if (this.countryId != null && this.countryId != "") {
|
|
@@ -29012,6 +29205,7 @@ export class SfIEvents extends LitElement {
|
|
|
29012
29205
|
fetchOnlyYearlyUserCalendar = async (startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00", year: string = this.calendarStartYYYY, userprofileid: string = this.userProfileId, userrole: string = this.myRole, entityid = this.entityId, countryid = this.countryId, locationid = this.locationId, tagid = this.tagId, functionid = this.functionId) => {
|
|
29013
29206
|
|
|
29014
29207
|
let path = "", view = "";
|
|
29208
|
+
this.suspenseCount = 0;
|
|
29015
29209
|
if (tagid != null && tagid != "") {
|
|
29016
29210
|
view = "tag";
|
|
29017
29211
|
} else if (countryid != null && countryid != "") {
|
|
@@ -31332,6 +31526,9 @@ export class SfIEvents extends LitElement {
|
|
|
31332
31526
|
</div>
|
|
31333
31527
|
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
|
|
31334
31528
|
|
|
31529
|
+
</div>
|
|
31530
|
+
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
|
|
31531
|
+
|
|
31335
31532
|
</div>
|
|
31336
31533
|
</div>
|
|
31337
31534
|
|