260204_01_ENH: 카테고리 하위 페이지들 경로명 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||||
|
|
||||||
const MsDigitalPage = () => {
|
const ESPage = () => {
|
||||||
return <CategoryPage/>
|
return <CategoryPage/>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MsDigitalPage;
|
export default ESPage;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||||
|
|
||||||
const HaLivingPage = () => {
|
const KitchenPage = () => {
|
||||||
return <CategoryPage/>
|
return <CategoryPage/>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default HaLivingPage;
|
export default KitchenPage;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||||
|
|
||||||
const HaKitchenPage = () => {
|
const LivingPage = () => {
|
||||||
return <CategoryPage/>
|
return <CategoryPage/>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default HaKitchenPage;
|
export default LivingPage;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
import CategoryPage from "@/components/lge-dashboard/sub-page/CategoryPage";
|
||||||
|
|
||||||
const AirSolutionPage = () => {
|
const MSPage = () => {
|
||||||
return <CategoryPage/>
|
return <CategoryPage/>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default AirSolutionPage;
|
export default MSPage;
|
||||||
@@ -28,7 +28,7 @@ type CategoryFilterProps = {
|
|||||||
|
|
||||||
const CategoryFilter = ({ filterItems, value, onChange, className }: CategoryFilterProps) => {
|
const CategoryFilter = ({ filterItems, value, onChange, className }: CategoryFilterProps) => {
|
||||||
const currentTargetItem = useMemo(() => {
|
const currentTargetItem = useMemo(() => {
|
||||||
return categoryTarget.find((item) => item.type === value.type.value);
|
return categoryTarget.find((item) => item.type.includes(value.type.value));
|
||||||
}, [value.type]);
|
}, [value.type]);
|
||||||
|
|
||||||
const handlePick = (
|
const handlePick = (
|
||||||
@@ -39,7 +39,7 @@ const CategoryFilter = ({ filterItems, value, onChange, className }: CategoryFil
|
|||||||
const next: CategoryFilterValue = { ...value, [key]: v } as CategoryFilterValue;
|
const next: CategoryFilterValue = { ...value, [key]: v } as CategoryFilterValue;
|
||||||
|
|
||||||
if (key === "type" && typeof v === "object" && v.value !== value.type.value) {
|
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;
|
const firstTarget = nextItem?.children?.[0]?.target;
|
||||||
if (firstTarget) next.target = firstTarget;
|
if (firstTarget) next.target = firstTarget;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const buildDefaultTotalValue = (): SelectedMap => {
|
|||||||
export const buildDefaultCategoryValue = (categoryFilterItems: ProductsFilterItem): CategoryFilterValue => {
|
export const buildDefaultCategoryValue = (categoryFilterItems: ProductsFilterItem): CategoryFilterValue => {
|
||||||
const initProduct = categoryFilterItems.items[0];
|
const initProduct = categoryFilterItems.items[0];
|
||||||
const initType = {label:"보유", value:CategoryTargetType.PENETRATION}
|
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;
|
const initTarget = firstTarget ?? CategoryTargetData.PROFILE;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -70,14 +70,14 @@ type BannerSummaryProps = {
|
|||||||
const BannerSummary = ({ data, useChart }: BannerSummaryProps) => {
|
const BannerSummary = ({ data, useChart }: BannerSummaryProps) => {
|
||||||
const buildChartData = (rows: ServerBannerRow[], bannerKeys: BannerKey[]): ChartData => {
|
const buildChartData = (rows: ServerBannerRow[], bannerKeys: BannerKey[]): ChartData => {
|
||||||
const categories = rows
|
const categories = rows
|
||||||
.filter((r) => r.rowLabel !== "사례수")
|
.filter((r) => !r.rowLabel.includes("사례수"))
|
||||||
.map((r) => formatRowLabel(r.rowLabel));
|
.map((r) => formatRowLabel(r.rowLabel));
|
||||||
|
|
||||||
const series = [
|
const series = [
|
||||||
{
|
{
|
||||||
name:"전체",
|
name:"전체",
|
||||||
data: rows
|
data: rows
|
||||||
.filter((r) => r.rowLabel !== "사례수")
|
.filter((r) => !r.rowLabel.includes("사례수"))
|
||||||
.map((r) => parseNumber(r.total) ?? null),
|
.map((r) => parseNumber(r.total) ?? null),
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const Brand = () => {
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: "구매 형식",
|
title: "브랜드",
|
||||||
chartMode: "reverseStack",
|
chartMode: "reverseStack",
|
||||||
data: finalData,
|
data: finalData,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -47,11 +47,12 @@ export const totalFilters:TotalFilterItem[] = [
|
|||||||
variable:"pyeong",
|
variable:"pyeong",
|
||||||
variableName:"거주 평형",
|
variableName:"거주 평형",
|
||||||
children:[
|
children:[
|
||||||
{ value: "0", label: "19평 이하"},
|
{ value: "0", label: "전체"},
|
||||||
{ value: "1", label: "20평형 대"},
|
{ value: "1", label: "19평 이하"},
|
||||||
{ value: "2", label: "30평형 대"},
|
{ value: "2", label: "20평형 대"},
|
||||||
{ value: "3", label: "40평형 대"},
|
{ value: "3", label: "30평형 대"},
|
||||||
{ value: "4", label: "50평형 이상"},
|
{ value: "4", label: "40평형 대"},
|
||||||
|
{ value: "5", label: "50평형 이상"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -83,11 +84,12 @@ export const totalFilters:TotalFilterItem[] = [
|
|||||||
variable:"age",
|
variable:"age",
|
||||||
variableName:"연령대",
|
variableName:"연령대",
|
||||||
children:[
|
children:[
|
||||||
{ value: "0", label: "20대"},
|
{ value: "0", label: "전체"},
|
||||||
{ value: "1", label: "30대"},
|
{ value: "2", label: "20대"},
|
||||||
{ value: "2", label: "40대"},
|
{ value: "3", label: "30대"},
|
||||||
{ value: "3", label: "50대"},
|
{ value: "4", label: "40대"},
|
||||||
{ value: "4", label: "60대"},
|
{ value: "5", label: "50대"},
|
||||||
|
{ value: "6", label: "60대"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -114,13 +116,13 @@ export const categoryTargetType: CategoryTargetTypeItem[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:"향후 구매",
|
label:"향후 구매",
|
||||||
value: CategoryTargetType.PURCHASE,
|
value: CategoryTargetType.INTENDED,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export const categoryTarget: CategoryTargetItem[] = [
|
export const categoryTarget: CategoryTargetItem[] = [
|
||||||
{
|
{
|
||||||
type: CategoryTargetType.PENETRATION,
|
type: [CategoryTargetType.PENETRATION],
|
||||||
children:[
|
children:[
|
||||||
{ target: CategoryTargetData.PROFILE, label: "Profile"},
|
{ target: CategoryTargetData.PROFILE, label: "Profile"},
|
||||||
{ target: CategoryTargetData.PENETRATION_CHANGE, label: "보급률 변화"},
|
{ target: CategoryTargetData.PENETRATION_CHANGE, label: "보급률 변화"},
|
||||||
@@ -131,7 +133,7 @@ export const categoryTarget: CategoryTargetItem[] = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: CategoryTargetType.PURCHASE,
|
type: [CategoryTargetType.PURCHASE, CategoryTargetType.INTENDED],
|
||||||
children:[
|
children:[
|
||||||
{ target: CategoryTargetData.PROFILE, label: "Profile"},
|
{ target: CategoryTargetData.PROFILE, label: "Profile"},
|
||||||
{ target: CategoryTargetData.BRAND, label: "브랜드"},
|
{ target: CategoryTargetData.BRAND, label: "브랜드"},
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export type TotalFilterItem = {
|
|||||||
export enum CategoryTargetType {
|
export enum CategoryTargetType {
|
||||||
PENETRATION = "PENETRATION",
|
PENETRATION = "PENETRATION",
|
||||||
PURCHASE = "PURCHASE",
|
PURCHASE = "PURCHASE",
|
||||||
|
INTENDED = "INTENDED"
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CategoryTargetData {
|
export enum CategoryTargetData {
|
||||||
@@ -36,6 +37,6 @@ export type TargetChild = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type CategoryTargetItem = {
|
export type CategoryTargetItem = {
|
||||||
type: CategoryTargetType;
|
type: CategoryTargetType[];
|
||||||
children: TargetChild[];
|
children: TargetChild[];
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ export const topMenus: TopMenuItem[] = [
|
|||||||
{
|
{
|
||||||
id: "category",
|
id: "category",
|
||||||
label: "카테고리",
|
label: "카테고리",
|
||||||
path: "/category/ha-kitchen",
|
path: "/category/kitchen",
|
||||||
match: (pathname) => pathname.startsWith("/category"),
|
match: (pathname) => pathname.startsWith("/category"),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -40,23 +40,23 @@ export const totalSubMenus: SubMenuItem[] = [
|
|||||||
|
|
||||||
export const categorySubMenus: SubMenuItem[] = [
|
export const categorySubMenus: SubMenuItem[] = [
|
||||||
{
|
{
|
||||||
id: "ha-kitchen",
|
id: "kitchen",
|
||||||
label: "H&A 주방가전(키친)",
|
label: "키친솔루션",
|
||||||
path: "/category/ha-kitchen",
|
path: "/category/kitchen",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ha-living",
|
id: "living",
|
||||||
label: "H&A 리빙가전",
|
label: "리빙솔루션",
|
||||||
path: "/category/ha-living",
|
path: "/category/living",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "air-solution",
|
id: "es",
|
||||||
label: "에어솔루션",
|
label: "ES",
|
||||||
path: "/category/air-solution",
|
path: "/category/es",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "ms-digital",
|
id: "ms",
|
||||||
label: "MS 디지털가전",
|
label: "MS",
|
||||||
path: "/category/ms-digital",
|
path: "/category/ms",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -106,14 +106,14 @@ export const AXIS_HIDE_STYLE = { axisLabel: { show: false }, axisTick: { show: f
|
|||||||
|
|
||||||
export const PRODUCTS_FILTER_ITEM = [
|
export const PRODUCTS_FILTER_ITEM = [
|
||||||
{
|
{
|
||||||
path: "ha-kitchen",
|
path: "kitchen",
|
||||||
items: [
|
items: [
|
||||||
PRODUCT_KEY_MAP.refrigerator, // 냉장고
|
PRODUCT_KEY_MAP.refrigerator, // 냉장고
|
||||||
PRODUCT_KEY_MAP.kimchiRefrigerator, // 김치 냉장고
|
PRODUCT_KEY_MAP.kimchiRefrigerator, // 김치 냉장고
|
||||||
PRODUCT_KEY_MAP.wineCellar, // 와인 셀러
|
|
||||||
PRODUCT_KEY_MAP.dishwasher, // 식기 세척기
|
PRODUCT_KEY_MAP.dishwasher, // 식기 세척기
|
||||||
|
|
||||||
PRODUCT_KEY_MAP.microwave, // 전자 레인지
|
PRODUCT_KEY_MAP.microwave, // 전자 레인지
|
||||||
PRODUCT_KEY_MAP.airFryer, // 에어 프라이어
|
|
||||||
PRODUCT_KEY_MAP.electricRange, // 전기 레인지
|
PRODUCT_KEY_MAP.electricRange, // 전기 레인지
|
||||||
PRODUCT_KEY_MAP.oven, // 오븐
|
PRODUCT_KEY_MAP.oven, // 오븐
|
||||||
PRODUCT_KEY_MAP.waterPurifier, // 정수기
|
PRODUCT_KEY_MAP.waterPurifier, // 정수기
|
||||||
@@ -121,19 +121,19 @@ export const PRODUCTS_FILTER_ITEM = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "ha-living",
|
path: "living",
|
||||||
items: [
|
items: [
|
||||||
PRODUCT_KEY_MAP.washingMachine, // 세탁기
|
PRODUCT_KEY_MAP.washingMachine, // 세탁기
|
||||||
PRODUCT_KEY_MAP.dryer, // 건조기
|
PRODUCT_KEY_MAP.dryer, // 건조기
|
||||||
PRODUCT_KEY_MAP.vacuumCleaner, // 청소기
|
PRODUCT_KEY_MAP.vacuumCleaner, // 청소기
|
||||||
PRODUCT_KEY_MAP.robotVacuum, // 로봇 청소기
|
PRODUCT_KEY_MAP.robotVacuum, // 로봇 청소기
|
||||||
PRODUCT_KEY_MAP.massageChair, // 안마 의자
|
|
||||||
PRODUCT_KEY_MAP.clothingCareSystem, // 의류 관리기
|
PRODUCT_KEY_MAP.clothingCareSystem, // 의류 관리기
|
||||||
|
PRODUCT_KEY_MAP.massageChair, // 안마 의자
|
||||||
PRODUCT_KEY_MAP.shoeCareSystem, // 신발 관리기
|
PRODUCT_KEY_MAP.shoeCareSystem, // 신발 관리기
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "air-solution",
|
path: "es",
|
||||||
items: [
|
items: [
|
||||||
PRODUCT_KEY_MAP.airConditioner, // 에어컨
|
PRODUCT_KEY_MAP.airConditioner, // 에어컨
|
||||||
PRODUCT_KEY_MAP.airPurifier, // 공기 청정기
|
PRODUCT_KEY_MAP.airPurifier, // 공기 청정기
|
||||||
@@ -145,7 +145,7 @@ export const PRODUCTS_FILTER_ITEM = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "ms-digital",
|
path: "ms",
|
||||||
items: [
|
items: [
|
||||||
PRODUCT_KEY_MAP.tv, // TV
|
PRODUCT_KEY_MAP.tv, // TV
|
||||||
PRODUCT_KEY_MAP.monitor, // 모니터
|
PRODUCT_KEY_MAP.monitor, // 모니터
|
||||||
|
|||||||
Reference in New Issue
Block a user