57 lines
1.5 KiB
TypeScript
57 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
|
|
import {
|
|
Button,
|
|
Dialog,
|
|
DialogClose,
|
|
DialogContent,
|
|
DialogFooter,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
} from "@common/components";
|
|
|
|
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
|
|
|
export interface LogHistoryDetailDialogProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
row: Record<string, string | number> | null;
|
|
}
|
|
|
|
export function LogHistoryDetailDialog({
|
|
open,
|
|
onOpenChange,
|
|
row,
|
|
}: LogHistoryDetailDialogProps) {
|
|
useEffect(() => {
|
|
if (!open || !row) return;
|
|
|
|
const sn = row.statsLogSn;
|
|
void (async () => {
|
|
const response = await statisticsApi.getLogDetail(
|
|
sn !== undefined && sn !== null ? String(sn) : "",
|
|
);
|
|
console.log(response.data);
|
|
})();
|
|
}, [open, row]);
|
|
|
|
return (
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
<DialogContent className="max-w-[60rem]" aria-describedby={undefined}>
|
|
<DialogHeader>
|
|
<DialogTitle />
|
|
</DialogHeader>
|
|
<DialogFooter>
|
|
<DialogClose asChild>
|
|
<Button size="lg" color="white" type="button">
|
|
닫기
|
|
</Button>
|
|
</DialogClose>
|
|
</DialogFooter>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|