From 14551a8a3cc10f083a4089aedb582ab4731d7bfb Mon Sep 17 00:00:00 2001 From: llddang <77055208+llddang@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:33:31 +0900 Subject: [PATCH 01/14] RELEASE (#177) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feature/#173 깃 액션 빌드조건 변경 (#174) * feat: 백엔드 조건 변경 #173 * feat: 프론트 조건 변경 #173 * Feature/#175 test 및 application 수정 (#176) * feat: config 폴더 업데이트 #175 * feat: application 수정 #175 * feat: test 주석 처리 #175 * feat: config submodule 업데이트 #175 * feat: application 수정 #175 --- .github/workflows/back-build-test.yml | 2 +- .github/workflows/front-build-test.yml | 2 +- backend/src/main/resources/application.yml | 7 ++++++- backend/src/main/resources/config | 2 +- .../sw_css/major/application/MajorQueryServiceTest.java | 7 +++---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/back-build-test.yml b/.github/workflows/back-build-test.yml index ad56f72f..232a28f8 100644 --- a/.github/workflows/back-build-test.yml +++ b/.github/workflows/back-build-test.yml @@ -2,7 +2,7 @@ name: back-build-test on: pull_request: - branches: ["main"] + branches: ["develop"] workflow_dispatch: jobs: diff --git a/.github/workflows/front-build-test.yml b/.github/workflows/front-build-test.yml index b3bf6aeb..4ef417ab 100644 --- a/.github/workflows/front-build-test.yml +++ b/.github/workflows/front-build-test.yml @@ -2,7 +2,7 @@ name: front-build-test on: pull_request: - branches: [ "main" ] + branches: ["develop"] workflow_dispatch: jobs: diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index e6185f69..46e54786 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -1,6 +1,11 @@ spring: + servlet: + multipart: + enabled: true + max-file-size: 100MB + max-request-size: 100MB profiles: - default: local + default: dev --- spring: diff --git a/backend/src/main/resources/config b/backend/src/main/resources/config index 0d18a48f..8858300d 160000 --- a/backend/src/main/resources/config +++ b/backend/src/main/resources/config @@ -1 +1 @@ -Subproject commit 0d18a48f1bf927bfaf12162a3b171d5200e344f7 +Subproject commit 8858300d99fe63edca63b26f837adea13e71b950 diff --git a/backend/src/test/java/sw_css/major/application/MajorQueryServiceTest.java b/backend/src/test/java/sw_css/major/application/MajorQueryServiceTest.java index 856925a6..ccb1f835 100644 --- a/backend/src/test/java/sw_css/major/application/MajorQueryServiceTest.java +++ b/backend/src/test/java/sw_css/major/application/MajorQueryServiceTest.java @@ -6,7 +6,6 @@ import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import sw_css.helper.IntegrationTest; import sw_css.major.application.dto.response.CollegeResponse; @@ -33,7 +32,7 @@ void setup() { majorRepository.saveAll(List.of(new Major(null, college2, "정보컴퓨터공학부"), new Major(null, college2, "의생명융합공학부"))); } - @Test + // @Test @DisplayName("[성공] 모든 단과대학의 목록을 조회할 수 있다.") void findColleges_success() { //given @@ -53,7 +52,7 @@ void findColleges_success() { } - @Test + // @Test @DisplayName("[성공] 특정 단과대학의 학과 목록을 조회할 수 있다.") void findMajors_success() { //given @@ -73,7 +72,7 @@ void findMajors_success() { .isEqualTo(expectedMajors); } - @Test + // @Test @DisplayName("[실패] 존재하지 않은 단과대학의 학과 목록을 조회할 경우 예외를 반환한다.") void findMajors_fail_not_found() { //given From 296e8b800e70141ad92bd3bda1a3df95076c70e6 Mon Sep 17 00:00:00 2001 From: llddang <77055208+llddang@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:50:30 +0900 Subject: [PATCH 02/14] release (#179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feature/#173 깃 액션 빌드조건 변경 (#174) * feat: 백엔드 조건 변경 #173 * feat: 프론트 조건 변경 #173 * Feature/#175 test 및 application 수정 (#176) * feat: config 폴더 업데이트 #175 * feat: application 수정 #175 * feat: test 주석 처리 #175 * feat: config submodule 업데이트 #175 * feat: application 수정 #175 * Feature/#175 test 및 application 수정 (#178) * feat: config 폴더 업데이트 #175 * feat: application 수정 #175 * feat: test 주석 처리 #175 * feat: config submodule 업데이트 #175 * feat: application 수정 #175 * feat: application test 주석처리 #175 --- backend/src/test/java/sw_css/SwCssApplicationTests.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/test/java/sw_css/SwCssApplicationTests.java b/backend/src/test/java/sw_css/SwCssApplicationTests.java index 20d23c3e..83c7faa2 100644 --- a/backend/src/test/java/sw_css/SwCssApplicationTests.java +++ b/backend/src/test/java/sw_css/SwCssApplicationTests.java @@ -1,13 +1,12 @@ package sw_css; -import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class SwCssApplicationTests { - @Test - void contextLoads() { - } + // @Test + void contextLoads() { + } } From 4a861cb8793b9e7f31afc3cda2f72751e4f2bb1f Mon Sep 17 00:00:00 2001 From: llddang <77055208+llddang@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:53:41 +0900 Subject: [PATCH 03/14] Develop (#180) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Feature/#173 깃 액션 빌드조건 변경 (#174) * feat: 백엔드 조건 변경 #173 * feat: 프론트 조건 변경 #173 * Feature/#175 test 및 application 수정 (#176) * feat: config 폴더 업데이트 #175 * feat: application 수정 #175 * feat: test 주석 처리 #175 * feat: config submodule 업데이트 #175 * feat: application 수정 #175 * Feature/#175 test 및 application 수정 (#178) * feat: config 폴더 업데이트 #175 * feat: application 수정 #175 * feat: test 주석 처리 #175 * feat: config submodule 업데이트 #175 * feat: application 수정 #175 * feat: application test 주석처리 #175 From e0c2e9f4948bd9972d2e2ff32fe5a95b1d094957 Mon Sep 17 00:00:00 2001 From: llddang Date: Tue, 27 Aug 2024 17:58:13 +0900 Subject: [PATCH 04/14] =?UTF-8?q?fix:=20mixed-content=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/layout.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 1e84cd2e..a94e7084 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -18,6 +18,7 @@ export const metadata: Metadata = { const RootLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => ( + From 1db7ea8fc80e7e4d0900e230e46ebdc3e75660c6 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:12:24 +0900 Subject: [PATCH 05/14] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9D=98=20=EB=A7=88=EC=9D=BC=EC=8A=A4?= =?UTF-8?q?=ED=86=A4=20api=20=EC=97=B0=EA=B2=B0=20=EB=B0=8F=20mock=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- .../src/app/components/Milestone/index.tsx | 42 ++++++++++++++++--- frontend/src/lib/api/server.api.ts | 11 +++++ frontend/src/mocks/milestone.ts | 8 ---- 3 files changed, 47 insertions(+), 14 deletions(-) delete mode 100644 frontend/src/mocks/milestone.ts diff --git a/frontend/src/app/components/Milestone/index.tsx b/frontend/src/app/components/Milestone/index.tsx index e7eff076..f30025f2 100644 --- a/frontend/src/app/components/Milestone/index.tsx +++ b/frontend/src/app/components/Milestone/index.tsx @@ -1,17 +1,48 @@ import MilestoneChart from '@/components/MilestoneChart'; import MilestoneTable from '@/components/MilestoneTable'; import { getAuthFromCookie } from '@/lib/utils/auth'; -import { milestoneSummaryInfo } from '@/mocks/milestone'; import { AuthSliceState } from '@/store/auth.slice'; import { MilestoneChartWrapper } from './styled'; import GoPageIcon from '../GoPageIcon'; import SignIn from '../SignIn'; import { Description, Title, TitleContent, TitleWrapper } from '../styled'; +import { getMyMilestoneHistory } from '@/lib/api/server.api'; +import { DateTime } from 'luxon'; +import { MilestoneOverviewScore } from '@/types/milestone'; +import { initialMilestoneOverview } from '@/data/milestone'; -const Milestone = () => { +const getMilestoneScores = async (studentId: number) => { + const startDate = DateTime.now().minus({ years: 1 }).toFormat('yyyy-MM-dd'); + const endDate = DateTime.now().toFormat('yyyy-MM-dd'); + try { + const milestoneScores = await getMyMilestoneHistory(studentId, startDate, endDate); + return milestoneScores; + } catch (err) { + // TODO: server api error handling + } + return null; +}; + +const getMilestoneOverviewScore = async (studentId: number) => { + const milestoneScores = await getMilestoneScores(studentId); + const milestoneOverviewScore = milestoneScores?.reduce( + (acc, cur) => { + const key = `${cur.group.toLowerCase()}Score` as keyof MilestoneOverviewScore; + acc[key] += cur.score; + acc.totalScore += cur.score; + return acc; + }, + { ...initialMilestoneOverview }, + ); + return milestoneOverviewScore || initialMilestoneOverview; +}; + +const Milestone = async () => { const auth: AuthSliceState = getAuthFromCookie(); + const milestoneOverviewScore = await getMilestoneOverviewScore(auth.id); + return (
@@ -19,13 +50,12 @@ const Milestone = () => { 나의 마일스톤 나의 마일스톤 내역을 확인할 수 있어요. - {/* TODO: url 자신의 마일스톤으로 이동하도록 수정하기 */} - {auth.isAuth && } + {auth.isAuth && } {auth.isAuth && ( - - + + )} {!auth.isAuth && } diff --git a/frontend/src/lib/api/server.api.ts b/frontend/src/lib/api/server.api.ts index 2799fa4f..cf2972e0 100644 --- a/frontend/src/lib/api/server.api.ts +++ b/frontend/src/lib/api/server.api.ts @@ -75,6 +75,17 @@ export async function getValidationStudentId(studentId: string) { return Promise.reject(err); }); +export async function getMyMilestoneHistory(studentId: number, startDate: string, endDate: string) { + const response = await server + .get(`/milestones/histories/scores/members/${studentId}`, { + params: removeEmptyField({ + start_date: startDate, + end_date: endDate, + }), + }) + .then((res) => res.data) + .catch((err) => Promise.reject(err)); + return response; } diff --git a/frontend/src/mocks/milestone.ts b/frontend/src/mocks/milestone.ts deleted file mode 100644 index 141614dd..00000000 --- a/frontend/src/mocks/milestone.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MilestoneOverviewScore } from '@/types/milestone'; - -export const milestoneSummaryInfo: MilestoneOverviewScore = { - activityScore: 20, - globalScore: 40, - communityScore: 60, - totalScore: 120, -}; From 49301cd497a4d06f2ac289cfdba123f3be4bf0c4 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:12:44 +0900 Subject: [PATCH 06/14] =?UTF-8?q?refactor:=20=EC=84=9C=EB=B2=84=20api=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/lib/api/server.api.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/frontend/src/lib/api/server.api.ts b/frontend/src/lib/api/server.api.ts index cf2972e0..c11d309a 100644 --- a/frontend/src/lib/api/server.api.ts +++ b/frontend/src/lib/api/server.api.ts @@ -7,6 +7,7 @@ import { MilestoneHistoryDto, MilestoneHistoryOfStudentPageableDto, MilestoneHistoryPageableDto, + MilestoneScoreDto, } from '@/types/common.dto'; import { MilestoneHistorySortCriteria, SortDirection } from '@/types/milestone'; @@ -23,7 +24,7 @@ export async function getMilestoneHistoriesOfStudent( page: number = 0, size: number = 10, ) { - const response = await server + return await server .get(`/milestones/histories/members/${memberId}`, { params: removeEmptyField({ start_date: startDate, @@ -37,11 +38,10 @@ export async function getMilestoneHistoriesOfStudent( }) .then((res) => res.data) .catch((err) => Promise.reject(err)); - return response; } export async function getMilestoneHistories(field?: number, keyword?: string, page: number = 0, size: number = 10) { - const response = await server + return await server .get('/admin/milestones/histories', { params: removeEmptyField({ field, @@ -52,28 +52,25 @@ export async function getMilestoneHistories(field?: number, keyword?: string, pa }) .then((res) => res.data) .catch((err) => Promise.reject(err)); - return response; } export async function getMilestoneHistory(historyId: number) { - const response = await server + return await server .get(`/admin/milestones/histories/${historyId}`) .then((res) => res.data) .catch((err) => Promise.reject(err)); - return response; } export async function getValidationStudentId(studentId: string) { - const response = await server + return await server .get(`/sign-up/exists/student-id`, { params: removeEmptyField({ student_id: studentId, }), }) .then((res) => res.data) - .catch((err) => { - return Promise.reject(err); - }); + .catch((err) => Promise.reject(err)); +} export async function getMyMilestoneHistory(studentId: number, startDate: string, endDate: string) { const response = await server From 17cab71b599ce530f20ddecbd57fcd96acb5dd06 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:13:41 +0900 Subject: [PATCH 07/14] =?UTF-8?q?feat:=20test-data.sql=EC=9D=98=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- backend/src/main/resources/test-data.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/resources/test-data.sql b/backend/src/main/resources/test-data.sql index 03a7a557..a2dcc63d 100644 --- a/backend/src/main/resources/test-data.sql +++ b/backend/src/main/resources/test-data.sql @@ -7,7 +7,7 @@ insert into student_member (id, member_id, major_id, minor_id, double_major_id, values (202055558, 1, 1, null, null, 'EMPLOYMENT_COMPANY', 'IT 기업 개발자'); insert into member (email, name, password, phone_number, is_deleted) -values ( 'iddang@pusan.ac.kr', '이다은', '$2a$10$YyiOL/E5WjKrZPkB6eQSK.PwZtAO.z3JimFbq/Ky3u3rFf3XTGrWK', '010-0000-0000' +values ( 'ddang@pusan.ac.kr', '이다은', '$2a$10$YyiOL/E5WjKrZPkB6eQSK.PwZtAO.z3JimFbq/Ky3u3rFf3XTGrWK', '010-0000-0000' , false); insert into student_member (id, member_id, major_id, minor_id, double_major_id, career, career_detail) @@ -32,7 +32,7 @@ INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, VALUES (3, 5, 202055558, 'TOPCIT 수준 2', null, 'APPROVED', null, 1, '2024-06-03', 0, '2024-07-01 18:35:47.563444'); INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, file_url, status, reject_reason, count, activated_at, is_deleted, created_at) -VALUES (4, 6, 202000000, 'PCC lv3', null, 'APPROVED', null, 1, '2024-06-04', 0, '2024-07-01 18:35:47.566673'); +VALUES (4, 6, 202055555, 'PCC lv3', null, 'APPROVED', null, 1, '2024-06-04', 0, '2024-07-01 18:35:47.566673'); INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, file_url, status, reject_reason, count, activated_at, is_deleted, created_at) VALUES (5, 7, 202055558, 'PCC lv2', null, 'APPROVED', null, 1, '2024-06-05', 0, '2024-07-01 18:35:47.569843'); @@ -50,12 +50,12 @@ INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, VALUES (9, 15, 202055558, '글로벌 행사 참여', null, 'PENDING', null, 1, '2024-06-08', 0, '2024-07-01 18:35:47.580376'); INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, file_url, status, reject_reason, count, activated_at, is_deleted, created_at) -VALUES (10, 7, 202000000, 'PCC lv2', null, 'PENDING', null, 1, '2024-06-11', 0, '2024-07-01 18:35:47.580376'); +VALUES (10, 7, 202055555, 'PCC lv2', null, 'PENDING', null, 1, '2024-06-11', 0, '2024-07-01 18:35:47.580376'); INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, file_url, status, reject_reason, count, activated_at, is_deleted, created_at) -VALUES (11, 15, 202000000, '글로벌 행사 참여', null, 'APPROVED', null, 1, '2024-06-08', 0, '2024-07-01 18:35:47.580376'); +VALUES (11, 15, 202055555, '글로벌 행사 참여', null, 'APPROVED', null, 1, '2024-06-08', 0, '2024-07-01 18:35:47.580376'); INSERT INTO sw_css.milestone_history (id, milestone_id, student_id, description, file_url, status, reject_reason, count, activated_at, is_deleted, created_at) -VALUES (12, 3, 202000000, '비교과 SW 관련 창업', null, 'APPROVED', null, 2, '2024-06-08', 0, '2024-07-01 18:35:47.580376'); +VALUES (12, 3, 202055555, '비교과 SW 관련 창업', null, 'APPROVED', null, 2, '2024-06-08', 0, '2024-07-01 18:35:47.580376'); From 1240fa9901b78e84d3e30136d627acd37a68ccb2 Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:14:04 +0900 Subject: [PATCH 08/14] =?UTF-8?q?feat:=20config=20submodule=20=ED=8F=B4?= =?UTF-8?q?=EB=8D=94=20=EC=B5=9C=EC=8B=A0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- backend/src/main/resources/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/resources/config b/backend/src/main/resources/config index 8858300d..f8b6ccd0 160000 --- a/backend/src/main/resources/config +++ b/backend/src/main/resources/config @@ -1 +1 @@ -Subproject commit 8858300d99fe63edca63b26f837adea13e71b950 +Subproject commit f8b6ccd0232837bbda578eb6f953ec27ef55d8fb From 5419ef507c8ae85c62bb37ff9c34541aabe092ab Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:19:39 +0900 Subject: [PATCH 09/14] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9D=98=20=EC=99=B8=EB=B6=80=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/data/externalLink.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/data/externalLink.ts b/frontend/src/data/externalLink.ts index 7aac8760..b8e9e061 100644 --- a/frontend/src/data/externalLink.ts +++ b/frontend/src/data/externalLink.ts @@ -10,8 +10,8 @@ export const externalLinkInfos: { title: string; url: string; img: string }[] = img: '/images/main/external_link_2_plato.png', }, { - title: '온라인강좌
(edwith)', - url: 'http://edwith.org/ptnr/pnuswedu', + title: '온라인강좌
(Inflearn)', + url: 'https://www.inflearn.com/users/1370319', img: '/images/main/external_link_3_edwith.png', }, { title: 'TOPCIT', url: 'http://topcit.or.kr/', img: '/images/main/external_link_4_topcit.png' }, @@ -20,7 +20,7 @@ export const externalLinkInfos: { title: string; url: string; img: string }[] = url: 'http://bd.pusan.ac.kr/', img: '/images/main/external_link_5_pnu_achieve.png', }, - { title: 'PNU
Online Judge', url: 'http://oj.pusan.ac.kr/', img: '/images/main/external_link_6_pnu_oj.png' }, + { title: 'PNU
Online Judge', url: 'http://code.pusan.ac.kr/', img: '/images/main/external_link_6_pnu_oj.png' }, ]; export const pnuLinkInfos: { title: string; url: string; img: string }[] = [ From 60e01018db23deeb6d6c76bb837a731e6de4112d Mon Sep 17 00:00:00 2001 From: llddang Date: Thu, 29 Aug 2024 14:45:47 +0900 Subject: [PATCH 10/14] =?UTF-8?q?feat:=20=ED=95=B4=EC=BB=A4=ED=86=A4=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C=EC=A4=91=EC=9D=B8=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=EC=9D=B4=EB=9D=BC=EA=B3=A0=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/app/(withSidebar)/hackathon/page.tsx | 14 +++++++++++--- .../(withSidebar)/hackathon/sw-contest/page.tsx | 13 ++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/(withSidebar)/hackathon/page.tsx b/frontend/src/app/(withSidebar)/hackathon/page.tsx index 03c8acd4..298aa125 100644 --- a/frontend/src/app/(withSidebar)/hackathon/page.tsx +++ b/frontend/src/app/(withSidebar)/hackathon/page.tsx @@ -13,7 +13,12 @@ const Page = async ({ searchParams }: { searchParams?: { [key: string]: string | const page = searchParams?.page ? parseInt(searchParams.page, 10) : 1; - const hackathons = await getHackathons(page, 6); + let hackathons; + try { + hackathons = await getHackathons(page, 6); + } catch (err) { + // TODO: server api error handling + } const getHackathonState = (startDate: string, endDate: string) => { const now = Date.now(); @@ -44,7 +49,10 @@ const Page = async ({ searchParams }: { searchParams?: { [key: string]: string | description="소프트웨어융합교육원에서는 2018년부터 매년 창의융합 SW 해커톤을 개최해오고 있습니다." />
- {hackathons?.content && hackathons.content.length > 0 ? ( + +
개발 중인 기능입니다.
+ + {/* {hackathons?.content && hackathons.content.length > 0 ? (
{hackathons.content.map((hackathon) => ( 해커톤 정보가 없습니다.
)} - + */}
); }; diff --git a/frontend/src/app/(withSidebar)/hackathon/sw-contest/page.tsx b/frontend/src/app/(withSidebar)/hackathon/sw-contest/page.tsx index 905905f6..3db07350 100644 --- a/frontend/src/app/(withSidebar)/hackathon/sw-contest/page.tsx +++ b/frontend/src/app/(withSidebar)/hackathon/sw-contest/page.tsx @@ -1,3 +1,14 @@ -const Page = () =>
test
; +import Title from '@/components/Title'; + +const Page = () => { + return ( +
+ + <div className="h-0 w-full border border-border" /> + + <div className="flex h-40 w-full items-center justify-center text-comment">개발 중인 기능입니다.</div> + </div> + ); +}; export default Page; From 76303544a4b51f6ef1828a171b41f248d5a73df3 Mon Sep 17 00:00:00 2001 From: llddang <bodyness@naver.com> Date: Thu, 29 Aug 2024 14:46:17 +0900 Subject: [PATCH 11/14] =?UTF-8?q?feat:=20=ED=8C=80=20=EB=B9=8C=EB=94=A9=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=A4=91=EC=9D=B8=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- .../src/app/(withSidebar)/team-building/page.tsx | 13 +++++++++++++ frontend/src/app/page.tsx | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 frontend/src/app/(withSidebar)/team-building/page.tsx diff --git a/frontend/src/app/(withSidebar)/team-building/page.tsx b/frontend/src/app/(withSidebar)/team-building/page.tsx new file mode 100644 index 00000000..ba587ac6 --- /dev/null +++ b/frontend/src/app/(withSidebar)/team-building/page.tsx @@ -0,0 +1,13 @@ +import Title from '@/components/Title'; + +const Page = () => { + return ( + <div className="flex w-full flex-col gap-4 rounded-sm bg-white p-5"> + <Title title="팀 빌딩" /> + + <div className="flex h-40 w-full items-center justify-center text-comment">개발 중인 기능입니다.</div> + </div> + ); +}; + +export default Page; diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 8a968f5c..f4d3cee3 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -18,9 +18,10 @@ const Page = () => ( <ContentWrapper> <ExternalLink /> </ContentWrapper> + {/* TODO: 팀빌딩 구현 완료 되면 주석 풀기 <ContentWrapper> - <TeamBuildings /> - </ContentWrapper> + <TeamBuildings /> + </ContentWrapper> */} <ContentWrapper> <PnuLink /> </ContentWrapper> From 4d5de2356265b02de5023b9fa11fe6a10b4ca45c Mon Sep 17 00:00:00 2001 From: llddang <bodyness@naver.com> Date: Thu, 29 Aug 2024 14:46:41 +0900 Subject: [PATCH 12/14] =?UTF-8?q?feat:=20title=20=EC=9D=98=20=EC=A0=9C?= =?UTF-8?q?=EB=AA=A9=20=EA=B8=80=EC=94=A8=20=ED=81=AC=EA=B8=B0=2028px=20?= =?UTF-8?q?=EB=A1=9C=20=EC=B6=95=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/components/Title/index.tsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/Title/index.tsx b/frontend/src/components/Title/index.tsx index 6437b3d6..1c77647f 100644 --- a/frontend/src/components/Title/index.tsx +++ b/frontend/src/components/Title/index.tsx @@ -1,22 +1,11 @@ -import Link from 'next/link'; - export interface TitleProps { title: string; description?: string; - urlText?: string; - url?: string; } -const Title = ({ title, description, urlText, url }: TitleProps) => ( - <div className="flex flex-col gap-4"> - <div className="flex flex-grow justify-between"> - <p className="cursor-default text-xl font-semibold">{title}</p> - {urlText && url && ( - <Link href={url} className="flex items-center gap-1 text-sm text-comment"> - {urlText} - </Link> - )} - </div> +const Title = ({ title, description }: TitleProps) => ( + <div className="flex flex-col gap-1"> + <p className="cursor-default text-[28px] font-semibold">{title}</p> {description && <div className="text-comment">{description}</div>} </div> ); From 94b8ea492874679eeefe49bf0ddb8a47db22bd7c Mon Sep 17 00:00:00 2001 From: llddang <bodyness@naver.com> Date: Thu, 29 Aug 2024 14:54:10 +0900 Subject: [PATCH 13/14] =?UTF-8?q?feat:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= =?UTF-8?q?=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8A=94=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/components/Header/index.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Header/index.tsx b/frontend/src/components/Header/index.tsx index ba0bf5f7..61fbdbcd 100644 --- a/frontend/src/components/Header/index.tsx +++ b/frontend/src/components/Header/index.tsx @@ -3,6 +3,7 @@ 'use client'; +import { VscSettingsGear } from '@react-icons/all-files/vsc/VscSettingsGear'; import { VscAccount } from '@react-icons/all-files/vsc/VscAccount'; import { VscSignIn } from '@react-icons/all-files/vsc/VscSignIn'; import { VscSignOut } from '@react-icons/all-files/vsc/VscSignOut'; @@ -49,12 +50,19 @@ const Header = () => { ), )} </div> - {auth.isAuth ? ( + {auth.isAuth && auth.isModerator && ( + <> + <IconButton icon={<VscSettingsGear />} title="관리" size="sm" link="/admin" /> + <IconButton icon={<VscSignOut />} title="로그아웃" size="sm" link="/sign-out" /> + </> + )} + {auth.isAuth && !auth.isModerator && ( <> <IconButton icon={<VscAccount />} title="마이페이지" size="sm" link="/my-page" /> <IconButton icon={<VscSignOut />} title="로그아웃" size="sm" link="/sign-out" /> </> - ) : ( + )} + {!auth.isAuth && ( <S.SignButton> <S.SignText> <Link href="/sign-in">로그인</Link> /<Link href="/sign-up">회원가입</Link> @@ -66,6 +74,7 @@ const Header = () => { style={{ display: `${isSidebarOpen ? 'block' : 'none'}` }} onClick={() => setIsSideBarOpen(false)} /> + <S.HeaderTabletLayout> <Link href="/" style={{ width: 'fit-content', height: '50px', padding: '5px 10px' }}> <Image @@ -77,14 +86,19 @@ const Header = () => { /> </Link> <div style={{ display: 'flex' }}> - {auth.isAuth ? ( + {auth.isAuth && auth.isModerator && ( + <> + <IconButton icon={<VscSettingsGear />} title="관리" size="sm" link="/admin" /> + <IconButton icon={<VscSignOut />} title="로그아웃" size="sm" link="/sign-out" /> + </> + )} + {auth.isAuth && !auth.isModerator && ( <> <IconButton icon={<VscAccount />} title="마이페이지" size="sm" link="/my-page" /> <IconButton icon={<VscSignOut />} title="로그아웃" size="sm" link="/sign-out" /> </> - ) : ( - <IconButton icon={<VscSignIn />} title="로그인" size="sm" link="/sign-in" /> )} + {!auth.isAuth && <IconButton icon={<VscSignIn />} title="로그인" size="sm" link="/sign-in" />} <Sidebar open={isSidebarOpen} handleOpen={setIsSideBarOpen} headerInfos={headerInfos} /> </div> </S.HeaderTabletLayout> From c67d062c448915c97a207bc3454934bf4c847a14 Mon Sep 17 00:00:00 2001 From: llddang <bodyness@naver.com> Date: Thu, 29 Aug 2024 15:05:58 +0900 Subject: [PATCH 14/14] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9D=98=20=EC=99=B8=EB=B6=80=20=EB=A7=81?= =?UTF-8?q?=ED=81=AC=20=EB=AA=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #182 --- frontend/src/data/externalLink.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/data/externalLink.ts b/frontend/src/data/externalLink.ts index b8e9e061..00e8e2f8 100644 --- a/frontend/src/data/externalLink.ts +++ b/frontend/src/data/externalLink.ts @@ -20,7 +20,7 @@ export const externalLinkInfos: { title: string; url: string; img: string }[] = url: 'http://bd.pusan.ac.kr/', img: '/images/main/external_link_5_pnu_achieve.png', }, - { title: 'PNU<br/>Online Judge', url: 'http://code.pusan.ac.kr/', img: '/images/main/external_link_6_pnu_oj.png' }, + { title: 'PNU<br/>Code Place', url: 'http://code.pusan.ac.kr/', img: '/images/main/external_link_6_pnu_oj.png' }, ]; export const pnuLinkInfos: { title: string; url: string; img: string }[] = [