@threatcaptain/tc-reports 0.2.7 → 0.2.8

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
@@ -28751,7 +28751,7 @@ const Dashboard = () => {
28751
28751
  };
28752
28752
  const BreachLikelihood = ({ reportData }) => {
28753
28753
  var _a;
28754
- const { clientData, securityAssessment, user } = reportData;
28754
+ const { clientData, securityAssessment, mspInfo } = reportData;
28755
28755
  const calculateBreachLikelihood = (protectionLevel) => {
28756
28756
  if ((securityAssessment == null ? void 0 : securityAssessment.overall_breach_likelihood) !== null && (securityAssessment == null ? void 0 : securityAssessment.overall_breach_likelihood) !== void 0) {
28757
28757
  return Math.round(securityAssessment.overall_breach_likelihood);
@@ -29282,7 +29282,14 @@ const BreachLikelihood = ({ reportData }) => {
29282
29282
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-lg mb-4", children: [
29283
29283
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: "Contact:" }),
29284
29284
  " ",
29285
- (user == null ? void 0 : user.email) || "contact@company.com"
29285
+ (mspInfo == null ? void 0 : mspInfo.contact_email) ? /* @__PURE__ */ jsxRuntime.jsx(
29286
+ "a",
29287
+ {
29288
+ href: `mailto:${mspInfo == null ? void 0 : mspInfo.contact_email}`,
29289
+ className: "underline",
29290
+ children: mspInfo == null ? void 0 : mspInfo.contact_email
29291
+ }
29292
+ ) : "contact@company.com"
29286
29293
  ] }),
29287
29294
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm opacity-80", children: "Every day you wait is another day criminals could strike. Every protection you add makes your business safer." })
29288
29295
  ] })
@@ -29611,7 +29618,7 @@ const UnifiedCostBreakdownChart = ({
29611
29618
  };
29612
29619
  const FinancialImpact = ({ reportData }) => {
29613
29620
  var _a;
29614
- const { clientData, simulationData, user } = reportData;
29621
+ const { clientData, simulationData, mspInfo } = reportData;
29615
29622
  const { industry } = clientData;
29616
29623
  const displayExecutiveSummary = () => {
29617
29624
  if (clientData.executiveSummary) return clientData.executiveSummary;
@@ -30034,7 +30041,7 @@ const FinancialImpact = ({ reportData }) => {
30034
30041
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-slate-600 mb-4", children: "Let's discuss these findings and develop a customized cybersecurity roadmap for your organization." }),
30035
30042
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-slate-600", children: [
30036
30043
  "Contact us at: ",
30037
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-900", children: (user == null ? void 0 : user.email) || /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red", fontWeight: "bold" }, children: "NEEDS MSP EMAIL ADDRESS" }) })
30044
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-900", children: (mspInfo == null ? void 0 : mspInfo.contact_email) ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${mspInfo == null ? void 0 : mspInfo.contact_email}`, className: "underline", children: mspInfo == null ? void 0 : mspInfo.contact_email }) : "contact@company.com" })
30038
30045
  ] })
30039
30046
  ] })
30040
30047
  ] }),
@@ -30729,8 +30736,7 @@ const ReportBuilder = ({
30729
30736
  clientData,
30730
30737
  assessmentData,
30731
30738
  simulationData,
30732
- mspCompanyName,
30733
- user
30739
+ mspInfo
30734
30740
  }) => {
30735
30741
  const [searchParams] = reactRouterDom.useSearchParams();
30736
30742
  const reportTemplate = searchParams.get("template");
@@ -30767,10 +30773,10 @@ const ReportBuilder = ({
30767
30773
  id: "print-report",
30768
30774
  className: "report-wrapper max-w-4xl mx-auto bg-white p-8 space-y-8",
30769
30775
  children: [
30770
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-20 h-20 bg-slate-200 rounded-lg flex items-center justify-center", children: clientData.logo ? /* @__PURE__ */ jsxRuntime.jsx(
30776
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-20 h-20 bg-slate-200 rounded-lg flex items-center justify-center", children: mspInfo.company_logo ? /* @__PURE__ */ jsxRuntime.jsx(
30771
30777
  "img",
30772
30778
  {
30773
- src: clientData.logo,
30779
+ src: mspInfo.company_logo,
30774
30780
  alt: "MSP Logo",
30775
30781
  className: "w-full h-full object-contain rounded-lg"
30776
30782
  }
@@ -30786,7 +30792,7 @@ const ReportBuilder = ({
30786
30792
  ] }),
30787
30793
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
30788
30794
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-700", children: "Prepared By:" }),
30789
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-900", children: mspCompanyName || /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red", fontWeight: "bold" }, children: "NEEDS ACTUAL MSP NAME" }) })
30795
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-900", children: mspInfo.company_name || /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red", fontWeight: "bold" }, children: "NEEDS ACTUAL MSP NAME" }) })
30790
30796
  ] }),
30791
30797
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
30792
30798
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-700", children: "Assessment Date:" }),
@@ -30799,20 +30805,20 @@ const ReportBuilder = ({
30799
30805
  reportData: {
30800
30806
  clientData,
30801
30807
  simulationData: financialSimulationData,
30802
- user
30808
+ mspInfo
30803
30809
  }
30804
30810
  }
30805
30811
  ),
30806
30812
  showBreachLikelihood && /* @__PURE__ */ jsxRuntime.jsx(
30807
30813
  BreachLikelihood,
30808
30814
  {
30809
- reportData: { clientData, securityAssessment, user }
30815
+ reportData: { clientData, securityAssessment, mspInfo }
30810
30816
  }
30811
30817
  ),
30812
30818
  showInsuranceHealthScore && /* @__PURE__ */ jsxRuntime.jsx(
30813
30819
  InsuranceHealthScore,
30814
30820
  {
30815
- reportData: { clientData, insuranceHealthData }
30821
+ reportData: { clientData, insuranceHealthData, mspInfo }
30816
30822
  }
30817
30823
  ),
30818
30824
  /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "report-page text-center pt-8 border-t border-slate-200", children: [
@@ -30821,7 +30827,7 @@ const ReportBuilder = ({
30821
30827
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-slate-400 mt-2", children: [
30822
30828
  "Generated by",
30823
30829
  " ",
30824
- mspCompanyName ? mspCompanyName : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red", fontWeight: "bold" }, children: "NEEDS ACTUAL MSP NAME" }),
30830
+ mspInfo.company_name ? mspInfo.company_name : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red", fontWeight: "bold" }, children: "NEEDS ACTUAL MSP NAME" }),
30825
30831
  " on ",
30826
30832
  (/* @__PURE__ */ new Date()).toLocaleDateString()
30827
30833
  ] })