Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] client api 인터페이스 CANCELED 로 워딩 변경 #158

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const StudyCurriculum = async () => {
color: attendanceStatusColor,
} =
attendanceStatusMap[
curriculumStatus === "CANCELLED" ? "ATTENDED" : attendanceStatus
curriculumStatus === "CANCELED" ? "ATTENDED" : attendanceStatus
];

const isAssignmentSubmissionSuccess =
Expand All @@ -74,7 +74,7 @@ const StudyCurriculum = async () => {
const buttonDisabled =
!isCurrentWeek ||
assignmentSubmissionStatus === "FAILURE" ||
assignmentStatus === "CANCELLED";
assignmentStatus === "CANCELED";

const noDescriptionTextColor = description ? "black" : "sub";

Expand All @@ -90,7 +90,7 @@ const StudyCurriculum = async () => {
</Text>
</div>
<div className={contentContainerStyle}>
{curriculumStatus === "CANCELLED" ? (
{curriculumStatus === "CANCELED" ? (
<Text as="h3" color="sub" typo="h3">
휴강 주차
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ const getTagProps = (
status: AssignmentStatusType,
assignmentSubmissionStatus: AssignmentSubmissionStatusType
) => {
if (status === "CANCELLED") {
return assignmentSubmissionMap.CANCELLED;
if (status === "CANCELED") {
return assignmentSubmissionMap.CANCELED;
}

if (
Expand All @@ -113,7 +113,7 @@ const getTagProps = (
) {
return assignmentSubmissionMap[assignmentSubmissionStatus];
}
return assignmentSubmissionMap.CANCELLED;
return assignmentSubmissionMap.CANCELED;
};

const weekStyle = css({
Expand Down Expand Up @@ -159,10 +159,10 @@ const tagContainerStyle = css({
});

const assignmentSubmissionMap: Record<
"CANCELLED" | "FAILURE" | "SUCCESS",
"CANCELED" | "FAILURE" | "SUCCESS",
{ tagText: string; tagColor: ComponentProps<typeof Tag>["color"] }
> = {
CANCELLED: { tagText: "과제 휴강", tagColor: "grey" },
CANCELED: { tagText: "과제 휴강", tagColor: "grey" },
FAILURE: { tagText: "제출 실패", tagColor: "red" },
SUCCESS: { tagText: "제출 완료", tagColor: "blue" },
};
Expand Down
2 changes: 1 addition & 1 deletion apps/client/types/entities/common/assignment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type AssignmentSubmissionStatusType = "FAILURE" | "SUCCESS" | null;
export type AssignmentStatusType = "NONE" | "OPEN" | "CANCELLED";
export type AssignmentStatusType = "NONE" | "OPEN" | "CANCELED";
export type AssignmentSubmissionFailureType =
| "NONE"
| "NOT_SUBMITTED"
Expand Down
2 changes: 1 addition & 1 deletion apps/client/types/entities/myStudy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type AttendanceStatusType =

export type StudyDifficultyType = "BASIC" | "LOW" | "MEDIUM" | "HIGH";

export type StudyCurriculumStatusType = "NONE" | "OPEN" | "CANCELLED";
export type StudyCurriculumStatusType = "NONE" | "OPEN" | "CANCELED";

export type DailyTaskType = "ATTENDANCE" | "ASSIGNMENT";

Expand Down
Loading