@dilipod/ui 0.4.21 → 0.4.22
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/components/impact-metrics-form.d.ts.map +1 -1
- package/dist/components/scenarios-manager.d.ts.map +1 -1
- package/dist/components/workflow-viewer.d.ts +1 -1
- package/dist/components/workflow-viewer.d.ts.map +1 -1
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/impact-metrics-form.tsx +17 -6
- package/src/components/scenarios-manager.tsx +3 -0
- package/src/components/workflow-viewer.tsx +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4227,6 +4227,7 @@ function ScenarioCard({
|
|
|
4227
4227
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 flex-1 min-w-0", children: [
|
|
4228
4228
|
/* @__PURE__ */ jsx("div", { className: cn("w-8 h-8 rounded-full flex items-center justify-center shrink-0", config.bgColor), children: /* @__PURE__ */ jsx(Icon, { size: 16, weight: "fill", className: config.color }) }),
|
|
4229
4229
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 pt-0.5", children: [
|
|
4230
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 mb-1.5", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", size: "sm", className: "font-medium", children: config.label }) }),
|
|
4230
4231
|
/* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--black)]", children: [
|
|
4231
4232
|
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "When:" }),
|
|
4232
4233
|
" ",
|
|
@@ -4607,6 +4608,7 @@ function ImpactMetricsForm({
|
|
|
4607
4608
|
const impliedFrequencyPerMonth = Math.round(impliedFrequencyPerYear / 12);
|
|
4608
4609
|
const laborSavingsPerYear = metrics.fte_equivalent * HOURS_PER_FTE_YEAR * metrics.hourly_rate_euros;
|
|
4609
4610
|
const netAnnualSavings = laborSavingsPerYear - workerCostPerYear;
|
|
4611
|
+
const roiPercentage = workerCostPerYear > 0 ? netAnnualSavings / workerCostPerYear * 100 : 0;
|
|
4610
4612
|
return /* @__PURE__ */ jsx(Card, { className: cn("border-[var(--cyan)]/20 bg-gradient-to-br from-white to-[var(--cyan)]/5", className), children: /* @__PURE__ */ jsxs(CardContent, { className: "p-5", children: [
|
|
4611
4613
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4612
4614
|
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: "Impact Metrics (ROI)" }),
|
|
@@ -4724,17 +4726,32 @@ function ImpactMetricsForm({
|
|
|
4724
4726
|
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-0.5", children: [
|
|
4725
4727
|
"\u20AC",
|
|
4726
4728
|
laborSavingsPerYear.toLocaleString(void 0, { maximumFractionDigits: 0 }),
|
|
4729
|
+
" ",
|
|
4730
|
+
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: "labor saved" }),
|
|
4727
4731
|
" \u2212 \u20AC",
|
|
4728
|
-
workerCostPerYear
|
|
4732
|
+
workerCostPerYear,
|
|
4733
|
+
" ",
|
|
4734
|
+
/* @__PURE__ */ jsx("span", { className: "opacity-60", children: "worker cost" })
|
|
4729
4735
|
] })
|
|
4730
4736
|
] })
|
|
4731
4737
|
] }),
|
|
4732
|
-
|
|
4733
|
-
"
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-4 pt-3 border-t border-border/50 flex items-center justify-between", children: [
|
|
4739
|
+
/* @__PURE__ */ jsxs("p", { className: cn(
|
|
4740
|
+
"text-sm",
|
|
4741
|
+
roiPercentage > 0 ? "font-bold text-[var(--cyan)]" : "text-muted-foreground"
|
|
4742
|
+
), children: [
|
|
4743
|
+
"ROI: ",
|
|
4744
|
+
roiPercentage >= 0 ? "+" : "",
|
|
4745
|
+
roiPercentage.toLocaleString(void 0, { maximumFractionDigits: 0 }),
|
|
4746
|
+
"%"
|
|
4747
|
+
] }),
|
|
4748
|
+
impliedFrequencyPerYear > 0 && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
4749
|
+
"Implied: ~",
|
|
4750
|
+
impliedFrequencyPerMonth,
|
|
4751
|
+
"\xD7/month (",
|
|
4752
|
+
impliedFrequencyPerYear,
|
|
4753
|
+
"\xD7/year)"
|
|
4754
|
+
] })
|
|
4738
4755
|
] })
|
|
4739
4756
|
] }) });
|
|
4740
4757
|
}
|