sf-i-events 1.0.903 → 1.0.904

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.904",
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 />';
@@ -3838,8 +3838,21 @@ 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
+ await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer, reportercomments, approvercomments, inputReportingPercentage, selectReportedLocation, documents, dateOfCompletion);
3843
3856
  });
3844
3857
  if (this.mode == "consumer" || this.mode == "next") {
3845
3858
  let inputReportingPercentage = listReportingContainer.querySelector('#input-reporter-percentage');
@@ -12976,7 +12989,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12976
12989
  }
12977
12990
  }
12978
12991
  };
12979
- this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null) => {
12992
+ this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null, reportercomments = null, approvercomments = null, inputReportingPercentage = null, selectReportedLocation = null, documents = null, dateOfCompletion = null) => {
12980
12993
  console.log('listEvent', listEvent, listEvent.id);
12981
12994
  let url = "https://" + this.apiId + "/getalleventdetails";
12982
12995
  //console.log('fetch calendar url', url);
@@ -12998,7 +13011,20 @@ let SfIEvents = class SfIEvents extends LitElement {
12998
13011
  }
12999
13012
  }
13000
13013
  }
13001
- this.renderListReporting(listEventContainer, jsonRespose.data, mmddyyyy, eventsContainer);
13014
+ let data = jsonRespose.data;
13015
+ if (reportercomments != null) {
13016
+ data.reportercomments = reportercomments;
13017
+ }
13018
+ else if (approvercomments != null) {
13019
+ data.approvercomments = approvercomments;
13020
+ }
13021
+ if (inputReportingPercentage != null) {
13022
+ data.percentage = inputReportingPercentage;
13023
+ }
13024
+ data.dateofcompletion = dateOfCompletion;
13025
+ data.reportedlocations = selectReportedLocation;
13026
+ data.documents = documents;
13027
+ this.renderListReporting(listEventContainer, data, mmddyyyy, eventsContainer);
13002
13028
  }
13003
13029
  }
13004
13030
  else {
@@ -13086,7 +13112,12 @@ let SfIEvents = class SfIEvents extends LitElement {
13086
13112
  html += '<div class="accordian-container m-20 pb-20" part="accordian-container">';
13087
13113
  html += '<div part="detail-summary">';
13088
13114
  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>');
13115
+ let obligationArr = event['obligation'].split('More information:');
13116
+ html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
13117
+ if (obligationArr.length > 1) {
13118
+ let tempObligationArr = obligationArr.slice(1);
13119
+ 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>');
13120
+ }
13090
13121
  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
13122
  html += '</div>';
13092
13123
  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 />';
@@ -6197,7 +6197,18 @@ 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
+ await this.fetchEventDetails(event, mmddyyyy, null, eventsContainer, true, listReportingContainer, reportercomments, approvercomments, inputReportingPercentage,selectReportedLocation, documents, dateOfCompletion);
6201
6212
  })
6202
6213
  if (this.mode == "consumer" || this.mode == "next") {
6203
6214
  let inputReportingPercentage = listReportingContainer.querySelector('#input-reporter-percentage') as HTMLInputElement;
@@ -16922,7 +16933,7 @@ export class SfIEvents extends LitElement {
16922
16933
  }
16923
16934
  }
16924
16935
 
16925
- fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null) => {
16936
+ 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
16937
  console.log('listEvent', listEvent, listEvent.id)
16927
16938
  let url = "https://" + this.apiId + "/getalleventdetails";
16928
16939
 
@@ -16948,7 +16959,19 @@ export class SfIEvents extends LitElement {
16948
16959
  }
16949
16960
  }
16950
16961
  }
16951
- this.renderListReporting(listEventContainer, jsonRespose.data, mmddyyyy, eventsContainer)
16962
+ let data = jsonRespose.data;
16963
+ if( reportercomments != null) {
16964
+ data.reportercomments = reportercomments;
16965
+ }else if(approvercomments != null) {
16966
+ data.approvercomments = approvercomments;
16967
+ }
16968
+ if(inputReportingPercentage != null) {
16969
+ data.percentage = inputReportingPercentage;
16970
+ }
16971
+ data.dateofcompletion = dateOfCompletion;
16972
+ data.reportedlocations = selectReportedLocation;
16973
+ data.documents = documents;
16974
+ this.renderListReporting(listEventContainer, data, mmddyyyy, eventsContainer)
16952
16975
  }
16953
16976
  } else {
16954
16977
  this.renderEventDetail(jsonRespose.data, mmddyyyy, currentColumnButton, eventsContainer);
@@ -17046,7 +17069,12 @@ export class SfIEvents extends LitElement {
17046
17069
 
17047
17070
  html += '<div part="detail-summary">';
17048
17071
  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>');
17072
+ let obligationArr = event['obligation'].split('More information:');
17073
+ html += ('<div part="detail-summary-subtitle" class="pl-20 pr-20"><h3>' + obligationArr[0].replace(/\n/g, '<br />') + '</h3></div>');
17074
+ if(obligationArr.length > 1) {
17075
+ let tempObligationArr = obligationArr.slice(1);
17076
+ 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>');
17077
+ }
17050
17078
  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
17079
  html += '</div>';
17052
17080