@threatcaptain/tc-reports 0.2.18 → 0.2.19

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/dist/index.cjs CHANGED
@@ -52117,7 +52117,6 @@ const UnifiedCostBreakdownChart = ({
52117
52117
  ) }) });
52118
52118
  };
52119
52119
  const FinancialImpact = ({ reportData }) => {
52120
- var _a;
52121
52120
  const { clientData, simulationData } = reportData;
52122
52121
  const { industry } = clientData;
52123
52122
  const getIndustryRiskLevel = (industry2) => {
@@ -52328,6 +52327,7 @@ const FinancialImpact = ({ reportData }) => {
52328
52327
  };
52329
52328
  const riskLevel = getIndustryRiskLevel(industry);
52330
52329
  const dynamicCostBreakdown = createCostBreakdownFromSimulation(simulationData);
52330
+ const calculatedCost = simulationData.use_calculated_downtime === false ? simulationData.total_cost : simulationData.adjusted_total_cost;
52331
52331
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
52332
52332
  /* @__PURE__ */ jsxRuntime.jsx(
52333
52333
  "section",
@@ -52346,12 +52346,12 @@ const FinancialImpact = ({ reportData }) => {
52346
52346
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.DollarSign, { className: "w-8 h-8" }),
52347
52347
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-bold", children: "TOTAL POTENTIAL IMPACT" })
52348
52348
  ] }),
52349
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-4xl font-bold", children: simulationData.use_calculated_downtime === false ? formatCurrency(simulationData.total_cost) : formatCurrency(simulationData.adjusted_total_cost) }),
52349
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-4xl font-bold", children: formatCurrency(calculatedCost) }),
52350
52350
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm opacity-75 mt-2", children: [
52351
- "Cost Range: ",
52352
- formatCurrency(simulationData.total_cost * 0.8),
52353
- " - ",
52354
- formatCurrency(simulationData.total_cost * 1.2)
52351
+ "Cost Range:  ",
52352
+ formatCurrency(calculatedCost * 0.8),
52353
+ " -  ",
52354
+ formatCurrency(calculatedCost * 1.2)
52355
52355
  ] })
52356
52356
  ] }),
52357
52357
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
@@ -52412,9 +52412,7 @@ const FinancialImpact = ({ reportData }) => {
52412
52412
  business_downtime: dynamicCostBreakdown.business_downtime,
52413
52413
  regulatory_fines: dynamicCostBreakdown.regulatory_fines,
52414
52414
  reputation_damage: dynamicCostBreakdown.reputation_damage,
52415
- totalCost: parseInt(
52416
- ((_a = clientData.totalEstimatedCost) == null ? void 0 : _a.replace(/,/g, "")) || "0"
52417
- ) || clientData.totalCost
52415
+ totalCost: calculatedCost
52418
52416
  }
52419
52417
  ) }) }),
52420
52418
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3 space-y-4", children: [
@@ -53007,7 +53005,7 @@ const InsuranceHealthScore = ({ reportData }) => {
53007
53005
  break;
53008
53006
  case percentage >= 60:
53009
53007
  statusClass = "bg-yellow-500";
53010
- statusLabel = "NEEDS IMPROVEMENT";
53008
+ statusLabel = "FAIR";
53011
53009
  break;
53012
53010
  case (percentage < 60 && percentage > 0):
53013
53011
  statusClass = "bg-red-500";