Add beneficiaries informations to bookings list
Some checks failed
Build and Push Docker Image / build_and_push (push) Failing after 1m25s

This commit is contained in:
2024-11-19 15:53:40 +01:00
parent 2f760733af
commit 5f12bed2d4
3 changed files with 29 additions and 6 deletions

View File

@@ -61,9 +61,11 @@ func (h *ApplicationHandler) VehiclesManagementOverview(w http.ResponseWriter, r
}
}
driversMap, _ := h.services.GetBeneficiariesMap()
sort.Sort(sorting.VehiclesByLicencePlate(vehicles))
sort.Sort(sorting.BookingsByStartdate(bookings))
h.Renderer.VehiclesManagementOverview(w, r, vehicles, vehicles_map, bookings)
h.Renderer.VehiclesManagementOverview(w, r, vehicles, vehicles_map, driversMap, bookings)
}
func (h *ApplicationHandler) VehiclesManagementBookingsList(w http.ResponseWriter, r *http.Request) {
@@ -98,7 +100,9 @@ func (h *ApplicationHandler) VehiclesManagementBookingsList(w http.ResponseWrite
cacheid := uuid.NewString()
h.cache.PutWithTTL(cacheid, bookings, 1*time.Hour)
h.Renderer.VehiclesManagementBookingsList(w, r, vehicles_map, bookings, cacheid)
driversMap, _ := h.services.GetBeneficiariesMap()
h.Renderer.VehiclesManagementBookingsList(w, r, vehicles_map, driversMap, bookings, cacheid)
}
func (h *ApplicationHandler) VehiclesFleetAdd(w http.ResponseWriter, r *http.Request) {