From 20b8547701d7b46b77e637df9b1873539002f0da Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Thu, 2 Apr 2026 14:34:45 +0900 Subject: [PATCH] =?UTF-8?q?260402=5F01=5FENH:=20LG=20=EB=B3=B4=EA=B8=89?= =?UTF-8?q?=EB=A5=A0,=20=EA=B5=AC=EB=A7=A4=EC=9C=A8=EC=9D=98=20=EC=9E=90?= =?UTF-8?q?=EC=82=AC=EC=A0=9C=ED=92=88=20=EB=B9=84=EC=9C=A8=20=EA=B3=B5?= =?UTF-8?q?=EC=8B=9D=20=EC=9B=8C=EB=94=A9=20=ED=95=98=EB=8B=A8=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=B0=8F=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC=20=ED=8C=8C=ED=8A=B8=20=EA=B0=AD=EC=97=90=20?= =?UTF-8?q?=EB=B0=B0=EA=B2=BD=EC=83=89=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(main)/total/lg-penetration/page.tsx | 3 +- .../(pages)/(main)/total/lg-purchase/page.tsx | 3 +- src/app/globals.css | 6 +++ .../lge-dashboard/combo/CategoryByData.tsx | 1 + .../lge-dashboard/table/BaseDataTable.tsx | 12 +++-- .../lge-dashboard/table/DataTable.tsx | 51 ++++++++++--------- src/lib/lg-dashboard.ts | 2 +- 7 files changed, 47 insertions(+), 31 deletions(-) diff --git a/src/app/(pages)/(main)/total/lg-penetration/page.tsx b/src/app/(pages)/(main)/total/lg-penetration/page.tsx index 2e09d13..39b8f9e 100644 --- a/src/app/(pages)/(main)/total/lg-penetration/page.tsx +++ b/src/app/(pages)/(main)/total/lg-penetration/page.tsx @@ -206,7 +206,8 @@ const LGPenetrationPage = () => { const description = useMemo(() => { return "Q. 다음 중 귀댁에서 보유하고 계신 가전/전자 제품은 무엇입니까? 모두 선택해주세요.
" + "* 구독/렌탈/선물/경품/아파트 내 빌트인 제품을 모두 포함하여 선택해주세요.
" + - "Q. 보유하고 계신 (제품)의 브랜드는 어떻게 되십니까?"; + "Q. 보유하고 계신 (제품)의 브랜드는 어떻게 되십니까?
" + + "* 조사 년도 보급률 중 자사제품 비율 = (LG 보급률 ÷ 전체 보급률) × 100"; }, []); useEffect(() => { diff --git a/src/app/(pages)/(main)/total/lg-purchase/page.tsx b/src/app/(pages)/(main)/total/lg-purchase/page.tsx index dd23da2..0a7d2f9 100644 --- a/src/app/(pages)/(main)/total/lg-purchase/page.tsx +++ b/src/app/(pages)/(main)/total/lg-purchase/page.tsx @@ -148,7 +148,8 @@ const LGPurchasePage = () => { //"* 새 상품을 선물 받은 경우, 선물 받은 연도로 입력해주세요.
" + //"** 중고 제품인 경우, 중고 제품을 구입한 연도로 입력해주세요.
" + //"*** 신규 입주 시 빌트인되어 있던 제품은 입주한 연도를 입력해주세요.
" + - "Q. 보유하고 계신 (제품)의 브랜드는 어떻게 되십니까?"; + "Q. 보유하고 계신 (제품)의 브랜드는 어떻게 되십니까?
" + + "* 조사 년도 구매율 중 자사제품 비율 = (LG 구매율 ÷ 전체 구매율) × 100"; }, []); useEffect(() => { diff --git a/src/app/globals.css b/src/app/globals.css index 40dec91..f060257 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -97,6 +97,8 @@ --lg-gray-400: 0 0% 50%; /* #7F7F7F */ --lg-gray-300: 0 0% 75%; /* #BFBFBF */ --lg-gray-200: 0 0% 85%; /* #D9D9D9 */ + --lg-gray-100: 0 0% 92%; /* #EBEBEB */ + --lg-gray-50: 0 0% 96%; /* #F5F5F5 */ --lg-red-600: 341.1 100% 32.4%; /* #A50034 */ --lg-red-500: 341.1 95% 44.0%; /* #DB0649 */ @@ -306,6 +308,8 @@ .bg-gray-400 { background-color: hsl(var(--lg-gray-400)) !important; } .bg-gray-300 { background-color: hsl(var(--lg-gray-300)) !important; } .bg-gray-200 { background-color: hsl(var(--lg-gray-200)) !important; } +.bg-gray-100 { background-color: hsl(var(--lg-gray-100)) !important; } +.bg-gray-50 { background-color: hsl(var(--lg-gray-50)) !important; } .border-gray-900 { border-color: hsl(var(--lg-gray-900)) !important; } .border-gray-800 { border-color: hsl(var(--lg-gray-800)) !important; } @@ -315,6 +319,8 @@ .border-gray-400 { border-color: hsl(var(--lg-gray-400)) !important; } .border-gray-300 { border-color: hsl(var(--lg-gray-300)) !important; } .border-gray-200 { border-color: hsl(var(--lg-gray-200)) !important; } +.border-gray-100 { border-color: hsl(var(--lg-gray-100)) !important; } +.border-gray-50 { border-color: hsl(var(--lg-gray-50)) !important; } /* LG Red/Pink/Purple/Orange scale overrides */ .bg-red-600 { background-color: hsl(var(--lg-red-600)) !important; } diff --git a/src/components/lge-dashboard/combo/CategoryByData.tsx b/src/components/lge-dashboard/combo/CategoryByData.tsx index c04a7e3..1a7e17f 100644 --- a/src/components/lge-dashboard/combo/CategoryByData.tsx +++ b/src/components/lge-dashboard/combo/CategoryByData.tsx @@ -152,6 +152,7 @@ const CategoryByData = ({ rows={tableData} signStyle={signStyleGap} fillGreaterThan5={fillGreaterThan5} + fillGapRow={true} starUnder30Sample={true} /> diff --git a/src/components/lge-dashboard/table/BaseDataTable.tsx b/src/components/lge-dashboard/table/BaseDataTable.tsx index 68408ad..daa6622 100644 --- a/src/components/lge-dashboard/table/BaseDataTable.tsx +++ b/src/components/lge-dashboard/table/BaseDataTable.tsx @@ -2,7 +2,7 @@ import type React from "react"; import { cn, parseNumber } from "@/lib/utils"; -import { isSampleRow } from "@/lib/lg-dashboard"; +import {isGapRow, isSampleRow} from "@/lib/lg-dashboard"; import type { DataColumn, SignStyle } from "../types"; import BaseTableRenderer from "./core/BaseTableRenderer"; import { @@ -38,6 +38,7 @@ type Props> = { signStyle?: SignStyle; signStyleFallback?: Partial; fillGreaterThan5?: boolean; + fillGapRow?: boolean; starUnder30Sample?: boolean; unitText?: string; mergedCell?: MergedTableCell; @@ -55,6 +56,7 @@ export default function BaseDataTable>({ signStyle, signStyleFallback, fillGreaterThan5 = false, + fillGapRow = false, starUnder30Sample = false, unitText, mergedCell, @@ -80,6 +82,8 @@ export default function BaseDataTable>({ const sampleRow = isSampleRow((row.rowLabel as string) ?? ""); const signRow = !!signStyle?.rowSelector?.(row, rowIndex); const rowTotal = parseNumber(row.total); + const isFillGapRow = fillGapRow && isGapRow((row.rowLabel as string) ?? "") + const fillGapClass = isFillGapRow ? "bg-gray-100" : ""; return ( @@ -114,7 +118,7 @@ export default function BaseDataTable>({ {defaultContent} @@ -131,7 +135,7 @@ export default function BaseDataTable>({ : { textAlign: align }; return ( - + {displayText} @@ -146,7 +150,7 @@ export default function BaseDataTable>({ return ( {displayContent} diff --git a/src/components/lge-dashboard/table/DataTable.tsx b/src/components/lge-dashboard/table/DataTable.tsx index 98ed264..688ebf5 100644 --- a/src/components/lge-dashboard/table/DataTable.tsx +++ b/src/components/lge-dashboard/table/DataTable.tsx @@ -14,36 +14,39 @@ type Props> = { subheadRowClassName?: string; signStyle?: SignStyle; fillGreaterThan5?: boolean; + fillGapRow?: boolean; starUnder30Sample?: boolean; unitText?: string; }; const DataTable = >({ - columns, - rows, - title, - className, - tableClassName, - wrapperClassName, - subheadRowClassName, - signStyle, - fillGreaterThan5 = false, - starUnder30Sample = false, - unitText = UNIT_TEXT, -}: Props) => { + columns, + rows, + title, + className, + tableClassName, + wrapperClassName, + subheadRowClassName, + signStyle, + fillGreaterThan5 = false, + fillGapRow = false, + starUnder30Sample = false, + unitText = UNIT_TEXT, + }: Props) => { return ( - + ); }; diff --git a/src/lib/lg-dashboard.ts b/src/lib/lg-dashboard.ts index a228993..1d381ea 100644 --- a/src/lib/lg-dashboard.ts +++ b/src/lib/lg-dashboard.ts @@ -514,7 +514,7 @@ export const makeTotalBasePct = (t:number|string, f:number|string):number => { export const calcTotalBaseRow = (label:string, totalRow: ProductRow, targetRow: ProductRow): ProductRow => { const out: ProductRow = { year: targetRow?.year ?? "", - rowLabel: `조사 년도 ${label} 중 자사제품 비율 (LG ${label} ÷ 전체 ${label}) × 100`, + rowLabel: `조사 년도 ${label} 중 자사제품 비율`, total: fixedDecimalPoint(makeTotalBasePct(totalRow.total, targetRow.total)) };