-
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
Fix minor issues for executive activity #1394
base: dev
Are you sure you want to change the base?
Conversation
@@ -248,30 +254,28 @@ const ActivityReportDetailFrame: React.FC<ActivityReportDetailFrameProps> = ({ | |||
labels={ | |||
getActivityReportProgress( | |||
data.activityStatusEnumId, | |||
data.updatedAt, | |||
data.activityStatusEnumId === 1 |
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.
요런거 숫자 말고 인터페이스에 ActivityStatusEnum 사용하면 좋을 것 같아요
@@ -64,6 +65,7 @@ const useGetActivityReportDetail = ( | |||
|
|||
return { | |||
data: memoizedData, | |||
clubId: activityReport?.clubId ?? 0, |
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.
혹시 요거 memoizedData 에 있는 clubId 그대로 사용하지 않고 따로 뺀 이유가 있나요?
그렇다면 ActivityReportDetailFrame
199 번째 줄의 !("clubId" in data)
이라는 조건을 !clubId 혹은 그냥 아예 지워도 될거 같아요
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.
@@ -226,6 +228,10 @@ const ActivityReportDetailFrame: React.FC<ActivityReportDetailFrameProps> = ({ | |||
return null; | |||
}; | |||
|
|||
const filteredComments = data.comments.filter( |
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.
별거 아니긴 한데 요거 수정페이지 쪽에서도 똑같이 필터하고 있는 것 같고 활동이 승인되었습니다
라는 상수 스트링도 사용하고 있어서 함수로 밖으로 빼는건 어떨까?
data.updatedAt, | ||
data.activityStatusEnumId === 1 | ||
? data.editedAt | ||
: data.commentedAt || data.editedAt, |
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.
홈 뭔가 가독성이 조굼 떨어지는거 같은데 그냥 commentedAt이 있으면 그걸로 없으면 editedAt으로 하면 안되나?
commentedAt 이 있는데 activityStatusEnum이 applied 일 수가 있나?
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.
이미 한 번 검토가 됐는데 다시 수정하면 applied로 바뀌어서 상태가 applied일 때만 editedAt을 보여줘야 하고,
commentedAt은 null이 가능해서 없을 경우에 사용할게 필요해서 updatedAt으로 수정했어
@@ -18,6 +22,12 @@ const useExecutiveApproveActivityReport = (activityId: number) => { | |||
queryClient.invalidateQueries({ | |||
queryKey: activityReportDetailQueryKey("executive", activityId), | |||
}); | |||
queryClient.invalidateQueries({ | |||
queryKey: ["executiveChargedActivities"], |
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.
이거 #1367 에서 써용
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.
그 pr에서 쿼리키 수정한 것 같은데 여기도 하는거죠?
cell: info => formatDateTime(info.getValue()), | ||
cell: info => { | ||
const date = info.getValue(); | ||
return date ? formatDateTime(date) : "-"; |
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.
물어봤는데 commentedAt 오면은 보여주는게 맞대요
요약 *
It closes #1388
스크린샷
이후 Task *