fix err
This commit is contained in:
parent
a05942b7ed
commit
e4418f26e0
|
@ -398,21 +398,6 @@ func (h ApplicationHandler) AdminStatVehicles(w http.ResponseWriter, r *http.Req
|
||||||
|
|
||||||
//vehicles := []fleetsstorage.Vehicle{}
|
//vehicles := []fleetsstorage.Vehicle{}
|
||||||
bookings := []fleetsstorage.Booking{}
|
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{}
|
administrators := []string{}
|
||||||
reequest := &fleets.GetVehiclesRequest{
|
reequest := &fleets.GetVehiclesRequest{
|
||||||
Namespaces: []string{"parcoursmob"},
|
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.VehiclesByLicencePlate(vehicles))
|
||||||
sort.Sort(sorting.BookingsByStartdate(bookings))
|
sort.Sort(sorting.BookingsByStartdate(bookings))
|
||||||
h.Renderer.AdminStatVehicles(w, r, vehicles, bookings, groups)
|
h.Renderer.AdminStatVehicles(w, r, vehicles, bookings, groups)
|
||||||
|
|
Loading…
Reference in New Issue