@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.js CHANGED
@@ -52099,7 +52099,6 @@ const UnifiedCostBreakdownChart = ({
52099
52099
  ) }) });
52100
52100
  };
52101
52101
  const FinancialImpact = ({ reportData }) => {
52102
- var _a;
52103
52102
  const { clientData, simulationData } = reportData;
52104
52103
  const { industry } = clientData;
52105
52104
  const getIndustryRiskLevel = (industry2) => {
@@ -52310,6 +52309,7 @@ const FinancialImpact = ({ reportData }) => {
52310
52309
  };
52311
52310
  const riskLevel = getIndustryRiskLevel(industry);
52312
52311
  const dynamicCostBreakdown = createCostBreakdownFromSimulation(simulationData);
52312
+ const calculatedCost = simulationData.use_calculated_downtime === false ? simulationData.total_cost : simulationData.adjusted_total_cost;
52313
52313
  return /* @__PURE__ */ jsxs(Fragment, { children: [
52314
52314
  /* @__PURE__ */ jsx(
52315
52315
  "section",
@@ -52328,12 +52328,12 @@ const FinancialImpact = ({ reportData }) => {
52328
52328
  /* @__PURE__ */ jsx(DollarSign, { className: "w-8 h-8" }),
52329
52329
  /* @__PURE__ */ jsx("h3", { className: "text-2xl font-bold", children: "TOTAL POTENTIAL IMPACT" })
52330
52330
  ] }),
52331
- /* @__PURE__ */ jsx("p", { className: "text-4xl font-bold", children: simulationData.use_calculated_downtime === false ? formatCurrency(simulationData.total_cost) : formatCurrency(simulationData.adjusted_total_cost) }),
52331
+ /* @__PURE__ */ jsx("p", { className: "text-4xl font-bold", children: formatCurrency(calculatedCost) }),
52332
52332
  /* @__PURE__ */ jsxs("p", { className: "text-sm opacity-75 mt-2", children: [
52333
- "Cost Range: ",
52334
- formatCurrency(simulationData.total_cost * 0.8),
52335
- " - ",
52336
- formatCurrency(simulationData.total_cost * 1.2)
52333
+ "Cost Range:  ",
52334
+ formatCurrency(calculatedCost * 0.8),
52335
+ " -  ",
52336
+ formatCurrency(calculatedCost * 1.2)
52337
52337
  ] })
52338
52338
  ] }),
52339
52339
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
@@ -52394,9 +52394,7 @@ const FinancialImpact = ({ reportData }) => {
52394
52394
  business_downtime: dynamicCostBreakdown.business_downtime,
52395
52395
  regulatory_fines: dynamicCostBreakdown.regulatory_fines,
52396
52396
  reputation_damage: dynamicCostBreakdown.reputation_damage,
52397
- totalCost: parseInt(
52398
- ((_a = clientData.totalEstimatedCost) == null ? void 0 : _a.replace(/,/g, "")) || "0"
52399
- ) || clientData.totalCost
52397
+ totalCost: calculatedCost
52400
52398
  }
52401
52399
  ) }) }),
52402
52400
  /* @__PURE__ */ jsxs("div", { className: "lg:col-span-3 space-y-4", children: [
@@ -52989,7 +52987,7 @@ const InsuranceHealthScore = ({ reportData }) => {
52989
52987
  break;
52990
52988
  case percentage >= 60:
52991
52989
  statusClass = "bg-yellow-500";
52992
- statusLabel = "NEEDS IMPROVEMENT";
52990
+ statusLabel = "FAIR";
52993
52991
  break;
52994
52992
  case (percentage < 60 && percentage > 0):
52995
52993
  statusClass = "bg-red-500";