Skip to content

Commit

Permalink
마감기한 지남 (OVERDUE) 라벨 추가 (#421)
Browse files Browse the repository at this point in the history
* feat: 마감기한 지남 상태 추가

* design: 러너 게시글 프로필 이름 가운데 정렬
  • Loading branch information
guridaek authored Aug 18, 2023
1 parent be6e7d3 commit 963bed6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ const MyPagePostItem = ({
<S.PostTitle>{title}</S.PostTitle>
<S.DeadLineContainer>
<S.DeadLine>{deadline} 까지</S.DeadLine>
<Label colorTheme={reviewStatus === 'DONE' ? 'GRAY' : reviewStatus === 'IN_PROGRESS' ? 'RED' : 'WHITE'}>
<Label
colorTheme={reviewStatus === 'NOT_STARTED' ? 'WHITE' : reviewStatus === 'IN_PROGRESS' ? 'RED' : 'GRAY'}
>
{REVIEW_STATUS_LABEL_TEXT[reviewStatus]}
</Label>
</S.DeadLineContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const RunnerPostItem = ({
<S.PostTitle>{title}</S.PostTitle>
<S.DeadLineContainer>
<S.DeadLine>{deadline.replace('T', ' ')} 까지</S.DeadLine>
<Label colorTheme={reviewStatus === 'DONE' ? 'GRAY' : reviewStatus === 'IN_PROGRESS' ? 'RED' : 'WHITE'}>
<Label
colorTheme={reviewStatus === 'NOT_STARTED' ? 'WHITE' : reviewStatus === 'IN_PROGRESS' ? 'RED' : 'GRAY'}
>
{REVIEW_STATUS_LABEL_TEXT[reviewStatus]}
</Label>
</S.DeadLineContainer>
Expand Down Expand Up @@ -128,7 +130,10 @@ const S = {
`,

ProfileName: styled.p`
min-width: 50px;
font-size: 14px;
text-align: center;
`,

ChatViewContainer: styled.div`
Expand Down
1 change: 1 addition & 0 deletions frontend/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const REVIEW_STATUS_LABEL_TEXT: { [key in ReviewStatus]: string } = {
NOT_STARTED: '리뷰 대기중',
IN_PROGRESS: '리뷰 진행중',
DONE: '리뷰 완료',
OVERDUE: '마감기한 지남',
};

export const REVIEW_STATUS: ReviewStatus[] = Object.keys(REVIEW_STATUS_LABEL_TEXT) as ReviewStatus[];
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/pages/RunnerPostDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,13 @@ const RunnerPostPage = () => {
</Label>
<S.PostDeadlineContainer>
<S.PostDeadline>{runnerPost.deadline.replace('T', ' ')} 까지</S.PostDeadline>
<S.EditLinkContainer $isOwner={runnerPost.isOwner}>
<S.EditLinkContainer
$isOwner={
runnerPost.isOwner &&
runnerPost.reviewStatus !== 'IN_PROGRESS' &&
runnerPost.reviewStatus !== 'DONE'
}
>
<S.EditLink onClick={openConfirmModal}>삭제</S.EditLink>
</S.EditLinkContainer>
</S.PostDeadlineContainer>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/runnerPost.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type ReviewStatus = 'NOT_STARTED' | 'IN_PROGRESS' | 'DONE';
export type ReviewStatus = 'NOT_STARTED' | 'IN_PROGRESS' | 'DONE' | 'OVERDUE';

export interface GetRunnerPostResponse {
data: RunnerPost[];
Expand Down

0 comments on commit 963bed6

Please sign in to comment.