sf-i-events 1.0.816 → 1.0.817

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
@@ -708,7 +708,7 @@
708
708
  </div>
709
709
 
710
710
  </sf-i-events> -->
711
- <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="reporter" showregisterexport="false" features="[&quot;notices&quot;]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
711
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="reporter" showregisterexport="false" features="[&quot;notices&quot;]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
712
712
 
713
713
  <div slot="uploader">
714
714
  <sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
@@ -717,7 +717,7 @@
717
717
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
718
718
  </div>
719
719
 
720
- </sf-i-events> -->
720
+ </sf-i-events>
721
721
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws" fill="solid" username="Viewer J1" userprofileid="344c84d2-5976-47ff-949b-49f6fa9627eb" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="viewer" showregisterexport="false" features="[&quot;notices&quot;]" eventfielddependencies="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
722
722
 
723
723
  <div slot="uploader">
@@ -742,7 +742,7 @@
742
742
 
743
743
  </sf-i-events> -->
744
744
  <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Sachin Bhat" userprofileid="347e23a2-5ff8-4d3a-b1ab-639faf342f25" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" myroles="[&quot;reporter&quot;]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader></div><div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div></sf-i-events> -->
745
- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" myroles="[&quot;reporter&quot;]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader></div><div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div></sf-i-events>
745
+ <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat" apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition" mode="next" fill="solid" username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" myroles="[&quot;reporter&quot;]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader></div><div slot="reporting"><sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting></div></sf-i-events> -->
746
746
 
747
747
  <script>
748
748
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.816",
4
+ "version": "1.0.817",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -9645,7 +9645,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9645
9645
  }
9646
9646
  };
9647
9647
  this.renderEventDetail = (event, mmddyyyy, currentColumnButton, eventsContainer) => {
9648
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
9648
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
9649
9649
  console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
9650
9650
  let comments, docs, approved, /*dateOfCompletion,*/ makercheckers, docsOptional, documentType;
9651
9651
  let entityId = "";
@@ -9869,196 +9869,29 @@ let SfIEvents = class SfIEvents extends LitElement {
9869
9869
  }
9870
9870
  html += '</div>';
9871
9871
  html += '</div>';
9872
+ html += '<div class="accordian-section section-feedback pl-20 pr-20" part="accordian-section">';
9873
+ html += '<div class="d-flex justify-between accordian-head head-feedback" part="accordian-head">';
9874
+ html += '<h3>Feedback</h3>';
9875
+ html += '<h3 class="head-indicator-feedback">+</h3>';
9876
+ html += '</div>';
9877
+ html += '<div class="d-flex flex-wrap accordian-body body-feedback hide" part="accordian-body">';
9878
+ html += '<div class="d-flex justify-end w-100 flex-wrap">';
9879
+ html += '<div class="d-flex w-100 mb-10">';
9880
+ html += '<div part="feedback-message">Do you wish to send us feedback about this compliance? Any doubts? Need guidance or more clarity? Drop us a feedback and we will revert soon.</div>';
9881
+ html += '</div>';
9882
+ html += '<div class="d-flex justify-end w-100 mb-10">';
9883
+ html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>';
9884
+ html += '</div>';
9885
+ html += '<div class="d-flex w-100">';
9886
+ 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>');
9887
+ 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>');
9888
+ html += ('<button part="button-lg-short" id="button-feedback-confirm" class="hide d-flex justify-center align-center"><span class="material-symbols-outlined">commentcheck</span><span>&nbsp;&nbsp;Submit Feedback</span></button>');
9889
+ html += '</div>';
9890
+ html += '</div>';
9891
+ html += '</div>';
9892
+ html += '</div>';
9872
9893
  html += '</div>';
9873
- // html += '<div class="d-flex m-20 flex-wrap">';
9874
- // for(var k = 0; k < Object.keys(event).length; k++) {
9875
- // if(!this.getEventPreviewFields().includes(Object.keys(event)[k])) {
9876
- // if(!this.getEventHideFields().includes(Object.keys(event)[k])) {
9877
- // html += '<div class="m-20">';
9878
- // html += '<div part="detail-head"><strong>'+Object.keys(event)[k]+'</strong></div>'
9879
- // //console.log(Object.keys(event)[k], event[Object.keys(event)[k]]);
9880
- // if((event[Object.keys(event)[k]] + "").indexOf("[") >= 0) {
9881
- // html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
9882
- // } else {
9883
- // html += '<sf-i-elastic-text text="'+(event[Object.keys(event)[k]] + "").replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
9884
- // }
9885
- // html += '</div>';
9886
- // }
9887
- // }
9888
- // }
9889
9894
  if (this.mode == "consumer" || this.mode == "next") {
9890
- //console.log('docs received', event['documents']);
9891
- //console.log('docs received', comments);
9892
- //console.log('docs received', approved);
9893
- /* if(this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) {
9894
-
9895
- if(comments.length > 0) {
9896
-
9897
- html += '<div class="d-flex justify-between m-20">';
9898
- html += '<h3 part="results-title" class="m-0"><br />Approve Compliance</h3>';
9899
- html += '</div>';
9900
- html += '<div class="m-20" part="report-container">';
9901
- html += '<div class="d-flex justify-between align-center">'
9902
- html += '<button class="invisible" part="button">Save</button>'
9903
- html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
9904
- html += '</div>'
9905
-
9906
- if(this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
9907
- html += '<div class="m-20">';
9908
- html += '<label part="input-label">Supporting Documents</label>';
9909
- html += '<slot name="uploader"></slot>';
9910
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
9911
- html += '</div>';
9912
- }
9913
-
9914
- html += '<div class="d-flex m-20 flex-col">';
9915
- html += '<label part="input-label">Approver Comments*</label>';
9916
- html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
9917
- html += '<label part="input-label">Date of Completion*</label>';
9918
- html += '<input id="input-approver-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" disabled/><br />';
9919
- html += '<div>'
9920
- html += '<label part="input-label">Approve?*</label><br />';
9921
- html += '<div class="mt-5">'
9922
- html += '<input id="input-approve-yes" name="radio-approved" type="radio"/> Yes';
9923
- html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
9924
- html += '</div>'
9925
- html += '</div>';
9926
- html += '</div>';
9927
- html += '</div>';
9928
-
9929
- }
9930
-
9931
- }
9932
-
9933
- if(this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) {
9934
-
9935
- html += '<div class="d-flex justify-between m-20">';
9936
- html += '<h3 part="results-title" class="m-0"><br />Report Compliance</h3>';
9937
- html += '</div>';
9938
-
9939
- var showSubmissionSection = true;
9940
- var showGoogleFormLink = false;
9941
-
9942
- if(event['form'].length > 5) {
9943
-
9944
- if(event['form'].indexOf('docs.google.com/forms') >= 0) {
9945
- showSubmissionSection = false;
9946
- if(!approved) {
9947
- showGoogleFormLink = true;
9948
-
9949
- }
9950
- }
9951
-
9952
- }
9953
-
9954
- if(showGoogleFormLink) {
9955
- html += ('<div part="detail-summary-form" class="mt-20 pl-20 pr-20"><button part="button" onclick="window.open(\'' + event['form'] + (this.projectId + '_' + entityId + '_' + locationId + '_' + event['id'] + '_' + mmddyyyy) + '\',\'_blank\')">Submit Via Link</button></div>');
9956
- }
9957
-
9958
- if(showSubmissionSection) {
9959
-
9960
- html += '<div class="m-20" part="report-container">';
9961
- html += '<div class="d-flex justify-between align-center">'
9962
- html += '<button class="invisible" part="button">Save</button>'
9963
- html += '<button id="button-uploader-submit-report" class="button-submit" part="button">Save</button>'
9964
- html += '</div>'
9965
-
9966
- html += '<div class="d-flex m-20 flex-col">';
9967
- html += '<label part="input-label">Reporter Comments*</label>';
9968
- html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
9969
- html += '<label part="input-label">Date of Completion*</label>';
9970
- 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 />';
9971
- // if(docsOptional.length === 0) {
9972
- html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
9973
-
9974
- if(event['uploadguidance'] != null && event['uploadguidance'].length > 0) {
9975
- html += ('<div part="uploader-analysis-message">'+event['uploadguidance']+'</div>');
9976
- }
9977
-
9978
- html += '<slot name="uploader"></slot>';
9979
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
9980
- // }
9981
- html += '<br />';
9982
- if(event['reportformat'] != null && event['reportformat'].length > 0){
9983
- html += '<div id="report-format-container"><div class="box"></div></div>'
9984
- }
9985
- html += '<br />';
9986
- if(makercheckers.length > 0) {
9987
- html += '<div part="td-head" class="td-head d-flex justify-center align-center"><span class="material-symbols-outlined">check_small</span><div>&nbsp;Auto-approve Enabled</div></div>';
9988
-
9989
- if(completeness == "pending-approval" && this.enableDeleteLatestReport) {
9990
- html += '<div part="td-head" class="td-head d-flex justify-center align-center"><button class="mt-5" part="button" id="button-auto-approve">Auto Approve</button></div>';
9991
- }
9992
- }
9993
- html += '</div>';
9994
- html += '</div>';
9995
-
9996
- }
9997
-
9998
-
9999
-
10000
-
10001
- }
10002
-
10003
- if(this.myRole == this.TAB_AUDITOR) {
10004
-
10005
- html += '<div class="d-flex justify-between m-20">';
10006
- html += '<h3 part="results-title" class="m-0"><br />Audit Compliance</h3>';
10007
- html += '</div>';
10008
- html += '<div class="m-20" part="report-container">';
10009
- html += '<div class="d-flex justify-between align-center">'
10010
- html += '<button class="invisible" part="button">Save</button>'
10011
- html += '<button id="button-uploader-submit-audit" class="button-submit" part="button">Save</button>'
10012
- html += '</div>'
10013
-
10014
- html += '<div class="d-flex m-20 flex-col">';
10015
- html += '<label part="input-label">Auditor Comments</label>';
10016
- html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
10017
- html += '<label part="input-label">Date of Completion</label>';
10018
- html += '<input id="input-auditor-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" max="'+(new Date().toISOString().substring(0, 10))+'" readonly/><br />';
10019
- html += '<div>'
10020
- html += '<label part="input-label">Approve?</label><br />';
10021
- html += '<div class="mt-5">'
10022
- html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
10023
- html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
10024
- html += '</div>'
10025
- html += '</div>';
10026
- html += '<br />';
10027
- if(docs.length > 0) {
10028
- html += '<label part="input-label">Supporting Documents</label>';
10029
- html += '<slot name="uploader"></slot>';
10030
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
10031
- }
10032
- html += '</div>';
10033
- html += '</div>';
10034
-
10035
- }
10036
-
10037
- if(this.myRole == this.TAB_VIEWER) {
10038
-
10039
- html += '<div class="d-flex justify-between m-20">';
10040
- html += '<h3 part="results-title" class="m-0"><br />View Compliance</h3>';
10041
- html += '</div>';
10042
- html += '<div class="m-20" part="report-container">';
10043
-
10044
- html += '<div class="d-flex m-20 flex-col">';
10045
- html += '<div>'
10046
- html += '<label part="input-label">Approve?</label><br />';
10047
- html += '<div class="mt-5">'
10048
- html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
10049
- html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
10050
- html += '</div>'
10051
- html += '</div>';
10052
- html += '<br />';
10053
- if(docs.length === 0) {
10054
- html += '<label part="input-label">Supporting Documents</label>';
10055
- html += '<slot name="uploader"></slot>';
10056
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
10057
- }
10058
- html += '</div>';
10059
- html += '</div>';
10060
-
10061
- } */
10062
9895
  html += '<div part="reporting-view-container">';
10063
9896
  html += this.renderReporting(event, mmddyyyy);
10064
9897
  html += "</div>";
@@ -10243,8 +10076,86 @@ let SfIEvents = class SfIEvents extends LitElement {
10243
10076
  this._SfDetailContainer.querySelector('.head-indicator-grc').innerHTML = '-';
10244
10077
  }
10245
10078
  });
10079
+ (_l = this._SfDetailContainer.querySelector('.head-feedback')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', () => {
10080
+ if (this._SfDetailContainer.querySelector('.body-feedback').style.display == 'flex') {
10081
+ this._SfDetailContainer.querySelector('.body-feedback').style.display = 'none';
10082
+ this._SfDetailContainer.querySelector('.head-indicator-feedback').innerHTML = '+';
10083
+ }
10084
+ else {
10085
+ this._SfDetailContainer.querySelector('.body-feedback').style.display = 'flex';
10086
+ this._SfDetailContainer.querySelector('.head-indicator-feedback').innerHTML = '-';
10087
+ }
10088
+ });
10089
+ (_m = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _m === void 0 ? void 0 : _m.addEventListener('click', () => {
10090
+ this._SfDetailContainer.innerHTML = '';
10091
+ this._SfDetailContainer.style.display = 'none';
10092
+ });
10093
+ (_o = this._SfDetailContainer.querySelector('#button-feedback')) === null || _o === void 0 ? void 0 : _o.addEventListener('click', () => {
10094
+ const feedbackMessage = this._SfDetailContainer.querySelector('#feedback-message');
10095
+ const buttonFeedback = this._SfDetailContainer.querySelector('#button-feedback');
10096
+ const buttonCancel = this._SfDetailContainer.querySelector('#button-feedback-cancel');
10097
+ const buttonConfirm = this._SfDetailContainer.querySelector('#button-feedback-confirm');
10098
+ console.log(buttonConfirm.classList);
10099
+ if (feedbackMessage.classList.contains('hide')) {
10100
+ feedbackMessage.classList.remove('hide');
10101
+ }
10102
+ if (buttonConfirm.classList.contains('hide')) {
10103
+ buttonConfirm.classList.remove('hide');
10104
+ }
10105
+ if (buttonCancel.classList.contains('hide')) {
10106
+ buttonCancel.classList.remove('hide');
10107
+ }
10108
+ if (!buttonFeedback.classList.contains('hide')) {
10109
+ buttonFeedback.classList.add('hide');
10110
+ }
10111
+ // const body = {
10112
+ // projectid: this.projectId,
10113
+ // complianceid: compliance.id
10114
+ // }
10115
+ // console.log(body);
10116
+ });
10117
+ (_p = this._SfDetailContainer.querySelector('#button-feedback-cancel')) === null || _p === void 0 ? void 0 : _p.addEventListener('click', () => {
10118
+ const feedbackMessage = this._SfDetailContainer.querySelector('#feedback-message');
10119
+ const buttonFeedback = this._SfDetailContainer.querySelector('#button-feedback');
10120
+ const buttonCancel = this._SfDetailContainer.querySelector('#button-feedback-cancel');
10121
+ const buttonConfirm = this._SfDetailContainer.querySelector('#button-feedback-confirm');
10122
+ console.log(buttonConfirm.classList);
10123
+ if (!feedbackMessage.classList.contains('hide')) {
10124
+ feedbackMessage.classList.add('hide');
10125
+ }
10126
+ if (!buttonConfirm.classList.contains('hide')) {
10127
+ buttonConfirm.classList.add('hide');
10128
+ }
10129
+ if (!buttonCancel.classList.contains('hide')) {
10130
+ buttonCancel.classList.add('hide');
10131
+ }
10132
+ if (buttonFeedback.classList.contains('hide')) {
10133
+ buttonFeedback.classList.remove('hide');
10134
+ }
10135
+ });
10136
+ (_q = this._SfDetailContainer.querySelector('#button-feedback-confirm')) === null || _q === void 0 ? void 0 : _q.addEventListener('click', async () => {
10137
+ const feedbackMessage = this._SfDetailContainer.querySelector('#feedback-message');
10138
+ const buttonCancel = this._SfDetailContainer.querySelector('#button-feedback-cancel');
10139
+ const buttonClose = this._SfDetailContainer.querySelector('#button-detail-close');
10140
+ console.log('sending feedback', event);
10141
+ if (feedbackMessage.value.length === 0) {
10142
+ feedbackMessage.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
10143
+ }
10144
+ else {
10145
+ feedbackMessage.setAttribute('style', 'border:');
10146
+ this.uploadTriggerMyEvent(event.id + ";" + event.shortid, feedbackMessage.value, event.countries.join(",").replace(/ *\([^)]*\) */g, ""), event.entities.join(',').replace(/ *\([^)]*\) */g, ""), event.locations.join(',').replace(/ *\([^)]*\) */g, ""), event.statute[0], event.subcategory[0]);
10147
+ buttonCancel.click();
10148
+ buttonClose.click();
10149
+ }
10150
+ });
10151
+ (_r = this._SfDetailContainer.querySelector('#feedback-message')) === null || _r === void 0 ? void 0 : _r.addEventListener('keyup', (e) => {
10152
+ if (e.code == "Enter") {
10153
+ const buttonConfirm = this._SfDetailContainer.querySelector('#button-feedback-confirm');
10154
+ buttonConfirm.click();
10155
+ }
10156
+ });
10246
10157
  if (this.mode == "consumer" || this.mode == "next") {
10247
- (_l = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', async (ev) => {
10158
+ (_s = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _s === void 0 ? void 0 : _s.addEventListener('click', async (ev) => {
10248
10159
  let buttonClick = ev.target;
10249
10160
  buttonClick.innerHTML = "Saving...";
10250
10161
  const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
@@ -10351,7 +10262,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10351
10262
  }
10352
10263
  }
10353
10264
  });
10354
- (_m = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _m === void 0 ? void 0 : _m.addEventListener('click', async (ev) => {
10265
+ (_t = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _t === void 0 ? void 0 : _t.addEventListener('click', async (ev) => {
10355
10266
  let buttonClick = ev.target;
10356
10267
  buttonClick.innerHTML = "Saving...";
10357
10268
  const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
@@ -10465,7 +10376,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10465
10376
  else {
10466
10377
  if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
10467
10378
  this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
10468
- (_o = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _o === void 0 ? void 0 : _o.addEventListener('click', async (ev) => {
10379
+ (_u = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
10469
10380
  var _a, _b;
10470
10381
  let buttonClick = ev.target;
10471
10382
  buttonClick.innerHTML = "Saving...";
@@ -10780,7 +10691,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10780
10691
  }
10781
10692
  this.fetchStatuteDefinitionDetails(statuteName);
10782
10693
  if (event['reportformat'] != null && event['reportformat'].length > 0) {
10783
- this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_p = event['reportformatschema']) !== null && _p !== void 0 ? _p : "", (_q = event['reportformatvalues']) !== null && _q !== void 0 ? _q : "");
10694
+ this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_v = event['reportformatschema']) !== null && _v !== void 0 ? _v : "", (_w = event['reportformatvalues']) !== null && _w !== void 0 ? _w : "");
10784
10695
  }
10785
10696
  };
10786
10697
  this.renderCalendar = () => {
@@ -13532,204 +13532,34 @@ export class SfIEvents extends LitElement {
13532
13532
  html += '</div>';
13533
13533
  html += '</div>';
13534
13534
 
13535
- html += '</div>';
13536
-
13537
- // html += '<div class="d-flex m-20 flex-wrap">';
13538
-
13539
- // for(var k = 0; k < Object.keys(event).length; k++) {
13540
- // if(!this.getEventPreviewFields().includes(Object.keys(event)[k])) {
13541
-
13542
- // if(!this.getEventHideFields().includes(Object.keys(event)[k])) {
13543
- // html += '<div class="m-20">';
13544
- // html += '<div part="detail-head"><strong>'+Object.keys(event)[k]+'</strong></div>'
13545
- // //console.log(Object.keys(event)[k], event[Object.keys(event)[k]]);
13546
- // if((event[Object.keys(event)[k]] + "").indexOf("[") >= 0) {
13547
- // html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
13548
- // } else {
13549
- // html += '<sf-i-elastic-text text="'+(event[Object.keys(event)[k]] + "").replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
13550
- // }
13551
- // html += '</div>';
13552
- // }
13553
-
13554
- // }
13555
- // }
13556
-
13557
- if(this.mode == "consumer" || this.mode == "next") {
13558
-
13559
-
13560
- //console.log('docs received', event['documents']);
13561
- //console.log('docs received', comments);
13562
- //console.log('docs received', approved);
13563
-
13564
- /* if(this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) {
13565
-
13566
- if(comments.length > 0) {
13567
-
13568
- html += '<div class="d-flex justify-between m-20">';
13569
- html += '<h3 part="results-title" class="m-0"><br />Approve Compliance</h3>';
13570
- html += '</div>';
13571
- html += '<div class="m-20" part="report-container">';
13572
- html += '<div class="d-flex justify-between align-center">'
13573
- html += '<button class="invisible" part="button">Save</button>'
13574
- html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
13575
- html += '</div>'
13576
-
13577
- if(this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
13578
- html += '<div class="m-20">';
13579
- html += '<label part="input-label">Supporting Documents</label>';
13580
- html += '<slot name="uploader"></slot>';
13581
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
13582
- html += '</div>';
13583
- }
13584
-
13585
- html += '<div class="d-flex m-20 flex-col">';
13586
- html += '<label part="input-label">Approver Comments*</label>';
13587
- html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
13588
- html += '<label part="input-label">Date of Completion*</label>';
13589
- html += '<input id="input-approver-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" disabled/><br />';
13590
- html += '<div>'
13591
- html += '<label part="input-label">Approve?*</label><br />';
13592
- html += '<div class="mt-5">'
13593
- html += '<input id="input-approve-yes" name="radio-approved" type="radio"/> Yes';
13594
- html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
13595
- html += '</div>'
13596
- html += '</div>';
13597
- html += '</div>';
13598
- html += '</div>';
13599
-
13600
- }
13601
-
13602
- }
13535
+ html += '<div class="accordian-section section-feedback pl-20 pr-20" part="accordian-section">';
13536
+ html += '<div class="d-flex justify-between accordian-head head-feedback" part="accordian-head">';
13537
+ html += '<h3>Feedback</h3>'
13538
+ html += '<h3 class="head-indicator-feedback">+</h3>'
13539
+ html += '</div>';
13540
+ html += '<div class="d-flex flex-wrap accordian-body body-feedback hide" part="accordian-body">';
13603
13541
 
13604
- if(this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) {
13605
-
13606
- html += '<div class="d-flex justify-between m-20">';
13607
- html += '<h3 part="results-title" class="m-0"><br />Report Compliance</h3>';
13608
- html += '</div>';
13609
-
13610
- var showSubmissionSection = true;
13611
- var showGoogleFormLink = false;
13612
-
13613
- if(event['form'].length > 5) {
13614
-
13615
- if(event['form'].indexOf('docs.google.com/forms') >= 0) {
13616
- showSubmissionSection = false;
13617
- if(!approved) {
13618
- showGoogleFormLink = true;
13619
-
13620
- }
13621
- }
13622
-
13623
- }
13624
-
13625
- if(showGoogleFormLink) {
13626
- html += ('<div part="detail-summary-form" class="mt-20 pl-20 pr-20"><button part="button" onclick="window.open(\'' + event['form'] + (this.projectId + '_' + entityId + '_' + locationId + '_' + event['id'] + '_' + mmddyyyy) + '\',\'_blank\')">Submit Via Link</button></div>');
13627
- }
13628
-
13629
- if(showSubmissionSection) {
13630
-
13631
- html += '<div class="m-20" part="report-container">';
13632
- html += '<div class="d-flex justify-between align-center">'
13633
- html += '<button class="invisible" part="button">Save</button>'
13634
- html += '<button id="button-uploader-submit-report" class="button-submit" part="button">Save</button>'
13635
- html += '</div>'
13636
-
13637
- html += '<div class="d-flex m-20 flex-col">';
13638
- html += '<label part="input-label">Reporter Comments*</label>';
13639
- html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
13640
- html += '<label part="input-label">Date of Completion*</label>';
13641
- 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 />';
13642
- // if(docsOptional.length === 0) {
13643
- html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
13644
-
13645
- if(event['uploadguidance'] != null && event['uploadguidance'].length > 0) {
13646
- html += ('<div part="uploader-analysis-message">'+event['uploadguidance']+'</div>');
13647
- }
13648
-
13649
- html += '<slot name="uploader"></slot>';
13650
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
13651
- // }
13652
- html += '<br />';
13653
- if(event['reportformat'] != null && event['reportformat'].length > 0){
13654
- html += '<div id="report-format-container"><div class="box"></div></div>'
13655
- }
13656
- html += '<br />';
13657
- if(makercheckers.length > 0) {
13658
- html += '<div part="td-head" class="td-head d-flex justify-center align-center"><span class="material-symbols-outlined">check_small</span><div>&nbsp;Auto-approve Enabled</div></div>';
13659
-
13660
- if(completeness == "pending-approval" && this.enableDeleteLatestReport) {
13661
- html += '<div part="td-head" class="td-head d-flex justify-center align-center"><button class="mt-5" part="button" id="button-auto-approve">Auto Approve</button></div>';
13662
- }
13663
- }
13664
- html += '</div>';
13665
- html += '</div>';
13666
-
13667
- }
13668
-
13669
-
13670
-
13671
-
13672
- }
13673
-
13674
- if(this.myRole == this.TAB_AUDITOR) {
13675
-
13676
- html += '<div class="d-flex justify-between m-20">';
13677
- html += '<h3 part="results-title" class="m-0"><br />Audit Compliance</h3>';
13678
- html += '</div>';
13679
- html += '<div class="m-20" part="report-container">';
13680
- html += '<div class="d-flex justify-between align-center">'
13681
- html += '<button class="invisible" part="button">Save</button>'
13682
- html += '<button id="button-uploader-submit-audit" class="button-submit" part="button">Save</button>'
13542
+ html += '<div class="d-flex justify-end w-100 flex-wrap">'
13543
+ html += '<div class="d-flex w-100 mb-10">'
13544
+ html += '<div part="feedback-message">Do you wish to send us feedback about this compliance? Any doubts? Need guidance or more clarity? Drop us a feedback and we will revert soon.</div>'
13683
13545
  html += '</div>'
13684
-
13685
- html += '<div class="d-flex m-20 flex-col">';
13686
- html += '<label part="input-label">Auditor Comments</label>';
13687
- html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
13688
- html += '<label part="input-label">Date of Completion</label>';
13689
- html += '<input id="input-auditor-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" max="'+(new Date().toISOString().substring(0, 10))+'" readonly/><br />';
13690
- html += '<div>'
13691
- html += '<label part="input-label">Approve?</label><br />';
13692
- html += '<div class="mt-5">'
13693
- html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
13694
- html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
13695
- html += '</div>'
13696
- html += '</div>';
13697
- html += '<br />';
13698
- if(docs.length > 0) {
13699
- html += '<label part="input-label">Supporting Documents</label>';
13700
- html += '<slot name="uploader"></slot>';
13701
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
13702
- }
13703
- html += '</div>';
13704
- html += '</div>';
13705
-
13706
- }
13546
+ html += '<div class="d-flex justify-end w-100 mb-10">'
13547
+ html += '<textarea part="input" id="feedback-message" class="w-100 mt-10 mb-10 hide" placeholder="Type your feedback message here..."></textarea>'
13548
+ html += '</div>'
13549
+ html += '<div class="d-flex w-100">'
13550
+ 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>');
13551
+ 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>');
13552
+ html += ('<button part="button-lg-short" id="button-feedback-confirm" class="hide d-flex justify-center align-center"><span class="material-symbols-outlined">commentcheck</span><span>&nbsp;&nbsp;Submit Feedback</span></button>');
13553
+ html += '</div>'
13554
+ html += '</div>'
13707
13555
 
13708
- if(this.myRole == this.TAB_VIEWER) {
13556
+ html += '</div>';
13557
+ html += '</div>';
13709
13558
 
13710
- html += '<div class="d-flex justify-between m-20">';
13711
- html += '<h3 part="results-title" class="m-0"><br />View Compliance</h3>';
13712
- html += '</div>';
13713
- html += '<div class="m-20" part="report-container">';
13559
+ html += '</div>';
13714
13560
 
13715
- html += '<div class="d-flex m-20 flex-col">';
13716
- html += '<div>'
13717
- html += '<label part="input-label">Approve?</label><br />';
13718
- html += '<div class="mt-5">'
13719
- html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
13720
- html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
13721
- html += '</div>'
13722
- html += '</div>';
13723
- html += '<br />';
13724
- if(docs.length === 0) {
13725
- html += '<label part="input-label">Supporting Documents</label>';
13726
- html += '<slot name="uploader"></slot>';
13727
- html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
13728
- }
13729
- html += '</div>';
13730
- html += '</div>';
13561
+ if(this.mode == "consumer" || this.mode == "next") {
13731
13562
 
13732
- } */
13733
13563
  html += '<div part="reporting-view-container">'
13734
13564
  html += this.renderReporting(event, mmddyyyy);
13735
13565
  html += "</div>"
@@ -13949,6 +13779,118 @@ export class SfIEvents extends LitElement {
13949
13779
  }
13950
13780
  });
13951
13781
 
13782
+ (this._SfDetailContainer as HTMLDivElement).querySelector('.head-feedback')?.addEventListener('click', () => {
13783
+ if(((this._SfDetailContainer as HTMLDivElement).querySelector('.body-feedback') as HTMLDivElement).style.display == 'flex') {
13784
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('.body-feedback') as HTMLDivElement).style.display = 'none';
13785
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('.head-indicator-feedback') as HTMLDivElement).innerHTML = '+';
13786
+ } else {
13787
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('.body-feedback') as HTMLDivElement).style.display = 'flex';
13788
+ ((this._SfDetailContainer as HTMLDivElement).querySelector('.head-indicator-feedback') as HTMLDivElement).innerHTML = '-';
13789
+ }
13790
+ });
13791
+
13792
+ (this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close')?.addEventListener('click', () => {
13793
+
13794
+ (this._SfDetailContainer as HTMLDivElement).innerHTML = '';
13795
+ (this._SfDetailContainer as HTMLDivElement).style.display = 'none';
13796
+
13797
+ });
13798
+
13799
+ (this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback')?.addEventListener('click', () => {
13800
+
13801
+ const feedbackMessage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#feedback-message') as HTMLTextAreaElement);
13802
+ const buttonFeedback = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback') as HTMLButtonElement);
13803
+ const buttonCancel = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-cancel') as HTMLButtonElement);
13804
+ const buttonConfirm = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-confirm') as HTMLButtonElement);
13805
+
13806
+ console.log(buttonConfirm.classList);
13807
+
13808
+ if(feedbackMessage.classList.contains('hide')) {
13809
+ feedbackMessage.classList.remove('hide');
13810
+ }
13811
+
13812
+ if(buttonConfirm.classList.contains('hide')) {
13813
+ buttonConfirm.classList.remove('hide');
13814
+ }
13815
+
13816
+ if(buttonCancel.classList.contains('hide')) {
13817
+ buttonCancel.classList.remove('hide');
13818
+ }
13819
+
13820
+ if(!buttonFeedback.classList.contains('hide')) {
13821
+ buttonFeedback.classList.add('hide');
13822
+ }
13823
+
13824
+ // const body = {
13825
+ // projectid: this.projectId,
13826
+ // complianceid: compliance.id
13827
+ // }
13828
+ // console.log(body);
13829
+
13830
+ });
13831
+
13832
+ (this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-cancel')?.addEventListener('click', () => {
13833
+
13834
+ const feedbackMessage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#feedback-message') as HTMLTextAreaElement);
13835
+ const buttonFeedback = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback') as HTMLButtonElement);
13836
+ const buttonCancel = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-cancel') as HTMLButtonElement);
13837
+ const buttonConfirm = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-confirm') as HTMLButtonElement);
13838
+
13839
+ console.log(buttonConfirm.classList);
13840
+
13841
+ if(!feedbackMessage.classList.contains('hide')) {
13842
+ feedbackMessage.classList.add('hide');
13843
+ }
13844
+
13845
+ if(!buttonConfirm.classList.contains('hide')) {
13846
+ buttonConfirm.classList.add('hide');
13847
+ }
13848
+
13849
+ if(!buttonCancel.classList.contains('hide')) {
13850
+ buttonCancel.classList.add('hide');
13851
+ }
13852
+
13853
+ if(buttonFeedback.classList.contains('hide')) {
13854
+ buttonFeedback.classList.remove('hide');
13855
+ }
13856
+
13857
+ });
13858
+
13859
+ (this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-confirm')?.addEventListener('click', async () => {
13860
+
13861
+ const feedbackMessage = ((this._SfDetailContainer as HTMLDivElement).querySelector('#feedback-message') as HTMLTextAreaElement);
13862
+ const buttonCancel = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-cancel') as HTMLButtonElement);
13863
+ const buttonClose = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement);
13864
+ console.log('sending feedback', event);
13865
+ if(feedbackMessage.value.length === 0) {
13866
+ feedbackMessage.setAttribute('style', 'border:solid 2px ' + this.COLOR_REJECTED + ' !important');
13867
+ } else {
13868
+ feedbackMessage.setAttribute('style', 'border:');
13869
+ this.uploadTriggerMyEvent(
13870
+ event.id + ";" + event.shortid,
13871
+ feedbackMessage.value,
13872
+ event.countries.join(",").replace(/ *\([^)]*\) */g, ""),
13873
+ event.entities.join(',').replace(/ *\([^)]*\) */g, ""),
13874
+ event.locations.join(',').replace(/ *\([^)]*\) */g, ""),
13875
+ event.statute[0],
13876
+ event.subcategory[0]);
13877
+ buttonCancel.click();
13878
+ buttonClose.click();
13879
+ }
13880
+
13881
+ });
13882
+
13883
+ (this._SfDetailContainer as HTMLDivElement).querySelector('#feedback-message')?.addEventListener('keyup', (e: any) => {
13884
+
13885
+ if(e.code == "Enter") {
13886
+
13887
+ const buttonConfirm = ((this._SfDetailContainer as HTMLDivElement).querySelector('#button-feedback-confirm') as HTMLButtonElement);
13888
+ buttonConfirm.click();
13889
+
13890
+ }
13891
+
13892
+ })
13893
+
13952
13894
  if(this.mode == "consumer" || this.mode == "next") {
13953
13895
 
13954
13896
  (this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev:any) => {