The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
small bounty submission fixes
Steven Teye73e304365f7
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-status-badges.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-status-badges.tsindex 8a80f4e159..66ae0a58eb 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-status-badges.ts+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/[bountyId]/bounty-submission-status-badges.ts@@ -10,13 +10,13 @@ export const BOUNTY_SUBMISSION_STATUS_BADGES = {label: "In progress",variant: "pending",icon: CircleHalfDottedCheck,- iconClassName: "text-blue-600",+ iconClassName: "text-orange-600",},submitted: {label: "Submitted",variant: "new",icon: CircleHalfDottedClock,- iconClassName: "text-orange-600",+ iconClassName: "text-blue-600",},approved: {label: "Approved",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.tsxindex 6be3ae719f..ebe36c929f 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@@ -54,16 +54,16 @@ export function BountySubmissionsTable() {// Decide the columns to show based on the bounty typeconst showColumns = useMemo(() => {- const columns = ["partner", "group", "createdAt", "status"];+ const columns = ["partner", "group", "status"];if (!bounty) {return columns;}if (bounty.type === "submission") {- columns.push(...["reviewedAt"]);+ columns.push(...["createdAt", "reviewedAt"]);} else if (bounty.type === "performance") {- columns.push(...["performanceMetrics"]);+ columns.push(...["completedAt", "performanceMetrics"]);}return columns;@@ -180,17 +180,37 @@ export function BountySubmissionsTable() {]: []),- {- id: "createdAt",- header: bounty?.type === "submission" ? "Submitted" : "Completed",- accessorFn: (d: BountySubmissionProps) => {- if (!d.createdAt || d.status === "draft") {- return "-";- }+ ...(showColumns.includes("createdAt")+ ? [+ {+ id: "createdAt",+ header: "Submitted",+ accessorFn: (d: BountySubmissionProps) => {+ if (!d.createdAt || d.status === "draft") {+ return "-";+ }- return formatDate(d.createdAt, { month: "short" });- },- },+ return formatDate(d.createdAt, { month: "short" });+ },+ },+ ]+ : []),++ ...(showColumns.includes("completedAt")+ ? [+ {+ id: "completedAt",+ header: "Completed",+ accessorFn: (d: BountySubmissionProps) => {+ if (!d.commission) {+ return "-";+ }++ return formatDate(d.commission.createdAt, { month: "short" });+ },+ },+ ]+ : []),...(showColumns.includes("performanceMetrics")? [diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsxindex 66134172d5..4e012a313f 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx@@ -94,7 +94,7 @@ export function BountyCard({ bounty }: { bounty: BountyListProps }) {<span className="text-content-default">{nFormatter(totalPartnersForBounty, { full: true })}</span>{" "}- {pluralize("partner", totalPartnersForBounty)} completed+ {pluralize("partner", totalPartnersForBounty)} submitted</div></div></div>diff --git a/apps/web/lib/zod/schemas/bounties.ts b/apps/web/lib/zod/schemas/bounties.tsindex 0d485340cd..ad980f928e 100644--- a/apps/web/lib/zod/schemas/bounties.ts+++ b/apps/web/lib/zod/schemas/bounties.ts@@ -145,6 +145,7 @@ export const BountySubmissionExtendedSchema = BountySubmissionSchema.extend({amount: true,earnings: true,status: true,+ createdAt: true,}).nullable(),user: UserSchema.pick({id: true,