Conversation
| </SelectTrigger> | ||
| <SelectContent> | ||
| {users | ||
| ?.filter((user: User) => user.role === 2) |
There was a problem hiding this comment.
Problem: Magic number 2 for role filtering
Best Practice: Use named constants or enum (e.g., UserRoles.TRANSLATOR)
There was a problem hiding this comment.
added the above mentioned changes
| selectedAssignmentsStatuses, | ||
| }) => { | ||
| const hasPeerCheckStatus = selectedAssignmentsStatuses.some( | ||
| status => status === 'Peer Check' || status === 'peer_check' |
There was a problem hiding this comment.
Problem: Magic string 'peer_check' for status filtering and checks
Best Practice: Use named constants or enum (e.g., ChapterAssignmentStatus.TRANSLATOR)
Define enum in types.ts or other sensible location.
| status => status === 'Peer Check' || status === 'peer_check' | |
| status => status === 'Peer Check' || status === ChapterAssignmentStatus.PEER_CHECK |
There was a problem hiding this comment.
had removed status === 'Peer Check' logic, currently made changes in the backend which will return status in a magic string, which is now handled via enum.
| status => status === 'Peer Check' || status === 'peer_check' | ||
| ); | ||
| const hasCommunityReviewStatus = selectedAssignmentsStatuses.some( | ||
| status => status === 'Community Review' || status === 'community_review' |
There was a problem hiding this comment.
Same as above: magic strings.
There was a problem hiding this comment.
same has been done
The following is the list of issues covered in this PR: