diff --git a/web/src/app/submissions/[submissionId]/_reviewButtons.tsx b/web/src/app/submissions/[submissionId]/_reviewButtons.tsx index 44c6e9c..822327c 100644 --- a/web/src/app/submissions/[submissionId]/_reviewButtons.tsx +++ b/web/src/app/submissions/[submissionId]/_reviewButtons.tsx @@ -1,12 +1,12 @@ import { Button, ButtonOwnProps } from "@mui/material"; -type Actions = "Completed" | "Submit" | "Reject" | "Revoke" | "Reset Uploading (fix softlocked status)" | "Reset Validating (fix softlocked status)" -type Review = Actions | "Accept" | "Validate" | "Upload" -type Action = Lowercase<Actions> | "trigger-validate" | "retry-validate" | "trigger-upload" | "reset-uploading" | "reset-validating" +type Actions = "Completed" | "Submit" | "Reject" | "Revoke" +type ApiActions = Lowercase<Actions> | "trigger-validate" | "retry-validate" | "trigger-upload" | "reset-uploading" | "reset-validating" +type Review = Actions | "Accept" | "Validate" | "Upload" | "Reset Uploading (fix softlocked status)" | "Reset Validating (fix softlocked status)" | "Request Changes" interface ReviewButton { name: Review, - action: Action, + action: ApiActions, submissionId: string, color: ButtonOwnProps["color"] } @@ -15,7 +15,7 @@ interface ReviewId { submissionId: string } -async function ReviewButtonClicked(action: Action, submissionId: string) { +async function ReviewButtonClicked(action: ApiActions, submissionId: string) { try { const response = await fetch(`/api/submissions/${submissionId}/status/${action}`, { method: "POST",