mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-14 02:38:58 +02:00
Update interface and fix delivery saving and reconciliation issues
Update the edit button icon from an eye to a gear, fix a duplicate API endpoint, improve type safety, and add backend and frontend debug logs for delivery updates and reconciliation processes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/eBIc7ee
This commit is contained in:
1 parent
e6d261f1f7
commit
7da24cfbe1
5 files changed
+134
-41
No files matched your search
@@ -50,7 +50,10 @@ export default function ReconciliationModal({
|
||||
|
||||
const updateDeliveryMutation = useMutation({
|
||||
mutationFn: async (data: any) => {
|
||||
await apiRequest(`/api/deliveries/${delivery?.id}`, "PUT", data);
|
||||
console.log('Sending update for delivery:', delivery?.id, 'with data:', data);
|
||||
const response = await apiRequest(`/api/deliveries/${delivery?.id}`, "PUT", data);
|
||||
console.log('Update response:', response);
|
||||
return response;
|
||||
},
|
||||
onSuccess: () => {
|
||||
toast({
|
||||
@@ -58,13 +61,15 @@ export default function ReconciliationModal({
|
||||
description: "Données de rapprochement mises à jour avec succès",
|
||||
});
|
||||
queryClient.invalidateQueries({ queryKey: ['/api/deliveries/bl'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['/api/deliveries'] });
|
||||
if (onSave) onSave();
|
||||
onClose();
|
||||
},
|
||||
onError: (error) => {
|
||||
onError: (error: any) => {
|
||||
console.error('Update error:', error);
|
||||
toast({
|
||||
title: "Erreur",
|
||||
description: "Impossible de mettre à jour les données",
|
||||
description: `Impossible de mettre à jour les données: ${error?.message || 'Erreur inconnue'}`,
|
||||
variant: "destructive",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -464,13 +464,13 @@ export default function BLReconciliation() {
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{/* Bouton Voir les détails toujours disponible */}
|
||||
{/* Bouton Modifier toujours disponible */}
|
||||
<button
|
||||
onClick={() => handleOpenModal(delivery)}
|
||||
className="text-gray-600 hover:text-blue-600 transition-colors duration-200 p-1 hover:bg-blue-50 rounded"
|
||||
title="Voir les détails / Éditer"
|
||||
title="Modifier les données de rapprochement"
|
||||
>
|
||||
<Eye className="w-4 h-4" />
|
||||
<Settings className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
@@ -613,9 +613,9 @@ export default function BLReconciliation() {
|
||||
<button
|
||||
onClick={() => handleOpenModal(delivery)}
|
||||
className="text-gray-600 hover:text-blue-600 transition-colors duration-200 p-1 hover:bg-blue-50 rounded"
|
||||
title="Voir les détails / Éditer"
|
||||
title="Modifier les données de rapprochement"
|
||||
>
|
||||
<Eye className="w-4 h-4" />
|
||||
<Settings className="w-4 h-4" />
|
||||
</button>
|
||||
{/* Dévalider automatique - admin uniquement */}
|
||||
{user?.role === 'admin' && (
|
||||
|
||||
Reference in new issue
Block a user