import { readRows, type ProjectMilestone, type TeamNeed, } from '@/lib/project-dossier'; const teamKeys = [ 'competency', 'state', 'action', 'estimated_cost', 'due_date', ] as const; const milestoneKeys = [ 'title', 'due_date', 'status', 'planned_amount', 'actual_amount', ] as const; function update>( rows: T[], index: number, key: keyof T, value: string, ): T[] { return rows.map((row, i) => (i === index ? { ...row, [key]: value } : row)); } export function ProjectTeamPlanner({ value, onChange, }: { value: string; onChange: (value: string) => void; }) { const rows = readRows(value, teamKeys); const persist = (next: TeamNeed[]) => onChange(JSON.stringify(next)); return (

Registe competências declaradas, lacunas, resposta prevista, custo e prazo. Não é uma certificação nem uma correspondência automática a prestadores.

{rows.map((row, index) => (
Necessidade {index + 1}
))}
); } export function ProjectMilestonePlanner({ value, onChange, }: { value: string; onChange: (value: string) => void; }) { const rows = readRows(value, milestoneKeys); const persist = (next: ProjectMilestone[]) => onChange(JSON.stringify(next)); return (

Compare datas e montantes planeados com o realizado. Estes valores são declarados; não alteram automaticamente o plano financeiro.

{rows.map((row, index) => (
Marco {index + 1}
))}
); }