sf-i-events 1.0.955 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-i-events",
3
3
  "private": false,
4
- "version": "1.0.955",
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.js CHANGED
@@ -2368,40 +2368,40 @@ let SfIEvents = class SfIEvents extends LitElement {
2368
2368
  html += '</div>';
2369
2369
  html += '</div>';
2370
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 id="fin-risk-container" class="mt-20 w-100 d-flex align-end">';
2371
+ html += '<div part="fin-risk-container" class="gone FIN_RISK_HIDE_CLASS mt-20 w-100 align-end ">';
2372
2372
  html += `
2373
2373
  <!-- Left Label -->
2374
- <div class="d-flex align-end">
2374
+ <div class="d-flex align-end" part="financial-risk-title-container">
2375
2375
  <span part="financial-risk-title">Financial Risk</span>
2376
2376
  <sup part="financial-risk-currency">FIN_RISK_CURRENCY</sup>
2377
2377
  </div>
2378
2378
 
2379
2379
  <!-- Lower (Residual / Pending Risk) -->
2380
2380
  <div class="d-flex align-end" part="financial-risk-section">
2381
- <div part="financial-risk-limit-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
2382
- <div class="d-flex align-center">
2383
- <div class="d-flex flex-col align-center">
2384
- <span style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
2385
- <span style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MIN</span>
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
2386
  </div>
2387
- <div class="d-flex flex-col align-center">
2388
- <span style="color:#555;font-weight:500;font-size:13px;">Pending</span>
2389
- <span style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MIN</span>
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
2390
  </div>
2391
2391
  </div>
2392
2392
  </div>
2393
2393
 
2394
2394
  <!-- Upper (Mitigated / Addressed Risk) -->
2395
2395
  <div class="d-flex align-end" part="financial-risk-section">
2396
- <div part="financial-risk-limit-label" style="font-weight:700;font-size:15px;color:#000;">Upper</div>
2397
- <div style="display:flex;align-items:center;gap:8px;">
2398
- <div class="d-flex flex-col align-center">
2399
- <span style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
2400
- <span style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MAX</span>
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
2401
  </div>
2402
- <div class="d-flex flex-col align-center">
2403
- <span style="color:#555;font-weight:500;font-size:13px;">Pending</span>
2404
- <span style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MAX</span>
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
2405
  </div>
2406
2406
  </div>
2407
2407
  </div>
@@ -3402,6 +3402,10 @@ let SfIEvents = class SfIEvents extends LitElement {
3402
3402
  this.minRiskResidual = tempMinRiskResidualLocal;
3403
3403
  this.maxRiskResidual = tempMaxRiskResidualLocal;
3404
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
+ }
3405
3409
  //console.log('final risk severities', this.riskSeverityData);
3406
3410
  //this.period = firstDay?.getDate() + '/' + (firstDay!.getMonth()+1) + '/' + firstDay?.getFullYear() + " - " + endDay?.getDate() + '/' + (endDay!.getMonth()+1) + '/' + endDay?.getFullYear();
3407
3411
  this.period = period;
@@ -3437,6 +3441,7 @@ let SfIEvents = class SfIEvents extends LitElement {
3437
3441
  html = html.replace("FIN_RISK_RESIDUAL_MAX", this.formatIndianNumber(this.maxRiskResidual));
3438
3442
  html = html.replace("FIN_RISK_MITIGATED_MIN", this.formatIndianNumber(this.minRiskMitigated));
3439
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");
3440
3445
  if (this.selectedFeatures.indexOf("contracts") >= 0) {
3441
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';
3442
3447
  this.csvDataStats += this.period + "," + total + "," + notStarted + "," + approved + "," + pendingApproval + "," + rejected + "," + pastDueDate + "," + lateReported + "," + lateExecuted + "," + lateApproved + "," + active + "," + aboutToExpire + "," + expired + "," + terminated;
@@ -14337,16 +14342,26 @@ let SfIEvents = class SfIEvents extends LitElement {
14337
14342
  console.log('attachments str', event[complianceFields[i]]);
14338
14343
  html += '<div class="m-20">';
14339
14344
  html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>';
14340
- for (let attachmentStr of event[complianceFields[i]]) {
14341
- let attachment = {};
14342
- if (typeof attachmentStr === "object") {
14343
- 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
+ }
14344
14351
  }
14345
- else {
14346
- 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>`;
14347
14364
  }
14348
- // 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>`
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
14365
  }
14351
14366
  html += '</div>';
14352
14367
  }
@@ -4558,40 +4558,40 @@ export class SfIEvents extends LitElement {
4558
4558
  html += '</div>';
4559
4559
  html += '</div>';
4560
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 id="fin-risk-container" class="mt-20 w-100 d-flex align-end">'
4561
+ html += '<div part="fin-risk-container" class="gone FIN_RISK_HIDE_CLASS mt-20 w-100 align-end ">';
4562
4562
  html += `
4563
4563
  <!-- Left Label -->
4564
- <div class="d-flex align-end">
4564
+ <div class="d-flex align-end" part="financial-risk-title-container">
4565
4565
  <span part="financial-risk-title">Financial Risk</span>
4566
4566
  <sup part="financial-risk-currency">FIN_RISK_CURRENCY</sup>
4567
4567
  </div>
4568
4568
 
4569
4569
  <!-- Lower (Residual / Pending Risk) -->
4570
4570
  <div class="d-flex align-end" part="financial-risk-section">
4571
- <div part="financial-risk-limit-label" style="font-weight:700;font-size:15px;color:#000;">Lower</div>
4572
- <div class="d-flex align-center">
4573
- <div class="d-flex flex-col align-center">
4574
- <span style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
4575
- <span style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MIN</span>
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
4576
  </div>
4577
- <div class="d-flex flex-col align-center">
4578
- <span style="color:#555;font-weight:500;font-size:13px;">Pending</span>
4579
- <span style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MIN</span>
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
4580
  </div>
4581
4581
  </div>
4582
4582
  </div>
4583
4583
 
4584
4584
  <!-- Upper (Mitigated / Addressed Risk) -->
4585
4585
  <div class="d-flex align-end" part="financial-risk-section">
4586
- <div part="financial-risk-limit-label" style="font-weight:700;font-size:15px;color:#000;">Upper</div>
4587
- <div style="display:flex;align-items:center;gap:8px;">
4588
- <div class="d-flex flex-col align-center">
4589
- <span style="color:#555;font-weight:500;font-size:13px;">Addressed</span>
4590
- <span style="font-weight:700;font-size:16px;color:#27ae60;">FIN_RISK_MITIGATED_MAX</span>
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
4591
  </div>
4592
- <div class="d-flex flex-col align-center">
4593
- <span style="color:#555;font-weight:500;font-size:13px;">Pending</span>
4594
- <span style="font-weight:700;font-size:16px;color:#a0005a;">FIN_RISK_RESIDUAL_MAX</span>
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
4595
  </div>
4596
4596
  </div>
4597
4597
  </div>
@@ -5720,6 +5720,11 @@ export class SfIEvents extends LitElement {
5720
5720
  this.minRiskResidual = tempMinRiskResidualLocal
5721
5721
  this.maxRiskResidual = tempMaxRiskResidualLocal
5722
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
+ }
5723
5728
  //console.log('final risk severities', this.riskSeverityData);
5724
5729
 
5725
5730
  //this.period = firstDay?.getDate() + '/' + (firstDay!.getMonth()+1) + '/' + firstDay?.getFullYear() + " - " + endDay?.getDate() + '/' + (endDay!.getMonth()+1) + '/' + endDay?.getFullYear();
@@ -5762,6 +5767,7 @@ export class SfIEvents extends LitElement {
5762
5767
  html = html.replace("FIN_RISK_RESIDUAL_MAX", this.formatIndianNumber(this.maxRiskResidual));
5763
5768
  html = html.replace("FIN_RISK_MITIGATED_MIN", this.formatIndianNumber(this.minRiskMitigated));
5764
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");
5765
5771
 
5766
5772
  if (this.selectedFeatures.indexOf("contracts") >= 0) {
5767
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';
@@ -18327,15 +18333,25 @@ export class SfIEvents extends LitElement {
18327
18333
 
18328
18334
  html += '<div class="m-20">';
18329
18335
  html += '<div part="detail-head"><strong>' + complianceFields[i] + '</strong></div>'
18330
- for (let attachmentStr of event[complianceFields[i]]) {
18331
- let attachment: any = {};
18332
- if (typeof attachmentStr === "object") {
18333
- attachment = attachmentStr;
18334
- } else {
18335
- 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>`
18336
18354
  }
18337
- // 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>`
18338
- 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>`
18339
18355
  }
18340
18356
  html += '</div>';
18341
18357
  }