sf-i-events 1.0.1069 → 1.0.1071
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 +10 -32
- package/package.json +1 -1
- package/sf-i-events.js +31 -11
- package/src/sf-i-events.ts +42 -15
package/dev/index.html
CHANGED
|
@@ -893,36 +893,6 @@
|
|
|
893
893
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile"
|
|
894
894
|
disablesignoff="yes" disableclientresponse="yes">
|
|
895
895
|
|
|
896
|
-
</sf-i-events> -->
|
|
897
|
-
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api" mode="consumer"
|
|
898
|
-
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
899
|
-
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
900
|
-
apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
|
|
901
|
-
apiidnotices="gghnbi7hku2qj5twrea6xxcaya0aqeis.lambda-url.us-east-1.on.aws"
|
|
902
|
-
apiidagreements="swago3unro2te55ikvjuqwcrr40wluqh.lambda-url.us-east-1.on.aws"
|
|
903
|
-
apiidlicenses="lbtsbsctcdsyah4qdszkv4rctq0tnvel.lambda-url.us-east-1.on.aws"
|
|
904
|
-
apiidrcmresources="jra3sghasmaxn5aiq7rtv6pjzq0oeuaw.lambda-url.us-east-1.on.aws" fill="solid"
|
|
905
|
-
username="Local Reporter 1" userprofileid="e9684b5d-ddbc-46d3-ae07-51706bf75410"
|
|
906
|
-
projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global"
|
|
907
|
-
entityid="c989a44e-7d3d-427e-b712-90eacf585075" locationid="38dc8c53-643f-4fee-83fe-f15239606277"
|
|
908
|
-
selectedcriteria="Location - Mumbai" myrole="reporter" showregisterexport="false"
|
|
909
|
-
features="["notices","contracts","licenses","rcmresources"]"
|
|
910
|
-
eventfielddependencies="[{"type": "foreignkey", "parent": "country", "child": "state"},{"type": "foreignkey", "parent": "category", "child": "subcategory"},{"type": "foreignkey", "parent": "frequency", "child": "subfrequency"}]"
|
|
911
|
-
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"}]"
|
|
912
|
-
eventpreviewfields="["obligation"]"
|
|
913
|
-
eventhidefields="["comments","documents","lastupdated","approved","tags"]"
|
|
914
|
-
calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2025">
|
|
915
|
-
|
|
916
|
-
<div slot="uploader">
|
|
917
|
-
<sf-i-uploader id="uploader" max="10" apiid="1peg5170d3"
|
|
918
|
-
allowedextensions="["jpg","png","pdf","xls","xlsx","doc","docx"]"
|
|
919
|
-
extract="yes" projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" maxsize="31457280"
|
|
920
|
-
allowdownload="yes"></sf-i-uploader>
|
|
921
|
-
</div>
|
|
922
|
-
<div slot="reporting">
|
|
923
|
-
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
924
|
-
</div>
|
|
925
|
-
|
|
926
896
|
</sf-i-events> -->
|
|
927
897
|
|
|
928
898
|
<!-- <sf-i-events projectid="5a05b884-d7ed-4f63-b623-4d305ea2cfd6" projectname="Standard Radiators Private Limited"
|
|
@@ -1213,6 +1183,14 @@
|
|
|
1213
1183
|
</div>
|
|
1214
1184
|
|
|
1215
1185
|
</sf-i-events> -->
|
|
1186
|
+
<sf-i-events projectid="a40e4c8f-f95f-4e14-b8b2-ddcc12f56de0" projectname="Japfa" mode="onboarding" locations="{}"
|
|
1187
|
+
contractstartdate="23/12/2025" apiid="api2.flagggrc.tech/event-api" username="ninad.t@flagggrc.tech"
|
|
1188
|
+
apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
|
|
1189
|
+
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile"
|
|
1190
|
+
apiidmodules="4ejumlje4owzzcvlnndedwbpte0wpkou.lambda-url.us-east-1.on.aws" disablesignoff="yes"
|
|
1191
|
+
disableclientresponse="yes">
|
|
1192
|
+
|
|
1193
|
+
</sf-i-events>
|
|
1216
1194
|
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1217
1195
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1218
1196
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
@@ -1350,7 +1328,7 @@
|
|
|
1350
1328
|
</div>
|
|
1351
1329
|
|
|
1352
1330
|
</sf-i-events> -->
|
|
1353
|
-
<sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1331
|
+
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1354
1332
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1355
1333
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
|
1356
1334
|
apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
|
|
@@ -1381,7 +1359,7 @@
|
|
|
1381
1359
|
<sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
|
|
1382
1360
|
</div>
|
|
1383
1361
|
|
|
1384
|
-
</sf-i-events>
|
|
1362
|
+
</sf-i-events> -->
|
|
1385
1363
|
<!-- <sf-i-events name="Calendar" apiid="api2.flagggrc.tech/event-api"
|
|
1386
1364
|
apiid2="3mefupehxkw4pwsq3oyk7lf2pq0pisdx.lambda-url.us-east-1.on.aws" mode="consumer"
|
|
1387
1365
|
apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
|
package/package.json
CHANGED
package/sf-i-events.js
CHANGED
|
@@ -8651,7 +8651,7 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
8651
8651
|
html += '<span class="mt-10 pt-10 pb-10 mr-10 ml-10" part="ad-hoc-review-message">Please review the questions. Click yes to trigger associated ad hoc compliances wherever applicable. Click the finished button after you have completed the review.</span>';
|
|
8652
8652
|
html += '<button part="button-mark-adhoc-reviewed" id="radio-mark-reviewed" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10">I have completed the review</button>';
|
|
8653
8653
|
html += '</div>';
|
|
8654
|
-
|
|
8654
|
+
html += '<button part="button-lg-short" id="radio-submit" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10"><span class="material-symbols-outlined">bolt</span> <span>Trigger</span></button>';
|
|
8655
8655
|
}
|
|
8656
8656
|
else {
|
|
8657
8657
|
html += '<button part="button-lg-short" id="radio-submit" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10"><span class="material-symbols-outlined">bolt</span> <span>Trigger</span></button>';
|
|
@@ -19890,15 +19890,24 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
19890
19890
|
});
|
|
19891
19891
|
};
|
|
19892
19892
|
this.getAllPastFiscals = (startDate) => {
|
|
19893
|
-
|
|
19893
|
+
const retArr = [];
|
|
19894
|
+
// Normalize startDate to its fiscal year start
|
|
19895
|
+
const startFY = new Date(startDate);
|
|
19896
|
+
startFY.setDate(1);
|
|
19897
|
+
startFY.setMonth(3); // April
|
|
19898
|
+
if (startDate.getMonth() < 3) {
|
|
19899
|
+
startFY.setFullYear(startFY.getFullYear() - 1);
|
|
19900
|
+
}
|
|
19901
|
+
// Current fiscal year anchor
|
|
19894
19902
|
let date = new Date();
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19903
|
+
date.setDate(1);
|
|
19904
|
+
date.setMonth(3);
|
|
19905
|
+
// If today is before April, shift to last FY start
|
|
19906
|
+
if (new Date().getMonth() < 3) {
|
|
19907
|
+
date.setFullYear(date.getFullYear() - 1);
|
|
19908
|
+
}
|
|
19909
|
+
while (date.getTime() >= startFY.getTime()) {
|
|
19910
|
+
retArr.push(date.getFullYear());
|
|
19902
19911
|
date.setFullYear(date.getFullYear() - 1);
|
|
19903
19912
|
}
|
|
19904
19913
|
return retArr;
|
|
@@ -20682,8 +20691,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
20682
20691
|
}
|
|
20683
20692
|
let pastFiscals = [parseInt(this.getCurrentYearGeneric())];
|
|
20684
20693
|
if (this.contractStartDate != null) {
|
|
20685
|
-
|
|
20694
|
+
console.log('contractStartDate', this.contractStartDate);
|
|
20695
|
+
let startDD = this.contractStartDate.split('/')[0];
|
|
20696
|
+
let startMM = this.contractStartDate.split('/')[1];
|
|
20697
|
+
let startYYYY = this.contractStartDate.split('/')[2];
|
|
20698
|
+
pastFiscals = this.getAllPastFiscals(new Date(startMM + '/' + startDD + '/' + startYYYY));
|
|
20686
20699
|
}
|
|
20700
|
+
console.log('pastFiscals', pastFiscals);
|
|
20687
20701
|
html += (`<div class="left-sticky d-flex justify-between align-center mr-10"><h4 id="mapped-stats-title" part="results-title" class="d-flex align-center m-0">${status} ${tagged} in Suspense List out of ${sourceArray.data.mappings.mappings.length}</h4><h6 class="ml-20" part="onboarding-suspense-year-label">Year</h6><select id="select-year" part="input">${pastFiscals.map((fiscal) => {
|
|
20688
20702
|
return `<option value="${fiscal}"${fiscal == parseInt(year) ? " selected" : ""}>${fiscal}-${(fiscal % 100) + 1}</option>`;
|
|
20689
20703
|
})}</select></div>`);
|
|
@@ -27862,7 +27876,13 @@ let SfIEvents = class SfIEvents extends LitElement {
|
|
|
27862
27876
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
27863
27877
|
console.log('jsonRespose', jsonRespose);
|
|
27864
27878
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
27865
|
-
|
|
27879
|
+
let tempEvents = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
27880
|
+
for (let mmdd of Object.keys(tempEvents)) {
|
|
27881
|
+
tempEvents[mmdd] = tempEvents[mmdd].sort((a, b) => {
|
|
27882
|
+
return a.obligationtitle.localeCompare(b.obligationtitle);
|
|
27883
|
+
});
|
|
27884
|
+
}
|
|
27885
|
+
this.events = tempEvents;
|
|
27866
27886
|
}
|
|
27867
27887
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete);
|
|
27868
27888
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
package/src/sf-i-events.ts
CHANGED
|
@@ -10039,7 +10039,7 @@ export class SfIEvents extends LitElement {
|
|
|
10039
10039
|
if (meta != null) {
|
|
10040
10040
|
this.renderStatisticsFilters((this._SfCustomContainer as HTMLDivElement))
|
|
10041
10041
|
if (this.statisticsLoadLocation && this.locationId != "") {
|
|
10042
|
-
|
|
10042
|
+
|
|
10043
10043
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement).value = 'location';
|
|
10044
10044
|
((this._SfCustomContainer as HTMLDivElement).querySelector('#select-filter-criteria') as HTMLSelectElement).dispatchEvent(new Event('change'))
|
|
10045
10045
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
@@ -11697,7 +11697,7 @@ export class SfIEvents extends LitElement {
|
|
|
11697
11697
|
html += '<span class="mt-10 pt-10 pb-10 mr-10 ml-10" part="ad-hoc-review-message">Please review the questions. Click yes to trigger associated ad hoc compliances wherever applicable. Click the finished button after you have completed the review.</span>'
|
|
11698
11698
|
html += '<button part="button-mark-adhoc-reviewed" id="radio-mark-reviewed" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10">I have completed the review</button>'
|
|
11699
11699
|
html += '</div>'
|
|
11700
|
-
|
|
11700
|
+
html += '<button part="button-lg-short" id="radio-submit" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10"><span class="material-symbols-outlined">bolt</span> <span>Trigger</span></button>';
|
|
11701
11701
|
} else {
|
|
11702
11702
|
html += '<button part="button-lg-short" id="radio-submit" class="d-flex align-center mt-10 pt-10 pb-10 mr-10 ml-10"><span class="material-symbols-outlined">bolt</span> <span>Trigger</span></button>';
|
|
11703
11703
|
}
|
|
@@ -24888,18 +24888,34 @@ export class SfIEvents extends LitElement {
|
|
|
24888
24888
|
}
|
|
24889
24889
|
|
|
24890
24890
|
getAllPastFiscals = (startDate: Date) => {
|
|
24891
|
-
|
|
24892
|
-
|
|
24893
|
-
|
|
24894
|
-
|
|
24895
|
-
|
|
24896
|
-
|
|
24897
|
-
|
|
24898
|
-
|
|
24899
|
-
|
|
24891
|
+
const retArr: number[] = [];
|
|
24892
|
+
|
|
24893
|
+
// Normalize startDate to its fiscal year start
|
|
24894
|
+
const startFY = new Date(startDate);
|
|
24895
|
+
startFY.setDate(1);
|
|
24896
|
+
startFY.setMonth(3); // April
|
|
24897
|
+
|
|
24898
|
+
if (startDate.getMonth() < 3) {
|
|
24899
|
+
startFY.setFullYear(startFY.getFullYear() - 1);
|
|
24900
24900
|
}
|
|
24901
|
+
|
|
24902
|
+
// Current fiscal year anchor
|
|
24903
|
+
let date = new Date();
|
|
24904
|
+
date.setDate(1);
|
|
24905
|
+
date.setMonth(3);
|
|
24906
|
+
|
|
24907
|
+
// If today is before April, shift to last FY start
|
|
24908
|
+
if (new Date().getMonth() < 3) {
|
|
24909
|
+
date.setFullYear(date.getFullYear() - 1);
|
|
24910
|
+
}
|
|
24911
|
+
|
|
24912
|
+
while (date.getTime() >= startFY.getTime()) {
|
|
24913
|
+
retArr.push(date.getFullYear());
|
|
24914
|
+
date.setFullYear(date.getFullYear() - 1);
|
|
24915
|
+
}
|
|
24916
|
+
|
|
24901
24917
|
return retArr;
|
|
24902
|
-
}
|
|
24918
|
+
};
|
|
24903
24919
|
|
|
24904
24920
|
renderOnboardingGovUsers = (sourceLocationsArray: any, mappedModuleUsers: any, changedIndices: number[] = []) => {
|
|
24905
24921
|
|
|
@@ -25777,8 +25793,13 @@ export class SfIEvents extends LitElement {
|
|
|
25777
25793
|
}
|
|
25778
25794
|
let pastFiscals = [parseInt(this.getCurrentYearGeneric())]
|
|
25779
25795
|
if (this.contractStartDate != null) {
|
|
25780
|
-
|
|
25796
|
+
console.log('contractStartDate', this.contractStartDate);
|
|
25797
|
+
let startDD = this.contractStartDate.split('/')[0]
|
|
25798
|
+
let startMM = this.contractStartDate.split('/')[1]
|
|
25799
|
+
let startYYYY = this.contractStartDate.split('/')[2]
|
|
25800
|
+
pastFiscals = this.getAllPastFiscals(new Date(startMM + '/' + startDD + '/' + startYYYY));
|
|
25781
25801
|
}
|
|
25802
|
+
console.log('pastFiscals', pastFiscals)
|
|
25782
25803
|
html += (`<div class="left-sticky d-flex justify-between align-center mr-10"><h4 id="mapped-stats-title" part="results-title" class="d-flex align-center m-0">${status} ${tagged} in Suspense List out of ${sourceArray.data.mappings.mappings.length}</h4><h6 class="ml-20" part="onboarding-suspense-year-label">Year</h6><select id="select-year" part="input">${pastFiscals.map((fiscal) => {
|
|
25783
25804
|
return `<option value="${fiscal}"${fiscal == parseInt(year) ? " selected" : ""}>${fiscal}-${(fiscal % 100) + 1}</option>`
|
|
25784
25805
|
})}</select></div>`);
|
|
@@ -34541,7 +34562,13 @@ export class SfIEvents extends LitElement {
|
|
|
34541
34562
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
34542
34563
|
console.log('jsonRespose', jsonRespose);
|
|
34543
34564
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
34544
|
-
|
|
34565
|
+
let tempEvents = await this.fetchPresignedUrl(jsonRespose.signedUrlGet);
|
|
34566
|
+
for (let mmdd of Object.keys(tempEvents)) {
|
|
34567
|
+
tempEvents[mmdd] = tempEvents[mmdd].sort((a: any, b: any) => {
|
|
34568
|
+
return a.obligationtitle.localeCompare(b.obligationtitle);
|
|
34569
|
+
});
|
|
34570
|
+
}
|
|
34571
|
+
this.events = tempEvents;
|
|
34545
34572
|
}
|
|
34546
34573
|
await this.fetchPresignedUrlDelete(jsonRespose.signedUrlDelete)
|
|
34547
34574
|
if (JSON.stringify(urlBody) == this.getallcountryevetsParams) {
|
|
@@ -35092,7 +35119,7 @@ export class SfIEvents extends LitElement {
|
|
|
35092
35119
|
let changeEvent = new CustomEvent('tokenExpired', { bubbles: true });
|
|
35093
35120
|
this.dispatchEvent(changeEvent);
|
|
35094
35121
|
}
|
|
35095
|
-
if(xhr.status != 200){
|
|
35122
|
+
if (xhr.status != 200) {
|
|
35096
35123
|
const jsonRespose = JSON.parse(xhr.responseText);
|
|
35097
35124
|
this.setError(jsonRespose.error);
|
|
35098
35125
|
}
|