From 890430c4c08145d0cef295fe80517b5d9222aa3c Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Tue, 9 Sep 2025 13:31:42 +0000 Subject: [PATCH] Make delivery comments read-only after reconciliation Disables editing and displays a read-only status for delivery comments once reconciliation is validated, preventing modifications to comments on reconciled deliveries. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/yiEpJFx --- client/src/pages/BLReconciliation.tsx | 44 ++++++++++++++++++--------- server/routes.ts | 5 +++ 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/client/src/pages/BLReconciliation.tsx b/client/src/pages/BLReconciliation.tsx index 1ee3c86..05dcbe3 100644 --- a/client/src/pages/BLReconciliation.tsx +++ b/client/src/pages/BLReconciliation.tsx @@ -985,8 +985,8 @@ export default function BLReconciliation() { variant="outline" size="sm" onClick={() => handleOpenCommentModal(delivery)} - className={`h-8 w-8 p-0 ${delivery.notes ? 'text-blue-600 hover:text-blue-700' : 'text-gray-400 hover:text-gray-600'}`} - title={delivery.notes ? "Voir/Modifier commentaire" : "Ajouter commentaire"} + className={`h-8 w-8 p-0 ${delivery.notes ? 'text-blue-600 hover:text-blue-700' : 'text-gray-400 hover:text-gray-600'} ${delivery.reconciled ? 'opacity-70' : ''}`} + title={delivery.reconciled ? (delivery.notes ? "Voir commentaire (lecture seule)" : "Aucun commentaire") : (delivery.notes ? "Voir/Modifier commentaire" : "Ajouter commentaire")} > @@ -1199,8 +1199,8 @@ export default function BLReconciliation() { delivery.notes ? 'text-blue-600 hover:text-blue-700 hover:bg-blue-50' : 'text-gray-400 hover:text-gray-600 hover:bg-gray-50' - }`} - title={delivery.notes ? "Voir/Modifier commentaire" : "Ajouter commentaire"} + } ${delivery.reconciled ? 'opacity-70' : ''}`} + title={delivery.reconciled ? (delivery.notes ? "Voir commentaire (lecture seule)" : "Aucun commentaire") : (delivery.notes ? "Voir/Modifier commentaire" : "Ajouter commentaire")} > @@ -1389,6 +1389,9 @@ export default function BLReconciliation() { Commentaire de livraison + {selectedDeliveryForComment?.reconciled && ( + Lecture seule + )} @@ -1411,15 +1414,24 @@ export default function BLReconciliation() {