feat: Add Zustand for state management and enhance modal handling

- Integrated Zustand for improved state management across components.
- Updated modal components to handle visibility based on active tabs, ensuring better user experience.
- Refactored various components to utilize the new tab store for managing active tab states.
- Enhanced number formatting utility to streamline number and currency display across the application.

Made-with: Cursor
This commit is contained in:
2026-02-27 14:25:53 +09:00
parent 7acdd852a5
commit d04dc4c050
25 changed files with 1437 additions and 135 deletions

View File

@@ -6,6 +6,7 @@ import { AggregationWidgetConfig, AggregationItem, AggregationResult, Aggregatio
import { Calculator, TrendingUp, Hash, ArrowUp, ArrowDown, Loader2 } from "lucide-react";
import { cn } from "@/lib/utils";
import { useScreenMultiLang } from "@/contexts/ScreenMultiLangContext";
import { formatNumber } from "@/lib/formatting";
import { apiClient } from "@/lib/api/client";
import { v2EventBus, V2_EVENTS, V2ErrorBoundary } from "@/lib/v2-core";
@@ -566,11 +567,11 @@ export function AggregationWidgetComponent({
let formattedValue = value.toFixed(item.decimalPlaces ?? 0);
if (item.format === "currency") {
formattedValue = new Intl.NumberFormat("ko-KR").format(value);
formattedValue = formatNumber(value);
} else if (item.format === "percent") {
formattedValue = `${(value * 100).toFixed(item.decimalPlaces ?? 1)}%`;
} else if (item.format === "number") {
formattedValue = new Intl.NumberFormat("ko-KR").format(value);
formattedValue = formatNumber(value);
}
if (item.prefix) {