mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-23 06:58:19 +02:00
4 files changed
+1103
-459
No files matched your search
@@ -23,14 +23,14 @@ externalPort = 3000
|
|||||||
localPort = 38451
|
localPort = 38451
|
||||||
externalPort = 3002
|
externalPort = 3002
|
||||||
|
|
||||||
[[ports]]
|
|
||||||
localPort = 40863
|
|
||||||
externalPort = 3003
|
|
||||||
|
|
||||||
[[ports]]
|
[[ports]]
|
||||||
localPort = 41343
|
localPort = 41343
|
||||||
externalPort = 3001
|
externalPort = 3001
|
||||||
|
|
||||||
|
[[ports]]
|
||||||
|
localPort = 42073
|
||||||
|
externalPort = 3003
|
||||||
|
|
||||||
[workflows]
|
[workflows]
|
||||||
runButton = "Project"
|
runButton = "Project"
|
||||||
|
|
||||||
|
|||||||
+490
-229
File diff suppressed because it is too large.
Load diff
+573
-225
File diff suppressed because it is too large.
Load diff
@@ -52,6 +52,7 @@ export default function BLReconciliation() {
|
|||||||
const [searchTerm, setSearchTerm] = useState("");
|
const [searchTerm, setSearchTerm] = useState("");
|
||||||
const [selectedDelivery, setSelectedDelivery] = useState<any>(null);
|
const [selectedDelivery, setSelectedDelivery] = useState<any>(null);
|
||||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||||
|
const [filterStatus, setFilterStatus] = useState<"all" | "validated" | "not_validated">("all");
|
||||||
|
|
||||||
// État pour le modal d'envoi de facture
|
// État pour le modal d'envoi de facture
|
||||||
const [showInvoiceModal, setShowInvoiceModal] = useState(false);
|
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[]) => {
|
const filterDeliveries = (deliveries: any[]) => {
|
||||||
return deliveries.filter((delivery: 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();
|
const searchLower = searchTerm.toLowerCase();
|
||||||
return (
|
return (
|
||||||
delivery.supplier?.name?.toLowerCase().includes(searchLower) ||
|
delivery.supplier?.name?.toLowerCase().includes(searchLower) ||
|
||||||
@@ -736,6 +746,31 @@ export default function BLReconciliation() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user