commit compras5 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 20:19:21 +02:00
parent 7486007fcf
commit d58b75c87a
57 changed files with 2803 additions and 116 deletions
@@ -1,4 +1,12 @@
import { Head, Link, useForm } from '@inertiajs/react';
import {
ProcurementDeliveryInsights,
type DeliveryInsights,
} from '@/components/procurement-delivery-insights';
import {
ProcurementContractInsights,
type ContractInsights,
} from '@/components/procurement-contract-insights';
import {
ProcurementPaymentInsights,
type PaymentInsights,
@@ -41,6 +49,10 @@ type Filters = {
from?: string;
to?: string;
department_id?: string | number;
supplier_page?: number;
category_page?: number;
delivery_page?: number;
delivery_state?: string;
};
const estimate = (minor: string | null) => {
if (minor === null) return 'Por completar';
@@ -56,6 +68,8 @@ export default function ProcurementReports({
insights,
payableInsights,
paymentInsights,
contractInsights,
deliveryInsights,
}: {
records: {
data: Row[];
@@ -72,6 +86,8 @@ export default function ProcurementReports({
insights?: ProcurementInsights;
payableInsights?: PayableInsights | null;
paymentInsights?: PaymentInsights | null;
contractInsights?: ContractInsights;
deliveryInsights?: DeliveryInsights;
}) {
const form = useForm({
search: filters.search ?? '',
@@ -122,10 +138,24 @@ export default function ProcurementReports({
exportHref={`/relatorios/obrigacoes.csv?${params}`}
/>
)}
{deliveryInsights && (
<ProcurementDeliveryInsights
data={deliveryInsights}
pageHref={`/relatorios?${params}`}
exportHref={`/relatorios/entregas.csv?${params}`}
/>
)}
{paymentInsights && (
<ProcurementPaymentInsights
data={paymentInsights}
exportHref={`/relatorios/despesa.csv?${params}`}
pageHref={`/relatorios?${params}`}
/>
)}
{contractInsights && (
<ProcurementContractInsights
data={contractInsights}
exportHref={`/relatorios/contratos.csv?${params}`}
/>
)}
<Panel