Fix incorrect filtering of reconciled and not reconciled items

Update BLReconciliation component to correctly filter items based on the reconciled status, handling both boolean and numeric representations.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/zhCtuJP
This commit is contained in:
michaelschal committed 2025-09-21 09:03:12 +00:00
1 parent ef6303793f
commit edb0e65112
3 files changed
+5 -6

No files matched your search

-4
View File
@@ -27,10 +27,6 @@ externalPort = 3002
localPort = 41343
externalPort = 3001
[[ports]]
localPort = 42073
externalPort = 3003
[workflows]
runButton = "Project"
Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

+5 -2
View File
@@ -629,11 +629,14 @@ export default function BLReconciliation() {
// Filtrage des livraisons par recherche et statut de validation
const filterDeliveries = (deliveries: any[]) => {
return deliveries.filter((delivery: any) => {
// Conversion sûre de reconciled (peut être booléen ou nombre 0/1)
const isReconciled = delivery.reconciled === true || delivery.reconciled === 1;
// Filtre par statut validé
if (filterStatus === "validated" && !delivery.reconciled) {
if (filterStatus === "validated" && !isReconciled) {
return false;
}
if (filterStatus === "not_validated" && delivery.reconciled) {
if (filterStatus === "not_validated" && isReconciled) {
return false;
}