feat(mvp-rep): formas de pagamento do ERP + suporte offline completo
Formas de pagamento: - Endpoint GET /catalog/payment-methods lendo vw_formas_pagamento filtrado por ativa=1 e integrar_sar=1 - FormaPagamento schema/type no shared api-interface - Hook useFormasPagamento (staleTime 1h) substituindo lista hardcoded Offline (FR-4.2 / NFR-2.1–2.4): - IndexedDB queue: lib/offline/idb.ts + order-queue.ts sem deps externos - NewOrderPage detecta !navigator.onLine → enqueueOrder() → toast + reset - useOfflineSync: auto-sync ao reconectar (POST orders + PATCH transmit) - usePendingOrders: fila reativa via CustomEvents - AppShell: banner offline + useOfflineSync() global - OrdersPage: seção de pedidos pendentes com retry/descartar - sw.js: network-first para API GETs cacheáveis + stale-while-revalidate para assets + app shell navigate fallback Docs: - architecture.md: documento de decisões de arquitetura do SAR MVP Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -576,8 +576,15 @@ function CustomerDetailsDrawer({
|
||||
</Col>
|
||||
)}
|
||||
<Col span={12}>
|
||||
<span style={label}>Cód. Vendedor</span>
|
||||
<Text style={{ fontSize: 13 }}>{summary.codVendedor}</Text>
|
||||
<span style={label}>Representante</span>
|
||||
<Text style={{ fontSize: 13 }}>
|
||||
{summary.nomeVendedor ?? `Cód. ${summary.codVendedor}`}
|
||||
{summary.nomeVendedor && (
|
||||
<Text type="secondary" style={{ fontSize: 11, marginLeft: 4 }}>
|
||||
(cód. {summary.codVendedor})
|
||||
</Text>
|
||||
)}
|
||||
</Text>
|
||||
</Col>
|
||||
{summary.dtUltimaCompra && (
|
||||
<Col span={12}>
|
||||
@@ -787,8 +794,8 @@ function CustomerAnalysisDrawer({
|
||||
color: urgencyColor,
|
||||
},
|
||||
{
|
||||
label: 'Cód. Vendedor',
|
||||
value: String(summary.codVendedor),
|
||||
label: 'Representante',
|
||||
value: summary.nomeVendedor ?? `Cód. ${summary.codVendedor}`,
|
||||
icon: <UserOutlined />,
|
||||
color: '#64748B',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user