-
Notifications
You must be signed in to change notification settings - Fork 21
fix(PM-3141): Respond to appeals #1366
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
da81018
5a25ed2
d216fde
b111246
548b0c4
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 |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ export function getReviewRoute( | |
| ? `${prefix}/${match[1]}/${match[2]}` | ||
| : `/${match[1]}/${match[2]}` | ||
|
|
||
| return `${basePath}/reviews/${submissionId}?reviewId=${encodedReviewId}` | ||
| return `${basePath}/reviews/${submissionId}?reviewId=${encodedReviewId}&respondToAppeals=true` | ||
|
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. [❗❗ |
||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| import { mutate } from 'swr' | ||
| import { FC, useCallback, useEffect, useMemo, useState } from 'react' | ||
| import { useSearchParams } from 'react-router-dom' | ||
|
|
||
| import { ChallengeLinksForAdmin } from '~/apps/review/src/lib/components/ChallengeLinksForAdmin' | ||
| import { ScorecardViewer } from '~/apps/review/src/lib/components/Scorecard' | ||
|
|
@@ -25,6 +26,8 @@ import styles from './ReviewViewer.module.scss' | |
|
|
||
| const ReviewViewer: FC = () => { | ||
| const navigate = useAppNavigate() | ||
| const [searchParams] = useSearchParams() | ||
| const [respondToAppeals, setRespondToAppeals] = useState(searchParams.get('respondToAppeals') === 'true') | ||
| const { | ||
| reviewId, | ||
| setReviewStatus, | ||
|
|
@@ -205,8 +208,11 @@ const ReviewViewer: FC = () => { | |
| useEffect(() => { | ||
| if (!canEditScorecard && isManagerEdit) { | ||
| setIsManagerEdit(false) | ||
| } else if (!isManagerEdit && respondToAppeals) { | ||
| setIsManagerEdit(true) | ||
| setRespondToAppeals(false) | ||
| } | ||
| }, [canEditScorecard, isManagerEdit]) | ||
| }, [canEditScorecard, isManagerEdit, respondToAppeals]) | ||
|
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 toggleManagerEdit = useCallback(() => { | ||
| setIsManagerEdit(prev => !prev) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.