Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

show draft bounty submissions by default

Steven Tey21ed0e7c0cfd
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
index ab0f47e58f..1eadaaf63a 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submissions-table.tsx
@@ -347,13 +347,13 @@ export function BountySubmissionsTable() {
thClassName: "border-l-0",
tdClassName: "border-l-0",
resourceName: (p) => `submission${p ? "s" : ""}`,
- // if status is not set, we count submitted and approved submissions
+ // if status is not set, we count draft, submitted and approved submissions
// else, we count the submissions for the status
rowCount: searchParams.get("status")
? submissionsCount?.find((s) => s.status === searchParams.get("status"))
?.count || 0
: submissionsCount
- ?.filter((s) => s.status === "submitted" || s.status === "approved")
+ ?.filter((s) => ["draft", "submitted", "approved"].includes(s.status))
.reduce((acc, curr) => acc + curr.count, 0) || 0,
loading: isLoading || isBountyLoading,
error: error ? "Failed to load bounty submissions" : undefined,
diff --git a/apps/web/lib/api/bounties/get-bounty-submissions.ts b/apps/web/lib/api/bounties/get-bounty-submissions.ts
index f57db76ab2..20509cf629 100644
--- a/apps/web/lib/api/bounties/get-bounty-submissions.ts
+++ b/apps/web/lib/api/bounties/get-bounty-submissions.ts
@@ -19,7 +19,7 @@ export async function getBountySubmissions({
where: {
bountyId,
status: status ?? {
- in: ["submitted", "approved"],
+ in: ["draft", "submitted", "approved"],
},
...(groupId && {
programEnrollment: {