versao compilada
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-10-15 17:37:00 +02:00
parent 9a96ee8dfe
commit c13f250b87
935 changed files with 210656 additions and 272 deletions
@@ -272,6 +272,49 @@ export default function BusinessWizard({
publicTitle,
});
const dirty = serialized !== saved.current;
const submissionBlockers: string[] = [];
if (busy)
submissionBlockers.push(
t('Aguarde que a gravação termine.', 'Wait for saving to finish.'),
);
if (!consent)
submissionBlockers.push(
t(
'Marque a confirmação de exactidão e autorização de análise interna, junto ao código.',
'Check the accuracy and internal review consent box beside the code.',
),
);
if (confirmation !== record.code)
submissionBlockers.push(
confirmation.trim() === record.code
? t(
'Retire os espaços antes ou depois do código MNE.',
'Remove spaces before or after the MNE code.',
)
: t(
'Introduza o código MNE completo mostrado no topo desta página, incluindo MNE- e os hífenes.',
'Enter the full MNE code shown at the top of this page, including MNE- and the hyphens.',
),
);
for (const [key, pt, en] of [
[
'confirm_information',
'Confirme que a informação corresponde ao que conhece.',
'Confirm that the information reflects your knowledge.',
],
[
'confirm_disclosure_authority',
'Confirme que tem autorização para apresentar a oportunidade e divulgar os conteúdos seleccionados.',
'Confirm your authority to present the opportunity and disclose the selected content.',
],
[
'confirm_no_publication_guarantee',
'Confirme que compreende que a submissão não constitui publicação, aprovação oficial ou garantia de investimento.',
'Confirm that submission does not constitute publication, official approval or an investment guarantee.',
],
]) {
if (payload[key] !== 'yes') submissionBlockers.push(t(pt, en));
}
const save = useCallback(async () => {
if (inFlight.current) return false;
if (serialized === saved.current) return true;
@@ -1126,10 +1169,41 @@ export default function BusinessWizard({
onChange={(e) =>
setConfirmation(e.target.value)
}
aria-describedby="business-submission-requirements"
/>
</Field>
<div
id="business-submission-requirements"
role="status"
aria-live="polite"
className="rounded border p-3"
>
{submissionBlockers.length > 0 ? (
<>
<p className="font-semibold">
{t(
'Para disponibilizar o botão de submissão:',
'To enable the submission button:',
)}
</p>
<ul className="list-disc pl-6">
{submissionBlockers.map((message) => (
<li key={message}>{message}</li>
))}
</ul>
</>
) : (
<p>
{t(
'Confirmações preenchidas. Pode submeter para análise.',
'Confirmations completed. You can submit for review.',
)}
</p>
)}
</div>
<button
className={button}
aria-describedby="business-submission-requirements"
disabled={
busy ||
!consent ||