sf-i-events 1.0.815 → 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 +6 -45
- package/package.json +1 -1
- package/sf-i-events.js +161 -216
- package/src/sf-i-events.ts +193 -217
package/dev/index.html
CHANGED
|
@@ -687,26 +687,6 @@
|
|
|
687
687
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
688
688
|
</div>
|
|
689
689
|
|
|
690
|
-
</sf-i-events> -->
|
|
691
|
-
<!-- <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="Chief Compliance Officer" userprofileid="5fe96caa-1a44-4a2d-921a-920d29433eca" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="functionhead" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
692
|
-
|
|
693
|
-
<div slot="uploader">
|
|
694
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
695
|
-
</div>
|
|
696
|
-
<div slot="reporting">
|
|
697
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
698
|
-
</div>
|
|
699
|
-
|
|
700
|
-
</sf-i-events> -->
|
|
701
|
-
<!-- <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="Ankur Singhal" userprofileid="010834e8-108e-4a87-b58d-f5b429f184be" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" countryid="4ab8901c-4407-4c4d-a2c7-df1a690aa0a3" myrole="viewer" showregisterexport="false" features="[]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
702
|
-
|
|
703
|
-
<div slot="uploader">
|
|
704
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
705
|
-
</div>
|
|
706
|
-
<div slot="reporting">
|
|
707
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
708
|
-
</div>
|
|
709
|
-
|
|
710
690
|
</sf-i-events> -->
|
|
711
691
|
<!-- <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="Auditor J1" userprofileid="bda0d59b-058b-4098-b0fc-54aa54aa5998" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" countryid="07d73b44-648d-4301-82c4-d6df43397824" myrole="auditor" showregisterexport="false" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
712
692
|
|
|
@@ -728,17 +708,7 @@
|
|
|
728
708
|
</div>
|
|
729
709
|
|
|
730
710
|
</sf-i-events> -->
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
<div slot="uploader">
|
|
734
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
735
|
-
</div>
|
|
736
|
-
<div slot="reporting">
|
|
737
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
738
|
-
</div>
|
|
739
|
-
|
|
740
|
-
</sf-i-events> -->
|
|
741
|
-
<!-- <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="true" features="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" 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="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
742
712
|
|
|
743
713
|
<div slot="uploader">
|
|
744
714
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -747,7 +717,7 @@
|
|
|
747
717
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
748
718
|
</div>
|
|
749
719
|
|
|
750
|
-
</sf-i-events>
|
|
720
|
+
</sf-i-events>
|
|
751
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="["notices"]" eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
752
722
|
|
|
753
723
|
<div slot="uploader">
|
|
@@ -761,17 +731,7 @@
|
|
|
761
731
|
<!-- <sf-i-events projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" projectname="Signode" mode="onboarding" locations="{"India":{"Telangana":["Corporate Office","Telangana Plant"],"Karnataka":["Prime","Stopak","Wintek","Tools","Conversion"],"Gujarat":["Dahej"],"Dadra and Nagar Haveli and Daman and Diu":["Silvassa"],"Uttarakhand":["Uttarakhand"],"Maharashtra":["Pune"],"Andhra Pradesh":["AP"],"Chhattisgarh":["Chhattisgarh"],"Goa":["Goa"],"Himachal Pradesh":["HP"],"Haryana":["Haryana"],"Jharkhand":["Jharkhand"],"Madhya Pradesh":["MP"],"Odisha":["Odisha"],"Punjab":["Punjab"],"Tamil Nadu":["TN"],"Uttar Pradesh":["UP"],"West Bengal":["WB"]}}" 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">
|
|
762
732
|
|
|
763
733
|
</sf-i-events> -->
|
|
764
|
-
<!-- <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="
|
|
765
|
-
|
|
766
|
-
<div slot="uploader">
|
|
767
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="f0f17ddb-546a-45f5-8a94-a5689fde8e64" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
768
|
-
</div>
|
|
769
|
-
<div slot="reporting">
|
|
770
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
771
|
-
</div>
|
|
772
|
-
|
|
773
|
-
</sf-i-events> -->
|
|
774
|
-
<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="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
734
|
+
<!-- <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="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]" eventfields="[{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/riskarea", "field": "riskarea"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/jurisdiction", "field": "jurisdiction"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/updatetype", "field": "updatetype"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/country", "field": "country"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/specificity", "field": "specificity"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/risk", "field": "risk"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/frequency", "field": "frequency"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/category", "field": "category"},{"type": "sf-i-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/obligationtype", "field": "obligationtype"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/state", "field": "state"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subfrequency", "field": "subfrequency"},{"type": "sf-i-sub-select", "apiId": "dnytrdlrmxgsy.cloudfront.net/subcategory", "field": "subcategory"},{"type": "sf-i-form", "apiId": "dnytrdlrmxgsy.cloudfront.net/statute", "field": "statute", "projectField": "name"}]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
775
735
|
|
|
776
736
|
<div slot="uploader">
|
|
777
737
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -780,8 +740,9 @@
|
|
|
780
740
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
781
741
|
</div>
|
|
782
742
|
|
|
783
|
-
</sf-i-events>
|
|
784
|
-
|
|
743
|
+
</sf-i-events> -->
|
|
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="["reporter"]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" 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="["reporter"]" eventpreviewfields="["obligation"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" blocksize="10" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024"><div slot="uploader"><sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" 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> -->
|
|
785
746
|
|
|
786
747
|
<script>
|
|
787
748
|
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -3682,29 +3682,31 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3682
3682
|
if (this.selectedItemIds.length == 0) {
|
|
3683
3683
|
await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage);
|
|
3684
3684
|
console.log('this.events', this.events);
|
|
3685
|
-
|
|
3686
|
-
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3687
|
-
this.events[mmdd][p].documents = docs;
|
|
3688
|
-
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
3689
|
-
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3690
|
-
}
|
|
3691
|
-
}
|
|
3692
|
-
if (event.makercheckers.length > 0) {
|
|
3693
|
-
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
3685
|
+
if (this.mode != "next") {
|
|
3694
3686
|
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3695
3687
|
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3696
|
-
this.events[mmdd][p].
|
|
3697
|
-
|
|
3698
|
-
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3688
|
+
this.events[mmdd][p].documents = docs;
|
|
3689
|
+
this.events[mmdd][p].comments.push({ 'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString() });
|
|
3699
3690
|
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3700
3691
|
}
|
|
3701
3692
|
}
|
|
3693
|
+
if (event.makercheckers.length > 0) {
|
|
3694
|
+
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
3695
|
+
for (var p = 0; p < this.events[mmdd].length; p++) {
|
|
3696
|
+
if (this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid) {
|
|
3697
|
+
this.events[mmdd][p].approved = true;
|
|
3698
|
+
// this.events[mmdd][p].documents = docs
|
|
3699
|
+
this.events[mmdd][p].comments.push({ 'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString() });
|
|
3700
|
+
this.events[mmdd][p].lastupdated = new Date().toString();
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
if (this.recentlyReported[mmdd] == null) {
|
|
3705
|
+
this.recentlyReported[mmdd] = [];
|
|
3706
|
+
}
|
|
3707
|
+
this.recentlyReported[mmdd].push(event);
|
|
3708
|
+
console.log('recently reported', this.recentlyReported);
|
|
3702
3709
|
}
|
|
3703
|
-
if (this.recentlyReported[mmdd] == null) {
|
|
3704
|
-
this.recentlyReported[mmdd] = [];
|
|
3705
|
-
}
|
|
3706
|
-
this.recentlyReported[mmdd].push(event);
|
|
3707
|
-
console.log('recently reported', this.recentlyReported);
|
|
3708
3710
|
}
|
|
3709
3711
|
else {
|
|
3710
3712
|
let bulkBody = [];
|
|
@@ -3924,7 +3926,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
3924
3926
|
// const i = idArr[5];
|
|
3925
3927
|
const j = idArr[5];
|
|
3926
3928
|
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
3927
|
-
console.log('mmddyyyy', this.events[mmdd][j], listReportingContainer, '#list-reporting-container-'
|
|
3929
|
+
// console.log('mmddyyyy', this.events[mmdd][j], listReportingContainer, '#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j);
|
|
3928
3930
|
if (listReportingContainer.style.display == 'none' || listReportingContainer.style.display == '') {
|
|
3929
3931
|
4;
|
|
3930
3932
|
this.renderListReporting(listReportingContainer, this.events[mmdd][j], mmdd + '/' + yyyy, eventsContainer);
|
|
@@ -9643,7 +9645,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9643
9645
|
}
|
|
9644
9646
|
};
|
|
9645
9647
|
this.renderEventDetail = (event, mmddyyyy, currentColumnButton, eventsContainer) => {
|
|
9646
|
-
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;
|
|
9647
9649
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
9648
9650
|
let comments, docs, approved, /*dateOfCompletion,*/ makercheckers, docsOptional, documentType;
|
|
9649
9651
|
let entityId = "";
|
|
@@ -9867,196 +9869,29 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9867
9869
|
}
|
|
9868
9870
|
html += '</div>';
|
|
9869
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> 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> 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> Submit Feedback</span></button>');
|
|
9889
|
+
html += '</div>';
|
|
9890
|
+
html += '</div>';
|
|
9891
|
+
html += '</div>';
|
|
9892
|
+
html += '</div>';
|
|
9870
9893
|
html += '</div>';
|
|
9871
|
-
// html += '<div class="d-flex m-20 flex-wrap">';
|
|
9872
|
-
// for(var k = 0; k < Object.keys(event).length; k++) {
|
|
9873
|
-
// if(!this.getEventPreviewFields().includes(Object.keys(event)[k])) {
|
|
9874
|
-
// if(!this.getEventHideFields().includes(Object.keys(event)[k])) {
|
|
9875
|
-
// html += '<div class="m-20">';
|
|
9876
|
-
// html += '<div part="detail-head"><strong>'+Object.keys(event)[k]+'</strong></div>'
|
|
9877
|
-
// //console.log(Object.keys(event)[k], event[Object.keys(event)[k]]);
|
|
9878
|
-
// if((event[Object.keys(event)[k]] + "").indexOf("[") >= 0) {
|
|
9879
|
-
// html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
|
|
9880
|
-
// } else {
|
|
9881
|
-
// html += '<sf-i-elastic-text text="'+(event[Object.keys(event)[k]] + "").replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
|
|
9882
|
-
// }
|
|
9883
|
-
// html += '</div>';
|
|
9884
|
-
// }
|
|
9885
|
-
// }
|
|
9886
|
-
// }
|
|
9887
9894
|
if (this.mode == "consumer" || this.mode == "next") {
|
|
9888
|
-
//console.log('docs received', event['documents']);
|
|
9889
|
-
//console.log('docs received', comments);
|
|
9890
|
-
//console.log('docs received', approved);
|
|
9891
|
-
/* if(this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
9892
|
-
|
|
9893
|
-
if(comments.length > 0) {
|
|
9894
|
-
|
|
9895
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
9896
|
-
html += '<h3 part="results-title" class="m-0"><br />Approve Compliance</h3>';
|
|
9897
|
-
html += '</div>';
|
|
9898
|
-
html += '<div class="m-20" part="report-container">';
|
|
9899
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
9900
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
9901
|
-
html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
|
|
9902
|
-
html += '</div>'
|
|
9903
|
-
|
|
9904
|
-
if(this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
|
|
9905
|
-
html += '<div class="m-20">';
|
|
9906
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
9907
|
-
html += '<slot name="uploader"></slot>';
|
|
9908
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
9909
|
-
html += '</div>';
|
|
9910
|
-
}
|
|
9911
|
-
|
|
9912
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
9913
|
-
html += '<label part="input-label">Approver Comments*</label>';
|
|
9914
|
-
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
9915
|
-
html += '<label part="input-label">Date of Completion*</label>';
|
|
9916
|
-
html += '<input id="input-approver-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" disabled/><br />';
|
|
9917
|
-
html += '<div>'
|
|
9918
|
-
html += '<label part="input-label">Approve?*</label><br />';
|
|
9919
|
-
html += '<div class="mt-5">'
|
|
9920
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio"/> Yes';
|
|
9921
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
|
|
9922
|
-
html += '</div>'
|
|
9923
|
-
html += '</div>';
|
|
9924
|
-
html += '</div>';
|
|
9925
|
-
html += '</div>';
|
|
9926
|
-
|
|
9927
|
-
}
|
|
9928
|
-
|
|
9929
|
-
}
|
|
9930
|
-
|
|
9931
|
-
if(this.myRole == this.TAB_REPORTER || this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
9932
|
-
|
|
9933
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
9934
|
-
html += '<h3 part="results-title" class="m-0"><br />Report Compliance</h3>';
|
|
9935
|
-
html += '</div>';
|
|
9936
|
-
|
|
9937
|
-
var showSubmissionSection = true;
|
|
9938
|
-
var showGoogleFormLink = false;
|
|
9939
|
-
|
|
9940
|
-
if(event['form'].length > 5) {
|
|
9941
|
-
|
|
9942
|
-
if(event['form'].indexOf('docs.google.com/forms') >= 0) {
|
|
9943
|
-
showSubmissionSection = false;
|
|
9944
|
-
if(!approved) {
|
|
9945
|
-
showGoogleFormLink = true;
|
|
9946
|
-
|
|
9947
|
-
}
|
|
9948
|
-
}
|
|
9949
|
-
|
|
9950
|
-
}
|
|
9951
|
-
|
|
9952
|
-
if(showGoogleFormLink) {
|
|
9953
|
-
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>');
|
|
9954
|
-
}
|
|
9955
|
-
|
|
9956
|
-
if(showSubmissionSection) {
|
|
9957
|
-
|
|
9958
|
-
html += '<div class="m-20" part="report-container">';
|
|
9959
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
9960
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
9961
|
-
html += '<button id="button-uploader-submit-report" class="button-submit" part="button">Save</button>'
|
|
9962
|
-
html += '</div>'
|
|
9963
|
-
|
|
9964
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
9965
|
-
html += '<label part="input-label">Reporter Comments*</label>';
|
|
9966
|
-
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
9967
|
-
html += '<label part="input-label">Date of Completion*</label>';
|
|
9968
|
-
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 />';
|
|
9969
|
-
// if(docsOptional.length === 0) {
|
|
9970
|
-
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
9971
|
-
|
|
9972
|
-
if(event['uploadguidance'] != null && event['uploadguidance'].length > 0) {
|
|
9973
|
-
html += ('<div part="uploader-analysis-message">'+event['uploadguidance']+'</div>');
|
|
9974
|
-
}
|
|
9975
|
-
|
|
9976
|
-
html += '<slot name="uploader"></slot>';
|
|
9977
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
9978
|
-
// }
|
|
9979
|
-
html += '<br />';
|
|
9980
|
-
if(event['reportformat'] != null && event['reportformat'].length > 0){
|
|
9981
|
-
html += '<div id="report-format-container"><div class="box"></div></div>'
|
|
9982
|
-
}
|
|
9983
|
-
html += '<br />';
|
|
9984
|
-
if(makercheckers.length > 0) {
|
|
9985
|
-
html += '<div part="td-head" class="td-head d-flex justify-center align-center"><span class="material-symbols-outlined">check_small</span><div> Auto-approve Enabled</div></div>';
|
|
9986
|
-
|
|
9987
|
-
if(completeness == "pending-approval" && this.enableDeleteLatestReport) {
|
|
9988
|
-
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>';
|
|
9989
|
-
}
|
|
9990
|
-
}
|
|
9991
|
-
html += '</div>';
|
|
9992
|
-
html += '</div>';
|
|
9993
|
-
|
|
9994
|
-
}
|
|
9995
|
-
|
|
9996
|
-
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
}
|
|
10000
|
-
|
|
10001
|
-
if(this.myRole == this.TAB_AUDITOR) {
|
|
10002
|
-
|
|
10003
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
10004
|
-
html += '<h3 part="results-title" class="m-0"><br />Audit Compliance</h3>';
|
|
10005
|
-
html += '</div>';
|
|
10006
|
-
html += '<div class="m-20" part="report-container">';
|
|
10007
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
10008
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
10009
|
-
html += '<button id="button-uploader-submit-audit" class="button-submit" part="button">Save</button>'
|
|
10010
|
-
html += '</div>'
|
|
10011
|
-
|
|
10012
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
10013
|
-
html += '<label part="input-label">Auditor Comments</label>';
|
|
10014
|
-
html += '<input id="input-auditor-comments" type="text" part="input" value=""/><br />';
|
|
10015
|
-
html += '<label part="input-label">Date of Completion</label>';
|
|
10016
|
-
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 />';
|
|
10017
|
-
html += '<div>'
|
|
10018
|
-
html += '<label part="input-label">Approve?</label><br />';
|
|
10019
|
-
html += '<div class="mt-5">'
|
|
10020
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
|
|
10021
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
|
|
10022
|
-
html += '</div>'
|
|
10023
|
-
html += '</div>';
|
|
10024
|
-
html += '<br />';
|
|
10025
|
-
if(docs.length > 0) {
|
|
10026
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
10027
|
-
html += '<slot name="uploader"></slot>';
|
|
10028
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
10029
|
-
}
|
|
10030
|
-
html += '</div>';
|
|
10031
|
-
html += '</div>';
|
|
10032
|
-
|
|
10033
|
-
}
|
|
10034
|
-
|
|
10035
|
-
if(this.myRole == this.TAB_VIEWER) {
|
|
10036
|
-
|
|
10037
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
10038
|
-
html += '<h3 part="results-title" class="m-0"><br />View Compliance</h3>';
|
|
10039
|
-
html += '</div>';
|
|
10040
|
-
html += '<div class="m-20" part="report-container">';
|
|
10041
|
-
|
|
10042
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
10043
|
-
html += '<div>'
|
|
10044
|
-
html += '<label part="input-label">Approve?</label><br />';
|
|
10045
|
-
html += '<div class="mt-5">'
|
|
10046
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
|
|
10047
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
|
|
10048
|
-
html += '</div>'
|
|
10049
|
-
html += '</div>';
|
|
10050
|
-
html += '<br />';
|
|
10051
|
-
if(docs.length === 0) {
|
|
10052
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
10053
|
-
html += '<slot name="uploader"></slot>';
|
|
10054
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
10055
|
-
}
|
|
10056
|
-
html += '</div>';
|
|
10057
|
-
html += '</div>';
|
|
10058
|
-
|
|
10059
|
-
} */
|
|
10060
9895
|
html += '<div part="reporting-view-container">';
|
|
10061
9896
|
html += this.renderReporting(event, mmddyyyy);
|
|
10062
9897
|
html += "</div>";
|
|
@@ -10241,8 +10076,86 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10241
10076
|
this._SfDetailContainer.querySelector('.head-indicator-grc').innerHTML = '-';
|
|
10242
10077
|
}
|
|
10243
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
|
+
});
|
|
10244
10157
|
if (this.mode == "consumer" || this.mode == "next") {
|
|
10245
|
-
(
|
|
10158
|
+
(_s = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _s === void 0 ? void 0 : _s.addEventListener('click', async (ev) => {
|
|
10246
10159
|
let buttonClick = ev.target;
|
|
10247
10160
|
buttonClick.innerHTML = "Saving...";
|
|
10248
10161
|
const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
|
|
@@ -10349,7 +10262,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10349
10262
|
}
|
|
10350
10263
|
}
|
|
10351
10264
|
});
|
|
10352
|
-
(
|
|
10265
|
+
(_t = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _t === void 0 ? void 0 : _t.addEventListener('click', async (ev) => {
|
|
10353
10266
|
let buttonClick = ev.target;
|
|
10354
10267
|
buttonClick.innerHTML = "Saving...";
|
|
10355
10268
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
@@ -10463,7 +10376,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10463
10376
|
else {
|
|
10464
10377
|
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
10465
10378
|
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
10466
|
-
(
|
|
10379
|
+
(_u = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _u === void 0 ? void 0 : _u.addEventListener('click', async (ev) => {
|
|
10467
10380
|
var _a, _b;
|
|
10468
10381
|
let buttonClick = ev.target;
|
|
10469
10382
|
buttonClick.innerHTML = "Saving...";
|
|
@@ -10778,7 +10691,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
10778
10691
|
}
|
|
10779
10692
|
this.fetchStatuteDefinitionDetails(statuteName);
|
|
10780
10693
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
10781
|
-
this.fetchReportFormat(this._SfDetailContainer, reportformatName, (
|
|
10694
|
+
this.fetchReportFormat(this._SfDetailContainer, reportformatName, (_v = event['reportformatschema']) !== null && _v !== void 0 ? _v : "", (_w = event['reportformatvalues']) !== null && _w !== void 0 ? _w : "");
|
|
10782
10695
|
}
|
|
10783
10696
|
};
|
|
10784
10697
|
this.renderCalendar = () => {
|
|
@@ -19098,9 +19011,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19098
19011
|
statusArr = [this.STATUS_APPROVED];
|
|
19099
19012
|
}
|
|
19100
19013
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
19101
|
-
console.log('params', JSON.stringify({ "projectid": this.projectId, "userprofileid": this.userProfileId, "roles": [role], "year":
|
|
19014
|
+
console.log('params', JSON.stringify({ "projectid": this.projectId, "userprofileid": this.userProfileId, "roles": [role], "year": this.calendarStartYYYY, "page": this.nextPage, "blocksize": parseInt(this.blocksize), "status": statusArr }));
|
|
19102
19015
|
console.log('authorization', authorization);
|
|
19103
|
-
const xhr = (await this.prepareXhr({ "projectid": this.projectId, "userprofileid": this.userProfileId, "roles": [role], "year":
|
|
19016
|
+
const xhr = (await this.prepareXhr({ "projectid": this.projectId, "userprofileid": this.userProfileId, "roles": [role], "year": this.calendarStartYYYY + "", "page": this.nextPage, "blocksize": parseInt(this.blocksize), "status": statusArr, "list": "yes" }, url, this._SfLoader, authorization));
|
|
19104
19017
|
this._SfLoader.innerHTML = '';
|
|
19105
19018
|
if (xhr.status == 200) {
|
|
19106
19019
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
@@ -19314,7 +19227,10 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19314
19227
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
19315
19228
|
eventHtml += '<div class="hidden-tags hide">' + JSON.stringify(eventsData[role][mmdd][j]['tags']) + '</div>';
|
|
19316
19229
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>';
|
|
19317
|
-
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + ('<input id="button-select-' + mmdd.replace('/', '-') + '-' + j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />') + '<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>' + '<sf-i-elastic-text text="' + eventsData[role][mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="' + eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i)
|
|
19230
|
+
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + ('<input id="button-select-' + mmdd.replace('/', '-') + '-' + j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g, '_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />') + '<button id="button-unmapped-expand-' + mmdd.replace('/', '-') + '-' + j + '" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>' + '<sf-i-elastic-text text="' + eventsData[role][mmdd][j]['obligationtitle'] + '" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="' + eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "") + '" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i);
|
|
19231
|
+
eventHtml += '<button id="button-list-reporting-' + mmdd.replace('/', '-') + '-' + j + '" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>';
|
|
19232
|
+
eventHtml += '</div>';
|
|
19233
|
+
eventHtml += '<div class="list-reporting-container d-flex flex-col hide" part="list-reporting-container" id="list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j + '"></div>';
|
|
19318
19234
|
eventHtml += '</div>';
|
|
19319
19235
|
html += eventHtml;
|
|
19320
19236
|
}
|
|
@@ -19340,8 +19256,37 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19340
19256
|
html += '</div>';
|
|
19341
19257
|
}
|
|
19342
19258
|
html += '</div>';
|
|
19343
|
-
this._SfIEventsC.querySelector('#next-calendar-data')
|
|
19344
|
-
|
|
19259
|
+
let nextEventsContainer = this._SfIEventsC.querySelector('#next-calendar-data');
|
|
19260
|
+
nextEventsContainer.innerHTML = html;
|
|
19261
|
+
nextEventsContainer.style.display = "flex";
|
|
19262
|
+
this.myRole = role;
|
|
19263
|
+
let buttonListReports = nextEventsContainer.querySelectorAll('.button-list-reporting');
|
|
19264
|
+
for (let buttonListReport of buttonListReports) {
|
|
19265
|
+
buttonListReport === null || buttonListReport === void 0 ? void 0 : buttonListReport.addEventListener('click', (ev) => {
|
|
19266
|
+
const id = ev.target.id;
|
|
19267
|
+
const idArr = id.split("-");
|
|
19268
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
19269
|
+
const yyyy = this.getCurrentYear(idArr[3]);
|
|
19270
|
+
// const i = idArr[5];
|
|
19271
|
+
const j = idArr[5];
|
|
19272
|
+
let listReportingContainer = nextEventsContainer.querySelector('#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
19273
|
+
console.log('mmddyyyy', eventsData[role][mmdd][j], listReportingContainer, '#list-reporting-container-' + mmdd.replace(/\//g, '-') + '-' + j);
|
|
19274
|
+
if (listReportingContainer.style.display == 'none' || listReportingContainer.style.display == '') {
|
|
19275
|
+
4;
|
|
19276
|
+
this.renderListReporting(listReportingContainer, eventsData[role][mmdd][j], mmdd + '/' + yyyy, nextEventsContainer);
|
|
19277
|
+
}
|
|
19278
|
+
else {
|
|
19279
|
+
listReportingContainer.innerHTML = '';
|
|
19280
|
+
listReportingContainer.style.display = 'none';
|
|
19281
|
+
ev.target.setAttribute('part', 'button-list-reporting');
|
|
19282
|
+
let streamEventTitles = nextEventsContainer.querySelectorAll('.stream-event-title');
|
|
19283
|
+
for (let streamEventTitle of streamEventTitles) {
|
|
19284
|
+
streamEventTitle.removeAttribute('part');
|
|
19285
|
+
}
|
|
19286
|
+
}
|
|
19287
|
+
// console.log('part', ev.target.getAttribute('part'));
|
|
19288
|
+
});
|
|
19289
|
+
}
|
|
19345
19290
|
// }else{
|
|
19346
19291
|
// let innerDivHtml = (this._SfIEventsC.querySelector('#stream-event-next') as HTMLDivElement).innerHTML;
|
|
19347
19292
|
// innerDivHtml.replace('<button id="button-expand" part="icon-button-small" class="material-symbols-outlined">keyboard_arrow_down</button>','');
|
package/src/sf-i-events.ts
CHANGED
|
@@ -6055,31 +6055,33 @@ export class SfIEvents extends LitElement {
|
|
|
6055
6055
|
await this.uploadReport(event.entityid, event.locationid, mmddyyyy, event["id"], reportercomments, reporterdoc, docs, event, reportformatvalues, reportformatschema, event.isnotice != null ? "notices" : "events", percentage)
|
|
6056
6056
|
|
|
6057
6057
|
console.log('this.events', this.events);
|
|
6058
|
-
|
|
6059
|
-
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6060
|
-
this.events[mmdd][p].documents = docs
|
|
6061
|
-
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
6062
|
-
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6063
|
-
}
|
|
6064
|
-
}
|
|
6065
|
-
|
|
6066
|
-
if(event.makercheckers.length > 0) {
|
|
6067
|
-
|
|
6068
|
-
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
6058
|
+
if(this.mode != "next"){
|
|
6069
6059
|
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
6070
6060
|
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6071
|
-
this.events[mmdd][p].
|
|
6072
|
-
|
|
6073
|
-
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
6061
|
+
this.events[mmdd][p].documents = docs
|
|
6062
|
+
this.events[mmdd][p].comments.push({'author': 'Reporter', 'comment': reportercomments + ` (Documents Saved: ${docs.length}})`, 'timestamp': new Date().toString()})
|
|
6074
6063
|
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6075
6064
|
}
|
|
6076
6065
|
}
|
|
6066
|
+
|
|
6067
|
+
if(event.makercheckers.length > 0) {
|
|
6068
|
+
|
|
6069
|
+
await this.uploadReview(event.entityid, event.locationid, mmddyyyy, event["id"], "Auto approved", true, event.isnotice != null ? "notices" : "events");
|
|
6070
|
+
for( var p = 0 ; p < this.events[mmdd].length; p ++){
|
|
6071
|
+
if(this.events[mmdd][p].id == event.id && this.events[mmdd][p].locationid == event.locationid && this.events[mmdd][p].entityid == event.entityid){
|
|
6072
|
+
this.events[mmdd][p].approved = true
|
|
6073
|
+
// this.events[mmdd][p].documents = docs
|
|
6074
|
+
this.events[mmdd][p].comments.push({'author': 'Approver', 'comment': `Auto approved (Approved: Yes})`, 'timestamp': new Date().toString()})
|
|
6075
|
+
this.events[mmdd][p].lastupdated = new Date().toString()
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
if(this.recentlyReported[mmdd] == null){
|
|
6080
|
+
this.recentlyReported[mmdd] = []
|
|
6081
|
+
}
|
|
6082
|
+
this.recentlyReported[mmdd].push(event)
|
|
6083
|
+
console.log('recently reported', this.recentlyReported)
|
|
6077
6084
|
}
|
|
6078
|
-
if(this.recentlyReported[mmdd] == null){
|
|
6079
|
-
this.recentlyReported[mmdd] = []
|
|
6080
|
-
}
|
|
6081
|
-
this.recentlyReported[mmdd].push(event)
|
|
6082
|
-
console.log('recently reported', this.recentlyReported)
|
|
6083
6085
|
}else{
|
|
6084
6086
|
let bulkBody = []
|
|
6085
6087
|
let bulkBodyReview = []
|
|
@@ -6321,7 +6323,7 @@ export class SfIEvents extends LitElement {
|
|
|
6321
6323
|
// const i = idArr[5];
|
|
6322
6324
|
const j = idArr[5];
|
|
6323
6325
|
let listReportingContainer = eventsContainer.querySelector('#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j) as HTMLDivElement
|
|
6324
|
-
console.log('mmddyyyy', this.events[mmdd][j], listReportingContainer, '#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j);
|
|
6326
|
+
// console.log('mmddyyyy', this.events[mmdd][j], listReportingContainer, '#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j);
|
|
6325
6327
|
if(listReportingContainer.style.display == 'none' || listReportingContainer.style.display == ''){4
|
|
6326
6328
|
this.renderListReporting(listReportingContainer,this.events[mmdd][j], mmdd + '/' + yyyy, eventsContainer)
|
|
6327
6329
|
}else{
|
|
@@ -13530,204 +13532,34 @@ export class SfIEvents extends LitElement {
|
|
|
13530
13532
|
html += '</div>';
|
|
13531
13533
|
html += '</div>';
|
|
13532
13534
|
|
|
13533
|
-
html += '
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
// if(!this.getEventHideFields().includes(Object.keys(event)[k])) {
|
|
13541
|
-
// html += '<div class="m-20">';
|
|
13542
|
-
// html += '<div part="detail-head"><strong>'+Object.keys(event)[k]+'</strong></div>'
|
|
13543
|
-
// //console.log(Object.keys(event)[k], event[Object.keys(event)[k]]);
|
|
13544
|
-
// if((event[Object.keys(event)[k]] + "").indexOf("[") >= 0) {
|
|
13545
|
-
// html += this.getEventTexts(Object.keys(event)[k], JSON.parse(event[Object.keys(event)[k]]), event);
|
|
13546
|
-
// } else {
|
|
13547
|
-
// html += '<sf-i-elastic-text text="'+(event[Object.keys(event)[k]] + "").replace(/"/g, "")+'" minLength="20"></sf-i-elastic-text>';
|
|
13548
|
-
// }
|
|
13549
|
-
// html += '</div>';
|
|
13550
|
-
// }
|
|
13551
|
-
|
|
13552
|
-
// }
|
|
13553
|
-
// }
|
|
13554
|
-
|
|
13555
|
-
if(this.mode == "consumer" || this.mode == "next") {
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
//console.log('docs received', event['documents']);
|
|
13559
|
-
//console.log('docs received', comments);
|
|
13560
|
-
//console.log('docs received', approved);
|
|
13561
|
-
|
|
13562
|
-
/* if(this.myRole == this.TAB_APPROVER || this.myRole == this.TAB_FUNCTION_HEAD) {
|
|
13563
|
-
|
|
13564
|
-
if(comments.length > 0) {
|
|
13565
|
-
|
|
13566
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
13567
|
-
html += '<h3 part="results-title" class="m-0"><br />Approve Compliance</h3>';
|
|
13568
|
-
html += '</div>';
|
|
13569
|
-
html += '<div class="m-20" part="report-container">';
|
|
13570
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
13571
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
13572
|
-
html += '<button id="button-uploader-submit-approve" class="button-submit" part="button">Save</button>'
|
|
13573
|
-
html += '</div>'
|
|
13574
|
-
|
|
13575
|
-
if(this.myRole != this.TAB_FUNCTION_HEAD && docs.length > 0) {
|
|
13576
|
-
html += '<div class="m-20">';
|
|
13577
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
13578
|
-
html += '<slot name="uploader"></slot>';
|
|
13579
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
13580
|
-
html += '</div>';
|
|
13581
|
-
}
|
|
13582
|
-
|
|
13583
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
13584
|
-
html += '<label part="input-label">Approver Comments*</label>';
|
|
13585
|
-
html += '<input id="input-approver-comments" type="text" part="input" value=""/><br />';
|
|
13586
|
-
html += '<label part="input-label">Date of Completion*</label>';
|
|
13587
|
-
html += '<input id="input-approver-doc" part="input" type="date" value="'+(dateOfCompletion == "" ? dateOfCompletion : new Date(parseInt(dateOfCompletion)).toISOString().substring(0,10))+'" disabled/><br />';
|
|
13588
|
-
html += '<div>'
|
|
13589
|
-
html += '<label part="input-label">Approve?*</label><br />';
|
|
13590
|
-
html += '<div class="mt-5">'
|
|
13591
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio"/> Yes';
|
|
13592
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio" checked/> No';
|
|
13593
|
-
html += '</div>'
|
|
13594
|
-
html += '</div>';
|
|
13595
|
-
html += '</div>';
|
|
13596
|
-
html += '</div>';
|
|
13597
|
-
|
|
13598
|
-
}
|
|
13599
|
-
|
|
13600
|
-
}
|
|
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">';
|
|
13601
13541
|
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
html += '<h3 part="results-title" class="m-0"><br />Report Compliance</h3>';
|
|
13606
|
-
html += '</div>';
|
|
13607
|
-
|
|
13608
|
-
var showSubmissionSection = true;
|
|
13609
|
-
var showGoogleFormLink = false;
|
|
13610
|
-
|
|
13611
|
-
if(event['form'].length > 5) {
|
|
13612
|
-
|
|
13613
|
-
if(event['form'].indexOf('docs.google.com/forms') >= 0) {
|
|
13614
|
-
showSubmissionSection = false;
|
|
13615
|
-
if(!approved) {
|
|
13616
|
-
showGoogleFormLink = true;
|
|
13617
|
-
|
|
13618
|
-
}
|
|
13619
|
-
}
|
|
13620
|
-
|
|
13621
|
-
}
|
|
13622
|
-
|
|
13623
|
-
if(showGoogleFormLink) {
|
|
13624
|
-
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>');
|
|
13625
|
-
}
|
|
13626
|
-
|
|
13627
|
-
if(showSubmissionSection) {
|
|
13628
|
-
|
|
13629
|
-
html += '<div class="m-20" part="report-container">';
|
|
13630
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
13631
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
13632
|
-
html += '<button id="button-uploader-submit-report" class="button-submit" part="button">Save</button>'
|
|
13633
|
-
html += '</div>'
|
|
13634
|
-
|
|
13635
|
-
html += '<div class="d-flex m-20 flex-col">';
|
|
13636
|
-
html += '<label part="input-label">Reporter Comments*</label>';
|
|
13637
|
-
html += '<input id="input-reporter-comments" type="text" part="input" value=""/><br />';
|
|
13638
|
-
html += '<label part="input-label">Date of Completion*</label>';
|
|
13639
|
-
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 />';
|
|
13640
|
-
// if(docsOptional.length === 0) {
|
|
13641
|
-
html += '<label part="input-label">Supporting Documents' + ((docsOptional.length > 0) ? '' : '*') + '</label>';
|
|
13642
|
-
|
|
13643
|
-
if(event['uploadguidance'] != null && event['uploadguidance'].length > 0) {
|
|
13644
|
-
html += ('<div part="uploader-analysis-message">'+event['uploadguidance']+'</div>');
|
|
13645
|
-
}
|
|
13646
|
-
|
|
13647
|
-
html += '<slot name="uploader"></slot>';
|
|
13648
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
13649
|
-
// }
|
|
13650
|
-
html += '<br />';
|
|
13651
|
-
if(event['reportformat'] != null && event['reportformat'].length > 0){
|
|
13652
|
-
html += '<div id="report-format-container"><div class="box"></div></div>'
|
|
13653
|
-
}
|
|
13654
|
-
html += '<br />';
|
|
13655
|
-
if(makercheckers.length > 0) {
|
|
13656
|
-
html += '<div part="td-head" class="td-head d-flex justify-center align-center"><span class="material-symbols-outlined">check_small</span><div> Auto-approve Enabled</div></div>';
|
|
13657
|
-
|
|
13658
|
-
if(completeness == "pending-approval" && this.enableDeleteLatestReport) {
|
|
13659
|
-
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>';
|
|
13660
|
-
}
|
|
13661
|
-
}
|
|
13662
|
-
html += '</div>';
|
|
13663
|
-
html += '</div>';
|
|
13664
|
-
|
|
13665
|
-
}
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13670
|
-
}
|
|
13671
|
-
|
|
13672
|
-
if(this.myRole == this.TAB_AUDITOR) {
|
|
13673
|
-
|
|
13674
|
-
html += '<div class="d-flex justify-between m-20">';
|
|
13675
|
-
html += '<h3 part="results-title" class="m-0"><br />Audit Compliance</h3>';
|
|
13676
|
-
html += '</div>';
|
|
13677
|
-
html += '<div class="m-20" part="report-container">';
|
|
13678
|
-
html += '<div class="d-flex justify-between align-center">'
|
|
13679
|
-
html += '<button class="invisible" part="button">Save</button>'
|
|
13680
|
-
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>'
|
|
13681
13545
|
html += '</div>'
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
|
|
13685
|
-
|
|
13686
|
-
html += '<
|
|
13687
|
-
html += '<
|
|
13688
|
-
html += '<
|
|
13689
|
-
|
|
13690
|
-
|
|
13691
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
|
|
13692
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
|
|
13693
|
-
html += '</div>'
|
|
13694
|
-
html += '</div>';
|
|
13695
|
-
html += '<br />';
|
|
13696
|
-
if(docs.length > 0) {
|
|
13697
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
13698
|
-
html += '<slot name="uploader"></slot>';
|
|
13699
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
13700
|
-
}
|
|
13701
|
-
html += '</div>';
|
|
13702
|
-
html += '</div>';
|
|
13703
|
-
|
|
13704
|
-
}
|
|
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> 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> 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> Submit Feedback</span></button>');
|
|
13553
|
+
html += '</div>'
|
|
13554
|
+
html += '</div>'
|
|
13705
13555
|
|
|
13706
|
-
|
|
13556
|
+
html += '</div>';
|
|
13557
|
+
html += '</div>';
|
|
13707
13558
|
|
|
13708
|
-
|
|
13709
|
-
html += '<h3 part="results-title" class="m-0"><br />View Compliance</h3>';
|
|
13710
|
-
html += '</div>';
|
|
13711
|
-
html += '<div class="m-20" part="report-container">';
|
|
13559
|
+
html += '</div>';
|
|
13712
13560
|
|
|
13713
|
-
|
|
13714
|
-
html += '<div>'
|
|
13715
|
-
html += '<label part="input-label">Approve?</label><br />';
|
|
13716
|
-
html += '<div class="mt-5">'
|
|
13717
|
-
html += '<input id="input-approve-yes" name="radio-approved" type="radio" checked/> Yes';
|
|
13718
|
-
html += '<input id="input-approve-no" name="radio-approved" type="radio"/> No';
|
|
13719
|
-
html += '</div>'
|
|
13720
|
-
html += '</div>';
|
|
13721
|
-
html += '<br />';
|
|
13722
|
-
if(docs.length === 0) {
|
|
13723
|
-
html += '<label part="input-label">Supporting Documents</label>';
|
|
13724
|
-
html += '<slot name="uploader"></slot>';
|
|
13725
|
-
html += '<div part="uploader-analysis-message" class="uploader-analysis-message mt-20">The analysis is running in the background. You can proceed further.</div>'
|
|
13726
|
-
}
|
|
13727
|
-
html += '</div>';
|
|
13728
|
-
html += '</div>';
|
|
13561
|
+
if(this.mode == "consumer" || this.mode == "next") {
|
|
13729
13562
|
|
|
13730
|
-
} */
|
|
13731
13563
|
html += '<div part="reporting-view-container">'
|
|
13732
13564
|
html += this.renderReporting(event, mmddyyyy);
|
|
13733
13565
|
html += "</div>"
|
|
@@ -13947,6 +13779,118 @@ export class SfIEvents extends LitElement {
|
|
|
13947
13779
|
}
|
|
13948
13780
|
});
|
|
13949
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
|
+
|
|
13950
13894
|
if(this.mode == "consumer" || this.mode == "next") {
|
|
13951
13895
|
|
|
13952
13896
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-uploader-submit-approve')?.addEventListener('click', async (ev:any) => {
|
|
@@ -25250,9 +25194,9 @@ export class SfIEvents extends LitElement {
|
|
|
25250
25194
|
statusArr = [this.STATUS_APPROVED]
|
|
25251
25195
|
}
|
|
25252
25196
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
25253
|
-
console.log('params', JSON.stringify({"projectid": this.projectId,"userprofileid": this.userProfileId, "roles": [role] , "year":
|
|
25197
|
+
console.log('params', JSON.stringify({"projectid": this.projectId,"userprofileid": this.userProfileId, "roles": [role] , "year": this.calendarStartYYYY, "page": this.nextPage, "blocksize": parseInt(this.blocksize), "status": statusArr}))
|
|
25254
25198
|
console.log('authorization', authorization)
|
|
25255
|
-
const xhr : any = (await this.prepareXhr({"projectid": this.projectId,"userprofileid": this.userProfileId, "roles": [role] , "year":
|
|
25199
|
+
const xhr : any = (await this.prepareXhr({"projectid": this.projectId,"userprofileid": this.userProfileId, "roles": [role] , "year": this.calendarStartYYYY + "", "page": this.nextPage, "blocksize": parseInt(this.blocksize), "status": statusArr, "list":"yes"}, url, this._SfLoader, authorization)) as any;
|
|
25256
25200
|
this._SfLoader.innerHTML = '';
|
|
25257
25201
|
if(xhr.status == 200) {
|
|
25258
25202
|
|
|
@@ -25522,7 +25466,10 @@ export class SfIEvents extends LitElement {
|
|
|
25522
25466
|
eventHtml += '<div class="stream-events-container flex-grow">';
|
|
25523
25467
|
eventHtml += '<div class="hidden-tags hide">'+JSON.stringify(eventsData[role][mmdd][j]['tags'])+'</div>'
|
|
25524
25468
|
eventHtml += '<div class="hidden-title hide"><table><thead><th part="badge-filtered"><i>not filtered</i></th></thead></table></div>'
|
|
25525
|
-
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + ('<input id="button-select-'+mmdd.replace('/', '-')+'-'+j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g,'_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />') + '<button id="button-unmapped-expand-'+mmdd.replace('/', '-')+'-'+j+'" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>' + '<sf-i-elastic-text text="'+eventsData[role][mmdd][j]['obligationtitle']+'" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="'+eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "")+'" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i)
|
|
25469
|
+
eventHtml += '<div part="stream-events-event-title" class="stream-events-event-title d-flex align-center pl-5 pb-5 mb-10">' + ('<input id="button-select-'+mmdd.replace('/', '-')+'-'+j + '-' + (((eventsData[role][mmdd][j].makercheckers != null && (eventsData[role][mmdd][j].makercheckers).length > 0)) ? '1' : '0') + '-' + (((eventsData[role][mmdd][j].docs != null && (eventsData[role][mmdd][j].docs).length > 0)) ? '1' : '0') + '-' + eventsData[role][mmdd][j].entityid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].locationid.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].id.replace(/-/g, '_') + '-' + eventsData[role][mmdd][j].duedate.split('/')[1] + '-' + eventsData[role][mmdd][j].duedate.split('/')[0] + '-' + eventsData[role][mmdd][j].duedate.split('/')[2] + '-' + partStatus.replace(/-/g,'_') + '" class="button-select mr-10 ' + ((eventsData[role][mmdd][j].reportformat != null && eventsData[role][mmdd][j].reportformat.length > 0) ? 'hide' : '') + '" type="checkbox" />') + '<button id="button-unmapped-expand-'+mmdd.replace('/', '-')+'-'+j+'" part="button-icon-small" class="material-icons button-expand mr-10">open_in_new</button>' + '<sf-i-elastic-text text="'+eventsData[role][mmdd][j]['obligationtitle']+'" minLength="100"></sf-i-elastic-text> ' + '<div part="td-body"><sf-i-elastic-text text="'+eventsData[role][mmdd][j]["locationname"].replace(/ *\([^)]*\) */g, "")+'" minLength="30"></sf-i-elastic-text></div> <div part="upcoming-function">' + functionStr + '</div> ' + this.renderStatusHtml(partStatus, lateStatus, complianceStatus, i)
|
|
25470
|
+
eventHtml += '<button id="button-list-reporting-'+mmdd.replace('/', '-')+'-' + j +'" part="button-list-reporting" class="material-icons ml-10 button-list-reporting">edit_note</button>'
|
|
25471
|
+
eventHtml += '</div>';
|
|
25472
|
+
eventHtml += '<div class="list-reporting-container d-flex flex-col hide" part="list-reporting-container" id="list-reporting-container-' + mmdd.replace(/\//g,'-') + '-' + j + '"></div>'
|
|
25526
25473
|
eventHtml += '</div>';
|
|
25527
25474
|
html += eventHtml
|
|
25528
25475
|
|
|
@@ -25550,8 +25497,37 @@ export class SfIEvents extends LitElement {
|
|
|
25550
25497
|
}
|
|
25551
25498
|
html += '</div>';
|
|
25552
25499
|
|
|
25553
|
-
(this._SfIEventsC.querySelector('#next-calendar-data') as HTMLDivElement)
|
|
25554
|
-
|
|
25500
|
+
let nextEventsContainer = (this._SfIEventsC.querySelector('#next-calendar-data') as HTMLDivElement);
|
|
25501
|
+
nextEventsContainer.innerHTML = html;
|
|
25502
|
+
nextEventsContainer.style.display = "flex";
|
|
25503
|
+
this.myRole = role;
|
|
25504
|
+
let buttonListReports = nextEventsContainer.querySelectorAll('.button-list-reporting') as NodeListOf<HTMLButtonElement>
|
|
25505
|
+
for(let buttonListReport of buttonListReports){
|
|
25506
|
+
buttonListReport?.addEventListener('click',(ev:any) => {
|
|
25507
|
+
const id = ev.target.id;
|
|
25508
|
+
const idArr = id.split("-")
|
|
25509
|
+
const mmdd = idArr[3] + "/" + idArr[4];
|
|
25510
|
+
const yyyy = this.getCurrentYear(idArr[3]);
|
|
25511
|
+
// const i = idArr[5];
|
|
25512
|
+
const j = idArr[5];
|
|
25513
|
+
let listReportingContainer = nextEventsContainer.querySelector('#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j) as HTMLDivElement
|
|
25514
|
+
console.log('mmddyyyy', eventsData[role][mmdd][j], listReportingContainer, '#list-reporting-container-'+mmdd.replace(/\//g,'-')+'-'+j);
|
|
25515
|
+
if(listReportingContainer.style.display == 'none' || listReportingContainer.style.display == ''){4
|
|
25516
|
+
this.renderListReporting(listReportingContainer,eventsData[role][mmdd][j], mmdd + '/' + yyyy, nextEventsContainer)
|
|
25517
|
+
}else{
|
|
25518
|
+
listReportingContainer.innerHTML = '';
|
|
25519
|
+
listReportingContainer.style.display = 'none';
|
|
25520
|
+
ev.target.setAttribute('part','button-list-reporting')
|
|
25521
|
+
let streamEventTitles = nextEventsContainer.querySelectorAll('.stream-event-title') as NodeListOf<SfIElasticText>
|
|
25522
|
+
for(let streamEventTitle of streamEventTitles){
|
|
25523
|
+
streamEventTitle.removeAttribute('part')
|
|
25524
|
+
}
|
|
25525
|
+
}
|
|
25526
|
+
// console.log('part', ev.target.getAttribute('part'));
|
|
25527
|
+
})
|
|
25528
|
+
}
|
|
25529
|
+
|
|
25530
|
+
|
|
25555
25531
|
// }else{
|
|
25556
25532
|
// let innerDivHtml = (this._SfIEventsC.querySelector('#stream-event-next') as HTMLDivElement).innerHTML;
|
|
25557
25533
|
// innerDivHtml.replace('<button id="button-expand" part="icon-button-small" class="material-symbols-outlined">keyboard_arrow_down</button>','');
|