Fix evaluation submission redirect to assignments page
Build and Push Docker Image / build (push) Successful in 9m25s
Details
Build and Push Docker Image / build (push) Successful in 9m25s
Details
The previous code incorrectly tried to extract a project ID from the assignment ID by splitting on '-', which doesn't work with CUIDs. Now redirects to /jury/assignments with a success toast message after submitting an evaluation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
049ac9257f
commit
a1f32597a0
|
|
@ -37,6 +37,7 @@ import {
|
|||
ThumbsDown,
|
||||
} from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
// Define criterion type from the evaluation form JSON
|
||||
interface Criterion {
|
||||
|
|
@ -186,8 +187,10 @@ export function EvaluationForm({
|
|||
// Invalidate queries and redirect
|
||||
utils.assignment.myAssignments.invalidate()
|
||||
|
||||
toast.success('Evaluation submitted successfully!')
|
||||
|
||||
startTransition(() => {
|
||||
router.push(`/jury/projects/${assignmentId.split('-')[0]}/evaluation`)
|
||||
router.push('/jury/assignments')
|
||||
router.refresh()
|
||||
})
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue