From bb78c9b56fbd114909bb5871a969e1bbf2f7227f Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 21 Sep 2026 02:27:13 +0200 Subject: [PATCH] feat(card): distinguish anonymous submissions on the card page Phase 8a Task 13. CardSubmittedBy renders nothing for 'owner', 'Requested' for 'client', and 'Submitted via public link' for 'anonymous'. Renders nothing once the card is accepted. Replaces the inline client-only check on the card detail page. --- .../[projectSlug]/c/[cardId]/page.tsx | 11 +++-- src/components/card/card-submitted-by.tsx | 44 +++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 src/components/card/card-submitted-by.tsx diff --git a/src/app/p/[clientSlug]/[projectSlug]/c/[cardId]/page.tsx b/src/app/p/[clientSlug]/[projectSlug]/c/[cardId]/page.tsx index 3f6666d..78d4ab0 100644 --- a/src/app/p/[clientSlug]/[projectSlug]/c/[cardId]/page.tsx +++ b/src/app/p/[clientSlug]/[projectSlug]/c/[cardId]/page.tsx @@ -13,6 +13,7 @@ import { SubtaskList } from "@/components/card/subtask-list"; import { CommentThread } from "@/components/card/comment-thread"; import { ActivityTimeline } from "@/components/card/activity-timeline"; import { Pill } from "@/components/ui/pill"; +import { CardSubmittedBy } from "@/components/card/card-submitted-by"; import { getSession } from "@/lib/auth/session"; import { loadCardDetail } from "@/lib/data/card"; @@ -54,10 +55,12 @@ export default async function CardPage({ Back to board {detail.column.name} - {!detail.card.accepted && - detail.card.created_by_role === "client" && ( - Requested - )} + {!detail.card.accepted && ( + + )} + + Submitted via public link + + ); + } + + return ( + + + Requested + + ); +}