sf-i-events 1.0.885 → 1.0.887

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 CHANGED
@@ -699,7 +699,7 @@
699
699
  <!-- <sf-i-events projectid="a81b6ae1-98de-4b72-8cf0-9aaee5b61891" projectname="Khaitan" mode="onboarding" locations="{}" contractstartdate="01/01/2025" 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">
700
700
 
701
701
  </sf-i-events> -->
702
- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
702
+ <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
703
703
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
704
704
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
705
705
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -726,7 +726,7 @@
726
726
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
727
727
  </div>
728
728
 
729
- </sf-i-events>
729
+ </sf-i-events> -->
730
730
  <!-- <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="[{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;country&quot;, &quot;child&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;category&quot;, &quot;child&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;foreignkey&quot;, &quot;parent&quot;: &quot;frequency&quot;, &quot;child&quot;: &quot;subfrequency&quot;}]" eventfields="[{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/riskarea&quot;, &quot;field&quot;: &quot;riskarea&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/jurisdiction&quot;, &quot;field&quot;: &quot;jurisdiction&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/updatetype&quot;, &quot;field&quot;: &quot;updatetype&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/country&quot;, &quot;field&quot;: &quot;country&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/specificity&quot;, &quot;field&quot;: &quot;specificity&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/risk&quot;, &quot;field&quot;: &quot;risk&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/frequency&quot;, &quot;field&quot;: &quot;frequency&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/category&quot;, &quot;field&quot;: &quot;category&quot;},{&quot;type&quot;: &quot;sf-i-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/obligationtype&quot;, &quot;field&quot;: &quot;obligationtype&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/state&quot;, &quot;field&quot;: &quot;state&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subfrequency&quot;, &quot;field&quot;: &quot;subfrequency&quot;},{&quot;type&quot;: &quot;sf-i-sub-select&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/subcategory&quot;, &quot;field&quot;: &quot;subcategory&quot;},{&quot;type&quot;: &quot;sf-i-form&quot;, &quot;apiId&quot;: &quot;dnytrdlrmxgsy.cloudfront.net/statute&quot;, &quot;field&quot;: &quot;statute&quot;, &quot;projectField&quot;: &quot;name&quot;}]" eventpreviewfields="[&quot;obligation&quot;]" eventhidefields="[&quot;comments&quot;,&quot;documents&quot;,&quot;lastupdated&quot;,&quot;approved&quot;,&quot;tags&quot;]" calendarstartdd="01" calendarstartmm="04" calendarstartyyyy="2024">
731
731
 
732
732
  <div slot="uploader">
@@ -757,7 +757,7 @@
757
757
  </div>
758
758
 
759
759
  </sf-i-events> -->
760
- <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
760
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
761
761
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
762
762
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
763
763
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -785,7 +785,7 @@
785
785
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
786
786
  </div>
787
787
 
788
- </sf-i-events> -->
788
+ </sf-i-events>
789
789
  <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
790
790
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
791
791
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.885",
4
+ "version": "1.0.887",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.js CHANGED
@@ -849,7 +849,7 @@ let SfIEvents = class SfIEvents extends LitElement {
849
849
 
850
850
  `;
851
851
  this.AUTOSAVE_FLAG = true;
852
- this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "entities", "locations", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"];
852
+ this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"];
853
853
  this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
854
854
  this.chartSelectedLegend = [];
855
855
  this.selectedFilters = null;
@@ -2888,7 +2888,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2888
2888
  };
2889
2889
  //(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton)
2890
2890
  this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton, fromDrilldown = false) => {
2891
- var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44;
2891
+ var _a, _b, _c, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45;
2892
2892
  var total = 0, notStarted = 0, approved = 0, pendingApproval = 0, rejected = 0, inTime = 0, pastDueDate = 0, lateExecuted = 0, lateApproved = 0, lateReported = 0, scheduled = 0, partiallyComplied = 0, notComplied = 0, complied = 0, compliedWithGaps = 0, reportedNonCompliance = 0, active = 0, aboutToExpire = 0, expired = 0, terminated = 0;
2893
2893
  var html = '';
2894
2894
  this.selectedItemIds = [];
@@ -3058,14 +3058,14 @@ let SfIEvents = class SfIEvents extends LitElement {
3058
3058
  csvValues += ('"' + ((((_p = ((_o = this.events[mmdd][j]["functionheads"]) !== null && _o !== void 0 ? _o : [])[0]) !== null && _p !== void 0 ? _p : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3059
3059
  csvValues += ('"' + (((_u = (_t = (_s = (_r = (_q = this.events) === null || _q === void 0 ? void 0 : _q[mmdd]) === null || _r === void 0 ? void 0 : _r[j]) === null || _s === void 0 ? void 0 : _s.statute) === null || _t === void 0 ? void 0 : _t.state) !== null && _u !== void 0 ? _u : "") + '",'));
3060
3060
  csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3061
- csvValues += ('"' + ((_z = (_y = (_x = (_w = (_v = this.events) === null || _v === void 0 ? void 0 : _v[mmdd]) === null || _w === void 0 ? void 0 : _w[j]) === null || _x === void 0 ? void 0 : _x.complianceobj) === null || _y === void 0 ? void 0 : _y.category) !== null && _z !== void 0 ? _z : "" + '",'));
3061
+ csvValues += ('"' + (((_z = (_y = (_x = (_w = (_v = this.events) === null || _v === void 0 ? void 0 : _v[mmdd]) === null || _w === void 0 ? void 0 : _w[j]) === null || _x === void 0 ? void 0 : _x.complianceobj) === null || _y === void 0 ? void 0 : _y.category) !== null && _z !== void 0 ? _z : "") + '",'));
3062
3062
  csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
3063
- csvValues += ('"' + (((_3 = (_2 = (_1 = (_0 = this.events) === null || _0 === void 0 ? void 0 : _0[mmdd]) === null || _1 === void 0 ? void 0 : _1[j]) === null || _2 === void 0 ? void 0 : _2.statute) === null || _3 === void 0 ? void 0 : _3.name) + '",'));
3063
+ csvValues += ('"' + (((_4 = (_3 = (_2 = (_1 = (_0 = this.events) === null || _0 === void 0 ? void 0 : _0[mmdd]) === null || _1 === void 0 ? void 0 : _1[j]) === null || _2 === void 0 ? void 0 : _2.statute) === null || _3 === void 0 ? void 0 : _3.name) !== null && _4 !== void 0 ? _4 : "") + '",'));
3064
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3064
3065
  csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
3065
3066
  csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
3066
3067
  csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
3067
- csvValues += ('"' + ((((_8 = (_7 = (_6 = (_5 = (_4 = this.events) === null || _4 === void 0 ? void 0 : _4[mmdd]) === null || _5 === void 0 ? void 0 : _5[j]) === null || _6 === void 0 ? void 0 : _6.complianceobj) === null || _7 === void 0 ? void 0 : _7.subfrequency) !== null && _8 !== void 0 ? _8 : "") + "").replace(/"/g, "") + '",'));
3068
- csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3068
+ csvValues += ('"' + ((((_9 = (_8 = (_7 = (_6 = (_5 = this.events) === null || _5 === void 0 ? void 0 : _5[mmdd]) === null || _6 === void 0 ? void 0 : _6[j]) === null || _7 === void 0 ? void 0 : _7.complianceobj) === null || _8 === void 0 ? void 0 : _8.subfrequency) !== null && _9 !== void 0 ? _9 : "") + "").replace(/"/g, "") + '",'));
3069
3069
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3070
3070
  csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3071
3071
  csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
@@ -3076,16 +3076,16 @@ let SfIEvents = class SfIEvents extends LitElement {
3076
3076
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3077
3077
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3078
3078
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3079
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + ((_13 = (_12 = (_11 = (_10 = (_9 = this.events) === null || _9 === void 0 ? void 0 : _9[mmdd]) === null || _10 === void 0 ? void 0 : _10[j]) === null || _11 === void 0 ? void 0 : _11.statute) === null || _12 === void 0 ? void 0 : _12.state) !== null && _13 !== void 0 ? _13 : "") + '</td>'
3079
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + ((_14 = (_13 = (_12 = (_11 = (_10 = this.events) === null || _10 === void 0 ? void 0 : _10[mmdd]) === null || _11 === void 0 ? void 0 : _11[j]) === null || _12 === void 0 ? void 0 : _12.statute) === null || _13 === void 0 ? void 0 : _13.state) !== null && _14 !== void 0 ? _14 : "") + '</td>'
3080
3080
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["jurisdiction"] + '</td>'
3081
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_18 = (_17 = (_16 = (_15 = (_14 = this.events) === null || _14 === void 0 ? void 0 : _14[mmdd]) === null || _15 === void 0 ? void 0 : _15[j]) === null || _16 === void 0 ? void 0 : _16.complianceobj) === null || _17 === void 0 ? void 0 : _17.category) !== null && _18 !== void 0 ? _18 : "") + '</td>'
3081
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_19 = (_18 = (_17 = (_16 = (_15 = this.events) === null || _15 === void 0 ? void 0 : _15[mmdd]) === null || _16 === void 0 ? void 0 : _16[j]) === null || _17 === void 0 ? void 0 : _17.complianceobj) === null || _18 === void 0 ? void 0 : _18.category) !== null && _19 !== void 0 ? _19 : "") + '</td>'
3082
3082
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["subcategory"] + '</td>'
3083
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_23 = (_22 = (_21 = (_20 = (_19 = this.events) === null || _19 === void 0 ? void 0 : _19[mmdd]) === null || _20 === void 0 ? void 0 : _20[j]) === null || _21 === void 0 ? void 0 : _21.statute) === null || _22 === void 0 ? void 0 : _22.name) !== null && _23 !== void 0 ? _23 : "") + '</td>'
3083
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_24 = (_23 = (_22 = (_21 = (_20 = this.events) === null || _20 === void 0 ? void 0 : _20[mmdd]) === null || _21 === void 0 ? void 0 : _21[j]) === null || _22 === void 0 ? void 0 : _22.statute) === null || _23 === void 0 ? void 0 : _23.name) !== null && _24 !== void 0 ? _24 : "") + '</td>'
3084
3084
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["obligationtype"] + '</td>'
3085
3085
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["risk"] + '</td>'
3086
3086
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["riskarea"] + '</td>'
3087
3087
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["frequency"] + '</td>'
3088
- + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (((_28 = (_27 = (_26 = (_25 = (_24 = this.events) === null || _24 === void 0 ? void 0 : _24[mmdd]) === null || _25 === void 0 ? void 0 : _25[j]) === null || _26 === void 0 ? void 0 : _26.complianceobj) === null || _27 === void 0 ? void 0 : _27.subfrequency) !== null && _28 !== void 0 ? _28 : "") + "").replace(/"/g, "") + '</td>'
3088
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (((_29 = (_28 = (_27 = (_26 = (_25 = this.events) === null || _25 === void 0 ? void 0 : _25[mmdd]) === null || _26 === void 0 ? void 0 : _26[j]) === null || _27 === void 0 ? void 0 : _27.complianceobj) === null || _28 === void 0 ? void 0 : _28.subfrequency) !== null && _29 !== void 0 ? _29 : "") + "").replace(/"/g, "") + '</td>'
3089
3089
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3090
3090
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3091
3091
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
@@ -3099,9 +3099,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3099
3099
  csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3100
3100
  csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3101
3101
  csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3102
- csvValues += ('"' + ((((_30 = ((_29 = this.events[mmdd][j]["reporters"]) !== null && _29 !== void 0 ? _29 : [])[0]) !== null && _30 !== void 0 ? _30 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3103
- csvValues += ('"' + ((((_32 = ((_31 = this.events[mmdd][j]["approvers"]) !== null && _31 !== void 0 ? _31 : [])[0]) !== null && _32 !== void 0 ? _32 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3104
- csvValues += ('"' + ((((_34 = ((_33 = this.events[mmdd][j]["functionheads"]) !== null && _33 !== void 0 ? _33 : [])[0]) !== null && _34 !== void 0 ? _34 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3102
+ csvValues += ('"' + ((((_31 = ((_30 = this.events[mmdd][j]["reporters"]) !== null && _30 !== void 0 ? _30 : [])[0]) !== null && _31 !== void 0 ? _31 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3103
+ csvValues += ('"' + ((((_33 = ((_32 = this.events[mmdd][j]["approvers"]) !== null && _32 !== void 0 ? _32 : [])[0]) !== null && _33 !== void 0 ? _33 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3104
+ csvValues += ('"' + ((((_35 = ((_34 = this.events[mmdd][j]["functionheads"]) !== null && _34 !== void 0 ? _34 : [])[0]) !== null && _35 !== void 0 ? _35 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3105
3105
  csvValues += ('"' + (this.events[mmdd][j]["lastcheckeddate"] + '",'));
3106
3106
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3107
3107
  csvValues += ('"' + ((this.events[mmdd][j]["terminated"] ? "Yes" : "No").replace(/"/g, "") + '",'));
@@ -3127,10 +3127,10 @@ let SfIEvents = class SfIEvents extends LitElement {
3127
3127
  csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3128
3128
  csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3129
3129
  csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3130
- csvValues += ('"' + ((((_36 = ((_35 = this.events[mmdd][j]["functions"]) !== null && _35 !== void 0 ? _35 : [])[0]) !== null && _36 !== void 0 ? _36 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
3131
- csvValues += ('"' + ((((_38 = ((_37 = this.events[mmdd][j]["reporters"]) !== null && _37 !== void 0 ? _37 : [])[0]) !== null && _38 !== void 0 ? _38 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3132
- csvValues += ('"' + ((((_40 = ((_39 = this.events[mmdd][j]["approvers"]) !== null && _39 !== void 0 ? _39 : [])[0]) !== null && _40 !== void 0 ? _40 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3133
- csvValues += ('"' + ((((_42 = ((_41 = this.events[mmdd][j]["functionheads"]) !== null && _41 !== void 0 ? _41 : [])[0]) !== null && _42 !== void 0 ? _42 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3130
+ csvValues += ('"' + ((((_37 = ((_36 = this.events[mmdd][j]["functions"]) !== null && _36 !== void 0 ? _36 : [])[0]) !== null && _37 !== void 0 ? _37 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
3131
+ csvValues += ('"' + ((((_39 = ((_38 = this.events[mmdd][j]["reporters"]) !== null && _38 !== void 0 ? _38 : [])[0]) !== null && _39 !== void 0 ? _39 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3132
+ csvValues += ('"' + ((((_41 = ((_40 = this.events[mmdd][j]["approvers"]) !== null && _40 !== void 0 ? _40 : [])[0]) !== null && _41 !== void 0 ? _41 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3133
+ csvValues += ('"' + ((((_43 = ((_42 = this.events[mmdd][j]["functionheads"]) !== null && _42 !== void 0 ? _42 : [])[0]) !== null && _43 !== void 0 ? _43 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3134
3134
  csvValues += ('"' + (this.events[mmdd][j]["state"] + '",'));
3135
3135
  csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3136
3136
  csvValues += ('"' + (this.events[mmdd][j]["category"] + '",'));
@@ -3199,7 +3199,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3199
3199
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3200
3200
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3201
3201
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3202
- for (let document of (_43 = this.events[mmdd][j].contractdocuments) !== null && _43 !== void 0 ? _43 : []) {
3202
+ for (let document of (_44 = this.events[mmdd][j].contractdocuments) !== null && _44 !== void 0 ? _44 : []) {
3203
3203
  htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3204
3204
  }
3205
3205
  htmlSummaryValues += '</td></tr>';
@@ -3209,7 +3209,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3209
3209
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3210
3210
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3211
3211
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3212
- for (let document of (_44 = this.events[mmdd][j].licensedocuments) !== null && _44 !== void 0 ? _44 : []) {
3212
+ for (let document of (_45 = this.events[mmdd][j].licensedocuments) !== null && _45 !== void 0 ? _45 : []) {
3213
3213
  htmlSummaryValues += `<sf-i-uploader class="summary-report-doc" max="10" apiid="1peg5170d3" allowedextensions="[&quot;jpg&quot;,&quot;png&quot;,&quot;pdf&quot;,&quot;xls&quot;,&quot;xlsx&quot;,&quot;doc&quot;,&quot;docx&quot;]" prepopulatedInputArr="${JSON.stringify([{ "key": document.key, "ext": document.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId} " extract="no" mode="view" maximize="yes" hidepreview="yes"></sf-i-uploader><br />`;
3214
3214
  }
3215
3215
  htmlSummaryValues += '</td></tr>';
@@ -3779,6 +3779,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3779
3779
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
3780
3780
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
3781
3781
  //console.log(entityId, locationId, eventId, mmddyyyy);
3782
+ let yearStr = this.getFinancialYear(mmddyyyy);
3782
3783
  bulkBodyReview.push({
3783
3784
  "mmddyyyy": mmddyyyy,
3784
3785
  "projectid": this.projectId,
@@ -3791,7 +3792,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3791
3792
  "username": this.userName,
3792
3793
  "userid": this.userProfileId,
3793
3794
  "userrole": this.myRole,
3794
- "year": this.calendarStartYYYY,
3795
+ "year": yearStr,
3795
3796
  "module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
3796
3797
  });
3797
3798
  }
@@ -3862,6 +3863,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3862
3863
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
3863
3864
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
3864
3865
  //console.log(entityId, locationId, eventId, mmddyyyy);
3866
+ let yearStr = this.getFinancialYear(mmddyyyy);
3865
3867
  bulkBodyReview.push({
3866
3868
  "mmddyyyy": mmddyyyy,
3867
3869
  "projectid": this.projectId,
@@ -3874,7 +3876,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3874
3876
  "username": this.userName,
3875
3877
  "userid": this.userProfileId,
3876
3878
  "userrole": this.myRole,
3877
- "year": this.calendarStartYYYY,
3879
+ "year": yearStr,
3878
3880
  "module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
3879
3881
  });
3880
3882
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -4172,6 +4174,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4172
4174
  // } )
4173
4175
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
4174
4176
  // }else{
4177
+ let yearStr = this.getFinancialYear(mmddyyyy);
4175
4178
  bulkBody.push({
4176
4179
  "mmddyyyy": mmddyyyy,
4177
4180
  "projectid": this.projectId,
@@ -4189,7 +4192,7 @@ let SfIEvents = class SfIEvents extends LitElement {
4189
4192
  "reportformatschema": reportformatschema,
4190
4193
  "userid": this.userProfileId,
4191
4194
  "userrole": this.myRole,
4192
- "year": this.calendarStartYYYY,
4195
+ "year": yearStr,
4193
4196
  "module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
4194
4197
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
4195
4198
  });
@@ -5468,14 +5471,22 @@ let SfIEvents = class SfIEvents extends LitElement {
5468
5471
  this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
5469
5472
  this.csvDataRegisters += ('\n');
5470
5473
  }
5474
+ html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
5475
+ html += '<table>';
5476
+ let tablecols = [];
5471
5477
  for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
5472
5478
  const complianceId = Object.keys(objCountry[statute])[j];
5473
5479
  const compliance = objCountry[statute][complianceId];
5474
5480
  const data = JSON.parse(compliance.data);
5475
5481
  const cols = JSON.parse(compliance.cols);
5482
+ for (let col of cols) {
5483
+ if (!tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())) {
5484
+ tablecols.push(col);
5485
+ }
5486
+ }
5476
5487
  this.csvDataRegisters += ('"' + complianceId + '",');
5477
- html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
5478
- html += '<table>';
5488
+ // html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
5489
+ // html += '<table>';
5479
5490
  html += '<tr>';
5480
5491
  html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-' + index + '-' + i + '-' + j + '" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
5481
5492
  html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">ID</span><br /><sf-i-elastic-text text="' + complianceId + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
@@ -5486,13 +5497,33 @@ let SfIEvents = class SfIEvents extends LitElement {
5486
5497
  // this.csvDataRegisters += ('",');
5487
5498
  }
5488
5499
  }
5500
+ if (compliance['entities'] != null && Array.isArray(compliance['entities'])) {
5501
+ let entities = '';
5502
+ for (let entity of compliance['entities']) {
5503
+ entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
5504
+ }
5505
+ entities = entities.slice(0, entities.length - 1);
5506
+ html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">entities</span><br /><sf-i-elastic-text text="' + entities + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
5507
+ // this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
5508
+ }
5509
+ if (compliance['locations'] != null && Array.isArray(compliance['locations'])) {
5510
+ let locations = '';
5511
+ for (let location of compliance['locations']) {
5512
+ locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ',';
5513
+ }
5514
+ locations = locations.slice(0, locations.length - 1);
5515
+ html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">locations</span><br /><sf-i-elastic-text text="' + locations + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
5516
+ // this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
5517
+ }
5489
5518
  this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
5490
5519
  this.csvDataRegisters += ('\n');
5491
5520
  console.log('enter');
5492
5521
  html += '</tr>';
5493
- html += '</table>';
5494
- html += '</div>';
5522
+ // html += '</table>';
5523
+ // html += '</div>';
5495
5524
  }
5525
+ html += '</table>';
5526
+ html += '</div>';
5496
5527
  // html += '</table>';
5497
5528
  // html += '</div>';
5498
5529
  }
@@ -9443,12 +9474,12 @@ let SfIEvents = class SfIEvents extends LitElement {
9443
9474
  filterString = `${filter} - ${filtervalue}`;
9444
9475
  }
9445
9476
  else if (filter == "function") {
9446
- await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, this.locationId, filterid, this.functionId);
9477
+ await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, "", "", filterid, this.functionId);
9447
9478
  // filterString = `tagid="${filterid}" selectedcriteria="Tag - ${filtervalue}"`;
9448
9479
  filterString = `Function - ${filtervalue}`;
9449
9480
  }
9450
9481
  else if (filter == "location") {
9451
- await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, filterid, this.tagId, this.functionId);
9482
+ await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, "", filterid, this.tagId, this.functionId);
9452
9483
  // filterString = `locationid="${filterid}" selectedcriteria="Location - ${filtervalue}"`;
9453
9484
  filterString = `Location - ${filtervalue}`;
9454
9485
  }
@@ -9886,6 +9917,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9886
9917
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
9887
9918
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
9888
9919
  //console.log(entityId, locationId, eventId, mmddyyyy);
9920
+ let yearStr = this.getFinancialYear(mmddyyyy);
9889
9921
  bulkBodyReview.push({
9890
9922
  "mmddyyyy": mmddyyyy,
9891
9923
  "projectid": this.projectId,
@@ -9898,7 +9930,7 @@ let SfIEvents = class SfIEvents extends LitElement {
9898
9930
  "username": this.userName,
9899
9931
  "userid": this.userProfileId,
9900
9932
  "userrole": this.myRole,
9901
- "year": this.calendarStartYYYY,
9933
+ "year": yearStr,
9902
9934
  "module": (_b = listEvent.module) !== null && _b !== void 0 ? _b : "compliance"
9903
9935
  });
9904
9936
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -10227,6 +10259,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10227
10259
  // } )
10228
10260
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
10229
10261
  // }else{
10262
+ let yearStr = this.getFinancialYear(mmddyyyy);
10230
10263
  bulkBody.push({
10231
10264
  "mmddyyyy": mmddyyyy,
10232
10265
  "projectid": this.projectId,
@@ -10244,7 +10277,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10244
10277
  "reportformatschema": reportformatschema,
10245
10278
  "userid": this.userProfileId,
10246
10279
  "userrole": this.myRole,
10247
- "year": this.calendarStartYYYY,
10280
+ "year": yearStr,
10248
10281
  "module": (_c = listEvent.module) !== null && _c !== void 0 ? _c : "compliance",
10249
10282
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
10250
10283
  });
@@ -10674,6 +10707,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10674
10707
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
10675
10708
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
10676
10709
  //console.log(entityId, locationId, eventId, mmddyyyy);
10710
+ let yearStr = this.getFinancialYear(mmddyyyy);
10677
10711
  bulkBodyReview.push({
10678
10712
  "mmddyyyy": mmddyyyy,
10679
10713
  "projectid": this.projectId,
@@ -10686,7 +10720,7 @@ let SfIEvents = class SfIEvents extends LitElement {
10686
10720
  "username": this.userName,
10687
10721
  "userid": this.userProfileId,
10688
10722
  "userrole": this.myRole,
10689
- "year": this.calendarStartYYYY,
10723
+ "year": yearStr,
10690
10724
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
10691
10725
  });
10692
10726
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -11016,6 +11050,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11016
11050
  // } )
11017
11051
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
11018
11052
  // }else{
11053
+ let yearStr = this.getFinancialYear(mmddyyyy);
11019
11054
  bulkBody.push({
11020
11055
  "mmddyyyy": mmddyyyy,
11021
11056
  "projectid": this.projectId,
@@ -11033,7 +11068,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11033
11068
  "reportformatschema": reportformatschema,
11034
11069
  "userid": this.userProfileId,
11035
11070
  "userrole": this.myRole,
11036
- "year": this.calendarStartYYYY,
11071
+ "year": yearStr,
11037
11072
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
11038
11073
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
11039
11074
  });
@@ -11464,6 +11499,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11464
11499
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
11465
11500
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
11466
11501
  //console.log(entityId, locationId, eventId, mmddyyyy);
11502
+ let yearStr = this.getFinancialYear(mmddyyyy);
11467
11503
  bulkBodyReview.push({
11468
11504
  "mmddyyyy": mmddyyyy,
11469
11505
  "projectid": this.projectId,
@@ -11476,7 +11512,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11476
11512
  "username": this.userName,
11477
11513
  "userid": this.userProfileId,
11478
11514
  "userrole": this.myRole,
11479
- "year": this.calendarStartYYYY,
11515
+ "year": yearStr,
11480
11516
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
11481
11517
  });
11482
11518
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -11806,6 +11842,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11806
11842
  // } )
11807
11843
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
11808
11844
  // }else{
11845
+ let yearStr = this.getFinancialYear(mmddyyyy);
11809
11846
  bulkBody.push({
11810
11847
  "mmddyyyy": mmddyyyy,
11811
11848
  "projectid": this.projectId,
@@ -11823,7 +11860,7 @@ let SfIEvents = class SfIEvents extends LitElement {
11823
11860
  "reportformatschema": reportformatschema,
11824
11861
  "userid": this.userProfileId,
11825
11862
  "userrole": this.myRole,
11826
- "year": this.calendarStartYYYY,
11863
+ "year": yearStr,
11827
11864
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
11828
11865
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
11829
11866
  });
@@ -12254,6 +12291,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12254
12291
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
12255
12292
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
12256
12293
  //console.log(entityId, locationId, eventId, mmddyyyy);
12294
+ let yearStr = this.getFinancialYear(mmddyyyy);
12257
12295
  bulkBodyReview.push({
12258
12296
  "mmddyyyy": mmddyyyy,
12259
12297
  "projectid": this.projectId,
@@ -12266,7 +12304,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12266
12304
  "username": this.userName,
12267
12305
  "userid": this.userProfileId,
12268
12306
  "userrole": this.myRole,
12269
- "year": this.calendarStartYYYY,
12307
+ "year": yearStr,
12270
12308
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance"
12271
12309
  });
12272
12310
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -12596,6 +12634,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12596
12634
  // } )
12597
12635
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
12598
12636
  // }else{
12637
+ let yearStr = this.getFinancialYear(mmddyyyy);
12599
12638
  bulkBody.push({
12600
12639
  "mmddyyyy": mmddyyyy,
12601
12640
  "projectid": this.projectId,
@@ -12613,7 +12652,7 @@ let SfIEvents = class SfIEvents extends LitElement {
12613
12652
  "reportformatschema": reportformatschema,
12614
12653
  "userid": this.userProfileId,
12615
12654
  "userrole": this.myRole,
12616
- "year": this.calendarStartYYYY,
12655
+ "year": yearStr,
12617
12656
  "module": (_f = listEvent.module) !== null && _f !== void 0 ? _f : "compliance",
12618
12657
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
12619
12658
  });
@@ -13186,6 +13225,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13186
13225
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
13187
13226
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
13188
13227
  //console.log(entityId, locationId, eventId, mmddyyyy);
13228
+ let yearStr = this.getFinancialYear(mmddyyyy);
13189
13229
  bulkBodyReview.push({
13190
13230
  "mmddyyyy": mmddyyyy,
13191
13231
  "projectid": this.projectId,
@@ -13198,7 +13238,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13198
13238
  "username": this.userName,
13199
13239
  "userid": this.userProfileId,
13200
13240
  "userrole": this.myRole,
13201
- "year": this.calendarStartYYYY,
13241
+ "year": yearStr,
13202
13242
  "module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
13203
13243
  });
13204
13244
  }
@@ -13405,6 +13445,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13405
13445
  const eventId = selectedId.split('-')[9].replace(/_/g, '-');
13406
13446
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
13407
13447
  //console.log(entityId, locationId, eventId, mmddyyyy);
13448
+ let yearStr = this.getFinancialYear(mmddyyyy);
13408
13449
  bulkBodyReview.push({
13409
13450
  "mmddyyyy": mmddyyyy,
13410
13451
  "projectid": this.projectId,
@@ -13417,7 +13458,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13417
13458
  "username": this.userName,
13418
13459
  "userid": this.userProfileId,
13419
13460
  "userrole": this.myRole,
13420
- "year": this.calendarStartYYYY,
13461
+ "year": yearStr,
13421
13462
  "module": (_b = event.module) !== null && _b !== void 0 ? _b : "compliance"
13422
13463
  });
13423
13464
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -13764,6 +13805,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13764
13805
  // } )
13765
13806
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
13766
13807
  // }else{
13808
+ let yearStr = this.getFinancialYear(mmddyyyy);
13767
13809
  bulkBody.push({
13768
13810
  "mmddyyyy": mmddyyyy,
13769
13811
  "projectid": this.projectId,
@@ -13781,7 +13823,7 @@ let SfIEvents = class SfIEvents extends LitElement {
13781
13823
  "reportformatschema": reportformatschema,
13782
13824
  "userid": this.userProfileId,
13783
13825
  "userrole": this.myRole,
13784
- "year": this.calendarStartYYYY,
13826
+ "year": yearStr,
13785
13827
  "module": (_f = event.module) !== null && _f !== void 0 ? _f : "compliance",
13786
13828
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
13787
13829
  });
@@ -20401,6 +20443,7 @@ let SfIEvents = class SfIEvents extends LitElement {
20401
20443
  };
20402
20444
  this.uploadReport = async (entityId, locationId, mmddyyyy, eventid, comments, doc, docs, event, reportformatvalues = "", reportformatschema = "", module = "compliance", percentage = "100", makercheckers) => {
20403
20445
  let url = "https://" + this.apiId + "/uploadreport1";
20446
+ let yearStr = this.getFinancialYear(mmddyyyy);
20404
20447
  let body = {
20405
20448
  "mmddyyyy": mmddyyyy,
20406
20449
  "projectid": this.projectId,
@@ -20418,7 +20461,7 @@ let SfIEvents = class SfIEvents extends LitElement {
20418
20461
  "reportformatschema": reportformatschema,
20419
20462
  "userid": this.userProfileId,
20420
20463
  "userrole": this.myRole,
20421
- "year": this.calendarStartYYYY,
20464
+ "year": yearStr,
20422
20465
  "module": module,
20423
20466
  "makercheckers": makercheckers
20424
20467
  };
@@ -21729,25 +21772,33 @@ let SfIEvents = class SfIEvents extends LitElement {
21729
21772
  };
21730
21773
  this.fetchOnlyYearlyUserCalendar = async (startDate = "", endDate = "", searchString = "", list = "yes", month = "00", year = this.calendarStartYYYY, userprofileid = this.userProfileId, userrole = this.myRole, entityid = this.entityId, countryid = this.countryId, locationid = this.locationId, tagid = this.tagId, functionid = this.functionId) => {
21731
21774
  let path = "", view = "";
21732
- if (this.tagId != null && this.tagId != "") {
21775
+ if (tagid != null && tagid != "") {
21733
21776
  view = "tag";
21734
21777
  }
21735
- else if (this.countryId != null && this.countryId != "") {
21736
- view = "country";
21778
+ else if (countryid != null && countryid != "") {
21779
+ view = "tag";
21737
21780
  }
21738
- else if (this.locationId != null && this.locationId != "") {
21739
- view = "location";
21781
+ else if (locationid != null && locationid != "") {
21782
+ view = "tag";
21740
21783
  }
21741
21784
  else {
21742
21785
  view = "entity";
21743
21786
  }
21744
21787
  path = "getallcountryevents";
21745
21788
  let url = "https://" + this.apiId + "/" + path;
21789
+ let temptagid = tagid;
21790
+ if (temptagid == "" && locationid != "") {
21791
+ temptagid = locationid;
21792
+ }
21793
+ else if (temptagid == "" && userprofileid != this.userProfileId) {
21794
+ temptagid = "allevents";
21795
+ }
21746
21796
  //console.log('fetch calendar url', url);
21747
- let urlBody = { "projectid": this.projectId, "userprofileid": userprofileid, "role": userrole, "entityid": entityid, "countryid": countryid, "functionid": functionid, "locationid": locationid, "tagid": tagid, "adhoc": "false", "exclusivestartkey": 0, "sdate": startDate, "edate": endDate, "view": view, "year": year, "list": list, "month": month };
21797
+ let urlBody = { "projectid": this.projectId, "userprofileid": userprofileid, "role": userrole, "entityid": entityid, "countryid": countryid, "functionid": functionid, "locationid": "", "tagid": temptagid, "adhoc": "false", "exclusivestartkey": 0, "sdate": startDate, "edate": endDate, "view": view, "year": year, "list": list, "month": month };
21748
21798
  if (searchString.length > 0) {
21749
21799
  urlBody["searchstring"] = searchString;
21750
21800
  }
21801
+ console.log('fetchOnlyYearlyUserCalendar', `TagId:${this.tagId}, CountryId:${this.countryId}, LocationId:${this.locationId}, EntityId:${this.entityId}, FunctionId:${this.functionId}, View:${view}, urlBody:`, urlBody);
21751
21802
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
21752
21803
  const xhr = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing'));
21753
21804
  this._SfLoader.innerHTML = '';
@@ -857,7 +857,7 @@ export class SfIEvents extends LitElement {
857
857
 
858
858
  AUTOSAVE_FLAG = true;
859
859
 
860
- EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "entities", "locations", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"]
860
+ EXCLUDE_COLS_FROM_REGS: Array<string> = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers"]
861
861
 
862
862
  CHARTS_LIST_BY_MODULES: { [key: string]: Array<string> } = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
863
863
 
@@ -5327,14 +5327,14 @@ export class SfIEvents extends LitElement {
5327
5327
  csvValues += ('"' + ((((this.events[mmdd][j]["functionheads"] ?? [])[0] ?? "").split(';')[0] + "").replace(/"/g, "") + '",'));
5328
5328
  csvValues += ('"' + ((this.events?.[mmdd]?.[j]?.statute?.state ?? "") + '",'));
5329
5329
  csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
5330
- csvValues += ('"' + (this.events?.[mmdd]?.[j]?.complianceobj?.category ?? "" + '",'));
5330
+ csvValues += ('"' + ((this.events?.[mmdd]?.[j]?.complianceobj?.category ?? "") + '",'));
5331
5331
  csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
5332
- csvValues += ('"' + (this.events?.[mmdd]?.[j]?.statute?.name + '",'));
5332
+ csvValues += ('"' + ((this.events?.[mmdd]?.[j]?.statute?.name ?? "") + '",'));
5333
+ csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
5333
5334
  csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
5334
5335
  csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
5335
5336
  csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
5336
5337
  csvValues += ('"' + (((this.events?.[mmdd]?.[j]?.complianceobj?.subfrequency ?? "") + "").replace(/"/g, "") + '",'));
5337
- csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
5338
5338
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
5339
5339
  csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
5340
5340
  csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
@@ -6132,6 +6132,7 @@ export class SfIEvents extends LitElement {
6132
6132
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
6133
6133
 
6134
6134
  //console.log(entityId, locationId, eventId, mmddyyyy);
6135
+ let yearStr = this.getFinancialYear(mmddyyyy)
6135
6136
  bulkBodyReview.push({
6136
6137
  "mmddyyyy": mmddyyyy,
6137
6138
  "projectid": this.projectId,
@@ -6144,7 +6145,7 @@ export class SfIEvents extends LitElement {
6144
6145
  "username": this.userName,
6145
6146
  "userid": this.userProfileId,
6146
6147
  "userrole": this.myRole,
6147
- "year": this.calendarStartYYYY,
6148
+ "year": yearStr,
6148
6149
  "module": event.module ?? "compliance"
6149
6150
  })
6150
6151
  }
@@ -6216,6 +6217,7 @@ export class SfIEvents extends LitElement {
6216
6217
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
6217
6218
 
6218
6219
  //console.log(entityId, locationId, eventId, mmddyyyy);
6220
+ let yearStr = this.getFinancialYear(mmddyyyy)
6219
6221
  bulkBodyReview.push({
6220
6222
  "mmddyyyy": mmddyyyy,
6221
6223
  "projectid": this.projectId,
@@ -6228,7 +6230,7 @@ export class SfIEvents extends LitElement {
6228
6230
  "username": this.userName,
6229
6231
  "userid": this.userProfileId,
6230
6232
  "userrole": this.myRole,
6231
- "year": this.calendarStartYYYY,
6233
+ "year": yearStr,
6232
6234
  "module": event.module ?? "compliance"
6233
6235
  })
6234
6236
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -6566,6 +6568,7 @@ export class SfIEvents extends LitElement {
6566
6568
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
6567
6569
 
6568
6570
  // }else{
6571
+ let yearStr = this.getFinancialYear(mmddyyyy)
6569
6572
  bulkBody.push({
6570
6573
  "mmddyyyy": mmddyyyy,
6571
6574
  "projectid": this.projectId,
@@ -6583,7 +6586,7 @@ export class SfIEvents extends LitElement {
6583
6586
  "reportformatschema": reportformatschema,
6584
6587
  "userid": this.userProfileId,
6585
6588
  "userrole": this.myRole,
6586
- "year": this.calendarStartYYYY,
6589
+ "year": yearStr,
6587
6590
  "module": event.module ?? "compliance",
6588
6591
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
6589
6592
  })
@@ -8031,15 +8034,22 @@ export class SfIEvents extends LitElement {
8031
8034
  this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
8032
8035
  this.csvDataRegisters += ('\n');
8033
8036
  }
8034
-
8037
+ html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
8038
+ html += '<table>';
8039
+ let tablecols: string[] = []
8035
8040
  for (var j = 0; j < Object.keys(objCountry[statute]).length; j++) {
8036
8041
  const complianceId = Object.keys(objCountry[statute])[j];
8037
8042
  const compliance = objCountry[statute][complianceId];
8038
8043
  const data = JSON.parse(compliance.data);
8039
8044
  const cols = JSON.parse(compliance.cols);
8045
+ for(let col of cols){
8046
+ if(!tablecols.includes(col.toLowerCase()) && !this.EXCLUDE_COLS_FROM_REGS.includes(col.toLowerCase())){
8047
+ tablecols.push(col)
8048
+ }
8049
+ }
8040
8050
  this.csvDataRegisters += ('"' + complianceId + '",');
8041
- html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
8042
- html += '<table>';
8051
+ // html += '<div class="w-100p scroll-x ' + (i != this.selectedRegisterIndex ? 'hide' : '') + ' register-body-' + i + '">';
8052
+ // html += '<table>';
8043
8053
  html += '<tr>';
8044
8054
  html += ('<td class="td-body left-sticky" part="td-body-register"><button part="button-icon" id="button-icon-country-' + index + '-' + i + '-' + j + '" class="button-icon-country"><span class="material-symbols-outlined">open_in_new</span></button></td>');
8045
8055
  html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">ID</span><br /><sf-i-elastic-text text="' + complianceId + '" minLength="10" lineSize="4"></sf-i-elastic-text></td>');
@@ -8050,13 +8060,33 @@ export class SfIEvents extends LitElement {
8050
8060
  // this.csvDataRegisters += ('",');
8051
8061
  }
8052
8062
  }
8063
+ if(compliance['entities'] != null && Array.isArray(compliance['entities'])){
8064
+ let entities = '';
8065
+ for(let entity of compliance['entities']){
8066
+ entities += entity.split(';')[0].replace(/\([^)]*\)/g, "") + ','
8067
+ }
8068
+ entities = entities.slice(0, entities.length - 1)
8069
+ html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">entities</span><br /><sf-i-elastic-text text="' + entities + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
8070
+ // this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
8071
+ }
8072
+ if(compliance['locations'] != null && Array.isArray(compliance['locations'])){
8073
+ let locations = '';
8074
+ for(let location of compliance['locations']){
8075
+ locations += location.split(';')[0].replace(/\([^)]*\)/g, "") + ','
8076
+ }
8077
+ locations = locations.slice(0, locations.length - 1)
8078
+ html += ('<td class="td-body" part="td-body-register"><span part="td-head" style="padding-left: 0px !important">locations</span><br /><sf-i-elastic-text text="' + locations + '" minLength="80" lineSize="4"></sf-i-elastic-text></td>');
8079
+ // this.csvDataRegisters += ('"' + (data[k] + "").replace(/"/g, '') + '",');
8080
+ }
8053
8081
  this.csvDataRegisters = this.csvDataRegisters.replace(/,\s*$/, "");
8054
8082
  this.csvDataRegisters += ('\n');
8055
8083
  console.log('enter');
8056
8084
  html += '</tr>';
8057
- html += '</table>';
8058
- html += '</div>';
8085
+ // html += '</table>';
8086
+ // html += '</div>';
8059
8087
  }
8088
+ html += '</table>';
8089
+ html += '</div>';
8060
8090
 
8061
8091
  // html += '</table>';
8062
8092
  // html += '</div>';
@@ -12893,6 +12923,7 @@ export class SfIEvents extends LitElement {
12893
12923
  // let username = this.userName;
12894
12924
  let filterString = `countryid="${this.countryId}" locationid="${this.locationId}" entityid="${this.entityId}" tagid="${this.tagId}" selectedcriteria="${this.selectedCriteria}"`;
12895
12925
  let rolestr = "viewer"
12926
+ ;
12896
12927
  if (filter == "reporter" || filter == "approver" || filter == "functionhead") {
12897
12928
  userid = filterid;
12898
12929
  // username = filtervalue;
@@ -12900,11 +12931,11 @@ export class SfIEvents extends LitElement {
12900
12931
  await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, userid, rolestr, this.entityId, this.countryId, this.locationId, this.tagId, this.functionId);
12901
12932
  filterString = `${filter} - ${filtervalue}`;
12902
12933
  } else if (filter == "function") {
12903
- await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, this.locationId, filterid, this.functionId);
12934
+ await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, "", "", filterid, this.functionId);
12904
12935
  // filterString = `tagid="${filterid}" selectedcriteria="Tag - ${filtervalue}"`;
12905
12936
  filterString = `Function - ${filtervalue}`;
12906
12937
  } else if (filter == "location") {
12907
- await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, this.countryId, filterid, this.tagId, this.functionId);
12938
+ await this.fetchOnlyYearlyUserCalendar(this.sdate, this.edate, "", "yes", "00", this.calendarStartYYYY, this.userProfileId, rolestr, this.entityId, "", filterid, this.tagId, this.functionId);
12908
12939
  // filterString = `locationid="${filterid}" selectedcriteria="Location - ${filtervalue}"`;
12909
12940
  filterString = `Location - ${filtervalue}`;
12910
12941
  }
@@ -13436,6 +13467,7 @@ export class SfIEvents extends LitElement {
13436
13467
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
13437
13468
 
13438
13469
  //console.log(entityId, locationId, eventId, mmddyyyy);
13470
+ let yearStr = this.getFinancialYear(mmddyyyy)
13439
13471
  bulkBodyReview.push({
13440
13472
  "mmddyyyy": mmddyyyy,
13441
13473
  "projectid": this.projectId,
@@ -13448,7 +13480,7 @@ export class SfIEvents extends LitElement {
13448
13480
  "username": this.userName,
13449
13481
  "userid": this.userProfileId,
13450
13482
  "userrole": this.myRole,
13451
- "year": this.calendarStartYYYY,
13483
+ "year": yearStr,
13452
13484
  "module": listEvent.module ?? "compliance"
13453
13485
  })
13454
13486
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -13823,6 +13855,7 @@ export class SfIEvents extends LitElement {
13823
13855
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
13824
13856
 
13825
13857
  // }else{
13858
+ let yearStr = this.getFinancialYear(mmddyyyy)
13826
13859
  bulkBody.push({
13827
13860
  "mmddyyyy": mmddyyyy,
13828
13861
  "projectid": this.projectId,
@@ -13840,7 +13873,7 @@ export class SfIEvents extends LitElement {
13840
13873
  "reportformatschema": reportformatschema,
13841
13874
  "userid": this.userProfileId,
13842
13875
  "userrole": this.myRole,
13843
- "year": this.calendarStartYYYY,
13876
+ "year": yearStr,
13844
13877
  "module": listEvent.module ?? "compliance",
13845
13878
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
13846
13879
  })
@@ -14324,6 +14357,7 @@ export class SfIEvents extends LitElement {
14324
14357
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
14325
14358
 
14326
14359
  //console.log(entityId, locationId, eventId, mmddyyyy);
14360
+ let yearStr = this.getFinancialYear(mmddyyyy)
14327
14361
  bulkBodyReview.push({
14328
14362
  "mmddyyyy": mmddyyyy,
14329
14363
  "projectid": this.projectId,
@@ -14336,7 +14370,7 @@ export class SfIEvents extends LitElement {
14336
14370
  "username": this.userName,
14337
14371
  "userid": this.userProfileId,
14338
14372
  "userrole": this.myRole,
14339
- "year": this.calendarStartYYYY,
14373
+ "year": yearStr,
14340
14374
  "module": listEvent.module ?? "compliance"
14341
14375
  })
14342
14376
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -14716,6 +14750,7 @@ export class SfIEvents extends LitElement {
14716
14750
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
14717
14751
 
14718
14752
  // }else{
14753
+ let yearStr = this.getFinancialYear(mmddyyyy)
14719
14754
  bulkBody.push({
14720
14755
  "mmddyyyy": mmddyyyy,
14721
14756
  "projectid": this.projectId,
@@ -14733,7 +14768,7 @@ export class SfIEvents extends LitElement {
14733
14768
  "reportformatschema": reportformatschema,
14734
14769
  "userid": this.userProfileId,
14735
14770
  "userrole": this.myRole,
14736
- "year": this.calendarStartYYYY,
14771
+ "year": yearStr,
14737
14772
  "module": listEvent.module ?? "compliance",
14738
14773
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
14739
14774
  })
@@ -15219,6 +15254,7 @@ export class SfIEvents extends LitElement {
15219
15254
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
15220
15255
 
15221
15256
  //console.log(entityId, locationId, eventId, mmddyyyy);
15257
+ let yearStr = this.getFinancialYear(mmddyyyy)
15222
15258
  bulkBodyReview.push({
15223
15259
  "mmddyyyy": mmddyyyy,
15224
15260
  "projectid": this.projectId,
@@ -15231,7 +15267,7 @@ export class SfIEvents extends LitElement {
15231
15267
  "username": this.userName,
15232
15268
  "userid": this.userProfileId,
15233
15269
  "userrole": this.myRole,
15234
- "year": this.calendarStartYYYY,
15270
+ "year": yearStr,
15235
15271
  "module": listEvent.module ?? "compliance"
15236
15272
  })
15237
15273
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -15611,6 +15647,7 @@ export class SfIEvents extends LitElement {
15611
15647
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
15612
15648
 
15613
15649
  // }else{
15650
+ let yearStr = this.getFinancialYear(mmddyyyy)
15614
15651
  bulkBody.push({
15615
15652
  "mmddyyyy": mmddyyyy,
15616
15653
  "projectid": this.projectId,
@@ -15628,7 +15665,7 @@ export class SfIEvents extends LitElement {
15628
15665
  "reportformatschema": reportformatschema,
15629
15666
  "userid": this.userProfileId,
15630
15667
  "userrole": this.myRole,
15631
- "year": this.calendarStartYYYY,
15668
+ "year": yearStr,
15632
15669
  "module": listEvent.module ?? "compliance",
15633
15670
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
15634
15671
  })
@@ -16114,6 +16151,7 @@ export class SfIEvents extends LitElement {
16114
16151
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
16115
16152
 
16116
16153
  //console.log(entityId, locationId, eventId, mmddyyyy);
16154
+ let yearStr = this.getFinancialYear(mmddyyyy)
16117
16155
  bulkBodyReview.push({
16118
16156
  "mmddyyyy": mmddyyyy,
16119
16157
  "projectid": this.projectId,
@@ -16126,7 +16164,7 @@ export class SfIEvents extends LitElement {
16126
16164
  "username": this.userName,
16127
16165
  "userid": this.userProfileId,
16128
16166
  "userrole": this.myRole,
16129
- "year": this.calendarStartYYYY,
16167
+ "year": yearStr,
16130
16168
  "module": listEvent.module ?? "compliance"
16131
16169
  })
16132
16170
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -16506,6 +16544,7 @@ export class SfIEvents extends LitElement {
16506
16544
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
16507
16545
 
16508
16546
  // }else{
16547
+ let yearStr = this.getFinancialYear(mmddyyyy)
16509
16548
  bulkBody.push({
16510
16549
  "mmddyyyy": mmddyyyy,
16511
16550
  "projectid": this.projectId,
@@ -16523,7 +16562,7 @@ export class SfIEvents extends LitElement {
16523
16562
  "reportformatschema": reportformatschema,
16524
16563
  "userid": this.userProfileId,
16525
16564
  "userrole": this.myRole,
16526
- "year": this.calendarStartYYYY,
16565
+ "year": yearStr,
16527
16566
  "module": listEvent.module ?? "compliance",
16528
16567
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
16529
16568
  })
@@ -17204,6 +17243,7 @@ export class SfIEvents extends LitElement {
17204
17243
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
17205
17244
 
17206
17245
  //console.log(entityId, locationId, eventId, mmddyyyy);
17246
+ let yearStr = this.getFinancialYear(mmddyyyy)
17207
17247
  bulkBodyReview.push({
17208
17248
  "mmddyyyy": mmddyyyy,
17209
17249
  "projectid": this.projectId,
@@ -17216,7 +17256,7 @@ export class SfIEvents extends LitElement {
17216
17256
  "username": this.userName,
17217
17257
  "userid": this.userProfileId,
17218
17258
  "userrole": this.myRole,
17219
- "year": this.calendarStartYYYY,
17259
+ "year": yearStr,
17220
17260
  "module": event.module ?? "compliance"
17221
17261
  })
17222
17262
  }
@@ -17469,6 +17509,7 @@ export class SfIEvents extends LitElement {
17469
17509
  mmddyyyy = selectedId.split('-')[10] + '/' + selectedId.split('-')[11] + '/' + selectedId.split('-')[12];
17470
17510
 
17471
17511
  //console.log(entityId, locationId, eventId, mmddyyyy);
17512
+ let yearStr = this.getFinancialYear(mmddyyyy)
17472
17513
  bulkBodyReview.push({
17473
17514
  "mmddyyyy": mmddyyyy,
17474
17515
  "projectid": this.projectId,
@@ -17481,7 +17522,7 @@ export class SfIEvents extends LitElement {
17481
17522
  "username": this.userName,
17482
17523
  "userid": this.userProfileId,
17483
17524
  "userrole": this.myRole,
17484
- "year": this.calendarStartYYYY,
17525
+ "year": yearStr,
17485
17526
  "module": event.module ?? "compliance"
17486
17527
  })
17487
17528
  // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, comments, approved)
@@ -17872,6 +17913,7 @@ export class SfIEvents extends LitElement {
17872
17913
  // // await this.uploadReview(entityId, locationId, mmddyyyy, eventId, "Auto approved", true);
17873
17914
 
17874
17915
  // }else{
17916
+ let yearStr = this.getFinancialYear(mmddyyyy)
17875
17917
  bulkBody.push({
17876
17918
  "mmddyyyy": mmddyyyy,
17877
17919
  "projectid": this.projectId,
@@ -17889,7 +17931,7 @@ export class SfIEvents extends LitElement {
17889
17931
  "reportformatschema": reportformatschema,
17890
17932
  "userid": this.userProfileId,
17891
17933
  "userrole": this.myRole,
17892
- "year": this.calendarStartYYYY,
17934
+ "year": yearStr,
17893
17935
  "module": event.module ?? "compliance",
17894
17936
  "makercheckers": (parseInt(makercheckersL) > 0) ? ["makercheckers"] : null
17895
17937
  })
@@ -26215,7 +26257,7 @@ export class SfIEvents extends LitElement {
26215
26257
 
26216
26258
  uploadReport = async (entityId: string, locationId: string, mmddyyyy: string, eventid: string, comments: string, doc: string, docs: any, event: any, reportformatvalues: string = "", reportformatschema: string = "", module: string = "compliance", percentage: string = "100", makercheckers: any) => {
26217
26259
  let url = "https://" + this.apiId + "/uploadreport1";
26218
-
26260
+ let yearStr = this.getFinancialYear(mmddyyyy)
26219
26261
  let body = {
26220
26262
  "mmddyyyy": mmddyyyy,
26221
26263
  "projectid": this.projectId,
@@ -26233,7 +26275,7 @@ export class SfIEvents extends LitElement {
26233
26275
  "reportformatschema": reportformatschema,
26234
26276
  "userid": this.userProfileId,
26235
26277
  "userrole": this.myRole,
26236
- "year": this.calendarStartYYYY,
26278
+ "year": yearStr,
26237
26279
  "module": module,
26238
26280
  "makercheckers": makercheckers
26239
26281
  }
@@ -27955,27 +27997,33 @@ export class SfIEvents extends LitElement {
27955
27997
  fetchOnlyYearlyUserCalendar = async (startDate: string = "", endDate: string = "", searchString: string = "", list: string = "yes", month: string = "00", year: string = this.calendarStartYYYY, userprofileid: string = this.userProfileId, userrole: string = this.myRole, entityid = this.entityId, countryid = this.countryId, locationid = this.locationId, tagid = this.tagId, functionid = this.functionId) => {
27956
27998
 
27957
27999
  let path = "", view = "";
27958
- if (this.tagId != null && this.tagId != "") {
28000
+ if (tagid != null && tagid != "") {
28001
+ view = "tag";
28002
+ } else if (countryid != null && countryid != "") {
28003
+ view = "tag";
28004
+ } else if (locationid != null && locationid != "") {
27959
28005
  view = "tag";
27960
- } else if (this.countryId != null && this.countryId != "") {
27961
- view = "country";
27962
- } else if (this.locationId != null && this.locationId != "") {
27963
- view = "location";
27964
28006
  } else {
27965
28007
  view = "entity";
27966
28008
  }
27967
-
28009
+
27968
28010
  path = "getallcountryevents";
27969
28011
 
27970
28012
  let url = "https://" + this.apiId + "/" + path;
27971
-
28013
+ let temptagid = tagid;
28014
+ if(temptagid == "" && locationid != "") {
28015
+ temptagid = locationid
28016
+ }else if(temptagid == "" && userprofileid != this.userProfileId) {
28017
+ temptagid = "allevents"
28018
+ }
27972
28019
  //console.log('fetch calendar url', url);
27973
- let urlBody: any = { "projectid": this.projectId, "userprofileid": userprofileid, "role": userrole, "entityid": entityid, "countryid": countryid, "functionid": functionid, "locationid": locationid, "tagid": tagid, "adhoc": "false", "exclusivestartkey": 0, "sdate": startDate, "edate": endDate, "view": view, "year": year, "list": list, "month": month };
28020
+ let urlBody: any = { "projectid": this.projectId, "userprofileid": userprofileid, "role": userrole, "entityid": entityid, "countryid": countryid, "functionid": functionid, "locationid": "", "tagid": temptagid, "adhoc": "false", "exclusivestartkey": 0, "sdate": startDate, "edate": endDate, "view": view, "year": year, "list": list, "month": month };
27974
28021
 
27975
28022
  if (searchString.length > 0) {
27976
28023
  urlBody["searchstring"] = searchString;
27977
28024
  }
27978
28025
 
28026
+ console.log('fetchOnlyYearlyUserCalendar', `TagId:${this.tagId}, CountryId:${this.countryId}, LocationId:${this.locationId}, EntityId:${this.entityId}, FunctionId:${this.functionId}, View:${view}, urlBody:`, urlBody);
27979
28027
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
27980
28028
  const xhr: any = (await this.prepareXhr(urlBody, url, this._SfLoader, authorization, 'Preparing')) as any;
27981
28029
  this._SfLoader.innerHTML = '';