From fe69e41bbc544ab2fca4b0905f9bedd505b1be7d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 07:08:13 +0000 Subject: [PATCH 1/3] Create draft PR for #785 From 5d2abfa7b745f2634432a91626264ba1b8cb0ae3 Mon Sep 17 00:00:00 2001 From: Jeongwoo Park <121204715+lurgi@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:48:09 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20applyFormId=20=EB=B0=8F=20dashboardI?= =?UTF-8?q?d=20=ED=98=95=20=EB=B3=80=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DashboardSidebar.stories.tsx | 16 +++--- .../dashboard/DashboardSidebar/index.tsx | 51 ++++++++++--------- frontend/src/main.tsx | 4 +- frontend/src/pages/DashBoardList/index.tsx | 4 +- frontend/src/pages/DashboardLayout/index.tsx | 2 +- frontend/src/types/dashboard.ts | 4 +- 6 files changed, 42 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/dashboard/DashboardSidebar/DashboardSidebar.stories.tsx b/frontend/src/components/dashboard/DashboardSidebar/DashboardSidebar.stories.tsx index 4941486c9..98a043c01 100644 --- a/frontend/src/components/dashboard/DashboardSidebar/DashboardSidebar.stories.tsx +++ b/frontend/src/components/dashboard/DashboardSidebar/DashboardSidebar.stories.tsx @@ -26,8 +26,8 @@ const meta: Meta = { { text: '첫번째 옵션', isSelected: false, - dashboardId: '1', - applyFormId: '10', + dashboardId: 1, + applyFormId: 10, status: { isClosed: true, isPending: false, @@ -38,8 +38,8 @@ const meta: Meta = { { text: '두번째 옵션', isSelected: false, - dashboardId: '2', - applyFormId: '11', + dashboardId: 2, + applyFormId: 11, status: { isClosed: true, isPending: false, @@ -50,8 +50,8 @@ const meta: Meta = { { text: '세번째 옵션', isSelected: true, - dashboardId: '2', - applyFormId: '12', + dashboardId: 2, + applyFormId: 12, status: { isClosed: false, isPending: false, @@ -62,8 +62,8 @@ const meta: Meta = { { text: '네번째 옵션', isSelected: false, - dashboardId: '2', - applyFormId: '13', + dashboardId: 2, + applyFormId: 13, status: { isClosed: false, isPending: true, diff --git a/frontend/src/components/dashboard/DashboardSidebar/index.tsx b/frontend/src/components/dashboard/DashboardSidebar/index.tsx index 94330f0b5..6e5713830 100644 --- a/frontend/src/components/dashboard/DashboardSidebar/index.tsx +++ b/frontend/src/components/dashboard/DashboardSidebar/index.tsx @@ -20,8 +20,8 @@ import S from './style'; interface Option { text: string; isSelected: boolean; - applyFormId: string; - dashboardId: string; + applyFormId: number; + dashboardId: number; status: RecruitmentStatusObject; } @@ -113,28 +113,31 @@ export default function DashboardSidebar({ sidebarStyle, options }: DashboardSid return ( {sidebarStyle.isSidebarOpen ? title : } - {posts?.map(({ text, isSelected, applyFormId, dashboardId, status }) => { - const Icon = IconObj[status.status]; - - return ( - - - - - - - {sidebarStyle.isSidebarOpen && {text}} - - - - ); - })} + {posts?.map( + ({ text, isSelected, applyFormId: applyFormIdNum, dashboardId: dashboardIdNum, status }) => { + const Icon = IconObj[status.status]; + const dashboardId = String(dashboardIdNum); + const applyFormId = String(applyFormIdNum); + return ( + + + + + + + {sidebarStyle.isSidebarOpen && {text}} + + + + ); + }, + )} ); })} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 451c484d2..05c30859c 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -18,8 +18,8 @@ const { PROD_URL, DEV_URL } = process.env; async function setPrev() { if (process.env.NODE_ENV === 'development') { Sentry.getCurrentScope().setLevel('info'); - const worker = await import('@mocks/browser'); - await worker.default.start(); + // const worker = await import('@mocks/browser'); + // await worker.default.start(); } if (process.env.NODE_ENV === 'production') { ReactGA.initialize(process.env.GA_MEASUREMENT_ID); diff --git a/frontend/src/pages/DashBoardList/index.tsx b/frontend/src/pages/DashBoardList/index.tsx index 6292aab95..b96347631 100644 --- a/frontend/src/pages/DashBoardList/index.tsx +++ b/frontend/src/pages/DashBoardList/index.tsx @@ -19,12 +19,12 @@ export default function DashboardList() { {data?.dashboards.map((dashboard) => ( handleCardClick(dashboard.dashboardId, dashboard.applyFormId)} + onClick={() => handleCardClick(String(dashboard.dashboardId), String(dashboard.applyFormId))} /> ))} navigate(routes.dashboard.create())}> diff --git a/frontend/src/pages/DashboardLayout/index.tsx b/frontend/src/pages/DashboardLayout/index.tsx index 84c38a1ea..7cb59385e 100644 --- a/frontend/src/pages/DashboardLayout/index.tsx +++ b/frontend/src/pages/DashboardLayout/index.tsx @@ -16,7 +16,7 @@ export default function DashboardLayout() { const applyFormList = data?.dashboards.map(({ title, dashboardId, applyFormId, startDate, endDate }) => ({ text: title, - isSelected: !!currentPostId && currentPostId === applyFormId, + isSelected: !!currentPostId && currentPostId === String(applyFormId), status: getTimeStatus({ startDate, endDate }), applyFormId, dashboardId, diff --git a/frontend/src/types/dashboard.ts b/frontend/src/types/dashboard.ts index 2c517900a..13561e877 100644 --- a/frontend/src/types/dashboard.ts +++ b/frontend/src/types/dashboard.ts @@ -43,8 +43,8 @@ interface Stats { } interface Dashboard { - dashboardId: string; - applyFormId: string; + dashboardId: number; + applyFormId: number; title: string; stats: Stats; startDate: string; From 847462f36a78294cc9205269d32bf62c32223aa6 Mon Sep 17 00:00:00 2001 From: Jeongwoo Park <121204715+lurgi@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:54:21 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20msw=20=EC=8B=A4=EC=88=98=20?= =?UTF-8?q?=EC=A3=84=EC=86=A1=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/main.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 05c30859c..451c484d2 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -18,8 +18,8 @@ const { PROD_URL, DEV_URL } = process.env; async function setPrev() { if (process.env.NODE_ENV === 'development') { Sentry.getCurrentScope().setLevel('info'); - // const worker = await import('@mocks/browser'); - // await worker.default.start(); + const worker = await import('@mocks/browser'); + await worker.default.start(); } if (process.env.NODE_ENV === 'production') { ReactGA.initialize(process.env.GA_MEASUREMENT_ID);