sf-i-events 1.0.926 → 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 CHANGED
@@ -732,7 +732,7 @@
732
732
  <!-- <sf-i-events projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" projectname="Khaitan" mode="onboarding" locations="{}" contractstartdate="01/01/2025" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
733
733
 
734
734
  </sf-i-events> -->
735
- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
735
+ <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
736
736
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
737
737
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
738
738
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -759,7 +759,7 @@
759
759
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
760
760
  </div>
761
761
 
762
- </sf-i-events>
762
+ </sf-i-events> -->
763
763
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
764
764
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
765
765
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
@@ -873,14 +873,14 @@
873
873
  disablesignoff="yes" disableclientresponse="yes">
874
874
 
875
875
  </sf-i-events> -->
876
- <!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
876
+ <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
877
877
  locations="{&quot;India&quot;:{&quot;Maharashtra&quot;:[&quot;Pune&quot;,&quot;Mumbai&quot;],&quot;Telangana&quot;:[&quot;Telangana&quot;]},&quot;Canada&quot;:{&quot;CanadaSO&quot;:[&quot;CanadaLO&quot;]},&quot;Singapore&quot;:{&quot;SingaporeSO&quot;:[&quot;Orchard&quot;,&quot;Raffles&quot;,&quot;Robinson&quot;,&quot;Tanjong&quot;,&quot;Tras&quot;]},&quot;United Kingdom&quot;:{&quot;UnitedSO&quot;:[&quot;UnitedLO&quot;]},&quot;United States of America&quot;:{&quot;AmericaSO&quot;:[&quot;AmericaLO&quot;]}}"
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.926",
4
+ "version": "1.0.928",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
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,6 +271,7 @@ export declare class SfIEvents extends LitElement {
270
271
  locationPartStatusData: any;
271
272
  locationLateStatusData: any;
272
273
  locationComplianceStatusData: any;
274
+ suspenseCount: number;
273
275
  selectedItemIds: Array<string>;
274
276
  selectedItems: Array<any>;
275
277
  selectedStatus: string;
@@ -401,6 +403,7 @@ export declare class SfIEvents extends LitElement {
401
403
  _SfOnboardingSignoffContainer: any;
402
404
  _SfOnboardingCalendarListContainer: any;
403
405
  _SfOnboardingCalendarContainer: any;
406
+ _SfOnboardingSuspenseContainer: any;
404
407
  _SfOnboardingTabGroup0: any;
405
408
  _SfOnboardingTabGroup1: any;
406
409
  _SfOnboardingTabGroup2: any;
@@ -571,6 +574,7 @@ export declare class SfIEvents extends LitElement {
571
574
  loadOnboardingReportedLocations: () => Promise<void>;
572
575
  loadOnboardingSignoff: () => Promise<void>;
573
576
  loadOnboardingCalendar: () => Promise<void>;
577
+ loadOnboardingSuspense: () => Promise<void>;
574
578
  calculateStartAndEndDateOfPast: (index?: number) => {
575
579
  startDate: string;
576
580
  endDate: string;
@@ -597,6 +601,7 @@ export declare class SfIEvents extends LitElement {
597
601
  attachTimelineFilterHandlers: (divContainer: HTMLDivElement) => void;
598
602
  getFinancialYear: (mmddyyyy: string) => string;
599
603
  getYearFromMonthBetween: (startDateStr: string, endDateStr: string, monthStr: string) => string;
604
+ getCurrentYearGeneric: () => string;
600
605
  getCurrentYear: (mm: string) => string;
601
606
  clearButtonSelection: () => void;
602
607
  clearGraphData: () => void;
@@ -650,6 +655,7 @@ export declare class SfIEvents extends LitElement {
650
655
  refreshCalendar: () => Promise<void>;
651
656
  renderNewOnboarding: () => void;
652
657
  renderOnboardingSignoff: (signoff: any) => void;
658
+ renderOnboardingSuspense: (_suspenseList: any) => void;
653
659
  renderOnboardingCalendar: (_calendarJobs: any) => void;
654
660
  renderOnboardingTriggers: (mappedTriggers: any, mappedSerializedAlertSchedules: any, triggersJobs: any) => void;
655
661
  renderOnboardingInternalControls: (mappedInternalControls: any, mappedSerializedTriggers: any, internalcontrolsJobs: any) => void;
@@ -831,6 +837,8 @@ export declare class SfIEvents extends LitElement {
831
837
  fetchRcmNotifications: (projectid: string) => Promise<any>;
832
838
  fetchRcmJobs: (complianceid: string) => Promise<any>;
833
839
  fetchCalendarJobs: () => Promise<any>;
840
+ deleteFromSuspense: (suspenseKey: any, year: string) => Promise<any>;
841
+ fetchSuspenseList: () => Promise<any>;
834
842
  fetchDetail: (value: any) => Promise<void>;
835
843
  fetchGetMappedCalendar: (year: string) => Promise<any>;
836
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";
@@ -1226,6 +1227,7 @@ let SfIEvents = class SfIEvents extends LitElement {
1226
1227
  this.locationPartStatusData = null;
1227
1228
  this.locationLateStatusData = null;
1228
1229
  this.locationComplianceStatusData = null;
1230
+ this.suspenseCount = 0;
1229
1231
  this.selectedItemIds = [];
1230
1232
  this.selectedItems = [];
1231
1233
  this.selectedStatus = "";
@@ -2402,6 +2404,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2402
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>&nbsp;&nbsp;<span>Pending Approval:</span>&nbsp;<span id="graph-pending-approval">DASHBOARD_PENDING_APPROVAL</span></div>';
2403
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>&nbsp;&nbsp;<span>Rejected:</span>&nbsp;<span id="graph-rejected">DASHBOARD_REJECTED</span></div>';
2404
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>&nbsp;&nbsp;<span>Approved:</span>&nbsp;<span id="graph-approved">DASHBOARD_APPROVED</span></div>';
2407
+ html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink DASHBOARD_SUSPENSE_CLASS"><span>Suspense:</span>&nbsp;<span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
2405
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>&nbsp;&nbsp;<span>In Time:</span>&nbsp;<span id="graph-in-time">DASHBOARD_IN_TIME</span></div>';
2406
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>&nbsp;&nbsp;<span>Past Due Date:</span>&nbsp;<span id="graph-past-due-date">DASHBOARD_PAST_DUE_DATE</span></div>';
2407
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>&nbsp;&nbsp;<span>Late Reported:</span>&nbsp;<span id="graph-late-reported">DASHBOARD_LATE_REPORTED</span></div>';
@@ -3277,6 +3280,8 @@ let SfIEvents = class SfIEvents extends LitElement {
3277
3280
  //console.log('renderevents htmlcols', this.htmlDataCompliances);
3278
3281
  //console.log('progress', this.period, total, notStarted, approved)
3279
3282
  html = html.replace("DASHBOARD_TOTAL", total + "");
3283
+ html = html.replace("DASHBOARD_SUSPENSE_CLASS", (this.suspenseCount > 0) ? "" : " hide");
3284
+ html = html.replace("DASHBOARD_SUSPENSE", this.suspenseCount + "");
3280
3285
  html = html.replace("DASHBOARD_NOT_STARTED", notStarted + "");
3281
3286
  html = html.replace("DASHBOARD_APPROVED", approved + "");
3282
3287
  html = html.replace("DASHBOARD_PENDING_APPROVAL", pendingApproval + "");
@@ -6763,6 +6768,7 @@ let SfIEvents = class SfIEvents extends LitElement {
6763
6768
  this._SfOnboardingReportedLocationsContainer.style.display = 'none';
6764
6769
  this._SfOnboardingSignoffContainer.style.display = 'none';
6765
6770
  this._SfOnboardingCalendarContainer.style.display = 'none';
6771
+ this._SfOnboardingSuspenseContainer.style.display = 'none';
6766
6772
  this._SfOnboardingStatutesContainer.innerHTML = '';
6767
6773
  this._SfOnboardingCompliancesContainer.innerHTML = '';
6768
6774
  this._SfOnboardingCountriesContainer.innerHTML = '';
@@ -6787,6 +6793,7 @@ let SfIEvents = class SfIEvents extends LitElement {
6787
6793
  this._SfOnboardingReportedLocationsContainer.innerHTML = '';
6788
6794
  this._SfOnboardingSignoffContainer.innerHTML = '';
6789
6795
  this._SfOnboardingCalendarContainer.innerHTML = '';
6796
+ this._SfOnboardingSuspenseContainer.innerHTML = '';
6790
6797
  };
6791
6798
  this.hideRcmTabContainers = async () => {
6792
6799
  this._SfRcmComplianceContainer.style.display = 'none';
@@ -7209,6 +7216,13 @@ let SfIEvents = class SfIEvents extends LitElement {
7209
7216
  const calendarJobs = await this.fetchCalendarJobs();
7210
7217
  this.renderOnboardingCalendar(calendarJobs);
7211
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
+ };
7212
7226
  this.calculateStartAndEndDateOfPast = (index = 0) => {
7213
7227
  //console.log('calculating start and end of past');
7214
7228
  let block = 10;
@@ -9433,6 +9447,12 @@ let SfIEvents = class SfIEvents extends LitElement {
9433
9447
  // If no matching month found in the range
9434
9448
  return this.calendarStartYYYY;
9435
9449
  };
9450
+ this.getCurrentYearGeneric = () => {
9451
+ if (new Date().getMonth() >= 3) {
9452
+ return new Date().getFullYear() + "";
9453
+ }
9454
+ return (new Date().getFullYear() - 1) + "";
9455
+ };
9436
9456
  this.getCurrentYear = (mm) => {
9437
9457
  // var currMonth = new Date().getMonth() + 1;
9438
9458
  // // if(parseInt(mm) < parseInt(this.calendarStartMM) && currMonth < parseInt(this.calendarStartMM)) {
@@ -13755,10 +13775,12 @@ let SfIEvents = class SfIEvents extends LitElement {
13755
13775
  html += '<div class="d-flex justify-end w-100 mb-10">';
13756
13776
  html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>';
13757
13777
  html += '</div>';
13758
- // html += '<div class="d-flex justify-end w-100">'
13759
- // html += '<input part="input" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
13760
- // html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>'
13761
- // html += '</div>'
13778
+ if (this.myRole == this.TAB_FUNCTION_HEAD) {
13779
+ html += '<div class="d-flex justify-end w-100">';
13780
+ html += '<input id="feedback-suspense" class="mb-10 hide" type="checkbox"/>';
13781
+ html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>';
13782
+ html += '</div>';
13783
+ }
13762
13784
  html += '<div class="d-flex w-100">';
13763
13785
  html += ('<button part="button-lg-short" id="button-feedback" class="d-flex justify-center align-center"><span class="material-symbols-outlined">comment</span><span>&nbsp;&nbsp;Send Feedback</span></button>');
13764
13786
  html += ('<button part="button-lg-short-secondary" id="button-feedback-cancel" class="hide d-flex justify-center align-center mr-10"><span class="material-symbols-outlined">close</span><span>&nbsp;&nbsp;Cancel</span></button>');
@@ -14068,7 +14090,9 @@ let SfIEvents = class SfIEvents extends LitElement {
14068
14090
  mmddyyyy: mmddyyyy,
14069
14091
  eventid: event.id,
14070
14092
  entityid: entityId,
14071
- locationid: locationId
14093
+ locationid: locationId,
14094
+ reporters: event.reporters,
14095
+ approvers: event.approvers,
14072
14096
  });
14073
14097
  // this.uploadTriggerMyEvent(
14074
14098
  // event.id + ";" + event.shortid,
@@ -16911,6 +16935,78 @@ let SfIEvents = class SfIEvents extends LitElement {
16911
16935
  this.loadOnboardingSignoff();
16912
16936
  });
16913
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>&nbsp;&nbsp;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
+ };
16914
17010
  this.renderOnboardingCalendar = (_calendarJobs) => {
16915
17011
  //console.log('calendarjobs', calendarJobs);
16916
17012
  var _a;
@@ -17348,6 +17444,9 @@ let SfIEvents = class SfIEvents extends LitElement {
17348
17444
  if (this.myOnboardingTab == this.TAB_CALENDAR) {
17349
17445
  this._SfOnboardingTabContainer.querySelector('#onboarding-tab-calendar').click();
17350
17446
  }
17447
+ if (this.myOnboardingTab == this.TAB_SUSPENSE) {
17448
+ this._SfOnboardingTabContainer.querySelector('#onboarding-tab-suspense').click();
17449
+ }
17351
17450
  };
17352
17451
  this.renderOnboardingStatus = (status) => {
17353
17452
  for (var i = 0; i < status.length; i++) {
@@ -17439,7 +17538,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17439
17538
  this._SfOnboardingReportedLocationsContainer.innerHTML = '';
17440
17539
  };
17441
17540
  this.renderOnboardingTabs = async () => {
17442
- 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;
17443
17542
  //console.log('render onboarding tabs', this.myOnboardingTabGroup);
17444
17543
  let initialLoad = false;
17445
17544
  if (this.myOnboardingTabGroup == "") {
@@ -17491,6 +17590,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17491
17590
  html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
17492
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>';
17493
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>';
17494
17594
  html += '</div>';
17495
17595
  this._SfOnboardingTabContainer.innerHTML = html;
17496
17596
  (_a = this._SfOnboardingTabContainer.querySelector('#onboarding-tab-statutes')) === null || _a === void 0 ? void 0 : _a.addEventListener('click', async () => {
@@ -17613,6 +17713,12 @@ let SfIEvents = class SfIEvents extends LitElement {
17613
17713
  this.renderOnboardingTabs();
17614
17714
  this.loadOnboardingCalendar();
17615
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
+ });
17616
17722
  this._SfOnboardingTabGroupButton0.addEventListener('click', () => {
17617
17723
  this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
17618
17724
  this.hideTabContainers();
@@ -22507,6 +22613,52 @@ let SfIEvents = class SfIEvents extends LitElement {
22507
22613
  this.setError(jsonRespose.error);
22508
22614
  }
22509
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
+ };
22510
22662
  this.fetchDetail = async (value) => {
22511
22663
  const body = this.getApiBodyList();
22512
22664
  body.id = value;
@@ -22639,9 +22791,11 @@ let SfIEvents = class SfIEvents extends LitElement {
22639
22791
  }
22640
22792
  };
22641
22793
  this.fetchAndYearlyRenderUserCalendar_2 = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY) => {
22794
+ var _a;
22642
22795
  let path = "", view = "";
22643
22796
  this.sdate = startDate;
22644
22797
  this.edate = endDate;
22798
+ this.suspenseCount = 0;
22645
22799
  if (this.tagId != null && this.tagId != "") {
22646
22800
  view = "tag";
22647
22801
  }
@@ -22654,7 +22808,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22654
22808
  else {
22655
22809
  view = "entity";
22656
22810
  }
22657
- path = "getallcountryevents3";
22811
+ path = "getallcountryevents4";
22658
22812
  let sDate = "";
22659
22813
  let eDate = "";
22660
22814
  //console.log('currenttab', this.getCurrentTab());
@@ -22689,6 +22843,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22689
22843
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
22690
22844
  if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
22691
22845
  this.lastupdated = Util.getDateTimeStrings(new Date().getTime());
22846
+ this.suspenseCount = (_a = jsonRespose.suspensecount) !== null && _a !== void 0 ? _a : 0;
22692
22847
  console.log('rendering appropriate string', list, this.selectedTab);
22693
22848
  this.renderAppropriateStream(startDate, endDate, true);
22694
22849
  this.fetchBulkReportingData();
@@ -22748,7 +22903,9 @@ let SfIEvents = class SfIEvents extends LitElement {
22748
22903
  }
22749
22904
  };
22750
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) => {
22906
+ var _a;
22751
22907
  let path = "", view = "";
22908
+ this.suspenseCount = 0;
22752
22909
  if (tagid != null && tagid != "") {
22753
22910
  view = "tag";
22754
22911
  }
@@ -22761,7 +22918,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22761
22918
  else {
22762
22919
  view = "entity";
22763
22920
  }
22764
- path = "getallcountryevents3";
22921
+ path = "getallcountryevents4";
22765
22922
  let url = "https://" + this.apiId + "/" + path;
22766
22923
  let temptagid = tagid;
22767
22924
  if (temptagid == "" && locationid != "") {
@@ -22788,6 +22945,7 @@ let SfIEvents = class SfIEvents extends LitElement {
22788
22945
  // if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
22789
22946
  this.events = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
22790
22947
  // }
22948
+ this.suspenseCount = (_a = jsonRespose.suspensecount) !== null && _a !== void 0 ? _a : 0;
22791
22949
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
22792
22950
  }
22793
22951
  else {
@@ -24234,7 +24392,7 @@ let SfIEvents = class SfIEvents extends LitElement {
24234
24392
  day = '0' + day;
24235
24393
  let eDate = month + "/" + day + "/" + year;
24236
24394
  let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY };
24237
- let url = "https://" + this.apiId + "/getallcountryevents3";
24395
+ let url = "https://" + this.apiId + "/getallcountryevents4";
24238
24396
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
24239
24397
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
24240
24398
  this._SfLoader.innerHTML = '';
@@ -24319,7 +24477,7 @@ let SfIEvents = class SfIEvents extends LitElement {
24319
24477
  console.log('fetching compliances', sortid);
24320
24478
  let complianceEntityId = sortid.split(';')[1];
24321
24479
  let complianceLocationId = sortid.split(';')[2];
24322
- let url = "https://" + this.apiId + "/getallcountryevents3";
24480
+ let url = "https://" + this.apiId + "/getallcountryevents4";
24323
24481
  let sDateObj = selectedDate;
24324
24482
  sDateObj.setDate(selectedDate.getDate() - 60);
24325
24483
  let day = '' + sDateObj.getDate();
@@ -24807,6 +24965,9 @@ let SfIEvents = class SfIEvents extends LitElement {
24807
24965
  </div>
24808
24966
  <div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
24809
24967
 
24968
+ </div>
24969
+ <div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
24970
+
24810
24971
  </div>
24811
24972
  </div>
24812
24973
 
@@ -26633,6 +26794,9 @@ __decorate([
26633
26794
  __decorate([
26634
26795
  property()
26635
26796
  ], SfIEvents.prototype, "locationComplianceStatusData", void 0);
26797
+ __decorate([
26798
+ property()
26799
+ ], SfIEvents.prototype, "suspenseCount", void 0);
26636
26800
  __decorate([
26637
26801
  property({ type: Array })
26638
26802
  ], SfIEvents.prototype, "selectedItemIds", void 0);
@@ -26969,6 +27133,9 @@ __decorate([
26969
27133
  __decorate([
26970
27134
  query('#calendar-container')
26971
27135
  ], SfIEvents.prototype, "_SfOnboardingCalendarContainer", void 0);
27136
+ __decorate([
27137
+ query('#suspense-container')
27138
+ ], SfIEvents.prototype, "_SfOnboardingSuspenseContainer", void 0);
26972
27139
  __decorate([
26973
27140
  query('#onboarding-tab-group-0')
26974
27141
  ], SfIEvents.prototype, "_SfOnboardingTabGroup0", void 0);
@@ -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";
@@ -1617,6 +1618,9 @@ export class SfIEvents extends LitElement {
1617
1618
  @property()
1618
1619
  locationComplianceStatusData: any = null;
1619
1620
 
1621
+ @property()
1622
+ suspenseCount: number = 0;
1623
+
1620
1624
  @property({ type: Array })
1621
1625
  selectedItemIds: Array<string> = [];
1622
1626
 
@@ -3059,6 +3063,9 @@ export class SfIEvents extends LitElement {
3059
3063
  @query('#calendar-container')
3060
3064
  _SfOnboardingCalendarContainer: any;
3061
3065
 
3066
+ @query('#suspense-container')
3067
+ _SfOnboardingSuspenseContainer: any;
3068
+
3062
3069
  @query('#onboarding-tab-group-0')
3063
3070
  _SfOnboardingTabGroup0: any;
3064
3071
 
@@ -4578,6 +4585,7 @@ export class SfIEvents extends LitElement {
4578
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>&nbsp;&nbsp;<span>Pending Approval:</span>&nbsp;<span id="graph-pending-approval">DASHBOARD_PENDING_APPROVAL</span></div>';
4579
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>&nbsp;&nbsp;<span>Rejected:</span>&nbsp;<span id="graph-rejected">DASHBOARD_REJECTED</span></div>';
4580
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>&nbsp;&nbsp;<span>Approved:</span>&nbsp;<span id="graph-approved">DASHBOARD_APPROVED</span></div>';
4588
+ html += '<div part="badge-dashboard" class="mr-10 mb-10 no-shrink DASHBOARD_SUSPENSE_CLASS"><span>Suspense:</span>&nbsp;<span id="graph-total">DASHBOARD_SUSPENSE</span></div>';
4581
4589
 
4582
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>&nbsp;&nbsp;<span>In Time:</span>&nbsp;<span id="graph-in-time">DASHBOARD_IN_TIME</span></div>';
4583
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>&nbsp;&nbsp;<span>Past Due Date:</span>&nbsp;<span id="graph-past-due-date">DASHBOARD_PAST_DUE_DATE</span></div>';
@@ -5569,6 +5577,8 @@ export class SfIEvents extends LitElement {
5569
5577
  //console.log('progress', this.period, total, notStarted, approved)
5570
5578
 
5571
5579
  html = html.replace("DASHBOARD_TOTAL", total + "");
5580
+ html = html.replace("DASHBOARD_SUSPENSE_CLASS", (this.suspenseCount > 0) ? "" : " hide");
5581
+ html = html.replace("DASHBOARD_SUSPENSE", this.suspenseCount + "");
5572
5582
  html = html.replace("DASHBOARD_NOT_STARTED", notStarted + "");
5573
5583
  html = html.replace("DASHBOARD_APPROVED", approved + "");
5574
5584
  html = html.replace("DASHBOARD_PENDING_APPROVAL", pendingApproval + "");
@@ -9516,6 +9526,7 @@ export class SfIEvents extends LitElement {
9516
9526
  (this._SfOnboardingReportedLocationsContainer as HTMLDivElement).style.display = 'none';
9517
9527
  (this._SfOnboardingSignoffContainer as HTMLDivElement).style.display = 'none';
9518
9528
  (this._SfOnboardingCalendarContainer as HTMLDivElement).style.display = 'none';
9529
+ (this._SfOnboardingSuspenseContainer as HTMLDivElement).style.display = 'none';
9519
9530
 
9520
9531
  (this._SfOnboardingStatutesContainer as HTMLDivElement).innerHTML = '';
9521
9532
  (this._SfOnboardingCompliancesContainer as HTMLDivElement).innerHTML = '';
@@ -9541,6 +9552,7 @@ export class SfIEvents extends LitElement {
9541
9552
  (this._SfOnboardingReportedLocationsContainer as HTMLDivElement).innerHTML = '';
9542
9553
  (this._SfOnboardingSignoffContainer as HTMLDivElement).innerHTML = '';
9543
9554
  (this._SfOnboardingCalendarContainer as HTMLDivElement).innerHTML = '';
9555
+ (this._SfOnboardingSuspenseContainer as HTMLDivElement).innerHTML = '';
9544
9556
 
9545
9557
  }
9546
9558
 
@@ -10053,6 +10065,14 @@ export class SfIEvents extends LitElement {
10053
10065
  this.renderOnboardingCalendar(calendarJobs);
10054
10066
  }
10055
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
+
10056
10076
  calculateStartAndEndDateOfPast = (index: number = 0) => {
10057
10077
 
10058
10078
  //console.log('calculating start and end of past');
@@ -12744,6 +12764,12 @@ export class SfIEvents extends LitElement {
12744
12764
  return this.calendarStartYYYY;
12745
12765
  }
12746
12766
 
12767
+ getCurrentYearGeneric = () => {
12768
+ if (new Date().getMonth() >= 3) {
12769
+ return new Date().getFullYear() + ""
12770
+ }
12771
+ return (new Date().getFullYear() - 1) + ""
12772
+ }
12747
12773
 
12748
12774
  getCurrentYear = (mm: string) => {
12749
12775
 
@@ -17766,10 +17792,12 @@ export class SfIEvents extends LitElement {
17766
17792
  html += '<div class="d-flex justify-end w-100 mb-10">'
17767
17793
  html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>'
17768
17794
  html += '</div>'
17769
- // html += '<div class="d-flex justify-end w-100">'
17770
- // html += '<input part="input" id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
17771
- // html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>'
17772
- // html += '</div>'
17795
+ if (this.myRole == this.TAB_FUNCTION_HEAD) {
17796
+ html += '<div class="d-flex justify-end w-100">'
17797
+ html += '<input id="feedback-suspense" class="mb-10 hide" type="checkbox"/>'
17798
+ html += '<label part="input-label" id="feedback-suspense-label" class="ml-10 mb-10 hide">Move to suspense account</label>'
17799
+ html += '</div>'
17800
+ }
17773
17801
  html += '<div class="d-flex w-100">'
17774
17802
  html += ('<button part="button-lg-short" id="button-feedback" class="d-flex justify-center align-center"><span class="material-symbols-outlined">comment</span><span>&nbsp;&nbsp;Send Feedback</span></button>');
17775
17803
  html += ('<button part="button-lg-short-secondary" id="button-feedback-cancel" class="hide d-flex justify-center align-center mr-10"><span class="material-symbols-outlined">close</span><span>&nbsp;&nbsp;Cancel</span></button>');
@@ -18130,7 +18158,7 @@ export class SfIEvents extends LitElement {
18130
18158
  } else {
18131
18159
  feedbackMessage.setAttribute('style', 'border:');
18132
18160
  let feedbackSuspenseVal = false
18133
- if(feedbackSuspense != null && feedbackSuspense.checked){
18161
+ if (feedbackSuspense != null && feedbackSuspense.checked) {
18134
18162
  feedbackSuspenseVal = true
18135
18163
  }
18136
18164
  this.uploadTriggerMyEvent(
@@ -18146,7 +18174,9 @@ export class SfIEvents extends LitElement {
18146
18174
  mmddyyyy: mmddyyyy,
18147
18175
  eventid: event.id,
18148
18176
  entityid: entityId,
18149
- locationid: locationId
18177
+ locationid: locationId,
18178
+ reporters: event.reporters,
18179
+ approvers: event.approvers,
18150
18180
  }
18151
18181
  );
18152
18182
  // this.uploadTriggerMyEvent(
@@ -21691,6 +21721,91 @@ export class SfIEvents extends LitElement {
21691
21721
 
21692
21722
  }
21693
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>&nbsp;&nbsp;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
+
21694
21809
  renderOnboardingCalendar = (_calendarJobs: any) => {
21695
21810
 
21696
21811
  //console.log('calendarjobs', calendarJobs);
@@ -22329,6 +22444,9 @@ export class SfIEvents extends LitElement {
22329
22444
  if (this.myOnboardingTab == this.TAB_CALENDAR) {
22330
22445
  ((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-calendar') as HTMLButtonElement).click();
22331
22446
  }
22447
+ if (this.myOnboardingTab == this.TAB_SUSPENSE) {
22448
+ ((this._SfOnboardingTabContainer as HTMLDivElement).querySelector('#onboarding-tab-suspense') as HTMLButtonElement).click();
22449
+ }
22332
22450
 
22333
22451
  }
22334
22452
 
@@ -22494,6 +22612,7 @@ export class SfIEvents extends LitElement {
22494
22612
  html += '<div id="onboarding-tab-group-3" class="' + (this.myOnboardingTabGroup == this.TAB_GROUP_ROLLOUT ? '' : 'hide') + ' d-flex justify-center flex-wrap sub-button">';
22495
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>';
22496
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>';
22497
22616
  html += '</div>';
22498
22617
 
22499
22618
  (this._SfOnboardingTabContainer as HTMLDivElement).innerHTML = html;
@@ -22690,6 +22809,15 @@ export class SfIEvents extends LitElement {
22690
22809
 
22691
22810
  });
22692
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
+
22693
22821
  (this._SfOnboardingTabGroupButton0 as HTMLDivElement).addEventListener('click', () => {
22694
22822
 
22695
22823
  this.myOnboardingTabGroup = this.TAB_GROUP_BUSINESS_UNDERSTANDING;
@@ -28707,6 +28835,61 @@ export class SfIEvents extends LitElement {
28707
28835
 
28708
28836
  }
28709
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
+
28710
28893
  fetchDetail = async (value: any) => {
28711
28894
 
28712
28895
  const body: any = this.getApiBodyList();
@@ -28864,6 +29047,7 @@ export class SfIEvents extends LitElement {
28864
29047
  let path = "", view = "";
28865
29048
  this.sdate = startDate;
28866
29049
  this.edate = endDate;
29050
+ this.suspenseCount = 0;
28867
29051
  if (this.tagId != null && this.tagId != "") {
28868
29052
  view = "tag";
28869
29053
  } else if (this.countryId != null && this.countryId != "") {
@@ -28874,7 +29058,7 @@ export class SfIEvents extends LitElement {
28874
29058
  view = "entity";
28875
29059
  }
28876
29060
 
28877
- path = "getallcountryevents3";
29061
+ path = "getallcountryevents4";
28878
29062
 
28879
29063
  let sDate = "";
28880
29064
  let eDate = "";
@@ -28917,6 +29101,7 @@ export class SfIEvents extends LitElement {
28917
29101
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
28918
29102
  if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
28919
29103
  this.lastupdated = Util.getDateTimeStrings(new Date().getTime())
29104
+ this.suspenseCount = jsonRespose.suspensecount ?? 0;
28920
29105
  console.log('rendering appropriate string', list, this.selectedTab);
28921
29106
  this.renderAppropriateStream(startDate, endDate, true);
28922
29107
  this.fetchBulkReportingData();
@@ -29004,6 +29189,7 @@ export class SfIEvents extends LitElement {
29004
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) => {
29005
29190
 
29006
29191
  let path = "", view = "";
29192
+ this.suspenseCount = 0;
29007
29193
  if (tagid != null && tagid != "") {
29008
29194
  view = "tag";
29009
29195
  } else if (countryid != null && countryid != "") {
@@ -29014,7 +29200,7 @@ export class SfIEvents extends LitElement {
29014
29200
  view = "entity";
29015
29201
  }
29016
29202
 
29017
- path = "getallcountryevents3";
29203
+ path = "getallcountryevents4";
29018
29204
 
29019
29205
  let url = "https://" + this.apiId + "/" + path;
29020
29206
  let temptagid = tagid;
@@ -29044,6 +29230,7 @@ export class SfIEvents extends LitElement {
29044
29230
  // if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
29045
29231
  this.events = (await this.fetchPresignedUrl(jsonRespose.signedUrlGet));
29046
29232
  // }
29233
+ this.suspenseCount = jsonRespose.suspensecount ?? 0;
29047
29234
  await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
29048
29235
 
29049
29236
  } else {
@@ -30740,7 +30927,7 @@ export class SfIEvents extends LitElement {
30740
30927
  day = '0' + day;
30741
30928
  let eDate = month + "/" + day + "/" + year
30742
30929
  let urlBody: any = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY };
30743
- let url = "https://" + this.apiId + "/getallcountryevents3";
30930
+ let url = "https://" + this.apiId + "/getallcountryevents4";
30744
30931
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
30745
30932
  const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
30746
30933
  this._SfLoader.innerHTML = '';
@@ -30833,7 +31020,7 @@ export class SfIEvents extends LitElement {
30833
31020
  console.log('fetching compliances', sortid)
30834
31021
  let complianceEntityId = sortid.split(';')[1]
30835
31022
  let complianceLocationId = sortid.split(';')[2]
30836
- let url = "https://" + this.apiId + "/getallcountryevents3";
31023
+ let url = "https://" + this.apiId + "/getallcountryevents4";
30837
31024
  let sDateObj = selectedDate
30838
31025
  sDateObj.setDate(selectedDate.getDate() - 60)
30839
31026
  let day = '' + sDateObj.getDate();
@@ -31323,6 +31510,9 @@ export class SfIEvents extends LitElement {
31323
31510
  </div>
31324
31511
  <div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="calendar-container">
31325
31512
 
31513
+ </div>
31514
+ <div class="d-flex flex-grow flex-wrap justify-start align-stretch scroll-x" id="suspense-container">
31515
+
31326
31516
  </div>
31327
31517
  </div>
31328
31518