Skip to content

adding the Peer Check feature#161

Merged
LijuJacob08 merged 3 commits intomainfrom
ft/peer-check
Jan 28, 2026
Merged

adding the Peer Check feature#161
LijuJacob08 merged 3 commits intomainfrom
ft/peer-check

Conversation

@LijuJacob08
Copy link
Contributor

</SelectTrigger>
<SelectContent>
{users
?.filter((user: User) => user.role === 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem: Magic number 2 for role filtering
Best Practice: Use named constants or enum (e.g., UserRoles.TRANSLATOR)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the above mentioned changes

selectedAssignmentsStatuses,
}) => {
const hasPeerCheckStatus = selectedAssignmentsStatuses.some(
status => status === 'Peer Check' || status === 'peer_check'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
status => status === 'Peer Check' || status === 'peer_check'
status => status === 'Peer Check' || status === ChapterAssignmentStatus.PEER_CHECK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: magic strings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same has been done

@LijuJacob08 LijuJacob08 merged commit 367933d into main Jan 28, 2026
1 check passed
@github-actions github-actions bot deleted the ft/peer-check branch January 28, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Send to Community Review Workflow Create Status System for Chapters Set Peer Checker Create Send Peer Checking Workflow

2 participants