feat: read-only external attendees strip on applicant dashboard

Adds lunch.getProjectExternals (team-member guarded). Strip auto-hides
when no externals attached to the team.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt
2026-04-29 02:50:15 +02:00
parent df95867465
commit 31b98f6f1e
4 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
'use client'
import { trpc } from '@/lib/trpc/client'
import { Card, CardContent } from '@/components/ui/card'
import { Badge } from '@/components/ui/badge'
import { UsersRound } from 'lucide-react'
export function ExternalAttendeesStrip({ projectId }: { projectId: string }) {
const { data } = trpc.lunch.getProjectExternals.useQuery({ projectId })
if (!data || data.length === 0) return null
return (
<Card>
<CardContent className="flex flex-wrap items-center gap-2 py-3">
<UsersRound className="text-muted-foreground h-4 w-4" />
<span className="text-sm font-medium">External attendees joining your team:</span>
{data.map((e) => (
<Badge key={e.id} variant="outline">
{e.name}
{e.roleNote ? ` (${e.roleNote})` : ''}
</Badge>
))}
</CardContent>
</Card>
)
}