-
Notifications
You must be signed in to change notification settings - Fork 1
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
add partial approve related logic in funding detail frame #1403
add partial approve related logic in funding detail frame #1403
Conversation
@@ -153,15 +153,24 @@ const FundingDetailFrame: React.FC<FundingDetailFrameProps> = ({ clubId }) => { | |||
} | |||
optional={ | |||
funding.comments && | |||
funding.comments.length > 0 && ( | |||
funding.comments.length > 0 && | |||
(funding.fundingStatusEnum === FundingStatusEnum.Partial ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funding.comments[].fundingStatusEnum을 봐야하지 않을까요?
댓글이 여러개일때 어떤건 반려, 어떤건 부분승인 일수 있을거 같음. 그리고 지원금 쪽은 승인도 댓글 달 수 있을걸.? @Gerbera3090 확인 필요
return ( | ||
<ApproveReasonToast | ||
title="코멘트" | ||
reasons={comments.map(comment => ({ | ||
datetime: comment.createdAt, | ||
reason: comment.content, | ||
status: | ||
comment.fundingStatusEnum === FundingStatusEnum.Partial | ||
? `${getTagDetail(comment.fundingStatusEnum, FundingTagList).text}승인` | ||
: getTagDetail(comment.fundingStatusEnum, FundingTagList).text, | ||
}))} | ||
/> | ||
); | ||
}, [comments, status]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가장 최신 커멘트의 상태에 따라 ApproveReasonToast, RejectReasonToast, (+ 운위나 부분 승인도?) 으로 감싸면 어떨까?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그 가장 최신 커멘트의 상태가 funding.fundingStatusEnum 아냐?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금 funding 상세조회 api 에서 보내주는 fundingStatusEnum(comment 안에 statusEnum 말고) 기준으로 rejected이면 RejectReasonToast(빨간색), 그 외의 나머지 케이스에는 ApproveReasonToast(초록색) 로 했는데
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
으악.. 코드를 반만 읽었나.. 그렇네요!
운위도 따로 만들면 좋을 것 같긴 한데, 일단 그건 집행부 쪽 할때 같이 하는걸로!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
커멘트 하나 말고는 lgtm 입니다 👍
요약 *
It closes #1402
스크린샷
이후 Task *