260326_01_ENH: 일부 설정 파일들 리펙토링
This commit is contained in:
@@ -1,184 +0,0 @@
|
||||
import {
|
||||
CategoryTargetData,
|
||||
CategoryTargetItem,
|
||||
CategoryTargetType,
|
||||
CategoryTargetTypeItem, FilterItem,
|
||||
TotalFilterItem
|
||||
} from "./filter.types";
|
||||
|
||||
export const totalFilters:TotalFilterItem[] = [
|
||||
{
|
||||
variable:"lifeStage",
|
||||
variableName:"라이프 스테이지",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "미혼"},
|
||||
{ value: "2", label: "기혼 무자녀"},
|
||||
{ value: "3", label: "기혼 미취학자녀"},
|
||||
{ value: "4", label: "기혼 학령기"},
|
||||
{ value: "5", label: "기혼 성인자녀"},
|
||||
{ value: "6", label: "독립 시니어"},
|
||||
{ value: "7", label: "비혼 중년"},
|
||||
{ value: "8", label: "기타"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"income",
|
||||
variableName:"월 소득 규모",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "299만원 이하"},
|
||||
{ value: "2", label: "300~599만원 이하"},
|
||||
{ value: "3", label: "600~899만원 이하"},
|
||||
{ value: "4", label: "900만원 이상"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"occupancy",
|
||||
variableName:"입주 형태",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "자가"},
|
||||
{ value: "2", label: "전세"},
|
||||
{ value: "3", label: "전+월세(보증금有)"},
|
||||
{ value: "4", label: "월세(보증금無)"},
|
||||
{ value: "5", label: "기타"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"houseSize",
|
||||
variableName:"거주 평형",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "19평 이하"},
|
||||
{ value: "2", label: "20평형 대"},
|
||||
{ value: "3", label: "30평형 대"},
|
||||
{ value: "4", label: "40평형 대"},
|
||||
{ value: "5", label: "50평형 이상"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"housing",
|
||||
variableName:"주거 형태",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "아파트"},
|
||||
{ value: "2", label: "주택"},
|
||||
{ value: "3", label: "오피스텔"},
|
||||
{ value: "4", label: "(연립)빌라"},
|
||||
{ value: "5", label: "원룸"},
|
||||
{ value: "6", label: "기타"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"region",
|
||||
variableName:"지역",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "서울, 인천, 경기도"},
|
||||
{ value: "2", label: "경남, 부산, 울산"},
|
||||
{ value: "3", label: "경북, 대구"},
|
||||
{ value: "4", label: "전라도, 광주"},
|
||||
{ value: "5", label: "충청, 대전, 세종"},
|
||||
{ value: "6", label: "강원, 제주"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"age",
|
||||
variableName:"연령대",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "20대"},
|
||||
{ value: "2", label: "30대"},
|
||||
{ value: "3", label: "40대"},
|
||||
{ value: "4", label: "50대"},
|
||||
{ value: "5", label: "60대"},
|
||||
]
|
||||
},
|
||||
{
|
||||
variable:"household",
|
||||
variableName:"가구원 수",
|
||||
children:[
|
||||
{ value: "0", label: "전체"},
|
||||
{ value: "1", label: "1인 가구"},
|
||||
{ value: "2", label: "2인 가구"},
|
||||
{ value: "3", label: "3인 가구"},
|
||||
{ value: "4", label: "4인 이상 가구"},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
export const categoryTargetType: CategoryTargetTypeItem[] = [
|
||||
{
|
||||
label:"보유",
|
||||
value: CategoryTargetType.PENETRATION,
|
||||
},
|
||||
{
|
||||
label:"구매",
|
||||
value: CategoryTargetType.PURCHASE,
|
||||
},
|
||||
{
|
||||
label:"향후 구매",
|
||||
value: CategoryTargetType.INTENDED,
|
||||
},
|
||||
]
|
||||
|
||||
export const categoryTarget: CategoryTargetItem[] = [
|
||||
{
|
||||
type: [CategoryTargetType.PENETRATION],
|
||||
children:[
|
||||
{ value: CategoryTargetData.PROFILE, label: "Profile"},
|
||||
{ value: CategoryTargetData.PENETRATION_CHANGE, label: "보급률 변화"},
|
||||
{ value: CategoryTargetData.BRAND, label: "브랜드"},
|
||||
{ value: CategoryTargetData.TYPE_SPEC, label: "타입/스펙"},
|
||||
{ value: CategoryTargetData.BEHAVIOR, label: "보유 경로"},
|
||||
{ value: CategoryTargetData.PAYMENT_METHOD, label: "구매 형식"},
|
||||
]
|
||||
},
|
||||
{
|
||||
type: [CategoryTargetType.PURCHASE, CategoryTargetType.INTENDED],
|
||||
children:[
|
||||
{ value: CategoryTargetData.PROFILE, label: "Profile"},
|
||||
{ value: CategoryTargetData.BRAND, label: "브랜드"},
|
||||
{ value: CategoryTargetData.TYPE_SPEC, label: "타입/스펙"},
|
||||
{ value: CategoryTargetData.BEHAVIOR, label: "구입 행태"},
|
||||
{ value: CategoryTargetData.PURCHASE_CHANNEL, label: "구매 채널"},
|
||||
{ value: CategoryTargetData.PAYMENT_METHOD, label: "구매 형식"},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
export const categoryByDataBanner:FilterItem[] = [
|
||||
{
|
||||
variable:"lifeStage",
|
||||
variableName:"라이프 스테이지",
|
||||
},
|
||||
{
|
||||
variable:"age",
|
||||
variableName:"연령대",
|
||||
},
|
||||
{
|
||||
variable:"household",
|
||||
variableName:"가구원 수",
|
||||
},
|
||||
{
|
||||
variable:"occupancy",
|
||||
variableName:"입주 형태",
|
||||
},
|
||||
{
|
||||
variable:"housing",
|
||||
variableName:"주거 형태",
|
||||
},
|
||||
{
|
||||
variable:"houseSize",
|
||||
variableName:"거주 평형",
|
||||
},
|
||||
{
|
||||
variable:"income",
|
||||
variableName:"월 소득 규모",
|
||||
},
|
||||
{
|
||||
variable:"region",
|
||||
variableName:"지역",
|
||||
},
|
||||
]
|
||||
@@ -1,44 +0,0 @@
|
||||
export type FilterChild = {
|
||||
value: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export type FilterItem = {
|
||||
variable: string;
|
||||
variableName: string;
|
||||
};
|
||||
|
||||
export type TotalFilterItem = FilterItem & {
|
||||
children: FilterChild[];
|
||||
};
|
||||
|
||||
export enum CategoryTargetType {
|
||||
PENETRATION = "PENETRATION",
|
||||
PURCHASE = "PURCHASE",
|
||||
INTENDED = "INTENDED"
|
||||
}
|
||||
|
||||
export enum CategoryTargetData {
|
||||
PROFILE = 11,
|
||||
PENETRATION_CHANGE = 21,
|
||||
BRAND = 12,
|
||||
TYPE_SPEC = 13,
|
||||
BEHAVIOR = 14,
|
||||
PURCHASE_CHANNEL = 32,
|
||||
PAYMENT_METHOD = 15,
|
||||
}
|
||||
|
||||
export type CategoryTargetTypeItem = {
|
||||
label: string;
|
||||
value: CategoryTargetType;
|
||||
}
|
||||
|
||||
export type TargetChild = {
|
||||
label: string;
|
||||
value: CategoryTargetData;
|
||||
}
|
||||
|
||||
export type CategoryTargetItem = {
|
||||
type: CategoryTargetType[];
|
||||
children: TargetChild[];
|
||||
}
|
||||
254
src/config/lg-page.config.ts
Normal file
254
src/config/lg-page.config.ts
Normal file
@@ -0,0 +1,254 @@
|
||||
import {CategoryFieldSpec} from "@/types/lg.types";
|
||||
import {CategoryTargetData, CategoryTargetType} from "@/types/filter.types";
|
||||
|
||||
export const CATEGORY_PAGE_FIELDS: Record<CategoryTargetData, CategoryFieldSpec[]> = {
|
||||
[CategoryTargetData.PROFILE]: [
|
||||
{
|
||||
title: {
|
||||
[CategoryTargetType.PENETRATION]: "보유율"
|
||||
, [CategoryTargetType.PURCHASE]: "구매율"
|
||||
, [CategoryTargetType.INTENDED]: "향후 구매율"
|
||||
},
|
||||
requestKey: "category_${keyBase}",
|
||||
chartMode:"none",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA1"
|
||||
, [CategoryTargetType.PURCHASE]: "KQB0"
|
||||
, [CategoryTargetType.INTENDED]: "KQC1"
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "보유대수",
|
||||
requestKey: "category_penetration_count",
|
||||
chartMode:"none",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA2"
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.PENETRATION_CHANGE]: [
|
||||
{
|
||||
title: "보급률 변화",
|
||||
requestKey: "category_${keyBase}",
|
||||
chartMode:"none",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA1"
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.BRAND]: [
|
||||
{
|
||||
title: "브랜드",
|
||||
requestKey: "category_${keyBase}_brand",
|
||||
chartMode:"reverseStack",
|
||||
chartTopMargin: 80,
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_3",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_3",
|
||||
},
|
||||
},
|
||||
{
|
||||
title: {
|
||||
[CategoryTargetType.PENETRATION]: "",
|
||||
[CategoryTargetType.PURCHASE]: "구매 고려 브랜드",
|
||||
[CategoryTargetType.INTENDED]: "브랜드",
|
||||
},
|
||||
requestKey: "category_${keyBase}_consider_brand",
|
||||
chartMode:"horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PURCHASE]: "KQB1",
|
||||
[CategoryTargetType.INTENDED]: "KQC2",
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.TYPE_SPEC]: [
|
||||
{
|
||||
title: "타입",
|
||||
requestKey: "category_${keyBase}_type",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_4",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_4",
|
||||
[CategoryTargetType.INTENDED]: "KQC3_1"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "깊이 타입",
|
||||
requestKey: "category_${keyBase}_depthType",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_5",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_5",
|
||||
[CategoryTargetType.INTENDED]: "KQC3_2"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "용량",
|
||||
requestKey: "category_${keyBase}_capacity",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_6",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_6"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "설치 형태",
|
||||
requestKey: "category_${keyBase}_installType",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_7",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_7",
|
||||
[CategoryTargetType.INTENDED]: "KQC3_3"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "시공 방식",
|
||||
requestKey: "category_${keyBase}_installMethod",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.INTENDED]: "KQC3_4"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "냉장고 & 김치냉장고 설치 형태",
|
||||
requestKey: "category_${keyBase}_fridgeInstallType",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.INTENDED]: "KQC3_5"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "설치 위치",
|
||||
requestKey: "category_${keyBase}_installLocation",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.INTENDED]: "KQC3_6"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "배치/설치환경",
|
||||
requestKey: "category_${keyBase}_installEnv",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_8",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_8",
|
||||
[CategoryTargetType.INTENDED]: "KQC3_7"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "구입 고려 특징",
|
||||
requestKey: "category_${keyBase}_buyConsiderations",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.INTENDED]: "KQC3_8"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "기능",
|
||||
requestKey: "category_${keyBase}_features",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_9",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_9"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "스크린 사이즈",
|
||||
requestKey: "category_${keyBase}_screenSize",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_10",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_10"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "용도",
|
||||
requestKey: "category_${keyBase}_usage",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_11",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_11"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "스마트 모니터 여부",
|
||||
requestKey: "category_${keyBase}_isSmartMonitor",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_12",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_12"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "음식물처리기 구동 방식",
|
||||
requestKey: "category_${keyBase}_driveMethod",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_13",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_13"
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.BEHAVIOR]: [
|
||||
{
|
||||
title: {
|
||||
[CategoryTargetType.PENETRATION]: "보유 경로"
|
||||
, [CategoryTargetType.PURCHASE]: "구입 행태"
|
||||
, [CategoryTargetType.INTENDED]: "구입 행태"
|
||||
},
|
||||
requestKey: "category_${keyBase}_behavior",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_1",
|
||||
[CategoryTargetType.PURCHASE]: "KQB2",
|
||||
[CategoryTargetType.INTENDED]: "KQC5"
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "구입 계기",
|
||||
requestKey: "category_${keyBase}_chance",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PURCHASE]: "KQB3"
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.PURCHASE_CHANNEL]: [
|
||||
{
|
||||
title: "구매 채널(온/오프라인)",
|
||||
requestKey: "category_${keyBase}_channel",
|
||||
chartMode: "reverseStack",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PURCHASE]: "KQB4_NET",
|
||||
[CategoryTargetType.INTENDED]: "KQC6_NET"
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "구매 채널(상세)",
|
||||
requestKey: "category_${keyBase}_channel_detail",
|
||||
chartMode: "horizontal",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PURCHASE]: "KQB4",
|
||||
[CategoryTargetType.INTENDED]: "KQC6"
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
[CategoryTargetData.PAYMENT_METHOD]: [
|
||||
{
|
||||
title: "구매형식",
|
||||
requestKey: "category_${keyBase}_method",
|
||||
chartMode:"reverseStack",
|
||||
qidByMode: {
|
||||
[CategoryTargetType.PENETRATION]: "KQA3_2_1",
|
||||
[CategoryTargetType.PURCHASE]: "KQX3_2_1",
|
||||
[CategoryTargetType.INTENDED]: "KQC7"
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -1,62 +0,0 @@
|
||||
import {SubMenuItem, TopMenuItem} from "@/config/menu.types";
|
||||
|
||||
export const topMenus: TopMenuItem[] = [
|
||||
{
|
||||
id: "total",
|
||||
label: "전체",
|
||||
path: "/total/penetration",
|
||||
match: (pathname) => pathname.startsWith("/total"),
|
||||
},
|
||||
{
|
||||
id: "category",
|
||||
label: "카테고리",
|
||||
path: "/category/kitchen",
|
||||
match: (pathname) => pathname.startsWith("/category"),
|
||||
},
|
||||
];
|
||||
|
||||
export const totalSubMenus: SubMenuItem[] = [
|
||||
{
|
||||
id: "penetration",
|
||||
label: "보급률",
|
||||
path: "/total/penetration",
|
||||
},
|
||||
{
|
||||
id: "lg-penetration",
|
||||
label: "LG제품 보급률",
|
||||
path: "/total/lg-penetration",
|
||||
},
|
||||
{
|
||||
id: "purchase",
|
||||
label: "구매율",
|
||||
path: "/total/purchase",
|
||||
},
|
||||
{
|
||||
id: "lg-purchase",
|
||||
label: "LG제품 구매율",
|
||||
path: "/total/lg-purchase",
|
||||
},
|
||||
]
|
||||
|
||||
export const categorySubMenus: SubMenuItem[] = [
|
||||
{
|
||||
id: "kitchen",
|
||||
label: "키친솔루션",
|
||||
path: "/category/kitchen",
|
||||
},
|
||||
{
|
||||
id: "living",
|
||||
label: "리빙솔루션",
|
||||
path: "/category/living",
|
||||
},
|
||||
{
|
||||
id: "es",
|
||||
label: "ES",
|
||||
path: "/category/es",
|
||||
},
|
||||
{
|
||||
id: "ms",
|
||||
label: "MS",
|
||||
path: "/category/ms",
|
||||
},
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
export type TopMenuItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
path: string;
|
||||
/** 현재 경로가 이 탭에 해당하는지 판별하는 함수 */
|
||||
match?: (pathname: string) => boolean;
|
||||
};
|
||||
|
||||
export type SubMenuItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
path: string;
|
||||
};
|
||||
Reference in New Issue
Block a user