This commit is contained in:
2026-05-15 11:15:30 +02:00
parent 775b9200f5
commit 3eba3e3a15
10 changed files with 71 additions and 20 deletions
+8
View File
@@ -263,6 +263,14 @@ func UpdateDeliveryStatus(c *gin.Context) {
return
}
if req.Status == "cancelled" {
cancelMsg := req.Notes
if cancelMsg == "" {
cancelMsg = "Annulé par le livreur"
}
database.SetCommandCancelReason(commandID, fmt.Sprintf("[Livreur: %s] %s", usernameStr, cancelMsg))
}
// ✅ SI PASSAGE EN "EN_ROUTE" → CALCULER ET DÉFINIR L'ETA
var etaMinutes int
var etaMessage string