From 686532f4a720992c289cd54a63efc8e0fc653777 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 14 Aug 2025 12:19:59 +0000 Subject: [PATCH] Restructure ticket details to show tracking and priority options separately Update the SAV ticket detail modal to a two-column layout. The left column displays ticket details, priority, and resolution level. The right column features the comment and follow-up system. 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 | 97 ++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 20 deletions(-) diff --git a/client/src/pages/SavTickets.tsx b/client/src/pages/SavTickets.tsx index 21c3a2c..8cb766d 100644 --- a/client/src/pages/SavTickets.tsx +++ b/client/src/pages/SavTickets.tsx @@ -63,6 +63,8 @@ export default function SavTickets() { const [showDeleteModal, setShowDeleteModal] = useState(false); const [selectedTicket, setSelectedTicket] = useState(null); const [newComment, setNewComment] = useState(""); + const [tempPriority, setTempPriority] = useState(""); + const [tempStatus, setTempStatus] = useState(""); const [formData, setFormData] = useState({ supplierId: "", groupId: "", @@ -808,16 +810,18 @@ export default function SavTickets() { {/* Detail Modal */} {selectedTicket && ( - + Détails du ticket {selectedTicket.ticketNumber} - Informations complètes du ticket SAV + Informations complètes du ticket SAV et suivi -
- {/* Product Info */} -
+
+ {/* Colonne de gauche - Détails et Actions */} +
+ {/* Product Info */} +

Informations produit

@@ -833,10 +837,9 @@ export default function SavTickets() {

{selectedTicket.productDesignation}

-
- {/* Problem Info */} -
+ {/* Problem Info */} +

Problème

@@ -854,11 +857,10 @@ export default function SavTickets() {

{selectedTicket.problemDescription}

-
- {/* Client Info */} - {(selectedTicket.clientName || selectedTicket.clientPhone) && ( -
+ {/* Client Info */} + {(selectedTicket.clientName || selectedTicket.clientPhone) && ( +

Client

@@ -870,11 +872,10 @@ export default function SavTickets() {

{selectedTicket.clientPhone || "Non renseigné"}

-
- )} + )} - {/* Ticket Info */} -
+ {/* Ticket Info */} +

Informations ticket

@@ -896,15 +897,67 @@ export default function SavTickets() {

{safeFormat(selectedTicket.createdAt, 'dd/MM/yyyy HH:mm')}

+ + {/* Actions rapides */} + {canModify && ( +
+

Actions rapides

+
+
+ + +
+ +
+ + +
+
+
+ )}
- {/* Historique et commentaires */} -
+ {/* Colonne de droite - Commentaires et Suivi */} +

Historique et commentaires

{/* Affichage de l'historique existant */} - {ticketDetails?.history && ticketDetails.history.length > 0 && ( -
+ {ticketDetails?.history && ticketDetails.history.length > 0 ? ( +
{ticketDetails.history.map((entry: any, index: number) => (
@@ -922,6 +975,10 @@ export default function SavTickets() {
))}
+ ) : ( +
+ Aucun commentaire pour le moment +
)} {/* Champ d'ajout de commentaire */}