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
@@ -35,6 +35,16 @@ export function BusinessPlanWarnings({
<p role="status">
<span aria-hidden="true">⚠ </span>
{warning.message}
{warning.id === 'optional-texts' && (
<span className="mt-1 block text-xs">
Secções opcionais em falta:{' '}
{metrics.optionalTexts
?.filter((field) => !field.value.trim())
.map((field) => field.label)
.join(', ')}
.
</span>
)}
</p>
<button
type="button"
@@ -1,3 +1,4 @@
import { BusinessPlanWarnings } from './business-plan-warnings';
import { useEffect, useMemo, useState } from 'react';
import { DossierReportPreview } from './dossier-report-preview';
import {
@@ -114,6 +115,22 @@ function InvestorDossierReportsContent({
return (
<section id="relatorios" className="space-y-4 rounded-xl border p-4">
<h2 className="text-lg font-semibold">Relatórios deste dossier</h2>
{!requiresChoice && (
<BusinessPlanWarnings
metrics={{
optionalTexts: [
{
label: 'SWOT',
value: dossier.preparation_report?.swot.rows.some(
(row) => row.text.trim(),
)
? 'preenchido'
: '',
},
],
}}
/>
)}
<p>
Dossier {dossier.case.title} · versão {dossier.case.version} ·
oportunidade {dossier.context_opportunity ?? 'contexto comum'}.
@@ -1,3 +1,4 @@
import { BusinessPlanWarnings } from './business-plan-warnings';
import {
getProjectReadiness,
readPlannedRiskResponses,
@@ -88,6 +89,26 @@ export function ProjectReadiness({
className="space-y-4"
aria-labelledby="project-readiness-title"
>
<BusinessPlanWarnings
metrics={{
optionalTexts: [
{
label: 'Concorrência',
value:
typeof draft.competitor_assumption === 'string'
? draft.competitor_assumption
: '',
},
{
label: 'Marketing',
value:
typeof draft.marketing_approach === 'string'
? draft.marketing_approach
: '',
},
],
}}
/>
<div>
<h4
id="project-readiness-title"