diff --git a/handlers/application/vehicles-management.go b/handlers/application/vehicles-management.go index e91bb66..29201ad 100644 --- a/handlers/application/vehicles-management.go +++ b/handlers/application/vehicles-management.go @@ -52,14 +52,14 @@ func (h *ApplicationHandler) VehiclesManagementOverview(w http.ResponseWriter, r } } - vehiicles := []fleetsstorage.Vehicle{} - for i, vehiicle := range resp.Vehicles { - if len(resp.Vehicles[i].Bookings) == 0 { - v := vehiicle.ToStorageType() - vehiicles = append(vehiicles, v) - } - } - fmt.Println(vehiicles) + // vehiicles := []fleetsstorage.Vehicle{} + // for i, vehiicle := range resp.Vehicles { + // if len(resp.Vehicles[i].Bookings) == 0 { + // v := vehiicle.ToStorageType() + // vehiicles = append(vehiicles, v) + // } + // } + //fmt.Println(vehiicles) sort.Sort(sorting.VehiclesByLicencePlate(vehicles)) sort.Sort(sorting.BookingsByStartdate(bookings)) h.Renderer.VehiclesManagementOverview(w, r, vehicles, vehicles_map, bookings) @@ -190,10 +190,10 @@ func (h *ApplicationHandler) VehiclesFleetDisplay(w http.ResponseWriter, r *http w.WriteHeader(http.StatusInternalServerError) return } - if len(resp.Vehicle.ToStorageType().Bookings) == 0 { - fmt.Println("lol") - } - fmt.Println(resp.Vehicle.ToStorageType().Bookings) + // if len(resp.Vehicle.ToStorageType().Bookings) == 0 { + // fmt.Println("lol") + // } + // fmt.Println(resp.Vehicle.ToStorageType().Bookings) h.Renderer.VehiclesFleetDisplay(w, r, resp.Vehicle.ToStorageType()) }