mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-18 04:37:19 +02:00
3 files changed
+31
-7
No files matched your search
@@ -19,10 +19,6 @@ externalPort = 80
|
|||||||
localPort = 33873
|
localPort = 33873
|
||||||
externalPort = 3003
|
externalPort = 3003
|
||||||
|
|
||||||
[[ports]]
|
|
||||||
localPort = 38213
|
|
||||||
externalPort = 5000
|
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 38343
|
localPort = 38343
|
||||||
externalPort = 3000
|
externalPort = 3000
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ export default function ReconciliationComments({ deliveryId, className = "" }: R
|
|||||||
description: "Commentaire ajouté avec succès",
|
description: "Commentaire ajouté avec succès",
|
||||||
});
|
});
|
||||||
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
||||||
|
// Invalider aussi les queries des livraisons pour mettre à jour le compteur de commentaires
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries'] });
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries/bl'] });
|
||||||
setIsAdding(false);
|
setIsAdding(false);
|
||||||
setNewComment("");
|
setNewComment("");
|
||||||
},
|
},
|
||||||
@@ -81,6 +84,9 @@ export default function ReconciliationComments({ deliveryId, className = "" }: R
|
|||||||
description: "Commentaire modifié avec succès",
|
description: "Commentaire modifié avec succès",
|
||||||
});
|
});
|
||||||
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
||||||
|
// Invalider aussi les queries des livraisons pour mettre à jour le compteur de commentaires
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries'] });
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries/bl'] });
|
||||||
setEditingId(null);
|
setEditingId(null);
|
||||||
},
|
},
|
||||||
onError: (error: any) => {
|
onError: (error: any) => {
|
||||||
@@ -103,6 +109,9 @@ export default function ReconciliationComments({ deliveryId, className = "" }: R
|
|||||||
description: "Commentaire supprimé avec succès",
|
description: "Commentaire supprimé avec succès",
|
||||||
});
|
});
|
||||||
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
queryClient.invalidateQueries({ queryKey: [`/api/deliveries/${deliveryId}/reconciliation-comments`] });
|
||||||
|
// Invalider aussi les queries des livraisons pour mettre à jour le compteur de commentaires
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries'] });
|
||||||
|
queryClient.invalidateQueries({ queryKey: ['/api/deliveries/bl'] });
|
||||||
},
|
},
|
||||||
onError: (error: any) => {
|
onError: (error: any) => {
|
||||||
toast({
|
toast({
|
||||||
|
|||||||
@@ -1132,6 +1132,15 @@ export default function BLReconciliation() {
|
|||||||
((parseFloat(delivery.invoiceAmount) - parseFloat(delivery.blAmount)) / parseFloat(delivery.blAmount) * 100).toFixed(1) :
|
((parseFloat(delivery.invoiceAmount) - parseFloat(delivery.blAmount)) / parseFloat(delivery.blAmount) * 100).toFixed(1) :
|
||||||
null;
|
null;
|
||||||
|
|
||||||
|
// Log pour déboguer le problème des commentaires
|
||||||
|
if (import.meta.env.DEV && delivery.reconciliationCommentsCount) {
|
||||||
|
console.log('🔍 Validated delivery comments:', {
|
||||||
|
deliveryId: delivery.id,
|
||||||
|
commentsCount: delivery.reconciliationCommentsCount,
|
||||||
|
hasComments: delivery.reconciliationCommentsCount > 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<tr key={delivery.id} className="hover:bg-gray-50 bg-green-50">
|
<tr key={delivery.id} className="hover:bg-gray-50 bg-green-50">
|
||||||
<td className="px-6 py-4 whitespace-nowrap">
|
<td className="px-6 py-4 whitespace-nowrap">
|
||||||
@@ -1200,10 +1209,20 @@ export default function BLReconciliation() {
|
|||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<button
|
<button
|
||||||
onClick={() => handleOpenCommentModal(delivery)}
|
onClick={() => handleOpenCommentModal(delivery)}
|
||||||
className="transition-colors duration-200 p-1 rounded text-gray-600 hover:text-gray-700 hover:bg-gray-50 opacity-70"
|
className={`transition-colors duration-200 p-1 rounded ${
|
||||||
title="Voir/Gérer les commentaires"
|
delivery.reconciliationCommentsCount && delivery.reconciliationCommentsCount > 0
|
||||||
|
? 'text-blue-600 hover:text-blue-700 hover:bg-blue-50'
|
||||||
|
: 'text-gray-600 hover:text-gray-700 hover:bg-gray-50'
|
||||||
|
} opacity-70`}
|
||||||
|
title={`Voir/Gérer les commentaires ${
|
||||||
|
delivery.reconciliationCommentsCount ? `(${delivery.reconciliationCommentsCount})` : ''
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
<MessageSquare className="h-4 w-4" />
|
<MessageSquare className={`h-4 w-4 ${
|
||||||
|
delivery.reconciliationCommentsCount && delivery.reconciliationCommentsCount > 0
|
||||||
|
? 'fill-blue-200'
|
||||||
|
: ''
|
||||||
|
}`} />
|
||||||
</button>
|
</button>
|
||||||
{(permissions.canEdit('reconciliation') || permissions.canValidate('reconciliation')) && (
|
{(permissions.canEdit('reconciliation') || permissions.canValidate('reconciliation')) && (
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in new issue
Block a user