260225_01_ENH: 실제 Data 통계 API와 연결 및 일부 페이지 축소

This commit is contained in:
2026-02-25 16:48:12 +09:00
parent d0e1352739
commit 357d9f2946
38 changed files with 1593 additions and 1352 deletions

View File

@@ -1,7 +1,7 @@
// exportDashboardExcel.ts
"use client";
import {formatRowLabel, isSampleRow} from "@/lib/lg-dashboard";
import {formatRowLabel} from "@/lib/lg-dashboard";
import {DataColumn} from "@/components/lge-dashboard";
/**
@@ -269,8 +269,7 @@ function fitColumns(ws: any, mergeMap: Map<string, MergeInfo>, o: Required<AutoF
});
for (let c = 1; c <= colCount; c++) {
const w = clamp(widths[c] + o.padding, o.minColWidth, o.maxColWidth);
ws.getColumn(c).width = w;
ws.getColumn(c).width = clamp(widths[c] + o.padding, o.minColWidth, o.maxColWidth);
}
}
@@ -768,7 +767,7 @@ export async function exportDashboardExcel<T extends Record<string, any>>(opts:
// 데이터
for (const row of rows) {
const excelRow = ws.getRow(rowCursor);
const sampleRow = isSampleRow(valueGetter(row, header.leafKeys.at(0) ?? ""));
//const sampleRow = isSampleRow(valueGetter(row, header.leafKeys.at(0) ?? ""));
header.leafKeys.forEach((key, idx) => {
const cell = excelRow.getCell(idx + 1);
@@ -778,7 +777,7 @@ export async function exportDashboardExcel<T extends Record<string, any>>(opts:
if (v === null || v === undefined || v === "") cell.value = null;
else if (typeof v === "number") cell.value = v;
else if (isColHeader) cell.value = formatRowLabel(String(v));
else if (sampleRow) cell.value = `(${String(v)})`;
//else if (sampleRow) cell.value = `(${String(v)})`;
else cell.value = String(v);
const align =