sf-i-events 1.0.696 → 1.0.697
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 +4 -4
- package/package.json +1 -1
- package/sf-i-events.js +36 -10
- package/src/sf-i-events.ts +29 -0
package/dev/index.html
CHANGED
|
@@ -693,7 +693,7 @@
|
|
|
693
693
|
</div>
|
|
694
694
|
|
|
695
695
|
</sf-i-events> -->
|
|
696
|
-
|
|
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="undefined" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410" 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>
|
|
@@ -702,7 +702,7 @@
|
|
|
702
702
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
703
703
|
</div>
|
|
704
704
|
|
|
705
|
-
</sf-i-events>
|
|
705
|
+
</sf-i-events>
|
|
706
706
|
|
|
707
707
|
<!-- <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="hrushi.mehendale@gmail.com" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance" apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile" disablesignoff="yes" disableclientresponse="yes">
|
|
708
708
|
|
|
@@ -744,7 +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
|
+
<!-- <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
748
|
|
|
749
749
|
<div slot="uploader">
|
|
750
750
|
<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>
|
|
@@ -753,7 +753,7 @@
|
|
|
753
753
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
754
754
|
</div>
|
|
755
755
|
|
|
756
|
-
</sf-i-events>
|
|
756
|
+
</sf-i-events> -->
|
|
757
757
|
<!--
|
|
758
758
|
<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
759
|
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -6360,7 +6360,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6360
6360
|
}
|
|
6361
6361
|
};
|
|
6362
6362
|
this.renderEventDetail = (event, mmddyyyy, currentColumnButton) => {
|
|
6363
|
-
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
6363
|
+
var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
6364
6364
|
console.log('event details', event, mmddyyyy, currentColumnButton == null ? "null currentColumnButton" : currentColumnButton.id);
|
|
6365
6365
|
let comments, docs, approved, dateOfCompletion, makercheckers, docsOptional, documentType;
|
|
6366
6366
|
let entityId = "";
|
|
@@ -6370,6 +6370,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6370
6370
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1];
|
|
6371
6371
|
entityId = event.entityid;
|
|
6372
6372
|
locationId = event.locationid;
|
|
6373
|
+
let completeness = this.getCompletenessStatus(event);
|
|
6373
6374
|
comments = event['comments'] == null ? [] : (event['comments']);
|
|
6374
6375
|
docs = event['documents'] == null ? [] : event['documents'] == null ? [] : (event['documents']);
|
|
6375
6376
|
approved = event['approved'] == null ? false : event['approved'] == null ? false : event['approved'];
|
|
@@ -6661,6 +6662,9 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6661
6662
|
html += '<br />';
|
|
6662
6663
|
if (makercheckers.length > 0) {
|
|
6663
6664
|
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>';
|
|
6665
|
+
if (completeness == "pending-approval" && this.enableDeleteLatestReport) {
|
|
6666
|
+
html += '<div part="td-head" class="td-head d-flex justify-center align-center"><button class="mt-5 button-delete" part="button" id="button-auto-approve">Auto Approve</button></div>';
|
|
6667
|
+
}
|
|
6664
6668
|
}
|
|
6665
6669
|
html += '</div>';
|
|
6666
6670
|
html += '</div>';
|
|
@@ -6803,11 +6807,33 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6803
6807
|
});
|
|
6804
6808
|
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
6805
6809
|
});
|
|
6806
|
-
(_c = this._SfDetailContainer.querySelector('#button-
|
|
6810
|
+
(_c = this._SfDetailContainer.querySelector('#button-auto-approve')) === null || _c === void 0 ? void 0 : _c.addEventListener('click', async () => {
|
|
6811
|
+
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true);
|
|
6812
|
+
this.setSuccess('Auto-Approved successfully!');
|
|
6813
|
+
setTimeout(() => {
|
|
6814
|
+
this.clearMessages();
|
|
6815
|
+
}, 3000);
|
|
6816
|
+
//console.log('deleted', resultDelete);
|
|
6817
|
+
if (this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
6818
|
+
this.processDateSelection(this._SfCustomContainer);
|
|
6819
|
+
}
|
|
6820
|
+
else {
|
|
6821
|
+
if (currentColumnButton != null) {
|
|
6822
|
+
currentColumnButton.click();
|
|
6823
|
+
}
|
|
6824
|
+
}
|
|
6825
|
+
var clickEvent = new MouseEvent("click", {
|
|
6826
|
+
"view": window,
|
|
6827
|
+
"bubbles": true,
|
|
6828
|
+
"cancelable": false
|
|
6829
|
+
});
|
|
6830
|
+
this._SfDetailContainer.querySelector('#button-detail-close').dispatchEvent(clickEvent);
|
|
6831
|
+
});
|
|
6832
|
+
(_f = this._SfDetailContainer.querySelector('#button-detail-close')) === null || _f === void 0 ? void 0 : _f.addEventListener('click', () => {
|
|
6807
6833
|
this._SfDetailContainer.innerHTML = '';
|
|
6808
6834
|
this._SfDetailContainer.style.display = 'none';
|
|
6809
6835
|
});
|
|
6810
|
-
(
|
|
6836
|
+
(_g = this._SfDetailContainer.querySelector('.head-basic')) === null || _g === void 0 ? void 0 : _g.addEventListener('click', () => {
|
|
6811
6837
|
//console.log('head basic clicked', ((this._SfDetailContainer as HTMLDivElement).querySelector('.body-basic') as HTMLDivElement).style.display);
|
|
6812
6838
|
if (this._SfDetailContainer.querySelector('.body-basic').style.display == 'flex' || this._SfDetailContainer.querySelector('.body-basic').style.display == '') {
|
|
6813
6839
|
this._SfDetailContainer.querySelector('.body-basic').style.display = 'none';
|
|
@@ -6818,7 +6844,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6818
6844
|
this._SfDetailContainer.querySelector('.head-indicator-basic').innerHTML = '-';
|
|
6819
6845
|
}
|
|
6820
6846
|
});
|
|
6821
|
-
(
|
|
6847
|
+
(_h = this._SfDetailContainer.querySelector('.head-statute')) === null || _h === void 0 ? void 0 : _h.addEventListener('click', () => {
|
|
6822
6848
|
//console.log('head statute clicked', ((this._SfDetailContainer as HTMLDivElement).querySelector('.body-statute') as HTMLDivElement).style.display);
|
|
6823
6849
|
if (this._SfDetailContainer.querySelector('.body-statute').style.display == 'flex' || this._SfDetailContainer.querySelector('.body-statute').style.display == '') {
|
|
6824
6850
|
this._SfDetailContainer.querySelector('.body-statute').style.display = 'none';
|
|
@@ -6829,7 +6855,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6829
6855
|
this._SfDetailContainer.querySelector('.head-indicator-statute').innerHTML = '-';
|
|
6830
6856
|
}
|
|
6831
6857
|
});
|
|
6832
|
-
(
|
|
6858
|
+
(_j = this._SfDetailContainer.querySelector('.head-compliance')) === null || _j === void 0 ? void 0 : _j.addEventListener('click', () => {
|
|
6833
6859
|
if (this._SfDetailContainer.querySelector('.body-compliance').style.display == 'flex' || this._SfDetailContainer.querySelector('.body-compliance').style.display == '') {
|
|
6834
6860
|
this._SfDetailContainer.querySelector('.body-compliance').style.display = 'none';
|
|
6835
6861
|
this._SfDetailContainer.querySelector('.head-indicator-compliance').innerHTML = '+';
|
|
@@ -6839,7 +6865,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6839
6865
|
this._SfDetailContainer.querySelector('.head-indicator-compliance').innerHTML = '-';
|
|
6840
6866
|
}
|
|
6841
6867
|
});
|
|
6842
|
-
(
|
|
6868
|
+
(_k = this._SfDetailContainer.querySelector('.head-grc')) === null || _k === void 0 ? void 0 : _k.addEventListener('click', () => {
|
|
6843
6869
|
if (this._SfDetailContainer.querySelector('.body-grc').style.display == 'flex' || this._SfDetailContainer.querySelector('.body-grc').style.display == '') {
|
|
6844
6870
|
this._SfDetailContainer.querySelector('.body-grc').style.display = 'none';
|
|
6845
6871
|
this._SfDetailContainer.querySelector('.head-indicator-grc').innerHTML = '+';
|
|
@@ -6850,7 +6876,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6850
6876
|
}
|
|
6851
6877
|
});
|
|
6852
6878
|
if (this.mode == "consumer" || this.mode == "next") {
|
|
6853
|
-
(
|
|
6879
|
+
(_l = this._SfDetailContainer.querySelector('#button-uploader-submit-approve')) === null || _l === void 0 ? void 0 : _l.addEventListener('click', async () => {
|
|
6854
6880
|
const comments = this._SfDetailContainer.querySelector('#input-approver-comments').value;
|
|
6855
6881
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
6856
6882
|
var clickEvent = new MouseEvent("click", {
|
|
@@ -6943,7 +6969,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
6943
6969
|
}
|
|
6944
6970
|
}
|
|
6945
6971
|
});
|
|
6946
|
-
(
|
|
6972
|
+
(_m = this._SfDetailContainer.querySelector('#button-uploader-submit-audit')) === null || _m === void 0 ? void 0 : _m.addEventListener('click', async () => {
|
|
6947
6973
|
const comments = this._SfDetailContainer.querySelector('#input-auditor-comments').value;
|
|
6948
6974
|
const approved = this._SfDetailContainer.querySelector('#input-approve-yes').checked;
|
|
6949
6975
|
if (comments.trim().length === 0) {
|
|
@@ -7042,7 +7068,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7042
7068
|
else {
|
|
7043
7069
|
if (this._SfDetailContainer.querySelector('#button-uploader-submit-report') != null) {
|
|
7044
7070
|
this._SfDetailContainer.querySelector('#button-uploader-submit-report').style.visibility = 'visible';
|
|
7045
|
-
(
|
|
7071
|
+
(_o = this._SfDetailContainer.querySelector('#button-uploader-submit-report')) === null || _o === void 0 ? void 0 : _o.addEventListener('click', async () => {
|
|
7046
7072
|
var _a, _b;
|
|
7047
7073
|
const reportercomments = this._SfDetailContainer.querySelector('#input-reporter-comments').value;
|
|
7048
7074
|
//console.log('reporter comments 1', reportercomments);
|
|
@@ -7292,7 +7318,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
7292
7318
|
}
|
|
7293
7319
|
this.fetchStatuteDefinitionDetails(statuteName);
|
|
7294
7320
|
if (event['reportformat'] != null && event['reportformat'].length > 0) {
|
|
7295
|
-
this.fetchReportFormat(reportformatName, (
|
|
7321
|
+
this.fetchReportFormat(reportformatName, (_p = event['reportformatschema']) !== null && _p !== void 0 ? _p : "", (_q = event['reportformatvalues']) !== null && _q !== void 0 ? _q : "");
|
|
7296
7322
|
}
|
|
7297
7323
|
};
|
|
7298
7324
|
this.renderCalendar = () => {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -9602,6 +9602,7 @@ export class SfIEvents extends LitElement {
|
|
|
9602
9602
|
let mmdd = mmddyyyy.split('/')[0] + '/' + mmddyyyy.split('/')[1]
|
|
9603
9603
|
entityId = event.entityid;
|
|
9604
9604
|
locationId = event.locationid;
|
|
9605
|
+
let completeness = this.getCompletenessStatus(event);
|
|
9605
9606
|
comments = event['comments'] == null ? [] : (event['comments']);
|
|
9606
9607
|
docs = event['documents'] == null ? [] : event['documents'] == null ? [] : (event['documents']);
|
|
9607
9608
|
approved = event['approved'] == null ? false : event['approved'] == null ? false : event['approved'];
|
|
@@ -9972,6 +9973,10 @@ export class SfIEvents extends LitElement {
|
|
|
9972
9973
|
html += '<br />';
|
|
9973
9974
|
if(makercheckers.length > 0) {
|
|
9974
9975
|
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>';
|
|
9976
|
+
|
|
9977
|
+
if(completeness == "pending-approval" && this.enableDeleteLatestReport) {
|
|
9978
|
+
html += '<div part="td-head" class="td-head d-flex justify-center align-center"><button class="mt-5 button-delete" part="button" id="button-auto-approve">Auto Approve</button></div>';
|
|
9979
|
+
}
|
|
9975
9980
|
}
|
|
9976
9981
|
html += '</div>';
|
|
9977
9982
|
html += '</div>';
|
|
@@ -10149,6 +10154,30 @@ export class SfIEvents extends LitElement {
|
|
|
10149
10154
|
});
|
|
10150
10155
|
((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement)!.dispatchEvent(clickEvent);
|
|
10151
10156
|
|
|
10157
|
+
});
|
|
10158
|
+
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-auto-approve')?.addEventListener('click', async () => {
|
|
10159
|
+
|
|
10160
|
+
await this.uploadReview(entityId, locationId, mmddyyyy, event["id"], "Auto approved", true);
|
|
10161
|
+
this.setSuccess('Auto-Approved successfully!')
|
|
10162
|
+
setTimeout(() => {
|
|
10163
|
+
this.clearMessages()
|
|
10164
|
+
}, 3000);
|
|
10165
|
+
//console.log('deleted', resultDelete);
|
|
10166
|
+
if(this.getCurrentTab() == this.TAB_CUSTOM) {
|
|
10167
|
+
this.processDateSelection((this._SfCustomContainer as HTMLDivElement));
|
|
10168
|
+
} else {
|
|
10169
|
+
if(currentColumnButton != null) {
|
|
10170
|
+
currentColumnButton.click();
|
|
10171
|
+
}
|
|
10172
|
+
}
|
|
10173
|
+
|
|
10174
|
+
var clickEvent = new MouseEvent("click", {
|
|
10175
|
+
"view": window,
|
|
10176
|
+
"bubbles": true,
|
|
10177
|
+
"cancelable": false
|
|
10178
|
+
});
|
|
10179
|
+
((this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close') as HTMLButtonElement)!.dispatchEvent(clickEvent);
|
|
10180
|
+
|
|
10152
10181
|
});
|
|
10153
10182
|
|
|
10154
10183
|
(this._SfDetailContainer as HTMLDivElement).querySelector('#button-detail-close')?.addEventListener('click', () => {
|