diff --git a/apps/common/features/src/entities/post/model/post-interface.ts b/apps/common/features/src/entities/post/model/post-interface.ts index 11778002f..1b6b14953 100644 --- a/apps/common/features/src/entities/post/model/post-interface.ts +++ b/apps/common/features/src/entities/post/model/post-interface.ts @@ -9,6 +9,7 @@ export interface PostParams extends PageableParams { prdPstgYn?: string; siteId?: string; bbsTypeCd?: string; + ansUseYn?: string; } export interface Post { diff --git a/apps/common/features/src/widgets/post/model/post-table-columns.tsx b/apps/common/features/src/widgets/post/model/post-table-columns.tsx index 2084b69ac..2e4f14d2f 100644 --- a/apps/common/features/src/widgets/post/model/post-table-columns.tsx +++ b/apps/common/features/src/widgets/post/model/post-table-columns.tsx @@ -50,12 +50,13 @@ export const columns: ColumnDef[] = [ accessorKey: "pstTtl", header: "제목", cell: ({ row }) => { - const { ansPstn, pstTtl, inqNocs, cmntCnt } = row.original; + const { ansPstn = 0, pstTtl, inqNocs, cmntCnt } = row.original; + const indentPadding = ansPstn > 0 ? (ansPstn - 1) * 20 : 0; return (
{ansPstn > 0 && (
diff --git a/apps/common/features/src/widgets/post/ui/post-page.tsx b/apps/common/features/src/widgets/post/ui/post-page.tsx index f53af0ee8..3e7d74f04 100644 --- a/apps/common/features/src/widgets/post/ui/post-page.tsx +++ b/apps/common/features/src/widgets/post/ui/post-page.tsx @@ -81,6 +81,7 @@ function PostPage({ bbsId }: { bbsId: string }) { queryFn: () => PostApi.getPostList(parseInt(bbsId), { ...postParams, + ansUseYn: bbsInfo?.ansUseYn, page: pagination.pageIndex, size: pagination.pageSize, }), diff --git a/apps/cs/src/entities/post/model/post-interface.ts b/apps/cs/src/entities/post/model/post-interface.ts index 86e27afd5..783053dd7 100644 --- a/apps/cs/src/entities/post/model/post-interface.ts +++ b/apps/cs/src/entities/post/model/post-interface.ts @@ -9,6 +9,7 @@ export interface PostParams extends PageableParams { prdPstgYn?: string; siteId?: string; bbsTypeCd?: string; + ansUseYn?: string; } export interface RecentPostParams extends PageableParams { diff --git a/apps/cs/src/widgets/post/model/post-table-columns.tsx b/apps/cs/src/widgets/post/model/post-table-columns.tsx index c16f7a931..596fbc1a8 100644 --- a/apps/cs/src/widgets/post/model/post-table-columns.tsx +++ b/apps/cs/src/widgets/post/model/post-table-columns.tsx @@ -51,12 +51,13 @@ export const columns: ColumnDef[] = [ accessorKey: "pstTtl", header: "제목", cell: ({ row }) => { - const { ansPstn, pstTtl, inqNocs, cmntCnt } = row.original; + const { ansPstn = 0, pstTtl, inqNocs, cmntCnt } = row.original; + const indentPadding = ansPstn > 0 ? (ansPstn - 1) * 20 : 0; return (
{ansPstn > 0 && (
diff --git a/apps/cs/src/widgets/post/ui/post-page.tsx b/apps/cs/src/widgets/post/ui/post-page.tsx index 75384ad13..af4a01fc7 100644 --- a/apps/cs/src/widgets/post/ui/post-page.tsx +++ b/apps/cs/src/widgets/post/ui/post-page.tsx @@ -83,6 +83,7 @@ function PostPage({ bbsId }: { bbsId: string }) { PostApi.getPostList(parseInt(bbsId), { ...postParams, bbsTypeCd: bbsInfo?.bbsTypeCd, + ansUseYn: bbsInfo?.ansUseYn, page: pagination.pageIndex, size: pagination.pageSize, }),