From dd8b1a5d2ba74c06f3bddcf22f61b89e901d4930 Mon Sep 17 00:00:00 2001 From: ghdtjgus76 Date: Wed, 4 Sep 2024 02:36:54 +0900 Subject: [PATCH 1/4] =?UTF-8?q?chore:=20=EC=BB=A4=EB=A6=AC=ED=81=98?= =?UTF-8?q?=EB=9F=BC=20=EA=B3=BC=EC=A0=9C=20=EC=A0=9C=EC=B6=9C=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(afterLogin)/my-study/_components/StudyCurriculum.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx b/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx index 37613f4f..ac2a307c 100644 --- a/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx +++ b/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx @@ -4,6 +4,7 @@ import { Table, Text } from "@wow-class/ui"; import { formatWeekPeriod } from "@wow-class/utils"; import { myStudyApi } from "apis/myStudyApi"; import { attendanceStatusMap } from "constants/attendanceStatusMap"; +import { routePath } from "constants/routePath"; import Link from "next/link"; import type { ComponentProps } from "react"; import type { StudyDifficultyType } from "types/entities/myStudy"; @@ -53,11 +54,16 @@ const StudyCurriculum = async () => { attendanceStatusMap[ curriculumStatus === "CANCELLED" ? "ATTENDED" : attendanceStatus ]; + const assignmentButtonText = assignmentSubmissionStatus === "SUCCESS" ? "제출한 과제 확인" : "과제 제출하기"; + const assignmentButtonHref = + submissionLink ?? routePath["my-assignment"] ?? ""; + const isCurrentWeek = getIsCurrentWeek(startDate, endDate); + const buttonDisabled = !isCurrentWeek || assignmentSubmissionStatus === "FAILURE" || @@ -123,7 +129,7 @@ const StudyCurriculum = async () => { aria-label="check-submitted-assignment" asProp={Link} disabled={buttonDisabled} - href={submissionLink || ""} + href={assignmentButtonHref} size="sm" style={assignmentButtonStyle} target="_blank" From 631904704b2d784a96cd368ad239b1eb829357ef Mon Sep 17 00:00:00 2001 From: ghdtjgus76 Date: Wed, 4 Sep 2024 02:43:00 +0900 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=EC=8A=A4=ED=84=B0=EB=94=94=20?= =?UTF-8?q?=EC=BB=A4=EB=A6=AC=ED=81=98=EB=9F=BC=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../my-study/_components/StudyCurriculum.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx b/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx index ac2a307c..dab152cb 100644 --- a/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx +++ b/apps/client/app/(afterLogin)/my-study/_components/StudyCurriculum.tsx @@ -69,6 +69,8 @@ const StudyCurriculum = async () => { assignmentSubmissionStatus === "FAILURE" || assignmentStatus === "CANCELLED"; + const noDescriptionTextColor = description ? "black" : "sub"; + return ( @@ -76,7 +78,7 @@ const StudyCurriculum = async () => { {isCurrentWeek && (
)} - + {week}주차
@@ -85,7 +87,7 @@ const StudyCurriculum = async () => { 휴강 주차 - ) : ( + ) : description ? ( { {description} + ) : ( + + 작성된 내용이 없어요 + )}
- + {formatWeekPeriod(startDate, endDate)}
From c0e78a9c214ef298411b37940c84a61f131c8270 Mon Sep 17 00:00:00 2001 From: ghdtjgus76 Date: Wed, 4 Sep 2024 02:46:11 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=EA=B3=BC=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=ED=96=89=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=80=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20=EC=98=A4=EB=8A=98=EC=9D=98=20=ED=95=A0=20=EC=9D=BC?= =?UTF-8?q?=20=EB=82=98=EC=9D=98=20=EA=B3=BC=EC=A0=9C=20=EB=B0=94=EB=A1=9C?= =?UTF-8?q?=EA=B0=80=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(afterLogin)/my-study/_components/AssignmentStatusBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/app/(afterLogin)/my-study/_components/AssignmentStatusBox.tsx b/apps/client/app/(afterLogin)/my-study/_components/AssignmentStatusBox.tsx index 8a4535d6..287682da 100644 --- a/apps/client/app/(afterLogin)/my-study/_components/AssignmentStatusBox.tsx +++ b/apps/client/app/(afterLogin)/my-study/_components/AssignmentStatusBox.tsx @@ -68,7 +68,7 @@ const AssignmentStatusBox = ({