2025-10-31 11:02:06 +09:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import React from "react";
|
|
|
|
|
import { QueryResult } from "../types";
|
|
|
|
|
import { Label } from "@/components/ui/label";
|
|
|
|
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
|
|
|
|
import { AlertCircle } from "lucide-react";
|
|
|
|
|
|
|
|
|
|
interface RiskAlertSectionProps {
|
|
|
|
|
queryResult: QueryResult | null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 리스크 알림 위젯 설정 섹션
|
|
|
|
|
* - 알림 설정
|
2026-03-10 18:30:18 +09:00
|
|
|
*
|
2025-10-31 11:02:06 +09:00
|
|
|
* TODO: 상세 설정 UI 추가 필요
|
|
|
|
|
*/
|
|
|
|
|
export function RiskAlertSection({ queryResult }: RiskAlertSectionProps) {
|
|
|
|
|
// 쿼리 결과가 없으면 안내 메시지 표시
|
|
|
|
|
if (!queryResult || !queryResult.columns || queryResult.columns.length === 0) {
|
|
|
|
|
return (
|
2026-03-10 18:30:18 +09:00
|
|
|
<div className="bg-background rounded-lg p-3 shadow-sm">
|
2025-10-31 11:02:06 +09:00
|
|
|
<Label className="mb-2 block text-xs font-semibold">리스크 알림 설정</Label>
|
|
|
|
|
<Alert>
|
|
|
|
|
<AlertCircle className="h-4 w-4" />
|
2026-03-10 18:30:18 +09:00
|
|
|
<AlertDescription className="text-xs">먼저 데이터 소스를 설정하고 쿼리를 테스트해주세요.</AlertDescription>
|
2025-10-31 11:02:06 +09:00
|
|
|
</Alert>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2026-03-10 18:30:18 +09:00
|
|
|
<div className="bg-background rounded-lg p-3 shadow-sm">
|
2025-10-31 11:02:06 +09:00
|
|
|
<Label className="mb-2 block text-xs font-semibold">리스크 알림 설정</Label>
|
|
|
|
|
<Alert>
|
|
|
|
|
<AlertCircle className="h-4 w-4" />
|
2026-03-10 18:30:18 +09:00
|
|
|
<AlertDescription className="text-xs">리스크 알림 상세 설정 UI는 추후 추가 예정입니다.</AlertDescription>
|
2025-10-31 11:02:06 +09:00
|
|
|
</Alert>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|