Integrate supplied institutions by location category and type through investor dossiers
This commit is contained in:
@@ -27,6 +27,7 @@ export function FundingDossierChoice({
|
||||
}) {
|
||||
const [need, setNeed] = useState(selection.need ?? '');
|
||||
const [product, setProduct] = useState('');
|
||||
const [location, setLocation] = useState('');
|
||||
const [consent, setConsent] = useState(false);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [error, setError] = useState('');
|
||||
@@ -42,6 +43,8 @@ export function FundingDossierChoice({
|
||||
version: dossier.version,
|
||||
version_id: record.version_id,
|
||||
product: product || null,
|
||||
location_id: location || null,
|
||||
location_mode: selection.location_mode ?? 'coverage',
|
||||
need,
|
||||
territory: selection.territory,
|
||||
consent,
|
||||
@@ -164,12 +167,46 @@ export function FundingDossierChoice({
|
||||
</select>
|
||||
</label>
|
||||
)}
|
||||
{record.payload.kind === 'institution' && (
|
||||
<label>
|
||||
Sede/balcão a conservar na preparação
|
||||
<select
|
||||
className={input}
|
||||
value={location}
|
||||
onChange={(e) =>
|
||||
setLocation(e.target.value)
|
||||
}
|
||||
>
|
||||
<option value="">
|
||||
Sem local específico seleccionado / por
|
||||
confirmar
|
||||
</option>
|
||||
{(record.payload.locations ?? [])
|
||||
.filter((l) => l.id)
|
||||
.map((l) => (
|
||||
<option key={l.id} value={l.id}>
|
||||
{l.label} ·{' '}
|
||||
{l.location_text ||
|
||||
l.territory_path
|
||||
?.map((n) => n.name)
|
||||
.join(' / ') ||
|
||||
'Local por confirmar'}{' '}
|
||||
·{' '}
|
||||
{l.evidence_status ===
|
||||
'to_confirm'
|
||||
? 'A confirmar'
|
||||
: ''}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
)}
|
||||
<p>
|
||||
Local seleccionado:{' '}
|
||||
{selection.territory
|
||||
? selection.territory_label ||
|
||||
'Conservado da pesquisa; consulte a cobertura do produto.'
|
||||
: 'Volte à pesquisa e escolha a localização antes de guardar.'}
|
||||
: 'Local de interesse por identificar; a referência fica guardada com essa lacuna explícita.'}
|
||||
</p>
|
||||
<label>
|
||||
<input
|
||||
@@ -187,8 +224,7 @@ export function FundingDossierChoice({
|
||||
disabled={
|
||||
busy ||
|
||||
dossier.closed ||
|
||||
(!pending.current &&
|
||||
(!consent || !need || !selection.territory))
|
||||
(!pending.current && (!consent || !need))
|
||||
}
|
||||
onClick={() => void save()}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user