commit21
This commit is contained in:
@@ -37,6 +37,7 @@ export default function Show({
|
||||
canDecide,
|
||||
conflictBlocked,
|
||||
audit,
|
||||
auditPagination,
|
||||
technical,
|
||||
comparisonPolicy,
|
||||
replenishmentSource,
|
||||
@@ -79,6 +80,13 @@ export default function Show({
|
||||
canDecide: boolean;
|
||||
conflictBlocked: boolean;
|
||||
audit: Audit[];
|
||||
auditPagination?: {
|
||||
total: number;
|
||||
current_page: number;
|
||||
last_page: number;
|
||||
prev_page_url: string | null;
|
||||
next_page_url: string | null;
|
||||
};
|
||||
technical?: {
|
||||
canReview: boolean;
|
||||
basis_hash: string;
|
||||
@@ -685,6 +693,13 @@ export default function Show({
|
||||
)}
|
||||
</Panel>
|
||||
<Panel title="Histórico">
|
||||
<div id="requisition-history" />
|
||||
<a
|
||||
className="mb-4 inline-block text-sm underline"
|
||||
href={`/requisicoes/${r.id}/historico.csv`}
|
||||
>
|
||||
Exportar metadados do histórico (CSV)
|
||||
</a>
|
||||
<ol className="space-y-4">
|
||||
{audit.map((a) => (
|
||||
<li
|
||||
@@ -705,6 +720,48 @@ export default function Show({
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
{auditPagination && (
|
||||
<nav
|
||||
aria-label="Paginação do histórico da requisição"
|
||||
className="mt-4 flex flex-wrap items-center justify-between gap-3 text-sm"
|
||||
>
|
||||
<span>
|
||||
{auditPagination.total} eventos · Página{' '}
|
||||
{auditPagination.current_page} de{' '}
|
||||
{auditPagination.last_page}
|
||||
</span>
|
||||
<div className="flex gap-4">
|
||||
{auditPagination.prev_page_url && (
|
||||
<Link
|
||||
preserveState
|
||||
preserveScroll
|
||||
only={[
|
||||
'audit',
|
||||
'auditPagination',
|
||||
]}
|
||||
className="underline"
|
||||
href={`${auditPagination.prev_page_url}#requisition-history`}
|
||||
>
|
||||
Anterior
|
||||
</Link>
|
||||
)}
|
||||
{auditPagination.next_page_url && (
|
||||
<Link
|
||||
preserveState
|
||||
preserveScroll
|
||||
only={[
|
||||
'audit',
|
||||
'auditPagination',
|
||||
]}
|
||||
className="underline"
|
||||
href={`${auditPagination.next_page_url}#requisition-history`}
|
||||
>
|
||||
Seguinte
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</nav>
|
||||
)}
|
||||
</Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user