From fc1a371f6a8d5ac74a34d6d551123e069cb30931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=8D=EC=B0=BD=EA=B8=B0?= Date: Fri, 4 Oct 2024 13:08:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Refactor:=20browse=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=99=80=20=EB=A6=AC=EB=B7=B0=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=99=80=20=EB=A9=A4=EB=B2=84=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=ED=97=A4=EB=8D=94=20=EC=97=AC=EB=B0=B1=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20WorkspaceBrowseDetail=20=EB=A6=AC=ED=8C=A9?= =?UTF-8?q?=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/ProjectMemberManage.tsx | 6 +- frontend/src/pages/ProjectReviewList.tsx | 2 +- frontend/src/pages/WorkspaceBrowseDetail.tsx | 121 ++++++++----------- frontend/src/pages/WorkspaceMemberManage.tsx | 6 +- frontend/src/pages/WorkspaceReviewList.tsx | 2 +- 5 files changed, 57 insertions(+), 80 deletions(-) diff --git a/frontend/src/pages/ProjectMemberManage.tsx b/frontend/src/pages/ProjectMemberManage.tsx index bb471fd..2ad257d 100644 --- a/frontend/src/pages/ProjectMemberManage.tsx +++ b/frontend/src/pages/ProjectMemberManage.tsx @@ -89,13 +89,13 @@ export default function ProjectMemberManage() { return (
-
-
+
+

프로젝트 멤버 관리

{isAdminOrManager && }
-
+
{sortedMembers.length === 0 ? (
프로젝트에 멤버가 없습니다.
) : ( diff --git a/frontend/src/pages/ProjectReviewList.tsx b/frontend/src/pages/ProjectReviewList.tsx index b0e8d2c..941cede 100644 --- a/frontend/src/pages/ProjectReviewList.tsx +++ b/frontend/src/pages/ProjectReviewList.tsx @@ -60,7 +60,7 @@ export default function ProjectReviewList() { return (
}>
-
+

프로젝트 리뷰

- +
+
+
+

{workspaceData?.title ?? `Workspace-${workspaceId}`}

+
+ +
+
+ {workspaceData && ( +
+

{workspaceData.content ?? '프로젝트에 대한 설명이 없습니다.'}

+
+ )} +
{isNaN(workspaceId) || isError || !workspaceId ? ( - +
+ +
+ {!workspaceId ? '작업할 워크스페이스를 선택하세요.' : '작업할 프로젝트가 없습니다.'} +
+
) : ( - + <> + {projects.length === 0 ? ( +
+ +
작업할 프로젝트가 없습니다.
+
+ ) : ( +
+ {projects.map((project: ProjectResponse) => ( + + ))} +
+ )} + )}
); } - -function HeaderSection({ - workspaceName, - onCreateProject, -}: { - workspaceName: string; - onCreateProject: (data: ProjectRequest) => void; -}) { - return ( -
-

{workspaceName}

-
- -
-
- ); -} - -function EmptyStateMessage({ workspaceId }: { workspaceId: number }) { - return ( -
- -
- {!workspaceId ? '작업할 워크스페이스를 선택하세요.' : '작업할 프로젝트가 없습니다.'} -
-
- ); -} - -function ProjectList({ projects, workspaceId }: { projects: ProjectResponse[]; workspaceId: number }) { - if (projects.length === 0) { - return ( -
- -
작업할 프로젝트가 없습니다.
-
- ); - } - - return ( -
- {projects.map((project: ProjectResponse) => ( - - ))} -
- ); -} diff --git a/frontend/src/pages/WorkspaceMemberManage.tsx b/frontend/src/pages/WorkspaceMemberManage.tsx index 467b31c..016fd25 100644 --- a/frontend/src/pages/WorkspaceMemberManage.tsx +++ b/frontend/src/pages/WorkspaceMemberManage.tsx @@ -12,8 +12,8 @@ export default function WorkspaceMemberManage() { return (
-
-
+
+

워크스페이스 멤버 관리

-
+
{members.length === 0 ? (
워크스페이스에 멤버가 없습니다.
) : ( diff --git a/frontend/src/pages/WorkspaceReviewList.tsx b/frontend/src/pages/WorkspaceReviewList.tsx index bc14e38..9cb45d1 100644 --- a/frontend/src/pages/WorkspaceReviewList.tsx +++ b/frontend/src/pages/WorkspaceReviewList.tsx @@ -60,7 +60,7 @@ export default function WorkspaceReviewList() { return (
}>
-
+

워크스페이스 리뷰

Date: Fri, 4 Oct 2024 13:19:37 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Refactor:=20=ED=97=A4=EB=8D=94=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EC=8B=9C=20=ED=98=84=EC=9E=AC=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EC=9C=A0=EC=A7=80=ED=95=98=EB=A9=B4=EC=84=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Header/WorkspaceNavigation.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Header/WorkspaceNavigation.tsx b/frontend/src/components/Header/WorkspaceNavigation.tsx index 21e4a1d..80df23e 100644 --- a/frontend/src/components/Header/WorkspaceNavigation.tsx +++ b/frontend/src/components/Header/WorkspaceNavigation.tsx @@ -19,6 +19,7 @@ export default function WorkspaceNavigation() { const workspaces = workspacesResponse?.workspaceResponses || []; const activeWorkspaceId = workspaceId ?? workspaces[0]?.id; + const activeProjectId: number = Number(location.pathname.split('/')[3] || '0'); if (workspaces.length === 0) { return
; @@ -35,25 +36,35 @@ export default function WorkspaceNavigation() { {activeWorkspaceId && ( <> labeling review model member