Skip to content

Commit 5d08579

Browse files
committed
fix: CANCELED로 프로퍼티 이름 변경
1 parent 839f51d commit 5d08579

File tree

10 files changed

+11
-14
lines changed

10 files changed

+11
-14
lines changed

apps/admin/app/studies/[studyId]/_components/assignment/AssignmentButtons.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const AssignmentButtons = ({
3939
);
4040
}
4141

42-
if (assignmentStatus === "CANCELLED") {
42+
if (assignmentStatus === "CANCELED") {
4343
return (
4444
<Flex gap="sm">
4545
<Button size="sm" style={{ pointerEvents: "none" }} variant="sub">

apps/admin/app/studies/[studyId]/_components/curriculum/CurriculumListItem.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const CurriculumListItem = ({
4040
/>
4141
<Flex direction="column" minWidth={52}>
4242
<Text typo="body1">{week}주차</Text>
43-
{curriculumStatus === "CANCELLED" && (
43+
{curriculumStatus === "CANCELED" && (
4444
<Text color="sub" typo="body2">
4545
휴강 주차
4646
</Text>

apps/admin/app/studies/assignments/[studyDetailId]/_components/AssignmentHeader.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const AssignmentHeader = ({ assignment, disabled }: AssignmentHeaderProps) => {
3030
const onOpen = methods.getValues("onOpen");
3131

3232
const handleClickSubmit = async () => {
33-
if (assignmentStatus === "CANCELLED") return;
33+
if (assignmentStatus === "CANCELED") return;
3434

3535
const data = {
3636
title: methods.getValues("title"),

apps/admin/app/studies/assignments/[studyDetailId]/edit-assignment/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Assignments = ({
5555
const { assignmentStatus, week, studyTitle } = assignment;
5656

5757
// TODO: 휴강된 경우 진입 막기
58-
if (assignmentStatus === "CANCELLED") return null;
58+
if (assignmentStatus === "CANCELED") return null;
5959

6060
return (
6161
<>

apps/admin/app/studies/detail-info/[studyId]/_components/StudyInfoBox/StudyInfoStatus.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ const StudyInfoStatus = ({ index }: { index: number }) => {
88
const { control, setValue, watch } = useFormContext();
99
const [checked, setChecked] = useState(false);
1010
useEffect(() => {
11-
setValue(
12-
`studyCurriculums.${index}.status`,
13-
checked ? "CANCELLED" : "OPEN"
14-
);
11+
setValue(`studyCurriculums.${index}.status`, checked ? "CANCELED" : "OPEN");
1512
}, [checked]);
1613

1714
return (
@@ -25,7 +22,7 @@ const StudyInfoStatus = ({ index }: { index: number }) => {
2522
name={`studyCurriculums.${index}.status`}
2623
render={() => (
2724
<Checkbox
28-
checked={watch(`studyCurriculums.${index}.status`) === "CANCELLED"}
25+
checked={watch(`studyCurriculums.${index}.status`) === "CANCELED"}
2926
defaultChecked={false}
3027
onChange={() => setChecked(!checked)}
3128
/>

apps/admin/app/studies/detail-info/[studyId]/_hooks/usePrefillStudyDetailInfo.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const usePrefillStudyDetailInfo = (studyId: number) => {
2222
description: data.description || "",
2323
difficulty: data.difficulty || undefined,
2424
status:
25-
data.curriculumStatus === "CANCELLED" ? "CANCELLED" : "OPEN",
25+
data.curriculumStatus === "CANCELED" ? "CANCELED" : "OPEN",
2626
})) || [],
2727
});
2828
}

apps/admin/constants/status/assignmentStatusMap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const assignmentStatusMap: Record<
1111
> = {
1212
NONE: "개설",
1313
OPEN: "수정",
14-
CANCELLED: "개설",
14+
CANCELED: "개설",
1515
};
1616

1717
export const assignmentSubmissionStatusMap: Record<

apps/admin/types/entities/assignment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type AssignmentStatusType = "NONE" | "OPEN" | "CANCELLED";
1+
export type AssignmentStatusType = "NONE" | "OPEN" | "CANCELED";
22
export type AssignmentSubmissionStatusType =
33
| "NOT_SUBMITTED"
44
| "FAILURE"

apps/admin/types/entities/study.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export type StudyDifficultyArrayType = {
33
value: StudyDifficultyType;
44
}[];
55

6-
export type StudyAssignmentStatusType = "NONE" | "OPEN" | "CANCELLED";
6+
export type StudyAssignmentStatusType = "NONE" | "OPEN" | "CANCELED";
77

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

apps/admin/utils/validate/studyDetailInfo.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const StudyCurriculumTypeSchema = z.object({
55
title: z.string().optional().nullable(),
66
description: z.string().optional().nullable(),
77
difficulty: z.enum(["HIGH", "MEDIUM", "LOW", "BASIC"]).optional().nullable(),
8-
status: z.enum(["OPEN", "CANCELLED", "NONE"]).optional().nullable(),
8+
status: z.enum(["OPEN", "CANCELED", "NONE"]).optional().nullable(),
99
});
1010

1111
export const studyDetailInfoSchema = z.object({

0 commit comments

Comments
 (0)