260205_03_ENH: layout color gray + black으로 변경, excel버튼 아이콘으로 변경

This commit is contained in:
2026-02-05 12:22:18 +09:00
parent 5d3de68b05
commit 8de707f8d1
5 changed files with 82 additions and 36 deletions

View File

@@ -11,7 +11,7 @@ import {
type GroupedStackBarData,
} from "@/components/lge-dashboard";
import { useLayoutFilter } from "@/components/layout/LayoutFilterContext";
import { apiBrandByYearCategories, apiTrendCategories } from "@/config/sample.data";
import {apiBrandByYearCategories, apiOwnShareOfTotalPenetration, apiTrendCategories} from "@/config/sample.data";
import { Button } from "@/components/ui/button";
import {
BRAND_LIST,
@@ -22,7 +22,7 @@ import {
GRID_X_NOT_PADDING, PRODUCT_KEY_MAP, LAST_YEAR,
} from "@/const/lgConst";
import { formatRowLabel } from "@/lib/lg-dashboard";
import {buildHeader_ProductKeyMap, exportDashboardExcel} from "@/lib/lg-export-excel";
import {buildHeader_ProductKeyMap, exportDashboardExcel, Section} from "@/lib/lg-export-excel";
const PenetrationPage = () => {
const { filterValue, registerExcelExporter } = useLayoutFilter();
@@ -63,8 +63,7 @@ const PenetrationPage = () => {
BRAND_LIST.forEach((brand, bi) => {
PRODUCT_KEYS.forEach((k, ci) => {
const row = rowMap.get(`${year}__${brand}`);
const v = (row as any)?.[k];
values[yi][bi][ci] = typeof v === "number" ? v : 0;
values[yi][bi][ci] = (row as any)?.[k];
});
});
});
@@ -75,13 +74,24 @@ const PenetrationPage = () => {
useEffect(() => {
registerExcelExporter(async () => {
const excelHeader = buildHeader_ProductKeyMap(PRODUCT_KEY_MAP);
type AnyRow = Record<string, any>;
const sections: Section<AnyRow>[] = [
{ title: "전체 보급률", header: excelHeader, rows: apiTrendCategories, rowGap: 1 },
...YEARS.map((year) => (
{
title: `브랜드 별 점유율_${year}년`,
header: excelHeader,
rows: apiBrandByYearCategories.filter((row) => row.year === year) as AnyRow[],
rowGap: 1,
}
))
];
await exportDashboardExcel({
fileName: `20${LAST_YEAR}년도 가전 보급률 Dashboard(보급률).xlsx`,
sheetName: "전체 보급률",
sections: [
{ title: "전체 보급률", header: excelHeader, rows: apiTrendCategories, rowGap: 1 },
],
sections: sections,
});
});
return () => registerExcelExporter(null);

View File

@@ -89,7 +89,7 @@ const LoginPage = () => {
};
return (
<div className="min-h-screen flex items-center justify-center p-4 bg-lg-login">
<div className="min-h-screen flex items-center justify-center p-4 bg-lg-login-body">
<Card className="w-full max-w-md shadow-xl">
<CardHeader className="space-y-4">
<div className="flex justify-center">