fix(web): navigate indefinido em ClientsPage + deprecations AntD 6.x
Adiciona useNavigate() no corpo de ClientsPage (faltava; sub-componentes já tinham). Substitui Space direction→orientation (4 ocorrências) e Progress trailColor→railColor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -277,7 +277,7 @@ function CustomerPortfolioCard({ stats }: { stats: PortfolioStats }) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Space direction="vertical" size={6} style={{ width: '100%', marginBottom: 16 }}>
|
<Space orientation="vertical" size={6} style={{ width: '100%', marginBottom: 16 }}>
|
||||||
{legendItems.map((item) => {
|
{legendItems.map((item) => {
|
||||||
const pct = total > 0 ? ((item.value / total) * 100).toFixed(1) : '0.0';
|
const pct = total > 0 ? ((item.value / total) * 100).toFixed(1) : '0.0';
|
||||||
return (
|
return (
|
||||||
@@ -475,7 +475,7 @@ function CustomerDetailsDrawer({
|
|||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Space direction="vertical" size={20} style={{ width: '100%' }}>
|
<Space orientation="vertical" size={20} style={{ width: '100%' }}>
|
||||||
{/* Identificação */}
|
{/* Identificação */}
|
||||||
<Card
|
<Card
|
||||||
style={{ borderRadius: 8, background: '#F8FAFC', border: '1px solid #EBF0F5' }}
|
style={{ borderRadius: 8, background: '#F8FAFC', border: '1px solid #EBF0F5' }}
|
||||||
@@ -626,7 +626,7 @@ function CustomerDetailsDrawer({
|
|||||||
{loadingOrders ? (
|
{loadingOrders ? (
|
||||||
<Spin size="small" />
|
<Spin size="small" />
|
||||||
) : (
|
) : (
|
||||||
<Space direction="vertical" size={6} style={{ width: '100%' }}>
|
<Space orientation="vertical" size={6} style={{ width: '100%' }}>
|
||||||
{orders.slice(0, 5).map((p) => (
|
{orders.slice(0, 5).map((p) => (
|
||||||
<div
|
<div
|
||||||
key={p.id}
|
key={p.id}
|
||||||
@@ -760,7 +760,7 @@ function CustomerAnalysisDrawer({
|
|||||||
placement="right"
|
placement="right"
|
||||||
styles={{ body: { padding: '16px 24px' } }}
|
styles={{ body: { padding: '16px 24px' } }}
|
||||||
>
|
>
|
||||||
<Space direction="vertical" size={20} style={{ width: '100%' }}>
|
<Space orientation="vertical" size={20} style={{ width: '100%' }}>
|
||||||
<div>
|
<div>
|
||||||
<Text strong style={{ fontSize: 17, color: '#1F2937', display: 'block' }}>
|
<Text strong style={{ fontSize: 17, color: '#1F2937', display: 'block' }}>
|
||||||
{summary.nome}
|
{summary.nome}
|
||||||
@@ -1042,6 +1042,7 @@ export function ClientsPage() {
|
|||||||
const screens = useBreakpoint();
|
const screens = useBreakpoint();
|
||||||
const isMobile = !screens.md;
|
const isMobile = !screens.md;
|
||||||
const { message: msg } = App.useApp();
|
const { message: msg } = App.useApp();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const stats = usePortfolioStats();
|
const stats = usePortfolioStats();
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ export function RepPainel() {
|
|||||||
percent={Math.min(meta.pct, 100)}
|
percent={Math.min(meta.pct, 100)}
|
||||||
showInfo={false}
|
showInfo={false}
|
||||||
strokeColor="var(--jcs-blue)"
|
strokeColor="var(--jcs-blue)"
|
||||||
trailColor="var(--jcs-blue-light)"
|
railColor="var(--jcs-blue-light)"
|
||||||
/>
|
/>
|
||||||
{meta.falta > 0 ? (
|
{meta.falta > 0 ? (
|
||||||
<Text style={{ fontSize: 'var(--text-md)' }}>
|
<Text style={{ fontSize: 'var(--text-md)' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user