diff --git a/src/app/(pages)/(main)/category/ms-digital/page.tsx b/src/app/(pages)/(main)/category/es/page.tsx similarity index 64% rename from src/app/(pages)/(main)/category/ms-digital/page.tsx rename to src/app/(pages)/(main)/category/es/page.tsx index e736d99..7800595 100644 --- a/src/app/(pages)/(main)/category/ms-digital/page.tsx +++ b/src/app/(pages)/(main)/category/es/page.tsx @@ -1,7 +1,7 @@ import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage"; -const MsDigitalPage = () => { +const ESPage = () => { return } -export default MsDigitalPage; \ No newline at end of file +export default ESPage; \ No newline at end of file diff --git a/src/app/(pages)/(main)/category/ha-living/page.tsx b/src/app/(pages)/(main)/category/kitchen/page.tsx similarity index 65% rename from src/app/(pages)/(main)/category/ha-living/page.tsx rename to src/app/(pages)/(main)/category/kitchen/page.tsx index 95f1910..f2c5f76 100644 --- a/src/app/(pages)/(main)/category/ha-living/page.tsx +++ b/src/app/(pages)/(main)/category/kitchen/page.tsx @@ -1,7 +1,7 @@ import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage"; -const HaLivingPage = () => { +const KitchenPage = () => { return } -export default HaLivingPage; \ No newline at end of file +export default KitchenPage; \ No newline at end of file diff --git a/src/app/(pages)/(main)/category/ha-kitchen/page.tsx b/src/app/(pages)/(main)/category/living/page.tsx similarity index 64% rename from src/app/(pages)/(main)/category/ha-kitchen/page.tsx rename to src/app/(pages)/(main)/category/living/page.tsx index dd12a10..38be785 100644 --- a/src/app/(pages)/(main)/category/ha-kitchen/page.tsx +++ b/src/app/(pages)/(main)/category/living/page.tsx @@ -1,7 +1,7 @@ import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage"; -const HaKitchenPage = () => { +const LivingPage = () => { return } -export default HaKitchenPage; \ No newline at end of file +export default LivingPage; \ No newline at end of file diff --git a/src/app/(pages)/(main)/category/air-solution/page.tsx b/src/app/(pages)/(main)/category/ms/page.tsx similarity index 63% rename from src/app/(pages)/(main)/category/air-solution/page.tsx rename to src/app/(pages)/(main)/category/ms/page.tsx index e90a8c3..bf03fe5 100644 --- a/src/app/(pages)/(main)/category/air-solution/page.tsx +++ b/src/app/(pages)/(main)/category/ms/page.tsx @@ -1,7 +1,7 @@ import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage"; -const AirSolutionPage = () => { +const MSPage = () => { return } -export default AirSolutionPage; \ No newline at end of file +export default MSPage; \ No newline at end of file diff --git a/src/components/layout/CategoryFilter.tsx b/src/components/layout/CategoryFilter.tsx index a97cab7..3a9ee0c 100644 --- a/src/components/layout/CategoryFilter.tsx +++ b/src/components/layout/CategoryFilter.tsx @@ -28,7 +28,7 @@ type CategoryFilterProps = { const CategoryFilter = ({ filterItems, value, onChange, className }: CategoryFilterProps) => { const currentTargetItem = useMemo(() => { - return categoryTarget.find((item) => item.type === value.type.value); + return categoryTarget.find((item) => item.type.includes(value.type.value)); }, [value.type]); const handlePick = ( @@ -39,7 +39,7 @@ const CategoryFilter = ({ filterItems, value, onChange, className }: CategoryFil const next: CategoryFilterValue = { ...value, [key]: v } as CategoryFilterValue; if (key === "type" && typeof v === "object" && v.value !== value.type.value) { - const nextItem = categoryTarget.find((item) => item.type === v.value); + const nextItem = categoryTarget.find((item) => item.type.includes(v.value)); const firstTarget = nextItem?.children?.[0]?.target; if (firstTarget) next.target = firstTarget; } diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index 06dd2e8..6f7f68a 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -35,7 +35,7 @@ const buildDefaultTotalValue = (): SelectedMap => { export const buildDefaultCategoryValue = (categoryFilterItems: ProductsFilterItem): CategoryFilterValue => { const initProduct = categoryFilterItems.items[0]; const initType = {label:"보유", value:CategoryTargetType.PENETRATION} - const firstTarget = categoryTarget.find((x) => x.type === initType.value)?.children?.[0]?.target; + const firstTarget = categoryTarget.find((x) => x.type.includes(initType.value))?.children?.[0]?.target; const initTarget = firstTarget ?? CategoryTargetData.PROFILE; return { diff --git a/src/components/lge-dashboard/combo/BannerSummary.tsx b/src/components/lge-dashboard/combo/BannerSummary.tsx index 0fa62cc..7c66df9 100644 --- a/src/components/lge-dashboard/combo/BannerSummary.tsx +++ b/src/components/lge-dashboard/combo/BannerSummary.tsx @@ -70,14 +70,14 @@ type BannerSummaryProps = { const BannerSummary = ({ data, useChart }: BannerSummaryProps) => { const buildChartData = (rows: ServerBannerRow[], bannerKeys: BannerKey[]): ChartData => { const categories = rows - .filter((r) => r.rowLabel !== "사례수") + .filter((r) => !r.rowLabel.includes("사례수")) .map((r) => formatRowLabel(r.rowLabel)); const series = [ { name:"전체", data: rows - .filter((r) => r.rowLabel !== "사례수") + .filter((r) => !r.rowLabel.includes("사례수")) .map((r) => parseNumber(r.total) ?? null), } ]; diff --git a/src/components/lge-dashboard/sub-page/category-page/Brand.tsx b/src/components/lge-dashboard/sub-page/category-page/Brand.tsx index cdb3468..daa0c2d 100644 --- a/src/components/lge-dashboard/sub-page/category-page/Brand.tsx +++ b/src/components/lge-dashboard/sub-page/category-page/Brand.tsx @@ -35,7 +35,7 @@ const Brand = () => { return [ { - title: "구매 형식", + title: "브랜드", chartMode: "reverseStack", data: finalData, }, diff --git a/src/config/filter.data.ts b/src/config/filter.data.ts index 74aa1e1..fbeebb2 100644 --- a/src/config/filter.data.ts +++ b/src/config/filter.data.ts @@ -47,11 +47,12 @@ export const totalFilters:TotalFilterItem[] = [ variable:"pyeong", variableName:"거주 평형", children:[ - { value: "0", label: "19평 이하"}, - { value: "1", label: "20평형 대"}, - { value: "2", label: "30평형 대"}, - { value: "3", label: "40평형 대"}, - { value: "4", label: "50평형 이상"}, + { value: "0", label: "전체"}, + { value: "1", label: "19평 이하"}, + { value: "2", label: "20평형 대"}, + { value: "3", label: "30평형 대"}, + { value: "4", label: "40평형 대"}, + { value: "5", label: "50평형 이상"}, ] }, { @@ -83,11 +84,12 @@ export const totalFilters:TotalFilterItem[] = [ variable:"age", variableName:"연령대", children:[ - { value: "0", label: "20대"}, - { value: "1", label: "30대"}, - { value: "2", label: "40대"}, - { value: "3", label: "50대"}, - { value: "4", label: "60대"}, + { value: "0", label: "전체"}, + { value: "2", label: "20대"}, + { value: "3", label: "30대"}, + { value: "4", label: "40대"}, + { value: "5", label: "50대"}, + { value: "6", label: "60대"}, ] }, { @@ -114,13 +116,13 @@ export const categoryTargetType: CategoryTargetTypeItem[] = [ }, { label:"향후 구매", - value: CategoryTargetType.PURCHASE, + value: CategoryTargetType.INTENDED, }, ] export const categoryTarget: CategoryTargetItem[] = [ { - type: CategoryTargetType.PENETRATION, + type: [CategoryTargetType.PENETRATION], children:[ { target: CategoryTargetData.PROFILE, label: "Profile"}, { target: CategoryTargetData.PENETRATION_CHANGE, label: "보급률 변화"}, @@ -131,7 +133,7 @@ export const categoryTarget: CategoryTargetItem[] = [ ] }, { - type: CategoryTargetType.PURCHASE, + type: [CategoryTargetType.PURCHASE, CategoryTargetType.INTENDED], children:[ { target: CategoryTargetData.PROFILE, label: "Profile"}, { target: CategoryTargetData.BRAND, label: "브랜드"}, diff --git a/src/config/filter.types.ts b/src/config/filter.types.ts index f3fb284..678b968 100644 --- a/src/config/filter.types.ts +++ b/src/config/filter.types.ts @@ -12,6 +12,7 @@ export type TotalFilterItem = { export enum CategoryTargetType { PENETRATION = "PENETRATION", PURCHASE = "PURCHASE", + INTENDED = "INTENDED" } export enum CategoryTargetData { @@ -36,6 +37,6 @@ export type TargetChild = { } export type CategoryTargetItem = { - type: CategoryTargetType; + type: CategoryTargetType[]; children: TargetChild[]; } \ No newline at end of file diff --git a/src/config/menu.data.ts b/src/config/menu.data.ts index d10eeb5..3402530 100644 --- a/src/config/menu.data.ts +++ b/src/config/menu.data.ts @@ -10,7 +10,7 @@ export const topMenus: TopMenuItem[] = [ { id: "category", label: "카테고리", - path: "/category/ha-kitchen", + path: "/category/kitchen", match: (pathname) => pathname.startsWith("/category"), }, ]; @@ -40,23 +40,23 @@ export const totalSubMenus: SubMenuItem[] = [ export const categorySubMenus: SubMenuItem[] = [ { - id: "ha-kitchen", - label: "H&A 주방가전(키친)", - path: "/category/ha-kitchen", + id: "kitchen", + label: "키친솔루션", + path: "/category/kitchen", }, { - id: "ha-living", - label: "H&A 리빙가전", - path: "/category/ha-living", + id: "living", + label: "리빙솔루션", + path: "/category/living", }, { - id: "air-solution", - label: "에어솔루션", - path: "/category/air-solution", + id: "es", + label: "ES", + path: "/category/es", }, { - id: "ms-digital", - label: "MS 디지털가전", - path: "/category/ms-digital", + id: "ms", + label: "MS", + path: "/category/ms", }, ] \ No newline at end of file diff --git a/src/const/lgConst.ts b/src/const/lgConst.ts index 99e3b2a..57879b3 100644 --- a/src/const/lgConst.ts +++ b/src/const/lgConst.ts @@ -106,14 +106,14 @@ export const AXIS_HIDE_STYLE = { axisLabel: { show: false }, axisTick: { show: f export const PRODUCTS_FILTER_ITEM = [ { - path: "ha-kitchen", + path: "kitchen", items: [ PRODUCT_KEY_MAP.refrigerator, // 냉장고 PRODUCT_KEY_MAP.kimchiRefrigerator, // 김치 냉장고 - PRODUCT_KEY_MAP.wineCellar, // 와인 셀러 PRODUCT_KEY_MAP.dishwasher, // 식기 세척기 + PRODUCT_KEY_MAP.microwave, // 전자 레인지 - PRODUCT_KEY_MAP.airFryer, // 에어 프라이어 + PRODUCT_KEY_MAP.electricRange, // 전기 레인지 PRODUCT_KEY_MAP.oven, // 오븐 PRODUCT_KEY_MAP.waterPurifier, // 정수기 @@ -121,19 +121,19 @@ export const PRODUCTS_FILTER_ITEM = [ ], }, { - path: "ha-living", + path: "living", items: [ PRODUCT_KEY_MAP.washingMachine, // 세탁기 PRODUCT_KEY_MAP.dryer, // 건조기 PRODUCT_KEY_MAP.vacuumCleaner, // 청소기 PRODUCT_KEY_MAP.robotVacuum, // 로봇 청소기 - PRODUCT_KEY_MAP.massageChair, // 안마 의자 PRODUCT_KEY_MAP.clothingCareSystem, // 의류 관리기 + PRODUCT_KEY_MAP.massageChair, // 안마 의자 PRODUCT_KEY_MAP.shoeCareSystem, // 신발 관리기 ], }, { - path: "air-solution", + path: "es", items: [ PRODUCT_KEY_MAP.airConditioner, // 에어컨 PRODUCT_KEY_MAP.airPurifier, // 공기 청정기 @@ -145,7 +145,7 @@ export const PRODUCTS_FILTER_ITEM = [ ], }, { - path: "ms-digital", + path: "ms", items: [ PRODUCT_KEY_MAP.tv, // TV PRODUCT_KEY_MAP.monitor, // 모니터