Criar Hotel: a mudança de sector feita pelo investidor no editor continua directa (C10)
tests / ci (push) Canceled after 0s

O sector escolhido pelo próprio investidor no editor do dossier substitui a
actividade, como aprovado em C10; o que chega de outra referência ou da
página de entrada continua a ser só proposta. Retirar a actividade também
passa a exigir a escolha explícita.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MzJmxFy3izprXr5dSq91jM
This commit is contained in:
Claude
2026-12-04 21:11:45 +02:00
committed by nala
parent 7446970c64
commit 2c03a0091e
3 changed files with 26 additions and 5 deletions
+17 -3
View File
@@ -969,9 +969,23 @@ function ScopedContextEditor({
className={input + ' max-w-full min-w-0'}
disabled={busy}
value={selected('sector')}
onChange={(e) =>
change('sector', e.target.value)
}
onChange={(e) => {
change('sector', e.target.value);
// A sector chosen here is the investor's own
// decision (C10): it replaces the activity.
// One arriving from another reference or
// from the entry page stays a proposal.
if (view.context.fields.sector)
setReplace((current) => [
...current.filter(
(key) =>
key !== 'sector_id' &&
key !== 'sector',
),
'sector_id',
'sector',
]);
}}
>
<option value="">Sem sector escolhido</option>
{view.context.selection.sector &&