From 1090b17a07644d47569be4652e9d29bd559f9402 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 14 Aug 2025 12:17:25 +0000 Subject: [PATCH] Streamline ticket commenting by allowing direct entry in details Remove dedicated comment modal, integrate comment field directly into ticket details view and update UI to reflect this change. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/kdjV7Um --- client/src/pages/SavTickets.tsx | 117 +++++++++++++------------------- 1 file changed, 48 insertions(+), 69 deletions(-) diff --git a/client/src/pages/SavTickets.tsx b/client/src/pages/SavTickets.tsx index 45fbf6b..21c3a2c 100644 --- a/client/src/pages/SavTickets.tsx +++ b/client/src/pages/SavTickets.tsx @@ -59,7 +59,7 @@ export default function SavTickets() { const [showCreateModal, setShowCreateModal] = useState(false); const [showDetailModal, setShowDetailModal] = useState(false); const [showEditModal, setShowEditModal] = useState(false); - const [showCommentModal, setShowCommentModal] = useState(false); + const [showDeleteModal, setShowDeleteModal] = useState(false); const [selectedTicket, setSelectedTicket] = useState(null); const [newComment, setNewComment] = useState(""); @@ -173,7 +173,6 @@ export default function SavTickets() { if (selectedTicket) { queryClient.invalidateQueries({ queryKey: [`/api/sav/tickets/${selectedTicket.id}`] }); } - setShowCommentModal(false); setNewComment(""); toast({ title: "Commentaire ajouté", @@ -301,12 +300,7 @@ export default function SavTickets() { setShowEditModal(true); }; - // Handle commenting on ticket - const handleCommentTicket = (ticket: SavTicketWithRelations) => { - setSelectedTicket(ticket); - setNewComment(""); - setShowCommentModal(true); - }; + // Handle deleting ticket const handleDeleteTicket = (ticket: SavTicketWithRelations) => { @@ -790,14 +784,9 @@ export default function SavTickets() { {canModify && ( - <> - - - + )} {canDelete && (