diff --git a/components/team-builder.tsx b/components/team-builder.tsx index 9746fac..db66b72 100644 --- a/components/team-builder.tsx +++ b/components/team-builder.tsx @@ -32,8 +32,10 @@ export function TeamBuilder({ type, hopCount, roster, tasks, onQueue }: { const duration = lead ? computeDuration(type, hopCount ?? 0, lead, helpers) : null // CrewDto ⊇ CrewMember const leadReason = (c: CrewDto) => { - const t = tasks.find((x) => x.leadCrewId === c.id && x.status === 'PENDING') - return t ? `${t.type} ALREADY QUEUED` : null + const leads = tasks.find((x) => x.leadCrewId === c.id && x.status === 'PENDING') + if (leads) return `${leads.type} ALREADY QUEUED` + const helps = tasks.find((x) => x.helperCrewIds.includes(c.id) && x.status === 'PENDING') + return helps ? `COMMITTED: ${helps.type}` : null } const helperReason = (c: CrewDto) => { const t = tasks.find((x) => (x.leadCrewId === c.id || x.helperCrewIds.includes(c.id)) && (x.status === 'ACTIVE' || x.status === 'PENDING'))