-
Notifications
You must be signed in to change notification settings - Fork 21
fix(PM-3216, PM-2573): dont show edit manager comment to reviewer and filter reviews which are failed screening #1382
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,10 @@ import { hasSubmitterPassedThreshold } from '../../utils/reviewScoring' | |
| interface Props { | ||
| aiReviewers?: { aiWorkflowId: string }[] | ||
| selectedTab: string | ||
| screeningOutcome: { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
| failingSubmissionIds: Set<string>; | ||
| passingSubmissionIds: Set<string>; | ||
| } | ||
| reviews: SubmissionInfo[] | ||
| submitterReviews: SubmissionInfo[] | ||
| reviewMinimumPassingScore?: number | null | ||
|
|
@@ -636,6 +640,7 @@ export const TabContentReview: FC<Props> = (props: Props) => { | |
| }, | ||
| [resolvedReviewsWithSubmitter], | ||
| ) | ||
|
|
||
| const filteredSubmitterReviews = useMemo( | ||
| () => { | ||
| if (!resolvedSubmitterReviews.length) { | ||
|
|
@@ -729,6 +734,7 @@ export const TabContentReview: FC<Props> = (props: Props) => { | |
| <TableReview | ||
| aiReviewers={props.aiReviewers} | ||
| datas={reviewRows} | ||
| screeningOutcome={props.screeningOutcome} | ||
| isDownloading={props.isDownloading} | ||
| downloadSubmission={props.downloadSubmission} | ||
| mappingReviewAppeal={props.mappingReviewAppeal} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,7 +119,7 @@ const ReviewManagerComment: FC<ReviewManagerCommentProps> = props => { | |
| <div className={styles.content}> | ||
| <MarkdownReview value={comment} /> | ||
| </div> | ||
| {isManagerEdit && ( | ||
| {isManagerEdit && canAddManagerComment && ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| <button | ||
| type='button' | ||
| onClick={handleShowCommentForm} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,10 @@ export interface TableReviewProps { | |
| aiReviewers?: { aiWorkflowId: string }[] | ||
| className?: string | ||
| datas: SubmissionInfo[] | ||
| screeningOutcome: { | ||
| failingSubmissionIds: Set<string>; | ||
| passingSubmissionIds: Set<string>; | ||
| } | ||
| isDownloading: IsRemovingType | ||
| downloadSubmission: (submissionId: string) => void | ||
| mappingReviewAppeal: MappingReviewAppeal | ||
|
|
@@ -230,9 +234,20 @@ export const TableReview: FC<TableReviewProps> = (props: TableReviewProps) => { | |
| [myReviewerResourceIds], | ||
| ) | ||
|
|
||
| const filterScreeningPassedReviews = useCallback( | ||
| (submissions: SubmissionInfo[]): SubmissionInfo[] => submissions.filter( | ||
| submission => props.screeningOutcome.passingSubmissionIds.has(submission.id ?? ''), | ||
| ), | ||
| [props.screeningOutcome.passingSubmissionIds], | ||
| ) | ||
|
|
||
| const submissionsForAggregation = useMemo<SubmissionInfo[]>( | ||
| () => (restrictToLatest ? latestSubmissions : reviewPhaseDatas), | ||
| [latestSubmissions, restrictToLatest, reviewPhaseDatas], | ||
| () => ( | ||
| restrictToLatest | ||
| ? filterScreeningPassedReviews(latestSubmissions) | ||
| : filterScreeningPassedReviews(reviewPhaseDatas) | ||
| ), | ||
| [latestSubmissions, restrictToLatest, reviewPhaseDatas, filterScreeningPassedReviews], | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| ) | ||
|
|
||
| const aggregatedSubmissionRows = useMemo<AggregatedSubmissionReviews[]>(() => ( | ||
|
|
||
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.
[⚠️
correctness]The
screeningOutcomevariable is being passed to theTabContentReviewcomponent. Ensure that this component is designed to handle the newscreeningOutcomeprop correctly, especially if it wasn't previously expecting this data. This could impact the component's behavior if not handled properly.