sf-i-events 1.0.954 → 1.0.956

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
@@ -889,14 +889,14 @@
889
889
  disablesignoff="yes" disableclientresponse="yes">
890
890
 
891
891
  </sf-i-events> -->
892
- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
892
+ <!-- <sf-i-events projectid="41ab3c86-ccc0-4c0e-8e31-cd079a07a710" projectname="ABC Global" mode="onboarding"
893
893
  locations="{&quot;India&quot;:{&quot;Maharashtra&quot;:[&quot;Pune&quot;,&quot;Mumbai&quot;],&quot;Telangana&quot;:[&quot;Telangana&quot;]},&quot;Canada&quot;:{&quot;CanadaSO&quot;:[&quot;CanadaLO&quot;]},&quot;Singapore&quot;:{&quot;SingaporeSO&quot;:[&quot;Orchard&quot;,&quot;Raffles&quot;,&quot;Robinson&quot;,&quot;Tanjong&quot;,&quot;Tras&quot;]},&quot;United Kingdom&quot;:{&quot;UnitedSO&quot;:[&quot;UnitedLO&quot;]},&quot;United States of America&quot;:{&quot;AmericaSO&quot;:[&quot;AmericaLO&quot;]}}"
894
894
  contractstartdate="1/4/2024" apiid="dwqyez2puoxmu.cloudfront.net/event" username="ninad.t@flagggrc.tech"
895
895
  apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
896
896
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidusers="dnytrdlrmxgsy.cloudfront.net/userprofile"
897
897
  disablesignoff="yes" disableclientresponse="yes">
898
898
 
899
- </sf-i-events>
899
+ </sf-i-events> -->
900
900
  <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
901
901
  apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
902
902
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -941,7 +941,7 @@
941
941
  </div>
942
942
 
943
943
  </sf-i-events> -->
944
- <!-- <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
944
+ <sf-i-events name="Calendar" apiid="dwqyez2puoxmu.cloudfront.net/event" mode="consumer"
945
945
  apiidtags="dnytrdlrmxgsy.cloudfront.net/tagging" apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute"
946
946
  apiiddefinitions="dwqyez2puoxmu.cloudfront.net/definition"
947
947
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
@@ -970,7 +970,7 @@
970
970
  <sf-i-reporting id="reporting-format" mode="view"></sf-i-reporting>
971
971
  </div>
972
972
 
973
- </sf-i-events> -->
973
+ </sf-i-events>
974
974
  <!-- <sf-i-events id="sf-i-events-next" name="Next Compliances" apiid="dwqyez2puoxmu.cloudfront.net/event"
975
975
  apiidstatutes="dnytrdlrmxgsy.cloudfront.net/statute" apiidcompliances="dnytrdlrmxgsy.cloudfront.net/compliance"
976
976
  apiidreportformats="dwqyez2puoxmu.cloudfront.net/reportformat"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.954",
4
+ "version": "1.0.956",
5
5
  "description": "Superflows Navigation Component",
6
6
  "main": "sf-i-events.js",
7
7
  "module": "sf-i-events.js",
package/sf-i-events.d.ts CHANGED
@@ -306,6 +306,11 @@ export declare class SfIEvents extends LitElement {
306
306
  suspenseFlag: boolean;
307
307
  tablecols: string[];
308
308
  reportedLocationsVals: any[];
309
+ minRiskMitigated: number;
310
+ minRiskResidual: number;
311
+ maxRiskMitigated: number;
312
+ maxRiskResidual: number;
313
+ finRiskCurrency: string;
309
314
  static styles: import("lit").CSSResult;
310
315
  _SfIEventsC: any;
311
316
  _SfRowError: any;
@@ -873,6 +878,7 @@ export declare class SfIEvents extends LitElement {
873
878
  showChooseProject: () => void;
874
879
  showChosenProject: () => void;
875
880
  showChosenMapping: () => void;
881
+ formatIndianNumber: (num: number) => string;
876
882
  truncate: (str: string, n: number, useWordBoundary: boolean, ellipsis?: boolean) => string;
877
883
  initListenersAdmin: () => void;
878
884
  isAdmin: () => boolean;
package/sf-i-events.js CHANGED
@@ -1275,6 +1275,11 @@ let SfIEvents = class SfIEvents extends LitElement {
1275
1275
  this.suspenseFlag = false;
1276
1276
  this.tablecols = [];
1277
1277
  this.reportedLocationsVals = [];
1278
+ this.minRiskMitigated = 0;
1279
+ this.minRiskResidual = 0;
1280
+ this.maxRiskMitigated = 0;
1281
+ this.maxRiskResidual = 0;
1282
+ this.finRiskCurrency = "";
1278
1283
  this.isSelectedLegend = (value) => {
1279
1284
  return this.chartSelectedLegend.includes(value);
1280
1285
  };
@@ -2363,6 +2368,49 @@ let SfIEvents = class SfIEvents extends LitElement {
2363
2368
  html += '</div>';
2364
2369
  html += '</div>';
2365
2370
  html += '<div class="chart-container d-flex scroll-x align-center"><div part="chart-item" class="chart-item"><canvas id="myChart"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart4" class="gone"></canvas></div><div part="chart-item chart-item-middle" class="chart-item"><canvas id="myChart2" class="gone"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart3" class="gone"></canvas></div></div>';
2371
+ html += '<div part="fin-risk-container" class="gone FIN_RISK_HIDE_CLASS mt-20 w-100 align-end ">';
2372
+ html += `
2373
+ <!-- Left Label -->
2374
+ <div class="d-flex align-end" part="financial-risk-title-container">
2375
+ <span part="financial-risk-title">Financial Risk</span>
2376
+ <sup part="financial-risk-currency">FIN_RISK_CURRENCY</sup>
2377
+ </div>
2378
+
2379
+ <!-- Lower (Residual / Pending Risk) -->
2380
+ <div class="d-flex align-end" part="financial-risk-section">
2381
+ <div part="financial-risk-section-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
2382
+ <div part="financial-risk-table-container" class="d-flex flex-col align-center" style="gap:8px;">
2383
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
2384
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
2385
+ <span part="financial-risk-table-table-row-value-addressed" style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MIN</span>
2386
+ </div>
2387
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
2388
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Pending</span>
2389
+ <span part="financial-risk-table-table-row-value-residual" style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MIN</span>
2390
+ </div>
2391
+ </div>
2392
+ </div>
2393
+
2394
+ <!-- Upper (Mitigated / Addressed Risk) -->
2395
+ <div class="d-flex align-end" part="financial-risk-section">
2396
+ <div part="financial-risk-section-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
2397
+ <div part="financial-risk-table-container" class="d-flex flex-col align-center" style="gap:8px;">
2398
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
2399
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
2400
+ <span part="financial-risk-table-table-row-value-addressed" style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MAX</span>
2401
+ </div>
2402
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
2403
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Pending</span>
2404
+ <span part="financial-risk-table-table-row-value-residual" style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MAX</span>
2405
+ </div>
2406
+ </div>
2407
+ </div>
2408
+ `;
2409
+ // html += '<div part="" class="mb-5">Financial Risk</div>'
2410
+ // html += '<table class="w-100 text-center"><thead><tr><th part="financial-risk-header">Risk Status</th><th part="financial-risk-header" class="financial-risk-header">Minimum Risk</th><th part="financial-risk-header" class="financial-risk-header">Maximum Risk</th></tr></thead><tbody>'
2411
+ // html += '<tr><td>Residual</td><td>FIN_RISK_RESIDUAL_MIN</td><td>FIN_RISK_RESIDUAL_MAX</td></tr>'
2412
+ // html += '<tr><td>Mitigated</td><td>FIN_RISK_MITIGATED_MIN</td><td>FIN_RISK_MITIGATED_MAX</td></tr></tbody></table>'
2413
+ html += '</div>';
2366
2414
  html += '<div id="chart-settings-controls" class="mt-20"></div>';
2367
2415
  html += '<div id="chart-settings"></div>';
2368
2416
  }
@@ -2943,7 +2991,7 @@ let SfIEvents = class SfIEvents extends LitElement {
2943
2991
  };
2944
2992
  //(firstDay, endDay, 1, lastDay, true, 0, (firstDate.getMonth()), period, firstDate,"From " + firstDay.toLocaleDateString('en-IN') + " To " + endDay.toLocaleDateString('en-IN'), showBackgroundButton)
2945
2993
  this.renderEvents = (_firstDay, _endDay, iInit, iLast, showGraph, index, month, period, firstDate = null, parametersTitle, showBackgroundButton, fromDrilldown = false) => {
2946
- 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;
2994
+ 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, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55;
2947
2995
  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;
2948
2996
  var html = '';
2949
2997
  this.selectedItemIds = [];
@@ -2954,6 +3002,11 @@ let SfIEvents = class SfIEvents extends LitElement {
2954
3002
  var slice = 2;
2955
3003
  this.eventsInWindow = [];
2956
3004
  var lastDay = iLast;
3005
+ this.minRiskMitigated = 0;
3006
+ this.minRiskResidual = 0;
3007
+ this.maxRiskMitigated = 0;
3008
+ this.maxRiskResidual = 0;
3009
+ this.finRiskCurrency = "";
2957
3010
  this.clearGraphData();
2958
3011
  console.log('this.clearSelectedGraphParam(); 1', this.graphFilter);
2959
3012
  this.clearSelectedGraphParam();
@@ -2993,6 +3046,16 @@ let SfIEvents = class SfIEvents extends LitElement {
2993
3046
  htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>';
2994
3047
  }
2995
3048
  }
3049
+ let tempMinRiskMitigatedLocal = 0;
3050
+ let tempMinRiskResidualLocal = 0;
3051
+ let tempMaxRiskMitigatedLocal = 0;
3052
+ let tempMaxRiskResidualLocal = 0;
3053
+ let tempMinRiskMitigatedGlobal = 0;
3054
+ let tempMinRiskResidualGlobal = 0;
3055
+ let tempMaxRiskMitigatedGlobal = 0;
3056
+ let tempMaxRiskResidualGlobal = 0;
3057
+ this.finRiskCurrency = "";
3058
+ let flagGlobal = false;
2996
3059
  for (var i = iInit; i <= iLast; i++) {
2997
3060
  let mmdd = "";
2998
3061
  if (firstDate == null) {
@@ -3041,6 +3104,25 @@ let SfIEvents = class SfIEvents extends LitElement {
3041
3104
  }
3042
3105
  // const tempEvents2 = JSON.parse(JSON.stringify(this.events));
3043
3106
  // //console.log('eventlog2', tempEvents2['06/30'][7].comments, mmdd, j);
3107
+ if (this.finRiskCurrency == "") {
3108
+ this.finRiskCurrency = (_a = this.events[mmdd][j]['localcurrency']) !== null && _a !== void 0 ? _a : "";
3109
+ }
3110
+ if (this.finRiskCurrency != this.events[mmdd][j]['localcurrency'] && this.finRiskCurrency == "") {
3111
+ this.finRiskCurrency = (_b = this.events[mmdd][j]['globalcurrency']) !== null && _b !== void 0 ? _b : "";
3112
+ flagGlobal = true;
3113
+ }
3114
+ if (partStatus == "approved") {
3115
+ tempMinRiskMitigatedLocal = tempMinRiskMitigatedLocal + parseInt((_c = this.events[mmdd][j]['minlocal']) !== null && _c !== void 0 ? _c : "0");
3116
+ tempMaxRiskMitigatedLocal = tempMaxRiskMitigatedLocal + parseInt((_f = this.events[mmdd][j]['maxlocal']) !== null && _f !== void 0 ? _f : "0");
3117
+ tempMinRiskMitigatedGlobal = tempMinRiskMitigatedGlobal + parseInt((_g = this.events[mmdd][j]['minglobal']) !== null && _g !== void 0 ? _g : "0");
3118
+ tempMaxRiskMitigatedGlobal = tempMaxRiskMitigatedGlobal + parseInt((_h = this.events[mmdd][j]['maxglobal']) !== null && _h !== void 0 ? _h : "0");
3119
+ }
3120
+ else {
3121
+ tempMinRiskResidualLocal = tempMinRiskResidualLocal + parseInt((_j = this.events[mmdd][j]['minlocal']) !== null && _j !== void 0 ? _j : "0");
3122
+ tempMaxRiskResidualLocal = tempMaxRiskResidualLocal + parseInt((_k = this.events[mmdd][j]['maxlocal']) !== null && _k !== void 0 ? _k : "0");
3123
+ tempMinRiskResidualGlobal = tempMinRiskResidualGlobal + parseInt((_l = this.events[mmdd][j]['minglobal']) !== null && _l !== void 0 ? _l : "0");
3124
+ tempMaxRiskResidualGlobal = tempMaxRiskResidualGlobal + parseInt((_m = this.events[mmdd][j]['maxglobal']) !== null && _m !== void 0 ? _m : "0");
3125
+ }
3044
3126
  notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
3045
3127
  pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
3046
3128
  rejected = rejected + (partStatus == "rejected" ? 1 : 0);
@@ -3079,9 +3161,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3079
3161
  csvValues += ('"' + ((this.events[mmdd][j]["party1"] + "").replace(/"/g, "") + '",'));
3080
3162
  csvValues += ('"' + ((this.events[mmdd][j]["party2"] + "").replace(/"/g, "") + '",'));
3081
3163
  csvValues += ('"' + ((this.events[mmdd][j]["party3"] + "").replace(/"/g, "") + '",'));
3082
- csvValues += ('"' + ((((_b = ((_a = this.events[mmdd][j]["reporters"]) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3083
- csvValues += ('"' + ((((_f = ((_c = this.events[mmdd][j]["approvers"]) !== null && _c !== void 0 ? _c : [])[0]) !== null && _f !== void 0 ? _f : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3084
- csvValues += ('"' + ((((_h = ((_g = this.events[mmdd][j]["functionheads"]) !== null && _g !== void 0 ? _g : [])[0]) !== null && _h !== void 0 ? _h : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3164
+ csvValues += ('"' + ((((_p = ((_o = this.events[mmdd][j]["reporters"]) !== null && _o !== void 0 ? _o : [])[0]) !== null && _p !== void 0 ? _p : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3165
+ csvValues += ('"' + ((((_r = ((_q = this.events[mmdd][j]["approvers"]) !== null && _q !== void 0 ? _q : [])[0]) !== null && _r !== void 0 ? _r : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3166
+ csvValues += ('"' + ((((_t = ((_s = this.events[mmdd][j]["functionheads"]) !== null && _s !== void 0 ? _s : [])[0]) !== null && _t !== void 0 ? _t : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3085
3167
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3086
3168
  csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3087
3169
  csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
@@ -3108,19 +3190,19 @@ let SfIEvents = class SfIEvents extends LitElement {
3108
3190
  csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3109
3191
  csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3110
3192
  csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3111
- csvValues += ('"' + ((((_k = ((_j = this.events[mmdd][j]["reporters"]) !== null && _j !== void 0 ? _j : [])[0]) !== null && _k !== void 0 ? _k : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3112
- csvValues += ('"' + ((((_m = ((_l = this.events[mmdd][j]["approvers"]) !== null && _l !== void 0 ? _l : [])[0]) !== null && _m !== void 0 ? _m : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3113
- csvValues += ('"' + ((((_p = ((_o = this.events[mmdd][j]["functionheads"]) !== null && _o !== void 0 ? _o : [])[0]) !== null && _p !== void 0 ? _p : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3114
- 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 : "") + '",'));
3193
+ csvValues += ('"' + ((((_v = ((_u = this.events[mmdd][j]["reporters"]) !== null && _u !== void 0 ? _u : [])[0]) !== null && _v !== void 0 ? _v : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3194
+ csvValues += ('"' + ((((_x = ((_w = this.events[mmdd][j]["approvers"]) !== null && _w !== void 0 ? _w : [])[0]) !== null && _x !== void 0 ? _x : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3195
+ csvValues += ('"' + ((((_z = ((_y = this.events[mmdd][j]["functionheads"]) !== null && _y !== void 0 ? _y : [])[0]) !== null && _z !== void 0 ? _z : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3196
+ 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.state) !== null && _4 !== void 0 ? _4 : "") + '",'));
3115
3197
  csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3116
- 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 : "") + '",'));
3198
+ 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.category) !== null && _9 !== void 0 ? _9 : "") + '",'));
3117
3199
  csvValues += ('"' + (this.events[mmdd][j]["subcategory"] + '",'));
3118
- 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 : "") + '",'));
3200
+ csvValues += ('"' + (((_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.name) !== null && _14 !== void 0 ? _14 : "") + '",'));
3119
3201
  csvValues += ('"' + ((this.events[mmdd][j]["obligationtype"] + "").replace(/"/g, "") + '",'));
3120
3202
  csvValues += ('"' + ((this.events[mmdd][j]["risk"] + "").replace(/"/g, "") + '",'));
3121
3203
  csvValues += ('"' + ((this.events[mmdd][j]["riskarea"] + "").replace(/"/g, "") + '",'));
3122
3204
  csvValues += ('"' + ((this.events[mmdd][j]["frequency"] + "").replace(/"/g, "") + '",'));
3123
- 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, "") + '",'));
3205
+ csvValues += ('"' + ((((_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.subfrequency) !== null && _19 !== void 0 ? _19 : "") + "").replace(/"/g, "") + '",'));
3124
3206
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3125
3207
  csvValues += ('"' + (this.renderStatusString(partStatus, lateStatus, complianceStatus) + '",'));
3126
3208
  csvValues += ('"' + (this.getGraphParam(this.events[mmdd][j]) + '"\n'));
@@ -3131,16 +3213,16 @@ let SfIEvents = class SfIEvents extends LitElement {
3131
3213
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3132
3214
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3133
3215
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '</td>'
3134
- + '<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>'
3216
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + ((_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.state) !== null && _24 !== void 0 ? _24 : "") + '</td>'
3135
3217
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["jurisdiction"] + '</td>'
3136
- + '<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>'
3218
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_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.category) !== null && _29 !== void 0 ? _29 : "") + '</td>'
3137
3219
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["subcategory"] + '</td>'
3138
- + '<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>'
3220
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + ((_34 = (_33 = (_32 = (_31 = (_30 = this.events) === null || _30 === void 0 ? void 0 : _30[mmdd]) === null || _31 === void 0 ? void 0 : _31[j]) === null || _32 === void 0 ? void 0 : _32.statute) === null || _33 === void 0 ? void 0 : _33.name) !== null && _34 !== void 0 ? _34 : "") + '</td>'
3139
3221
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["obligationtype"] + '</td>'
3140
3222
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["risk"] + '</td>'
3141
3223
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">' + this.events[mmdd][j]["riskarea"] + '</td>'
3142
3224
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["frequency"] + '</td>'
3143
- + '<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>'
3225
+ + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + (((_39 = (_38 = (_37 = (_36 = (_35 = this.events) === null || _35 === void 0 ? void 0 : _35[mmdd]) === null || _36 === void 0 ? void 0 : _36[j]) === null || _37 === void 0 ? void 0 : _37.complianceobj) === null || _38 === void 0 ? void 0 : _38.subfrequency) !== null && _39 !== void 0 ? _39 : "") + "").replace(/"/g, "") + '</td>'
3144
3226
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-thin">' + this.events[mmdd][j]["duedate"] + '</td>'
3145
3227
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide text-center status-format">' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '</td>'
3146
3228
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide status-format">' + this.getGraphParam(this.events[mmdd][j]) + '</td>'
@@ -3154,9 +3236,9 @@ let SfIEvents = class SfIEvents extends LitElement {
3154
3236
  csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3155
3237
  csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3156
3238
  csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3157
- csvValues += ('"' + ((((_31 = ((_30 = this.events[mmdd][j]["reporters"]) !== null && _30 !== void 0 ? _30 : [])[0]) !== null && _31 !== void 0 ? _31 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3158
- csvValues += ('"' + ((((_33 = ((_32 = this.events[mmdd][j]["approvers"]) !== null && _32 !== void 0 ? _32 : [])[0]) !== null && _33 !== void 0 ? _33 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3159
- csvValues += ('"' + ((((_35 = ((_34 = this.events[mmdd][j]["functionheads"]) !== null && _34 !== void 0 ? _34 : [])[0]) !== null && _35 !== void 0 ? _35 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3239
+ csvValues += ('"' + ((((_41 = ((_40 = this.events[mmdd][j]["reporters"]) !== null && _40 !== void 0 ? _40 : [])[0]) !== null && _41 !== void 0 ? _41 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3240
+ csvValues += ('"' + ((((_43 = ((_42 = this.events[mmdd][j]["approvers"]) !== null && _42 !== void 0 ? _42 : [])[0]) !== null && _43 !== void 0 ? _43 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3241
+ csvValues += ('"' + ((((_45 = ((_44 = this.events[mmdd][j]["functionheads"]) !== null && _44 !== void 0 ? _44 : [])[0]) !== null && _45 !== void 0 ? _45 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3160
3242
  csvValues += ('"' + (this.events[mmdd][j]["lastcheckeddate"] + '",'));
3161
3243
  csvValues += ('"' + ((this.events[mmdd][j]["duedate"] + "").replace(/"/g, "") + '",'));
3162
3244
  csvValues += ('"' + ((this.events[mmdd][j]["terminated"] ? "Yes" : "No").replace(/"/g, "") + '",'));
@@ -3182,10 +3264,10 @@ let SfIEvents = class SfIEvents extends LitElement {
3182
3264
  csvValues += ('"' + ((this.events[mmdd][j]["countryname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3183
3265
  csvValues += ('"' + ((this.events[mmdd][j]["entityname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3184
3266
  csvValues += ('"' + ((this.events[mmdd][j]["locationname"] + "").replace(/\((.*?)\)/g, "") + '",'));
3185
- csvValues += ('"' + ((((_37 = ((_36 = this.events[mmdd][j]["functions"]) !== null && _36 !== void 0 ? _36 : [])[0]) !== null && _37 !== void 0 ? _37 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
3186
- csvValues += ('"' + ((((_39 = ((_38 = this.events[mmdd][j]["reporters"]) !== null && _38 !== void 0 ? _38 : [])[0]) !== null && _39 !== void 0 ? _39 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3187
- csvValues += ('"' + ((((_41 = ((_40 = this.events[mmdd][j]["approvers"]) !== null && _40 !== void 0 ? _40 : [])[0]) !== null && _41 !== void 0 ? _41 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3188
- csvValues += ('"' + ((((_43 = ((_42 = this.events[mmdd][j]["functionheads"]) !== null && _42 !== void 0 ? _42 : [])[0]) !== null && _43 !== void 0 ? _43 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3267
+ csvValues += ('"' + ((((_47 = ((_46 = this.events[mmdd][j]["functions"]) !== null && _46 !== void 0 ? _46 : [])[0]) !== null && _47 !== void 0 ? _47 : "").split(';')[0] + "").replace(/\((.*?)\)/g, "") + '",'));
3268
+ csvValues += ('"' + ((((_49 = ((_48 = this.events[mmdd][j]["reporters"]) !== null && _48 !== void 0 ? _48 : [])[0]) !== null && _49 !== void 0 ? _49 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3269
+ csvValues += ('"' + ((((_51 = ((_50 = this.events[mmdd][j]["approvers"]) !== null && _50 !== void 0 ? _50 : [])[0]) !== null && _51 !== void 0 ? _51 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3270
+ csvValues += ('"' + ((((_53 = ((_52 = this.events[mmdd][j]["functionheads"]) !== null && _52 !== void 0 ? _52 : [])[0]) !== null && _53 !== void 0 ? _53 : "").split(';')[0] + "").replace(/"/g, "") + '",'));
3189
3271
  csvValues += ('"' + (this.events[mmdd][j]["state"] + '",'));
3190
3272
  csvValues += ('"' + (this.events[mmdd][j]["jurisdiction"] + '",'));
3191
3273
  csvValues += ('"' + (this.events[mmdd][j]["category"] + '",'));
@@ -3254,7 +3336,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3254
3336
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3255
3337
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3256
3338
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3257
- for (let document of (_44 = this.events[mmdd][j].contractdocuments) !== null && _44 !== void 0 ? _44 : []) {
3339
+ for (let document of (_54 = this.events[mmdd][j].contractdocuments) !== null && _54 !== void 0 ? _54 : []) {
3258
3340
  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 />`;
3259
3341
  }
3260
3342
  htmlSummaryValues += '</td></tr>';
@@ -3264,7 +3346,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3264
3346
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.events[mmdd][j]["obligationtitle"] + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3265
3347
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide"><sf-i-elastic-text exportparts="highlight,highlight-count" text="' + this.renderStatusString(partStatus, lateStatus, complianceStatus) + '" minLength="100" lineSize="4"></sf-i-elastic-text></td>'
3266
3348
  + '<td class="' + (total % 2 === 0 ? 'td-odd' : 'td-even') + ' td-wide">');
3267
- for (let document of (_45 = this.events[mmdd][j].licensedocuments) !== null && _45 !== void 0 ? _45 : []) {
3349
+ for (let document of (_55 = this.events[mmdd][j].licensedocuments) !== null && _55 !== void 0 ? _55 : []) {
3268
3350
  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 />`;
3269
3351
  }
3270
3352
  htmlSummaryValues += '</td></tr>';
@@ -3308,6 +3390,22 @@ let SfIEvents = class SfIEvents extends LitElement {
3308
3390
  }
3309
3391
  }
3310
3392
  html += this.renderCalendarContainerDivEnd();
3393
+ if (flagGlobal) {
3394
+ this.minRiskMitigated = tempMinRiskMitigatedGlobal;
3395
+ this.maxRiskMitigated = tempMaxRiskMitigatedGlobal;
3396
+ this.minRiskResidual = tempMinRiskResidualGlobal;
3397
+ this.maxRiskResidual = tempMaxRiskResidualGlobal;
3398
+ }
3399
+ else {
3400
+ this.minRiskMitigated = tempMinRiskMitigatedLocal;
3401
+ this.maxRiskMitigated = tempMaxRiskMitigatedLocal;
3402
+ this.minRiskResidual = tempMinRiskResidualLocal;
3403
+ this.maxRiskResidual = tempMaxRiskResidualLocal;
3404
+ }
3405
+ let showFinRisk = false;
3406
+ if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0) {
3407
+ showFinRisk = true;
3408
+ }
3311
3409
  //console.log('final risk severities', this.riskSeverityData);
3312
3410
  //this.period = firstDay?.getDate() + '/' + (firstDay!.getMonth()+1) + '/' + firstDay?.getFullYear() + " - " + endDay?.getDate() + '/' + (endDay!.getMonth()+1) + '/' + endDay?.getFullYear();
3313
3411
  this.period = period;
@@ -3338,6 +3436,12 @@ let SfIEvents = class SfIEvents extends LitElement {
3338
3436
  html = html.replace("DASHBOARD_ABOUT_TO_EXPIRE", aboutToExpire + "");
3339
3437
  html = html.replace("DASHBOARD_EXPIRED", expired + "");
3340
3438
  html = html.replace("DASHBOARD_TERMINATED", terminated + "");
3439
+ html = html.replace("FIN_RISK_CURRENCY", this.finRiskCurrency);
3440
+ html = html.replace("FIN_RISK_RESIDUAL_MIN", this.formatIndianNumber(this.minRiskResidual));
3441
+ html = html.replace("FIN_RISK_RESIDUAL_MAX", this.formatIndianNumber(this.maxRiskResidual));
3442
+ html = html.replace("FIN_RISK_MITIGATED_MIN", this.formatIndianNumber(this.minRiskMitigated));
3443
+ html = html.replace("FIN_RISK_MITIGATED_MAX", this.formatIndianNumber(this.maxRiskMitigated));
3444
+ html = html.replace("gone FIN_RISK_HIDE_CLASS", showFinRisk ? "d-flex" : "gone");
3341
3445
  if (this.selectedFeatures.indexOf("contracts") >= 0) {
3342
3446
  this.csvDataStats = 'Period,Total,Not Started,Approved,Pending Approval,Rejected,Past Due Date,Late Reported,Late Executed,Late Approved,Active,About To Expire,Expired,Terminated\n';
3343
3447
  this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + active + "," + aboutToExpire + "," + expired + "," + terminated;
@@ -14238,16 +14342,26 @@ let SfIEvents = class SfIEvents extends LitElement {
14238
14342
  console.log('attachments str', event[complianceFields[i]]);
14239
14343
  html += '<div class="m-20">';
14240
14344
  html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>';
14241
- for (let attachmentStr of event[complianceFields[i]]) {
14242
- let attachment = {};
14243
- if (typeof attachmentStr === "object") {
14244
- attachment = attachmentStr;
14345
+ if (typeof event[complianceFields[i]] === "string") {
14346
+ let attachmentArr = JSON.parse(event[complianceFields[i]].toString());
14347
+ if (attachmentArr.length > 0) {
14348
+ for (let attachment of attachmentArr) {
14349
+ html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
14350
+ }
14245
14351
  }
14246
- else {
14247
- attachment = JSON.parse(attachmentStr + "");
14352
+ }
14353
+ else {
14354
+ for (let attachmentStr of event[complianceFields[i]]) {
14355
+ let attachment = {};
14356
+ if (typeof attachmentStr === "object") {
14357
+ attachment = attachmentStr;
14358
+ }
14359
+ else {
14360
+ attachment = JSON.parse(attachmentStr.toString());
14361
+ }
14362
+ // html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
14363
+ html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
14248
14364
  }
14249
- // html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
14250
- html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`;
14251
14365
  }
14252
14366
  html += '</div>';
14253
14367
  }
@@ -24720,6 +24834,25 @@ let SfIEvents = class SfIEvents extends LitElement {
24720
24834
  elems[index].style.display = 'flex';
24721
24835
  }
24722
24836
  };
24837
+ this.formatIndianNumber = (num) => {
24838
+ if (num === null || num === undefined || isNaN(num))
24839
+ return '';
24840
+ num = Number(num);
24841
+ if (num >= 10000000) {
24842
+ // 1 Crore = 10,000,000
24843
+ return (num / 10000000).toFixed(num % 10000000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' Cr';
24844
+ }
24845
+ else if (num >= 100000) {
24846
+ // 1 Lakh = 100,000
24847
+ return (num / 100000).toFixed(num % 100000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' Lac';
24848
+ }
24849
+ else if (num >= 1000) {
24850
+ return (num / 1000).toFixed(num % 1000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' K';
24851
+ }
24852
+ else {
24853
+ return num.toString();
24854
+ }
24855
+ };
24723
24856
  this.truncate = (str, n, useWordBoundary, ellipsis = true) => {
24724
24857
  if (str.length <= n) {
24725
24858
  return str;
@@ -1711,6 +1711,15 @@ export class SfIEvents extends LitElement {
1711
1711
  tablecols: string[] = []
1712
1712
 
1713
1713
  reportedLocationsVals: any[] = []
1714
+
1715
+ minRiskMitigated: number = 0;
1716
+ minRiskResidual: number = 0;
1717
+
1718
+ maxRiskMitigated: number = 0;
1719
+ maxRiskResidual: number = 0;
1720
+
1721
+ finRiskCurrency: string = "";
1722
+
1714
1723
  static override styles = css`
1715
1724
 
1716
1725
  .bg-white {
@@ -4549,6 +4558,50 @@ export class SfIEvents extends LitElement {
4549
4558
  html += '</div>';
4550
4559
  html += '</div>';
4551
4560
  html += '<div class="chart-container d-flex scroll-x align-center"><div part="chart-item" class="chart-item"><canvas id="myChart"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart4" class="gone"></canvas></div><div part="chart-item chart-item-middle" class="chart-item"><canvas id="myChart2" class="gone"></canvas></div><div part="chart-item" class="chart-item"><canvas id="myChart3" class="gone"></canvas></div></div>';
4561
+ html += '<div part="fin-risk-container" class="gone FIN_RISK_HIDE_CLASS mt-20 w-100 align-end ">';
4562
+ html += `
4563
+ <!-- Left Label -->
4564
+ <div class="d-flex align-end" part="financial-risk-title-container">
4565
+ <span part="financial-risk-title">Financial Risk</span>
4566
+ <sup part="financial-risk-currency">FIN_RISK_CURRENCY</sup>
4567
+ </div>
4568
+
4569
+ <!-- Lower (Residual / Pending Risk) -->
4570
+ <div class="d-flex align-end" part="financial-risk-section">
4571
+ <div part="financial-risk-section-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
4572
+ <div part="financial-risk-table-container" class="d-flex flex-col align-center" style="gap:8px;">
4573
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
4574
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
4575
+ <span part="financial-risk-table-table-row-value-addressed" style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MIN</span>
4576
+ </div>
4577
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
4578
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Pending</span>
4579
+ <span part="financial-risk-table-table-row-value-residual" style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MIN</span>
4580
+ </div>
4581
+ </div>
4582
+ </div>
4583
+
4584
+ <!-- Upper (Mitigated / Addressed Risk) -->
4585
+ <div class="d-flex align-end" part="financial-risk-section">
4586
+ <div part="financial-risk-section-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
4587
+ <div part="financial-risk-table-container" class="d-flex flex-col align-center" style="gap:8px;">
4588
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
4589
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
4590
+ <span part="financial-risk-table-table-row-value-addressed" style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MAX</span>
4591
+ </div>
4592
+ <div part="financial-risk-table-col" class="d-flex flex-col align-center">
4593
+ <span part="financial-risk-table-row-label" style="color:#555;font-weight:500;font-size:13px;">Pending</span>
4594
+ <span part="financial-risk-table-table-row-value-residual" style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MAX</span>
4595
+ </div>
4596
+ </div>
4597
+ </div>
4598
+ `
4599
+ // html += '<div part="" class="mb-5">Financial Risk</div>'
4600
+ // html += '<table class="w-100 text-center"><thead><tr><th part="financial-risk-header">Risk Status</th><th part="financial-risk-header" class="financial-risk-header">Minimum Risk</th><th part="financial-risk-header" class="financial-risk-header">Maximum Risk</th></tr></thead><tbody>'
4601
+ // html += '<tr><td>Residual</td><td>FIN_RISK_RESIDUAL_MIN</td><td>FIN_RISK_RESIDUAL_MAX</td></tr>'
4602
+ // html += '<tr><td>Mitigated</td><td>FIN_RISK_MITIGATED_MIN</td><td>FIN_RISK_MITIGATED_MAX</td></tr></tbody></table>'
4603
+ html += '</div>'
4604
+
4552
4605
  html += '<div id="chart-settings-controls" class="mt-20"></div>'
4553
4606
  html += '<div id="chart-settings"></div>'
4554
4607
  } else {
@@ -5248,6 +5301,12 @@ export class SfIEvents extends LitElement {
5248
5301
 
5249
5302
  var lastDay = iLast;
5250
5303
 
5304
+ this.minRiskMitigated = 0;
5305
+ this.minRiskResidual = 0;
5306
+ this.maxRiskMitigated = 0;
5307
+ this.maxRiskResidual = 0;
5308
+ this.finRiskCurrency = "";
5309
+
5251
5310
  this.clearGraphData();
5252
5311
  console.log('this.clearSelectedGraphParam(); 1', this.graphFilter);
5253
5312
  this.clearSelectedGraphParam();
@@ -5284,6 +5343,16 @@ export class SfIEvents extends LitElement {
5284
5343
  htmlSummaryCols += '<tr><th class="td-thin">Id</th><th class="td-wide">ObligationTitle</th><th class="td-wide">Status</th><th class="td-wide">Documents</th></tr>'
5285
5344
  }
5286
5345
  }
5346
+ let tempMinRiskMitigatedLocal = 0;
5347
+ let tempMinRiskResidualLocal = 0;
5348
+ let tempMaxRiskMitigatedLocal = 0;
5349
+ let tempMaxRiskResidualLocal = 0;
5350
+ let tempMinRiskMitigatedGlobal = 0;
5351
+ let tempMinRiskResidualGlobal = 0;
5352
+ let tempMaxRiskMitigatedGlobal = 0;
5353
+ let tempMaxRiskResidualGlobal = 0;
5354
+ this.finRiskCurrency = ""
5355
+ let flagGlobal = false;
5287
5356
  for (var i = iInit; i <= iLast; i++) {
5288
5357
 
5289
5358
  let mmdd: string = "";
@@ -5341,6 +5410,25 @@ export class SfIEvents extends LitElement {
5341
5410
  }
5342
5411
  // const tempEvents2 = JSON.parse(JSON.stringify(this.events));
5343
5412
  // //console.log('eventlog2', tempEvents2['06/30'][7].comments, mmdd, j);
5413
+ if (this.finRiskCurrency == "") {
5414
+ this.finRiskCurrency = this.events[mmdd][j]['localcurrency'] ?? ""
5415
+ }
5416
+ if (this.finRiskCurrency != this.events[mmdd][j]['localcurrency'] && this.finRiskCurrency == "") {
5417
+ this.finRiskCurrency = this.events[mmdd][j]['globalcurrency'] ?? ""
5418
+ flagGlobal = true
5419
+ }
5420
+
5421
+ if (partStatus == "approved") {
5422
+ tempMinRiskMitigatedLocal = tempMinRiskMitigatedLocal + parseInt(this.events[mmdd][j]['minlocal'] ?? "0")
5423
+ tempMaxRiskMitigatedLocal = tempMaxRiskMitigatedLocal + parseInt(this.events[mmdd][j]['maxlocal'] ?? "0")
5424
+ tempMinRiskMitigatedGlobal = tempMinRiskMitigatedGlobal + parseInt(this.events[mmdd][j]['minglobal'] ?? "0")
5425
+ tempMaxRiskMitigatedGlobal = tempMaxRiskMitigatedGlobal + parseInt(this.events[mmdd][j]['maxglobal'] ?? "0")
5426
+ } else {
5427
+ tempMinRiskResidualLocal = tempMinRiskResidualLocal + parseInt(this.events[mmdd][j]['minlocal'] ?? "0")
5428
+ tempMaxRiskResidualLocal = tempMaxRiskResidualLocal + parseInt(this.events[mmdd][j]['maxlocal'] ?? "0")
5429
+ tempMinRiskResidualGlobal = tempMinRiskResidualGlobal + parseInt(this.events[mmdd][j]['minglobal'] ?? "0")
5430
+ tempMaxRiskResidualGlobal = tempMaxRiskResidualGlobal + parseInt(this.events[mmdd][j]['maxglobal'] ?? "0")
5431
+ }
5344
5432
 
5345
5433
  notStarted = notStarted + (partStatus == "not-started" ? 1 : 0);
5346
5434
  pendingApproval = pendingApproval + (partStatus == "pending-approval" ? 1 : 0);
@@ -5621,6 +5709,22 @@ export class SfIEvents extends LitElement {
5621
5709
 
5622
5710
  html += this.renderCalendarContainerDivEnd();
5623
5711
 
5712
+ if (flagGlobal) {
5713
+ this.minRiskMitigated = tempMinRiskMitigatedGlobal
5714
+ this.maxRiskMitigated = tempMaxRiskMitigatedGlobal
5715
+ this.minRiskResidual = tempMinRiskResidualGlobal
5716
+ this.maxRiskResidual = tempMaxRiskResidualGlobal
5717
+ } else {
5718
+ this.minRiskMitigated = tempMinRiskMitigatedLocal
5719
+ this.maxRiskMitigated = tempMaxRiskMitigatedLocal
5720
+ this.minRiskResidual = tempMinRiskResidualLocal
5721
+ this.maxRiskResidual = tempMaxRiskResidualLocal
5722
+ }
5723
+
5724
+ let showFinRisk = false
5725
+ if (this.selectedFeatures.indexOf('contracts') < 0 && this.selectedFeatures.indexOf('notices') && this.selectedFeatures.indexOf('licenses') < 0 && this.selectedFeatures.indexOf('rcmresources') < 0) {
5726
+ showFinRisk = true
5727
+ }
5624
5728
  //console.log('final risk severities', this.riskSeverityData);
5625
5729
 
5626
5730
  //this.period = firstDay?.getDate() + '/' + (firstDay!.getMonth()+1) + '/' + firstDay?.getFullYear() + " - " + endDay?.getDate() + '/' + (endDay!.getMonth()+1) + '/' + endDay?.getFullYear();
@@ -5658,6 +5762,13 @@ export class SfIEvents extends LitElement {
5658
5762
  html = html.replace("DASHBOARD_EXPIRED", expired + "");
5659
5763
  html = html.replace("DASHBOARD_TERMINATED", terminated + "");
5660
5764
 
5765
+ html = html.replace("FIN_RISK_CURRENCY", this.finRiskCurrency);
5766
+ html = html.replace("FIN_RISK_RESIDUAL_MIN", this.formatIndianNumber(this.minRiskResidual));
5767
+ html = html.replace("FIN_RISK_RESIDUAL_MAX", this.formatIndianNumber(this.maxRiskResidual));
5768
+ html = html.replace("FIN_RISK_MITIGATED_MIN", this.formatIndianNumber(this.minRiskMitigated));
5769
+ html = html.replace("FIN_RISK_MITIGATED_MAX", this.formatIndianNumber(this.maxRiskMitigated));
5770
+ html = html.replace("gone FIN_RISK_HIDE_CLASS", showFinRisk ? "d-flex" : "gone");
5771
+
5661
5772
  if (this.selectedFeatures.indexOf("contracts") >= 0) {
5662
5773
  this.csvDataStats = 'Period,Total,Not Started,Approved,Pending Approval,Rejected,Past Due Date,Late Reported,Late Executed,Late Approved,Active,About To Expire,Expired,Terminated\n';
5663
5774
  this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + active + "," + aboutToExpire + "," + expired + "," + terminated;
@@ -18222,15 +18333,25 @@ export class SfIEvents extends LitElement {
18222
18333
 
18223
18334
  html += '<div class="m-20">';
18224
18335
  html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>'
18225
- for (let attachmentStr of event[complianceFields[i]]) {
18226
- let attachment: any = {};
18227
- if (typeof attachmentStr === "object") {
18228
- attachment = attachmentStr;
18229
- } else {
18230
- attachment = JSON.parse(attachmentStr + "");
18336
+ if (typeof event[complianceFields[i]] === "string") {
18337
+ let attachmentArr = JSON.parse(event[complianceFields[i]].toString());
18338
+ if (attachmentArr.length > 0) {
18339
+ for (let attachment of attachmentArr) {
18340
+ html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
18341
+ }
18342
+ }
18343
+ } else {
18344
+ for (let attachmentStr of event[complianceFields[i]]) {
18345
+ let attachment: any = {};
18346
+ if (typeof attachmentStr === "object") {
18347
+ attachment = attachmentStr;
18348
+
18349
+ } else {
18350
+ attachment = JSON.parse(attachmentStr.toString());
18351
+ }
18352
+ // html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
18353
+ html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
18231
18354
  }
18232
- // html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" projectid="${this.projectId}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
18233
- html += `<sf-i-uploader class="event-attachment" 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": attachment.key, "ext": attachment.ext }]).replace(/"/g, '&quot;')}" extract="no" mode="view" maximize="yes" hidepreview="yes" displaydetail="yes"></sf-i-uploader>`
18234
18355
  }
18235
18356
  html += '</div>';
18236
18357
  }
@@ -22437,7 +22558,7 @@ export class SfIEvents extends LitElement {
22437
22558
 
22438
22559
  html += '<td class="left-sticky td-body ' + classBg + '" part="td-key">'
22439
22560
  html += '<div class="">';
22440
- html += '<input id="suspense-' + i + '" type="checkbox" part="input" class="suspense-input"' + ((suspenseList[suspenseKey] != null && suspenseList[suspenseKey] != false) ? ' checked' : '') +'/>';
22561
+ html += '<input id="suspense-' + i + '" type="checkbox" part="input" class="suspense-input"' + ((suspenseList[suspenseKey] != null && suspenseList[suspenseKey] != false) ? ' checked' : '') + '/>';
22441
22562
 
22442
22563
 
22443
22564
  html += '</div>';
@@ -22504,9 +22625,9 @@ export class SfIEvents extends LitElement {
22504
22625
  buttonApply.addEventListener('click', () => {
22505
22626
  let inputSuspenseCheckboxes = (this._SfOnboardingSuspenseContainer as HTMLDivElement).querySelectorAll('.suspense-input') as NodeListOf<HTMLInputElement>;
22506
22627
  let tempSuspenseList: any = {}
22507
- for(let inputSuspenseCheckbox of inputSuspenseCheckboxes){
22628
+ for (let inputSuspenseCheckbox of inputSuspenseCheckboxes) {
22508
22629
  let index = inputSuspenseCheckbox.id.split("-")[1]
22509
- if(inputSuspenseCheckbox.checked){
22630
+ if (inputSuspenseCheckbox.checked) {
22510
22631
  let item = sourceArray.data.mappings.mappings[index]
22511
22632
  let suspenseKey = item.entityid + ';' + item.locationid + ';' + item.id
22512
22633
  tempSuspenseList[suspenseKey] = true
@@ -27887,8 +28008,8 @@ export class SfIEvents extends LitElement {
27887
28008
 
27888
28009
  let url = "https://" + this.apiId + "/updatemappedsuspense";
27889
28010
 
27890
- const body = {
27891
- "projectid": this.projectId,
28011
+ const body = {
28012
+ "projectid": this.projectId,
27892
28013
  "data": JSON.stringify(data),
27893
28014
  }
27894
28015
 
@@ -31167,6 +31288,24 @@ export class SfIEvents extends LitElement {
31167
31288
 
31168
31289
  }
31169
31290
 
31291
+ formatIndianNumber = (num: number) => {
31292
+ if (num === null || num === undefined || isNaN(num)) return '';
31293
+ num = Number(num);
31294
+
31295
+ if (num >= 10000000) {
31296
+ // 1 Crore = 10,000,000
31297
+ return (num / 10000000).toFixed(num % 10000000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' Cr';
31298
+ } else if (num >= 100000) {
31299
+ // 1 Lakh = 100,000
31300
+ return (num / 100000).toFixed(num % 100000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' Lac';
31301
+ } else if (num >= 1000) {
31302
+ return (num / 1000).toFixed(num % 1000 === 0 ? 0 : 2).replace(/\.00$/, '') + ' K';
31303
+ } else {
31304
+ return num.toString();
31305
+ }
31306
+ }
31307
+
31308
+
31170
31309
  truncate = (str: string, n: number, useWordBoundary: boolean, ellipsis: boolean = true) => {
31171
31310
  if (str.length <= n) { return str; }
31172
31311
  const subString = str.slice(0, n - 1); // the original check