diff --git a/client/src/pages/Avoirs.tsx b/client/src/pages/Avoirs.tsx index aa8df63..66be6c7 100644 --- a/client/src/pages/Avoirs.tsx +++ b/client/src/pages/Avoirs.tsx @@ -425,20 +425,6 @@ export default function Avoirs() { } }; - // Debug: Log des avoirs reçus - useEffect(() => { - console.log('💰 Debug avoirs reçus:', { - count: avoirs?.length || 0, - first: avoirs?.[0] ? { - id: avoirs[0].id, - keys: Object.keys(avoirs[0]), - hasSupplier: !!avoirs[0].supplier, - hasGroup: !!avoirs[0].group, - hasCreator: !!avoirs[0].creator - } : null - }); - }, [avoirs]); - // 🔍 FONCTION DE VÉRIFICATION DE FACTURE (comme rapprochement) const verifyAvoirInvoiceMutation = useMutation({ mutationFn: async ({ avoirId, invoiceReference, forceRefresh }: { avoirId: number; invoiceReference?: string; forceRefresh?: boolean }) => { @@ -1055,18 +1041,7 @@ export default function Avoirs() {
{filteredAvoirs?.filter(avoir => avoir && avoir.id).map((avoir) => { - try { - // Debug: Log de l'avoir pour identifier le problème - console.log('🔍 Render avoir:', { - id: avoir?.id, - hasSupplier: !!avoir?.supplier, - hasGroup: !!avoir?.group, - hasCreator: !!avoir?.creator, - createdAt: avoir?.createdAt, - status: avoir?.status - }); - - const canEditDelete = ['admin', 'directeur'].includes((user as any)?.role); + const canEditDelete = ['admin', 'directeur'].includes((user as any)?.role); return (