mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Update interface to show changes immediately after validation actions
Improve user experience by updating the local state immediately after validating or invalidating an "avoir," providing instant visual feedback without requiring a page reload. This change enhances the perceived responsiveness of the task management platform. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/uMhb9Na
This commit is contained in:
1 parent
2291dcdd7f
commit
1470f221de
2 files changed
+19
-2
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 196 KiB |
@@ -454,7 +454,15 @@ export default function Avoirs() {
|
||||
}
|
||||
}
|
||||
|
||||
// Recharger les avoirs pour voir les changements
|
||||
// ✅ Mettre à jour l'état local immédiatement pour affichage instantané
|
||||
setAvoirVerificationResults(prev => ({
|
||||
...prev,
|
||||
[avoirId]: { exists: true, fromCache: true, permanent: true, validated: true }
|
||||
}));
|
||||
|
||||
console.log('✅ Avoir validé - État local mis à jour:', avoirId);
|
||||
|
||||
// Recharger les avoirs pour voir les changements en base
|
||||
queryClient.invalidateQueries({ queryKey: ['/api/avoirs'] });
|
||||
|
||||
toast({
|
||||
@@ -477,7 +485,16 @@ export default function Avoirs() {
|
||||
verified: false
|
||||
});
|
||||
|
||||
// Recharger les avoirs pour voir les changements
|
||||
// ✅ Retirer de l'état local immédiatement
|
||||
setAvoirVerificationResults(prev => {
|
||||
const updated = { ...prev };
|
||||
delete updated[avoirId]; // Supprimer complètement l'entrée
|
||||
return updated;
|
||||
});
|
||||
|
||||
console.log('✅ Avoir dévalidé - État local mis à jour:', avoirId);
|
||||
|
||||
// Recharger les avoirs pour voir les changements en base
|
||||
queryClient.invalidateQueries({ queryKey: ['/api/avoirs'] });
|
||||
|
||||
toast({
|
||||
|
||||
Reference in new issue
Block a user