sf-i-events 1.0.903 → 1.0.905

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.903",
4
+ "version": "1.0.905",
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
@@ -627,7 +627,7 @@ export declare class SfIEvents extends LitElement {
627
627
  fetchRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
628
628
  renewRCMResource: (listEvent: any, reportformatvalues: any) => Promise<void>;
629
629
  renderRCMResourceDetails: (listEvent: any, mmddyyyy: string) => Promise<void>;
630
- fetchEventDetails: (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance?: boolean, listEventContainer?: HTMLDivElement | null) => Promise<void>;
630
+ fetchEventDetails: (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance?: boolean, listEventContainer?: HTMLDivElement | null, reportercomments?: string | null, approvercomments?: string | null, inputReportingPercentage?: string | null, selectReportedLocation?: string | null, documents?: any | null, dateOfCompletion?: string | null) => Promise<void>;
631
631
  renderEventDetail: (event: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement) => void;
632
632
  renderCalendar: () => void;
633
633
  matchesOnBoardingFilter: (country: string, state: string, subcategory: string, statute: string) => boolean;
package/sf-i-events.js CHANGED
@@ -3524,7 +3524,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3524
3524
  return html;
3525
3525
  };
3526
3526
  this.renderReporting = (event, mmddyyyy) => {
3527
- var _a;
3527
+ var _a, _b, _c;
3528
3528
  let html = '';
3529
3529
  let completeness = this.getCompletenessStatus(event);
3530
3530
  let docs = event['documents'] == null ? [] : event['documents'];
@@ -3559,7 +3559,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3559
3559
  }
3560
3560
  html += '<div class="d-flex m-20 flex-col">';
3561
3561
  html += '<label part="input-label">Approver Comments*</label>';
3562
- html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
3562
+ html += ('<input id="input-approver-comments" type="text" part="input" value="' + ((_b = event.approvercomments) !== null && _b !== void 0 ? _b : "") + '"/><br />');
3563
3563
  if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3564
3564
  html += '<label part="input-label">Date of Completion*</label>';
3565
3565
  html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
@@ -3616,7 +3616,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3616
3616
  html += '</div>';
3617
3617
  html += '<div class="d-flex m-20 flex-col">';
3618
3618
  html += '<label part="input-label">Reporter Comments*</label>';
3619
- html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
3619
+ html += ('<input id="input-reporter-comments" type="text" part="input" value="' + ((_c = event.reportercomments) !== null && _c !== void 0 ? _c : "") + '"/><br />');
3620
3620
  if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
3621
3621
  html += '<label part="input-label">Date of Completion*</label>';
3622
3622
  html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
@@ -3753,7 +3753,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3753
3753
  const j = idArr[5];
3754
3754
  let buttonListReportings = eventsContainer.querySelectorAll('.button-list-reporting');
3755
3755
  for (let buttonListReporting of buttonListReportings) {
3756
- console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
3756
+ // console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
3757
3757
  if (buttonListReporting.id == 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) {
3758
3758
  buttonListReporting.setAttribute('part', 'button-list-reporting-selected');
3759
3759
  }
@@ -3838,8 +3838,25 @@ let SfIEvents = class SfIEvents extends LitElement {
3838
3838
  }
3839
3839
  });
3840
3840
  (_h = listReportingContainer.querySelector('#upload-guidance-button')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', async () => {
3841
+ var _a, _b, _c, _f, _g, _h, _j, _k;
3841
3842
  console.log('upload guidance clicked', event);
3842
- await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer);
3843
+ let inputReportingPercentage = (_b = (_a = listReportingContainer.querySelector('#input-reporter-percentage')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "100";
3844
+ let selectReportedLocation = (_f = (_c = listReportingContainer.querySelector('#input-reporter-location')) === null || _c === void 0 ? void 0 : _c.value) !== null && _f !== void 0 ? _f : "";
3845
+ let approvercomments = (_h = (_g = listReportingContainer.querySelector('#input-approver-comments')) === null || _g === void 0 ? void 0 : _g.value) !== null && _h !== void 0 ? _h : "";
3846
+ let reportercomments = (_k = (_j = listReportingContainer.querySelector('#input-reporter-comments')) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : "";
3847
+ let dateOfCompletion;
3848
+ if (listReportingContainer.querySelector('#input-reporter-doc') != null) {
3849
+ dateOfCompletion = new Date(listReportingContainer.querySelector('#input-reporter-doc').value).getTime() + "";
3850
+ }
3851
+ else {
3852
+ dateOfCompletion = new Date(listReportingContainer.querySelector('#input-approver-doc').value).getTime() + "";
3853
+ }
3854
+ let documents = this._SfUploader[0].querySelector('#uploader').selectedValues();
3855
+ if (dateOfCompletion == "NaN") {
3856
+ dateOfCompletion = "";
3857
+ }
3858
+ console.log('dateOfCompletion', dateOfCompletion);
3859
+ await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer, reportercomments, approvercomments, inputReportingPercentage, selectReportedLocation, documents, dateOfCompletion);
3843
3860
  });
3844
3861
  if (this.mode == "consumer" || this.mode == "next") {
3845
3862
  let inputReportingPercentage = listReportingContainer.querySelector('#input-reporter-percentage');
@@ -12976,7 +12993,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12976
12993
  }
12977
12994
  }
12978
12995
  };
12979
- this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null) => {
12996
+ this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null, reportercomments = null, approvercomments = null, inputReportingPercentage = null, selectReportedLocation = null, documents = null, dateOfCompletion = null) => {
12980
12997
  console.log('listEvent', listEvent, listEvent.id);
12981
12998
  let url = "https://" + this.apiId + "/getalleventdetails";
12982
12999
  //console.log('fetch calendar url', url);
@@ -12998,7 +13015,21 @@ let SfIEvents = class SfIEvents extends LitElement {
12998
13015
  }
12999
13016
  }
13000
13017
  }
13001
- this.renderListReporting(listEventContainer, jsonRespose.data, mmddyyyy, eventsContainer);
13018
+ let data = jsonRespose.data;
13019
+ if (reportercomments != null) {
13020
+ data.reportercomments = reportercomments;
13021
+ }
13022
+ else if (approvercomments != null) {
13023
+ data.approvercomments = approvercomments;
13024
+ }
13025
+ if (inputReportingPercentage != null) {
13026
+ data.percentage = inputReportingPercentage;
13027
+ }
13028
+ console.log('dateOfCompletion', dateOfCompletion, dateOfCompletion == null, dateOfCompletion == "");
13029
+ data.dateofcompletion = dateOfCompletion;
13030
+ data.reportedlocations = selectReportedLocation;
13031
+ data.documents = documents;
13032
+ this.renderListReporting(listEventContainer, data, mmddyyyy, eventsContainer);
13002
13033
  }
13003
13034
  }
13004
13035
  else {
@@ -13086,7 +13117,12 @@ let SfIEvents = class SfIEvents extends LitElement {
13086
13117
  html += '<div class="accordian-container m-20 pb-20" part="accordian-container">';
13087
13118
  html += '<div part="detail-summary">';
13088
13119
  html += ('<div part="detail-summary-title" class="pl-20 pr-20"><h1>' + event['obligationtitle'] + '</h1></div>');
13089
- html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + event['obligation'].replace(/\n/g, '<br />') + '</h3></div>');
13120
+ let obligationArr = event['obligation'].split('More information:');
13121
+ html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
13122
+ if (obligationArr.length > 1) {
13123
+ let tempObligationArr = obligationArr.slice(1);
13124
+ html += ('<div part="detail-summary-subtitle-more-info" class="pl-20 pr-20 pb-10">' + ('<sf-i-elastic-text text="More information:' + (tempObligationArr.join('')).replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
13125
+ }
13090
13126
  html += ('<div part="detail-summary-content" class="pl-20 pr-20 pt-20">' + ('<sf-i-elastic-text text="' + (event['internalcontrols'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
13091
13127
  html += '</div>';
13092
13128
  html += '<br />';
@@ -5890,7 +5890,7 @@ export class SfIEvents extends LitElement {
5890
5890
 
5891
5891
  html += '<div class="d-flex m-20 flex-col">';
5892
5892
  html += '<label part="input-label">Approver Comments*</label>';
5893
- html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
5893
+ html += ('<input id="input-approver-comments" type="text" part="input" value="' + (event.approvercomments ?? "") + '"/><br />');
5894
5894
  if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
5895
5895
  html += '<label part="input-label">Date of Completion*</label>';
5896
5896
  html += '<input id="input-approver-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" disabled/><br />';
@@ -5960,7 +5960,7 @@ export class SfIEvents extends LitElement {
5960
5960
 
5961
5961
  html += '<div class="d-flex m-20 flex-col">';
5962
5962
  html += '<label part="input-label">Reporter Comments*</label>';
5963
- html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
5963
+ html += ('<input id="input-reporter-comments" type="text" part="input" value="' + (event.reportercomments ?? "") + '"/><br />');
5964
5964
  if (event.module != 'contract' && event.module != 'license' && event.module != 'rcmresource') {
5965
5965
  html += '<label part="input-label">Date of Completion*</label>';
5966
5966
  html += '<input id="input-reporter-doc" part="input" type="date" value="' + (dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0, 10)) + '" max="' + (new Date().toISOString().substring(0, 10)) + '"/><br />';
@@ -6112,7 +6112,7 @@ export class SfIEvents extends LitElement {
6112
6112
  const j = idArr[5];
6113
6113
  let buttonListReportings = eventsContainer.querySelectorAll('.button-list-reporting') as NodeListOf<HTMLButtonElement>
6114
6114
  for (let buttonListReporting of buttonListReportings) {
6115
- console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
6115
+ // console.log('buttonListReporting', buttonListReporting.id, 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j);
6116
6116
  if (buttonListReporting.id == 'button-list-reporting-' + mmdd.replace(/\//g, '-') + '-' + j) {
6117
6117
  buttonListReporting.setAttribute('part', 'button-list-reporting-selected')
6118
6118
  } else {
@@ -6197,7 +6197,22 @@ export class SfIEvents extends LitElement {
6197
6197
  });
6198
6198
  listReportingContainer.querySelector('#upload-guidance-button')?.addEventListener('click', async () => {
6199
6199
  console.log('upload guidance clicked', event);
6200
- await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer);
6200
+ let inputReportingPercentage = (listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement)?.value ?? "100";
6201
+ let selectReportedLocation = (listReportingContainer.querySelector('#input-reporter-location') as HTMLSelectElement)?.value ?? "";
6202
+ let approvercomments = (listReportingContainer.querySelector('#input-approver-comments') as HTMLInputElement)?.value ?? "";
6203
+ let reportercomments = (listReportingContainer.querySelector('#input-reporter-comments') as HTMLInputElement)?.value ?? "";
6204
+ let dateOfCompletion;
6205
+ if((listReportingContainer.querySelector('#input-reporter-doc') as HTMLInputElement) != null) {
6206
+ dateOfCompletion = new Date((listReportingContainer.querySelector('#input-reporter-doc') as HTMLInputElement).value).getTime() + "";
6207
+ } else {
6208
+ dateOfCompletion = new Date((listReportingContainer.querySelector('#input-approver-doc') as HTMLInputElement).value).getTime() + "";
6209
+ }
6210
+ let documents = (this._SfUploader[0].querySelector('#uploader') as SfIUploader).selectedValues()
6211
+ if(dateOfCompletion == "NaN") {
6212
+ dateOfCompletion = "";
6213
+ }
6214
+ console.log('dateOfCompletion', dateOfCompletion)
6215
+ await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer, reportercomments, approvercomments, inputReportingPercentage,selectReportedLocation, documents, dateOfCompletion);
6201
6216
  })
6202
6217
  if (this.mode == "consumer" || this.mode == "next") {
6203
6218
  let inputReportingPercentage = listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement;
@@ -16922,7 +16937,7 @@ export class SfIEvents extends LitElement {
16922
16937
  }
16923
16938
  }
16924
16939
 
16925
- fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null) => {
16940
+ fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null, reportercomments: string | null = null, approvercomments: string | null = null, inputReportingPercentage: string | null = null, selectReportedLocation:string | null = null, documents: any | null = null, dateOfCompletion: string | null = null) => {
16926
16941
  console.log('listEvent', listEvent, listEvent.id)
16927
16942
  let url = "https://" + this.apiId + "/getalleventdetails";
16928
16943
 
@@ -16948,7 +16963,20 @@ export class SfIEvents extends LitElement {
16948
16963
  }
16949
16964
  }
16950
16965
  }
16951
- this.renderListReporting(listEventContainer, jsonRespose.data, mmddyyyy, eventsContainer)
16966
+ let data = jsonRespose.data;
16967
+ if( reportercomments != null) {
16968
+ data.reportercomments = reportercomments;
16969
+ }else if(approvercomments != null) {
16970
+ data.approvercomments = approvercomments;
16971
+ }
16972
+ if(inputReportingPercentage != null) {
16973
+ data.percentage = inputReportingPercentage;
16974
+ }
16975
+ console.log('dateOfCompletion', dateOfCompletion, dateOfCompletion == null, dateOfCompletion == "");
16976
+ data.dateofcompletion = dateOfCompletion;
16977
+ data.reportedlocations = selectReportedLocation;
16978
+ data.documents = documents;
16979
+ this.renderListReporting(listEventContainer, data, mmddyyyy, eventsContainer)
16952
16980
  }
16953
16981
  } else {
16954
16982
  this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer);
@@ -17046,7 +17074,12 @@ export class SfIEvents extends LitElement {
17046
17074
 
17047
17075
  html += '<div part="detail-summary">';
17048
17076
  html += ('<div part="detail-summary-title" class="pl-20 pr-20"><h1>' + event['obligationtitle'] + '</h1></div>');
17049
- html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + event['obligation'].replace(/\n/g, '<br />') + '</h3></div>');
17077
+ let obligationArr = event['obligation'].split('More information:');
17078
+ html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
17079
+ if(obligationArr.length > 1) {
17080
+ let tempObligationArr = obligationArr.slice(1);
17081
+ html += ('<div part="detail-summary-subtitle-more-info" class="pl-20 pr-20 pb-10">' + ('<sf-i-elastic-text text="More information:' + (tempObligationArr.join('')).replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
17082
+ }
17050
17083
  html += ('<div part="detail-summary-content" class="pl-20 pr-20 pt-20">' + ('<sf-i-elastic-text text="' + (event['internalcontrols'] + "").replace(/"/g, "").replace(/\n/g, '<br />') + '" minLength="80"></sf-i-elastic-text>') + '</div>');
17051
17084
  html += '</div>';
17052
17085