Criar Hotel: a mudança de sector feita pelo investidor no editor continua directa (C10)
tests / ci (push) Canceled after 0s
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:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user