Skip to content

Commit

Permalink
feat: unknown 인 케이스 우선 임의로 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
SeieunYoo committed Sep 7, 2024
1 parent 963e8ff commit 017758a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const AssignmentBoxInfo = async ({
};

const failMapping: Record<Assignment["submissionFailureType"], string> = {
LOCATION_UNIDENTIFIABLE: "위치 정보 확인 불가",
LOCATION_UNIDENTIFIABLE: "위치 확인 불가",
WORD_COUNT_INSUFFICIENT: "글자수 부족",
NOT_SUBMITTED: "제출 안함",
NONE: "없음",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const FailurePopover = ({
"Q. 글자수가 부족하다고 나와요."}
{submissionFailureType === "LOCATION_UNIDENTIFIABLE" &&
'Q. "위치 확인 불가" 라고 나와요.'}
{submissionFailureType === "UNKNOWN" &&
'Q. "알 수 없음" 라고 나와요.'}
</Text>
<Text as="div" color="outline" typo="body3">
{submissionFailureType === "LOCATION_UNIDENTIFIABLE" && (
Expand All @@ -40,7 +42,7 @@ export const FailurePopover = ({
<br />
<br />
커밋 후 원격 저장소에 push까지 완료했는지 제대로 제출한 후에도
계속 "경로 확인 불가"라고 나온다면,GDSC Hongik 카카오톡 채널로
계속 "위치 확인 불가"라고 나온다면,GDSC Hongik 카카오톡 채널로
문의해주세요.
</>
)}
Expand All @@ -53,6 +55,15 @@ export const FailurePopover = ({
GDSC Hongik 카카오톡 채널로 문의해주세요.
</p>
)}
{submissionFailureType === "UNKNOWN" && (
<p>
제출 실패의 이유를 알 수 없는 경우에요. <br />
<br />
제대로 제출한 후에도 계속 '알 수 없음' 이 뜬다면,
<br />
GDSC Hongik 카카오톡 채널로 문의해주세요.
</p>
)}
</Text>
</Flex>
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const AssignmentHistoryItem = ({
<Tag color={tagColor} variant="solid2">
{tagText}
</Tag>
<Text color="error">
<Text color="red.500">
{assignmentSubmissionStatus === "FAILURE" &&
failMapping[submissionFailureType ?? "NONE"]}
</Text>
Expand Down Expand Up @@ -162,4 +162,5 @@ const failMapping: Record<Assignment["submissionFailureType"], string> = {
WORD_COUNT_INSUFFICIENT: "글자수부족",
NOT_SUBMITTED: "미제출",
NONE: "",
UNKNOWN: "알수없음",
};
3 changes: 2 additions & 1 deletion apps/client/types/entities/common/assignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export type AssignmentSubmissionFailureType =
| "NONE"
| "NOT_SUBMITTED"
| "WORD_COUNT_INSUFFICIENT"
| "LOCATION_UNIDENTIFIABLE";
| "LOCATION_UNIDENTIFIABLE"
| "UNKNOWN";

0 comments on commit 017758a

Please sign in to comment.