feat: add nonblocking optional narrative guidance for V14 in QA

This commit is contained in:
2026-11-21 20:35:31 +02:00
parent e239a31a76
commit f5dbd55dfb
22 changed files with 661 additions and 1 deletions
@@ -14,6 +14,7 @@ export const defaultPlanWarningLimits: PlanWarningLimits = {
};
export type PlanWarning = { id: string; message: string };
export type PlanWarningMetrics = {
optionalTexts?: { label: string; value: string }[];
fundingGap?: number;
currency?: string;
netProfit?: number;
@@ -36,6 +37,11 @@ export function businessPlanWarnings(
): PlanWarning[] {
const warnings: PlanWarning[] = [];
const add = (id: string, message: string) => warnings.push({ id, message });
if (metrics.optionalTexts?.some((field) => !field.value.trim()))
add(
'optional-texts',
'Pode completar estas secções para um relatório mais convincente.',
);
if ((metrics.fundingGap ?? 0) > 0)
add(
'funding',