sf-i-events 1.0.833 → 1.0.835
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 +14 -4
- package/package.json +1 -1
- package/sf-i-events.js +18 -15
- package/src/sf-i-events.ts +19 -15
package/dev/index.html
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import {SfISubSelect} from 'https://esm.run/sf-i-sub-select@1.0.83/sf-i-sub-select.js';
|
|
23
23
|
import {SfIForm} from 'https://esm.run/sf-i-form@1.0.184/sf-i-form.js';
|
|
24
24
|
import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text@1.0.17/sf-i-elastic-text.js';
|
|
25
|
-
import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.
|
|
25
|
+
import {SfIUploader} from 'https://esm.run/sf-i-uploader@1.0.114/sf-i-uploader.js';
|
|
26
26
|
import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea@1.0.23/sf-i-multitextarea.js';
|
|
27
27
|
import {SfIReporting} from 'https://esm.run/sf-i-reporting@1.0.73/sf-i-reporting.js';
|
|
28
28
|
import {SfIBricks} from 'https://esm.run/sf-i-bricks@1.0.8/sf-i-bricks.js';
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
// import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.184/sf-i-form.js?module';
|
|
39
39
|
// import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.423/sf-i-events.js?module';
|
|
40
40
|
// import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.7/sf-i-elastic-text.js?module';
|
|
41
|
-
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.
|
|
41
|
+
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.114/sf-i-uploader.js?module';
|
|
42
42
|
// import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
|
|
43
43
|
// import {SfNewFeature} from 'https://unpkg.com/sf-new-feature@1.0.1/sf-new-feature.js?module';
|
|
44
44
|
|
|
@@ -694,6 +694,16 @@
|
|
|
694
694
|
</div>
|
|
695
695
|
|
|
696
696
|
</sf-i-events> -->
|
|
697
|
+
<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="Precisionmed Functionhead" userprofileid="8b73b571-f993-49cf-96e1-bf84f628f26f" projectid="63d20443-b9cc-4a86-b39d-bf81c1c93ba5" projectname="PrecisionMed ABC" countryid="f443b70d-6609-42e0-b6a4-446bfa05d20a" 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">
|
|
698
|
+
|
|
699
|
+
<div slot="uploader">
|
|
700
|
+
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="63d20443-b9cc-4a86-b39d-bf81c1c93ba5" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
701
|
+
</div>
|
|
702
|
+
<div slot="reporting">
|
|
703
|
+
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
704
|
+
</div>
|
|
705
|
+
|
|
706
|
+
</sf-i-events>
|
|
697
707
|
<!-- <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">
|
|
698
708
|
|
|
699
709
|
<div slot="uploader">
|
|
@@ -759,7 +769,7 @@
|
|
|
759
769
|
</div>
|
|
760
770
|
|
|
761
771
|
</sf-i-events> -->
|
|
762
|
-
<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="pattern" username="Dipti" userprofileid="d888568d-0599-46f9-9d73-55ea76345db1" projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" projectname="Chitale" countryid="4252b692-e47c-4244-9500-0bea51150031" enabledeletelatestreport="true" 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="["obligationtitle"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
772
|
+
<!-- <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="pattern" username="Dipti" userprofileid="d888568d-0599-46f9-9d73-55ea76345db1" projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" projectname="Chitale" countryid="4252b692-e47c-4244-9500-0bea51150031" enabledeletelatestreport="true" 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="["obligationtitle"]" eventhidefields="["comments","documents","lastupdated","approved","tags"]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
|
|
763
773
|
|
|
764
774
|
<div slot="uploader">
|
|
765
775
|
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" extract="yes" projectid="c7d18a84-c2df-4dc2-b75f-5820549f5e5c" maxsize="5242880" allowdownload="yes"></sf-i-uploader>
|
|
@@ -768,7 +778,7 @@
|
|
|
768
778
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
769
779
|
</div>
|
|
770
780
|
|
|
771
|
-
</sf-i-events>
|
|
781
|
+
</sf-i-events> -->
|
|
772
782
|
<!-- <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">
|
|
773
783
|
|
|
774
784
|
<div slot="uploader">
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -9655,7 +9655,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9655
9655
|
};
|
|
9656
9656
|
this.fetchEventDetails = async (listEvent, mmddyyyy, currentColumnButton, eventsContainer, flagUploadGuidance = false, listEventContainer = null) => {
|
|
9657
9657
|
console.log('listEvent', listEvent, listEvent.id);
|
|
9658
|
-
let url = "https://" + this.apiId + "/
|
|
9658
|
+
let url = "https://" + this.apiId + "/getalleventdetails1";
|
|
9659
9659
|
//console.log('fetch calendar url', url);
|
|
9660
9660
|
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "eventid": listEvent.id, "entityid": listEvent.entityid, "locationid": listEvent.locationid, "mmddyyyy": mmddyyyy, "year": this.calendarStartYYYY };
|
|
9661
9661
|
//console.log('urlbody', urlBody);
|
|
@@ -9876,10 +9876,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
9876
9876
|
}
|
|
9877
9877
|
else if (complianceFields[i] == 'attachment') {
|
|
9878
9878
|
if (event[complianceFields[i]] != null && event[complianceFields[i]].length > 0) {
|
|
9879
|
-
|
|
9879
|
+
console.log('attachments str', event[complianceFields[i]]);
|
|
9880
9880
|
html += '<div class="m-20">';
|
|
9881
9881
|
html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>';
|
|
9882
|
-
|
|
9882
|
+
for (let attachmentStr of event[complianceFields[i]]) {
|
|
9883
|
+
let attachment = JSON.parse(attachmentStr + "");
|
|
9884
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{ "key": attachment.key, "ext": attachment.ext }]).replace(/"/g, '"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
|
|
9885
|
+
}
|
|
9883
9886
|
html += '</div>';
|
|
9884
9887
|
}
|
|
9885
9888
|
}
|
|
@@ -16993,7 +16996,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
16993
16996
|
}
|
|
16994
16997
|
};
|
|
16995
16998
|
this.uploadAudit = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "events") => {
|
|
16996
|
-
let url = "https://" + this.apiId + "/
|
|
16999
|
+
let url = "https://" + this.apiId + "/uploadaudit1";
|
|
16997
17000
|
const body = {
|
|
16998
17001
|
"mmddyyyy": mmddyyyy,
|
|
16999
17002
|
"projectid": this.projectId,
|
|
@@ -17038,7 +17041,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17038
17041
|
return retValue;
|
|
17039
17042
|
};
|
|
17040
17043
|
this.uploadAuditsBulk = async (bulkBody) => {
|
|
17041
|
-
let url = "https://" + this.apiId + "/
|
|
17044
|
+
let url = "https://" + this.apiId + "/uploadauditsbulk1";
|
|
17042
17045
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17043
17046
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
17044
17047
|
this._SfLoader.innerHTML = '';
|
|
@@ -17058,7 +17061,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17058
17061
|
}
|
|
17059
17062
|
};
|
|
17060
17063
|
this.uploadReview = async (entityId, locationId, mmddyyyy, eventid, comments, approved, module = "events") => {
|
|
17061
|
-
let url = "https://" + this.apiId + "/
|
|
17064
|
+
let url = "https://" + this.apiId + "/uploadreview1";
|
|
17062
17065
|
const body = {
|
|
17063
17066
|
"mmddyyyy": mmddyyyy,
|
|
17064
17067
|
"projectid": this.projectId,
|
|
@@ -17130,7 +17133,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17130
17133
|
}
|
|
17131
17134
|
};
|
|
17132
17135
|
this.uploadReviewsBulk = async (bulkBody) => {
|
|
17133
|
-
let url = "https://" + this.apiId + "/
|
|
17136
|
+
let url = "https://" + this.apiId + "/uploadreviewsbulk1";
|
|
17134
17137
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17135
17138
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
17136
17139
|
this._SfLoader.innerHTML = '';
|
|
@@ -17153,7 +17156,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17153
17156
|
}
|
|
17154
17157
|
};
|
|
17155
17158
|
this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "events", percentage = "100", makercheckers) => {
|
|
17156
|
-
let url = "https://" + this.apiId + "/
|
|
17159
|
+
let url = "https://" + this.apiId + "/uploadreport3";
|
|
17157
17160
|
let body = {
|
|
17158
17161
|
"mmddyyyy": mmddyyyy,
|
|
17159
17162
|
"projectid": this.projectId,
|
|
@@ -17211,7 +17214,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17211
17214
|
return retValue;
|
|
17212
17215
|
};
|
|
17213
17216
|
this.uploadReportsBulk = async (bulkBody, showSuccess = true) => {
|
|
17214
|
-
let url = "https://" + this.apiId + "/
|
|
17217
|
+
let url = "https://" + this.apiId + "/uploadreportsbulk3";
|
|
17215
17218
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17216
17219
|
const xhr = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization));
|
|
17217
17220
|
if (showSuccess) {
|
|
@@ -17513,7 +17516,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
17513
17516
|
}
|
|
17514
17517
|
};
|
|
17515
17518
|
this.fetchDeleteReview = async (eventId, mmddyyyy, entityId, locationId) => {
|
|
17516
|
-
let url = "https://" + this.apiId + "/
|
|
17519
|
+
let url = "https://" + this.apiId + "/deletereview1";
|
|
17517
17520
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
17518
17521
|
const xhr = (await this.prepareXhr({ "projectid": this.projectId, "entityid": entityId, "locationid": locationId, "mmddyyyy": mmddyyyy, "eventid": eventId, }, url, this._SfLoader, authorization));
|
|
17519
17522
|
this._SfLoader.innerHTML = '';
|
|
@@ -18374,7 +18377,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18374
18377
|
else {
|
|
18375
18378
|
view = "entity";
|
|
18376
18379
|
}
|
|
18377
|
-
path = "
|
|
18380
|
+
path = "getallcountryevents2";
|
|
18378
18381
|
let sDate = "";
|
|
18379
18382
|
let eDate = "";
|
|
18380
18383
|
//console.log('currenttab', this.getCurrentTab());
|
|
@@ -18538,7 +18541,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
18538
18541
|
let path = "";
|
|
18539
18542
|
this.sdate = startDate;
|
|
18540
18543
|
this.edate = endDate;
|
|
18541
|
-
path = "
|
|
18544
|
+
path = "getstatistics1";
|
|
18542
18545
|
let sDate = "";
|
|
18543
18546
|
let eDate = "";
|
|
18544
18547
|
//console.log('currenttab', this.getCurrentTab());
|
|
@@ -19082,7 +19085,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19082
19085
|
this.fetchNext = async (page, role, status) => {
|
|
19083
19086
|
//this.apiBodyList = '{"id": "' +(this._SfProject[0].querySelector('#sf-i-project') as SfIForm).selectedValues()[0]+ '"}'
|
|
19084
19087
|
this.nextPage = page;
|
|
19085
|
-
let url = "https://" + this.apiId + "/
|
|
19088
|
+
let url = "https://" + this.apiId + "/getnextuserevents1";
|
|
19086
19089
|
let statusArr = [];
|
|
19087
19090
|
if (status == this.TAB_ALL) {
|
|
19088
19091
|
statusArr = [this.STATUS_NOT_STARTED, this.STATUS_PENDING_APPROVAL, this.STATUS_REJECTED, this.STATUS_APPROVED];
|
|
@@ -19654,7 +19657,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19654
19657
|
day = '0' + day;
|
|
19655
19658
|
let eDate = month + "/" + day + "/" + year;
|
|
19656
19659
|
let urlBody = { "projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY };
|
|
19657
|
-
let url = "https://" + this.apiId + "/
|
|
19660
|
+
let url = "https://" + this.apiId + "/getallcountryevents2";
|
|
19658
19661
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
19659
19662
|
const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
|
|
19660
19663
|
this._SfLoader.innerHTML = '';
|
|
@@ -19739,7 +19742,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19739
19742
|
console.log('fetching compliances', sortid);
|
|
19740
19743
|
let complianceEntityId = sortid.split(';')[1];
|
|
19741
19744
|
let complianceLocationId = sortid.split(';')[2];
|
|
19742
|
-
let url = "https://" + this.apiId + "/
|
|
19745
|
+
let url = "https://" + this.apiId + "/getallcountryevents2";
|
|
19743
19746
|
let sDateObj = selectedDate;
|
|
19744
19747
|
sDateObj.setDate(selectedDate.getDate() - 60);
|
|
19745
19748
|
let day = '' + sDateObj.getDate();
|
package/src/sf-i-events.ts
CHANGED
|
@@ -13264,7 +13264,7 @@ export class SfIEvents extends LitElement {
|
|
|
13264
13264
|
|
|
13265
13265
|
fetchEventDetails = async (listEvent: any, mmddyyyy: any, currentColumnButton: HTMLButtonElement | null, eventsContainer: HTMLDivElement, flagUploadGuidance: boolean = false, listEventContainer: HTMLDivElement | null = null) => {
|
|
13266
13266
|
console.log('listEvent', listEvent, listEvent.id)
|
|
13267
|
-
let url = "https://"+this.apiId+"/
|
|
13267
|
+
let url = "https://"+this.apiId+"/getalleventdetails1";
|
|
13268
13268
|
|
|
13269
13269
|
//console.log('fetch calendar url', url);
|
|
13270
13270
|
let urlBody :any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "eventid": listEvent.id, "entityid": listEvent.entityid, "locationid": listEvent.locationid, "mmddyyyy": mmddyyyy, "year": this.calendarStartYYYY};
|
|
@@ -13525,10 +13525,14 @@ export class SfIEvents extends LitElement {
|
|
|
13525
13525
|
|
|
13526
13526
|
} else if(complianceFields[i] == 'attachment'){
|
|
13527
13527
|
if(event[complianceFields[i]] != null && event[complianceFields[i]].length > 0) {
|
|
13528
|
-
|
|
13528
|
+
console.log('attachments str', event[complianceFields[i]]);
|
|
13529
|
+
|
|
13529
13530
|
html += '<div class="m-20">';
|
|
13530
13531
|
html += '<div part="detail-head"><strong>'+complianceFields[i]+'</strong></div>'
|
|
13531
|
-
|
|
13532
|
+
for(let attachmentStr of event[complianceFields[i]]){
|
|
13533
|
+
let attachment = JSON.parse( attachmentStr + "");
|
|
13534
|
+
html += `<sf-i-uploader class="event-attachment" max="10" apiid="1peg5170d3" allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]" prepopulatedInputArr="${JSON.stringify([{"key":attachment.key,"ext":attachment.ext}]).replace(/"/g,'"')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
|
|
13535
|
+
}
|
|
13532
13536
|
html += '</div>';
|
|
13533
13537
|
}
|
|
13534
13538
|
} else {
|
|
@@ -22492,7 +22496,7 @@ export class SfIEvents extends LitElement {
|
|
|
22492
22496
|
}
|
|
22493
22497
|
|
|
22494
22498
|
uploadAudit = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "events") => {
|
|
22495
|
-
let url = "https://"+this.apiId+"/
|
|
22499
|
+
let url = "https://"+this.apiId+"/uploadaudit1";
|
|
22496
22500
|
|
|
22497
22501
|
const body = {
|
|
22498
22502
|
"mmddyyyy": mmddyyyy,
|
|
@@ -22539,7 +22543,7 @@ export class SfIEvents extends LitElement {
|
|
|
22539
22543
|
return retValue;
|
|
22540
22544
|
}
|
|
22541
22545
|
uploadAuditsBulk = async (bulkBody: any) => {
|
|
22542
|
-
let url = "https://"+this.apiId+"/
|
|
22546
|
+
let url = "https://"+this.apiId+"/uploadauditsbulk1";
|
|
22543
22547
|
|
|
22544
22548
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22545
22549
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
@@ -22562,7 +22566,7 @@ export class SfIEvents extends LitElement {
|
|
|
22562
22566
|
}
|
|
22563
22567
|
|
|
22564
22568
|
uploadReview = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, approved: any, module: string = "events") => {
|
|
22565
|
-
let url = "https://"+this.apiId+"/
|
|
22569
|
+
let url = "https://"+this.apiId+"/uploadreview1";
|
|
22566
22570
|
|
|
22567
22571
|
const body = {
|
|
22568
22572
|
"mmddyyyy": mmddyyyy,
|
|
@@ -22637,7 +22641,7 @@ export class SfIEvents extends LitElement {
|
|
|
22637
22641
|
}
|
|
22638
22642
|
}
|
|
22639
22643
|
uploadReviewsBulk = async (bulkBody: any) => {
|
|
22640
|
-
let url = "https://"+this.apiId+"/
|
|
22644
|
+
let url = "https://"+this.apiId+"/uploadreviewsbulk1";
|
|
22641
22645
|
|
|
22642
22646
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22643
22647
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
@@ -22662,7 +22666,7 @@ export class SfIEvents extends LitElement {
|
|
|
22662
22666
|
}
|
|
22663
22667
|
|
|
22664
22668
|
uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "events", percentage: string = "100", makercheckers: any) => {
|
|
22665
|
-
let url = "https://"+this.apiId+"/
|
|
22669
|
+
let url = "https://"+this.apiId+"/uploadreport3";
|
|
22666
22670
|
|
|
22667
22671
|
let body = {
|
|
22668
22672
|
"mmddyyyy": mmddyyyy,
|
|
@@ -22724,7 +22728,7 @@ export class SfIEvents extends LitElement {
|
|
|
22724
22728
|
}
|
|
22725
22729
|
|
|
22726
22730
|
uploadReportsBulk = async (bulkBody: any, showSuccess: boolean = true) => {
|
|
22727
|
-
let url = "https://"+this.apiId+"/
|
|
22731
|
+
let url = "https://"+this.apiId+"/uploadreportsbulk3"
|
|
22728
22732
|
|
|
22729
22733
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
22730
22734
|
const xhr : any = (await this.prepareXhr(bulkBody, url, this._SfLoader, authorization)) as any;
|
|
@@ -23120,7 +23124,7 @@ export class SfIEvents extends LitElement {
|
|
|
23120
23124
|
|
|
23121
23125
|
fetchDeleteReview = async (eventId: string, mmddyyyy: string, entityId: string, locationId: string) => {
|
|
23122
23126
|
|
|
23123
|
-
let url = "https://"+this.apiId+"/
|
|
23127
|
+
let url = "https://"+this.apiId+"/deletereview1";
|
|
23124
23128
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
23125
23129
|
const xhr : any = (await this.prepareXhr({"projectid": this.projectId, "entityid": entityId, "locationid": locationId, "mmddyyyy": mmddyyyy, "eventid": eventId, }, url, this._SfLoader, authorization)) as any;
|
|
23126
23130
|
this._SfLoader.innerHTML = '';
|
|
@@ -24263,7 +24267,7 @@ export class SfIEvents extends LitElement {
|
|
|
24263
24267
|
view = "entity";
|
|
24264
24268
|
}
|
|
24265
24269
|
|
|
24266
|
-
path = "
|
|
24270
|
+
path = "getallcountryevents2";
|
|
24267
24271
|
|
|
24268
24272
|
let sDate = "";
|
|
24269
24273
|
let eDate = "";
|
|
@@ -24474,7 +24478,7 @@ export class SfIEvents extends LitElement {
|
|
|
24474
24478
|
this.edate = endDate;
|
|
24475
24479
|
|
|
24476
24480
|
|
|
24477
|
-
path = "
|
|
24481
|
+
path = "getstatistics1";
|
|
24478
24482
|
|
|
24479
24483
|
let sDate = "";
|
|
24480
24484
|
let eDate = "";
|
|
@@ -25120,7 +25124,7 @@ export class SfIEvents extends LitElement {
|
|
|
25120
25124
|
|
|
25121
25125
|
//this.apiBodyList = '{"id": "' +(this._SfProject[0].querySelector('#sf-i-project') as SfIForm).selectedValues()[0]+ '"}'
|
|
25122
25126
|
this.nextPage = page;
|
|
25123
|
-
let url = "https://"+this.apiId+"/
|
|
25127
|
+
let url = "https://"+this.apiId+"/getnextuserevents1";
|
|
25124
25128
|
let statusArr: string[] = []
|
|
25125
25129
|
if(status == this.TAB_ALL){
|
|
25126
25130
|
statusArr = [this.STATUS_NOT_STARTED, this.STATUS_PENDING_APPROVAL, this.STATUS_REJECTED, this.STATUS_APPROVED]
|
|
@@ -25793,7 +25797,7 @@ export class SfIEvents extends LitElement {
|
|
|
25793
25797
|
day = '0' + day;
|
|
25794
25798
|
let eDate = month + "/" + day + "/" + year
|
|
25795
25799
|
let urlBody :any = {"projectid": this.projectId, "userprofileid": this.userProfileId, "role": this.myRole, "entityid": complianceEntityId, "countryid": "", "functionid": "", "locationid": complianceLocationId, "tagid": this.tagId, "adhoc": "false", "exclusivestartkey": 0, "sdate": sDate, "edate": eDate, "view": "location", "year": this.calendarStartYYYY};
|
|
25796
|
-
let url = "https://"+this.apiId+"/
|
|
25800
|
+
let url = "https://"+this.apiId+"/getallcountryevents2";
|
|
25797
25801
|
const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
|
|
25798
25802
|
const xhr : any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
|
|
25799
25803
|
this._SfLoader.innerHTML = '';
|
|
@@ -25886,7 +25890,7 @@ export class SfIEvents extends LitElement {
|
|
|
25886
25890
|
console.log('fetching compliances', sortid)
|
|
25887
25891
|
let complianceEntityId = sortid.split(';')[1]
|
|
25888
25892
|
let complianceLocationId = sortid.split(';')[2]
|
|
25889
|
-
let url = "https://"+this.apiId+"/
|
|
25893
|
+
let url = "https://"+this.apiId+"/getallcountryevents2";
|
|
25890
25894
|
let sDateObj = selectedDate
|
|
25891
25895
|
sDateObj.setDate(selectedDate.getDate() - 60)
|
|
25892
25896
|
let day = '' + sDateObj.getDate();
|