Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8d704aec1 | ||
|
|
9ef58ef153 | ||
|
|
9d7ceb69b1 | ||
|
|
3fb1fe870b | ||
|
|
ff2b79aaa6 | ||
|
|
64e7a1f43f | ||
|
|
97a67bfd55 |
+5
-1
@@ -1,3 +1,7 @@
|
||||
#!/bin/sh
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
pnpm turbo run build --filter="...[origin/$BRANCH]"
|
||||
echo "Branch: $BRANCH"
|
||||
echo "Changed packages (dry-run):"
|
||||
pnpm turbo run build --filter="...[origin/$BRANCH]" --dry-run
|
||||
echo "Starting build..."
|
||||
pnpm turbo run build --filter="...[origin/$BRANCH]"
|
||||
@@ -76,7 +76,7 @@ export default function WithBaseLayout({
|
||||
// menuList에서 활성 탭의 메뉴 찾기
|
||||
const findMenuByEngNm = (items: MenuItem[]): MenuItem | null => {
|
||||
for (const item of items) {
|
||||
if (item.menuEngNm === activeTabId) {
|
||||
if (item.urlPath === activeTabId) {
|
||||
return item;
|
||||
}
|
||||
if (item.children) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
import baseEsLintConfig from "../../eslint.config.mjs";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
@@ -11,6 +12,7 @@ const compat = new FlatCompat({
|
||||
|
||||
const eslintConfig = [
|
||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||
...baseEsLintConfig,
|
||||
{
|
||||
rules: {
|
||||
"react-hooks/exhaustive-deps": "off",
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
"@types/xlsx": "^0.0.36",
|
||||
"axios": "^1.8.1",
|
||||
"chart.js": "^4.4.8",
|
||||
"chartjs-plugin-zoom": "^2.2.0",
|
||||
"dayjs": "^1.11.13",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -62,6 +63,7 @@
|
||||
"@types/webpack": "^5.28.5",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.1.7",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"postcss": "^8",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
.card {
|
||||
margin: 0.5rem !important;
|
||||
padding: 0.5rem !important;
|
||||
}
|
||||
|
||||
@@ -92,20 +92,20 @@ function toNum(v: unknown): number {
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// if (!gridEl) return;
|
||||
|
||||
|
||||
// columns.forEach((col) => {
|
||||
// if (!col.fieldName && !col.name) return;
|
||||
|
||||
|
||||
// const fieldName = col.fieldName || col.name;
|
||||
// const direction = sortDir[fieldName] || sortDir[col.name] || "none";
|
||||
// if (direction === "none") return;
|
||||
|
||||
|
||||
// // 헤더 셀 찾기 (fieldName 또는 name으로)
|
||||
// const headerCells = gridEl.querySelectorAll('.rg-header-cell, [class*="header"], .rg-header');
|
||||
// let targetCell: HTMLElement | null = null;
|
||||
|
||||
|
||||
// headerCells.forEach((cell) => {
|
||||
// const el = cell as HTMLElement;
|
||||
// const text = el.textContent?.trim();
|
||||
@@ -121,17 +121,17 @@ function toNum(v: unknown): number {
|
||||
// targetCell = el;
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// if (!targetCell) return;
|
||||
|
||||
|
||||
// const headerCell = targetCell as HTMLElement;
|
||||
|
||||
|
||||
// // 기존 화살표 제거
|
||||
// const existingIndicator = headerCell.querySelector(".rg-sort-indicator") as HTMLElement | null;
|
||||
// if (existingIndicator) {
|
||||
// existingIndicator.remove();
|
||||
// }
|
||||
|
||||
|
||||
// // 화살표 추가
|
||||
// const indicator = document.createElement("span");
|
||||
// indicator.className = "rg-sort-indicator";
|
||||
@@ -164,7 +164,7 @@ function createOnSortingHandler(
|
||||
const groupField = mergeCellCol?.fieldName || null;
|
||||
const orderByField = 'displayYear'; // 고정값 또는 설정 가능하게 할 수 있음
|
||||
const hasMergeCells = mergeCellCols.length > 0;
|
||||
|
||||
|
||||
return function onSorting(g: unknown, fields: unknown[], _directions: unknown[]) {
|
||||
const grid = g as { getColumn?: (i: number) => { fieldName?: string; name?: string } | undefined; getDataSource?: () => { getRowCount(): number; getValue(r: number, f: string): unknown } };
|
||||
const idx = fields?.[0];
|
||||
@@ -178,10 +178,10 @@ function createOnSortingHandler(
|
||||
if (!sortField) return true;
|
||||
const col = columns.find((c) => (c.fieldName === sortField || c.name === sortField));
|
||||
if (!col || col.sortdisable) return true;
|
||||
|
||||
|
||||
// mergeCells: true인 컬럼이 없으면 RealGrid 기본 정렬 사용
|
||||
if (!hasMergeCells || !groupField) return true;
|
||||
|
||||
|
||||
const ds = grid.getDataSource?.();
|
||||
if (!ds) return true;
|
||||
const cnt = ds.getRowCount();
|
||||
@@ -229,7 +229,7 @@ function sortRowsGroupPreserving(
|
||||
if (!groups.has(k)) groups.set(k, []);
|
||||
groups.get(k)!.push(r);
|
||||
}
|
||||
|
||||
|
||||
// valueType에 따라 비교 함수 선택
|
||||
const compareValue = (val: unknown): number | string => {
|
||||
if (valueType === ValueType.NUMBER) {
|
||||
@@ -238,7 +238,7 @@ function sortRowsGroupPreserving(
|
||||
// 텍스트나 기타 타입은 문자열로 비교
|
||||
return String(val ?? "");
|
||||
};
|
||||
|
||||
|
||||
const rep = (arr: Record<string, string | number>[]): number | string => {
|
||||
const values = arr.map((r) => compareValue(r[sortField]));
|
||||
if (valueType === ValueType.NUMBER) {
|
||||
@@ -253,7 +253,7 @@ function sortRowsGroupPreserving(
|
||||
return sortAsc ? (strs[0] as string) : (strs[strs.length - 1] as string);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const entries = [...groups.entries()].sort((a, b) => {
|
||||
const valA = rep(a[1]);
|
||||
const valB = rep(b[1]);
|
||||
@@ -265,7 +265,7 @@ function sortRowsGroupPreserving(
|
||||
const strB = String(valB);
|
||||
return (sortAsc ? 1 : -1) * strA.localeCompare(strB);
|
||||
});
|
||||
|
||||
|
||||
return entries.flatMap(([, arr]) => arr);
|
||||
}
|
||||
|
||||
@@ -306,9 +306,10 @@ function createNumberComparer(dp: RealGridDataProviderComparer): (field: string
|
||||
};
|
||||
}
|
||||
|
||||
const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, rows = [], showHeaderCheckbox = false, rowDataMap, setRowDataMap, activeTab: activeTabProp, onActiveTabChange }: TabDataGridProps) => {
|
||||
const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, rows = [], showHeaderCheckbox = false, rowDataMap, setRowDataMap, activeTab: activeTabProp, onActiveTabChange, getGridDataRef }: TabDataGridProps) => {
|
||||
// 각 탭별로 그리드 ref와 데이터를 관리
|
||||
const gridRefs = useRef<Map<string, RealGridReact>>(new Map());
|
||||
const activeTabRef = useRef<string>("");
|
||||
const fileInputRefs = useRef<Map<string, HTMLInputElement>>(new Map());
|
||||
// 각 탭별로 정렬 상태 관리
|
||||
const sortDirRefs = useRef<Map<string, React.MutableRefObject<Record<string, "asc" | "desc" | "none">>>>(new Map());
|
||||
@@ -323,7 +324,8 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
});
|
||||
const isControlled = activeTabProp !== undefined;
|
||||
const activeTab = isControlled ? activeTabProp : internalActiveTab;
|
||||
const setActiveTab = isControlled ? (onActiveTabChange ?? (() => {})) : setInternalActiveTab;
|
||||
const setActiveTab = isControlled ? (onActiveTabChange ?? (() => { })) : setInternalActiveTab;
|
||||
activeTabRef.current = activeTab;
|
||||
|
||||
const exportExcel = (tabKey: string) => {
|
||||
const currentRowData = rowDataMap.get(tabKey) || [];
|
||||
@@ -345,7 +347,7 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
|
||||
const columnInfoItem = columnInfo.find(info => info.tabKey === tabKey);
|
||||
if (!columnInfoItem) return;
|
||||
|
||||
|
||||
const tabLabel = columnInfoItem.tabLabel || tabKey;
|
||||
const columns = columnInfoItem.columns || [];
|
||||
const columnLayout = columnInfoItem.columnLayout || [];
|
||||
@@ -520,7 +522,7 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
const columns = columnInfoItem.columns || [];
|
||||
headers.forEach((headerText, colIndex) => {
|
||||
let fieldName: string | null = null;
|
||||
|
||||
|
||||
// 헤더에 fieldName이 포함된 경우 (예: "합계 (swgeProcZoneInnerSm)")
|
||||
const fieldNameMatch = headerText.match(/\(([a-zA-Z_][a-zA-Z0-9_]*)\)$/);
|
||||
if (fieldNameMatch && fieldNameMatch[1]) {
|
||||
@@ -529,13 +531,13 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
fieldName = extractedFieldName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 매칭 실패 시 원본 헤더 텍스트 사용
|
||||
if (!fieldName) {
|
||||
console.warn(`엑셀 컬럼 ${colIndex + 1} (헤더: "${headerText}") 매칭 실패 → 헤더 텍스트를 fieldName으로 사용`);
|
||||
fieldName = headerText;
|
||||
}
|
||||
|
||||
|
||||
headerToFieldNameMap.set(headerText, fieldName);
|
||||
});
|
||||
|
||||
@@ -656,6 +658,41 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
});
|
||||
}, [rowDataMap, columnInfo]);
|
||||
|
||||
// getGridDataRef: 현재 활성 탭 그리드 데이터 반환 함수 할당
|
||||
useEffect(() => {
|
||||
if (!getGridDataRef) return;
|
||||
getGridDataRef.current = () => {
|
||||
const tabKey = activeTabRef.current;
|
||||
const gridRef = gridRefs.current.get(tabKey);
|
||||
const gv = gridRef?.gridView as
|
||||
| {
|
||||
getDataSource?: () => {
|
||||
getRowCount(): number;
|
||||
getValue(r: number, f: string): unknown;
|
||||
};
|
||||
}
|
||||
| undefined;
|
||||
if (!gv?.getDataSource) return [];
|
||||
const ds = gv.getDataSource();
|
||||
if (!ds) return [];
|
||||
const currentInfo = columnInfo.find((info) => info.tabKey === tabKey);
|
||||
const columns = currentInfo?.columns ?? [];
|
||||
const fieldNames = columns
|
||||
.map((c) => c.fieldName)
|
||||
.filter((x): x is string => Boolean(x));
|
||||
const cnt = ds.getRowCount();
|
||||
const rows: Record<string, string | number>[] = [];
|
||||
for (let i = 0; i < cnt; i++) {
|
||||
const r: Record<string, string | number> = {};
|
||||
for (const f of fieldNames) r[f] = ds.getValue(i, f) as string | number;
|
||||
rows.push(r);
|
||||
}
|
||||
return rows;
|
||||
};
|
||||
return () => {
|
||||
if (getGridDataRef) getGridDataRef.current = null;
|
||||
};
|
||||
}, [columnInfo, getGridDataRef]);
|
||||
|
||||
// 탭 전환 시 그리드 레이아웃·푸터·포맷 재적용 (여러 시점 + ResizeObserver)
|
||||
const appliedTabRef = useRef<string | null>(null);
|
||||
@@ -728,7 +765,7 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
if (item.valueCallback && footerArr[i])
|
||||
(footerArr[i] as FooterItemWithCallback).valueCallback = item.valueCallback;
|
||||
});
|
||||
} catch (_) {}
|
||||
} catch (_) { }
|
||||
});
|
||||
}
|
||||
columns.forEach(col => {
|
||||
@@ -738,7 +775,7 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
const fo = col.footer as { valueCallback?: (g: unknown, col: unknown, fi: number, cf: unknown, v: unknown) => unknown };
|
||||
if (column?.footer && fo.valueCallback)
|
||||
(column.footer as { valueCallback?: typeof fo.valueCallback }).valueCallback = fo.valueCallback;
|
||||
} catch (_) {}
|
||||
} catch (_) { }
|
||||
});
|
||||
|
||||
if (dp?.setRows && tabRowData.length) dp.setRows(tabRowData);
|
||||
@@ -788,7 +825,7 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
|
||||
{columnInfo.map((info) => {
|
||||
const tabKey = info.tabKey;
|
||||
|
||||
|
||||
// isSplitGrid가 true이고 left, right가 있으면 SplitDataGrid 사용
|
||||
if (info.isSplitGrid && info.left && info.right) {
|
||||
const leftRowData = rowDataMap.get(info.left.tabKey || `${tabKey}_left`) || [];
|
||||
@@ -886,277 +923,277 @@ const TabDataGrid = ({ columnInfo, isExcelImport = true, isExcelExport = true, r
|
||||
</div>
|
||||
<div className="h-[60vh]" data-tab-key={tabKey}>
|
||||
{activeTab === tabKey ? (
|
||||
<RealGridReact
|
||||
key={tabKey}
|
||||
ref={(el) => {
|
||||
if (el) {
|
||||
gridRefs.current.set(tabKey, el);
|
||||
// 그리드가 생성된 직후 fitStyle 설정
|
||||
if (el.gridView) {
|
||||
setTimeout(() => {
|
||||
const gridView = el.gridView;
|
||||
if (!gridView) return;
|
||||
|
||||
const currentInfo = columnInfo.find(info => info.tabKey === tabKey);
|
||||
if (!currentInfo || !currentInfo.columns) return;
|
||||
|
||||
const columns = currentInfo.columns;
|
||||
|
||||
const dp = el.dataProvider as { setFields?: (fields: unknown[]) => void; setRows?: (rows: Record<string, string | number>[]) => void } | undefined;
|
||||
if (dp?.setFields) {
|
||||
dp.setFields(buildFieldsFromColumns(columns));
|
||||
}
|
||||
// setFields 호출 직후 행 데이터 적용 (realgrid-react의 setRows 타이밍 이슈 방지)
|
||||
const tabRowData = rowDataMap.get(tabKey) || [];
|
||||
if (dp?.setRows && tabRowData.length) {
|
||||
dp.setRows(tabRowData);
|
||||
}
|
||||
|
||||
gridView.setDisplayOptions({
|
||||
fitStyle: GridFitStyle.EVEN
|
||||
});
|
||||
gridView.header.height = 60;
|
||||
|
||||
// 헤더 체크박스 표시 여부 설정
|
||||
gridView.setOptions({
|
||||
checkBar: { visible: showHeaderCheckbox },
|
||||
rowIndicator: { visible: false },
|
||||
});
|
||||
|
||||
// footer가 있는 컬럼이 있으면 footer 높이 설정
|
||||
const hasFooter = columns.some(col => col.footer);
|
||||
if (hasFooter) {
|
||||
// footer가 배열이거나 multiRow가 true인 footer가 있으면 멀티푸터 설정 (여러 행)
|
||||
const hasArrayFooter = columns.some(col => col.footer && Array.isArray(col.footer));
|
||||
const hasMultiRowFooter = columns.some(col => {
|
||||
const footer = col.footer;
|
||||
return footer && !Array.isArray(footer) && 'multiRow' in footer && footer.multiRow === true;
|
||||
});
|
||||
if (hasArrayFooter || hasMultiRowFooter) {
|
||||
// footer 배열의 길이를 확인하여 행 수 결정
|
||||
const arrayFooterLengths = columns
|
||||
.filter(col => col.footer && Array.isArray(col.footer))
|
||||
.map(col => (col.footer as unknown[]).length);
|
||||
const maxFooterLength = arrayFooterLengths.length > 0
|
||||
? Math.max(...arrayFooterLengths)
|
||||
: 2; // 기본값 2
|
||||
const footerHeights = Array.from({ length: maxFooterLength }, () => ({ height: 40 }));
|
||||
gridView.setFooters?.(footerHeights);
|
||||
} else {
|
||||
gridView.footer.height = 40;
|
||||
}
|
||||
}
|
||||
|
||||
gridView.setOptions({
|
||||
summaryMode: "aggregate"
|
||||
});
|
||||
|
||||
// footerUserSpans가 있는 경우 setColumnLayout으로 설정
|
||||
const checkFooterUserSpans = (layout: unknown[]): boolean => {
|
||||
return layout.some(item => {
|
||||
if (typeof item === 'string') return false;
|
||||
if (item && typeof item === 'object' && 'footerUserSpans' in item) return true;
|
||||
if (item && typeof item === 'object' && 'items' in item && Array.isArray(item.items)) {
|
||||
return checkFooterUserSpans(item.items);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
if (checkFooterUserSpans(columnLayout)) {
|
||||
// setColumnLayout은 그리드가 완전히 렌더링된 후 호출해야 함
|
||||
setTimeout(() => {
|
||||
if (gridView && columnLayout) {
|
||||
gridView.setColumnLayout?.(columnLayout);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// footer 설정 (배열 또는 단일 객체 모두 처리)
|
||||
// setFooters 호출 후 footer 배열 설정
|
||||
<RealGridReact
|
||||
key={tabKey}
|
||||
ref={(el) => {
|
||||
if (el) {
|
||||
gridRefs.current.set(tabKey, el);
|
||||
// 그리드가 생성된 직후 fitStyle 설정
|
||||
if (el.gridView) {
|
||||
setTimeout(() => {
|
||||
const currentGridView = gridView;
|
||||
if (!currentGridView || !currentGridView.columnByName) {
|
||||
console.warn('GridView not available for footer setup');
|
||||
return;
|
||||
const gridView = el.gridView;
|
||||
if (!gridView) return;
|
||||
|
||||
const currentInfo = columnInfo.find(info => info.tabKey === tabKey);
|
||||
if (!currentInfo || !currentInfo.columns) return;
|
||||
|
||||
const columns = currentInfo.columns;
|
||||
|
||||
const dp = el.dataProvider as { setFields?: (fields: unknown[]) => void; setRows?: (rows: Record<string, string | number>[]) => void } | undefined;
|
||||
if (dp?.setFields) {
|
||||
dp.setFields(buildFieldsFromColumns(columns));
|
||||
}
|
||||
|
||||
// footer가 배열인 컬럼이 있으면 setColumns를 다시 호출하여 footer 설정
|
||||
const hasArrayFooter = columns.some(col => col.footer && Array.isArray(col.footer));
|
||||
if (hasArrayFooter) {
|
||||
// 모든 컬럼 정보를 다시 가져와서 footer 배열을 포함하여 setColumns 호출
|
||||
const columnsWithFooter: RealGridColumnInfo[] = columns.map(col => {
|
||||
const colInfo: RealGridColumnInfo = {
|
||||
name: col.name,
|
||||
fieldName: col.fieldName,
|
||||
header: col.header,
|
||||
editable: col.editable,
|
||||
valueType: col.valueType,
|
||||
dataFormat: col.dataFormat,
|
||||
...(col.styleName != null && { styleName: col.styleName }),
|
||||
...(col.mergeCells && { mergeRule: { criteria: col.mergeGroupField ? `values['${col.mergeGroupField}'] + value` : 'value' as const } }),
|
||||
};
|
||||
|
||||
if (col.footer) {
|
||||
if (Array.isArray(col.footer)) {
|
||||
colInfo.footer = col.footer;
|
||||
} else {
|
||||
colInfo.footer = {
|
||||
text: col.footer.text,
|
||||
expression: col.footer.expression,
|
||||
numberFormat: col.footer.numberFormat,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return colInfo;
|
||||
// setFields 호출 직후 행 데이터 적용 (realgrid-react의 setRows 타이밍 이슈 방지)
|
||||
const tabRowData = rowDataMap.get(tabKey) || [];
|
||||
if (dp?.setRows && tabRowData.length) {
|
||||
dp.setRows(tabRowData);
|
||||
}
|
||||
|
||||
gridView.setDisplayOptions({
|
||||
fitStyle: GridFitStyle.EVEN
|
||||
});
|
||||
gridView.header.height = 60;
|
||||
|
||||
// 헤더 체크박스 표시 여부 설정
|
||||
gridView.setOptions({
|
||||
checkBar: { visible: showHeaderCheckbox },
|
||||
rowIndicator: { visible: false },
|
||||
});
|
||||
|
||||
// footer가 있는 컬럼이 있으면 footer 높이 설정
|
||||
const hasFooter = columns.some(col => col.footer);
|
||||
if (hasFooter) {
|
||||
// footer가 배열이거나 multiRow가 true인 footer가 있으면 멀티푸터 설정 (여러 행)
|
||||
const hasArrayFooter = columns.some(col => col.footer && Array.isArray(col.footer));
|
||||
const hasMultiRowFooter = columns.some(col => {
|
||||
const footer = col.footer;
|
||||
return footer && !Array.isArray(footer) && 'multiRow' in footer && footer.multiRow === true;
|
||||
});
|
||||
|
||||
try {
|
||||
(currentGridView as GridViewWithSetColumns).setColumns?.(columnsWithFooter);
|
||||
|
||||
// setColumns 호출 후 footer 배열의 valueCallback을 다시 설정
|
||||
setTimeout(() => {
|
||||
columns.forEach(col => {
|
||||
if (!col.footer || !Array.isArray(col.footer)) return;
|
||||
|
||||
try {
|
||||
const column = currentGridView.columnByName(col.name);
|
||||
if (!column) return;
|
||||
|
||||
// footer 배열의 각 요소에 valueCallback 설정
|
||||
col.footer.forEach((footerItem, index) => {
|
||||
if (footerItem.valueCallback && column.footer) {
|
||||
// footer가 배열인 경우
|
||||
if (Array.isArray(column.footer) && column.footer[index]) {
|
||||
(column.footer[index] as FooterItemWithCallback).valueCallback = footerItem.valueCallback;
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn(`Error setting footer array valueCallback for column ${col.name}:`, e);
|
||||
if (hasArrayFooter || hasMultiRowFooter) {
|
||||
// footer 배열의 길이를 확인하여 행 수 결정
|
||||
const arrayFooterLengths = columns
|
||||
.filter(col => col.footer && Array.isArray(col.footer))
|
||||
.map(col => (col.footer as unknown[]).length);
|
||||
const maxFooterLength = arrayFooterLengths.length > 0
|
||||
? Math.max(...arrayFooterLengths)
|
||||
: 2; // 기본값 2
|
||||
const footerHeights = Array.from({ length: maxFooterLength }, () => ({ height: 40 }));
|
||||
gridView.setFooters?.(footerHeights);
|
||||
} else {
|
||||
gridView.footer.height = 40;
|
||||
}
|
||||
}
|
||||
|
||||
gridView.setOptions({
|
||||
summaryMode: "aggregate"
|
||||
});
|
||||
|
||||
// footerUserSpans가 있는 경우 setColumnLayout으로 설정
|
||||
const checkFooterUserSpans = (layout: unknown[]): boolean => {
|
||||
return layout.some(item => {
|
||||
if (typeof item === 'string') return false;
|
||||
if (item && typeof item === 'object' && 'footerUserSpans' in item) return true;
|
||||
if (item && typeof item === 'object' && 'items' in item && Array.isArray(item.items)) {
|
||||
return checkFooterUserSpans(item.items);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
if (checkFooterUserSpans(columnLayout)) {
|
||||
// setColumnLayout은 그리드가 완전히 렌더링된 후 호출해야 함
|
||||
setTimeout(() => {
|
||||
if (gridView && columnLayout) {
|
||||
gridView.setColumnLayout?.(columnLayout);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
||||
// footer 설정 (배열 또는 단일 객체 모두 처리)
|
||||
// setFooters 호출 후 footer 배열 설정
|
||||
setTimeout(() => {
|
||||
const currentGridView = gridView;
|
||||
if (!currentGridView || !currentGridView.columnByName) {
|
||||
console.warn('GridView not available for footer setup');
|
||||
return;
|
||||
}
|
||||
|
||||
// footer가 배열인 컬럼이 있으면 setColumns를 다시 호출하여 footer 설정
|
||||
const hasArrayFooter = columns.some(col => col.footer && Array.isArray(col.footer));
|
||||
if (hasArrayFooter) {
|
||||
// 모든 컬럼 정보를 다시 가져와서 footer 배열을 포함하여 setColumns 호출
|
||||
const columnsWithFooter: RealGridColumnInfo[] = columns.map(col => {
|
||||
const colInfo: RealGridColumnInfo = {
|
||||
name: col.name,
|
||||
fieldName: col.fieldName,
|
||||
header: col.header,
|
||||
editable: col.editable,
|
||||
valueType: col.valueType,
|
||||
dataFormat: col.dataFormat,
|
||||
...(col.styleName != null && { styleName: col.styleName }),
|
||||
...(col.mergeCells && { mergeRule: { criteria: col.mergeGroupField ? `values['${col.mergeGroupField}'] + value` : 'value' as const } }),
|
||||
};
|
||||
|
||||
if (col.footer) {
|
||||
if (Array.isArray(col.footer)) {
|
||||
colInfo.footer = col.footer;
|
||||
} else {
|
||||
colInfo.footer = {
|
||||
text: col.footer.text,
|
||||
expression: col.footer.expression,
|
||||
numberFormat: col.footer.numberFormat,
|
||||
};
|
||||
}
|
||||
});
|
||||
}, 50);
|
||||
} catch (e) {
|
||||
console.warn('Failed to set columns with footer array:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// footer가 단일 객체이고 valueCallback이 있는 경우
|
||||
columns.forEach(col => {
|
||||
if (!col.footer || Array.isArray(col.footer)) return;
|
||||
|
||||
try {
|
||||
const column = currentGridView.columnByName(col.name);
|
||||
if (!column || !column.footer) return;
|
||||
|
||||
const footerObj = col.footer as { valueCallback?: (grid: unknown, column: unknown, footerIndex: number, columnFooter: unknown, value: unknown) => unknown };
|
||||
if (footerObj.valueCallback) {
|
||||
(column.footer as { valueCallback?: typeof footerObj.valueCallback }).valueCallback = footerObj.valueCallback;
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(`Error setting footer valueCallback for column ${col.name}:`, e);
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
|
||||
// 고정 컬럼 설정
|
||||
if (currentInfo.fixedColumns !== undefined && currentInfo.fixedColumns > 0) {
|
||||
gridView.setFixedOptions({
|
||||
colCount: currentInfo.fixedColumns,
|
||||
});
|
||||
}
|
||||
|
||||
// 각 탭별 ref 초기화
|
||||
if (!sortDirRefs.current.has(tabKey)) {
|
||||
sortDirRefs.current.set(tabKey, { current: {} });
|
||||
}
|
||||
if (!originalRowsRefs.current.has(tabKey)) {
|
||||
originalRowsRefs.current.set(tabKey, { current: {} });
|
||||
}
|
||||
|
||||
const sortDirRef = sortDirRefs.current.get(tabKey)!;
|
||||
const originalRowsRef = originalRowsRefs.current.get(tabKey)!;
|
||||
|
||||
// mergeCells: true인 컬럼이 있으면 onSorting에서 클라이언트 정렬로 처리
|
||||
const hasMergeCells = columns.some((col) => col.mergeCells === true);
|
||||
|
||||
// setDataComparer로 숫자 정렬 (mergeCells가 있으면 onSorting에서 클라이언트 정렬로 처리)
|
||||
if (el.dataProvider) {
|
||||
const dp = el.dataProvider as RealGridDataProviderComparer;
|
||||
if (typeof dp.setDataComparer === "function" && typeof dp.getValue === "function") {
|
||||
const numberComparer = createNumberComparer(dp);
|
||||
const seen = new Set<string>();
|
||||
columns.forEach((col) => {
|
||||
if (hasMergeCells) return; // mergeCells가 있으면 모든 컬럼을 클라이언트 정렬로 처리
|
||||
if (col.valueType === ValueType.NUMBER && col.fieldName && !seen.has(col.fieldName)) {
|
||||
seen.add(col.fieldName);
|
||||
try {
|
||||
dp.setDataComparer!(col.fieldName, numberComparer);
|
||||
} catch (e) {
|
||||
console.warn("setDataComparer:", e);
|
||||
}
|
||||
|
||||
return colInfo;
|
||||
});
|
||||
|
||||
try {
|
||||
(currentGridView as GridViewWithSetColumns).setColumns?.(columnsWithFooter);
|
||||
|
||||
// setColumns 호출 후 footer 배열의 valueCallback을 다시 설정
|
||||
setTimeout(() => {
|
||||
columns.forEach(col => {
|
||||
if (!col.footer || !Array.isArray(col.footer)) return;
|
||||
|
||||
try {
|
||||
const column = currentGridView.columnByName(col.name);
|
||||
if (!column) return;
|
||||
|
||||
// footer 배열의 각 요소에 valueCallback 설정
|
||||
col.footer.forEach((footerItem, index) => {
|
||||
if (footerItem.valueCallback && column.footer) {
|
||||
// footer가 배열인 경우
|
||||
if (Array.isArray(column.footer) && column.footer[index]) {
|
||||
(column.footer[index] as FooterItemWithCallback).valueCallback = footerItem.valueCallback;
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn(`Error setting footer array valueCallback for column ${col.name}:`, e);
|
||||
}
|
||||
});
|
||||
}, 50);
|
||||
} catch (e) {
|
||||
console.warn('Failed to set columns with footer array:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// footer가 단일 객체이고 valueCallback이 있는 경우
|
||||
columns.forEach(col => {
|
||||
if (!col.footer || Array.isArray(col.footer)) return;
|
||||
|
||||
try {
|
||||
const column = currentGridView.columnByName(col.name);
|
||||
if (!column || !column.footer) return;
|
||||
|
||||
const footerObj = col.footer as { valueCallback?: (grid: unknown, column: unknown, footerIndex: number, columnFooter: unknown, value: unknown) => unknown };
|
||||
if (footerObj.valueCallback) {
|
||||
(column.footer as { valueCallback?: typeof footerObj.valueCallback }).valueCallback = footerObj.valueCallback;
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(`Error setting footer valueCallback for column ${col.name}:`, e);
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
|
||||
// 고정 컬럼 설정
|
||||
if (currentInfo.fixedColumns !== undefined && currentInfo.fixedColumns > 0) {
|
||||
gridView.setFixedOptions({
|
||||
colCount: currentInfo.fixedColumns,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// mergeCells: true인 컬럼이 있으면 onSorting에서 그룹 내 순서 유지 정렬 적용
|
||||
const setRowData = (updater: React.SetStateAction<Record<string, string | number>[]>) => {
|
||||
setRowDataMap(prev => {
|
||||
const newMap = new Map(prev);
|
||||
const currentData = newMap.get(tabKey) || [];
|
||||
const newData = typeof updater === 'function' ? updater(currentData) : updater;
|
||||
newMap.set(tabKey, newData);
|
||||
return newMap;
|
||||
});
|
||||
};
|
||||
|
||||
// 그리드 DOM 요소 찾기 (나중에 화살표 업데이트에 사용)
|
||||
// 탭별로 그리드 요소를 찾기 위해 data-tab-key 사용
|
||||
const findGridElement = () => {
|
||||
const tabContent = document.querySelector(`[data-tab-key="${tabKey}"]`);
|
||||
return tabContent?.querySelector('.rg-grid, [data-grid-id]') as HTMLElement | null;
|
||||
};
|
||||
|
||||
const onSortingHandler = createOnSortingHandler(columns, setRowData, sortDirRef, originalRowsRef, findGridElement);
|
||||
(gridView as { onSorting?: (g: unknown, f: unknown[], d: unknown[]) => boolean }).onSorting = onSortingHandler;
|
||||
}, 150);
|
||||
|
||||
// 각 탭별 ref 초기화
|
||||
if (!sortDirRefs.current.has(tabKey)) {
|
||||
sortDirRefs.current.set(tabKey, { current: {} });
|
||||
}
|
||||
if (!originalRowsRefs.current.has(tabKey)) {
|
||||
originalRowsRefs.current.set(tabKey, { current: {} });
|
||||
}
|
||||
|
||||
const sortDirRef = sortDirRefs.current.get(tabKey)!;
|
||||
const originalRowsRef = originalRowsRefs.current.get(tabKey)!;
|
||||
|
||||
// mergeCells: true인 컬럼이 있으면 onSorting에서 클라이언트 정렬로 처리
|
||||
const hasMergeCells = columns.some((col) => col.mergeCells === true);
|
||||
|
||||
// setDataComparer로 숫자 정렬 (mergeCells가 있으면 onSorting에서 클라이언트 정렬로 처리)
|
||||
if (el.dataProvider) {
|
||||
const dp = el.dataProvider as RealGridDataProviderComparer;
|
||||
if (typeof dp.setDataComparer === "function" && typeof dp.getValue === "function") {
|
||||
const numberComparer = createNumberComparer(dp);
|
||||
const seen = new Set<string>();
|
||||
columns.forEach((col) => {
|
||||
if (hasMergeCells) return; // mergeCells가 있으면 모든 컬럼을 클라이언트 정렬로 처리
|
||||
if (col.valueType === ValueType.NUMBER && col.fieldName && !seen.has(col.fieldName)) {
|
||||
seen.add(col.fieldName);
|
||||
try {
|
||||
dp.setDataComparer!(col.fieldName, numberComparer);
|
||||
} catch (e) {
|
||||
console.warn("setDataComparer:", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// mergeCells: true인 컬럼이 있으면 onSorting에서 그룹 내 순서 유지 정렬 적용
|
||||
const setRowData = (updater: React.SetStateAction<Record<string, string | number>[]>) => {
|
||||
setRowDataMap(prev => {
|
||||
const newMap = new Map(prev);
|
||||
const currentData = newMap.get(tabKey) || [];
|
||||
const newData = typeof updater === 'function' ? updater(currentData) : updater;
|
||||
newMap.set(tabKey, newData);
|
||||
return newMap;
|
||||
});
|
||||
};
|
||||
|
||||
// 그리드 DOM 요소 찾기 (나중에 화살표 업데이트에 사용)
|
||||
// 탭별로 그리드 요소를 찾기 위해 data-tab-key 사용
|
||||
const findGridElement = () => {
|
||||
const tabContent = document.querySelector(`[data-tab-key="${tabKey}"]`);
|
||||
return tabContent?.querySelector('.rg-grid, [data-grid-id]') as HTMLElement | null;
|
||||
};
|
||||
|
||||
const onSortingHandler = createOnSortingHandler(columns, setRowData, sortDirRef, originalRowsRef, findGridElement);
|
||||
(gridView as { onSorting?: (g: unknown, f: unknown[], d: unknown[]) => boolean }).onSorting = onSortingHandler;
|
||||
}, 150);
|
||||
}
|
||||
} else {
|
||||
gridRefs.current.delete(tabKey);
|
||||
}
|
||||
} else {
|
||||
gridRefs.current.delete(tabKey);
|
||||
}
|
||||
}}
|
||||
autoGenerateField={true}
|
||||
layout={columnLayout}
|
||||
rows={currentRowData}
|
||||
>
|
||||
{columns.map((column) => (
|
||||
<RGDataColumn
|
||||
key={column.name}
|
||||
name={column.name}
|
||||
fieldName={column.fieldName}
|
||||
valueType={column.valueType ? column.valueType : ValueType.TEXT}
|
||||
{...(column.valueType === ValueType.NUMBER && { numberFormat: column.dataFormat ? column.dataFormat : '#,##0.00' })}
|
||||
header={column.header}
|
||||
editable={column.editable}
|
||||
{...(column.styleName != null
|
||||
? { styleName: column.styleName }
|
||||
: column.editable === false
|
||||
? { styleName: 'rg-cell-readonly' as const }
|
||||
: {})}
|
||||
{...(column.visible === false && { visible: false })}
|
||||
footer={column.footer && !Array.isArray(column.footer) ? {
|
||||
text: (column.footer as { text?: string }).text,
|
||||
expression: (column.footer as { expression?: 'sum' | 'avg' | 'count' | 'max' | 'min' }).expression,
|
||||
numberFormat: (column.footer as { numberFormat?: string }).numberFormat,
|
||||
} : undefined}
|
||||
mergeRule={column.mergeCells ? { criteria: column.mergeGroupField ? `values['${column.mergeGroupField}'] + value` : 'value' } : undefined}
|
||||
sortable={!column.sortdisable}
|
||||
/>
|
||||
))}
|
||||
</RealGridReact>
|
||||
}}
|
||||
autoGenerateField={true}
|
||||
layout={columnLayout}
|
||||
rows={currentRowData}
|
||||
>
|
||||
{columns.map((column) => (
|
||||
<RGDataColumn
|
||||
key={column.name}
|
||||
name={column.name}
|
||||
fieldName={column.fieldName}
|
||||
valueType={column.valueType ? column.valueType : ValueType.TEXT}
|
||||
{...(column.valueType === ValueType.NUMBER && { numberFormat: column.dataFormat ? column.dataFormat : '#,##0.00' })}
|
||||
header={column.header}
|
||||
editable={column.editable}
|
||||
{...(column.styleName != null
|
||||
? { styleName: column.styleName }
|
||||
: column.editable === false
|
||||
? { styleName: 'rg-cell-readonly' as const }
|
||||
: {})}
|
||||
{...(column.visible === false && { visible: false })}
|
||||
footer={column.footer && !Array.isArray(column.footer) ? {
|
||||
text: (column.footer as { text?: string }).text,
|
||||
expression: (column.footer as { expression?: 'sum' | 'avg' | 'count' | 'max' | 'min' }).expression,
|
||||
numberFormat: (column.footer as { numberFormat?: string }).numberFormat,
|
||||
} : undefined}
|
||||
mergeRule={column.mergeCells ? { criteria: column.mergeGroupField ? `values['${column.mergeGroupField}'] + value` : 'value' } : undefined}
|
||||
sortable={!column.sortdisable}
|
||||
/>
|
||||
))}
|
||||
</RealGridReact>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,31 +1,87 @@
|
||||
import { useState } from "react";
|
||||
import { useState, useMemo } from "react";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
import { TabDataGrid } from '@rsone/components';
|
||||
import TabDataGrid from "@/components/module/TabDataGrid";
|
||||
import SubmitButton from "@/components/button/SumitButton";
|
||||
import SaveButton from "@/components/button/SaveButton";
|
||||
import LastYearDataButton from "@/components/button/LastYearDataButton";
|
||||
import SubmitExceptionButton from "@/components/button/SubmitExceptionButton";
|
||||
|
||||
import { RegionalFactStatusInpColumn } from "@/components/util/column/input/sewagePipe/RegionalFactStatusInpColumn";
|
||||
import { FactInstallStatusInpColumn } from "@/components/util/column/input/sewagePipe/FactInstallStatusInpColumn";
|
||||
import { PipeTypeStatusInpColumn } from "@/components/util/column/input/sewagePipe/PipeTypeStatusInpColumn";
|
||||
import { PipeDiameterStatusInpColumn } from "@/components/util/column/input/sewagePipe/PipeDiameterStatusInpColumn";
|
||||
import { ManholeStatusInpColumn } from "@/components/util/column/input/sewagePipe/ManholeStatusInpColumn";
|
||||
import { ConnectionStatusInpColumn } from "@/components/util/column/input/sewagePipe/ConnectionStatusInpColumn";
|
||||
import { SewagePipeInpColumnInfoList } from "@/components/util/column/input/sewagePipe/SewagePipeInpColumn";
|
||||
import type { ColumnInfoList, ColumnConfig } from "@/components/type/DataGrid.type";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
|
||||
// 하수도 통계 관리 > 02. 하수관로
|
||||
// 하수도 통계 관리 > 02. 하수관로
|
||||
const SewagePipeInp = () => {
|
||||
|
||||
// tab List
|
||||
const SewagePipeInpTapList = [
|
||||
RegionalFactStatusInpColumn,
|
||||
FactInstallStatusInpColumn,
|
||||
PipeTypeStatusInpColumn,
|
||||
PipeDiameterStatusInpColumn,
|
||||
ManholeStatusInpColumn,
|
||||
ConnectionStatusInpColumn,
|
||||
];
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [activeTab, setActiveTab] = useState<string>(SewagePipeInpColumnInfoList[0]?.tabKey ?? "ST00020001");
|
||||
const [isEnterable, setIsEnterable] = useState<boolean>(true);
|
||||
const { isAdminInfo } = useAdminStore();
|
||||
|
||||
const columnInfo = useMemo(() => {
|
||||
const canEdit = isEnterable || isAdminInfo;
|
||||
return SewagePipeInpColumnInfoList.map((tab: ColumnInfoList) => {
|
||||
const applyEditable = (cols: ColumnConfig[] | undefined) =>
|
||||
(cols ?? []).map((col: ColumnConfig) =>
|
||||
canEdit
|
||||
? col
|
||||
: { ...col, editable: false as const, styleName: col.styleName ?? "rg-cell-readonly" }
|
||||
);
|
||||
|
||||
if (tab.left && tab.right) {
|
||||
return {
|
||||
...tab,
|
||||
left: { ...tab.left, columns: applyEditable(tab.left.columns) },
|
||||
right: { ...tab.right, columns: applyEditable(tab.right.columns) },
|
||||
};
|
||||
}
|
||||
return {
|
||||
...tab,
|
||||
columns: applyEditable(tab.columns),
|
||||
};
|
||||
});
|
||||
}, [isEnterable, isAdminInfo]);
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
if (!values.sido || values.sido === 'ALL') {
|
||||
alert('시도를 선택해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
setActiveTab('ST00020001');
|
||||
|
||||
setRowDataMap(new Map());
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
|
||||
// const searchParam: SewagePipeReviewRequestParams = {
|
||||
// statsYr: values.year,
|
||||
// sewerBzmnCd: values.bsnmCd,
|
||||
// ctpvNm: values.sido,
|
||||
// sggNm: values.gugun === 'ALL' ? '' : values.gugun
|
||||
// };
|
||||
|
||||
// searchParamRef.current = searchParam;
|
||||
// const response = await statisticsManagementApi.getSewagePipeReviewRegionalList(searchParam);
|
||||
|
||||
// if (response?.status === 'success' && response.data) {
|
||||
// const newRowDataMap = new Map<string, Record<string, string | number>[]>();
|
||||
// newRowDataMap.set('ST00020001', toGridRows(response.data as object[]));
|
||||
// setRowDataMap(newRowDataMap);
|
||||
// } else {
|
||||
// alert(response?.message || "데이터가 없습니다.");
|
||||
// }
|
||||
} catch {
|
||||
alert('데이터 조회 중 오류가 발생했습니다.');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const SubmitExceptionFunc = () => {
|
||||
console.log('submit exception');
|
||||
@@ -47,7 +103,6 @@ const SewagePipeInp = () => {
|
||||
// 저장 로직
|
||||
};
|
||||
|
||||
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -60,10 +115,12 @@ const SewagePipeInp = () => {
|
||||
<SaveButton saveFunc={saveFunc} />
|
||||
</div>
|
||||
</div>
|
||||
<TabDataGrid
|
||||
columnInfo={SewagePipeInpTapList}
|
||||
rowDataMap={rowDataMap}
|
||||
setRowDataMap={setRowDataMap}
|
||||
<TabDataGrid
|
||||
columnInfo={columnInfo}
|
||||
rowDataMap={rowDataMap}
|
||||
setRowDataMap={setRowDataMap}
|
||||
activeTab={activeTab}
|
||||
onActiveTabChange={setActiveTab}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -14,7 +14,13 @@ import SubmitDailog from "./SubmitDailog";
|
||||
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { StatisticsInputSewSupplyRateApi } from "@/entities/statistics/api/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsAPi } from "@/entities/statistics/api/statistics-service";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import { getFooterSummary } from "@/components/util/grid/footerSummary";
|
||||
import { getUserInfo } from "../../../../../../packages/common/components/src/api";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import type {
|
||||
SewerageSupplyRateItem,
|
||||
@@ -24,14 +30,12 @@ import type {
|
||||
SewerageSupplyRateSaveRequest,
|
||||
SewerageSupplyRateStatusInfo,
|
||||
} from "@/entities/statistics/model/statistics-sewage-supply-rate-input-interface";
|
||||
import type { cancelSubmitRequest } from "@/entities/statistics/model/statistics-interface";
|
||||
import type { StatisticsInputSubmitInfoFormData } from "@/entities/statistics/model/statistics-input-submit-info-schema";
|
||||
import { SeweragePenetrationRateInpColumn } from "@/components/util/column/input/SeweragePenetrationRateInpColumn";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import { getFooterSummary } from "@/components/util/grid/footerSummary";
|
||||
import { getUserInfo } from "../../../../../../packages/common/components/src/api";
|
||||
import { useConfirm } from "@frontend-opensource/use-react-hooks";
|
||||
import { doList } from "@/components/util/column/input/DoList";
|
||||
|
||||
|
||||
type GridRowWithVerification = Record<string, string | number> & {
|
||||
verificationResult?: SewerageSupplyRateVerificationResult;
|
||||
};
|
||||
@@ -60,11 +64,12 @@ const SeweragePenetrationRateInp = () => {
|
||||
const [lastSearchedValues, setLastSearchedValues] = useState<SearchFormValues | null>(null);
|
||||
const [statusInfo, setStatusInfo] = useState<SewerageSupplyRateStatusInfo | null>(null);
|
||||
const [showDailog, setShowDailog] = useState<boolean>(false);
|
||||
const [statsCd, setStatsCd] = useState<string>('');
|
||||
const [footerFromApi, setFooterFromApi] = useState<{ sewerBzmnWholPpltnCnt?: number; sewerBzmnDomplWholPpltnCnt?: number; sewerBzmnFrgnrWholPpltnCnt?: number; sewerBzmnArea?: number } | null>(null);
|
||||
const { confirm } = useConfirm();
|
||||
|
||||
const { isAdminInfo } = useAdminStore();
|
||||
|
||||
const [footerFromApi, setFooterFromApi] = useState<{ sewerBzmnWholPpltnCnt?: number; sewerBzmnDomplWholPpltnCnt?: number; sewerBzmnFrgnrWholPpltnCnt?: number; sewerBzmnArea?: number } | null>(null);
|
||||
const getGridDataRef = useRef<(() => Record<string, string | number>[]) | null>(null);
|
||||
|
||||
const _footerFieldNames = ['sewerBzmnWholPpltnCnt', 'sewerBzmnDomplWholPpltnCnt', 'sewerBzmnFrgnrWholPpltnCnt', 'sewerBzmnArea'] as const;
|
||||
@@ -103,7 +108,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
const fetchSewerageSupplyRate = async (params: SewerageSupplyRateRequestParams, isEnterable: boolean) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await StatisticsInputSewSupplyRateApi.getSewerageSupplyRateList(params);
|
||||
const response = await statisticsInputSewSupplyRateApi.getSewerageSupplyRateList(params);
|
||||
if (response.status === 'success' && response.data) {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const statusInfo = response.data.statusInfo;
|
||||
@@ -121,7 +126,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
})
|
||||
);
|
||||
|
||||
setStatusInfo(response.data.statusInfo);
|
||||
setStatusInfo(statusInfo);
|
||||
setFooterFromApi(
|
||||
commonInfo
|
||||
? {
|
||||
@@ -132,7 +137,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
setStatsCd(commonInfo.statsCd);
|
||||
if (statusInfo && statusInfo.laeSbmsnSttsCd) {
|
||||
if (['2', '3'].includes(statusInfo.laeSbmsnSttsCd)) {
|
||||
setIsEnterable(false);
|
||||
@@ -163,7 +168,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await StatisticsInputSewSupplyRateApi.checkInputPeriod(values.year || '');
|
||||
const response = await statisticsInputSewSupplyRateApi.checkInputPeriod(values.year || '');
|
||||
|
||||
if (response.status === 'success') {
|
||||
const checkEnterable = response.data;
|
||||
@@ -266,6 +271,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
const requestData: SewerageSupplyRateSaveRequest = {
|
||||
sewerBzmnCd: searchValues?.bsnmCd ?? '',
|
||||
ctpvNm: searchValues?.sido ?? '',
|
||||
sggNm: searchValues?.gugun ?? '',
|
||||
statsYr: searchValues?.year ?? '',
|
||||
userId: userInfo.userUnqId,
|
||||
submitList: convertedData,
|
||||
@@ -280,7 +286,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
laeIdfrTelNo: submitInfo.laeIdfrTelNo,
|
||||
};
|
||||
|
||||
const response = await StatisticsInputSewSupplyRateApi.submitSewerageSupplyRate(requestData);
|
||||
const response = await statisticsInputSewSupplyRateApi.submitSewerageSupplyRate(requestData);
|
||||
if (response.status === 'success') {
|
||||
await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), false);
|
||||
alert('제출되었습니다.');
|
||||
@@ -368,6 +374,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
const requestData: SewerageSupplyRateSaveRequest = {
|
||||
sewerBzmnCd: searchValues?.bsnmCd ?? '', // 하수도 사업자 코드
|
||||
ctpvNm: searchValues?.sido ?? '', // 시도
|
||||
sggNm: searchValues?.gugun ?? '',
|
||||
statsYr: searchValues?.year ?? '', // 통계 연도
|
||||
userId: userInfo.userUnqId, // 사용자
|
||||
saveList: convertedData, // 저장 데이터
|
||||
@@ -378,7 +385,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
requestData.superAdmin = 'superAdmin';
|
||||
}
|
||||
|
||||
const response = await StatisticsInputSewSupplyRateApi.saveSewerageSupplyRate(requestData);
|
||||
const response = await statisticsInputSewSupplyRateApi.saveSewerageSupplyRate(requestData);
|
||||
|
||||
if (response.status === 'success') {
|
||||
fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
|
||||
@@ -395,7 +402,36 @@ const SeweragePenetrationRateInp = () => {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
console.log(footerFromApi);
|
||||
|
||||
const cnacelSubmitFunc = async () => {
|
||||
try {
|
||||
if (await confirm('제출된 내용을 취소하시겠습니까?')) {
|
||||
|
||||
const userInfo = await getUserInfo();
|
||||
|
||||
const requestData: cancelSubmitRequest = {
|
||||
sewerBzmnCd: searchValues?.bsnmCd ?? '',
|
||||
ctpvNm: searchValues?.sido ?? '',
|
||||
sggNm: searchValues?.gugun ?? '',
|
||||
statsYr: searchValues?.year ?? '',
|
||||
userId: userInfo.userUnqId,
|
||||
statsCd: statsCd,
|
||||
};
|
||||
|
||||
const response = await statisticsAPi.cancelSubmit(requestData);
|
||||
|
||||
if (response.status === 'success') {
|
||||
fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
|
||||
alert('제출 취소되었습니다.');
|
||||
} else {
|
||||
alert(response.message ?? '제출 취소 중 오류가 발생했습니다.');
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
alert('제출 취소 중 오류가 발생했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="relative">
|
||||
@@ -411,7 +447,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
|
||||
</>
|
||||
)}
|
||||
{statusInfo?.laeSbmsnSttsCd === '2' && <CancelSubmitButton cnacelSubmitFunc={() => console.log('test')} />}
|
||||
{statusInfo?.laeSbmsnSttsCd === '2' && <CancelSubmitButton cnacelSubmitFunc={cnacelSubmitFunc} />}
|
||||
{(isEnterable && (doList.includes(lastSearchedValues?.bsnmCd || '') ? Boolean(lastSearchedValues?.gugun && lastSearchedValues.gugun !== 'ALL') : true) || isAdminInfo) && <SaveButton saveFunc={saveFunc} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { useState } from "react";
|
||||
import { useState, useEffect } from "react";
|
||||
import useSWR, { useSWRConfig } from "swr";
|
||||
|
||||
import SearchForm from "@/components/module/SearchForm";
|
||||
// import { DataGrid } from "@rsone/components";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import ApproveButton from "@/components/button/ApproveButton";
|
||||
import RejectButton from "@/components/button/RejectButton";
|
||||
@@ -13,45 +14,63 @@ import type { StatsInputStatusListRequestParams } from "@/entities/statistics/mo
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import type { StatsInputStatusListApiResponse } from "@/entities/statistics/model/statistics-input-status-interface";
|
||||
|
||||
const getStatsInputStatusFetcher = async (key: [string, StatsInputStatusListRequestParams]): Promise<StatsInputStatusListApiResponse> => {
|
||||
return StatisticsInputStatusApi.getStatisticsInputStatusList(key[1]);
|
||||
};
|
||||
|
||||
// 하수도 통계 관리 > 00. 통계 입력 현황
|
||||
const StatsInputStatusInp = () => {
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
const activeTabId = useTabStore((state) => state.activeTabId);
|
||||
const [rowData, setRowData] = useState<Record<string, string | number>[]>([]);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(false);
|
||||
const [searchParams, setSearchParams] = useState<StatsInputStatusListRequestParams | null>(null);
|
||||
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
if (values.sido === '' || values.sido === 'ALL') {
|
||||
alert('시도를 선택해주세요.');
|
||||
const swrKey = searchParams ? (["stats-input-status", searchParams] as const) : null;
|
||||
const { mutate } = useSWRConfig();
|
||||
const { isLoading } = useSWR<StatsInputStatusListApiResponse>(
|
||||
swrKey,
|
||||
getStatsInputStatusFetcher,
|
||||
{
|
||||
revalidateOnFocus: true,
|
||||
onSuccess: (data) => {
|
||||
if (data.status === "success" && data.data) {
|
||||
setRowData(toGridRows(data.data));
|
||||
} else {
|
||||
alert(data.message ?? "조회에 실패했습니다.");
|
||||
}
|
||||
},
|
||||
onError: () => {
|
||||
alert("데이터 조회 중 오류가 발생했습니다.");
|
||||
setRowData([]);
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (activeTabId === 'StatsInputStatusInp' && swrKey) {
|
||||
mutate(swrKey);
|
||||
}
|
||||
}, [activeTabId]);
|
||||
|
||||
const handleSearch = (values: SearchFormValues) => {
|
||||
if (values.sido === "" || values.sido === "ALL") {
|
||||
alert("시도를 선택해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
const searchParam: StatsInputStatusListRequestParams = {
|
||||
const params: StatsInputStatusListRequestParams = {
|
||||
ctpvNm: values.sido,
|
||||
sewerBzmnCd: values.bsnmCd,
|
||||
sggNm: values.gugun === 'ALL' ? '' : values.gugun,
|
||||
sggNm: values.gugun === "ALL" ? "" : values.gugun,
|
||||
statsYr: values.year,
|
||||
};
|
||||
|
||||
try {
|
||||
setIsLoading(true);
|
||||
|
||||
const response = await StatisticsInputStatusApi.getStatisticsInputStatusList(searchParam);
|
||||
console.log(response)
|
||||
if (response.status === 'success' && response.data) {
|
||||
setRowData(toGridRows(response.data));
|
||||
} else {
|
||||
alert(response.message);
|
||||
}
|
||||
} catch {
|
||||
alert('데이터 조회 중 오류가 발생했습니다.');
|
||||
setRowData([]);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
setSearchParams(params);
|
||||
mutate(["stats-input-status", params]);
|
||||
};
|
||||
|
||||
const handleReset = () => {
|
||||
setSearchParams(null);
|
||||
setRowData([]);
|
||||
};
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ const SubmitDailog = ({ open, onOpenChange, statusInfo, onConfirm }: SubmitDialo
|
||||
취소
|
||||
</Button>
|
||||
<Button type="submit" color="green">
|
||||
저장
|
||||
제출
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
|
||||
@@ -1,79 +1,141 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useMemo, useState } from 'react';
|
||||
|
||||
import { CodeSelect } from '@/entities/code';
|
||||
import {
|
||||
Button,
|
||||
Label,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableRow,
|
||||
// Table,
|
||||
// TableBody,
|
||||
// TableCell,
|
||||
// TableHead,
|
||||
// TableRow,
|
||||
DataTable,
|
||||
} from "@common/components";
|
||||
|
||||
import { getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
// import { useDataTable } from "@/shared/lib";
|
||||
import { GeneralVerificationColumn } from '@/components/util/column/management/GeneralVerificationColumn';
|
||||
import type { GeneralverificationList } from '@/entities/statistics/model/general-verification-interface';
|
||||
|
||||
const GeneralVerificationManagement = () => {
|
||||
const [statsCd, setStatsCd] = useState('');
|
||||
// const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
||||
// const [pagination, setPagination] = useState<PaginationState>({
|
||||
// pageIndex: 0,
|
||||
// pageSize: 100,
|
||||
// });
|
||||
|
||||
// const { tableComponent } = useDataTable({
|
||||
// tableOptions: {
|
||||
// GeneralVerificationColumn,
|
||||
// state: {
|
||||
// pagination,
|
||||
// rowSelection,
|
||||
// },
|
||||
// manualPagination: true,
|
||||
// enableMultiRowSelection: true,
|
||||
// getCoreRowModel: getCoreRowModel(),
|
||||
// onPaginationChange: setPagination,
|
||||
// onRowSelectionChange: setRowSelection,
|
||||
// },
|
||||
// // dataTableOptions: {
|
||||
// // onRowClick: handleRowClick,
|
||||
// // viewPagination: true,
|
||||
// // },
|
||||
// });
|
||||
|
||||
const mockData = useMemo<GeneralverificationList[]>(
|
||||
() => [
|
||||
{
|
||||
vrfSn: 1,
|
||||
tabNm: '하수도보급률',
|
||||
vrfNm: '인구수 검증',
|
||||
vrfClsCd: '시',
|
||||
statsCd: 'ST000001',
|
||||
useYn: 'Y',
|
||||
rgtrId: '관리자',
|
||||
regDt: '20260102',
|
||||
},
|
||||
{
|
||||
vrfSn: 2,
|
||||
tabNm: '하수도보급률',
|
||||
vrfNm: '인구수 검증',
|
||||
vrfClsCd: '시',
|
||||
statsCd: 'ST000001',
|
||||
useYn: 'Y',
|
||||
rgtrId: '관리자',
|
||||
regDt: '20260102',
|
||||
},
|
||||
{
|
||||
vrfSn: 3,
|
||||
tabNm: '하수도보급률',
|
||||
vrfNm: '인구수 검증',
|
||||
vrfClsCd: '시',
|
||||
statsCd: 'ST000001',
|
||||
useYn: 'Y',
|
||||
rgtrId: '관리자',
|
||||
regDt: '20260102',
|
||||
},
|
||||
{
|
||||
vrfSn: 4,
|
||||
tabNm: '하수도보급률',
|
||||
vrfNm: '인구수 검증',
|
||||
vrfClsCd: '시',
|
||||
statsCd: 'ST000001',
|
||||
useYn: 'Y',
|
||||
rgtrId: '관리자',
|
||||
regDt: '20260102',
|
||||
},
|
||||
],
|
||||
[]
|
||||
);
|
||||
|
||||
const table = useReactTable({
|
||||
data: mockData,
|
||||
columns: GeneralVerificationColumn,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
});
|
||||
|
||||
const handleSearch = () => {
|
||||
console.log(statsCd);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<div className='h-full'>
|
||||
<div className="card card-border">
|
||||
<form>
|
||||
<div className="flex items-center gap-8 p-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-label">
|
||||
통계항목
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="STITEM"
|
||||
value={statsCd}
|
||||
onValueChange={setStatsCd}
|
||||
placeholder="선택"
|
||||
className="w-[16rem]"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 ml-auto">
|
||||
<Button color="green" className="h-[3.2rem] w-[96px]" type="button">
|
||||
초기화
|
||||
</Button>
|
||||
<Button className="h-[3.2rem] w-[96px]" type="submit">
|
||||
조회
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex items-center gap-8 p-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label className="text-label">
|
||||
통계항목
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="STITEM"
|
||||
value={statsCd}
|
||||
onValueChange={setStatsCd}
|
||||
placeholder="전체"
|
||||
className="w-[16rem]"
|
||||
/>
|
||||
</div>
|
||||
</form>
|
||||
<div className="flex items-center gap-2 ml-auto">
|
||||
<Button color="green" className="h-[3.2rem] w-[96px]" type="button">
|
||||
초기화
|
||||
</Button>
|
||||
<Button className="h-[3.2rem] w-[96px]" type="button" onClick={handleSearch}>
|
||||
조회
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='card !mb-0 flex gap-5 !p-0'>
|
||||
<div className='card !mb-0 flex gap-5 !p-0 h-[calc(100vh-40rem)]'>
|
||||
<div className='card card-border w-1/2 !mx-0 flex flex-col'>
|
||||
<Table variant="default">
|
||||
<TableRow>
|
||||
<TableHead>No</TableHead>
|
||||
<TableHead>검증항목</TableHead>
|
||||
<TableHead>등록자</TableHead>
|
||||
<TableHead>등록일</TableHead>
|
||||
<TableHead>사용여부</TableHead>
|
||||
</TableRow>
|
||||
<TableBody className='text-center'>
|
||||
<TableRow>
|
||||
<TableCell>
|
||||
1
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
인구수검증
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
관리자
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
2026-02-09
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
Y
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<div className="card-header">
|
||||
<h3 className="text-2xl font-medium text-label">일반 검증 목록</h3>
|
||||
</div>
|
||||
<div className="card !m-4 h-full overflow-auto !p-0">
|
||||
<DataTable table={table} />
|
||||
</div>
|
||||
</div>
|
||||
<div className='w-1/2'>
|
||||
|
||||
|
||||
@@ -1,18 +1,39 @@
|
||||
"use client";
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
getCoreRowModel,
|
||||
getPaginationRowModel,
|
||||
useReactTable,
|
||||
} from "@tanstack/react-table";
|
||||
import type { AxiosError } from "axios";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
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";
|
||||
import type { VerificationTargetCodeResponse } from "@/entities/statistics/model/verification-target-management-interface";
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
DataTable,
|
||||
DateRangePicker,
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogHeader,
|
||||
@@ -29,32 +50,16 @@ import {
|
||||
SelectValue,
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
TableCell,
|
||||
DateRangePicker,
|
||||
} from "@common/components";
|
||||
import { verificationHistoryColumns } from "@/entities/statistics/model/verification-history-columns";
|
||||
import { analysisApi } from "@/entities/statistics/api/analysis-api";
|
||||
import { analysisHistoryApi } from "@/entities/statistics/api/analysis-history-api";
|
||||
import type {
|
||||
AnalysisRequestPayload,
|
||||
AnalysisResponseDto,
|
||||
} from "@/entities/statistics/model/analysis-interface";
|
||||
import type {
|
||||
StAnlsMstResponse,
|
||||
StAnlsMstSearchParams,
|
||||
StAnlsOutlierListResponse,
|
||||
} from "@/entities/statistics/model/analysis-history-interface";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { useAlertStore } from "@/shared/lib";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import type { VerificationTargetCodeResponse } from "@/entities/statistics/model/verification-target-management-interface";
|
||||
import { CodeSelect } from "@/entities/code";
|
||||
|
||||
import HbVerificationDetail from "./detail/HbVerificationDetail";
|
||||
|
||||
type DateRangeValue = {
|
||||
from?: Date;
|
||||
from: Date;
|
||||
to?: Date;
|
||||
};
|
||||
|
||||
@@ -95,7 +100,6 @@ function toNumber(value: string): number {
|
||||
}
|
||||
|
||||
const HbStatisticsVerification = () => {
|
||||
const router = useRouter();
|
||||
const { setMessage: alert } = useAlertStore((state) => state);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
@@ -119,6 +123,7 @@ const HbStatisticsVerification = () => {
|
||||
anlsSn: null,
|
||||
});
|
||||
const [selectedStatsCd, setSelectedStatsCd] = useState<string>("");
|
||||
const [selectedAnlsSn, setSelectedAnlsSn] = useState<number | null>(null);
|
||||
|
||||
const defaultHistoryDateRange = useMemo(
|
||||
() => getDefaultHistoryDateRange(),
|
||||
@@ -244,7 +249,7 @@ const HbStatisticsVerification = () => {
|
||||
|
||||
const analysisMutation = useMutation<
|
||||
AnalysisResponseDto,
|
||||
Error,
|
||||
AxiosError<ApiErrorResponse>,
|
||||
AnalysisRequestPayload
|
||||
>({
|
||||
mutationFn: async (payload) => analysisApi.analyze(payload),
|
||||
@@ -254,8 +259,11 @@ const HbStatisticsVerification = () => {
|
||||
queryKey: [ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_MST],
|
||||
});
|
||||
},
|
||||
onError: () => {
|
||||
alert("검증 실행 중 오류가 발생했습니다.");
|
||||
onError: (error) => {
|
||||
alert(
|
||||
error.response?.data?.message ??
|
||||
"검증 실행 중 오류가 발생했습니다.",
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -325,7 +333,7 @@ const HbStatisticsVerification = () => {
|
||||
function handleHistoryRowClick(row: StAnlsMstResponse) {
|
||||
const anlsSn = Number(row.anlsSn ?? 0);
|
||||
if (!anlsSn) return;
|
||||
router.push(`/statistics/verification/${anlsSn}`);
|
||||
setSelectedAnlsSn(anlsSn);
|
||||
}
|
||||
|
||||
function applyHistoryDateSearch(nextRange: DateRangeValue | undefined) {
|
||||
@@ -352,264 +360,298 @@ const HbStatisticsVerification = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="card card-border flex flex-col gap-6">
|
||||
{/* 검증 종류 선택 */}
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-6">
|
||||
<div className="flex items-center gap-4 pl-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
검증 년도
|
||||
</Label>
|
||||
<Select
|
||||
value={formState.verificationYear}
|
||||
onValueChange={(value) =>
|
||||
handleFormChange("verificationYear", value)
|
||||
}
|
||||
>
|
||||
<SelectTrigger className="w-[10rem] flex-1">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{yearOptions.map((year) => (
|
||||
<SelectItem key={year} value={year}>
|
||||
{year}년
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex items-center gap-4 pl-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
검증 방식
|
||||
</Label>
|
||||
<RadioGroup
|
||||
value={verifyType}
|
||||
onValueChange={(value) =>
|
||||
setVerifyType(value as VerifyType)
|
||||
}
|
||||
className="flex items-center gap-4"
|
||||
>
|
||||
<label className="flex cursor-pointer items-center gap-2 text-label">
|
||||
<RadioGroupItem value="ALL" />
|
||||
<span>일괄 검증</span>
|
||||
</label>
|
||||
<label className="flex cursor-pointer items-center gap-2 text-label">
|
||||
<RadioGroupItem value="SELECT" />
|
||||
<span>선택 검증</span>
|
||||
</label>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
color="green"
|
||||
className="h-[3.6rem] w-[120px]"
|
||||
onClick={handleSubmit}
|
||||
disabled={analysisMutation.isPending}
|
||||
>
|
||||
검증 실행
|
||||
</Button>
|
||||
<Button
|
||||
color="gray"
|
||||
className="h-[3.6rem] w-[120px]"
|
||||
type="button"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
{/* //검증 종류 선택 */}
|
||||
|
||||
{verifyType === "SELECT" && (
|
||||
<div className="flex gap-4">
|
||||
{/* 검증 대상 */}
|
||||
<div className="flex-1">
|
||||
<h4 className="mb-3 rounded bg-gray-100 px-4 py-2 text-[1.4rem] font-medium">
|
||||
검증 대상
|
||||
</h4>
|
||||
<div className="mb-3 flex items-center gap-4 px-4">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
통계항목
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="STITEM"
|
||||
onValueChange={setSelectedStatsCd}
|
||||
className="w-[24rem]"
|
||||
/>
|
||||
{selectedAnlsSn ? (
|
||||
<HbVerificationDetail
|
||||
anlsSn={selectedAnlsSn}
|
||||
onBack={() => setSelectedAnlsSn(null)}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<div className="card card-border flex flex-col gap-6">
|
||||
{/* 검증 종류 선택 */}
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-6">
|
||||
<div className="flex items-center gap-4 pl-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
검증 년도
|
||||
</Label>
|
||||
<Select
|
||||
value={formState.verificationYear}
|
||||
onValueChange={(value) =>
|
||||
handleFormChange(
|
||||
"verificationYear",
|
||||
value,
|
||||
)
|
||||
}
|
||||
>
|
||||
<SelectTrigger className="w-[10rem] flex-1">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{yearOptions.map((year) => (
|
||||
<SelectItem
|
||||
key={year}
|
||||
value={year}
|
||||
>
|
||||
{year}년
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<div className="flex items-center gap-4 pl-2">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
검증 방식
|
||||
</Label>
|
||||
<RadioGroup
|
||||
value={verifyType}
|
||||
onValueChange={(value) =>
|
||||
setVerifyType(value as VerifyType)
|
||||
}
|
||||
className="flex items-center gap-4"
|
||||
>
|
||||
<label className="flex cursor-pointer items-center gap-2 text-label">
|
||||
<RadioGroupItem value="ALL" />
|
||||
<span>일괄 검증</span>
|
||||
</label>
|
||||
<label className="flex cursor-pointer items-center gap-2 text-label">
|
||||
<RadioGroupItem value="SELECT" />
|
||||
<span>선택 검증</span>
|
||||
</label>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
color="green"
|
||||
className="h-[3.6rem] w-[120px]"
|
||||
onClick={handleSubmit}
|
||||
disabled={analysisMutation.isPending}
|
||||
>
|
||||
검증 실행
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="gray"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={() => setSelectedStatsCd("")}
|
||||
className="h-[3.6rem] w-[120px]"
|
||||
type="button"
|
||||
onClick={handleReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</div>
|
||||
<div className="max-h-[16rem] space-y-4 overflow-auto rounded-md border p-4">
|
||||
{verifyType === "SELECT" &&
|
||||
filteredVerificationTargetCodes &&
|
||||
filteredVerificationTargetCodes.length > 0 ? (
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
{filteredVerificationTargetCodes.map(
|
||||
(item) => (
|
||||
<div
|
||||
key={item.vrfcTrgtSn}
|
||||
className="flex items-center gap-2"
|
||||
>
|
||||
<Checkbox
|
||||
id={item.vrfcTrgtSn}
|
||||
checked={selectedTargets.includes(
|
||||
item.vrfcTrgtSn,
|
||||
)}
|
||||
onCheckedChange={() =>
|
||||
handleTargetToggle(
|
||||
item.vrfcTrgtSn,
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Label
|
||||
htmlFor={
|
||||
item.vrfcTrgtSn
|
||||
}
|
||||
className="cursor-pointer text-label"
|
||||
>
|
||||
{item.vrfcTrgtNm}
|
||||
</Label>
|
||||
</div>
|
||||
),
|
||||
</div>
|
||||
{/* //검증 종류 선택 */}
|
||||
|
||||
{verifyType === "SELECT" && (
|
||||
<div className="flex gap-4">
|
||||
{/* 검증 대상 */}
|
||||
<div className="flex-1">
|
||||
<h4 className="mb-3 rounded bg-gray-100 px-4 py-2 text-[1.4rem] font-medium">
|
||||
검증 대상
|
||||
</h4>
|
||||
<div className="mb-3 flex items-center gap-4 px-4">
|
||||
<Label className="text-[1.3rem] font-medium text-label">
|
||||
통계항목
|
||||
</Label>
|
||||
<CodeSelect
|
||||
upCd="STITEM"
|
||||
onValueChange={setSelectedStatsCd}
|
||||
className="w-[24rem]"
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
color="gray"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={() =>
|
||||
setSelectedStatsCd("")
|
||||
}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</div>
|
||||
<div className="max-h-[16rem] space-y-4 overflow-auto rounded-md border p-4">
|
||||
{verifyType === "SELECT" &&
|
||||
filteredVerificationTargetCodes &&
|
||||
filteredVerificationTargetCodes.length >
|
||||
0 ? (
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
{filteredVerificationTargetCodes.map(
|
||||
(item) => (
|
||||
<div
|
||||
key={
|
||||
item.vrfcTrgtSn
|
||||
}
|
||||
className="flex items-center gap-2"
|
||||
>
|
||||
<Checkbox
|
||||
id={
|
||||
item.vrfcTrgtSn
|
||||
}
|
||||
checked={selectedTargets.includes(
|
||||
item.vrfcTrgtSn,
|
||||
)}
|
||||
onCheckedChange={() =>
|
||||
handleTargetToggle(
|
||||
item.vrfcTrgtSn,
|
||||
)
|
||||
}
|
||||
/>
|
||||
<Label
|
||||
htmlFor={
|
||||
item.vrfcTrgtSn
|
||||
}
|
||||
className="cursor-pointer text-label"
|
||||
>
|
||||
{
|
||||
item.vrfcTrgtNm
|
||||
}
|
||||
</Label>
|
||||
</div>
|
||||
),
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-center py-4">
|
||||
<p className="text-[1.3rem] text-muted-foreground">
|
||||
검증 대상이 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center justify-center py-4">
|
||||
<p className="text-[1.3rem] text-muted-foreground">
|
||||
검증 대상이 없습니다.
|
||||
</p>
|
||||
</div>
|
||||
{/* //검증 대상 */}
|
||||
|
||||
{/* 검증 변수 */}
|
||||
<div className="flex-[0.5]">
|
||||
<h4 className="mb-3 rounded bg-gray-100 px-4 py-2 text-[1.4rem] font-medium">
|
||||
검증 변수
|
||||
</h4>
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">
|
||||
μ
|
||||
</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.mu}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"mu",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">
|
||||
Percentile
|
||||
</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.percentile}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"percentile",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">
|
||||
A
|
||||
</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.a}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"a",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">
|
||||
C
|
||||
</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.c}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"c",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{/* //검증 변수 */}
|
||||
</div>
|
||||
</div>
|
||||
{/* //검증 대상 */}
|
||||
|
||||
{/* 검증 변수 */}
|
||||
<div className="flex-[0.5]">
|
||||
<h4 className="mb-3 rounded bg-gray-100 px-4 py-2 text-[1.4rem] font-medium">
|
||||
검증 변수
|
||||
</h4>
|
||||
|
||||
<div className="space-y-3">
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">μ</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.mu}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"mu",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">
|
||||
Percentile
|
||||
</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.percentile}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"percentile",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">A</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.a}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"a",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-4">
|
||||
<Label className="w-32 text-label">C</Label>
|
||||
<Input
|
||||
type="number"
|
||||
value={formState.c}
|
||||
onChange={(event) =>
|
||||
handleFormChange(
|
||||
"c",
|
||||
event.target.value,
|
||||
)
|
||||
}
|
||||
className="flex-1"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* //검증 변수 */}
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-10 px-2 pb-8">
|
||||
<h3 className="mb-4 text-[1.6rem] font-semibold text-title">
|
||||
검증 이력
|
||||
</h3>
|
||||
<div className="card card-border !m-0 !mb-2 flex justify-between">
|
||||
<div className="flex items-center gap-4 px-2">
|
||||
<span className="text-[1.3rem] font-medium text-label">
|
||||
검증일시
|
||||
</span>
|
||||
<DateRangePicker
|
||||
value={historyDateRange as any}
|
||||
defaultValue={defaultHistoryDateRange as any}
|
||||
onValueChange={(value) =>
|
||||
setHistoryDateRange((value as any) ?? undefined)
|
||||
}
|
||||
className="max-w-[26rem]"
|
||||
<div className="mt-10 px-2 pb-8">
|
||||
<h3 className="mb-4 text-[1.6rem] font-semibold text-title">
|
||||
검증 이력
|
||||
</h3>
|
||||
<div className="card card-border !m-0 !mb-2 flex justify-between">
|
||||
<div className="flex items-center gap-4 px-2">
|
||||
<span className="text-[1.3rem] font-medium text-label">
|
||||
검증일시
|
||||
</span>
|
||||
<DateRangePicker
|
||||
value={historyDateRange}
|
||||
defaultValue={defaultHistoryDateRange}
|
||||
onValueChange={(value) =>
|
||||
setHistoryDateRange(
|
||||
value?.from
|
||||
? (value as DateRangeValue)
|
||||
: undefined,
|
||||
)
|
||||
}
|
||||
className="max-w-[26rem]"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={handleHistoryDateSearch}
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="gray"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={handleHistoryDateReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<DataTable
|
||||
table={table}
|
||||
variant="secondary"
|
||||
onRowClick={handleHistoryRowClick}
|
||||
viewPagination={true}
|
||||
className="[&_td]:!p-0"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={handleHistoryDateSearch}
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
type="button"
|
||||
color="gray"
|
||||
className="h-[3.2rem] px-4 text-[1.3rem]"
|
||||
onClick={handleHistoryDateReset}
|
||||
>
|
||||
초기화
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<DataTable
|
||||
table={table}
|
||||
variant="secondary"
|
||||
onRowClick={handleHistoryRowClick}
|
||||
viewPagination={true}
|
||||
className="[&_td]:!p-0"
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Dialog open={outlierDialog.open} onOpenChange={closeOutlierDialog}>
|
||||
<DialogContent className="max-w-[800px]">
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
import React, { useState } from "react";
|
||||
|
||||
import { Button } from "@common/components";
|
||||
|
||||
import AreaDIndicators from "./Indicators";
|
||||
import AreaBRegionalGrid from "./RegionalGrid";
|
||||
import AreaCScatterChart from "./ScatterChart";
|
||||
import AreaAVerificationList from "./VerificationList";
|
||||
|
||||
interface HbVerificationDetailProps {
|
||||
anlsSn: number;
|
||||
onBack: () => void;
|
||||
}
|
||||
|
||||
const HbVerificationDetail: React.FC<HbVerificationDetailProps> = ({
|
||||
anlsSn,
|
||||
onBack,
|
||||
}) => {
|
||||
const [selectedVrfcTrgtSn, setSelectedVrfcTrgtSn] = useState<string | null>(
|
||||
null,
|
||||
);
|
||||
const [selectedSido, setSelectedSido] = useState<string | null>(null);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-center gap-4 p-4">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
color="white"
|
||||
onClick={onBack}
|
||||
className=""
|
||||
>
|
||||
<i className="diveicon di-arrow-back" />
|
||||
<span className="sr-only">목록으로 돌아가기</span>
|
||||
</Button>
|
||||
<h2 className="text-[1.8rem] font-bold text-title">
|
||||
검증 상세
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="h-[20rem] overflow-y-auto">
|
||||
<AreaAVerificationList
|
||||
anlsSn={anlsSn}
|
||||
selectedVrfcTrgtSn={selectedVrfcTrgtSn}
|
||||
onSelect={setSelectedVrfcTrgtSn}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="card card-border !m-4">
|
||||
<h3 className="p-4 pb-0 text-[1.8rem] font-bold text-title">
|
||||
검증 결과 상세
|
||||
</h3>
|
||||
<div className="flex">
|
||||
<div className="flex-[0.5] p-4">
|
||||
<AreaBRegionalGrid
|
||||
anlsSn={anlsSn}
|
||||
vrfcTrgtSn={selectedVrfcTrgtSn}
|
||||
selectedSido={selectedSido}
|
||||
onSidoSelect={setSelectedSido}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-[0.5] flex-col gap-4 p-4 pt-[4.8rem]">
|
||||
<div className="flex-[0.5]">
|
||||
<AreaDIndicators
|
||||
anlsSn={anlsSn}
|
||||
vrfcTrgtSn={selectedVrfcTrgtSn}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex-[0.5]">
|
||||
<AreaCScatterChart
|
||||
anlsSn={anlsSn}
|
||||
vrfcTrgtSn={selectedVrfcTrgtSn}
|
||||
selectedSido={selectedSido}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HbVerificationDetail;
|
||||
@@ -0,0 +1,86 @@
|
||||
import React from "react";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stAnlsRsltApi } from "@/entities/statistics/api/statistics-analysis-result-api";
|
||||
|
||||
interface IndicatorsProps {
|
||||
anlsSn: number;
|
||||
vrfcTrgtSn: string | null;
|
||||
}
|
||||
|
||||
const Indicators: React.FC<IndicatorsProps> = ({ anlsSn, vrfcTrgtSn }) => {
|
||||
const { data: chartData, isLoading } = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT,
|
||||
"chart",
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
],
|
||||
queryFn: () => stAnlsRsltApi.getChartData(anlsSn, Number(vrfcTrgtSn)),
|
||||
enabled: !!anlsSn && !!vrfcTrgtSn,
|
||||
});
|
||||
|
||||
const dtl = chartData?.dtl;
|
||||
|
||||
if (!vrfcTrgtSn) {
|
||||
return (
|
||||
<div className="card card-border flex min-h-[10rem] items-center justify-center gap-6 text-[1.4rem] text-muted-foreground">
|
||||
항목을 선택해주세요
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="card card-border flex min-h-[10rem] items-center justify-center gap-6 text-[1.4rem] text-muted-foreground">
|
||||
지표 데이터를 불러오는 중...
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
const IndicatorItem = ({
|
||||
label,
|
||||
value,
|
||||
}: {
|
||||
label: string;
|
||||
value: number | null | undefined;
|
||||
}) => (
|
||||
<div className="flex flex-1 flex-col gap-2 overflow-hidden rounded border bg-gray-50 p-2">
|
||||
<h4
|
||||
className="truncate text-[1.2rem] font-medium text-label"
|
||||
title={label}
|
||||
>
|
||||
{label}
|
||||
</h4>
|
||||
<div className="truncate text-[1.6rem] font-bold">
|
||||
{value != null ? Number(value).toFixed(4) : "-"}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="card card-border !m-0 flex min-h-[10rem] flex-wrap gap-2">
|
||||
<IndicatorItem label="r 중위수" value={dtl?.rtCnterVl} />
|
||||
<IndicatorItem
|
||||
label="(E_m)E 중위수"
|
||||
value={dtl?.lastTrsfScrCnterVl}
|
||||
/>
|
||||
<IndicatorItem
|
||||
label="(E_l)E 하한값"
|
||||
value={dtl?.lastTrsfScrLlmtVl}
|
||||
/>
|
||||
<IndicatorItem
|
||||
label="(E_u)E 상한값"
|
||||
value={dtl?.lastTrsfScrUplmtVl}
|
||||
/>
|
||||
<IndicatorItem label="E_D_L" value={dtl?.llmtVl} />
|
||||
<IndicatorItem label="E_D_U" value={dtl?.uplmtVl} />
|
||||
<IndicatorItem label="이상치 하한선" value={dtl?.otlrLlmtLine} />
|
||||
<IndicatorItem label="이상치 상한선" value={dtl?.otlrUplmtLine} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Indicators;
|
||||
@@ -0,0 +1,269 @@
|
||||
import React, { useMemo, useState } from "react";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
type ColumnDef,
|
||||
getCoreRowModel,
|
||||
getPaginationRowModel,
|
||||
useReactTable,
|
||||
} from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeApi } from "@/entities/code/api/code-service";
|
||||
import { stAnlsRsltApi } from "@/entities/statistics/api/statistics-analysis-result-api";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics/model/statistics-analysis-result-interface";
|
||||
import {
|
||||
Button,
|
||||
DataTable,
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@common/components";
|
||||
|
||||
interface RegionalGridProps {
|
||||
anlsSn: number;
|
||||
vrfcTrgtSn: string | null;
|
||||
selectedSido: string | null;
|
||||
onSidoSelect: (sido: string | null) => void;
|
||||
}
|
||||
|
||||
const RegionalGrid: React.FC<RegionalGridProps> = ({
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
selectedSido,
|
||||
onSidoSelect,
|
||||
}) => {
|
||||
const [selectedGugun, setSelectedGugun] = useState<string>("ALL");
|
||||
const [selectedStatus, setSelectedStatus] = useState<string>("ALL");
|
||||
|
||||
const { data: regionCodes } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "LAESECD"],
|
||||
queryFn: () => CodeApi.getCode("LAESECD"),
|
||||
});
|
||||
|
||||
const sidoOptions = useMemo(() => {
|
||||
if (!regionCodes) return [];
|
||||
return regionCodes.filter(
|
||||
(code) => code.lwpoCd.startsWith("G3") && code.lwpoCd.length === 4,
|
||||
);
|
||||
}, [regionCodes]);
|
||||
|
||||
const gugunOptions = useMemo(() => {
|
||||
if (!regionCodes || !selectedSido || selectedSido === "ALL") return [];
|
||||
|
||||
const sidoPrefix = selectedSido;
|
||||
return regionCodes.filter(
|
||||
(code) =>
|
||||
code.lwpoCd.startsWith(sidoPrefix) && code.lwpoCd.length === 7,
|
||||
);
|
||||
}, [regionCodes, selectedSido]);
|
||||
|
||||
const {
|
||||
data: resultData,
|
||||
isLoading,
|
||||
refetch,
|
||||
} = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT,
|
||||
"list",
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
],
|
||||
queryFn: () =>
|
||||
stAnlsRsltApi.getResultList({
|
||||
anlsSn,
|
||||
vrfcTrgtSn: Number(vrfcTrgtSn),
|
||||
page: 0,
|
||||
size: 1000,
|
||||
}),
|
||||
enabled: false,
|
||||
});
|
||||
|
||||
const rowData = useMemo(() => {
|
||||
let data = (resultData?.content ?? []) as StAnlsRsltResponse[];
|
||||
|
||||
if (selectedSido && selectedSido !== "ALL") {
|
||||
const sidoName = sidoOptions.find(
|
||||
(opt) => opt.lwpoCd === selectedSido,
|
||||
)?.lwpoCdNm;
|
||||
if (sidoName) {
|
||||
data = data.filter((item) => item.sido === sidoName);
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedGugun && selectedGugun !== "ALL") {
|
||||
const gugunName = gugunOptions.find(
|
||||
(opt) => opt.lwpoCd === selectedGugun,
|
||||
)?.lwpoCdNm;
|
||||
if (gugunName) {
|
||||
data = data.filter((item) => item.gugun === gugunName);
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedStatus && selectedStatus !== "ALL") {
|
||||
const statusTarget = selectedStatus === "NORMAL" ? "y" : "n";
|
||||
data = data.filter(
|
||||
(item) => item.otlrYn.toLowerCase() === statusTarget,
|
||||
);
|
||||
}
|
||||
|
||||
return data;
|
||||
}, [
|
||||
resultData,
|
||||
selectedSido,
|
||||
selectedGugun,
|
||||
selectedStatus,
|
||||
sidoOptions,
|
||||
gugunOptions,
|
||||
]);
|
||||
|
||||
const columns: ColumnDef<StAnlsRsltResponse>[] = useMemo(
|
||||
() => [
|
||||
{ header: "시도", accessorKey: "sido", size: 80 },
|
||||
{ header: "구군", accessorKey: "gugun", size: 80 },
|
||||
{ header: "행정구역", accessorKey: "admdstNm", size: 100 },
|
||||
{ header: "이전년도", accessorKey: "prvyrVl", size: 80 },
|
||||
{ header: "당해년도", accessorKey: "cryrVl", size: 80 },
|
||||
{
|
||||
header: "R",
|
||||
accessorKey: "chgRt",
|
||||
size: 60,
|
||||
cell: (info) => Number(info.getValue() ?? 0).toFixed(2),
|
||||
},
|
||||
{
|
||||
header: "S",
|
||||
accessorKey: "trsfRt",
|
||||
size: 60,
|
||||
cell: (info) => Number(info.getValue() ?? 0).toFixed(2),
|
||||
},
|
||||
{
|
||||
header: "E",
|
||||
accessorKey: "otlrTrsfRt",
|
||||
size: 60,
|
||||
cell: (info) => Number(info.getValue() ?? 0).toFixed(2),
|
||||
},
|
||||
{
|
||||
header: "상태",
|
||||
accessorKey: "otlrYn",
|
||||
size: 60,
|
||||
cell: (info) => {
|
||||
const val = info.getValue();
|
||||
if (val === "y")
|
||||
return (
|
||||
<span className="font-medium text-green-600">
|
||||
정상
|
||||
</span>
|
||||
);
|
||||
if (val === "n")
|
||||
return (
|
||||
<span className="font-medium text-red-500">
|
||||
이상치
|
||||
</span>
|
||||
);
|
||||
return "-";
|
||||
},
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
|
||||
const table = useReactTable({
|
||||
data: rowData,
|
||||
columns,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
getPaginationRowModel: getPaginationRowModel(),
|
||||
initialState: {
|
||||
pagination: { pageSize: 10 },
|
||||
},
|
||||
});
|
||||
|
||||
const handleSidoChange = (val: string) => {
|
||||
onSidoSelect(val === "ALL" ? null : val);
|
||||
setSelectedGugun("ALL");
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<Select
|
||||
value={selectedSido || "ALL"}
|
||||
onValueChange={handleSidoChange}
|
||||
>
|
||||
<SelectTrigger className="w-[12rem] bg-white">
|
||||
<SelectValue placeholder="시도 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="ALL">전체 (시도)</SelectItem>
|
||||
{sidoOptions.map((opt) => (
|
||||
<SelectItem key={opt.lwpoCd} value={opt.lwpoCd}>
|
||||
{opt.lwpoCdNm}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select
|
||||
value={selectedGugun}
|
||||
onValueChange={setSelectedGugun}
|
||||
disabled={!selectedSido || selectedSido === "ALL"}
|
||||
>
|
||||
<SelectTrigger className="w-[12rem] bg-white">
|
||||
<SelectValue placeholder="시군구 선택" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="ALL">전체 (시군구)</SelectItem>
|
||||
{gugunOptions.map((opt) => (
|
||||
<SelectItem key={opt.lwpoCd} value={opt.lwpoCd}>
|
||||
{opt.lwpoCdNm}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Select
|
||||
value={selectedStatus}
|
||||
onValueChange={setSelectedStatus}
|
||||
>
|
||||
<SelectTrigger className="w-[10rem] bg-white">
|
||||
<SelectValue placeholder="상태" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="ALL">전체 상태</SelectItem>
|
||||
<SelectItem value="NORMAL">정상</SelectItem>
|
||||
<SelectItem value="OUTLIER">이상치</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<Button onClick={() => refetch()}>조회</Button>
|
||||
<Button color="gray">다운로드</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 overflow-auto">
|
||||
<DataTable
|
||||
table={table}
|
||||
variant="secondary"
|
||||
viewPagination={true}
|
||||
className="whitespace-nowrap text-[1.2rem] [&_td]:!px-2 [&_th]:!px-2"
|
||||
/>
|
||||
{isLoading && (
|
||||
<div className="p-4 text-center text-[1.3rem] text-muted-foreground">
|
||||
데이터를 불러오는 중...
|
||||
</div>
|
||||
)}
|
||||
{!isLoading && (!vrfcTrgtSn || rowData.length === 0) && (
|
||||
<div className="p-4 text-center text-[1.3rem] text-muted-foreground">
|
||||
{vrfcTrgtSn
|
||||
? "표시할 항목이 없습니다."
|
||||
: "항목을 선택해주세요"}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RegionalGrid;
|
||||
@@ -0,0 +1,253 @@
|
||||
import React, { useMemo } from "react";
|
||||
import { Scatter } from "react-chartjs-2";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
Legend,
|
||||
LinearScale,
|
||||
LineElement,
|
||||
PointElement,
|
||||
ScatterController,
|
||||
Tooltip,
|
||||
} from "chart.js";
|
||||
import zoomPlugin from "chartjs-plugin-zoom";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { CodeApi } from "@/entities/code/api/code-service";
|
||||
import { stAnlsRsltApi } from "@/entities/statistics/api/statistics-analysis-result-api";
|
||||
import type { StAnlsRsltResponse } from "@/entities/statistics/model/statistics-analysis-result-interface";
|
||||
|
||||
ChartJS.register(
|
||||
LinearScale,
|
||||
PointElement,
|
||||
LineElement,
|
||||
Tooltip,
|
||||
Legend,
|
||||
ScatterController,
|
||||
zoomPlugin,
|
||||
);
|
||||
|
||||
interface ScatterChartProps {
|
||||
anlsSn: number;
|
||||
vrfcTrgtSn: string | null;
|
||||
selectedSido: string | null;
|
||||
}
|
||||
|
||||
const ScatterChart: React.FC<ScatterChartProps> = ({
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
selectedSido,
|
||||
}) => {
|
||||
const { data: regionCodes } = useQuery({
|
||||
queryKey: [ENDPOINT.CMS_SERVICE.CODE, "LAESECD"],
|
||||
queryFn: () => CodeApi.getCode("LAESECD"),
|
||||
});
|
||||
|
||||
const selectedSidoName = useMemo(() => {
|
||||
if (!selectedSido || !regionCodes) return null;
|
||||
return (
|
||||
regionCodes.find((c) => c.lwpoCd === selectedSido)?.lwpoCdNm || null
|
||||
);
|
||||
}, [regionCodes, selectedSido]);
|
||||
|
||||
const { data: resultData, isLoading: isLoadingGrid } = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT,
|
||||
"list",
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
],
|
||||
queryFn: () =>
|
||||
stAnlsRsltApi.getResultList({
|
||||
anlsSn,
|
||||
vrfcTrgtSn: Number(vrfcTrgtSn),
|
||||
page: 0,
|
||||
size: 1000,
|
||||
}),
|
||||
enabled: !!anlsSn && !!vrfcTrgtSn,
|
||||
});
|
||||
|
||||
const { data: chartData, isLoading: isLoadingChart } = useQuery({
|
||||
queryKey: [
|
||||
ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT,
|
||||
"chart",
|
||||
anlsSn,
|
||||
vrfcTrgtSn,
|
||||
],
|
||||
queryFn: () => stAnlsRsltApi.getChartData(anlsSn, Number(vrfcTrgtSn)),
|
||||
enabled: !!anlsSn && !!vrfcTrgtSn,
|
||||
});
|
||||
|
||||
const isLoading = isLoadingGrid || isLoadingChart;
|
||||
|
||||
const chartConfig = useMemo(() => {
|
||||
if (!resultData || !chartData) return null;
|
||||
|
||||
const rawPoints = (resultData.content ?? []) as StAnlsRsltResponse[];
|
||||
const boundaries = chartData.list ?? [];
|
||||
|
||||
const sortedBoundaries = [...boundaries].sort(
|
||||
(a, b) => a.xPrev - b.xPrev,
|
||||
);
|
||||
const upperLineData = sortedBoundaries.map((b) => ({
|
||||
x: b.xPrev,
|
||||
y: b.yUpper,
|
||||
}));
|
||||
const lowerLineData = sortedBoundaries.map((b) => ({
|
||||
x: b.xPrev,
|
||||
y: b.yLower,
|
||||
}));
|
||||
|
||||
const normalPoints: {
|
||||
x: number;
|
||||
y: number;
|
||||
item: StAnlsRsltResponse;
|
||||
}[] = [];
|
||||
const outlierPoints: {
|
||||
x: number;
|
||||
y: number;
|
||||
item: StAnlsRsltResponse;
|
||||
}[] = [];
|
||||
|
||||
rawPoints.forEach((item) => {
|
||||
if (selectedSidoName && item.sido !== selectedSidoName) {
|
||||
return;
|
||||
}
|
||||
|
||||
const pt = {
|
||||
x: Number(item.prvyrVl ?? 0),
|
||||
y: Number(item.cryrVl ?? 0),
|
||||
item,
|
||||
};
|
||||
|
||||
if (item.otlrYn.toLowerCase() === "y") {
|
||||
normalPoints.push(pt);
|
||||
} else {
|
||||
outlierPoints.push(pt);
|
||||
}
|
||||
});
|
||||
|
||||
const data = {
|
||||
datasets: [
|
||||
{
|
||||
label: "상한선",
|
||||
data: upperLineData,
|
||||
type: "line" as const,
|
||||
borderColor: "rgba(255, 99, 132, 0.8)",
|
||||
borderWidth: 2,
|
||||
fill: false,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "하한선",
|
||||
data: lowerLineData,
|
||||
type: "line" as const,
|
||||
borderColor: "rgba(54, 162, 235, 0.8)",
|
||||
borderWidth: 2,
|
||||
fill: false,
|
||||
pointRadius: 0,
|
||||
tension: 0.1,
|
||||
},
|
||||
{
|
||||
label: "이상치",
|
||||
data: outlierPoints,
|
||||
backgroundColor: "rgba(255, 99, 132, 0.7)",
|
||||
pointRadius: 5,
|
||||
pointHoverRadius: 8,
|
||||
},
|
||||
{
|
||||
label: "정상",
|
||||
data: normalPoints,
|
||||
backgroundColor: "rgba(75, 192, 192, 0.7)",
|
||||
pointRadius: 4,
|
||||
pointHoverRadius: 7,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const options = {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
zoom: {
|
||||
pan: {
|
||||
enabled: true,
|
||||
mode: "xy" as const,
|
||||
},
|
||||
zoom: {
|
||||
wheel: {
|
||||
enabled: true,
|
||||
},
|
||||
pinch: {
|
||||
enabled: true,
|
||||
},
|
||||
mode: "xy" as const,
|
||||
},
|
||||
},
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: (context: any) => {
|
||||
if (context.dataset.type === "line") {
|
||||
return `${context.dataset.label}: (${context.parsed.x.toFixed(2)}, ${context.parsed.y.toFixed(2)})`;
|
||||
}
|
||||
const pt = context.raw as {
|
||||
x: number;
|
||||
y: number;
|
||||
item: StAnlsRsltResponse;
|
||||
};
|
||||
return `${pt.item.sido} ${pt.item.gugun}: 이전(${pt.x}), 당해(${pt.y})`;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
type: "linear" as const,
|
||||
position: "bottom" as const,
|
||||
title: {
|
||||
display: true,
|
||||
text: "이전년도 값",
|
||||
},
|
||||
},
|
||||
y: {
|
||||
type: "linear" as const,
|
||||
title: {
|
||||
display: true,
|
||||
text: "당해년도 값",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return { data, options };
|
||||
}, [resultData, chartData, selectedSidoName]);
|
||||
|
||||
return (
|
||||
<div className="relative flex-1 p-4">
|
||||
{!vrfcTrgtSn ? (
|
||||
<div className="flex h-full w-full items-center justify-center text-[1.4rem] text-muted-foreground">
|
||||
항목을 선택해주세요
|
||||
</div>
|
||||
) : isLoading ? (
|
||||
<div className="flex h-full w-full items-center justify-center text-[1.4rem] text-muted-foreground">
|
||||
차트를 불러오는 중...
|
||||
</div>
|
||||
) : chartConfig ? (
|
||||
<div className="h-[40rem] w-full">
|
||||
<Scatter
|
||||
data={chartConfig.data as any}
|
||||
options={chartConfig.options as any}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex h-full w-full items-center justify-center text-[1.4rem] text-muted-foreground">
|
||||
표시할 데이터가 없습니다.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ScatterChart;
|
||||
@@ -0,0 +1,141 @@
|
||||
import React, { useEffect, useMemo } from "react";
|
||||
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stAnlsDtlApi } from "@/entities/statistics/api/statistics-analysis-detail-api";
|
||||
import { verificationTargetManagementApi } from "@/entities/statistics/api/verification-target-management-service";
|
||||
import type { StAnlsDtlResponse } from "@/entities/statistics/model/statistics-analysis-detail-interface";
|
||||
import { DataTable } from "@common/components";
|
||||
|
||||
interface VerificationListProps {
|
||||
anlsSn: number;
|
||||
selectedVrfcTrgtSn: string | null;
|
||||
onSelect: (vrfcTrgtSn: string) => void;
|
||||
}
|
||||
|
||||
const VerificationList: React.FC<VerificationListProps> = ({
|
||||
anlsSn,
|
||||
selectedVrfcTrgtSn,
|
||||
onSelect,
|
||||
}) => {
|
||||
const { data: verificationTargetCodes } = useQuery({
|
||||
queryKey: [ENDPOINT.STATVERIFY_SERVICE.VRFCTGT_MNG, "codes"],
|
||||
queryFn: () =>
|
||||
verificationTargetManagementApi.getVerificationTargetCodes(),
|
||||
});
|
||||
|
||||
const targetCodeMap = useMemo(() => {
|
||||
const map = new Map<string, string>();
|
||||
if (verificationTargetCodes) {
|
||||
verificationTargetCodes.forEach((item) => {
|
||||
map.set(item.vrfcTrgtSn, item.vrfcTrgtNm);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}, [verificationTargetCodes]);
|
||||
|
||||
const { data: detailData, isLoading } = useQuery({
|
||||
queryKey: [ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_DTL, "list", anlsSn],
|
||||
queryFn: () =>
|
||||
stAnlsDtlApi.getDetailList({ anlsSn, page: 0, size: 100 }),
|
||||
enabled: !!anlsSn,
|
||||
});
|
||||
|
||||
const rowData = useMemo(() => {
|
||||
return (detailData?.content ?? []) as StAnlsDtlResponse[];
|
||||
}, [detailData]);
|
||||
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
{
|
||||
header: "검증 항목",
|
||||
accessorFn: (row: StAnlsDtlResponse) =>
|
||||
targetCodeMap.get(String(row.vrfcTrgtSn)) ||
|
||||
String(row.vrfcTrgtSn),
|
||||
id: "vrfcTrgtNm",
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
header: "μ",
|
||||
accessorKey: "ipcrCntVl",
|
||||
size: 60,
|
||||
},
|
||||
{
|
||||
header: "Percentile",
|
||||
accessorKey: "pctlCrtrVl",
|
||||
size: 60,
|
||||
},
|
||||
{
|
||||
header: "A",
|
||||
accessorKey: "scopAjmtCntVl",
|
||||
size: 60,
|
||||
},
|
||||
{
|
||||
header: "C",
|
||||
accessorKey: "thrsCntVl",
|
||||
size: 60,
|
||||
},
|
||||
{
|
||||
header: "정상",
|
||||
accessorKey: "nmlDataNocs",
|
||||
size: 70,
|
||||
},
|
||||
{
|
||||
header: "제외",
|
||||
accessorKey: "exclDataNocs",
|
||||
size: 70,
|
||||
},
|
||||
{
|
||||
header: "이상",
|
||||
accessorKey: "otlrDataNocs",
|
||||
size: 70,
|
||||
},
|
||||
],
|
||||
[targetCodeMap],
|
||||
);
|
||||
|
||||
const table = useReactTable({
|
||||
data: rowData,
|
||||
columns,
|
||||
getCoreRowModel: getCoreRowModel(),
|
||||
});
|
||||
|
||||
const handleRowClick = (row: StAnlsDtlResponse) => {
|
||||
onSelect(String(row.vrfcTrgtSn));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!selectedVrfcTrgtSn && rowData.length > 0) {
|
||||
const firstTargetSn = rowData[0]?.vrfcTrgtSn;
|
||||
if (firstTargetSn) onSelect(String(firstTargetSn));
|
||||
}
|
||||
}, [selectedVrfcTrgtSn, rowData, onSelect]);
|
||||
|
||||
return (
|
||||
<div className="flex-1 px-4 py-2">
|
||||
{isLoading && (
|
||||
<div className="p-4 text-center text-[1.3rem] text-muted-foreground">
|
||||
데이터를 불러오는 중...
|
||||
</div>
|
||||
)}
|
||||
{!isLoading && rowData.length === 0 && (
|
||||
<div className="p-4 text-center text-[1.3rem] text-muted-foreground">
|
||||
표시할 항목이 없습니다.
|
||||
</div>
|
||||
)}
|
||||
{!isLoading && rowData.length > 0 && (
|
||||
<DataTable
|
||||
table={table}
|
||||
variant="secondary"
|
||||
onRowClick={handleRowClick}
|
||||
viewPagination={false}
|
||||
className="whitespace-nowrap text-[1.2rem] [&_td]:!px-2 [&_th]:!px-2"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default VerificationList;
|
||||
@@ -262,6 +262,10 @@ export type TabDataGridProps = {
|
||||
activeTab?: string;
|
||||
/** 활성 탭 변경 시 호출 (제어 모드). activeTab과 함께 넘기면 부모가 탭 상태를 가짐 */
|
||||
onActiveTabChange?: (tabKey: string) => void;
|
||||
/** 저장 등 시점에 현재 활성 탭 그리드 데이터를 가져올 수 있도록 할당 (편집 반영된 값) */
|
||||
getGridDataRef?: {
|
||||
current: (() => Record<string, string | number>[]) | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type SplitDataGridProps = {
|
||||
|
||||
+79
-74
@@ -6,92 +6,97 @@ import { ValueType } from "realgrid";
|
||||
export const RegionalFactStatusInpColumn = {
|
||||
columns: [
|
||||
// 행정구역
|
||||
{ name: 'sido', fieldName: '시도', header: { text: '시도' }, editable: false },
|
||||
{ name: 'sgg', fieldName: '시군구', header: { text: '시군구' }, footer: { text: '합계' }, editable: false },
|
||||
{ name: 'ctpvNm', fieldName: 'ctpvNm', header: { text: '시도' }, footer: { text: '합계' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, editable: false, styleName: 'rg-cell-readonly' },
|
||||
|
||||
// 기본 정보
|
||||
{ name: 'targetYr', fieldName: '하수정비기본계획목표년도', header: { text: '하수정비기본계획목표년도' }},
|
||||
{ name: 'piplImprnPlanExtn', fieldName: '총관로정비계획연장(m)', header: { text: '총관로정비계획연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'piplPlanExtn', fieldName: '총계획연장(m)', header: { text: '총계획연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'piplFcltyExtn', fieldName: '총시설연장(m)', header: { text: '총시설연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'piplSupprt', fieldName: '하수관로보급률(%)', header: { text: '하수관로보급률(%)' }, footer: footerDecimal1, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'goalYr', fieldName: 'goalYr', header: { text: '하수정비기본계획목표년도' }},
|
||||
{ name: 'wholPplMtncPlanPrlg', fieldName: 'wholPplMtncPlanPrlg', header: { text: '총관로정비계획연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'wholPlanPrlg', fieldName: 'wholPlanPrlg', header: { text: '총계획연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'wholFcltPrlg', fieldName: 'wholFcltPrlg', header: { text: '총시설연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'swagePplPsplyRt', fieldName: 'swagePplPsplyRt', header: { text: '하수관로보급률(%)' }, footer: footerDecimal1, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 합류식(m)
|
||||
{ name: 'cmbnPlanAr', fieldName: '관로정비계획면적(㎢)', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'cmbnImprnPlanExtn', fieldName: '관로정비계획연장(m)', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnPlanExtn', fieldName: '계획연장(m)', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnFcltyExtn', fieldName: '시설연장(m)', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnRctglExtn', fieldName: '사각형(m)', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnCicleExtn', fieldName: '원형(m)', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnOpswrExtn', fieldName: '개거(m)', header: { text: '개거(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cmbnSdgttrExtn', fieldName: '측구(m)', header: { text: '측구(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysPplMtncPlanArea', fieldName: 'cbsysPplMtncPlanArea', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'cbsysPplMtncPlanPrlg', fieldName: 'cbsysPplMtncPlanPrlg', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysPlanPrlg', fieldName: 'cbsysPlanPrlg', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysFcltPrlg', fieldName: 'cbsysFcltPrlg', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysSqrePrlg', fieldName: 'cbsysSqrePrlg', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysCiclPrlg', fieldName: 'cbsysCiclPrlg', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysOpnPrlg', fieldName: 'cbsysOpnPrlg', header: { text: '개거(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'cbsysGttrPrlg', fieldName: 'cbsysGttrPrlg', header: { text: '측구(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
|
||||
// 분류식(m) > 오수관로
|
||||
{ name: 'pltwtrPlanAr', fieldName: '관로정비계획면적(㎢)', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'pltwtrImprnPlanExtn', fieldName: '관로정비계획연장(m)', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'pltwtrPlanExtn', fieldName: '계획연장(m)', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'pltwtrFlctyExtn', fieldName: '시설연장(m)', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'pltwtrSqreExtn', fieldName: '사각형(m)', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'pltwtrCiclExtn', fieldName: '원형(m)', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'drtwPplMtncPlanArea', fieldName: 'drtwPplMtncPlanArea', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'drtwPplMtncPlanPrlg', fieldName: 'drtwPplMtncPlanPrlg', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'drtwPplPlanPrlg', fieldName: 'drtwPplPlanPrlg', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'drtwPplFcltPrlg', fieldName: 'drtwPplFcltPrlg', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'drtwPplSqrePrlg', fieldName: 'drtwPplSqrePrlg', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'drtwPplCiclPrlg', fieldName: 'drtwPplCiclPrlg', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
|
||||
// 분류식(m) > 우수관로
|
||||
{ name: 'rainwtrPlanAr', fieldName: '관로정비계획면적(㎢)', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'rainwtrImprnPlanExtn', fieldName: '관로정비계획연장(m)', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrPlanExtn', fieldName: '계획연장(m)', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrFlctyExtn', fieldName: '시설연장(m)', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrSqreExtn', fieldName: '사각형(m)', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrCiclExtn', fieldName: '원형(m)', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrOpswrExtn', fieldName: '개거(m)', header: { text: '개거(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'rainwtrSdgttrExtn', fieldName: '측구(m)', header: { text: '측구(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplMtncPlanArea', fieldName: 'exlnPplMtncPlanArea', header: { text: '관로정비계획면적(㎢)' }, footer: footerDecimal3, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'exlnPplMtncPlanPrlg', fieldName: 'exlnPplMtncPlanPrlg', header: { text: '관로정비계획연장(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplPlanPrlg', fieldName: 'exlnPplPlanPrlg', header: { text: '계획연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplFcltPrlg', fieldName: 'exlnPplFcltPrlg', header: { text: '시설연장(m)' }, footer: footerDecimal2, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplSqrePrlg', fieldName: 'exlnPplSqrePrlg', header: { text: '사각형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplCiclPrlg', fieldName: 'exlnPplCiclPrlg', header: { text: '원형(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplOpnPrlg', fieldName: 'exlnPplOpnPrlg', header: { text: '개거(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
{ name: 'exlnPplGttrPrlg', fieldName: 'exlnPplGttrPrlg', header: { text: '측구(m)' }, footer: footerDecimal2, valueType: ValueType.NUMBER, dataFormat: '#,##0.00' },
|
||||
|
||||
// 합류식맨홀(개소)
|
||||
{ name: 'mnhleSite', fieldName: '합류식맨홀(개소)', header: { text: '합류식맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'cbsysMnhlCnt', fieldName: 'cbsysMnhlCnt', header: { text: '합류식맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 분류식 > 오수맨홀, 우수맨홀
|
||||
{ name: 'pltwtrMnhleSite', fieldName: '오수맨홀(개소)', header: { text: '오수맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwtrMnhleSite', fieldName: '우수맨홀(개소)', header: { text: '우수맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sprsysDrtwMnhlCnt', fieldName: 'sprsysDrtwMnhlCnt', header: { text: '오수맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sprsysExlnMnhlCnt', fieldName: 'sprsysExlnMnhlCnt', header: { text: '우수맨홀(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
{ name: 'pltwtrRcvrSite', fieldName: '오수받이(개소)', header: { text: '오수받이(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rainwtrRcvrSite', fieldName: '빗물받이(개소)', header: { text: '빗물받이(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'soilspllSite', fieldName: '우수토실(개소)', header: { text: '우수토실(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'soilholeSite', fieldName: '우수토구(개소)', header: { text: '우수토구(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'drtwRcvprpCnt', fieldName: 'drtwRcvprpCnt', header: { text: '오수받이(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnRcvprpCnt', fieldName: 'exlnRcvprpCnt', header: { text: '빗물받이(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'stofcbrCnt', fieldName: 'stofcbrCnt', header: { text: '우수토실(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'exlnOtflCnt', fieldName: 'exlnOtflCnt', header: { text: '우수토구(개소)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 하수도대장 전산화
|
||||
{ name: 'sewerRegstrCmptExtn', fieldName: '하수도대장전산화연장(m)', header: { text: '하수도대장전산화연장(m)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewerRegstrCmptRt', fieldName: '하수도대장전산화율(%)', header: { text: '하수도대장전산화율(%)' }, footer: footerDecimal1, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
{ name: 'sewerLdgrEdpPrlg', fieldName: 'sewerLdgrEdpPrlg', header: { text: '하수도대장전산화연장(m)' }, footer: footerInt, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'sewerLdgrEdpRt', fieldName: 'sewerLdgrEdpRt', header: { text: '하수도대장전산화율(%)' }, footer: footerDecimal1, editable: false, styleName: 'rg-cell-readonly', valueType: ValueType.NUMBER, dataFormat: '#,##0.0' },
|
||||
|
||||
// 비고
|
||||
{ name: 'rmk', fieldName: '비고', header: { text: '비고' } },
|
||||
{ name: 'rmrk', fieldName: 'rmrk', header: { text: '비고' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'adminArea',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정구역' },
|
||||
items: ['sido', 'sgg'],
|
||||
items: [
|
||||
{ column: 'ctpvNm', footerUserSpans: [{ colspan: 3 }] },
|
||||
'sggNm',
|
||||
'admdstNm',
|
||||
],
|
||||
},
|
||||
'targetYr',
|
||||
'piplImprnPlanExtn',
|
||||
'piplPlanExtn',
|
||||
'piplFcltyExtn',
|
||||
'piplSupprt',
|
||||
'goalYr',
|
||||
'wholPplMtncPlanPrlg',
|
||||
'wholPlanPrlg',
|
||||
'wholFcltPrlg',
|
||||
'swagePplPsplyRt',
|
||||
{
|
||||
name: 'combined',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '합류식(m)' },
|
||||
items: [
|
||||
'cmbnPlanAr',
|
||||
'cmbnImprnPlanExtn',
|
||||
'cmbnPlanExtn',
|
||||
'cmbnFcltyExtn',
|
||||
'cbsysPplMtncPlanArea',
|
||||
'cbsysPplMtncPlanPrlg',
|
||||
'cbsysPlanPrlg',
|
||||
'cbsysFcltPrlg',
|
||||
{
|
||||
name: 'cmbnCulvert',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '암거' },
|
||||
items: ['cmbnRctglExtn', 'cmbnCicleExtn'],
|
||||
items: ['cbsysSqrePrlg', 'cbsysCiclPrlg'],
|
||||
},
|
||||
'cmbnOpswrExtn',
|
||||
'cmbnSdgttrExtn',
|
||||
'cbsysOpnPrlg',
|
||||
'cbsysGttrPrlg',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -104,15 +109,15 @@ export const RegionalFactStatusInpColumn = {
|
||||
hideChildHeaders: false,
|
||||
header: { text: '오수관로' },
|
||||
items: [
|
||||
'pltwtrPlanAr',
|
||||
'pltwtrImprnPlanExtn',
|
||||
'pltwtrPlanExtn',
|
||||
'pltwtrFlctyExtn',
|
||||
'drtwPplMtncPlanArea',
|
||||
'drtwPplMtncPlanPrlg',
|
||||
'drtwPplPlanPrlg',
|
||||
'drtwPplFcltPrlg',
|
||||
{
|
||||
name: 'pltwtrCulvert',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '암거' },
|
||||
items: ['pltwtrSqreExtn', 'pltwtrCiclExtn'],
|
||||
items: ['drtwPplSqrePrlg', 'drtwPplCiclPrlg'],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -121,39 +126,39 @@ export const RegionalFactStatusInpColumn = {
|
||||
hideChildHeaders: false,
|
||||
header: { text: '우수관로' },
|
||||
items: [
|
||||
'rainwtrPlanAr',
|
||||
'rainwtrImprnPlanExtn',
|
||||
'rainwtrPlanExtn',
|
||||
'rainwtrFlctyExtn',
|
||||
'exlnPplMtncPlanArea',
|
||||
'exlnPplMtncPlanPrlg',
|
||||
'exlnPplPlanPrlg',
|
||||
'exlnPplFcltPrlg',
|
||||
{
|
||||
name: 'rainwtrCulvert',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '암거' },
|
||||
items: ['rainwtrSqreExtn', 'rainwtrCiclExtn'],
|
||||
items: ['exlnPplSqrePrlg', 'exlnPplCiclPrlg'],
|
||||
},
|
||||
'rainwtrOpswrExtn',
|
||||
'rainwtrSdgttrExtn',
|
||||
'exlnPplOpnPrlg',
|
||||
'exlnPplGttrPrlg',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
'mnhleSite',
|
||||
'cbsysMnhlCnt',
|
||||
{
|
||||
name: 'separatedManhole',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '분류식' },
|
||||
items: ['pltwtrMnhleSite', 'rainwtrMnhleSite'],
|
||||
items: ['sprsysDrtwMnhlCnt', 'sprsysExlnMnhlCnt'],
|
||||
},
|
||||
'pltwtrRcvrSite',
|
||||
'rainwtrRcvrSite',
|
||||
'soilspllSite',
|
||||
'soilholeSite',
|
||||
'sewerRegstrCmptExtn',
|
||||
'sewerRegstrCmptRt',
|
||||
'rmk',
|
||||
'drtwRcvprpCnt',
|
||||
'exlnRcvprpCnt',
|
||||
'stofcbrCnt',
|
||||
'exlnOtflCnt',
|
||||
'sewerLdgrEdpPrlg',
|
||||
'sewerLdgrEdpRt',
|
||||
'rmrk',
|
||||
],
|
||||
rowStartNum: 4,
|
||||
fixedColumns: 1,
|
||||
tabKey: 'regionalFactStatusInp',
|
||||
tabKey: 'ST00020001',
|
||||
tabLabel: '지역별 시설현황'
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { ColumnInfoList } from "@/components/type/DataGrid.type";
|
||||
import { RegionalFactStatusInpColumn } from "./RegionalFactStatusInpColumn";
|
||||
import { FactInstallStatusInpColumn } from "./FactInstallStatusInpColumn";
|
||||
import { PipeTypeStatusInpColumn } from "./PipeTypeStatusInpColumn";
|
||||
import { PipeDiameterStatusInpColumn } from "./PipeDiameterStatusInpColumn";
|
||||
import { ManholeStatusInpColumn } from "./ManholeStatusInpColumn";
|
||||
import { ConnectionStatusInpColumn } from "./ConnectionStatusInpColumn";
|
||||
|
||||
/** 하수관로 입력 탭 컬럼 리스트 (TabDataGrid columnInfo용) */
|
||||
export const SewagePipeInpColumnInfoList: ColumnInfoList[] = [
|
||||
RegionalFactStatusInpColumn,
|
||||
FactInstallStatusInpColumn,
|
||||
PipeTypeStatusInpColumn,
|
||||
PipeDiameterStatusInpColumn,
|
||||
ManholeStatusInpColumn,
|
||||
ConnectionStatusInpColumn,
|
||||
];
|
||||
@@ -0,0 +1,62 @@
|
||||
import dayjs from "dayjs";
|
||||
import { useState } from "react";
|
||||
import type { ColumnDef } from "@tanstack/react-table";
|
||||
import { Button } from "@common/components";
|
||||
import type { GeneralverificationList } from "@/entities/statistics/model/general-verification-interface";
|
||||
|
||||
export const GeneralVerificationColumn: ColumnDef<GeneralverificationList>[] = [
|
||||
{
|
||||
id: "no",
|
||||
header: "NO",
|
||||
cell: ({ row, table }) => {
|
||||
const totalRows = table.getRowCount();
|
||||
const { pageIndex, pageSize } = table.getState().pagination;
|
||||
return totalRows - (pageIndex * pageSize + row.index);
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: "vrfSn",
|
||||
header: "일련번호",
|
||||
enableHiding: true,
|
||||
},
|
||||
{
|
||||
accessorKey: "tabNm",
|
||||
header: "통계항목",
|
||||
},
|
||||
{
|
||||
accessorKey: "vrfNm",
|
||||
header: "검증명",
|
||||
},
|
||||
{
|
||||
accessorKey: "vrfClsCd",
|
||||
header: "검증분류",
|
||||
},
|
||||
{
|
||||
accessorKey: "useYn",
|
||||
header: "사용여부",
|
||||
},
|
||||
{
|
||||
accessorKey: "regDt",
|
||||
header: "등록일",
|
||||
cell: ({ row }) => {
|
||||
const date = dayjs(row.original.regDt);
|
||||
return date.format("YYYY-MM-DD");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: "관리",
|
||||
cell: ({ row }) => (
|
||||
<div onClick={(e) => e.stopPropagation()}>
|
||||
<GeneralVerificationManageButton vrfSn={row.original.vrfSn} />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const GeneralVerificationManageButton = ({ vrfSn }: { vrfSn: number }) => {
|
||||
const [dialogOpen, setDialogOpen] = useState(false);
|
||||
return (
|
||||
<Button size="sm" >관리</Button>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
StAnlsDtlListApiResponse,
|
||||
StAnlsDtlResponse,
|
||||
StAnlsDtlSearchParams,
|
||||
} from "../model/statistics-analysis-detail-interface";
|
||||
|
||||
export class StAnlsDtlApiService {
|
||||
public async getDetailList(
|
||||
params: StAnlsDtlSearchParams,
|
||||
): Promise<StAnlsDtlListApiResponse> {
|
||||
const response = await client.get<StAnlsDtlListApiResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_DTL}`,
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getDetail(
|
||||
anlsSn: number,
|
||||
vrfcTrgtSn: number,
|
||||
): Promise<StAnlsDtlResponse> {
|
||||
const response = await client.get<StAnlsDtlResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_DTL}/${anlsSn}/${vrfcTrgtSn}`,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const stAnlsDtlApi = new StAnlsDtlApiService();
|
||||
@@ -0,0 +1,37 @@
|
||||
import { client } from "@/shared/api";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import type {
|
||||
ChartRetDto,
|
||||
StAnlsRsltListApiResponse,
|
||||
StAnlsRsltSearchParams,
|
||||
} from "../model/statistics-analysis-result-interface";
|
||||
|
||||
export class StAnlsRsltApiService {
|
||||
public async getResultList(
|
||||
params: StAnlsRsltSearchParams,
|
||||
): Promise<StAnlsRsltListApiResponse> {
|
||||
const response = await client.get<StAnlsRsltListApiResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT}`,
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getChartData(
|
||||
anlsSn: number,
|
||||
vrfcTrgtSn: number,
|
||||
): Promise<ChartRetDto> {
|
||||
const response = await client.get<ChartRetDto>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.ST_ANLS_RSLT}/chartList/${anlsSn}/${vrfcTrgtSn}`,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const stAnlsRsltApi = new StAnlsRsltApiService();
|
||||
|
||||
@@ -21,7 +21,7 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe
|
||||
|
||||
public async checkInputPeriod(params: string): Promise<CheckInputPeriodResponse> {
|
||||
const response = await stClient.get<CheckInputPeriodResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?year=${params}`,
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?statsYr=${params}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
@@ -43,4 +43,4 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe
|
||||
}
|
||||
}
|
||||
|
||||
export const StatisticsInputSewSupplyRateApi = new StatisticsInputSewSupplyRateApiService();
|
||||
export const statisticsInputSewSupplyRateApi = new StatisticsInputSewSupplyRateApiService();
|
||||
@@ -6,6 +6,8 @@ import {
|
||||
type SearchCondition,
|
||||
type ApiResponse,
|
||||
type Sgg,
|
||||
type cancelSubmitRequest,
|
||||
type cancelSubmitResponse,
|
||||
} from "../model/statistics-interface";
|
||||
|
||||
export class StatisticsAPiService implements StatisticsService {
|
||||
@@ -23,6 +25,15 @@ export class StatisticsAPiService implements StatisticsService {
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// 입력 - 제출 취소
|
||||
public async cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse> {
|
||||
const response = await stClient.put<cancelSubmitResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/cancel-submit`,
|
||||
param
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const statisticsAPi = new StatisticsAPiService();
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface GeneralverificationList {
|
||||
vrfSn: number;
|
||||
tabNm: string;
|
||||
vrfNm: string;
|
||||
vrfClsCd: string;
|
||||
statsCd: string;
|
||||
useYn: string;
|
||||
rgtrId?: string;
|
||||
regDt?: string;
|
||||
mdfrId?: string;
|
||||
mdfcnDt?: string;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface StAnlsDtlResponse {
|
||||
anlsSn: number; // 분석 일련번호
|
||||
vrfcTrgtSn: number; // 검증 대상 일련번호
|
||||
ipcrCntVl: number | null; // 중요도 개수 값 (mu)
|
||||
pctlCrtrVl: number | null; // 백분위 기준 값 (percentile)
|
||||
scopAjmtCntVl: number | null; // 범위 조정 개수 값 (A)
|
||||
thrsCntVl: number | null; // 임계 개수 값 (C)
|
||||
rtCnterVl: number | null; // 비율 중앙값
|
||||
lastTrsfScrCnterVl: number | null; // 최종 변환 점수 중앙값
|
||||
lastTrsfScrLlmtVl: number | null; // 최종 변환 점수 하한값
|
||||
lastTrsfScrUplmtVl: number | null; // 최종 변환 점수 상한값
|
||||
uplmtVl: number | null; // 상한값
|
||||
llmtVl: number | null; // 하한값
|
||||
otlrUplmtLine: number | null; // 이상치 상한선
|
||||
otlrLlmtLine: number | null; // 이상치 하한선
|
||||
nmlDataNocs: number; // 정상 데이터 건수
|
||||
exclDataNocs: number; // 제외 데이터 건수
|
||||
otlrDataNocs: number; // 이상치 데이터 건수
|
||||
}
|
||||
|
||||
export interface StAnlsDtlSearchParams extends PageableParams {
|
||||
anlsSn?: number; // 분석 일련번호
|
||||
vrfcTrgtSn?: number; // 검증 대상 일련번호
|
||||
}
|
||||
|
||||
export type StAnlsDtlListApiResponse = PageableList<StAnlsDtlResponse>;
|
||||
@@ -0,0 +1,46 @@
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
import type { StAnlsDtlResponse } from "./statistics-analysis-detail-interface";
|
||||
|
||||
export interface StAnlsRsltResponse {
|
||||
rsltSn: number; // 결과 일련번호
|
||||
anlsSn: number; // 분석 일련번호
|
||||
vrfcTrgtSn: number; // 검증 대상 일련번호
|
||||
admdstCd: string; // 행정구역 코드
|
||||
admdstNm: string; // 행정구역 명칭
|
||||
sido: string; // 시도
|
||||
gugun: string; // 시군구
|
||||
adstDong: string; // 행정동
|
||||
drngBzmnCd: string; // 하수도 사업자 코드
|
||||
pipeSeCd: string; // 파이프 구분 코드
|
||||
fcltNm: string; // 시설명
|
||||
addr: string; // 주소
|
||||
prvyrVl: number | null; // 전년도 값
|
||||
cryrVl: number | null; // 당해년도 값
|
||||
chgRt: number | null; // 변경율 (r_i)
|
||||
trsfRt: number | null; // 변환 비율 (s_i)
|
||||
otlrTrsfRt: number | null; // 이상치 변환 비율 (E_i)
|
||||
otlrYn: string; // 이상치 여부 (y/n)
|
||||
}
|
||||
|
||||
export interface StAnlsRsltSearchParams extends PageableParams {
|
||||
anlsSn?: number; // 분석 일련번호
|
||||
vrfcTrgtSn?: number; // 검증 대상 일련번호
|
||||
admdstCd?: string; // 행정구역 코드
|
||||
admdstNm?: string; // 행정구역 명칭
|
||||
fcltNm?: string; // 시설명
|
||||
otlrYn?: string; // 이상치 여부 (y/n)
|
||||
}
|
||||
|
||||
export type StAnlsRsltListApiResponse = PageableList<StAnlsRsltResponse>;
|
||||
|
||||
export interface ChartBoundaryPointDto {
|
||||
xPrev: number; // 전년도 값 (x축)
|
||||
yLower: number; // 이상치 하한 당년값 (y축)
|
||||
yUpper: number; // 이상치 상한 당년값 (y축)
|
||||
}
|
||||
|
||||
export interface ChartRetDto {
|
||||
dtl: StAnlsDtlResponse; // 분석 상세 파라미터 (mu, r_mid, T_L, T_U 등)
|
||||
list: ChartBoundaryPointDto[]; // HBR 경계선 곡선 데이터 리스트 (x_prev, y_lower, y_upper)
|
||||
}
|
||||
@@ -15,6 +15,20 @@ export interface Sgg {
|
||||
bsnmCd: string;
|
||||
}
|
||||
|
||||
export interface cancelSubmitRequest {
|
||||
statsYr: string;
|
||||
ctpvNm: string;
|
||||
sggNm: string;
|
||||
sewerBzmnCd: string;
|
||||
statsCd: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface cancelSubmitResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
status: string;
|
||||
data: T;
|
||||
@@ -24,4 +38,5 @@ export interface ApiResponse<T> {
|
||||
export interface StatisticsService {
|
||||
getSidoList(): Promise<ApiResponse<SearchCondition>>;
|
||||
getSggList(sidoName: string): Promise<ApiResponse<Sgg[]>>;
|
||||
cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse>;
|
||||
}
|
||||
@@ -29,6 +29,7 @@ export interface SewerageSupplyRateCommonInfo {
|
||||
swagePplPsplyRt: number;
|
||||
ctpvNm: string;
|
||||
statsYr: string;
|
||||
statsCd: string;
|
||||
}
|
||||
|
||||
/** 검증 결과 한 건 (필드별 메시지) */
|
||||
@@ -132,6 +133,7 @@ export interface SewerageSupplyRateSaveItem {
|
||||
export interface SewerageSupplyRateSaveRequest {
|
||||
statsYr: string;
|
||||
ctpvNm: string;
|
||||
sggNm: string;
|
||||
sewerBzmnCd: string;
|
||||
userId: string;
|
||||
sewerBzmnFrgnrWholPpltnCnt?: number;
|
||||
|
||||
@@ -76,6 +76,8 @@ export const ENDPOINT = {
|
||||
VRFCTGT_MNG: "/statverify-service/api/v1/vrfc-trgt-mng",
|
||||
ANALYSIS: "/statverify-service/api/v1/stat-verify/analysis",
|
||||
ST_ANLS_MST: "/statverify-service/api/v1/st-anls-mst",
|
||||
ST_ANLS_DTL: "/statverify-service/api/v1/st-anls-dtl",
|
||||
ST_ANLS_RSLT: "/statverify-service/api/v1/st-anls-rslt",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,34 +1,42 @@
|
||||
interface SortConfig {
|
||||
empty: boolean;
|
||||
sorted: boolean;
|
||||
unsorted: boolean;
|
||||
empty: boolean;
|
||||
sorted: boolean;
|
||||
unsorted: boolean;
|
||||
}
|
||||
|
||||
interface PageableConfig {
|
||||
sort: SortConfig;
|
||||
offset: number;
|
||||
pageNumber: number;
|
||||
pageSize: number;
|
||||
paged: boolean;
|
||||
unpaged: boolean;
|
||||
sort: SortConfig;
|
||||
offset: number;
|
||||
pageNumber: number;
|
||||
pageSize: number;
|
||||
paged: boolean;
|
||||
unpaged: boolean;
|
||||
}
|
||||
|
||||
export interface PageableList<T> {
|
||||
content: T[];
|
||||
pageable: PageableConfig;
|
||||
sort: SortConfig;
|
||||
totalPages: number;
|
||||
totalElements: number;
|
||||
number: number;
|
||||
numberOfElements: number;
|
||||
size: number;
|
||||
first: boolean;
|
||||
last: boolean;
|
||||
empty: boolean;
|
||||
content: T[];
|
||||
pageable: PageableConfig;
|
||||
sort: SortConfig;
|
||||
totalPages: number;
|
||||
totalElements: number;
|
||||
number: number;
|
||||
numberOfElements: number;
|
||||
size: number;
|
||||
first: boolean;
|
||||
last: boolean;
|
||||
empty: boolean;
|
||||
}
|
||||
|
||||
export interface PageableParams {
|
||||
page?: number;
|
||||
size?: number;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
size?: number;
|
||||
sort?: string;
|
||||
}
|
||||
|
||||
export interface ApiErrorResponse {
|
||||
timestamp: string;
|
||||
message: string;
|
||||
status: number;
|
||||
code: string;
|
||||
errors: unknown[];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { TabBar } from "./tab-bar";
|
||||
function StatisticsPageLayout({ children }: { children: React.ReactNode }) {
|
||||
const { activeTabId, tabs } = useTabStore();
|
||||
|
||||
const pageTitle = tabs.find((t) => t.menuItem.menuEngNm === activeTabId);
|
||||
const pageTitle = tabs.find((t) => t.menuItem.urlPath === activeTabId);
|
||||
|
||||
const menuPaths = pageTitle?.path?.split(">").map((path) => path.trim());
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ const useTabStoreHook = create<TabStore>((set, get) => ({
|
||||
menuList: null,
|
||||
addTab: (menuItem: MenuItem) => {
|
||||
const { tabs, menuList } = get();
|
||||
const tabId = menuItem.menuEngNm || '';
|
||||
const tabId = menuItem.urlPath || '';
|
||||
|
||||
// 이미 존재하는 탭인지 확인
|
||||
const existingTab = tabs.find((tab) => tab.id === tabId);
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
||||
import tsParser from "@typescript-eslint/parser";
|
||||
|
||||
export default [
|
||||
{
|
||||
files: ["**/*.{js,jsx,ts,tsx}"],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
},
|
||||
plugins: {
|
||||
"simple-import-sort": simpleImportSort,
|
||||
},
|
||||
rules: {
|
||||
"simple-import-sort/imports": [
|
||||
"warn",
|
||||
{
|
||||
groups: [
|
||||
["^react", "^next"],
|
||||
["^@?\\w"],
|
||||
[
|
||||
"^@/shared",
|
||||
"^@/entities",
|
||||
"^@/features",
|
||||
"^@/widgets",
|
||||
"^@/app",
|
||||
"^@common",
|
||||
],
|
||||
["^\\u0000"],
|
||||
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
||||
["^\\./(?=.*/)", "^\\.(?!/?$)", "^\\./?$"],
|
||||
["^.+\\.?(css|scss)$"],
|
||||
],
|
||||
},
|
||||
],
|
||||
"simple-import-sort/exports": "warn",
|
||||
},
|
||||
},
|
||||
];
|
||||
+25
-22
@@ -8,28 +8,28 @@
|
||||
"apps/*",
|
||||
"packages/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"build:common": "turbo run build --filter=@common/*",
|
||||
"dev": "turbo run dev",
|
||||
"build:cm": "turbo run build --filter=cm",
|
||||
"build:cs": "turbo run build --filter=cs",
|
||||
"build:sn": "turbo run build --filter=sn",
|
||||
"build:wr": "turbo run build --filter=wr",
|
||||
"build:fo": "turbo run build --filter=fo",
|
||||
"build:dm": "turbo run build --filter=dm",
|
||||
"build:dm_new": "turbo run build --filter=dm_new",
|
||||
"dev:cm": "turbo run dev --filter=cm",
|
||||
"dev:cs": "turbo run dev --filter=cs",
|
||||
"dev:sn": "turbo run dev --filter=sn",
|
||||
"dev:wr": "turbo run dev --filter=wr",
|
||||
"dev:fo": "turbo run dev --filter=fo",
|
||||
"dev:dm": "turbo run dev --filter=dm",
|
||||
"dev:dm_new": "turbo run dev --filter=dm_new",
|
||||
"preview:components": "turbo run storybook --filter=@common/components",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"build:common": "turbo run build --filter=@common/*",
|
||||
"dev": "turbo run dev",
|
||||
"build:cm": "turbo run build --filter=cm",
|
||||
"build:cs": "turbo run build --filter=cs",
|
||||
"build:sn": "turbo run build --filter=sn",
|
||||
"build:wr": "turbo run build --filter=wr",
|
||||
"build:fo": "turbo run build --filter=fo",
|
||||
"build:dm": "turbo run build --filter=dm",
|
||||
"build:dm_new": "turbo run build --filter=dm_new",
|
||||
"dev:cm": "turbo run dev --filter=cm",
|
||||
"dev:cs": "turbo run dev --filter=cs",
|
||||
"dev:sn": "turbo run dev --filter=sn",
|
||||
"dev:wr": "turbo run dev --filter=wr",
|
||||
"dev:fo": "turbo run dev --filter=fo",
|
||||
"dev:dm": "turbo run dev --filter=dm",
|
||||
"dev:dm_new": "turbo run dev --filter=dm_new",
|
||||
"preview:components": "turbo run storybook --filter=@common/components",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"chart.js": "^4.4.8",
|
||||
"react": "^19.2.1",
|
||||
@@ -38,9 +38,12 @@
|
||||
"zustand": "^5.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3",
|
||||
"@types/node": "^22.13.1",
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@typescript-eslint/parser": "^8.56.1",
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^16.2.7",
|
||||
"turbo": "2.4.2"
|
||||
|
||||
@@ -10,7 +10,10 @@ import { Button } from "../button";
|
||||
import { Calendar } from "../calendar";
|
||||
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
|
||||
|
||||
type DateRangePickerProps = React.HTMLAttributes<HTMLDivElement> &
|
||||
type DateRangePickerProps = Omit<
|
||||
React.HTMLAttributes<HTMLDivElement>,
|
||||
"defaultValue"
|
||||
> &
|
||||
React.ComponentProps<typeof DayPicker> & {
|
||||
value?: DateRange;
|
||||
defaultValue?: DateRange;
|
||||
|
||||
Generated
+198
-25
@@ -32,6 +32,9 @@ importers:
|
||||
specifier: ^5.0.3
|
||||
version: 5.0.9(@types/react@19.2.7)(immer@10.2.0)(react@19.2.3)(use-sync-external-store@1.6.0(react@19.2.3))
|
||||
devDependencies:
|
||||
'@eslint/eslintrc':
|
||||
specifier: ^3
|
||||
version: 3.3.3
|
||||
'@types/node':
|
||||
specifier: ^22.13.1
|
||||
version: 22.19.2
|
||||
@@ -41,6 +44,12 @@ importers:
|
||||
'@types/react-dom':
|
||||
specifier: ^19.2.3
|
||||
version: 19.2.3(@types/react@19.2.7)
|
||||
'@typescript-eslint/parser':
|
||||
specifier: ^8.56.1
|
||||
version: 8.56.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
eslint-plugin-simple-import-sort:
|
||||
specifier: ^12.1.1
|
||||
version: 12.1.1(eslint@9.39.2(jiti@2.6.1))
|
||||
husky:
|
||||
specifier: ^9.1.7
|
||||
version: 9.1.7
|
||||
@@ -51,7 +60,7 @@ importers:
|
||||
specifier: 2.4.2
|
||||
version: 2.4.2
|
||||
|
||||
apps/(template):
|
||||
apps/_template:
|
||||
dependencies:
|
||||
'@common/assets':
|
||||
specifier: workspace:*
|
||||
@@ -92,10 +101,10 @@ importers:
|
||||
devDependencies:
|
||||
eslint:
|
||||
specifier: ^9.0.0
|
||||
version: 9.39.2(jiti@1.21.7)
|
||||
version: 9.39.2(jiti@2.6.1)
|
||||
eslint-config-next:
|
||||
specifier: 15.4.0
|
||||
version: 15.4.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
version: 15.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
postcss:
|
||||
specifier: ^8.4.49
|
||||
version: 8.5.6
|
||||
@@ -1103,6 +1112,9 @@ importers:
|
||||
chart.js:
|
||||
specifier: ^4.4.8
|
||||
version: 4.5.1
|
||||
chartjs-plugin-zoom:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0(chart.js@4.5.1)
|
||||
dayjs:
|
||||
specifier: ^1.11.13
|
||||
version: 1.11.19
|
||||
@@ -1178,10 +1190,13 @@ importers:
|
||||
version: 5.28.5
|
||||
eslint:
|
||||
specifier: ^9
|
||||
version: 9.39.2(jiti@2.6.1)
|
||||
version: 9.39.2(jiti@1.21.7)
|
||||
eslint-config-next:
|
||||
specifier: 15.1.7
|
||||
version: 15.1.7(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)
|
||||
version: 15.1.7(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
eslint-plugin-react-hooks:
|
||||
specifier: ^5.0.0
|
||||
version: 5.2.0(eslint@9.39.2(jiti@1.21.7))
|
||||
postcss:
|
||||
specifier: ^8
|
||||
version: 8.5.6
|
||||
@@ -3829,6 +3844,9 @@ packages:
|
||||
'@types/estree@1.0.8':
|
||||
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
|
||||
|
||||
'@types/hammerjs@2.0.46':
|
||||
resolution: {integrity: sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==}
|
||||
|
||||
'@types/js-cookie@3.0.6':
|
||||
resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==}
|
||||
|
||||
@@ -3883,22 +3901,45 @@ packages:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/parser@8.56.1':
|
||||
resolution: {integrity: sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.49.0':
|
||||
resolution: {integrity: sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/project-service@8.56.1':
|
||||
resolution: {integrity: sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.49.0':
|
||||
resolution: {integrity: sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/scope-manager@8.56.1':
|
||||
resolution: {integrity: sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.49.0':
|
||||
resolution: {integrity: sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.56.1':
|
||||
resolution: {integrity: sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/type-utils@8.49.0':
|
||||
resolution: {integrity: sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@@ -3910,12 +3951,22 @@ packages:
|
||||
resolution: {integrity: sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/types@8.56.1':
|
||||
resolution: {integrity: sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.49.0':
|
||||
resolution: {integrity: sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.56.1':
|
||||
resolution: {integrity: sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <6.0.0'
|
||||
|
||||
'@typescript-eslint/utils@8.49.0':
|
||||
resolution: {integrity: sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@@ -3927,6 +3978,10 @@ packages:
|
||||
resolution: {integrity: sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.56.1':
|
||||
resolution: {integrity: sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
||||
resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==}
|
||||
cpu: [arm]
|
||||
@@ -4289,6 +4344,10 @@ packages:
|
||||
balanced-match@1.0.2:
|
||||
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
|
||||
|
||||
balanced-match@4.0.4:
|
||||
resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
base64-arraybuffer@1.0.2:
|
||||
resolution: {integrity: sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==}
|
||||
engines: {node: '>= 0.6.0'}
|
||||
@@ -4311,6 +4370,10 @@ packages:
|
||||
brace-expansion@2.0.2:
|
||||
resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
|
||||
|
||||
brace-expansion@5.0.4:
|
||||
resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
braces@3.0.3:
|
||||
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -4387,6 +4450,11 @@ packages:
|
||||
resolution: {integrity: sha512-GIjfiT9dbmHRiYi6Nl2yFCq7kkwdkp1W/lp2J99rX0yo9tgJGn3lKQATztIjb5tVtevcBtIdICNWqlq5+E8/Pw==}
|
||||
engines: {pnpm: '>=8'}
|
||||
|
||||
chartjs-plugin-zoom@2.2.0:
|
||||
resolution: {integrity: sha512-in6kcdiTlP6npIVLMd4zXZ08PDUXC52gZ4FAy5oyjk1zX3gKarXMAof7B9eFiisf9WOC3bh2saHg+J5WtLXZeA==}
|
||||
peerDependencies:
|
||||
chart.js: '>=3.2.0'
|
||||
|
||||
check-error@2.1.1:
|
||||
resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
|
||||
engines: {node: '>= 16'}
|
||||
@@ -4948,6 +5016,11 @@ packages:
|
||||
peerDependencies:
|
||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7
|
||||
|
||||
eslint-plugin-simple-import-sort@12.1.1:
|
||||
resolution: {integrity: sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==}
|
||||
peerDependencies:
|
||||
eslint: '>=5.0.0'
|
||||
|
||||
eslint-plugin-storybook@0.11.6:
|
||||
resolution: {integrity: sha512-3WodYD6Bs9ACqnB+TP2TuLh774c/nacAjxSKOP9bHJ2c8rf+nrhocxjjeAWNmO9IPkFIzTKlcl0vNXI2yYpVOw==}
|
||||
engines: {node: '>= 18'}
|
||||
@@ -4970,6 +5043,10 @@ packages:
|
||||
resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
eslint-visitor-keys@5.0.1:
|
||||
resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==}
|
||||
engines: {node: ^20.19.0 || ^22.13.0 || >=24}
|
||||
|
||||
eslint@9.39.2:
|
||||
resolution: {integrity: sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
@@ -5248,6 +5325,10 @@ packages:
|
||||
graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
hammerjs@2.0.8:
|
||||
resolution: {integrity: sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==}
|
||||
engines: {node: '>=0.8.0'}
|
||||
|
||||
has-bigints@1.1.0:
|
||||
resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -5828,6 +5909,10 @@ packages:
|
||||
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
minimatch@10.2.4:
|
||||
resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==}
|
||||
engines: {node: 18 || 20 || >=22}
|
||||
|
||||
minimatch@3.1.2:
|
||||
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
|
||||
|
||||
@@ -6947,6 +7032,12 @@ packages:
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
||||
ts-api-utils@2.4.0:
|
||||
resolution: {integrity: sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==}
|
||||
engines: {node: '>=18.12'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
||||
ts-dedent@2.2.0:
|
||||
resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==}
|
||||
engines: {node: '>=6.10'}
|
||||
@@ -9229,6 +9320,8 @@ snapshots:
|
||||
|
||||
'@types/estree@1.0.8': {}
|
||||
|
||||
'@types/hammerjs@2.0.46': {}
|
||||
|
||||
'@types/js-cookie@3.0.6': {}
|
||||
|
||||
'@types/json-schema@7.0.15': {}
|
||||
@@ -9356,6 +9449,18 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.56.1(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.56.1
|
||||
'@typescript-eslint/types': 8.56.1
|
||||
'@typescript-eslint/typescript-estree': 8.56.1(typescript@5.9.3)
|
||||
'@typescript-eslint/visitor-keys': 8.56.1
|
||||
debug: 4.4.3
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.49.0(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.6.3)
|
||||
@@ -9374,11 +9479,25 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/project-service@8.56.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/tsconfig-utils': 8.56.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.56.1
|
||||
debug: 4.4.3
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.49.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.49.0
|
||||
'@typescript-eslint/visitor-keys': 8.49.0
|
||||
|
||||
'@typescript-eslint/scope-manager@8.56.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.56.1
|
||||
'@typescript-eslint/visitor-keys': 8.56.1
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.49.0(typescript@5.6.3)':
|
||||
dependencies:
|
||||
typescript: 5.6.3
|
||||
@@ -9387,6 +9506,10 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/tsconfig-utils@8.56.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
'@typescript-eslint/type-utils@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.49.0
|
||||
@@ -9425,6 +9548,8 @@ snapshots:
|
||||
|
||||
'@typescript-eslint/types@8.49.0': {}
|
||||
|
||||
'@typescript-eslint/types@8.56.1': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.49.0(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.49.0(typescript@5.6.3)
|
||||
@@ -9455,6 +9580,21 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.56.1(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/project-service': 8.56.1(typescript@5.9.3)
|
||||
'@typescript-eslint/tsconfig-utils': 8.56.1(typescript@5.9.3)
|
||||
'@typescript-eslint/types': 8.56.1
|
||||
'@typescript-eslint/visitor-keys': 8.56.1
|
||||
debug: 4.4.3
|
||||
minimatch: 10.2.4
|
||||
semver: 7.7.3
|
||||
tinyglobby: 0.2.15
|
||||
ts-api-utils: 2.4.0(typescript@5.9.3)
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@1.21.7))
|
||||
@@ -9493,6 +9633,11 @@ snapshots:
|
||||
'@typescript-eslint/types': 8.49.0
|
||||
eslint-visitor-keys: 4.2.1
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.56.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.56.1
|
||||
eslint-visitor-keys: 5.0.1
|
||||
|
||||
'@unrs/resolver-binding-android-arm-eabi@1.11.1':
|
||||
optional: true
|
||||
|
||||
@@ -9902,6 +10047,8 @@ snapshots:
|
||||
|
||||
balanced-match@1.0.2: {}
|
||||
|
||||
balanced-match@4.0.4: {}
|
||||
|
||||
base64-arraybuffer@1.0.2: {}
|
||||
|
||||
baseline-browser-mapping@2.9.7: {}
|
||||
@@ -9921,6 +10068,10 @@ snapshots:
|
||||
dependencies:
|
||||
balanced-match: 1.0.2
|
||||
|
||||
brace-expansion@5.0.4:
|
||||
dependencies:
|
||||
balanced-match: 4.0.4
|
||||
|
||||
braces@3.0.3:
|
||||
dependencies:
|
||||
fill-range: 7.1.1
|
||||
@@ -10000,6 +10151,12 @@ snapshots:
|
||||
dependencies:
|
||||
'@kurkle/color': 0.3.4
|
||||
|
||||
chartjs-plugin-zoom@2.2.0(chart.js@4.5.1):
|
||||
dependencies:
|
||||
'@types/hammerjs': 2.0.46
|
||||
chart.js: 4.5.1
|
||||
hammerjs: 2.0.8
|
||||
|
||||
check-error@2.1.1: {}
|
||||
|
||||
chokidar@3.6.0:
|
||||
@@ -10572,6 +10729,26 @@ snapshots:
|
||||
optionalDependencies:
|
||||
source-map: 0.7.6
|
||||
|
||||
eslint-config-next@15.1.7(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@next/eslint-plugin-next': 15.1.7
|
||||
'@rushstack/eslint-patch': 1.15.0
|
||||
'@typescript-eslint/eslint-plugin': 8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
'@typescript-eslint/parser': 8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
eslint: 9.39.2(jiti@1.21.7)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-react-hooks: 5.2.0(eslint@9.39.2(jiti@1.21.7))
|
||||
optionalDependencies:
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-webpack
|
||||
- eslint-plugin-import-x
|
||||
- supports-color
|
||||
|
||||
eslint-config-next@15.1.7(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@next/eslint-plugin-next': 15.1.7
|
||||
@@ -10592,26 +10769,6 @@ snapshots:
|
||||
- eslint-plugin-import-x
|
||||
- supports-color
|
||||
|
||||
eslint-config-next@15.4.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@next/eslint-plugin-next': 15.4.0
|
||||
'@rushstack/eslint-patch': 1.15.0
|
||||
'@typescript-eslint/eslint-plugin': 8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
'@typescript-eslint/parser': 8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3)
|
||||
eslint: 9.39.2(jiti@1.21.7)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.49.0(eslint@9.39.2(jiti@1.21.7))(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-jsx-a11y: 6.10.2(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-react: 7.37.5(eslint@9.39.2(jiti@1.21.7))
|
||||
eslint-plugin-react-hooks: 5.2.0(eslint@9.39.2(jiti@1.21.7))
|
||||
optionalDependencies:
|
||||
typescript: 5.9.3
|
||||
transitivePeerDependencies:
|
||||
- eslint-import-resolver-webpack
|
||||
- eslint-plugin-import-x
|
||||
- supports-color
|
||||
|
||||
eslint-config-next@15.4.0(eslint@9.39.2(jiti@2.6.1))(typescript@5.9.3):
|
||||
dependencies:
|
||||
'@next/eslint-plugin-next': 15.4.0
|
||||
@@ -10844,6 +11001,10 @@ snapshots:
|
||||
string.prototype.matchall: 4.0.12
|
||||
string.prototype.repeat: 1.0.0
|
||||
|
||||
eslint-plugin-simple-import-sort@12.1.1(eslint@9.39.2(jiti@2.6.1)):
|
||||
dependencies:
|
||||
eslint: 9.39.2(jiti@2.6.1)
|
||||
|
||||
eslint-plugin-storybook@0.11.6(eslint@9.39.2(jiti@2.6.1))(typescript@5.6.3):
|
||||
dependencies:
|
||||
'@storybook/csf': 0.1.13
|
||||
@@ -10868,6 +11029,8 @@ snapshots:
|
||||
|
||||
eslint-visitor-keys@4.2.1: {}
|
||||
|
||||
eslint-visitor-keys@5.0.1: {}
|
||||
|
||||
eslint@9.39.2(jiti@1.21.7):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.0(eslint@9.39.2(jiti@1.21.7))
|
||||
@@ -11204,6 +11367,8 @@ snapshots:
|
||||
|
||||
graceful-fs@4.2.11: {}
|
||||
|
||||
hammerjs@2.0.8: {}
|
||||
|
||||
has-bigints@1.1.0: {}
|
||||
|
||||
has-flag@4.0.0: {}
|
||||
@@ -11716,6 +11881,10 @@ snapshots:
|
||||
|
||||
min-indent@1.0.1: {}
|
||||
|
||||
minimatch@10.2.4:
|
||||
dependencies:
|
||||
brace-expansion: 5.0.4
|
||||
|
||||
minimatch@3.1.2:
|
||||
dependencies:
|
||||
brace-expansion: 1.1.12
|
||||
@@ -12892,6 +13061,10 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
ts-api-utils@2.4.0(typescript@5.9.3):
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
|
||||
ts-dedent@2.2.0: {}
|
||||
|
||||
ts-interface-checker@0.1.13: {}
|
||||
|
||||
Reference in New Issue
Block a user