From e4418f26e0fa18daf081d70e66ba581c60ebc244 Mon Sep 17 00:00:00 2001 From: soukainna Date: Mon, 6 Mar 2023 10:25:16 +0100 Subject: [PATCH] fix err --- handlers/application/administration.go | 41 -------------------------- 1 file changed, 41 deletions(-) diff --git a/handlers/application/administration.go b/handlers/application/administration.go index 63ca02f..55d40ca 100644 --- a/handlers/application/administration.go +++ b/handlers/application/administration.go @@ -398,21 +398,6 @@ func (h ApplicationHandler) AdminStatVehicles(w http.ResponseWriter, r *http.Req //vehicles := []fleetsstorage.Vehicle{} bookings := []fleetsstorage.Booking{} - //vehicles_map := map[string]fleetsstorage.Vehicle{} - - // for _, vehicle := range resp.Vehicles { - // if filteVehicle(r, vehicle) { - // v := vehicle.ToStorageType() - // vehicles = append(vehicles, v) - // vehicles_map[v.ID] = v - // for _, b := range v.Bookings { - // if b.Status() != fleetsstorage.StatusOld { - // bookings = append(bookings, b) - // } - // } - - // } - // } administrators := []string{} reequest := &fleets.GetVehiclesRequest{ Namespaces: []string{"parcoursmob"}, @@ -458,32 +443,6 @@ func (h ApplicationHandler) AdminStatVehicles(w http.ResponseWriter, r *http.Req } } - //fmt.Println(groups) - //fmt.Println("****************************************************************") - // fmt.Println(vehicles) - // fmt.Println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$") - // id := "" - // for _, v := range vehicles { - // id = v.ID - // for _, vv := range v.Bookings { - - // i := 1 - // // fmt.Println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$") - // // fmt.Println(vv.Vehicleid) - // // fmt.Println("*********************************************************") - // if id == vv.Vehicleid { - // i++ - // fmt.Println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$") - // fmt.Println(vv.Vehicleid) - // fmt.Println("*********************************************************") - // } - // fmt.Println(i) - - // } - // fmt.Println(v.Status) - // fmt.Println("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$") - //} - // fmt.Println(bookings) sort.Sort(sorting.VehiclesByLicencePlate(vehicles)) sort.Sort(sorting.BookingsByStartdate(bookings)) h.Renderer.AdminStatVehicles(w, r, vehicles, bookings, groups)