web: implement reset from softlock

This commit is contained in:
Quaternions 2025-03-19 17:49:26 -07:00
parent f52e0a91a2
commit b4be174d98

@ -1,8 +1,8 @@
import { Button, ButtonOwnProps } from "@mui/material";
type Actions = "Completed" | "Submit" | "Reject" | "Revoke"
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" | "trigger-upload"
type Action = Lowercase<Actions> | "trigger-validate" | "trigger-upload" | "reset-uploading" | "reset-validating"
interface ReviewButton {
name: Review,
@ -41,9 +41,11 @@ export default function ReviewButtons(props: ReviewId) {
// Revoke | Submitter | Submitted, ChangesRequested
// Accept | Reviewer | Submitted
// Validate | Reviewer | Accepted
// ResetValidating| Reviewer | Validating
// Reject | Reviewer | Submitted
// RequestChanges | Reviewer | Validated, Accepted, Submitted
// Upload | MapAdmin | Validated
// ResetUploading | MapAdmin | Uploading
return (
<section className="review-set">
<ReviewButton color="info" name="Submit" action="submit" submissionId={submissionId}/>
@ -52,6 +54,8 @@ export default function ReviewButtons(props: ReviewId) {
<ReviewButton color="info" name="Validate" action="trigger-validate" submissionId={submissionId}/>
<ReviewButton color="error" name="Reject" action="reject" submissionId={submissionId}/>
<ReviewButton color="info" name="Upload" action="trigger-upload" submissionId={submissionId}/>
<ReviewButton color="error" name="Reset Uploading (fix softlocked status)" action="reset-uploading" submissionId={submissionId}/>
<ReviewButton color="error" name="Reset Validating (fix softlocked status)" action="reset-validating" submissionId={submissionId}/>
</section>
)
}