@@ -20,6 +20,22 @@ const emptyParcel = (): Parcel => ({
|
||||
coordinates: '',
|
||||
geometry_confidence: 'unknown',
|
||||
});
|
||||
const requiredLabels: Record<string, string> = {
|
||||
support_kind: 'Pretende apoio para',
|
||||
request_description: 'Descrição do pedido',
|
||||
applicant_category: 'Categoria do requerente',
|
||||
full_name: 'Nome ou denominação',
|
||||
preferred_contact: 'Canal preferido',
|
||||
area_status: 'Situação da localização',
|
||||
purpose: 'Finalidade pretendida',
|
||||
email: 'Email',
|
||||
contact_person: 'Pessoa de contacto',
|
||||
representative_role: 'Função da representação',
|
||||
truth_declaration: 'Declaração de informação',
|
||||
contact_consent: 'Autorização de contacto',
|
||||
country: 'País do requerente',
|
||||
declared_origin_country_code: 'Origem declarada da solicitação',
|
||||
};
|
||||
const emptyPayload = (user: { name: string; email: string }): Payload => ({
|
||||
support_kind: '',
|
||||
request_description: '',
|
||||
@@ -98,6 +114,49 @@ export default function LandForm({
|
||||
[existing?.id],
|
||||
);
|
||||
const form = useForm({ version: existing?.version ?? 1, payload: initial });
|
||||
const [pendingErrorField, setPendingErrorField] = useState<string | null>(
|
||||
null,
|
||||
);
|
||||
useEffect(() => {
|
||||
const first = Object.keys(form.errors)[0];
|
||||
if (!first) return;
|
||||
const field = first.replace(/^payload\./, '').split('.')[0];
|
||||
const errorStep = [
|
||||
'truth_declaration',
|
||||
'contact_consent',
|
||||
'additional_information',
|
||||
].includes(field)
|
||||
? 3
|
||||
: ['exploration_plan', 'consultation'].includes(field)
|
||||
? 2
|
||||
: [
|
||||
'area_status',
|
||||
'parcels',
|
||||
'purpose',
|
||||
'activity',
|
||||
'known_occupants',
|
||||
'known_improvements',
|
||||
'prior_right_status',
|
||||
'conflict_status',
|
||||
'official_process',
|
||||
].includes(field)
|
||||
? 1
|
||||
: 0;
|
||||
setStep(errorStep);
|
||||
setPendingErrorField(field);
|
||||
}, [form.errors]);
|
||||
useEffect(() => {
|
||||
if (!pendingErrorField) return;
|
||||
const timer = window.setTimeout(() => {
|
||||
const target =
|
||||
document.getElementById(`land-field-${pendingErrorField}`) ??
|
||||
document.getElementById('land-error-summary');
|
||||
target?.focus();
|
||||
target?.scrollIntoView({ block: 'center' });
|
||||
setPendingErrorField(null);
|
||||
}, 0);
|
||||
return () => window.clearTimeout(timer);
|
||||
}, [pendingErrorField, step]);
|
||||
const update = (field: string, value: unknown) =>
|
||||
form.setData('payload', { ...form.data.payload, [field]: value });
|
||||
const updateParcel = (index: number, key: string, value: unknown) => {
|
||||
@@ -118,18 +177,28 @@ export default function LandForm({
|
||||
{required ? ' *' : ''}
|
||||
</span>
|
||||
<input
|
||||
id={`land-field-${key}`}
|
||||
className="w-full rounded border p-2"
|
||||
type={type}
|
||||
required={required}
|
||||
value={form.data.payload[key] ?? ''}
|
||||
onChange={(event) => update(key, event.target.value)}
|
||||
aria-invalid={Boolean(form.errors[`payload.${key}`])}
|
||||
aria-describedby={
|
||||
form.errors[`payload.${key}`]
|
||||
? `land-error-${key}`
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
{help && (
|
||||
<span className="block text-xs text-slate-600">{help}</span>
|
||||
)}
|
||||
{form.errors[`payload.${key}`] && (
|
||||
<span role="alert" className="text-sm text-red-700">
|
||||
<span
|
||||
id={`land-error-${key}`}
|
||||
role="alert"
|
||||
className="text-sm text-red-700"
|
||||
>
|
||||
{form.errors[`payload.${key}`]}
|
||||
</span>
|
||||
)}
|
||||
@@ -209,6 +278,15 @@ export default function LandForm({
|
||||
Pretende apoio para *
|
||||
</span>
|
||||
<select
|
||||
id="land-field-support_kind"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.support_kind'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.support_kind']
|
||||
? 'land-error-support_kind'
|
||||
: undefined
|
||||
}
|
||||
className="w-full rounded border p-2"
|
||||
required
|
||||
value={current.support_kind ?? ''}
|
||||
@@ -226,6 +304,15 @@ export default function LandForm({
|
||||
)}
|
||||
</select>
|
||||
</label>
|
||||
{form.errors['payload.support_kind'] && (
|
||||
<p
|
||||
id="land-error-support_kind"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.support_kind']}
|
||||
</p>
|
||||
)}
|
||||
{text('request_description', 'Descrição do pedido', true)}
|
||||
{text(
|
||||
'project_reference',
|
||||
@@ -238,6 +325,15 @@ export default function LandForm({
|
||||
<select
|
||||
className="w-full rounded border p-2"
|
||||
required
|
||||
id="land-field-applicant_category"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.applicant_category'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.applicant_category']
|
||||
? 'land-error-applicant_category'
|
||||
: undefined
|
||||
}
|
||||
value={current.applicant_category ?? ''}
|
||||
onChange={(event) =>
|
||||
update('applicant_category', event.target.value)
|
||||
@@ -250,6 +346,15 @@ export default function LandForm({
|
||||
<option value="other">Outra</option>
|
||||
</select>
|
||||
</label>
|
||||
{form.errors['payload.applicant_category'] && (
|
||||
<p
|
||||
id="land-error-applicant_category"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.applicant_category']}
|
||||
</p>
|
||||
)}
|
||||
{text('full_name', 'Nome ou denominação', true)}
|
||||
{category === 'community' &&
|
||||
text(
|
||||
@@ -266,6 +371,15 @@ export default function LandForm({
|
||||
className="w-full rounded border p-2"
|
||||
required
|
||||
value={current.preferred_contact ?? ''}
|
||||
id="land-field-preferred_contact"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.preferred_contact'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.preferred_contact']
|
||||
? 'land-error-preferred_contact'
|
||||
: undefined
|
||||
}
|
||||
onChange={(event) =>
|
||||
update('preferred_contact', event.target.value)
|
||||
}
|
||||
@@ -276,32 +390,46 @@ export default function LandForm({
|
||||
<option value="any">Qualquer um indicado</option>
|
||||
</select>
|
||||
</label>
|
||||
<CountrySelect
|
||||
countries={countries}
|
||||
value={current.country ?? ''}
|
||||
onChange={(value) => update('country', value)}
|
||||
label="País, se aplicável"
|
||||
allowLegacyValue
|
||||
/>
|
||||
<CountrySelect
|
||||
countries={countries}
|
||||
value={current.declared_origin_country_code ?? ''}
|
||||
onChange={(value) =>
|
||||
update('declared_origin_country_code', value)
|
||||
}
|
||||
label="País de origem declarado da solicitação (opcional)"
|
||||
/>
|
||||
{(form.errors['payload.country'] ||
|
||||
form.errors[
|
||||
'payload.declared_origin_country_code'
|
||||
]) && (
|
||||
<p role="alert">
|
||||
{form.errors['payload.country'] ??
|
||||
form.errors[
|
||||
'payload.declared_origin_country_code'
|
||||
]}
|
||||
{form.errors['payload.preferred_contact'] && (
|
||||
<p
|
||||
id="land-error-preferred_contact"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.preferred_contact']}
|
||||
</p>
|
||||
)}
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium">
|
||||
País do requerente (opcional)
|
||||
</p>
|
||||
<CountrySelect
|
||||
countries={countries}
|
||||
value={current.country ?? ''}
|
||||
onChange={(value) => update('country', value)}
|
||||
label="País do requerente (opcional)"
|
||||
error={form.errors['payload.country']}
|
||||
allowLegacyValue
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm font-medium">
|
||||
País de origem declarado da solicitação (opcional)
|
||||
</p>
|
||||
<CountrySelect
|
||||
countries={countries}
|
||||
value={current.declared_origin_country_code ?? ''}
|
||||
onChange={(value) =>
|
||||
update('declared_origin_country_code', value)
|
||||
}
|
||||
label="País de origem declarado da solicitação (opcional)"
|
||||
error={
|
||||
form.errors[
|
||||
'payload.declared_origin_country_code'
|
||||
]
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{text('nationality', 'Nacionalidade, se aplicável')}
|
||||
{category === 'entity' && (
|
||||
<>
|
||||
@@ -339,6 +467,15 @@ export default function LandForm({
|
||||
className="w-full rounded border p-2"
|
||||
required
|
||||
value={current.area_status ?? ''}
|
||||
id="land-field-area_status"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.area_status'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.area_status']
|
||||
? 'land-error-area_status'
|
||||
: undefined
|
||||
}
|
||||
onChange={(event) =>
|
||||
update('area_status', event.target.value)
|
||||
}
|
||||
@@ -356,6 +493,15 @@ export default function LandForm({
|
||||
<option value="unknown">Ainda não sei</option>
|
||||
</select>
|
||||
</label>
|
||||
{form.errors['payload.area_status'] && (
|
||||
<p
|
||||
id="land-error-area_status"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.area_status']}
|
||||
</p>
|
||||
)}
|
||||
{current.area_status !== 'seeking' &&
|
||||
current.area_status !== 'unknown' &&
|
||||
(current.parcels ?? []).map(
|
||||
@@ -953,6 +1099,15 @@ export default function LandForm({
|
||||
<label className="flex gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="land-field-truth_declaration"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.truth_declaration'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.truth_declaration']
|
||||
? 'land-error-truth_declaration'
|
||||
: undefined
|
||||
}
|
||||
checked={Boolean(current.truth_declaration)}
|
||||
onChange={(e) =>
|
||||
update('truth_declaration', e.target.checked)
|
||||
@@ -961,9 +1116,27 @@ export default function LandForm({
|
||||
Confirmo que as respostas correspondem à informação de
|
||||
que disponho e assinalei dúvidas conhecidas.
|
||||
</label>
|
||||
{form.errors['payload.truth_declaration'] && (
|
||||
<p
|
||||
id="land-error-truth_declaration"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.truth_declaration']}
|
||||
</p>
|
||||
)}
|
||||
<label className="flex gap-2">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="land-field-contact_consent"
|
||||
aria-invalid={Boolean(
|
||||
form.errors['payload.contact_consent'],
|
||||
)}
|
||||
aria-describedby={
|
||||
form.errors['payload.contact_consent']
|
||||
? 'land-error-contact_consent'
|
||||
: undefined
|
||||
}
|
||||
checked={Boolean(current.contact_consent)}
|
||||
onChange={(e) =>
|
||||
update('contact_consent', e.target.checked)
|
||||
@@ -972,6 +1145,15 @@ export default function LandForm({
|
||||
Autorizo o contacto para responder a este pedido. Esta
|
||||
autorização não permite publicação dos documentos.
|
||||
</label>
|
||||
{form.errors['payload.contact_consent'] && (
|
||||
<p
|
||||
id="land-error-contact_consent"
|
||||
role="alert"
|
||||
className="text-red-700"
|
||||
>
|
||||
{form.errors['payload.contact_consent']}
|
||||
</p>
|
||||
)}
|
||||
<p className="rounded bg-amber-50 p-3 text-sm">
|
||||
Ainda não carregue actas, documentos de identidade ou
|
||||
informações sensíveis que não sejam necessárias à
|
||||
@@ -1033,11 +1215,21 @@ export default function LandForm({
|
||||
</div>
|
||||
</footer>
|
||||
{Object.keys(form.errors).length > 0 && (
|
||||
<div role="alert" className="rounded border border-red-500 p-3">
|
||||
<div
|
||||
id="land-error-summary"
|
||||
tabIndex={-1}
|
||||
role="alert"
|
||||
className="rounded border border-red-500 p-3"
|
||||
>
|
||||
<p>Revise os campos assinalados antes de continuar.</p>
|
||||
<ul>
|
||||
{Object.entries(form.errors).map(([key, value]) => (
|
||||
<li key={key}>{String(value)}</li>
|
||||
<li key={key}>
|
||||
{requiredLabels[
|
||||
key.replace(/^payload\./, '')
|
||||
] ?? 'Campo assinalado'}
|
||||
: {String(value)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -9,26 +9,33 @@ type Props = {
|
||||
};
|
||||
disclaimer: string;
|
||||
modelVersion: string;
|
||||
country: { code: string | null; name: string };
|
||||
declaredOrigin: { code: string | null; name: string };
|
||||
};
|
||||
export default function PrintCase({
|
||||
case: record,
|
||||
disclaimer,
|
||||
modelVersion,
|
||||
country,
|
||||
declaredOrigin,
|
||||
}: Props) {
|
||||
const p = record.payload ?? {};
|
||||
const text = (value: unknown): string =>
|
||||
value === null || value === undefined || value === ''
|
||||
? '—'
|
||||
? '—'
|
||||
: Array.isArray(value)
|
||||
? value.map(text).join(', ')
|
||||
: typeof value === 'object'
|
||||
? Object.values(value as Record<string, unknown>)
|
||||
.map(text)
|
||||
.filter((x) => x !== '—')
|
||||
.join(' · ')
|
||||
.filter((x) => x !== '—')
|
||||
.join(' · ')
|
||||
: displayValue(value);
|
||||
return (
|
||||
<main className="mx-auto max-w-4xl space-y-5 p-8 print:max-w-none print:p-0">
|
||||
<main
|
||||
data-land-print
|
||||
className="mx-auto max-w-4xl space-y-5 p-8 print:max-w-none print:p-0"
|
||||
>
|
||||
<div className="flex justify-end print:hidden">
|
||||
<button
|
||||
className="rounded border px-4 py-2"
|
||||
@@ -38,35 +45,49 @@ export default function PrintCase({
|
||||
</button>
|
||||
</div>
|
||||
<header className="space-y-2 border-b pb-4">
|
||||
<p>InvestMoz · modelo de preparação · {modelVersion}</p>
|
||||
<p>InvestMoz · modelo de preparação · {modelVersion}</p>
|
||||
<h1 className="text-2xl font-bold">
|
||||
Terra e DUAT — dados preenchidos pelo requerente
|
||||
Terra e DUAT — dados preenchidos pelo requerente
|
||||
</h1>
|
||||
<p>
|
||||
Referência interna: {record.reference} · versão{' '}
|
||||
{record.version} · actualizada em{' '}
|
||||
Referência interna: {record.reference} · versão{' '}
|
||||
{record.version} · actualizada em{' '}
|
||||
{new Date(record.updated_at).toLocaleString('pt-MZ')}
|
||||
</p>
|
||||
<p className="font-semibold">{disclaimer}</p>
|
||||
<p>
|
||||
Esta cópia reflecte os dados guardados no InvestMoz e não
|
||||
é requerimento oficialmente recebido, tÃtulo, parecer,
|
||||
prova de consulta ou decisão.
|
||||
Esta cópia reflecte os dados guardados no InvestMoz e não é
|
||||
requerimento oficialmente recebido, título, parecer, prova
|
||||
de consulta ou decisão.
|
||||
</p>
|
||||
</header>
|
||||
<Section title="A. Pedido e requerente">
|
||||
{[
|
||||
['Tipo de apoio', p.support_kind],
|
||||
['Descrição', p.request_description],
|
||||
['Descrição', p.request_description],
|
||||
['Projecto/oportunidade', p.project_reference],
|
||||
['Categoria', p.applicant_category],
|
||||
['Nome/denominação', p.full_name],
|
||||
['Nome/denominação', p.full_name],
|
||||
[
|
||||
'País do requerente',
|
||||
country.code
|
||||
? `${country.name} (${country.code})`
|
||||
: p.country
|
||||
? `${p.country} (valor anteriormente registado)`
|
||||
: country.name,
|
||||
],
|
||||
[
|
||||
'Origem declarada desta solicitação',
|
||||
declaredOrigin.code
|
||||
? `${declaredOrigin.name} (${declaredOrigin.code})`
|
||||
: declaredOrigin.name,
|
||||
],
|
||||
['Contacto', p.contact_person],
|
||||
['Email', p.email],
|
||||
['Telefone', p.phone],
|
||||
['Canal preferido', p.preferred_contact],
|
||||
[
|
||||
'Representante/função',
|
||||
'Representante/função',
|
||||
`${text(p.representative_name)} / ${text(p.representative_role)}`,
|
||||
],
|
||||
['NUIT (se informado)', p.nuit],
|
||||
@@ -78,26 +99,26 @@ export default function PrintCase({
|
||||
/>
|
||||
))}
|
||||
</Section>
|
||||
<Section title="B. Localização e situação declaradas">
|
||||
<Section title="B. Localização e situação declaradas">
|
||||
{[
|
||||
['Situação da localização', p.area_status],
|
||||
['Situação da localização', p.area_status],
|
||||
['Uso pretendido', p.purpose],
|
||||
['Actividade', p.activity],
|
||||
[
|
||||
'Ocupantes/utilizações',
|
||||
`${text(p.known_occupants)} — ${text(p.occupant_description)}`,
|
||||
'Ocupantes/utilizações',
|
||||
`${text(p.known_occupants)} — ${text(p.occupant_description)}`,
|
||||
],
|
||||
[
|
||||
'Benfeitorias/usos',
|
||||
`${text(p.known_improvements)} — ${text(p.improvements_description)}`,
|
||||
`${text(p.known_improvements)} — ${text(p.improvements_description)}`,
|
||||
],
|
||||
[
|
||||
'Antecedentes',
|
||||
`${text(p.prior_right_status)} — ${text(p.prior_right_description)}`,
|
||||
`${text(p.prior_right_status)} — ${text(p.prior_right_description)}`,
|
||||
],
|
||||
[
|
||||
'Conflito comunicado',
|
||||
`${text(p.conflict_status)} — ${text(p.conflict_description)}`,
|
||||
`${text(p.conflict_status)} — ${text(p.conflict_description)}`,
|
||||
],
|
||||
].map(([label, value]) => (
|
||||
<Field
|
||||
@@ -107,35 +128,35 @@ export default function PrintCase({
|
||||
/>
|
||||
))}
|
||||
</Section>
|
||||
<Section title="Parcelas (declarações do requerente)">
|
||||
<Section title="Parcelas (declarações do requerente)">
|
||||
{(p.parcels ?? []).map((parcel: any, index: number) => (
|
||||
<article key={index} className="space-y-1 border-b pb-3">
|
||||
<h3 className="font-semibold">Parcela {index + 1}</h3>
|
||||
<p>{text(parcel.place_description)}</p>
|
||||
<p>
|
||||
Ãrea: {text(parcel.area)} {text(parcel.area_unit)}{' '}
|
||||
· Referência: {text(parcel.cadastral_reference)}
|
||||
Área: {text(parcel.area)} {text(parcel.area_unit)} ·
|
||||
Referência: {text(parcel.cadastral_reference)}
|
||||
</p>
|
||||
<p>
|
||||
Coordenadas/planta: {text(parcel.coordinates)} ·
|
||||
Precisão indicada:{' '}
|
||||
Coordenadas/planta: {text(parcel.coordinates)} ·
|
||||
Precisão indicada:{' '}
|
||||
{text(parcel.geometry_confidence)}
|
||||
</p>
|
||||
<p className="text-sm">
|
||||
A selecção no catálogo não verifica
|
||||
titularidade, limites ou disponibilidade.
|
||||
A selecção no catálogo não verifica titularidade,
|
||||
limites ou disponibilidade.
|
||||
</p>
|
||||
</article>
|
||||
))}
|
||||
</Section>
|
||||
<Section title="C. Processo externo indicado pelo requerente">
|
||||
{[
|
||||
['Número', p.official_process?.official_reference],
|
||||
['Número', p.official_process?.official_reference],
|
||||
['Entidade', p.official_process?.receiving_entity],
|
||||
['Data indicada', p.official_process?.presented_at],
|
||||
['Estado comunicado', p.official_process?.reported_status],
|
||||
[
|
||||
'Pendências comunicadas',
|
||||
'Pendências comunicadas',
|
||||
p.official_process?.pending_items,
|
||||
],
|
||||
].map(([label, value]) => (
|
||||
@@ -146,7 +167,7 @@ export default function PrintCase({
|
||||
/>
|
||||
))}
|
||||
</Section>
|
||||
<Section title="D. Plano de exploração facultativo">
|
||||
<Section title="D. Plano de exploração facultativo">
|
||||
{(p.exploration_plan?.activity_rows ?? []).length === 0 ? (
|
||||
<p>Sem linhas fornecidas.</p>
|
||||
) : (
|
||||
@@ -154,14 +175,14 @@ export default function PrintCase({
|
||||
(row: any, index: number) => (
|
||||
<article key={index} className="border-b pb-2">
|
||||
<p>
|
||||
<strong>{text(row.activity)}</strong> ·
|
||||
perÃodo {text(row.period)} ·{' '}
|
||||
<strong>{text(row.activity)}</strong> ·
|
||||
período {text(row.period)} ·{' '}
|
||||
{text(row.stage)}
|
||||
</p>
|
||||
<p>
|
||||
Ãrea {text(row.area)} {text(row.area_unit)}{' '}
|
||||
· metas: {text(row.targets)} · estruturas:{' '}
|
||||
{text(row.structures)} · investimento
|
||||
Área {text(row.area)} {text(row.area_unit)}{' '}
|
||||
· metas: {text(row.targets)} · estruturas:{' '}
|
||||
{text(row.structures)} · investimento
|
||||
declarado: {text(row.investment)}
|
||||
</p>
|
||||
</article>
|
||||
@@ -170,7 +191,7 @@ export default function PrintCase({
|
||||
)}
|
||||
<Field label="Notas" value={text(p.exploration_plan?.notes)} />
|
||||
</Section>
|
||||
<Section title="E. Consulta — preparação/informação indicada">
|
||||
<Section title="E. Consulta — preparação/informação indicada">
|
||||
{[
|
||||
['Estado', p.consultation?.status],
|
||||
[
|
||||
@@ -183,7 +204,7 @@ export default function PrintCase({
|
||||
.map(text)
|
||||
.join(' / '),
|
||||
],
|
||||
['LÃngua/tradução', p.consultation?.language],
|
||||
['Língua/tradução', p.consultation?.language],
|
||||
[
|
||||
'Participantes',
|
||||
(p.consultation?.participants ?? [])
|
||||
@@ -192,8 +213,8 @@ export default function PrintCase({
|
||||
)
|
||||
.join('; '),
|
||||
],
|
||||
['Intervenções', p.consultation?.interventions],
|
||||
['Divergências/oposição', p.consultation?.opposition],
|
||||
['Intervenções', p.consultation?.interventions],
|
||||
['Divergências/oposição', p.consultation?.opposition],
|
||||
['Acordos comunicados', p.consultation?.agreements],
|
||||
[
|
||||
'Acta/pareceres referidos',
|
||||
@@ -212,19 +233,19 @@ export default function PrintCase({
|
||||
/>
|
||||
))}
|
||||
</Section>
|
||||
<Section title="F. Informação complementar">
|
||||
<Section title="F. Informação complementar">
|
||||
<p>{text(p.additional_information)}</p>
|
||||
</Section>
|
||||
<footer className="space-y-2 border-t pt-4">
|
||||
<p>
|
||||
Gerado a partir dos dados guardados; sem assinatura
|
||||
electrónica ou validação de terceiros.
|
||||
electrónica ou validação de terceiros.
|
||||
</p>
|
||||
<p className="font-semibold">{disclaimer}</p>
|
||||
</footer>
|
||||
<style>
|
||||
{
|
||||
'@media print { button { display: none } section { break-inside: avoid } }'
|
||||
'@media print { main[data-land-print] { font-size: 11pt; line-height: 1.4; } main[data-land-print] button { display: none } main[data-land-print] section { break-inside: auto; box-shadow: none; } main[data-land-print] section > div, main[data-land-print] footer { break-inside: avoid; } main[data-land-print] h2, main[data-land-print] h3 { break-after: avoid; } }'
|
||||
}
|
||||
</style>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user