From 4d36beeaf47977d1c8f1cd0f4b1984ba5d9d8052 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Mon, 8 Sep 2025 16:09:11 +0000 Subject: [PATCH] Update invoice list to show supplier first and add edit/delete functionality Adds modals for editing and deleting invoices, reorders the invoice list to display supplier information first, and includes a placeholder for status changes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869 Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/5h3gCuD --- client/src/pages/Avoirs.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/client/src/pages/Avoirs.tsx b/client/src/pages/Avoirs.tsx index 22e21e8..625661a 100644 --- a/client/src/pages/Avoirs.tsx +++ b/client/src/pages/Avoirs.tsx @@ -6,6 +6,7 @@ import { Input } from "@/components/ui/input"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; +import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from "@/components/ui/alert-dialog"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { Checkbox } from "@/components/ui/checkbox"; @@ -80,6 +81,9 @@ type AvoirFormData = z.infer; export default function Avoirs() { const [searchTerm, setSearchTerm] = useState(""); const [isCreateDialogOpen, setIsCreateDialogOpen] = useState(false); + const [isEditDialogOpen, setIsEditDialogOpen] = useState(false); + const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false); + const [selectedAvoir, setSelectedAvoir] = useState(null); const [selectedStoreId, setSelectedStoreId] = useState("all"); const { toast } = useToast(); const queryClient = useQueryClient(); @@ -447,15 +451,15 @@ export default function Avoirs() { + - @@ -476,6 +480,9 @@ export default function Avoirs() { return ( + -
+ Fournisseur + Statut Référence - Fournisseur - Magasin
+ {avoir.supplier.name} +
{getStatusIcon(avoir.status)} @@ -484,11 +491,8 @@ export default function Avoirs() {
- #{avoir.invoiceReference || 'Sans référence'} - - {avoir.supplier.name} + #{avoir.invoiceReference || 'Sans référence'}