Skip to content

Commit

Permalink
Merge pull request #189 from SystemConsultantGroup/develop
Browse files Browse the repository at this point in the history
수정사항 반영을 위해 main 브랜치로 머지합니다.
  • Loading branch information
hynseok authored Oct 17, 2024
2 parents b30e463 + 431958f commit 844f1d4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/api/_types/reviews.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export interface FinalReviewResponse extends CommonApiResponse {
export interface UpdateReviewRequestBody {
contentStatus: Status;
presentationStatus?: Status | null;
comment?: string;
comment?: string | null;
fileUUID?: string;
}

Expand Down
19 changes: 17 additions & 2 deletions src/app/prof/review/[id]/ProfessorReviewForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export function ProfessorReviewForm({
presentationStatus: input.presentation,
...(commentType === "심사 의견" ? { comment: input.comment } : {}),
...(commentType === "심사 의견 파일" ? { fileUUID } : {}),
...(commentType === undefined
? previous.reviewFile
? { fileUUID: previous.reviewFile.uuid }
: { comment: previous.comment }
: {}),
} satisfies UpdateReviewRequestBody,
{ baseURL: process.env.NEXT_PUBLIC_REVIEW_API_ENDPOINT }
);
Expand Down Expand Up @@ -142,8 +147,18 @@ export function ProfessorReviewForm({
review={{
thesis: values.thesis,
presentation: values.presentation,
comment: commentType === "심사 의견" ? values.comment : "",
commentFile: commentType === "심사 의견 파일" ? values.commentFile?.name ?? null : null,
comment:
commentType === "심사 의견"
? values.comment
: previous.contentStatus === "PENDING"
? previous.comment
: "",
commentFile:
commentType === "심사 의견 파일"
? values.commentFile?.name ?? null
: previous.contentStatus === "PENDING"
? previous.reviewFile?.name ?? null
: null,
}}
opened={showConfirmDialog}
onConfirm={() => handleSubmit(values)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/review/Review/ReviewResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface ReviewResultProps {
stage: Stage;
thesis?: Status;
presentation?: Status | null;
comment?: string;
comment?: string | null;
commentFile?: string | null;
isFinal?: boolean;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface ReviewConfirmModalProps extends PropsWithChildren {
review: {
thesis: Status;
presentation: Status | null;
comment: string;
comment: string | null;
commentFile: string | null;
};
opened: boolean;
Expand Down

0 comments on commit 844f1d4

Please sign in to comment.