[st] rename: entities 폴더 정리
This commit is contained in:
@@ -15,19 +15,17 @@ import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import type { ApiErrorResponse } from "@/shared/model";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
import { analysisApi } from "@/entities/statistics/api/analysis-api";
|
||||
import { analysisHistoryApi } from "@/entities/statistics/api/analysis-history-api";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import type {
|
||||
StAnlsMstResponse,
|
||||
StAnlsMstSearchParams,
|
||||
StAnlsOutlierListResponse,
|
||||
} from "@/entities/statistics/model/analysis-history-interface";
|
||||
import type {
|
||||
AnalysisRequestPayload,
|
||||
AnalysisResponseDto,
|
||||
} from "@/entities/statistics/model/analysis-interface";
|
||||
import { verificationHistoryColumns } from "@/entities/statistics/model/verification-history-columns";
|
||||
StAnlsMstResponse,
|
||||
StAnlsMstSearchParams,
|
||||
StAnlsOutlierListResponse,
|
||||
} from "@/entities/statistics";
|
||||
import { verificationHistoryColumns } from "@/entities/statistics";
|
||||
import { analysisApi } from "@/entities/statistics/api/analysis-api";
|
||||
import { analysisHistoryApi } from "@/entities/statistics/api/analysis-history-api";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import type { VerificationTargetCodeResponse } from "@/entities/statistics/model/verification-target-management-interface";
|
||||
import {
|
||||
Button,
|
||||
@@ -228,11 +226,7 @@ const HbStatisticsVerification = () => {
|
||||
state: {
|
||||
pagination: historyPagination,
|
||||
},
|
||||
onPaginationChange: (updater) => {
|
||||
setHistoryPagination((prev) =>
|
||||
typeof updater === "function" ? updater(prev) : updater,
|
||||
);
|
||||
},
|
||||
onPaginationChange: setHistoryPagination,
|
||||
meta: {
|
||||
onOutlierCellClick: (row: StAnlsMstResponse) => {
|
||||
setOutlierDialog({ open: true, anlsSn: row.anlsSn });
|
||||
|
||||
@@ -0,0 +1,520 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Line } from "react-chartjs-2";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
getPaginationRowModel,
|
||||
useReactTable,
|
||||
} from "@tanstack/react-table";
|
||||
import type { ChartOptions } from "chart.js";
|
||||
import {
|
||||
CategoryScale,
|
||||
Chart as ChartJS,
|
||||
Legend,
|
||||
LinearScale,
|
||||
LineElement,
|
||||
PointElement,
|
||||
Title,
|
||||
Tooltip as ChartTooltip,
|
||||
} from "chart.js";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeApi, CodeSelect } from "@/entities/code";
|
||||
import type {
|
||||
StAnlsMstResponse,
|
||||
StAnlsMstSearchParams,
|
||||
StAnlsRsltResponse,
|
||||
} from "@/entities/statistics";
|
||||
import {
|
||||
imrDetailGridColumnInfo,
|
||||
imrVerificationHistoryColumns,
|
||||
} from "@/entities/statistics";
|
||||
import { analysisHistoryApi } from "@/entities/statistics/api/analysis-history-api";
|
||||
import { imrApi } from "@/entities/statistics/api/imr-api";
|
||||
import { stAnlsRsltApi } from "@/entities/statistics/api/statistics-analysis-result-api";
|
||||
import {
|
||||
Button,
|
||||
DataTable,
|
||||
DateRangePicker,
|
||||
Label,
|
||||
LoadingWithAnimation,
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Title,
|
||||
ChartTooltip,
|
||||
Legend,
|
||||
);
|
||||
|
||||
type DateRangeValue = {
|
||||
from: Date;
|
||||
to?: Date;
|
||||
};
|
||||
|
||||
const EMPTY_DATA: never[] = [];
|
||||
|
||||
const ImrVerificationHistory = () => {
|
||||
// Area A Search States
|
||||
const [searchSido, setSearchSido] = useState<string>("");
|
||||
const [searchSigungu, setSearchSigungu] = useState<string>("");
|
||||
const [searchStatsCd, setSearchStatsCd] = useState<string>("");
|
||||
const [dateRange, setDateRange] = useState<DateRangeValue | undefined>({
|
||||
from: dayjs().subtract(1, "month").toDate(),
|
||||
to: dayjs().toDate(),
|
||||
});
|
||||
const [appliedSearchParams, setAppliedSearchParams] =
|
||||
useState<StAnlsMstSearchParams>({
|
||||
page: 0,
|
||||
size: 10,
|
||||
vrfcMthdCd: "IMR",
|
||||
sort: "anlsSn,desc",
|
||||
});
|
||||
|
||||
// Selected States
|
||||
const [selectedHistory, setSelectedHistory] =
|
||||
useState<StAnlsMstResponse | null>(null);
|
||||
const [selectedDetail, setSelectedDetail] =
|
||||
useState<StAnlsRsltResponse | null>(null);
|
||||
|
||||
// Area B Grid State
|
||||
const [gridRowData, setGridRowData] = useState<
|
||||
Record<string, string | number>[]
|
||||
>([]);
|
||||
|
||||
// Area A Pagination
|
||||
const [historyPagination, setHistoryPagination] = useState({
|
||||
pageIndex: 0,
|
||||
pageSize: 10,
|
||||
});
|
||||
|
||||
// Codes for Filter
|
||||
const { data: lwpoCodes } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "LAESECD"],
|
||||
queryFn: () => CodeApi.getCode("LAESECD"),
|
||||
});
|
||||
|
||||
const sidoOptions = useMemo(() => {
|
||||
if (!lwpoCodes) return [];
|
||||
return lwpoCodes.filter(
|
||||
(c) => c.lwpoCd.startsWith("G3") && c.lwpoCd.length === 4,
|
||||
);
|
||||
}, [lwpoCodes]);
|
||||
|
||||
const sigunguOptions = useMemo(() => {
|
||||
if (!lwpoCodes || searchSido === "") return [];
|
||||
return lwpoCodes.filter(
|
||||
(c) => c.lwpoCd.startsWith(searchSido) && c.lwpoCd.length === 7,
|
||||
);
|
||||
}, [lwpoCodes, searchSido]);
|
||||
|
||||
// Area A Data Fetching
|
||||
const { data: historyData } = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST,
|
||||
appliedSearchParams,
|
||||
historyPagination,
|
||||
],
|
||||
queryFn: () =>
|
||||
analysisHistoryApi.getAnalysisHistoryList({
|
||||
...appliedSearchParams,
|
||||
page: historyPagination.pageIndex,
|
||||
size: historyPagination.pageSize,
|
||||
}),
|
||||
});
|
||||
|
||||
const historyTable = useReactTable({
|
||||
data: historyData?.content ?? EMPTY_DATA,
|
||||
columns: imrVerificationHistoryColumns,
|
||||
getRowId: (row) => String(row.anlsSn),
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
getPaginationRowModel: getPaginationRowModel(),
|
||||
manualPagination: true,
|
||||
pageCount: historyData?.totalPages ?? 0,
|
||||
state: {
|
||||
pagination: historyPagination,
|
||||
rowSelection: selectedHistory
|
||||
? { [selectedHistory.anlsSn]: true }
|
||||
: {},
|
||||
},
|
||||
onPaginationChange: setHistoryPagination,
|
||||
});
|
||||
|
||||
// Area B Data Fetching
|
||||
const { data: detailData, isLoading: isDetailLoading } = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT,
|
||||
selectedHistory?.anlsSn,
|
||||
],
|
||||
queryFn: () =>
|
||||
stAnlsRsltApi.getImrResultList(selectedHistory!.anlsSn, {
|
||||
page: 0,
|
||||
size: 100,
|
||||
sort: "rsltSn,asc",
|
||||
}),
|
||||
enabled: !!selectedHistory,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!detailData || !detailData.content) {
|
||||
setGridRowData([]);
|
||||
return;
|
||||
}
|
||||
const mapped = detailData.content.map((item) => ({
|
||||
...item,
|
||||
statsNm: selectedHistory?.vrfcTrgtNm ?? "-",
|
||||
}));
|
||||
setGridRowData(mapped as unknown as Record<string, string | number>[]);
|
||||
}, [detailData, selectedHistory]);
|
||||
|
||||
// Area C Data Fetching
|
||||
const { data: chartData, isLoading: isChartLoading } = useQuery({
|
||||
queryKey: [
|
||||
"imr-log",
|
||||
selectedHistory?.anlsSn,
|
||||
selectedDetail?.vrfcTrgtSn,
|
||||
selectedDetail?.admdstCd,
|
||||
],
|
||||
queryFn: () =>
|
||||
imrApi.getOutliersLog({
|
||||
anlsSn: selectedHistory!.anlsSn,
|
||||
vrfcTrgtSn: selectedDetail!.vrfcTrgtSn,
|
||||
admdstCd: selectedDetail!.admdstCd,
|
||||
}),
|
||||
enabled: !!selectedHistory && !!selectedDetail,
|
||||
});
|
||||
|
||||
const handleSearch = () => {
|
||||
const params: StAnlsMstSearchParams = {
|
||||
vrfcMthdCd: "IMR",
|
||||
sort: "anlsSn,desc",
|
||||
};
|
||||
if (searchSido !== "")
|
||||
params.sewerBzmnCd =
|
||||
searchSigungu !== "" ? searchSigungu : searchSido;
|
||||
if (searchStatsCd) params.statsCd = searchStatsCd;
|
||||
if (dateRange?.from)
|
||||
params.verifyDtStart = dayjs(dateRange.from).format("YYYY-MM-DD");
|
||||
if (dateRange?.to)
|
||||
params.verifyDtEnd = dayjs(dateRange.to).format("YYYY-MM-DD");
|
||||
|
||||
setAppliedSearchParams(params);
|
||||
setHistoryPagination((prev) => ({ ...prev, pageIndex: 0 }));
|
||||
setSelectedHistory(null);
|
||||
setSelectedDetail(null);
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSearchSido("");
|
||||
setSearchSigungu("");
|
||||
setSearchStatsCd("");
|
||||
const defaultRange = {
|
||||
from: dayjs().subtract(1, "month").toDate(),
|
||||
to: dayjs().toDate(),
|
||||
};
|
||||
setDateRange(defaultRange);
|
||||
};
|
||||
|
||||
const chartOptions: ChartOptions<"line"> = useMemo(
|
||||
() => ({
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
legend: {
|
||||
position: "top" as const,
|
||||
labels: {
|
||||
font: {
|
||||
size: 12,
|
||||
},
|
||||
},
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: selectedDetail
|
||||
? `${selectedDetail.fcltNm} - I-MR 분석 차트`
|
||||
: "I-MR 분석 차트",
|
||||
font: {
|
||||
size: 16,
|
||||
weight: "bold",
|
||||
},
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: false,
|
||||
title: {
|
||||
display: true,
|
||||
text: "수치",
|
||||
},
|
||||
},
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: "연도",
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
[selectedDetail],
|
||||
);
|
||||
|
||||
const lineChartData = useMemo(() => {
|
||||
if (!chartData || !chartData.history) return null;
|
||||
|
||||
const labels = chartData.history.map((h) => String(h.year));
|
||||
const actualData = chartData.history.map((h) => h.x);
|
||||
const uclData = chartData.history.map((h) => h.ucl);
|
||||
const lclData = chartData.history.map((h) => h.lcl);
|
||||
const predictedData = chartData.history.map((h) => h.predicted);
|
||||
|
||||
return {
|
||||
labels,
|
||||
datasets: [
|
||||
{
|
||||
label: "실측치 (X)",
|
||||
data: actualData,
|
||||
borderColor: "rgb(75, 192, 192)",
|
||||
backgroundColor: "rgba(75, 192, 192, 0.5)",
|
||||
tension: 0.1,
|
||||
pointRadius: 4,
|
||||
pointHoverRadius: 6,
|
||||
},
|
||||
{
|
||||
label: "상한선 (UCL)",
|
||||
data: uclData,
|
||||
borderColor: "rgb(255, 99, 132)",
|
||||
backgroundColor: "rgba(255, 99, 132, 0.2)",
|
||||
borderDash: [5, 5],
|
||||
pointStyle: "false",
|
||||
fill: false,
|
||||
},
|
||||
{
|
||||
label: "하한선 (LCL)",
|
||||
data: lclData,
|
||||
borderColor: "rgb(54, 162, 235)",
|
||||
backgroundColor: "rgba(54, 162, 235, 0.2)",
|
||||
borderDash: [5, 5],
|
||||
pointStyle: "false",
|
||||
fill: false,
|
||||
},
|
||||
{
|
||||
label: "예측치 (Predicted)",
|
||||
data: predictedData,
|
||||
borderColor: "rgb(153, 102, 255)",
|
||||
backgroundColor: "rgba(153, 102, 255, 0.5)",
|
||||
borderDash: [2, 2],
|
||||
pointStyle: "false",
|
||||
fill: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
}, [chartData]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
{/* 영역 A: 검증 이력 그리드 + 검색 필터 */}
|
||||
<div className="card card-border bg-white p-6">
|
||||
<div className="flex flex-wrap items-end gap-6 p-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
시도
|
||||
</Label>
|
||||
<Select
|
||||
value={searchSido}
|
||||
onValueChange={(val) => {
|
||||
setSearchSido(val);
|
||||
setSearchSigungu("");
|
||||
}}
|
||||
>
|
||||
<SelectTrigger className="w-[14rem]">
|
||||
<SelectValue placeholder="시도 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{sidoOptions.map((opt) => (
|
||||
<SelectItem
|
||||
key={opt.lwpoCd}
|
||||
value={opt.lwpoCd}
|
||||
>
|
||||
{opt.lwpoCdNm}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
시군구
|
||||
</Label>
|
||||
<Select
|
||||
value={searchSigungu}
|
||||
onValueChange={setSearchSigungu}
|
||||
disabled={searchSido === ""}
|
||||
>
|
||||
<SelectTrigger className="w-[14rem]">
|
||||
<SelectValue placeholder="시군구 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{sigunguOptions.map((opt) => (
|
||||
<SelectItem
|
||||
key={opt.lwpoCd}
|
||||
value={opt.lwpoCd}
|
||||
>
|
||||
{opt.lwpoCdNm}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
검증일시
|
||||
</Label>
|
||||
<DateRangePicker
|
||||
value={dateRange}
|
||||
onValueChange={(val) =>
|
||||
setDateRange(
|
||||
val
|
||||
? { from: val.from!, to: val.to }
|
||||
: undefined,
|
||||
)
|
||||
}
|
||||
className="w-[20rem]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
통계항목
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="STITEM"
|
||||
value={searchStatsCd}
|
||||
onValueChange={setSearchStatsCd}
|
||||
placeholder="통계항목 선택"
|
||||
className="w-[22rem]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="ml-auto flex gap-2">
|
||||
<Button color="gray" onClick={handleReset}>
|
||||
초기화
|
||||
</Button>
|
||||
<Button onClick={handleSearch}>검색</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-2 pb-4">
|
||||
<DataTable
|
||||
table={historyTable}
|
||||
variant="secondary"
|
||||
onRowClick={(row) => {
|
||||
setSelectedHistory(row);
|
||||
setSelectedDetail(null);
|
||||
}}
|
||||
viewPagination={true}
|
||||
className="[&_td]:!p-0"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 gap-4 lg:grid-cols-2">
|
||||
{/* 영역 B: 상세 데이터 그리드 */}
|
||||
<div className="card card-border bg-white p-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="pl-2 text-[1.6rem] font-bold text-title">
|
||||
이상치 데이터
|
||||
</h2>
|
||||
<Button
|
||||
color="green"
|
||||
disabled={
|
||||
!detailData || detailData.content.length === 0
|
||||
}
|
||||
onClick={() => {
|
||||
if (selectedHistory) {
|
||||
stAnlsRsltApi.downloadExcel(
|
||||
selectedHistory.anlsSn,
|
||||
0,
|
||||
);
|
||||
}
|
||||
}}
|
||||
>
|
||||
다운로드
|
||||
</Button>
|
||||
</div>
|
||||
<div className="mt-2 h-[45rem]">
|
||||
{isDetailLoading ? (
|
||||
<div className="flex h-full w-full items-center justify-center">
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
</div>
|
||||
) : !selectedHistory || gridRowData.length === 0 ? (
|
||||
<div className="flex h-full w-full items-center justify-center text-[1.4rem] text-muted-foreground">
|
||||
{!selectedHistory
|
||||
? "항목을 선택해주세요."
|
||||
: "표시할 항목이 없습니다."}
|
||||
</div>
|
||||
) : (
|
||||
<DataGrid
|
||||
columnInfo={imrDetailGridColumnInfo}
|
||||
rowData={gridRowData}
|
||||
setRowData={setGridRowData}
|
||||
idFieldName="rsltSn"
|
||||
isExcelExport={false}
|
||||
isExcelImport={false}
|
||||
highlightedRowId={selectedDetail?.rsltSn}
|
||||
onRowClick={(e) => {
|
||||
if (!e.rowId) return;
|
||||
const row = detailData?.content?.find(
|
||||
(item) =>
|
||||
String(item.rsltSn) ===
|
||||
String(e.rowId),
|
||||
);
|
||||
if (row) setSelectedDetail(row);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 영역 C: Line Chart */}
|
||||
<div className="card card-border bg-white p-6">
|
||||
<h2 className="mb-4 text-[1.6rem] font-bold text-title">
|
||||
검증 결과 차트
|
||||
</h2>
|
||||
<div className="flex h-[45rem] items-center justify-center rounded-lg border bg-slate-50 p-4">
|
||||
{isChartLoading ? (
|
||||
<div className="relative size-[5rem]">
|
||||
<LoadingWithAnimation color="primary" />
|
||||
</div>
|
||||
) : lineChartData ? (
|
||||
<Line options={chartOptions} data={lineChartData} />
|
||||
) : (
|
||||
<div className="text-[1.4rem] text-muted-foreground">
|
||||
상세 데이터를 선택하면 차트가 표시됩니다.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ImrVerificationHistory;
|
||||
@@ -7,12 +7,12 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeSelect } from "@/entities/code/ui/code-select";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import {
|
||||
hbArticleColumnInfo,
|
||||
imrArticleColumnInfo,
|
||||
validationArticleColumnInfo,
|
||||
} from "@/entities/statistics/model/verification-article-column";
|
||||
} from "@/entities/statistics";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import type {
|
||||
VerificationTargetManagementResponse,
|
||||
VerificationTargetManagementSearchParams,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import type { StAnlsDtlResponse } from "@/entities/statistics/model/statistics-analysis-detail-interface";
|
||||
import type { StAnlsDtlResponse } from "@/entities/statistics";
|
||||
import { Button } from "@common/components";
|
||||
|
||||
import Indicators from "./Indicators";
|
||||
|
||||
@@ -4,10 +4,10 @@ import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeApi } from "@/entities/code/api/code-service";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics";
|
||||
import { useStAnlsRsltList } from "@/entities/statistics/api/queries";
|
||||
import { stAnlsRsltApi } from "@/entities/statistics/api/statistics-analysis-result-api";
|
||||
import { regionalGridColumnInfo as columnInfo } from "@/entities/statistics/model/regional-grid-columns";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics/model/statistics-analysis-result-interface";
|
||||
import {
|
||||
Button,
|
||||
LoadingWithAnimation,
|
||||
@@ -112,7 +112,7 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
if (appliedFilter.status) {
|
||||
data = data.filter(
|
||||
(item) =>
|
||||
item.otlrYn.toLowerCase() === appliedFilter.status,
|
||||
item.otlrYnCd.toLowerCase() === appliedFilter.status,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
|
||||
const mappedData = data.map((item) => ({
|
||||
...item,
|
||||
otlrYn: mapOtlrToLabel(item.otlrYn),
|
||||
otlrYn: mapOtlrToLabel(item.otlrYnCd),
|
||||
}));
|
||||
|
||||
setGridRowData(
|
||||
|
||||
@@ -19,11 +19,11 @@ import zoomPlugin from "chartjs-plugin-zoom";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeApi } from "@/entities/code/api/code-service";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics";
|
||||
import {
|
||||
useStAnlsChartData,
|
||||
useStAnlsRsltList,
|
||||
} from "@/entities/statistics/api/queries";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics/model/statistics-analysis-result-interface";
|
||||
import { LoadingWithAnimation } from "@common/components";
|
||||
|
||||
import type { AppliedFilter } from "./HbVerificationDetail";
|
||||
@@ -124,7 +124,7 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
|
||||
if (
|
||||
appliedFilter.status &&
|
||||
item.otlrYn.toLowerCase() !== appliedFilter.status
|
||||
item.otlrYnCd.toLowerCase() !== appliedFilter.status
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
item,
|
||||
};
|
||||
|
||||
if (item.otlrYn === "0") {
|
||||
if (item.otlrYnCd === "0") {
|
||||
normalPoints.push(pt);
|
||||
} else {
|
||||
outlierPoints.push(pt);
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
import React, { useEffect, useMemo } from "react";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
useReactTable,
|
||||
} from "@tanstack/react-table";
|
||||
import { getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import type { StAnlsDtlResponse } from "@/entities/statistics";
|
||||
import { getVerificationListColumns } from "@/entities/statistics";
|
||||
import { stAnlsDtlApi } from "@/entities/statistics/api/statistics-analysis-detail-api";
|
||||
import type { StAnlsDtlResponse } from "@/entities/statistics/model/statistics-analysis-detail-interface";
|
||||
import { getVerificationListColumns } from "@/entities/statistics/model/verification-list-columns";
|
||||
import { DataTable } from "@common/components";
|
||||
|
||||
interface VerificationListProps {
|
||||
|
||||
Reference in New Issue
Block a user