Add MCP server

This commit is contained in:
Arnaud Delcasse
2025-11-03 11:45:23 +01:00
parent d992a7984f
commit 52de8d363e
18 changed files with 997 additions and 210 deletions

View File

@@ -17,9 +17,11 @@ func (r *XLSXRenderer) SolidarityTransportBookings(w http.ResponseWriter, result
// Build headers dynamically based on configuration
headers := []string{
"ID Réservation",
"ID Groupe",
"Statut",
"Motif de réservation",
"Raison d'annulation",
"Remplacé par (ID)",
"Date de prise en charge",
"Heure de prise en charge",
}
@@ -102,6 +104,7 @@ func (r *XLSXRenderer) SolidarityTransportBookings(w http.ResponseWriter, result
// Booking information
row = append(row, booking.Id)
row = append(row, booking.GroupId)
row = append(row, booking.Status)
// Motivation (from booking.Data)
@@ -122,6 +125,15 @@ func (r *XLSXRenderer) SolidarityTransportBookings(w http.ResponseWriter, result
}
row = append(row, cancellationReason)
// Replaced by (from booking.Data)
replacedBy := ""
if booking.Data != nil {
if replacedByVal, ok := booking.Data["replaced_by"]; ok && replacedByVal != nil {
replacedBy = fmt.Sprint(replacedByVal)
}
}
row = append(row, replacedBy)
// Journey date and time
if booking.Journey != nil {
row = append(row, booking.Journey.PassengerPickupDate.Format("2006-01-02"))