fix: correct V13 and public presentation patterns in isolated QA
This commit is contained in:
@@ -2,6 +2,8 @@ import { useEffect, useRef, useState } from 'react';
|
||||
import { router } from '@inertiajs/react';
|
||||
import { control, button } from '@/pages/management/shared';
|
||||
import { valueText } from '@/lib/value-text';
|
||||
import PublicReference from './public-reference';
|
||||
import { publicReference } from '@/lib/public-presentation';
|
||||
|
||||
type Classification = {
|
||||
target_type: string;
|
||||
@@ -49,11 +51,11 @@ const typeLabels: Record<string, string> = {
|
||||
corridor: 'Corredor',
|
||||
location: 'Localização',
|
||||
cluster: 'Cluster',
|
||||
project: 'Projeto âncora',
|
||||
project: 'Projecto âncora',
|
||||
chain: 'Cadeia de valor',
|
||||
zone: 'Zona ou parque',
|
||||
sector: 'Setor',
|
||||
activity: 'Subsector ou atividade',
|
||||
sector: 'Sector',
|
||||
activity: 'Subsector ou actividade',
|
||||
};
|
||||
export const classificationStates: Record<string, string> = {
|
||||
draft: 'Rascunho',
|
||||
@@ -67,8 +69,8 @@ export const classificationStates: Record<string, string> = {
|
||||
const externalLabels: Record<string, string> = {
|
||||
not_assessed: 'Não determinado',
|
||||
pending: 'Pendente',
|
||||
documented_granted: 'Ato de concessão documentado',
|
||||
documented_denied: 'Ato de recusa documentado',
|
||||
documented_granted: 'Acto de concessão documentado',
|
||||
documented_denied: 'Acto de recusa documentado',
|
||||
expired: 'Caducado',
|
||||
};
|
||||
const help =
|
||||
@@ -211,7 +213,7 @@ export function ClassificationEditor({
|
||||
}
|
||||
>
|
||||
<option value="">
|
||||
Selecionar referência
|
||||
Seleccionar referência
|
||||
</option>
|
||||
{row.related_id &&
|
||||
!(
|
||||
@@ -295,7 +297,7 @@ export function ClassificationEditor({
|
||||
}
|
||||
>
|
||||
<option value="">
|
||||
Selecionar finalidade
|
||||
Seleccionar finalidade
|
||||
</option>
|
||||
{Object.entries(
|
||||
options.purposes,
|
||||
@@ -840,7 +842,7 @@ export function ClassificationSummary({
|
||||
territory: 'Enquadramento territorial',
|
||||
production: 'Organização produtiva',
|
||||
regulation: 'Regime regulatório',
|
||||
activity: 'Atividade económica',
|
||||
activity: 'Actividade económica',
|
||||
}).map(([dimension, label]) => (
|
||||
<section key={dimension}>
|
||||
<h3 className="font-semibold">{label}</h3>
|
||||
@@ -861,9 +863,15 @@ export function ClassificationSummary({
|
||||
{classificationStates[r.state] ??
|
||||
'Por determinar'}{' '}
|
||||
· {r.purpose_label ?? r.purpose} ·{' '}
|
||||
{r.source_reference || 'Fonte por indicar'}{' '}
|
||||
{r.citation} {r.production_stage} · Ato
|
||||
externo:{' '}
|
||||
{publicReference(r.source_reference) ? (
|
||||
<PublicReference
|
||||
value={r.source_reference}
|
||||
/>
|
||||
) : (
|
||||
'Referência pública não disponível'
|
||||
)}{' '}
|
||||
{publicReference(r.citation)}{' '}
|
||||
{r.production_stage} · Acto externo:{' '}
|
||||
{externalLabels[r.external_status] ??
|
||||
'Não determinado'}
|
||||
. Benefício ou capacidade disponível: não
|
||||
@@ -935,7 +943,7 @@ export function ClassificationFilters({
|
||||
},
|
||||
{
|
||||
key: 'subsector_id',
|
||||
label: 'Subsector ou atividade publicada',
|
||||
label: 'Subsector ou actividade publicada',
|
||||
choices: (options.targets.activity ?? []).map((r) => [
|
||||
String(r.id),
|
||||
r.label,
|
||||
@@ -962,7 +970,7 @@ export function ClassificationFilters({
|
||||
<legend>Classificação multidimensional — filtros combinados</legend>
|
||||
<p>
|
||||
Os filtros combinam-se por «e». Tipo, referência e finalidade
|
||||
identificam a mesma associação; cadeia, atividade e entidade
|
||||
identificam a mesma associação; cadeia, actividade e entidade
|
||||
podem constar de outras associações da mesma oportunidade. A
|
||||
pesquisa inclui apenas publicações públicas. Os vínculos
|
||||
anteriores continuam nos filtros próprios.
|
||||
|
||||
Reference in New Issue
Block a user