mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-18 12:47:33 +02:00
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
This commit is contained in:
1 parent
9f684eeb60
commit
890430c4c0
2 files changed
+34
-15
No files matched your search
@@ -1356,6 +1356,11 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
|
||||
const { notes } = req.body;
|
||||
|
||||
// Check if delivery is reconciled (read-only)
|
||||
if (delivery.reconciled) {
|
||||
return res.status(403).json({ message: "Impossible de modifier le commentaire d'une livraison réconciliée" });
|
||||
}
|
||||
|
||||
// Validate notes length
|
||||
if (notes && notes.length > 500) {
|
||||
return res.status(400).json({ message: "Commentaire trop long (maximum 500 caractères)" });
|
||||
|
||||
Reference in new issue
Block a user