chore(web): APIs renomeadas do AntD 6 e allowedHosts no dev server

- `<Space direction>` -> `orientation` e `children` -> `content` no
  Popconfirm, acompanhando o rename da API no Ant Design 6.
- `allowedHosts: true` no Vite para permitir acesso ao dev server por
  hostname da rede local.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-20 18:17:30 +00:00
parent 8838db16ae
commit 2a33a5aa4b
3 changed files with 7 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ function ErpConsultaModal({
footer={<Button onClick={onClose}>Fechar</Button>} footer={<Button onClick={onClose}>Fechar</Button>}
> >
{!row ? null : ( {!row ? null : (
<Space direction="vertical" size={20} style={{ width: '100%' }}> <Space orientation="vertical" size={20} style={{ width: '100%' }}>
{/* ── Cabeçalho ── */} {/* ── Cabeçalho ── */}
<Card <Card
styles={{ body: { padding: '14px 16px' } }} styles={{ body: { padding: '14px 16px' } }}
@@ -257,7 +257,7 @@ function ErpConsultaModal({
title: 'Produto', title: 'Produto',
key: 'produto', key: 'produto',
render: (_: unknown, item) => ( render: (_: unknown, item) => (
<Space direction="vertical" size={0}> <Space orientation="vertical" size={0}>
<Text style={{ fontSize: 11, color: '#94A3B8' }}>{item.codProduto}</Text> <Text style={{ fontSize: 11, color: '#94A3B8' }}>{item.codProduto}</Text>
<Text style={{ fontWeight: 500, fontSize: 13 }}>{item.descProduto}</Text> <Text style={{ fontWeight: 500, fontSize: 13 }}>{item.descProduto}</Text>
</Space> </Space>
@@ -276,7 +276,7 @@ function ErpConsultaModal({
width: 120, width: 120,
align: 'right' as const, align: 'right' as const,
render: (v: string, item) => ( render: (v: string, item) => (
<Space direction="vertical" size={0} style={{ alignItems: 'flex-end' }}> <Space orientation="vertical" size={0} style={{ alignItems: 'flex-end' }}>
<Text className="tabular-nums">{fmt(Number(v))}</Text> <Text className="tabular-nums">{fmt(Number(v))}</Text>
{Number(item.descontoPerc) > 0 && ( {Number(item.descontoPerc) > 0 && (
<Text style={{ fontSize: 11, color: '#f59e0b' }}> <Text style={{ fontSize: 11, color: '#f59e0b' }}>
@@ -364,7 +364,7 @@ export function OrdersErpPage() {
key: 'pedido', key: 'pedido',
width: 110, width: 110,
render: (_: unknown, row: PedidoErpConsultaItem) => ( render: (_: unknown, row: PedidoErpConsultaItem) => (
<Space direction="vertical" size={0}> <Space orientation="vertical" size={0}>
<Text strong className="tabular-nums" style={{ color: '#003B8E' }}> <Text strong className="tabular-nums" style={{ color: '#003B8E' }}>
{row.numeroPedido} {row.numeroPedido}
</Text> </Text>
@@ -446,7 +446,7 @@ export function OrdersErpPage() {
render: (_: unknown, row: PedidoErpConsultaItem) => { render: (_: unknown, row: PedidoErpConsultaItem) => {
if (row.tipo !== 'E') return <Text type="secondary"></Text>; if (row.tipo !== 'E') return <Text type="secondary"></Text>;
return ( return (
<Space direction="vertical" size={2}> <Space orientation="vertical" size={2}>
{row.numeroEntrega && ( {row.numeroEntrega && (
<Text className="tabular-nums" style={{ fontSize: 12, color: '#475569' }}> <Text className="tabular-nums" style={{ fontSize: 12, color: '#475569' }}>
Entrega {row.numeroEntrega} Entrega {row.numeroEntrega}

View File

@@ -341,7 +341,7 @@ function OrderDetailModal({ id, onClose }: { id: string | null; onClose: () => v
) : ( ) : (
<ClockCircleOutlined style={{ color: '#d46b08' }} /> <ClockCircleOutlined style={{ color: '#d46b08' }} />
), ),
children: ( content: (
<span style={{ fontSize: 13 }}> <span style={{ fontSize: 13 }}>
<Text type="secondary">{new Date(h.changedAt).toLocaleString('pt-BR')}</Text> <Text type="secondary">{new Date(h.changedAt).toLocaleString('pt-BR')}</Text>
{' — '} {' — '}

View File

@@ -10,6 +10,7 @@ export default defineConfig(() => ({
server: { server: {
port: 4200, port: 4200,
host: '0.0.0.0', host: '0.0.0.0',
allowedHosts: true,
// Proxy /api/* → API Nest em :3000 (default API_PORT). // Proxy /api/* → API Nest em :3000 (default API_PORT).
// Evita CORS em dev e mantém URL relativa no código da Web — em produção, // Evita CORS em dev e mantém URL relativa no código da Web — em produção,
// mesmo origin via Nginx (/api/* → backend). // mesmo origin via Nginx (/api/* → backend).