sf-i-events 1.0.703 → 1.0.704
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 +7 -4
- package/package.json +1 -1
- package/sf-i-events.js +73 -26
- package/src/sf-i-events.ts +77 -28
- package/src/util.ts +10 -1
- package/util.d.ts +2 -0
- package/util.js +8 -1
package/dev/index.html
CHANGED
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
</div>
|
|
694
694
|
|
|
695
695
|
</sf-i-events> -->
|
|
696
|
-
<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="pattern" username="
|
|
696
|
+
<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="pattern" 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" enabledeletelatestreport="true" 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="["obligationtitle"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
697
697
|
|
|
698
698
|
<div slot="uploader">
|
|
699
699
|
<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>
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
|
|
713
713
|
</sf-i-events> -->
|
|
714
714
|
|
|
715
|
-
<!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding" locations="{"India":{"Maharashtra":["Pune","Mumbai"],"Telangana":["Telangana"]},"Canada":{"CanadaSO":["CanadaLO"]},"Singapore":{"SingaporeSO":["Orchard","Raffles","Robinson","Tanjong","Tras"]},"United Kingdom":{"UnitedSO":["UnitedLO"]},"United States of America":{"AmericaSO":["AmericaLO"]}}" contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="
|
|
715
|
+
<!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding" locations="{"India":{"Maharashtra":["Pune","Mumbai"],"Telangana":["Telangana"]},"Canada":{"CanadaSO":["CanadaLO"]},"Singapore":{"SingaporeSO":["Orchard","Raffles","Robinson","Tanjong","Tras"]},"United Kingdom":{"UnitedSO":["UnitedLO"]},"United States of America":{"AmericaSO":["AmericaLO"]}}" contractstartdate="1/4/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">
|
|
716
716
|
|
|
717
717
|
</sf-i-events> -->
|
|
718
718
|
|
|
@@ -744,6 +744,7 @@
|
|
|
744
744
|
|
|
745
745
|
</sf-i-events> -->
|
|
746
746
|
|
|
747
|
+
<!-- <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="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" 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">
|
|
747
748
|
<!-- <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="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" 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">
|
|
748
749
|
|
|
749
750
|
<div slot="uploader">
|
|
@@ -758,11 +759,13 @@
|
|
|
758
759
|
<sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" 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" 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">
|
|
759
760
|
|
|
760
761
|
<div slot="uploader">
|
|
761
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf"]" extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710"></sf-i-uploader>
|
|
762
|
+
<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>
|
|
763
|
+
</div>
|
|
764
|
+
<div slot="reporting">
|
|
765
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
762
766
|
</div>
|
|
763
767
|
|
|
764
768
|
</sf-i-events>
|
|
765
|
-
-->
|
|
766
769
|
<!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" 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" 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">
|
|
767
770
|
|
|
768
771
|
<div slot="uploader">
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -131,6 +131,8 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
131
131
|
font-family: Source Sans Pro;
|
|
132
132
|
margin: 2px;
|
|
133
133
|
padding: 20px;
|
|
134
|
+
border: solid 5px gray;
|
|
135
|
+
border-style: groove;
|
|
134
136
|
background-color: #efefef;
|
|
135
137
|
}
|
|
136
138
|
.certificate-section {
|
|
@@ -7625,7 +7627,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7625
7627
|
var _a;
|
|
7626
7628
|
//console.log('divelement', divElement);
|
|
7627
7629
|
//console.log('sourcearray', sourceArray);
|
|
7628
|
-
|
|
7630
|
+
console.log('taggingarray', taggingArray);
|
|
7629
7631
|
//console.log('uniqcols', uniqCols);
|
|
7630
7632
|
//console.log('subfiltervalue', subfilter);
|
|
7631
7633
|
//console.log('arrFeedbackReference', arrFeedbackReference);
|
|
@@ -7715,10 +7717,14 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7715
7717
|
html += '<div class="mr-10">';
|
|
7716
7718
|
html += '<div class="d-flex justify-end"><button part="calendar-tab-icon-not-selected" class="material-icons button-toggle-more">expand_more</button><button part="calendar-tab-icon-selected" class="material-icons button-toggle-more-back hide">expand_less</button></div>';
|
|
7717
7719
|
// html += '<div class="d-flex justify-end"><button part="button" class="align-center button-download-backups hide" style="position: absolute; margin-top: 5px;"><span class="material-symbols-outlined mr-10">file_save</span><span>Download Backups</span></button></div>'
|
|
7718
|
-
html += '<div style="position: absolute; margin-top: 5px;"
|
|
7719
|
-
html += '</
|
|
7720
|
+
html += '<div style="position: absolute; margin-top: 5px;">';
|
|
7721
|
+
html += '<button part="button" class="hide d-flex align-center button-download-backups" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">file_save</span><span>Download Backups</span></button><button part="button" class="mt-10 hide d-flex align-center button-export-mapping" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">export_notes</span><span>Export Mapping</span></button><button part="button" class="mt-10 hide d-flex align-center button-export-mapping-csv" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">data_table</span><span>Export CSV</span></button>';
|
|
7720
7722
|
// console.log('jobs', jobs);
|
|
7721
|
-
html += ((jobs == null || jobs.data == null) ? '<
|
|
7723
|
+
html += ((jobs == null || jobs.data == null) ? '<input id="fileInput" type="file" style="display:none;" /><button part="button" class="mt-10 hide button-local-load d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">upload_file</span><span>Load From Local</span></button><button part="button" class="mt-10 hide button-local-save d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">save</span><span>Save Locally</span></button>' : ((jobs.data.status == "1" || jobs.data.status == "0") ? '<button part="button" class="mt-10 hide button-cancel" style="margin-left: -80px">Cancel Job</button>' : (this.disablesave == "yes" ? '' : '<input id="fileInput" type="file" style="display:none;" /><button part="button" class="mt-10 hide button-local-load d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">upload_file</span><span>Load From Local</span></button><button part="button" class="mt-10 hide button-local-save d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">save</span><span>Save Locally</span></button>')));
|
|
7724
|
+
html += '</div>';
|
|
7725
|
+
html += '</div>';
|
|
7726
|
+
html += '<button part="button" class="button-apply d-flex align-center mr-10"><span class="material-symbols-outlined mr-10">touch_app</span><span>Apply</span></button>';
|
|
7727
|
+
html += '<button part="button" class="button-save d-flex align-center"><span class="material-symbols-outlined mr-10">save</span><span>Save On Cloud</span></button>';
|
|
7722
7728
|
html += '</div>';
|
|
7723
7729
|
html += '</div>';
|
|
7724
7730
|
html += '<div>';
|
|
@@ -8183,6 +8189,18 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8183
8189
|
buttonToggleMoreBack.classList.remove('hide');
|
|
8184
8190
|
const buttonDownloadBackups = divElement.querySelector('.button-download-backups');
|
|
8185
8191
|
buttonDownloadBackups.style.display = 'flex';
|
|
8192
|
+
const buttonExportMapping = divElement.querySelector('.button-export-mapping');
|
|
8193
|
+
buttonExportMapping.style.display = 'flex';
|
|
8194
|
+
const buttonExportMappingCSV = divElement.querySelector('.button-export-mapping-csv');
|
|
8195
|
+
buttonExportMappingCSV.style.display = 'flex';
|
|
8196
|
+
// const buttonApply = (divElement as HTMLDivElement).querySelector('.button-apply') as HTMLButtonElement;
|
|
8197
|
+
// buttonApply.style.display = 'flex';
|
|
8198
|
+
const buttonLoadLocal = divElement.querySelector('.button-local-load');
|
|
8199
|
+
buttonLoadLocal.style.display = 'flex';
|
|
8200
|
+
const buttonSaveLocal = divElement.querySelector('.button-local-save');
|
|
8201
|
+
buttonSaveLocal.style.display = 'flex';
|
|
8202
|
+
// const buttonSave = (divElement as HTMLDivElement).querySelector('.button-save') as HTMLButtonElement;
|
|
8203
|
+
// buttonSave.style.display = 'flex';
|
|
8186
8204
|
const buttonDownloadBackupsNew = Util.clearListeners(buttonDownloadBackups);
|
|
8187
8205
|
buttonDownloadBackupsNew.addEventListener('click', async () => {
|
|
8188
8206
|
const result = await this.fetchGetStoredMapping(colName);
|
|
@@ -8202,9 +8220,6 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8202
8220
|
}, 3000);
|
|
8203
8221
|
}
|
|
8204
8222
|
});
|
|
8205
|
-
const buttonExportMapping = divElement.querySelector('.button-export-mapping');
|
|
8206
|
-
buttonExportMapping.style.display = 'flex';
|
|
8207
|
-
//console.log('buttonExportMapping', buttonExportMapping);
|
|
8208
8223
|
const buttonExportMappingNew = Util.clearListeners(buttonExportMapping);
|
|
8209
8224
|
buttonExportMappingNew.addEventListener('click', async () => {
|
|
8210
8225
|
let valueStr = [];
|
|
@@ -8245,18 +8260,50 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8245
8260
|
a.setAttribute('download', 'mapping_' + colName + '_' + new Date().getTime() + '.html');
|
|
8246
8261
|
a.click();
|
|
8247
8262
|
});
|
|
8263
|
+
const buttonExportMappingCSVNew = Util.clearListeners(buttonExportMappingCSV);
|
|
8264
|
+
buttonExportMappingCSVNew === null || buttonExportMappingCSVNew === void 0 ? void 0 : buttonExportMappingCSVNew.addEventListener('click', async () => {
|
|
8265
|
+
let csvData = Util.convertToCSV(taggingArray.data.mappings.mappings);
|
|
8266
|
+
console.log('csvData', csvData);
|
|
8267
|
+
});
|
|
8268
|
+
const buttonLoadLocalNew = Util.clearListeners(buttonLoadLocal);
|
|
8269
|
+
buttonLoadLocalNew === null || buttonLoadLocalNew === void 0 ? void 0 : buttonLoadLocalNew.addEventListener('click', async () => {
|
|
8270
|
+
console.log('load-local');
|
|
8271
|
+
divElement.querySelector('#fileInput').click();
|
|
8272
|
+
});
|
|
8273
|
+
const buttonSaveLocalNew = Util.clearListeners(buttonSaveLocal);
|
|
8274
|
+
buttonSaveLocalNew === null || buttonSaveLocalNew === void 0 ? void 0 : buttonSaveLocalNew.addEventListener('click', async () => {
|
|
8275
|
+
console.log('save-local');
|
|
8276
|
+
const blob = new Blob([JSON.stringify(taggingArray)], { type: 'text/plain' });
|
|
8277
|
+
const url = window.URL.createObjectURL(blob);
|
|
8278
|
+
const a = document.createElement('a');
|
|
8279
|
+
a.setAttribute('href', url);
|
|
8280
|
+
a.setAttribute('download', 'mapping_' + colName + '_' + new Date().toLocaleString() + '.txt');
|
|
8281
|
+
a.click();
|
|
8282
|
+
});
|
|
8248
8283
|
});
|
|
8249
8284
|
buttonToggleMoreBack.addEventListener('click', async (ev) => {
|
|
8250
8285
|
ev.target.classList.add('hide');
|
|
8251
8286
|
buttonToggleMore.classList.remove('hide');
|
|
8252
8287
|
const buttonDownloadBackups = divElement.querySelector('.button-download-backups');
|
|
8253
8288
|
buttonDownloadBackups.style.display = 'none';
|
|
8289
|
+
const buttonExportMapping = divElement.querySelector('.button-export-mapping');
|
|
8290
|
+
buttonExportMapping.style.display = 'none';
|
|
8291
|
+
const buttonExportMappingCSV = divElement.querySelector('.button-export-mapping-csv');
|
|
8292
|
+
buttonExportMappingCSV.style.display = 'none';
|
|
8293
|
+
// const buttonApply = (divElement as HTMLDivElement).querySelector('.button-apply') as HTMLButtonElement;
|
|
8294
|
+
// buttonApply.style.display = 'none';
|
|
8295
|
+
const buttonLoadLocal = divElement.querySelector('.button-local-load');
|
|
8296
|
+
buttonLoadLocal.style.display = 'none';
|
|
8297
|
+
const buttonSaveLocal = divElement.querySelector('.button-local-save');
|
|
8298
|
+
buttonSaveLocal.style.display = 'none';
|
|
8299
|
+
// const buttonSave = (divElement as HTMLDivElement).querySelector('.button-save') as HTMLButtonElement;
|
|
8300
|
+
// buttonSave.style.display = 'none';
|
|
8254
8301
|
});
|
|
8255
|
-
const buttonLoadLocal = divElement.querySelector('.button-local-load');
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
});
|
|
8302
|
+
// const buttonLoadLocal = (divElement as HTMLDivElement).querySelector('.button-local-load') as HTMLButtonElement;
|
|
8303
|
+
// buttonLoadLocal?.addEventListener('click', async () => {
|
|
8304
|
+
// console.log('load-local');
|
|
8305
|
+
// ((divElement as HTMLDivElement).querySelector('#fileInput') as HTMLInputElement).click();
|
|
8306
|
+
// });
|
|
8260
8307
|
const fileInput = divElement.querySelector('#fileInput');
|
|
8261
8308
|
fileInput.addEventListener('change', (e) => {
|
|
8262
8309
|
var fr = new FileReader();
|
|
@@ -8267,16 +8314,16 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8267
8314
|
fr.readAsText(e.target.files[0]);
|
|
8268
8315
|
}
|
|
8269
8316
|
});
|
|
8270
|
-
const buttonSaveLocal = divElement.querySelector('.button-local-save');
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
});
|
|
8317
|
+
// const buttonSaveLocal = (divElement as HTMLDivElement).querySelector('.button-local-save') as HTMLButtonElement;
|
|
8318
|
+
// buttonSaveLocal?.addEventListener('click', async () => {
|
|
8319
|
+
// console.log('save-local');
|
|
8320
|
+
// const blob = new Blob([JSON.stringify(taggingArray)], { type: 'text/plain' });
|
|
8321
|
+
// const url = window.URL.createObjectURL(blob)
|
|
8322
|
+
// const a = document.createElement('a')
|
|
8323
|
+
// a.setAttribute('href', url)
|
|
8324
|
+
// a.setAttribute('download', 'mapping_'+colName+'_'+new Date().toLocaleString()+'.txt');
|
|
8325
|
+
// a.click()
|
|
8326
|
+
// });
|
|
8280
8327
|
const buttonSave = divElement.querySelector('.button-save');
|
|
8281
8328
|
buttonSave === null || buttonSave === void 0 ? void 0 : buttonSave.addEventListener('click', async () => {
|
|
8282
8329
|
await this.saveTagging(taggingArray.data.mappings, uploadFunction, refreshFunction, false);
|
|
@@ -13163,7 +13210,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13163
13210
|
}
|
|
13164
13211
|
};
|
|
13165
13212
|
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved) => {
|
|
13166
|
-
let url = "https://" + this.apiId + "/
|
|
13213
|
+
let url = "https://" + this.apiId + "/uploadaudit1";
|
|
13167
13214
|
const body = {
|
|
13168
13215
|
"mmddyyyy": mmddyyyy,
|
|
13169
13216
|
"projectid": this.projectId,
|
|
@@ -13199,7 +13246,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13199
13246
|
}
|
|
13200
13247
|
};
|
|
13201
13248
|
this.uploadAuditsBulk = async (bulkBody) => {
|
|
13202
|
-
let url = "https://" + this.apiId + "/
|
|
13249
|
+
let url = "https://" + this.apiId + "/uploadauditsbulk1";
|
|
13203
13250
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
13204
13251
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
13205
13252
|
this._SfLoader.innerHTML = '';
|
|
@@ -13215,7 +13262,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13215
13262
|
}
|
|
13216
13263
|
};
|
|
13217
13264
|
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved) => {
|
|
13218
|
-
let url = "https://" + this.apiId + "/
|
|
13265
|
+
let url = "https://" + this.apiId + "/uploadreview1";
|
|
13219
13266
|
const body = {
|
|
13220
13267
|
"mmddyyyy": mmddyyyy,
|
|
13221
13268
|
"projectid": this.projectId,
|
|
@@ -13253,7 +13300,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
13253
13300
|
``;
|
|
13254
13301
|
};
|
|
13255
13302
|
this.uploadReviewsBulk = async (bulkBody) => {
|
|
13256
|
-
let url = "https://" + this.apiId + "/
|
|
13303
|
+
let url = "https://" + this.apiId + "/uploadreviewsbulk1";
|
|
13257
13304
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
13258
13305
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
13259
13306
|
this._SfLoader.innerHTML = '';
|
package/src/sf-i-events.ts
CHANGED
|
@@ -134,6 +134,8 @@ export class SfIEvents extends LitElement {
|
|
|
134
134
|
font-family: Source Sans Pro;
|
|
135
135
|
margin: 2px;
|
|
136
136
|
padding: 20px;
|
|
137
|
+
border: solid 5px gray;
|
|
138
|
+
border-style: groove;
|
|
137
139
|
background-color: #efefef;
|
|
138
140
|
}
|
|
139
141
|
.certificate-section {
|
|
@@ -11168,7 +11170,7 @@ export class SfIEvents extends LitElement {
|
|
|
11168
11170
|
|
|
11169
11171
|
//console.log('divelement', divElement);
|
|
11170
11172
|
//console.log('sourcearray', sourceArray);
|
|
11171
|
-
|
|
11173
|
+
console.log('taggingarray', taggingArray);
|
|
11172
11174
|
//console.log('uniqcols', uniqCols);
|
|
11173
11175
|
//console.log('subfiltervalue', subfilter);
|
|
11174
11176
|
//console.log('arrFeedbackReference', arrFeedbackReference);
|
|
@@ -11300,10 +11302,15 @@ export class SfIEvents extends LitElement {
|
|
|
11300
11302
|
html += '<div class="mr-10">';
|
|
11301
11303
|
html += '<div class="d-flex justify-end"><button part="calendar-tab-icon-not-selected" class="material-icons button-toggle-more">expand_more</button><button part="calendar-tab-icon-selected" class="material-icons button-toggle-more-back hide">expand_less</button></div>'
|
|
11302
11304
|
// html += '<div class="d-flex justify-end"><button part="button" class="align-center button-download-backups hide" style="position: absolute; margin-top: 5px;"><span class="material-symbols-outlined mr-10">file_save</span><span>Download Backups</span></button></div>'
|
|
11303
|
-
html += '<div style="position: absolute; margin-top: 5px;"
|
|
11304
|
-
|
|
11305
|
+
html += '<div style="position: absolute; margin-top: 5px;">'
|
|
11306
|
+
html += '<button part="button" class="hide d-flex align-center button-download-backups" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">file_save</span><span>Download Backups</span></button><button part="button" class="mt-10 hide d-flex align-center button-export-mapping" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">export_notes</span><span>Export Mapping</span></button><button part="button" class="mt-10 hide d-flex align-center button-export-mapping-csv" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">data_table</span><span>Export CSV</span></button>'
|
|
11307
|
+
|
|
11305
11308
|
// console.log('jobs', jobs);
|
|
11306
|
-
html += ((jobs == null || jobs.data == null) ? '<
|
|
11309
|
+
html += ((jobs == null || jobs.data == null) ? '<input id="fileInput" type="file" style="display:none;" /><button part="button" class="mt-10 hide button-local-load d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">upload_file</span><span>Load From Local</span></button><button part="button" class="mt-10 hide button-local-save d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">save</span><span>Save Locally</span></button>' : ((jobs.data.status == "1" || jobs.data.status == "0" ) ? '<button part="button" class="mt-10 hide button-cancel" style="margin-left: -80px">Cancel Job</button>' : (this.disablesave == "yes" ? '' : '<input id="fileInput" type="file" style="display:none;" /><button part="button" class="mt-10 hide button-local-load d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">upload_file</span><span>Load From Local</span></button><button part="button" class="mt-10 hide button-local-save d-flex align-center mr-10" style="margin-left: -80px"><span class="material-symbols-outlined mr-10">save</span><span>Save Locally</span></button>')));
|
|
11310
|
+
html += '</div>';
|
|
11311
|
+
html += '</div>';
|
|
11312
|
+
html += '<button part="button" class="button-apply d-flex align-center mr-10"><span class="material-symbols-outlined mr-10">touch_app</span><span>Apply</span></button>'
|
|
11313
|
+
html += '<button part="button" class="button-save d-flex align-center"><span class="material-symbols-outlined mr-10">save</span><span>Save On Cloud</span></button>'
|
|
11307
11314
|
html += '</div>';
|
|
11308
11315
|
|
|
11309
11316
|
html += '</div>';
|
|
@@ -11987,6 +11994,18 @@ export class SfIEvents extends LitElement {
|
|
|
11987
11994
|
buttonToggleMoreBack.classList.remove('hide');
|
|
11988
11995
|
const buttonDownloadBackups = (divElement as HTMLDivElement).querySelector('.button-download-backups') as HTMLButtonElement;
|
|
11989
11996
|
buttonDownloadBackups.style.display = 'flex';
|
|
11997
|
+
const buttonExportMapping = (divElement as HTMLDivElement).querySelector('.button-export-mapping') as HTMLButtonElement;
|
|
11998
|
+
buttonExportMapping.style.display = 'flex';
|
|
11999
|
+
const buttonExportMappingCSV = (divElement as HTMLDivElement).querySelector('.button-export-mapping-csv') as HTMLButtonElement;
|
|
12000
|
+
buttonExportMappingCSV.style.display = 'flex';
|
|
12001
|
+
// const buttonApply = (divElement as HTMLDivElement).querySelector('.button-apply') as HTMLButtonElement;
|
|
12002
|
+
// buttonApply.style.display = 'flex';
|
|
12003
|
+
const buttonLoadLocal = (divElement as HTMLDivElement).querySelector('.button-local-load') as HTMLButtonElement;
|
|
12004
|
+
buttonLoadLocal.style.display = 'flex';
|
|
12005
|
+
const buttonSaveLocal = (divElement as HTMLDivElement).querySelector('.button-local-save') as HTMLButtonElement;
|
|
12006
|
+
buttonSaveLocal.style.display = 'flex';
|
|
12007
|
+
// const buttonSave = (divElement as HTMLDivElement).querySelector('.button-save') as HTMLButtonElement;
|
|
12008
|
+
// buttonSave.style.display = 'flex';
|
|
11990
12009
|
|
|
11991
12010
|
const buttonDownloadBackupsNew = Util.clearListeners(buttonDownloadBackups);
|
|
11992
12011
|
buttonDownloadBackupsNew.addEventListener('click', async () => {
|
|
@@ -12017,11 +12036,6 @@ export class SfIEvents extends LitElement {
|
|
|
12017
12036
|
|
|
12018
12037
|
});
|
|
12019
12038
|
|
|
12020
|
-
const buttonExportMapping = (divElement as HTMLDivElement).querySelector('.button-export-mapping') as HTMLButtonElement;
|
|
12021
|
-
buttonExportMapping.style.display = 'flex';
|
|
12022
|
-
|
|
12023
|
-
//console.log('buttonExportMapping', buttonExportMapping);
|
|
12024
|
-
|
|
12025
12039
|
const buttonExportMappingNew = Util.clearListeners(buttonExportMapping);
|
|
12026
12040
|
buttonExportMappingNew.addEventListener('click', async () => {
|
|
12027
12041
|
|
|
@@ -12079,6 +12093,29 @@ export class SfIEvents extends LitElement {
|
|
|
12079
12093
|
a.click()
|
|
12080
12094
|
|
|
12081
12095
|
});
|
|
12096
|
+
|
|
12097
|
+
const buttonExportMappingCSVNew = Util.clearListeners(buttonExportMappingCSV);
|
|
12098
|
+
buttonExportMappingCSVNew?.addEventListener('click', async () => {
|
|
12099
|
+
let csvData = Util.convertToCSV(taggingArray.data.mappings.mappings);
|
|
12100
|
+
console.log('csvData', csvData);
|
|
12101
|
+
})
|
|
12102
|
+
|
|
12103
|
+
const buttonLoadLocalNew = Util.clearListeners(buttonLoadLocal);
|
|
12104
|
+
buttonLoadLocalNew?.addEventListener('click', async () => {
|
|
12105
|
+
console.log('load-local');
|
|
12106
|
+
((divElement as HTMLDivElement).querySelector('#fileInput') as HTMLInputElement).click();
|
|
12107
|
+
});
|
|
12108
|
+
|
|
12109
|
+
const buttonSaveLocalNew = Util.clearListeners(buttonSaveLocal);
|
|
12110
|
+
buttonSaveLocalNew?.addEventListener('click', async () => {
|
|
12111
|
+
console.log('save-local');
|
|
12112
|
+
const blob = new Blob([JSON.stringify(taggingArray)], { type: 'text/plain' });
|
|
12113
|
+
const url = window.URL.createObjectURL(blob)
|
|
12114
|
+
const a = document.createElement('a')
|
|
12115
|
+
a.setAttribute('href', url)
|
|
12116
|
+
a.setAttribute('download', 'mapping_'+colName+'_'+new Date().toLocaleString()+'.txt');
|
|
12117
|
+
a.click()
|
|
12118
|
+
});
|
|
12082
12119
|
|
|
12083
12120
|
});
|
|
12084
12121
|
|
|
@@ -12088,14 +12125,26 @@ export class SfIEvents extends LitElement {
|
|
|
12088
12125
|
buttonToggleMore.classList.remove('hide');
|
|
12089
12126
|
const buttonDownloadBackups = (divElement as HTMLDivElement).querySelector('.button-download-backups') as HTMLButtonElement;
|
|
12090
12127
|
buttonDownloadBackups.style.display = 'none';
|
|
12128
|
+
const buttonExportMapping = (divElement as HTMLDivElement).querySelector('.button-export-mapping') as HTMLButtonElement;
|
|
12129
|
+
buttonExportMapping.style.display = 'none';
|
|
12130
|
+
const buttonExportMappingCSV = (divElement as HTMLDivElement).querySelector('.button-export-mapping-csv') as HTMLButtonElement;
|
|
12131
|
+
buttonExportMappingCSV.style.display = 'none';
|
|
12132
|
+
// const buttonApply = (divElement as HTMLDivElement).querySelector('.button-apply') as HTMLButtonElement;
|
|
12133
|
+
// buttonApply.style.display = 'none';
|
|
12134
|
+
const buttonLoadLocal = (divElement as HTMLDivElement).querySelector('.button-local-load') as HTMLButtonElement;
|
|
12135
|
+
buttonLoadLocal.style.display = 'none';
|
|
12136
|
+
const buttonSaveLocal = (divElement as HTMLDivElement).querySelector('.button-local-save') as HTMLButtonElement;
|
|
12137
|
+
buttonSaveLocal.style.display = 'none';
|
|
12138
|
+
// const buttonSave = (divElement as HTMLDivElement).querySelector('.button-save') as HTMLButtonElement;
|
|
12139
|
+
// buttonSave.style.display = 'none';
|
|
12091
12140
|
|
|
12092
12141
|
});
|
|
12093
12142
|
|
|
12094
|
-
const buttonLoadLocal = (divElement as HTMLDivElement).querySelector('.button-local-load') as HTMLButtonElement;
|
|
12095
|
-
buttonLoadLocal?.addEventListener('click', async () => {
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
});
|
|
12143
|
+
// const buttonLoadLocal = (divElement as HTMLDivElement).querySelector('.button-local-load') as HTMLButtonElement;
|
|
12144
|
+
// buttonLoadLocal?.addEventListener('click', async () => {
|
|
12145
|
+
// console.log('load-local');
|
|
12146
|
+
// ((divElement as HTMLDivElement).querySelector('#fileInput') as HTMLInputElement).click();
|
|
12147
|
+
// });
|
|
12099
12148
|
|
|
12100
12149
|
const fileInput = (divElement as HTMLDivElement).querySelector('#fileInput') as HTMLButtonElement;
|
|
12101
12150
|
fileInput.addEventListener('change', (e: any) => {
|
|
@@ -12110,16 +12159,16 @@ export class SfIEvents extends LitElement {
|
|
|
12110
12159
|
})
|
|
12111
12160
|
|
|
12112
12161
|
|
|
12113
|
-
const buttonSaveLocal = (divElement as HTMLDivElement).querySelector('.button-local-save') as HTMLButtonElement;
|
|
12114
|
-
buttonSaveLocal?.addEventListener('click', async () => {
|
|
12115
|
-
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
});
|
|
12162
|
+
// const buttonSaveLocal = (divElement as HTMLDivElement).querySelector('.button-local-save') as HTMLButtonElement;
|
|
12163
|
+
// buttonSaveLocal?.addEventListener('click', async () => {
|
|
12164
|
+
// console.log('save-local');
|
|
12165
|
+
// const blob = new Blob([JSON.stringify(taggingArray)], { type: 'text/plain' });
|
|
12166
|
+
// const url = window.URL.createObjectURL(blob)
|
|
12167
|
+
// const a = document.createElement('a')
|
|
12168
|
+
// a.setAttribute('href', url)
|
|
12169
|
+
// a.setAttribute('download', 'mapping_'+colName+'_'+new Date().toLocaleString()+'.txt');
|
|
12170
|
+
// a.click()
|
|
12171
|
+
// });
|
|
12123
12172
|
|
|
12124
12173
|
const buttonSave = (divElement as HTMLDivElement).querySelector('.button-save') as HTMLButtonElement;
|
|
12125
12174
|
buttonSave?.addEventListener('click', async () => {
|
|
@@ -18317,7 +18366,7 @@ export class SfIEvents extends LitElement {
|
|
|
18317
18366
|
}
|
|
18318
18367
|
|
|
18319
18368
|
uploadAudit = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any) => {
|
|
18320
|
-
let url = "https://"+this.apiId+"/
|
|
18369
|
+
let url = "https://"+this.apiId+"/uploadaudit1";
|
|
18321
18370
|
|
|
18322
18371
|
const body = {
|
|
18323
18372
|
"mmddyyyy": mmddyyyy,
|
|
@@ -18355,7 +18404,7 @@ export class SfIEvents extends LitElement {
|
|
|
18355
18404
|
}
|
|
18356
18405
|
}
|
|
18357
18406
|
uploadAuditsBulk = async (bulkBody: any) => {
|
|
18358
|
-
let url = "https://"+this.apiId+"/
|
|
18407
|
+
let url = "https://"+this.apiId+"/uploadauditsbulk1";
|
|
18359
18408
|
|
|
18360
18409
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
18361
18410
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
@@ -18374,7 +18423,7 @@ export class SfIEvents extends LitElement {
|
|
|
18374
18423
|
}
|
|
18375
18424
|
|
|
18376
18425
|
uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any) => {
|
|
18377
|
-
let url = "https://"+this.apiId+"/
|
|
18426
|
+
let url = "https://"+this.apiId+"/uploadreview1";
|
|
18378
18427
|
|
|
18379
18428
|
const body = {
|
|
18380
18429
|
"mmddyyyy": mmddyyyy,
|
|
@@ -18414,7 +18463,7 @@ export class SfIEvents extends LitElement {
|
|
|
18414
18463
|
}``
|
|
18415
18464
|
}
|
|
18416
18465
|
uploadReviewsBulk = async (bulkBody: any) => {
|
|
18417
|
-
let url = "https://"+this.apiId+"/
|
|
18466
|
+
let url = "https://"+this.apiId+"/uploadreviewsbulk1";
|
|
18418
18467
|
|
|
18419
18468
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
18420
18469
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
package/src/util.ts
CHANGED
|
@@ -380,8 +380,17 @@ function jsonObjectToHtml(json: any) {
|
|
|
380
380
|
|
|
381
381
|
}
|
|
382
382
|
|
|
383
|
+
function convertToCSV(arr:any[]) {
|
|
384
|
+
const array = [Object.keys(arr[0])].concat(arr)
|
|
385
|
+
|
|
386
|
+
return array.map(it => {
|
|
387
|
+
console.log('csv it', it);
|
|
388
|
+
return Object.values(it).toString()
|
|
389
|
+
}).join('\n')
|
|
390
|
+
}
|
|
391
|
+
|
|
383
392
|
const exportFunctions = {
|
|
384
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor
|
|
393
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV
|
|
385
394
|
};
|
|
386
395
|
|
|
387
396
|
export default exportFunctions;
|
package/util.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ declare function getRandomColor(): string;
|
|
|
10
10
|
declare function isInteger(value: string): boolean;
|
|
11
11
|
declare function clearListeners(old_element: HTMLElement): Node;
|
|
12
12
|
declare function jsonObjectToHtml(json: any): string;
|
|
13
|
+
declare function convertToCSV(arr: any[]): string;
|
|
13
14
|
declare const exportFunctions: {
|
|
14
15
|
callApiPresignedDelete: typeof callApiPresignedDelete;
|
|
15
16
|
callApiPresignedGet: typeof callApiPresignedGet;
|
|
@@ -25,6 +26,7 @@ declare const exportFunctions: {
|
|
|
25
26
|
createDiagonalPattern2: typeof createDiagonalPattern2;
|
|
26
27
|
createDiagonalPattern3: typeof createDiagonalPattern3;
|
|
27
28
|
getRandomColor: typeof getRandomColor;
|
|
29
|
+
convertToCSV: typeof convertToCSV;
|
|
28
30
|
};
|
|
29
31
|
export default exportFunctions;
|
|
30
32
|
//# sourceMappingURL=util.d.ts.map
|
package/util.js
CHANGED
|
@@ -314,8 +314,15 @@ function jsonObjectToHtml(json) {
|
|
|
314
314
|
}
|
|
315
315
|
return html;
|
|
316
316
|
}
|
|
317
|
+
function convertToCSV(arr) {
|
|
318
|
+
const array = [Object.keys(arr[0])].concat(arr);
|
|
319
|
+
return array.map(it => {
|
|
320
|
+
console.log('csv it', it);
|
|
321
|
+
return Object.values(it).toString();
|
|
322
|
+
}).join('\n');
|
|
323
|
+
}
|
|
317
324
|
const exportFunctions = {
|
|
318
|
-
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor
|
|
325
|
+
callApiPresignedDelete, callApiPresignedGet, callApiPresigned, jsonObjectToHtml, clearListeners, isInteger, callApi, validateName, readCookie, timeSince, createDiagonalPattern1, createDiagonalPattern2, createDiagonalPattern3, getRandomColor, convertToCSV
|
|
319
326
|
};
|
|
320
327
|
export default exportFunctions;
|
|
321
328
|
//# sourceMappingURL=util.js.map
|