{cards.map((c) => (
@@ -39,7 +46,15 @@ async function SummaryCards() {
{tr.dashboard.cards[c.key]}
- {c.amountMinor === null ? "—" : formatMoney(c.amountMinor)}
+ {c.amountMinor === null ? (
+ "—"
+ ) : c.href ? (
+
+ {formatMoney(c.amountMinor)}
+
+ ) : (
+ formatMoney(c.amountMinor)
+ )}
{c.amountMinor === null ? (
@@ -68,7 +83,7 @@ export default async function DashboardPage() {
}>
-
+
>
);
diff --git a/src/components/layout/nav-config.ts b/src/components/layout/nav-config.ts
index f4251e3..36571a8 100644
--- a/src/components/layout/nav-config.ts
+++ b/src/components/layout/nav-config.ts
@@ -27,7 +27,7 @@ export type NavItem = {
/** Şu an tamamlanmış en yüksek faz — sayfalar eklendikçe artar. */
/** Alt fazlar ondalıkla: 6.1 = Faz 6a. */
-export const CURRENT_PHASE = 9.1;
+export const CURRENT_PHASE = 9.2;
export const isAvailable = (item: NavItem) => item.phase <= CURRENT_PHASE;
diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx
new file mode 100644
index 0000000..1bc077d
--- /dev/null
+++ b/src/components/ui/chart.tsx
@@ -0,0 +1,338 @@
+"use client";
+
+import * as React from "react";
+import { cn } from "@/lib/utils";
+import * as RechartsPrimitive from "recharts";
+import type { TooltipValueType } from "recharts";
+
+// Format: { THEME_NAME: CSS_SELECTOR }
+const THEMES = { light: "", dark: ".dark" } as const;
+
+const INITIAL_DIMENSION = { width: 320, height: 200 } as const;
+type TooltipNameType = number | string;
+
+export type ChartConfig = Record<
+ string,
+ {
+ label?: React.ReactNode;
+ icon?: React.ComponentType;
+ } & (
+ | { color?: string; theme?: never }
+ | { color?: never; theme: Record
}
+ )
+>;
+
+type ChartContextProps = {
+ config: ChartConfig;
+};
+
+const ChartContext = React.createContext(null);
+
+function useChart() {
+ const context = React.useContext(ChartContext);
+
+ if (!context) {
+ throw new Error("useChart must be used within a ");
+ }
+
+ return context;
+}
+
+function ChartContainer({
+ id,
+ className,
+ children,
+ config,
+ initialDimension = INITIAL_DIMENSION,
+ ...props
+}: React.ComponentProps<"div"> & {
+ config: ChartConfig;
+ children: React.ComponentProps["children"];
+ initialDimension?: {
+ width: number;
+ height: number;
+ };
+}) {
+ const uniqueId = React.useId();
+ const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
+
+ return (
+
+
+
+
+ {children}
+
+
+
+ );
+}
+
+const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
+ const colorConfig = Object.entries(config).filter(([, config]) => config.theme ?? config.color);
+
+ if (!colorConfig.length) {
+ return null;
+ }
+
+ return (
+