The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
allow reopening rejected submissions
Steven Tey5d73dd225366
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-row-menu.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-row-menu.tsxindex f179e09838..00fadf2248 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-row-menu.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-row-menu.tsx@@ -80,7 +80,7 @@ export function BountySubmissionRowMenu({}}/>- {submission.status === "submitted" && (+ {["submitted", "rejected"].includes(submission.status) && (<MenuItemicon={ArrowsOppositeDirectionX}label="Reopen submission"diff --git a/apps/web/lib/actions/partners/reopen-bounty-submission.ts b/apps/web/lib/actions/partners/reopen-bounty-submission.tsindex 2cfebcf069..b052c00b7a 100644--- a/apps/web/lib/actions/partners/reopen-bounty-submission.ts+++ b/apps/web/lib/actions/partners/reopen-bounty-submission.ts@@ -40,8 +40,8 @@ export const reopenBountySubmissionAction = authActionClientthrow new Error("Bounty submission does not belong to this program.");}- if (bountySubmission.status !== "submitted") {- throw new Error("Bounty submission is not submitted yet.");+ if (bountySubmission.status === "approved") {+ throw new Error("Bounty submission has already been approved.");}await prisma.bountySubmission.update({@@ -50,6 +50,10 @@ export const reopenBountySubmissionAction = authActionClient},data: {status: "draft",+ completedAt: null,+ reviewedAt: null,+ rejectionNote: null,+ rejectionReason: null,},});