Merge pull request #454 from R0m1k3/1.1

1.1
This commit is contained in:
LogiFlow authored and GitHub committed 2025-09-21 10:55:23 +02:00
commit cca8a985e3
4 files changed
+1103 -459

No files matched your search

+4 -4
View File
@@ -23,14 +23,14 @@ externalPort = 3000
localPort = 38451
externalPort = 3002
[[ports]]
localPort = 40863
externalPort = 3003
[[ports]]
localPort = 41343
externalPort = 3001
[[ports]]
localPort = 42073
externalPort = 3003
[workflows]
runButton = "Project"
+36 -1
View File
@@ -52,6 +52,7 @@ export default function BLReconciliation() {
const [searchTerm, setSearchTerm] = useState("");
const [selectedDelivery, setSelectedDelivery] = useState<any>(null);
const [isModalOpen, setIsModalOpen] = useState(false);
const [filterStatus, setFilterStatus] = useState<"all" | "validated" | "not_validated">("all");
// État pour le modal d'envoi de facture
const [showInvoiceModal, setShowInvoiceModal] = useState(false);
@@ -625,9 +626,18 @@ export default function BLReconciliation() {
}
};
// Filtrage des livraisons par recherche
// Filtrage des livraisons par recherche et statut de validation
const filterDeliveries = (deliveries: any[]) => {
return deliveries.filter((delivery: any) => {
// Filtre par statut validé
if (filterStatus === "validated" && !delivery.reconciled) {
return false;
}
if (filterStatus === "not_validated" && delivery.reconciled) {
return false;
}
// Filtre par recherche
const searchLower = searchTerm.toLowerCase();
return (
delivery.supplier?.name?.toLowerCase().includes(searchLower) ||
@@ -736,6 +746,31 @@ export default function BLReconciliation() {
/>
</div>
</div>
<div className="w-full sm:w-48">
<Select value={filterStatus} onValueChange={(value: "all" | "validated" | "not_validated") => setFilterStatus(value)}>
<SelectTrigger className="border border-gray-300 shadow-sm">
<Filter className="w-4 h-4 mr-2" />
<SelectValue placeholder="Filtrer par statut" />
</SelectTrigger>
<SelectContent>
<SelectItem value="all">
Tous les rapprochements
</SelectItem>
<SelectItem value="validated">
<div className="flex items-center">
<Check className="w-4 h-4 mr-2 text-green-600" />
Validés seulement
</div>
</SelectItem>
<SelectItem value="not_validated">
<div className="flex items-center">
<X className="w-4 h-4 mr-2 text-orange-600" />
Non validés seulement
</div>
</SelectItem>
</SelectContent>
</Select>
</div>
</div>
</div>