260204_01_ENH: 카테고리 하위 페이지들 경로명 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||
|
||||
const MsDigitalPage = () => {
|
||||
const ESPage = () => {
|
||||
return <CategoryPage/>
|
||||
}
|
||||
|
||||
export default MsDigitalPage;
|
||||
export default ESPage;
|
||||
@@ -1,7 +1,7 @@
|
||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||
|
||||
const HaLivingPage = () => {
|
||||
const KitchenPage = () => {
|
||||
return <CategoryPage/>
|
||||
}
|
||||
|
||||
export default HaLivingPage;
|
||||
export default KitchenPage;
|
||||
@@ -1,7 +1,7 @@
|
||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||
|
||||
const HaKitchenPage = () => {
|
||||
const LivingPage = () => {
|
||||
return <CategoryPage/>
|
||||
}
|
||||
|
||||
export default HaKitchenPage;
|
||||
export default LivingPage;
|
||||
@@ -1,7 +1,7 @@
|
||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||
|
||||
const AirSolutionPage = () => {
|
||||
const MSPage = () => {
|
||||
return <CategoryPage/>
|
||||
}
|
||||
|
||||
export default AirSolutionPage;
|
||||
export default MSPage;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
];
|
||||
|
||||
@@ -35,7 +35,7 @@ const Brand = () => {
|
||||
|
||||
return [
|
||||
{
|
||||
title: "구매 형식",
|
||||
title: "브랜드",
|
||||
chartMode: "reverseStack",
|
||||
data: finalData,
|
||||
},
|
||||
|
||||
@@ -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: "브랜드"},
|
||||
|
||||
@@ -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[];
|
||||
}
|
||||
@@ -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",
|
||||
},
|
||||
]
|
||||
@@ -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, // 모니터
|
||||
|
||||
Reference in New Issue
Block a user