Skip to content

PM-4314 Fix Submission locked text#1541

Merged
kkartunov merged 2 commits intodevfrom
PM-4314
Mar 18, 2026
Merged

PM-4314 Fix Submission locked text#1541
kkartunov merged 2 commits intodevfrom
PM-4314

Conversation

@himaniraghav3
Copy link
Collaborator

@himaniraghav3 himaniraghav3 commented Mar 18, 2026

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-4314

What's in this PR?

Fixes text based on roles


Open with Devin

const loading = isLoading || isLoadingAiReviewConfig || isLoadingAiReviewDecisions

const { isAdmin }: UseRolePermissionsResult = useRolePermissions()
const rolePermissions: UseRolePermissionsResult = useRolePermissions()

Choose a reason for hiding this comment

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

[💡 maintainability]
The variable rolePermissions is assigned but only used to destructure isAdmin and hasSubmitterRole. Consider destructuring directly from useRolePermissions() to avoid unnecessary variable assignment.

+ 'Improve your submission and resubmit.'
}, [currentDecision?.submissionLocked, failedGatingReviewers])
// Message text varies by role
const roleBasedText = hasSubmitterRole

Choose a reason for hiding this comment

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

[💡 readability]
The roleBasedText variable contains a multiline string. Consider using template literals with consistent indentation for better readability.

// Message text varies by role
const roleBasedText = hasSubmitterRole
? `This submission is automatically failed regardless of Overall Score.
Improve your submission and resubmit.`

Choose a reason for hiding this comment

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

[💡 readability]
The string concatenation in roleBasedText could be simplified by using template literals for better readability.

devin-ai-integration[bot]

This comment was marked as resolved.

github-actions[bot]

This comment was marked as resolved.

@kkartunov kkartunov merged commit ac7ee68 into dev Mar 18, 2026
9 checks passed
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.

2 participants