Entrega dashboard e correccoes transversais preservando Ofertas instalado
tests / ci (push) Canceled after 0s
tests / ci (push) Canceled after 0s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Link } from '@inertiajs/react';
|
||||
import EvidenceDetails from './evidence-details';
|
||||
|
||||
export type PublicDocument = {
|
||||
id: number;
|
||||
@@ -36,50 +37,51 @@ export function PublicDocumentContent({
|
||||
{r.description && (
|
||||
<p className="whitespace-pre-line">{r.description}</p>
|
||||
)}
|
||||
<dl className="grid gap-3 text-sm sm:grid-cols-2">
|
||||
<div>
|
||||
<dt className="font-semibold">Entidade emissora / autor</dt>
|
||||
<dd>{r.issuer ?? 'Não indicada'}</dd>
|
||||
</div>
|
||||
{r.document_number && (
|
||||
<div>
|
||||
<dt className="font-semibold">Número</dt>
|
||||
<dd>{r.document_number}</dd>
|
||||
</div>
|
||||
)}
|
||||
{r.document_date && (
|
||||
<div>
|
||||
<dt className="font-semibold">Data do documento</dt>
|
||||
<dd>{r.document_date}</dd>
|
||||
</div>
|
||||
)}
|
||||
{r.applicable_from && (
|
||||
<div>
|
||||
<dt className="font-semibold">
|
||||
Data de início indicada no registo
|
||||
</dt>
|
||||
<dd>{r.applicable_from}</dd>
|
||||
</div>
|
||||
)}
|
||||
{r.applicable_until && (
|
||||
<div>
|
||||
<dt className="font-semibold">
|
||||
Data final indicada no registo
|
||||
</dt>
|
||||
<dd>{r.applicable_until}</dd>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<dt className="font-semibold">Fonte</dt>
|
||||
<dd>
|
||||
{r.source_confirmation === 'official_confirmed'
|
||||
? 'Fonte oficial'
|
||||
: r.source_url
|
||||
? 'Fonte identificada'
|
||||
: 'Não indicada'}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
<EvidenceDetails title="Identificação e fonte do documento">
|
||||
<dl className="grid gap-3 text-sm sm:grid-cols-2">
|
||||
{r.issuer && (
|
||||
<div>
|
||||
<dt className="font-semibold">
|
||||
Entidade emissora / autor
|
||||
</dt>
|
||||
<dd>{r.issuer}</dd>
|
||||
</div>
|
||||
)}
|
||||
{r.document_number && (
|
||||
<div>
|
||||
<dt className="font-semibold">Número</dt>
|
||||
<dd>{r.document_number}</dd>
|
||||
</div>
|
||||
)}
|
||||
{r.document_date && (
|
||||
<div>
|
||||
<dt className="font-semibold">Data do documento</dt>
|
||||
<dd>{r.document_date}</dd>
|
||||
</div>
|
||||
)}
|
||||
{(r.source_url ||
|
||||
r.source_confirmation === 'official_confirmed') && (
|
||||
<div>
|
||||
<dt className="font-semibold">Fonte</dt>
|
||||
<dd>
|
||||
{r.source_confirmation === 'official_confirmed'
|
||||
? 'Fonte oficial'
|
||||
: r.source_url
|
||||
? 'Fonte identificada'
|
||||
: 'Não indicada'}
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
</EvidenceDetails>
|
||||
{(r.applicable_from || r.applicable_until) && (
|
||||
<p className="text-sm">
|
||||
Período indicado:{' '}
|
||||
{r.applicable_from ?? 'início não indicado'}
|
||||
{' — '}
|
||||
{r.applicable_until ?? 'fim não indicado'}.
|
||||
</p>
|
||||
)}
|
||||
{r.usage_notice && (
|
||||
<p
|
||||
role="note"
|
||||
@@ -94,7 +96,7 @@ export function PublicDocumentContent({
|
||||
className="underline"
|
||||
href={`/documentos/${r.id}?${new URLSearchParams({ back }).toString()}`}
|
||||
>
|
||||
Consultar ficha
|
||||
Consultar documento
|
||||
</Link>
|
||||
)}
|
||||
{r.view_url && (
|
||||
|
||||
Reference in New Issue
Block a user