sf-i-events 1.0.823 → 1.0.825

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
@@ -714,7 +714,7 @@
714
714
  </div>
715
715
 
716
716
  </sf-i-events> -->
717
- <!-- <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">
717
+ <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">
718
718
 
719
719
  <div slot="uploader">
720
720
  <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>
@@ -723,7 +723,7 @@
723
723
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
724
724
  </div>
725
725
 
726
- </sf-i-events> -->
726
+ </sf-i-events>
727
727
  <!-- <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">
728
728
 
729
729
  <div slot="uploader">
@@ -737,7 +737,7 @@
737
737
  <!-- <sf-i-events projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" mode="onboarding" locations="{&quot;India&quot;:{&quot;Telangana&quot;:[&quot;Corporate Office&quot;,&quot;Telangana Plant&quot;],&quot;Karnataka&quot;:[&quot;Prime&quot;,&quot;Stopak&quot;,&quot;Wintek&quot;,&quot;Tools&quot;,&quot;Conversion&quot;],&quot;Gujarat&quot;:[&quot;Dahej&quot;],&quot;Dadra and Nagar Haveli and Daman and Diu&quot;:[&quot;Silvassa&quot;],&quot;Uttarakhand&quot;:[&quot;Uttarakhand&quot;],&quot;Maharashtra&quot;:[&quot;Pune&quot;],&quot;Andhra Pradesh&quot;:[&quot;AP&quot;],&quot;Chhattisgarh&quot;:[&quot;Chhattisgarh&quot;],&quot;Goa&quot;:[&quot;Goa&quot;],&quot;Himachal Pradesh&quot;:[&quot;HP&quot;],&quot;Haryana&quot;:[&quot;Haryana&quot;],&quot;Jharkhand&quot;:[&quot;Jharkhand&quot;],&quot;Madhya Pradesh&quot;:[&quot;MP&quot;],&quot;Odisha&quot;:[&quot;Odisha&quot;],&quot;Punjab&quot;:[&quot;Punjab&quot;],&quot;Tamil Nadu&quot;:[&quot;TN&quot;],&quot;Uttar Pradesh&quot;:[&quot;UP&quot;],&quot;West Bengal&quot;:[&quot;WB&quot;]}}" contractstartdate="01/04/2024" 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">
738
738
 
739
739
  </sf-i-events> -->
740
- <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" fill="solid" username="Local Approver 1" userprofileid="c44dcd04-aebb-4417-ba6b-fac170efd5d0" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="approver" showregisterexport="false" 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">
740
+ <!-- <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" fill="solid" username="Local Approver 1" userprofileid="c44dcd04-aebb-4417-ba6b-fac170efd5d0" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="approver" showregisterexport="false" 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">
741
741
 
742
742
  <div slot="uploader">
743
743
  <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>
@@ -746,7 +746,7 @@
746
746
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
747
747
  </div>
748
748
 
749
- </sf-i-events>
749
+ </sf-i-events> -->
750
750
  <!-- <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> -->
751
751
  <!-- <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> -->
752
752
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.823",
4
+ "version": "1.0.825",
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
@@ -716,12 +716,12 @@ export declare class SfIEvents extends LitElement {
716
716
  uploadUnTriggerEvent: (untrigger: any) => Promise<void>;
717
717
  uploadTriggerMyEvent: (complianceid: string, message: string, countryname: string, entityname: string, locationname: string, statute: string, subcategory: string) => Promise<void>;
718
718
  uploadTriggerEvent: (triggeredCompliances: any) => Promise<void>;
719
- uploadAudit: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<void>;
719
+ uploadAudit: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<boolean>;
720
720
  uploadAuditsBulk: (bulkBody: any) => Promise<void>;
721
- uploadReview: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<void>;
721
+ uploadReview: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module?: string) => Promise<boolean>;
722
722
  uploadReportsReviewsBulk: (bulkBody: any) => Promise<void>;
723
723
  uploadReviewsBulk: (bulkBody: any) => Promise<void>;
724
- uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string | undefined, reportformatschema: string | undefined, module: string | undefined, percentage: string | undefined, makercheckers: any) => Promise<void>;
724
+ uploadReport: (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string | undefined, reportformatschema: string | undefined, module: string | undefined, percentage: string | undefined, makercheckers: any) => Promise<boolean>;
725
725
  uploadReportsBulk: (bulkBody: any, showSuccess?: boolean) => Promise<void>;
726
726
  uploadMapping: () => Promise<void>;
727
727
  uploadEvents: () => Promise<void>;
package/sf-i-events.js CHANGED
@@ -2574,7 +2574,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2574
2574
  html += '<td part="td-body"><sf-i-elastic-text text="' + functions + '" minLength="10"></sf-i-elastic-text></td>';
2575
2575
  }
2576
2576
  if (event["risk"] != null) {
2577
- html += '<td part="td-body"><div part="stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g, '-') + '">' + event["risk"][0] + '</div></td>';
2577
+ html += '<td part="td-body"><div part="nc-stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g, '-') + '">' + event["risk"][0] + '</div></td>';
2578
2578
  }
2579
2579
  for (var k = 0; k < Object.keys(event).length; k++) {
2580
2580
  if (this.getEventPreviewFields().includes(Object.keys(event)[k])) {
@@ -3435,21 +3435,22 @@ let SfIEvents = class SfIEvents extends LitElement {
3435
3435
  }
3436
3436
  let flagBulk = false;
3437
3437
  if (this.selectedItemIds.length == 0) {
3438
- await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
3439
- for (var p = 0; p < this.events[mmdd].length; p++) {
3440
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3441
- this.events[mmdd][p].approved = approved;
3442
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
3443
- this.events[mmdd][p].lastupdated = new Date().toString();
3444
- if (approved) {
3445
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
3438
+ if (await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")) {
3439
+ for (var p = 0; p < this.events[mmdd].length; p++) {
3440
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3441
+ this.events[mmdd][p].approved = approved;
3442
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
3443
+ this.events[mmdd][p].lastupdated = new Date().toString();
3444
+ if (approved) {
3445
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
3446
+ }
3446
3447
  }
3447
3448
  }
3449
+ if (this.recentlyReported[mmdd] == null) {
3450
+ this.recentlyReported[mmdd] = [];
3451
+ }
3452
+ this.recentlyReported[mmdd].push(event);
3448
3453
  }
3449
- if (this.recentlyReported[mmdd] == null) {
3450
- this.recentlyReported[mmdd] = [];
3451
- }
3452
- this.recentlyReported[mmdd].push(event);
3453
3454
  }
3454
3455
  else {
3455
3456
  let bulkBodyReview = [];
@@ -3538,21 +3539,22 @@ let SfIEvents = class SfIEvents extends LitElement {
3538
3539
  else {
3539
3540
  let flagBulk = false;
3540
3541
  if (this.selectedItemIds.length == 0) {
3541
- await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
3542
- for (var p = 0; p < this.events[mmdd].length; p++) {
3543
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3544
- this.events[mmdd][p].approved = approved;
3545
- this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
3546
- this.events[mmdd][p].lastupdated = new Date().toString();
3547
- if (approved) {
3548
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
3542
+ if (await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")) {
3543
+ for (var p = 0; p < this.events[mmdd].length; p++) {
3544
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3545
+ this.events[mmdd][p].approved = approved;
3546
+ this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
3547
+ this.events[mmdd][p].lastupdated = new Date().toString();
3548
+ if (approved) {
3549
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + "";
3550
+ }
3549
3551
  }
3550
3552
  }
3553
+ if (this.recentlyReported[mmdd] == null) {
3554
+ this.recentlyReported[mmdd] = [];
3555
+ }
3556
+ this.recentlyReported[mmdd].push(event);
3551
3557
  }
3552
- if (this.recentlyReported[mmdd] == null) {
3553
- this.recentlyReported[mmdd] = [];
3554
- }
3555
- this.recentlyReported[mmdd].push(event);
3556
3558
  }
3557
3559
  else {
3558
3560
  let bulkBodyAudit = [];
@@ -3696,32 +3698,33 @@ let SfIEvents = class SfIEvents extends LitElement {
3696
3698
  else {
3697
3699
  let flagBulk = false;
3698
3700
  if (this.selectedItemIds.length == 0) {
3699
- await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers);
3700
- console.log('this.events', this.events);
3701
- if (this.mode != "next") {
3702
- for (var p = 0; p < this.events[mmdd].length; p++) {
3703
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3704
- this.events[mmdd][p].documents = docs;
3705
- this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
3706
- this.events[mmdd][p].lastupdated = new Date().toString();
3707
- }
3708
- }
3709
- if (event.makercheckers.length > 0) {
3710
- // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
3701
+ if (await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)) {
3702
+ console.log('this.events', this.events);
3703
+ if (this.mode != "next") {
3711
3704
  for (var p = 0; p < this.events[mmdd].length; p++) {
3712
3705
  if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3713
- this.events[mmdd][p].approved = true;
3714
- // this.events[mmdd][p].documents = docs
3715
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
3706
+ this.events[mmdd][p].documents = docs;
3707
+ this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
3716
3708
  this.events[mmdd][p].lastupdated = new Date().toString();
3717
3709
  }
3718
3710
  }
3711
+ if (event.makercheckers.length > 0) {
3712
+ // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
3713
+ for (var p = 0; p < this.events[mmdd].length; p++) {
3714
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
3715
+ this.events[mmdd][p].approved = true;
3716
+ // this.events[mmdd][p].documents = docs
3717
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
3718
+ this.events[mmdd][p].lastupdated = new Date().toString();
3719
+ }
3720
+ }
3721
+ }
3722
+ if (this.recentlyReported[mmdd] == null) {
3723
+ this.recentlyReported[mmdd] = [];
3724
+ }
3725
+ this.recentlyReported[mmdd].push(event);
3726
+ console.log('recently reported', this.recentlyReported);
3719
3727
  }
3720
- if (this.recentlyReported[mmdd] == null) {
3721
- this.recentlyReported[mmdd] = [];
3722
- }
3723
- this.recentlyReported[mmdd].push(event);
3724
- console.log('recently reported', this.recentlyReported);
3725
3728
  }
3726
3729
  }
3727
3730
  else {
@@ -9122,18 +9125,19 @@ let SfIEvents = class SfIEvents extends LitElement {
9122
9125
  let flagBulk = false;
9123
9126
  if (this.selectedItemIds.length === 0) {
9124
9127
  console.log('mmddyyyy', mmddyyyy);
9125
- await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events");
9126
- for (var p = 0; p < this.events[mmdd].length; p++) {
9127
- if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9128
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
9129
- this.events[mmdd][p].lastupdated = new Date().toString();
9128
+ if (await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")) {
9129
+ for (var p = 0; p < this.events[mmdd].length; p++) {
9130
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9131
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
9132
+ this.events[mmdd][p].lastupdated = new Date().toString();
9133
+ }
9130
9134
  }
9135
+ if (this.recentlyReported[mmdd] == null) {
9136
+ this.recentlyReported[mmdd] = [];
9137
+ }
9138
+ this.recentlyReported[mmdd].push(listEvent);
9139
+ console.log('review single');
9131
9140
  }
9132
- if (this.recentlyReported[mmdd] == null) {
9133
- this.recentlyReported[mmdd] = [];
9134
- }
9135
- this.recentlyReported[mmdd].push(event);
9136
- console.log('review single');
9137
9141
  }
9138
9142
  else {
9139
9143
  let bulkBodyReview = [];
@@ -9239,18 +9243,19 @@ let SfIEvents = class SfIEvents extends LitElement {
9239
9243
  else {
9240
9244
  let flagBulk = false;
9241
9245
  if (this.selectedItemIds.length === 0) {
9242
- await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events");
9243
- for (var p = 0; p < this.events[mmdd].length; p++) {
9244
- if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9245
- this.events[mmdd][p].approved = approved;
9246
- this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
9247
- this.events[mmdd][p].lastupdated = new Date().toString();
9246
+ if (await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")) {
9247
+ for (var p = 0; p < this.events[mmdd].length; p++) {
9248
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9249
+ this.events[mmdd][p].approved = approved;
9250
+ this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
9251
+ this.events[mmdd][p].lastupdated = new Date().toString();
9252
+ }
9248
9253
  }
9254
+ if (this.recentlyReported[mmdd] == null) {
9255
+ this.recentlyReported[mmdd] = [];
9256
+ }
9257
+ this.recentlyReported[mmdd].push(listEvent);
9249
9258
  }
9250
- if (this.recentlyReported[mmdd] == null) {
9251
- this.recentlyReported[mmdd] = [];
9252
- }
9253
- this.recentlyReported[mmdd].push(event);
9254
9259
  console.log('uploadaudit single');
9255
9260
  }
9256
9261
  else {
@@ -9407,32 +9412,33 @@ let SfIEvents = class SfIEvents extends LitElement {
9407
9412
  this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
9408
9413
  let flagBulk = false;
9409
9414
  if (this.selectedItemIds.length === 0) {
9410
- await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers);
9411
- console.log('this.events', this.events);
9412
- for (var p = 0; p < this.events[mmdd].length; p++) {
9413
- if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9414
- this.events[mmdd][p].documents = docs;
9415
- this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
9416
- this.events[mmdd][p].lastupdated = new Date().toString();
9417
- }
9418
- }
9419
- console.log('uploadReport single');
9420
- if (makercheckers.length > 0) {
9421
- // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
9415
+ if (await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)) {
9416
+ console.log('this.events', this.events);
9422
9417
  for (var p = 0; p < this.events[mmdd].length; p++) {
9423
9418
  if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9424
- this.events[mmdd][p].approved = true;
9425
- // this.events[mmdd][p].documents = docs
9426
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
9419
+ this.events[mmdd][p].documents = docs;
9420
+ this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
9427
9421
  this.events[mmdd][p].lastupdated = new Date().toString();
9428
9422
  }
9429
9423
  }
9430
- console.log('upload report auto approve single');
9431
- }
9432
- if (this.recentlyReported[mmdd] == null) {
9433
- this.recentlyReported[mmdd] = [];
9424
+ console.log('uploadReport single');
9425
+ if (makercheckers.length > 0) {
9426
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
9427
+ for (var p = 0; p < this.events[mmdd].length; p++) {
9428
+ if (this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
9429
+ this.events[mmdd][p].approved = true;
9430
+ // this.events[mmdd][p].documents = docs
9431
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
9432
+ this.events[mmdd][p].lastupdated = new Date().toString();
9433
+ }
9434
+ }
9435
+ console.log('upload report auto approve single');
9436
+ }
9437
+ if (this.recentlyReported[mmdd] == null) {
9438
+ this.recentlyReported[mmdd] = [];
9439
+ }
9440
+ this.recentlyReported[mmdd].push(listEvent);
9434
9441
  }
9435
- this.recentlyReported[mmdd].push(event);
9436
9442
  }
9437
9443
  else {
9438
9444
  let bulkBody = [];
@@ -10211,17 +10217,18 @@ let SfIEvents = class SfIEvents extends LitElement {
10211
10217
  let flagBulk = false;
10212
10218
  if (this.selectedItemIds.length === 0) {
10213
10219
  // console.log('mmddyyyy', mmddyyyy)
10214
- await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
10215
- for (var p = 0; p < this.events[mmdd].length; p++) {
10216
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10217
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10218
- this.events[mmdd][p].lastupdated = new Date().toString();
10220
+ if (await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")) {
10221
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10222
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10223
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10224
+ this.events[mmdd][p].lastupdated = new Date().toString();
10225
+ }
10219
10226
  }
10227
+ if (this.recentlyReported[mmdd] == null) {
10228
+ this.recentlyReported[mmdd] = [];
10229
+ }
10230
+ this.recentlyReported[mmdd].push(event);
10220
10231
  }
10221
- if (this.recentlyReported[mmdd] == null) {
10222
- this.recentlyReported[mmdd] = [];
10223
- }
10224
- this.recentlyReported[mmdd].push(event);
10225
10232
  }
10226
10233
  else {
10227
10234
  let bulkBodyReview = [];
@@ -10326,18 +10333,19 @@ let SfIEvents = class SfIEvents extends LitElement {
10326
10333
  else {
10327
10334
  let flagBulk = false;
10328
10335
  if (this.selectedItemIds.length === 0) {
10329
- await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events");
10330
- for (var p = 0; p < this.events[mmdd].length; p++) {
10331
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10332
- this.events[mmdd][p].approved = approved;
10333
- this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10334
- this.events[mmdd][p].lastupdated = new Date().toString();
10336
+ if (await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")) {
10337
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10338
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10339
+ this.events[mmdd][p].approved = approved;
10340
+ this.events[mmdd][p].comments.push({ 'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString() });
10341
+ this.events[mmdd][p].lastupdated = new Date().toString();
10342
+ }
10335
10343
  }
10344
+ if (this.recentlyReported[mmdd] == null) {
10345
+ this.recentlyReported[mmdd] = [];
10346
+ }
10347
+ this.recentlyReported[mmdd].push(event);
10336
10348
  }
10337
- if (this.recentlyReported[mmdd] == null) {
10338
- this.recentlyReported[mmdd] = [];
10339
- }
10340
- this.recentlyReported[mmdd].push(event);
10341
10349
  }
10342
10350
  else {
10343
10351
  let bulkBodyAudit = [];
@@ -10495,30 +10503,31 @@ let SfIEvents = class SfIEvents extends LitElement {
10495
10503
  //console.log('makerscheckers', makercheckers, reportercomments);
10496
10504
  // console.log('reportformatvalues', reportformatvalues)
10497
10505
  // console.log('reportformatschema',reportformatschema)
10498
- await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers);
10499
- console.log('this.events', this.events);
10500
- for (var p = 0; p < this.events[mmdd].length; p++) {
10501
- if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10502
- this.events[mmdd][p].documents = docs;
10503
- this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
10504
- this.events[mmdd][p].lastupdated = new Date().toString();
10505
- }
10506
- }
10507
- if (makercheckers.length > 0) {
10508
- // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
10506
+ if (await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)) {
10507
+ console.log('this.events', this.events);
10509
10508
  for (var p = 0; p < this.events[mmdd].length; p++) {
10510
10509
  if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10511
- this.events[mmdd][p].approved = true;
10512
- // this.events[mmdd][p].documents = docs
10513
- this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10510
+ this.events[mmdd][p].documents = docs;
10511
+ this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
10514
10512
  this.events[mmdd][p].lastupdated = new Date().toString();
10515
10513
  }
10516
10514
  }
10515
+ if (makercheckers.length > 0) {
10516
+ // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
10517
+ for (var p = 0; p < this.events[mmdd].length; p++) {
10518
+ if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId) {
10519
+ this.events[mmdd][p].approved = true;
10520
+ // this.events[mmdd][p].documents = docs
10521
+ this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
10522
+ this.events[mmdd][p].lastupdated = new Date().toString();
10523
+ }
10524
+ }
10525
+ }
10526
+ if (this.recentlyReported[mmdd] == null) {
10527
+ this.recentlyReported[mmdd] = [];
10528
+ }
10529
+ this.recentlyReported[mmdd].push(event);
10517
10530
  }
10518
- if (this.recentlyReported[mmdd] == null) {
10519
- this.recentlyReported[mmdd] = [];
10520
- }
10521
- this.recentlyReported[mmdd].push(event);
10522
10531
  }
10523
10532
  else {
10524
10533
  let bulkBody = [];
@@ -16941,6 +16950,7 @@ let SfIEvents = class SfIEvents extends LitElement {
16941
16950
  "username": this.userName,
16942
16951
  "module": module
16943
16952
  };
16953
+ let retValue = true;
16944
16954
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
16945
16955
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
16946
16956
  this._SfLoader.innerHTML = '';
@@ -16962,7 +16972,9 @@ let SfIEvents = class SfIEvents extends LitElement {
16962
16972
  else {
16963
16973
  const jsonRespose = JSON.parse(xhr.responseText);
16964
16974
  this.setError(jsonRespose.error);
16975
+ retValue = false;
16965
16976
  }
16977
+ return retValue;
16966
16978
  };
16967
16979
  this.uploadAuditsBulk = async (bulkBody) => {
16968
16980
  let url = "https://" + this.apiId + "/uploadauditsbulk";
@@ -16995,6 +17007,7 @@ let SfIEvents = class SfIEvents extends LitElement {
16995
17007
  "username": this.userName,
16996
17008
  "module": module
16997
17009
  };
17010
+ let retValue = true;
16998
17011
  //console.log('uploading review', body);
16999
17012
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17000
17013
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
@@ -17016,11 +17029,13 @@ let SfIEvents = class SfIEvents extends LitElement {
17016
17029
  }
17017
17030
  else {
17018
17031
  const jsonRespose = JSON.parse(xhr.responseText);
17019
- this.setError(jsonRespose.message);
17032
+ this.setError(jsonRespose.error);
17020
17033
  setTimeout(() => {
17021
17034
  this.clearMessages();
17022
17035
  }, 3000);
17036
+ retValue = false;
17023
17037
  }
17038
+ return retValue;
17024
17039
  };
17025
17040
  this.uploadReportsReviewsBulk = async (bulkBody) => {
17026
17041
  let url = "https://" + this.apiId + "/uploadreportsreviewsbulk";
@@ -17035,7 +17050,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17035
17050
  }
17036
17051
  else {
17037
17052
  const jsonRespose = JSON.parse(xhr.responseText);
17038
- this.setError(jsonRespose.message);
17053
+ this.setError(jsonRespose.error);
17039
17054
  setTimeout(() => {
17040
17055
  this.clearMessages();
17041
17056
  }, 3000);
@@ -17054,14 +17069,14 @@ let SfIEvents = class SfIEvents extends LitElement {
17054
17069
  }
17055
17070
  else {
17056
17071
  const jsonRespose = JSON.parse(xhr.responseText);
17057
- this.setError(jsonRespose.message);
17072
+ this.setError(jsonRespose.error);
17058
17073
  setTimeout(() => {
17059
17074
  this.clearMessages();
17060
17075
  }, 3000);
17061
17076
  }
17062
17077
  };
17063
17078
  this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100", makercheckers) => {
17064
- let url = "https://" + this.apiId + "/uploadreport1";
17079
+ let url = "https://" + this.apiId + "/uploadreport2";
17065
17080
  let body = {
17066
17081
  "mmddyyyy": mmddyyyy,
17067
17082
  "projectid": this.projectId,
@@ -17084,6 +17099,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17084
17099
  "makercheckers": makercheckers
17085
17100
  };
17086
17101
  //console.log(body);
17102
+ let retValue = true;
17087
17103
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17088
17104
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
17089
17105
  this._SfLoader.innerHTML = '';
@@ -17104,14 +17120,17 @@ let SfIEvents = class SfIEvents extends LitElement {
17104
17120
  }
17105
17121
  else {
17106
17122
  const jsonRespose = JSON.parse(xhr.responseText);
17107
- this.setError(jsonRespose.message);
17123
+ console.log();
17124
+ this.setError(jsonRespose.error);
17108
17125
  setTimeout(() => {
17109
17126
  this.clearMessages();
17110
17127
  }, 3000);
17128
+ retValue = false;
17111
17129
  }
17130
+ return retValue;
17112
17131
  };
17113
17132
  this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
17114
- let url = "https://" + this.apiId + "/uploadreportsbulk1";
17133
+ let url = "https://" + this.apiId + "/uploadreportsbulk2";
17115
17134
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
17116
17135
  const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
17117
17136
  if (showSuccess) {
@@ -17127,7 +17146,7 @@ let SfIEvents = class SfIEvents extends LitElement {
17127
17146
  }
17128
17147
  else {
17129
17148
  const jsonRespose = JSON.parse(xhr.responseText);
17130
- this.setError(jsonRespose.message);
17149
+ this.setError(jsonRespose.error);
17131
17150
  setTimeout(() => {
17132
17151
  this.clearMessages();
17133
17152
  }, 3000);
@@ -4779,7 +4779,7 @@ export class SfIEvents extends LitElement {
4779
4779
  html += '<td part="td-body"><sf-i-elastic-text text="'+functions+'" minLength="10"></sf-i-elastic-text></td>';
4780
4780
  }
4781
4781
  if(event["risk"] != null){
4782
- html += '<td part="td-body"><div part="stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g,'-') + '">'+event["risk"][0]+'</div></td>';
4782
+ html += '<td part="td-body"><div part="nc-stream-event-risk-' + event["risk"][0].toLowerCase().replace(/ /g,'-') + '">'+event["risk"][0]+'</div></td>';
4783
4783
  }
4784
4784
  for(var k = 0; k < Object.keys(event).length; k++) {
4785
4785
  if(this.getEventPreviewFields().includes(Object.keys(event)[k])) {
@@ -5775,21 +5775,22 @@ export class SfIEvents extends LitElement {
5775
5775
  let flagBulk = false;
5776
5776
  if(this.selectedItemIds.length == 0){
5777
5777
 
5778
- await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
5779
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
5780
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
5781
- this.events[mmdd][p].approved = approved
5782
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
5783
- this.events[mmdd][p].lastupdated = new Date().toString()
5784
- if(approved){
5785
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
5778
+ if(await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
5779
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
5780
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
5781
+ this.events[mmdd][p].approved = approved
5782
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
5783
+ this.events[mmdd][p].lastupdated = new Date().toString()
5784
+ if(approved){
5785
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
5786
+ }
5786
5787
  }
5787
5788
  }
5789
+ if(this.recentlyReported[mmdd] == null){
5790
+ this.recentlyReported[mmdd] = []
5791
+ }
5792
+ this.recentlyReported[mmdd].push(event)
5788
5793
  }
5789
- if(this.recentlyReported[mmdd] == null){
5790
- this.recentlyReported[mmdd] = []
5791
- }
5792
- this.recentlyReported[mmdd].push(event)
5793
5794
  }else{
5794
5795
  let bulkBodyReview = []
5795
5796
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -5886,21 +5887,22 @@ export class SfIEvents extends LitElement {
5886
5887
  } else {
5887
5888
  let flagBulk = false;
5888
5889
  if(this.selectedItemIds.length == 0){
5889
- await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
5890
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
5891
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
5892
- this.events[mmdd][p].approved = approved
5893
- this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
5894
- this.events[mmdd][p].lastupdated = new Date().toString()
5895
- if(approved){
5896
- this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
5890
+ if(await this.uploadAudit(event.entityid, event.locationid, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
5891
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
5892
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
5893
+ this.events[mmdd][p].approved = approved
5894
+ this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
5895
+ this.events[mmdd][p].lastupdated = new Date().toString()
5896
+ if(approved){
5897
+ this.events[mmdd][p].dateofcompletion = new Date().getTime() + ""
5898
+ }
5897
5899
  }
5898
5900
  }
5901
+ if(this.recentlyReported[mmdd] == null){
5902
+ this.recentlyReported[mmdd] = []
5903
+ }
5904
+ this.recentlyReported[mmdd].push(event)
5899
5905
  }
5900
- if(this.recentlyReported[mmdd] == null){
5901
- this.recentlyReported[mmdd] = []
5902
- }
5903
- this.recentlyReported[mmdd].push(event)
5904
5906
  }else{
5905
5907
  let bulkBodyAudit = []
5906
5908
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -6071,35 +6073,36 @@ export class SfIEvents extends LitElement {
6071
6073
  let flagBulk = false;
6072
6074
  if(this.selectedItemIds.length == 0){
6073
6075
 
6074
- await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)
6076
+ if(await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, event.makercheckers)){
6075
6077
 
6076
- console.log('this.events', this.events);
6077
- if(this.mode != "next"){
6078
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
6079
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
6080
- this.events[mmdd][p].documents = docs
6081
- this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
6082
- this.events[mmdd][p].lastupdated = new Date().toString()
6083
- }
6084
- }
6085
-
6086
- if(event.makercheckers.length > 0) {
6087
-
6088
- // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
6078
+ console.log('this.events', this.events);
6079
+ if(this.mode != "next"){
6089
6080
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
6090
6081
  if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
6091
- this.events[mmdd][p].approved = true
6092
- // this.events[mmdd][p].documents = docs
6093
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
6082
+ this.events[mmdd][p].documents = docs
6083
+ this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
6094
6084
  this.events[mmdd][p].lastupdated = new Date().toString()
6095
6085
  }
6096
6086
  }
6087
+
6088
+ if(event.makercheckers.length > 0) {
6089
+
6090
+ // await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
6091
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
6092
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
6093
+ this.events[mmdd][p].approved = true
6094
+ // this.events[mmdd][p].documents = docs
6095
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
6096
+ this.events[mmdd][p].lastupdated = new Date().toString()
6097
+ }
6098
+ }
6099
+ }
6100
+ if(this.recentlyReported[mmdd] == null){
6101
+ this.recentlyReported[mmdd] = []
6102
+ }
6103
+ this.recentlyReported[mmdd].push(event)
6104
+ console.log('recently reported', this.recentlyReported)
6097
6105
  }
6098
- if(this.recentlyReported[mmdd] == null){
6099
- this.recentlyReported[mmdd] = []
6100
- }
6101
- this.recentlyReported[mmdd].push(event)
6102
- console.log('recently reported', this.recentlyReported)
6103
6106
  }
6104
6107
  }else{
6105
6108
  let bulkBody = []
@@ -12658,19 +12661,20 @@ export class SfIEvents extends LitElement {
12658
12661
  let flagBulk = false;
12659
12662
  if(this.selectedItemIds.length === 0) {
12660
12663
  console.log('mmddyyyy', mmddyyyy)
12661
- await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")
12662
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
12663
- if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12664
-
12665
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
12666
- this.events[mmdd][p].lastupdated = new Date().toString()
12664
+ if(await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")){
12665
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
12666
+ if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12667
+
12668
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
12669
+ this.events[mmdd][p].lastupdated = new Date().toString()
12670
+ }
12667
12671
  }
12672
+ if(this.recentlyReported[mmdd] == null){
12673
+ this.recentlyReported[mmdd] = []
12674
+ }
12675
+ this.recentlyReported[mmdd].push(listEvent)
12676
+ console.log('review single')
12668
12677
  }
12669
- if(this.recentlyReported[mmdd] == null){
12670
- this.recentlyReported[mmdd] = []
12671
- }
12672
- this.recentlyReported[mmdd].push(event)
12673
- console.log('review single')
12674
12678
  } else {
12675
12679
  let bulkBodyReview = []
12676
12680
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -12785,18 +12789,19 @@ export class SfIEvents extends LitElement {
12785
12789
  let flagBulk = false;
12786
12790
  if(this.selectedItemIds.length === 0) {
12787
12791
 
12788
- await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")
12789
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
12790
- if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12791
- this.events[mmdd][p].approved = approved
12792
- this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
12793
- this.events[mmdd][p].lastupdated = new Date().toString()
12792
+ if(await this.uploadAudit(entityId, locationId, mmddyyyy, listEvent["id"], comments, approved, listEvent.isnotice != null ? "notices" : "events")){
12793
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
12794
+ if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12795
+ this.events[mmdd][p].approved = approved
12796
+ this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
12797
+ this.events[mmdd][p].lastupdated = new Date().toString()
12798
+ }
12794
12799
  }
12800
+ if(this.recentlyReported[mmdd] == null){
12801
+ this.recentlyReported[mmdd] = []
12802
+ }
12803
+ this.recentlyReported[mmdd].push(listEvent)
12795
12804
  }
12796
- if(this.recentlyReported[mmdd] == null){
12797
- this.recentlyReported[mmdd] = []
12798
- }
12799
- this.recentlyReported[mmdd].push(event)
12800
12805
  console.log('uploadaudit single')
12801
12806
  } else {
12802
12807
  let bulkBodyAudit = []
@@ -12987,34 +12992,34 @@ export class SfIEvents extends LitElement {
12987
12992
  let flagBulk = false;
12988
12993
  if(this.selectedItemIds.length === 0) {
12989
12994
 
12990
- await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)
12991
- console.log('this.events', this.events);
12992
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
12993
- if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
12994
- this.events[mmdd][p].documents = docs
12995
- this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
12996
- this.events[mmdd][p].lastupdated = new Date().toString()
12997
- }
12998
- }
12999
- console.log('uploadReport single')
13000
- if(makercheckers.length > 0) {
13001
-
13002
- // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
12995
+ if(await this.uploadReport(entityId, locationId, mmddyyyy, listEvent["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, "notices", percentage, makercheckers)){
12996
+ console.log('this.events', this.events);
13003
12997
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
13004
12998
  if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
13005
- this.events[mmdd][p].approved = true
13006
- // this.events[mmdd][p].documents = docs
13007
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
12999
+ this.events[mmdd][p].documents = docs
13000
+ this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
13008
13001
  this.events[mmdd][p].lastupdated = new Date().toString()
13009
13002
  }
13010
13003
  }
13011
- console.log('upload report auto approve single')
13012
- }
13013
- if(this.recentlyReported[mmdd] == null){
13014
- this.recentlyReported[mmdd] = []
13015
- }
13016
- this.recentlyReported[mmdd].push(event)
13004
+ console.log('uploadReport single')
13005
+ if(makercheckers.length > 0) {
13017
13006
 
13007
+ // await this.uploadReview(entityId, locationId, mmddyyyy, listEvent["id"], "Auto approved", true, "notices");
13008
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
13009
+ if(this.events[mmdd][p].id == listEvent.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
13010
+ this.events[mmdd][p].approved = true
13011
+ // this.events[mmdd][p].documents = docs
13012
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
13013
+ this.events[mmdd][p].lastupdated = new Date().toString()
13014
+ }
13015
+ }
13016
+ console.log('upload report auto approve single')
13017
+ }
13018
+ if(this.recentlyReported[mmdd] == null){
13019
+ this.recentlyReported[mmdd] = []
13020
+ }
13021
+ this.recentlyReported[mmdd].push(listEvent)
13022
+ }
13018
13023
  } else {
13019
13024
  let bulkBody = []
13020
13025
  let bulkBodyReview = []
@@ -13953,18 +13958,19 @@ export class SfIEvents extends LitElement {
13953
13958
  let flagBulk = false;
13954
13959
  if(this.selectedItemIds.length === 0) {
13955
13960
  // console.log('mmddyyyy', mmddyyyy)
13956
- await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
13957
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
13958
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
13959
-
13960
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
13961
- this.events[mmdd][p].lastupdated = new Date().toString()
13961
+ if(await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
13962
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
13963
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
13964
+
13965
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
13966
+ this.events[mmdd][p].lastupdated = new Date().toString()
13967
+ }
13962
13968
  }
13969
+ if(this.recentlyReported[mmdd] == null){
13970
+ this.recentlyReported[mmdd] = []
13971
+ }
13972
+ this.recentlyReported[mmdd].push(event)
13963
13973
  }
13964
- if(this.recentlyReported[mmdd] == null){
13965
- this.recentlyReported[mmdd] = []
13966
- }
13967
- this.recentlyReported[mmdd].push(event)
13968
13974
  } else {
13969
13975
  let bulkBodyReview = []
13970
13976
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -14057,7 +14063,7 @@ export class SfIEvents extends LitElement {
14057
14063
  (this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-audit')?.addEventListener('click', async (ev: any) => {
14058
14064
  let buttonClick = ev.target as HTMLButtonElement
14059
14065
  buttonClick.innerHTML = "Saving..."
14060
- const comments = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
14066
+ const comments: string = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-auditor-comments') as HTMLInputElement).value;
14061
14067
  const approved = ((this._SfDetailContainer as HTMLDivElement).querySelector('#input-approve-yes') as HTMLInputElement).checked;
14062
14068
  if(approved == event.approved){
14063
14069
  buttonClick.innerHTML = "Save"
@@ -14078,18 +14084,19 @@ export class SfIEvents extends LitElement {
14078
14084
  let flagBulk = false;
14079
14085
  if(this.selectedItemIds.length === 0) {
14080
14086
 
14081
- await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")
14082
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
14083
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14084
- this.events[mmdd][p].approved = approved
14085
- this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
14086
- this.events[mmdd][p].lastupdated = new Date().toString()
14087
+ if(await this.uploadAudit(entityId, locationId, mmddyyyy, event["id"], comments, approved, event.isnotice != null ? "notices" : "events")){
14088
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
14089
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14090
+ this.events[mmdd][p].approved = approved
14091
+ this.events[mmdd][p].comments.push({'author': 'Auditor', 'comment': comments + ` (Approved: ${approved ? 'Yes' : 'No'})`, 'timestamp': new Date().toString()})
14092
+ this.events[mmdd][p].lastupdated = new Date().toString()
14093
+ }
14087
14094
  }
14095
+ if(this.recentlyReported[mmdd] == null){
14096
+ this.recentlyReported[mmdd] = []
14097
+ }
14098
+ this.recentlyReported[mmdd].push(event)
14088
14099
  }
14089
- if(this.recentlyReported[mmdd] == null){
14090
- this.recentlyReported[mmdd] = []
14091
- }
14092
- this.recentlyReported[mmdd].push(event)
14093
14100
  } else {
14094
14101
  let bulkBodyAudit = []
14095
14102
  for(var k = 0; k < this.selectedItemIds.length; k++) {
@@ -14280,32 +14287,32 @@ export class SfIEvents extends LitElement {
14280
14287
  //console.log('makerscheckers', makercheckers, reportercomments);
14281
14288
  // console.log('reportformatvalues', reportformatvalues)
14282
14289
  // console.log('reportformatschema',reportformatschema)
14283
- await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)
14284
- console.log('this.events', this.events);
14285
- for( var p = 0 ; p < this.events[mmdd].length; p ++){
14286
- if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14287
- this.events[mmdd][p].documents = docs
14288
- this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
14289
- this.events[mmdd][p].lastupdated = new Date().toString()
14290
- }
14291
- }
14292
- if(makercheckers.length > 0) {
14293
-
14294
- // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
14290
+ if(await this.uploadReport(entityId, locationId, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage, makercheckers)){
14291
+ console.log('this.events', this.events);
14295
14292
  for( var p = 0 ; p < this.events[mmdd].length; p ++){
14296
14293
  if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14297
- this.events[mmdd][p].approved = true
14298
- // this.events[mmdd][p].documents = docs
14299
- this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
14294
+ this.events[mmdd][p].documents = docs
14295
+ this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
14300
14296
  this.events[mmdd][p].lastupdated = new Date().toString()
14301
14297
  }
14302
14298
  }
14303
- }
14304
- if(this.recentlyReported[mmdd] == null){
14305
- this.recentlyReported[mmdd] = []
14306
- }
14307
- this.recentlyReported[mmdd].push(event)
14299
+ if(makercheckers.length > 0) {
14308
14300
 
14301
+ // await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
14302
+ for( var p = 0 ; p < this.events[mmdd].length; p ++){
14303
+ if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == locationId && this.events[mmdd][p].entityid == entityId){
14304
+ this.events[mmdd][p].approved = true
14305
+ // this.events[mmdd][p].documents = docs
14306
+ this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
14307
+ this.events[mmdd][p].lastupdated = new Date().toString()
14308
+ }
14309
+ }
14310
+ }
14311
+ if(this.recentlyReported[mmdd] == null){
14312
+ this.recentlyReported[mmdd] = []
14313
+ }
14314
+ this.recentlyReported[mmdd].push(event)
14315
+ }
14309
14316
  } else {
14310
14317
  let bulkBody = []
14311
14318
  let bulkBodyReview = []
@@ -22447,6 +22454,7 @@ export class SfIEvents extends LitElement {
22447
22454
  "username": this.userName,
22448
22455
  "module" : module
22449
22456
  }
22457
+ let retValue = true;
22450
22458
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22451
22459
  const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
22452
22460
  this._SfLoader.innerHTML = '';
@@ -22469,7 +22477,9 @@ export class SfIEvents extends LitElement {
22469
22477
  } else {
22470
22478
  const jsonRespose = JSON.parse(xhr.responseText);
22471
22479
  this.setError(jsonRespose.error);
22480
+ retValue = false;
22472
22481
  }
22482
+ return retValue;
22473
22483
  }
22474
22484
  uploadAuditsBulk = async (bulkBody: any) => {
22475
22485
  let url = "https://"+this.apiId+"/uploadauditsbulk";
@@ -22506,7 +22516,7 @@ export class SfIEvents extends LitElement {
22506
22516
  "username": this.userName,
22507
22517
  "module" : module
22508
22518
  }
22509
-
22519
+ let retValue = true;
22510
22520
  //console.log('uploading review', body);
22511
22521
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22512
22522
  const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
@@ -22529,11 +22539,13 @@ export class SfIEvents extends LitElement {
22529
22539
 
22530
22540
  } else {
22531
22541
  const jsonRespose = JSON.parse(xhr.responseText);
22532
- this.setError(jsonRespose.message);
22542
+ this.setError(jsonRespose.error);
22533
22543
  setTimeout(() => {
22534
22544
  this.clearMessages();
22535
22545
  }, 3000);
22546
+ retValue = false;
22536
22547
  }
22548
+ return retValue;
22537
22549
  }
22538
22550
  uploadReportsReviewsBulk = async (bulkBody: any) => {
22539
22551
  let url = "https://"+this.apiId+"/uploadreportsreviewsbulk";
@@ -22549,7 +22561,7 @@ export class SfIEvents extends LitElement {
22549
22561
 
22550
22562
  } else {
22551
22563
  const jsonRespose = JSON.parse(xhr.responseText);
22552
- this.setError(jsonRespose.message);
22564
+ this.setError(jsonRespose.error);
22553
22565
  setTimeout(() => {
22554
22566
  this.clearMessages();
22555
22567
  }, 3000);
@@ -22569,7 +22581,7 @@ export class SfIEvents extends LitElement {
22569
22581
 
22570
22582
  } else {
22571
22583
  const jsonRespose = JSON.parse(xhr.responseText);
22572
- this.setError(jsonRespose.message);
22584
+ this.setError(jsonRespose.error);
22573
22585
  setTimeout(() => {
22574
22586
  this.clearMessages();
22575
22587
  }, 3000);
@@ -22577,7 +22589,7 @@ export class SfIEvents extends LitElement {
22577
22589
  }
22578
22590
 
22579
22591
  uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "events", percentage: string = "100", makercheckers: any) => {
22580
- let url = "https://"+this.apiId+"/uploadreport1";
22592
+ let url = "https://"+this.apiId+"/uploadreport2";
22581
22593
 
22582
22594
  let body = {
22583
22595
  "mmddyyyy": mmddyyyy,
@@ -22602,7 +22614,7 @@ export class SfIEvents extends LitElement {
22602
22614
  }
22603
22615
 
22604
22616
  //console.log(body);
22605
-
22617
+ let retValue = true;
22606
22618
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22607
22619
  const xhr : any = (await this.prepareXhr(body, url, this._SfLoader, authorization)) as any;
22608
22620
  this._SfLoader.innerHTML = '';
@@ -22624,15 +22636,18 @@ export class SfIEvents extends LitElement {
22624
22636
 
22625
22637
  } else {
22626
22638
  const jsonRespose = JSON.parse(xhr.responseText);
22627
- this.setError(jsonRespose.message);
22639
+ console.log()
22640
+ this.setError(jsonRespose.error);
22628
22641
  setTimeout(() => {
22629
22642
  this.clearMessages();
22630
22643
  }, 3000);
22644
+ retValue = false;
22631
22645
  }
22646
+ return retValue;
22632
22647
  }
22633
22648
 
22634
22649
  uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
22635
- let url = "https://"+this.apiId+"/uploadreportsbulk1"
22650
+ let url = "https://"+this.apiId+"/uploadreportsbulk2"
22636
22651
 
22637
22652
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
22638
22653
  const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
@@ -22649,7 +22664,7 @@ export class SfIEvents extends LitElement {
22649
22664
 
22650
22665
  } else {
22651
22666
  const jsonRespose = JSON.parse(xhr.responseText);
22652
- this.setError(jsonRespose.message);
22667
+ this.setError(jsonRespose.error);
22653
22668
  setTimeout(() => {
22654
22669
  this.clearMessages();
22655
22670
  }, 3000);