sf-i-events 1.0.927 → 1.0.928
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 +159 -4
- package/src/sf-i-events.ts +187 -6
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)) {
|
|
@@ -13760,7 +13777,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13760
13777
|
html += '</div>';
|
|
13761
13778
|
if (this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
13762
13779
|
html += '<div class="d-flex justify-end w-100">';
|
|
13763
|
-
html += '<input
|
|
13780
|
+
html += '<input id="feedback-suspense" class="mb-10 hide" type="checkbox"/>';
|
|
13764
13781
|
html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>';
|
|
13765
13782
|
html += '</div>';
|
|
13766
13783
|
}
|
|
@@ -14073,7 +14090,9 @@ 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,
|
|
14077
14096
|
});
|
|
14078
14097
|
// this.uploadTriggerMyEvent(
|
|
14079
14098
|
// event.id + ";" + event.shortid,
|
|
@@ -16916,6 +16935,78 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16916
16935
|
this.loadOnboardingSignoff();
|
|
16917
16936
|
});
|
|
16918
16937
|
};
|
|
16938
|
+
this.renderOnboardingSuspense = (_suspenseList) => {
|
|
16939
|
+
//console.log('calendarjobs', calendarJobs);
|
|
16940
|
+
var _a;
|
|
16941
|
+
var html = '';
|
|
16942
|
+
html += '<div id="suspense-list-container" class="pb-10 pt-10 w-100">';
|
|
16943
|
+
html += '<div class="d-flex justify-center align-center w-100 mt-20 scroll-x">';
|
|
16944
|
+
if (Object.keys(_suspenseList).length === 0) {
|
|
16945
|
+
html += '<div part="rcm-section-title" class="d-flex mb-20"><span>No Suspense Items</span></div>';
|
|
16946
|
+
}
|
|
16947
|
+
else {
|
|
16948
|
+
html += '<table>';
|
|
16949
|
+
let tableBodyHtml = '';
|
|
16950
|
+
for (var j = 0; j < Object.keys(_suspenseList).length; j++) {
|
|
16951
|
+
let uniqueKey = Object.keys(_suspenseList)[j];
|
|
16952
|
+
console.log('uniqueKey', uniqueKey);
|
|
16953
|
+
let eventid = uniqueKey.split(';')[3];
|
|
16954
|
+
let suspenseObj = _suspenseList[uniqueKey];
|
|
16955
|
+
console.log('suspenseObj', suspenseObj);
|
|
16956
|
+
tableBodyHtml += '<tr>';
|
|
16957
|
+
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>');
|
|
16958
|
+
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>');
|
|
16959
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.mmddyyyy + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
16960
|
+
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>');
|
|
16961
|
+
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>');
|
|
16962
|
+
let reporters = "";
|
|
16963
|
+
if (suspenseObj.reporters != null && suspenseObj.reporters.length > 0 && Array.isArray(suspenseObj.reporters)) {
|
|
16964
|
+
for (let reporter of suspenseObj.reporters) {
|
|
16965
|
+
reporters += reporter.split(';')[0];
|
|
16966
|
+
if (suspenseObj.reporters.indexOf(reporter) < suspenseObj.reporters.length - 1) {
|
|
16967
|
+
reporters += ', ';
|
|
16968
|
+
}
|
|
16969
|
+
}
|
|
16970
|
+
}
|
|
16971
|
+
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>');
|
|
16972
|
+
let approvers = "";
|
|
16973
|
+
if (suspenseObj.approvers != null && suspenseObj.approvers.length > 0 && Array.isArray(suspenseObj.approvers)) {
|
|
16974
|
+
for (let approver of suspenseObj.approvers) {
|
|
16975
|
+
approvers += approver.split(';')[0];
|
|
16976
|
+
if (suspenseObj.approvers.indexOf(approver) < suspenseObj.approvers.length - 1) {
|
|
16977
|
+
approvers += ', ';
|
|
16978
|
+
}
|
|
16979
|
+
}
|
|
16980
|
+
}
|
|
16981
|
+
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>');
|
|
16982
|
+
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>');
|
|
16983
|
+
tableBodyHtml += '</tr>';
|
|
16984
|
+
}
|
|
16985
|
+
html += '<thead><tr>';
|
|
16986
|
+
html += '<th class="td-body" part="td-body-suspense"><span part="td-head" style="padding-left: 0px !important"></span></th>';
|
|
16987
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Complaince Id</span></th>';
|
|
16988
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Due Date</span></th>';
|
|
16989
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Entity</span></th>';
|
|
16990
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Location</span></th>';
|
|
16991
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Reporter</span></th>';
|
|
16992
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Approver</span></th>';
|
|
16993
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Message</span></th>';
|
|
16994
|
+
html += '</tr></thead>';
|
|
16995
|
+
html += tableBodyHtml;
|
|
16996
|
+
html += '</table>';
|
|
16997
|
+
}
|
|
16998
|
+
html += '</div>';
|
|
16999
|
+
html += '</div>';
|
|
17000
|
+
this._SfOnboardingSuspenseContainer.innerHTML = html;
|
|
17001
|
+
const arrButtonsDone = this._SfOnboardingSuspenseContainer.querySelectorAll('.button-icon-suspense-done');
|
|
17002
|
+
for (var i = 0; i < arrButtonsDone.length; i++) {
|
|
17003
|
+
arrButtonsDone[i].addEventListener('click', async (e) => {
|
|
17004
|
+
const id = e.currentTarget.id;
|
|
17005
|
+
const index = id.split("-")[4];
|
|
17006
|
+
await this.deleteFromSuspense(Object.keys(_suspenseList)[index], this.getCurrentYearGeneric());
|
|
17007
|
+
});
|
|
17008
|
+
}
|
|
17009
|
+
};
|
|
16919
17010
|
this.renderOnboardingCalendar = (_calendarJobs) => {
|
|
16920
17011
|
//console.log('calendarjobs', calendarJobs);
|
|
16921
17012
|
var _a;
|
|
@@ -17353,6 +17444,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17353
17444
|
if (this.myOnboardingTab == this.TAB_CALENDAR) {
|
|
17354
17445
|
this._SfOnboardingTabContainer.querySelector('#onboarding-tab-calendar').click();
|
|
17355
17446
|
}
|
|
17447
|
+
if (this.myOnboardingTab == this.TAB_SUSPENSE) {
|
|
17448
|
+
this._SfOnboardingTabContainer.querySelector('#onboarding-tab-suspense').click();
|
|
17449
|
+
}
|
|
17356
17450
|
};
|
|
17357
17451
|
this.renderOnboardingStatus = (status) => {
|
|
17358
17452
|
for (var i = 0; i < status.length; i++) {
|
|
@@ -17444,7 +17538,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17444
17538
|
this._SfOnboardingReportedLocationsContainer.innerHTML = '';
|
|
17445
17539
|
};
|
|
17446
17540
|
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;
|
|
17541
|
+
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
17542
|
//console.log('render onboarding tabs', this.myOnboardingTabGroup);
|
|
17449
17543
|
let initialLoad = false;
|
|
17450
17544
|
if (this.myOnboardingTabGroup == "") {
|
|
@@ -17496,6 +17590,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17496
17590
|
html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
|
|
17497
17591
|
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
17592
|
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>';
|
|
17593
|
+
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
17594
|
html += '</div>';
|
|
17500
17595
|
this._SfOnboardingTabContainer.innerHTML = html;
|
|
17501
17596
|
(_a = this._SfOnboardingTabContainer.querySelector('#onboarding-tab-statutes')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', async () => {
|
|
@@ -17618,6 +17713,12 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17618
17713
|
this.renderOnboardingTabs();
|
|
17619
17714
|
this.loadOnboardingCalendar();
|
|
17620
17715
|
});
|
|
17716
|
+
(_2 = this._SfOnboardingTabContainer.querySelector('#onboarding-tab-suspense')) === null || _2 === void 0 ? void 0 : _2.addEventListener('click', async () => {
|
|
17717
|
+
this.myOnboardingTab = this.TAB_SUSPENSE;
|
|
17718
|
+
this.renderOnboardingTabs();
|
|
17719
|
+
this.loadOnboardingSuspense();
|
|
17720
|
+
console.log('Suspense tab clicked');
|
|
17721
|
+
});
|
|
17621
17722
|
this._SfOnboardingTabGroupButton0.addEventListener('click', () => {
|
|
17622
17723
|
this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
|
|
17623
17724
|
this.hideTabContainers();
|
|
@@ -22512,6 +22613,52 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22512
22613
|
this.setError(jsonRespose.error);
|
|
22513
22614
|
}
|
|
22514
22615
|
};
|
|
22616
|
+
this.deleteFromSuspense = async (suspenseKey, year) => {
|
|
22617
|
+
let url = "https://" + this.apiId + "/deletefromsuspense";
|
|
22618
|
+
//console.log('fetch calendar url', url);
|
|
22619
|
+
let urlBody = { "projectid": this.projectId, "eventid": suspenseKey.split(';')[3], "entityid": suspenseKey.split(';')[1], "locationid": suspenseKey.split(';')[2], "mmddyyyy": suspenseKey.split(';')[0], "year": year };
|
|
22620
|
+
//console.log('urlbody', urlBody);
|
|
22621
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22622
|
+
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
22623
|
+
this._SfLoader.innerHTML = '';
|
|
22624
|
+
if (xhr.status == 200) {
|
|
22625
|
+
const jsonResponse = JSON.parse(xhr.responseText);
|
|
22626
|
+
console.log('jsonResponse', jsonResponse);
|
|
22627
|
+
return jsonResponse;
|
|
22628
|
+
}
|
|
22629
|
+
else {
|
|
22630
|
+
if (xhr.status == 401) {
|
|
22631
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22632
|
+
this.dispatchEvent(changeEvent);
|
|
22633
|
+
}
|
|
22634
|
+
else {
|
|
22635
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22636
|
+
this.setError(jsonRespose.error);
|
|
22637
|
+
}
|
|
22638
|
+
}
|
|
22639
|
+
};
|
|
22640
|
+
this.fetchSuspenseList = async () => {
|
|
22641
|
+
let url = "https://" + this.apiId + "/getsuspenselist";
|
|
22642
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22643
|
+
const year = this.getCurrentYearGeneric();
|
|
22644
|
+
const xhr = (await this.prepareXhr({ "projectid": this.projectId, "year": year }, url, this._SfLoader, authorization));
|
|
22645
|
+
this._SfLoader.innerHTML = '';
|
|
22646
|
+
if (xhr.status == 200) {
|
|
22647
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22648
|
+
//console.log(jsonRespose);
|
|
22649
|
+
let retData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
22650
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
22651
|
+
return retData !== null && retData !== void 0 ? retData : {};
|
|
22652
|
+
}
|
|
22653
|
+
else {
|
|
22654
|
+
if (xhr.status == 401) {
|
|
22655
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
22656
|
+
this.dispatchEvent(changeEvent);
|
|
22657
|
+
}
|
|
22658
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
22659
|
+
this.setError(jsonRespose.error);
|
|
22660
|
+
}
|
|
22661
|
+
};
|
|
22515
22662
|
this.fetchDetail = async (value) => {
|
|
22516
22663
|
const body = this.getApiBodyList();
|
|
22517
22664
|
body.id = value;
|
|
@@ -22648,6 +22795,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22648
22795
|
let path = "", view = "";
|
|
22649
22796
|
this.sdate = startDate;
|
|
22650
22797
|
this.edate = endDate;
|
|
22798
|
+
this.suspenseCount = 0;
|
|
22651
22799
|
if (this.tagId != null && this.tagId != "") {
|
|
22652
22800
|
view = "tag";
|
|
22653
22801
|
}
|
|
@@ -22757,6 +22905,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
22757
22905
|
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
22906
|
var _a;
|
|
22759
22907
|
let path = "", view = "";
|
|
22908
|
+
this.suspenseCount = 0;
|
|
22760
22909
|
if (tagid != null && tagid != "") {
|
|
22761
22910
|
view = "tag";
|
|
22762
22911
|
}
|
|
@@ -24816,6 +24965,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
24816
24965
|
</div>
|
|
24817
24966
|
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
|
|
24818
24967
|
|
|
24968
|
+
</div>
|
|
24969
|
+
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
|
|
24970
|
+
|
|
24819
24971
|
</div>
|
|
24820
24972
|
</div>
|
|
24821
24973
|
|
|
@@ -26981,6 +27133,9 @@ __decorate([
|
|
|
26981
27133
|
__decorate([
|
|
26982
27134
|
query('#calendar-container')
|
|
26983
27135
|
], SfIEvents.prototype, "_SfOnboardingCalendarContainer", void 0);
|
|
27136
|
+
__decorate([
|
|
27137
|
+
query('#suspense-container')
|
|
27138
|
+
], SfIEvents.prototype, "_SfOnboardingSuspenseContainer", void 0);
|
|
26984
27139
|
__decorate([
|
|
26985
27140
|
query('#onboarding-tab-group-0')
|
|
26986
27141
|
], 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,9 +17792,9 @@ 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) {
|
|
17795
|
+
if (this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
17775
17796
|
html += '<div class="d-flex justify-end w-100">'
|
|
17776
|
-
html += '<input
|
|
17797
|
+
html += '<input id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
|
|
17777
17798
|
html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>'
|
|
17778
17799
|
html += '</div>'
|
|
17779
17800
|
}
|
|
@@ -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,9 @@ 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,
|
|
18157
18180
|
}
|
|
18158
18181
|
);
|
|
18159
18182
|
// this.uploadTriggerMyEvent(
|
|
@@ -21698,6 +21721,91 @@ export class SfIEvents extends LitElement {
|
|
|
21698
21721
|
|
|
21699
21722
|
}
|
|
21700
21723
|
|
|
21724
|
+
renderOnboardingSuspense = (_suspenseList: any) => {
|
|
21725
|
+
|
|
21726
|
+
//console.log('calendarjobs', calendarJobs);
|
|
21727
|
+
|
|
21728
|
+
var html = '';
|
|
21729
|
+
|
|
21730
|
+
html += '<div id="suspense-list-container" class="pb-10 pt-10 w-100">';
|
|
21731
|
+
|
|
21732
|
+
|
|
21733
|
+
|
|
21734
|
+
html += '<div class="d-flex justify-center align-center w-100 mt-20 scroll-x">';
|
|
21735
|
+
if (Object.keys(_suspenseList).length === 0) {
|
|
21736
|
+
html += '<div part="rcm-section-title" class="d-flex mb-20"><span>No Suspense Items</span></div>';
|
|
21737
|
+
} else {
|
|
21738
|
+
html += '<table>';
|
|
21739
|
+
let tableBodyHtml = ''
|
|
21740
|
+
for (var j = 0; j < Object.keys(_suspenseList).length; j++) {
|
|
21741
|
+
|
|
21742
|
+
let uniqueKey = Object.keys(_suspenseList)[j];
|
|
21743
|
+
console.log('uniqueKey', uniqueKey);
|
|
21744
|
+
let eventid = uniqueKey.split(';')[3];
|
|
21745
|
+
let suspenseObj = _suspenseList[uniqueKey];
|
|
21746
|
+
console.log('suspenseObj', suspenseObj);
|
|
21747
|
+
tableBodyHtml += '<tr>';
|
|
21748
|
+
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>');
|
|
21749
|
+
|
|
21750
|
+
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>');
|
|
21751
|
+
tableBodyHtml += ('<td class="td-body" part="td-body-suspense"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + suspenseObj.mmddyyyy + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
|
|
21752
|
+
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>');
|
|
21753
|
+
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>');
|
|
21754
|
+
let reporters = ""
|
|
21755
|
+
if (suspenseObj.reporters != null && suspenseObj.reporters.length > 0 && Array.isArray(suspenseObj.reporters)) {
|
|
21756
|
+
for (let reporter of suspenseObj.reporters) {
|
|
21757
|
+
reporters += reporter.split(';')[0]
|
|
21758
|
+
if (suspenseObj.reporters.indexOf(reporter) < suspenseObj.reporters.length - 1) {
|
|
21759
|
+
reporters += ', '
|
|
21760
|
+
}
|
|
21761
|
+
}
|
|
21762
|
+
}
|
|
21763
|
+
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>');
|
|
21764
|
+
let approvers = ""
|
|
21765
|
+
if (suspenseObj.approvers != null && suspenseObj.approvers.length > 0 && Array.isArray(suspenseObj.approvers)) {
|
|
21766
|
+
for (let approver of suspenseObj.approvers) {
|
|
21767
|
+
approvers += approver.split(';')[0]
|
|
21768
|
+
if (suspenseObj.approvers.indexOf(approver) < suspenseObj.approvers.length - 1) {
|
|
21769
|
+
approvers += ', '
|
|
21770
|
+
}
|
|
21771
|
+
}
|
|
21772
|
+
}
|
|
21773
|
+
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>');
|
|
21774
|
+
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>');
|
|
21775
|
+
tableBodyHtml += '</tr>';
|
|
21776
|
+
}
|
|
21777
|
+
html += '<thead><tr>';
|
|
21778
|
+
html += '<th class="td-body" part="td-body-suspense"><span part="td-head" style="padding-left: 0px !important"></span></th>'
|
|
21779
|
+
|
|
21780
|
+
|
|
21781
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Complaince Id</span></th>'
|
|
21782
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Due Date</span></th>'
|
|
21783
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Entity</span></th>'
|
|
21784
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Location</span></th>'
|
|
21785
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Reporter</span></th>'
|
|
21786
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Approver</span></th>'
|
|
21787
|
+
html += '<th class="td-body" part="td-body-suspense"><div class="d-flex align-start"><span part="td-head">Message</span></th>'
|
|
21788
|
+
|
|
21789
|
+
html += '</tr></thead>';
|
|
21790
|
+
html += tableBodyHtml;
|
|
21791
|
+
html += '</table>';
|
|
21792
|
+
}
|
|
21793
|
+
html += '</div>';
|
|
21794
|
+
|
|
21795
|
+
html += '</div>';
|
|
21796
|
+
|
|
21797
|
+
(this._SfOnboardingSuspenseContainer as HTMLDivElement).innerHTML = html;
|
|
21798
|
+
|
|
21799
|
+
const arrButtonsDone = (this._SfOnboardingSuspenseContainer as HTMLDivElement).querySelectorAll('.button-icon-suspense-done') as NodeListOf<HTMLInputElement>;
|
|
21800
|
+
for (var i = 0; i < arrButtonsDone.length; i++) {
|
|
21801
|
+
arrButtonsDone[i].addEventListener('click', async (e: any) => {
|
|
21802
|
+
const id = e.currentTarget.id;
|
|
21803
|
+
const index = id.split("-")[4];
|
|
21804
|
+
await this.deleteFromSuspense(Object.keys(_suspenseList)[index], this.getCurrentYearGeneric());
|
|
21805
|
+
});
|
|
21806
|
+
}
|
|
21807
|
+
}
|
|
21808
|
+
|
|
21701
21809
|
renderOnboardingCalendar = (_calendarJobs: any) => {
|
|
21702
21810
|
|
|
21703
21811
|
//console.log('calendarjobs', calendarJobs);
|
|
@@ -22336,6 +22444,9 @@ export class SfIEvents extends LitElement {
|
|
|
22336
22444
|
if (this.myOnboardingTab == this.TAB_CALENDAR) {
|
|
22337
22445
|
((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-calendar') as HTMLButtonElement).click();
|
|
22338
22446
|
}
|
|
22447
|
+
if (this.myOnboardingTab == this.TAB_SUSPENSE) {
|
|
22448
|
+
((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-suspense') as HTMLButtonElement).click();
|
|
22449
|
+
}
|
|
22339
22450
|
|
|
22340
22451
|
}
|
|
22341
22452
|
|
|
@@ -22501,6 +22612,7 @@ export class SfIEvents extends LitElement {
|
|
|
22501
22612
|
html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
|
|
22502
22613
|
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
22614
|
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>';
|
|
22615
|
+
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
22616
|
html += '</div>';
|
|
22505
22617
|
|
|
22506
22618
|
(this._SfOnboardingTabContainer as HTMLDivElement).innerHTML = html;
|
|
@@ -22697,6 +22809,15 @@ export class SfIEvents extends LitElement {
|
|
|
22697
22809
|
|
|
22698
22810
|
});
|
|
22699
22811
|
|
|
22812
|
+
(this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-suspense')?.addEventListener('click', async () => {
|
|
22813
|
+
|
|
22814
|
+
this.myOnboardingTab = this.TAB_SUSPENSE;
|
|
22815
|
+
this.renderOnboardingTabs();
|
|
22816
|
+
this.loadOnboardingSuspense();
|
|
22817
|
+
console.log('Suspense tab clicked')
|
|
22818
|
+
|
|
22819
|
+
});
|
|
22820
|
+
|
|
22700
22821
|
(this._SfOnboardingTabGroupButton0 as HTMLDivElement).addEventListener('click', () => {
|
|
22701
22822
|
|
|
22702
22823
|
this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
|
|
@@ -28714,6 +28835,61 @@ export class SfIEvents extends LitElement {
|
|
|
28714
28835
|
|
|
28715
28836
|
}
|
|
28716
28837
|
|
|
28838
|
+
deleteFromSuspense = async (suspenseKey: any, year: string) => {
|
|
28839
|
+
let url = "https://" + this.apiId + "/deletefromsuspense";
|
|
28840
|
+
|
|
28841
|
+
//console.log('fetch calendar url', url);
|
|
28842
|
+
let urlBody: any = { "projectid": this.projectId, "eventid": suspenseKey.split(';')[3], "entityid": suspenseKey.split(';')[1], "locationid": suspenseKey.split(';')[2], "mmddyyyy": suspenseKey.split(';')[0], "year": year };
|
|
28843
|
+
|
|
28844
|
+
//console.log('urlbody', urlBody);
|
|
28845
|
+
|
|
28846
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
28847
|
+
const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
|
|
28848
|
+
this._SfLoader.innerHTML = '';
|
|
28849
|
+
if (xhr.status == 200) {
|
|
28850
|
+
|
|
28851
|
+
const jsonResponse = JSON.parse(xhr.responseText);
|
|
28852
|
+
console.log('jsonResponse', jsonResponse);
|
|
28853
|
+
return jsonResponse;
|
|
28854
|
+
} else {
|
|
28855
|
+
if (xhr.status == 401) {
|
|
28856
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28857
|
+
this.dispatchEvent(changeEvent);
|
|
28858
|
+
} else {
|
|
28859
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28860
|
+
this.setError(jsonRespose.error);
|
|
28861
|
+
}
|
|
28862
|
+
|
|
28863
|
+
}
|
|
28864
|
+
}
|
|
28865
|
+
|
|
28866
|
+
fetchSuspenseList = async () => {
|
|
28867
|
+
|
|
28868
|
+
let url = "https://" + this.apiId + "/getsuspenselist";
|
|
28869
|
+
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
28870
|
+
const year = this.getCurrentYearGeneric();
|
|
28871
|
+
const xhr: any = (await this.prepareXhr({ "projectid": this.projectId, "year": year }, url, this._SfLoader, authorization)) as any;
|
|
28872
|
+
this._SfLoader.innerHTML = '';
|
|
28873
|
+
if (xhr.status == 200) {
|
|
28874
|
+
|
|
28875
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28876
|
+
//console.log(jsonRespose);
|
|
28877
|
+
let retData = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
28878
|
+
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
28879
|
+
return retData ?? {};
|
|
28880
|
+
|
|
28881
|
+
} else {
|
|
28882
|
+
if (xhr.status == 401) {
|
|
28883
|
+
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
28884
|
+
this.dispatchEvent(changeEvent);
|
|
28885
|
+
}
|
|
28886
|
+
const jsonRespose = JSON.parse(xhr.responseText);
|
|
28887
|
+
this.setError(jsonRespose.error);
|
|
28888
|
+
|
|
28889
|
+
}
|
|
28890
|
+
|
|
28891
|
+
}
|
|
28892
|
+
|
|
28717
28893
|
fetchDetail = async (value: any) => {
|
|
28718
28894
|
|
|
28719
28895
|
const body: any = this.getApiBodyList();
|
|
@@ -28871,6 +29047,7 @@ export class SfIEvents extends LitElement {
|
|
|
28871
29047
|
let path = "", view = "";
|
|
28872
29048
|
this.sdate = startDate;
|
|
28873
29049
|
this.edate = endDate;
|
|
29050
|
+
this.suspenseCount = 0;
|
|
28874
29051
|
if (this.tagId != null && this.tagId != "") {
|
|
28875
29052
|
view = "tag";
|
|
28876
29053
|
} else if (this.countryId != null && this.countryId != "") {
|
|
@@ -29012,6 +29189,7 @@ export class SfIEvents extends LitElement {
|
|
|
29012
29189
|
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
29190
|
|
|
29014
29191
|
let path = "", view = "";
|
|
29192
|
+
this.suspenseCount = 0;
|
|
29015
29193
|
if (tagid != null && tagid != "") {
|
|
29016
29194
|
view = "tag";
|
|
29017
29195
|
} else if (countryid != null && countryid != "") {
|
|
@@ -31332,6 +31510,9 @@ export class SfIEvents extends LitElement {
|
|
|
31332
31510
|
</div>
|
|
31333
31511
|
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
|
|
31334
31512
|
|
|
31513
|
+
</div>
|
|
31514
|
+
<div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
|
|
31515
|
+
|
|
31335
31516
|
</div>
|
|
31336
31517
|
</div>
|
|
31337
31518
|
|