Merge pull request #455 from R0m1k3/1.1

Fix incorrect filtering of reconciled and not reconciled items
This commit is contained in:
LogiFlow authored and GitHub committed 2025-09-21 11:03:44 +02:00
commit d8d05a0203
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;
}