@threatcaptain/tc-reports 0.2.17 → 0.2.18

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
@@ -52985,13 +52985,11 @@ const InsuranceHealthScore = ({ reportData }) => {
52985
52985
  ] })
52986
52986
  ] }),
52987
52987
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "report-page space-y-6 border-t border-slate-200 pt-8", children: [
52988
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
52989
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-slate-900 mb-2", children: "Your Insurance Health Score Results" }),
52990
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-slate-600", children: "Assessment results and category breakdown" })
52991
- ] }),
52992
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-6 gap-8", children: [
52993
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:col-span-3 flex flex-col items-center space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(InsuranceHealthGauge, { score, size: 320 }) }),
52994
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "md:col-span-3 space-y-4", children: [
52988
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-bold text-slate-900 mb-2", children: "Your Insurance Health Score Results" }),
52989
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-slate-600", children: "Assessment results and category breakdown" }),
52990
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [
52991
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(InsuranceHealthGauge, { score, size: 320 }) }),
52992
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
52995
52993
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-semibold text-slate-900", children: "Security Category Scores" }),
52996
52994
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: (() => {
52997
52995
  if (insuranceHealthData.responses) {
@@ -53000,13 +52998,24 @@ const InsuranceHealthScore = ({ reportData }) => {
53000
52998
  );
53001
52999
  return domains.map((domain, index2) => {
53002
53000
  let statusClass = "";
53001
+ let statusLabel = "";
53003
53002
  const percentage = domain.percentage || 0;
53004
- if (percentage === 0) {
53005
- statusClass = "bg-red-500";
53006
- } else if (percentage === 100) {
53007
- statusClass = "bg-green-500";
53008
- } else {
53009
- statusClass = "bg-yellow-600";
53003
+ switch (true) {
53004
+ case percentage >= 80:
53005
+ statusClass = "bg-green-500";
53006
+ statusLabel = "PASS";
53007
+ break;
53008
+ case percentage >= 60:
53009
+ statusClass = "bg-yellow-500";
53010
+ statusLabel = "NEEDS IMPROVEMENT";
53011
+ break;
53012
+ case (percentage < 60 && percentage > 0):
53013
+ statusClass = "bg-red-500";
53014
+ statusLabel = "FAIL";
53015
+ break;
53016
+ default:
53017
+ statusClass = "bg-gray-400";
53018
+ statusLabel = "MISSING";
53010
53019
  }
53011
53020
  return /* @__PURE__ */ jsxRuntime.jsxs(
53012
53021
  "div",
@@ -53015,11 +53024,7 @@ const InsuranceHealthScore = ({ reportData }) => {
53015
53024
  children: [
53016
53025
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between mb-1 text-sm", children: [
53017
53026
  /* @__PURE__ */ jsxRuntime.jsx("h5", { className: "font-medium text-slate-900", children: domain.name }),
53018
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-gray-400", children: [
53019
- domain.score,
53020
- "/",
53021
- domain.maxScore
53022
- ] })
53027
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-gray-400", children: statusLabel })
53023
53028
  ] }),
53024
53029
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-gray-200 rounded-full h-3", children: /* @__PURE__ */ jsxRuntime.jsx(
53025
53030
  "div",