mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
improve item sorting
This commit is contained in:
parent
6451bd5926
commit
d59a55f8c3
1 changed files with 2 additions and 2 deletions
|
|
@ -139,13 +139,13 @@ func handleBookingPage(bs *booking.Service, hc *config.Host) echo.HandlerFunc {
|
|||
return sum + i.Price*float64(i.Quantity)
|
||||
}, 0.0), 'f', 2, 64),
|
||||
Platforms: hc.Platforms,
|
||||
ItemList: u.OrderBy(func(items map[string]config.HostItem) (out []string) {
|
||||
ItemList: u.OrderBy(func(items map[string]config.HostItem) (out []string) { // TODO: return the full item to prefill the form
|
||||
for _, item := range items {
|
||||
out = append(out, item.Name)
|
||||
}
|
||||
return out
|
||||
}(hc.Items),
|
||||
func(l, r string) bool { return l < r },
|
||||
func(l, r string) bool { return l > r },
|
||||
),
|
||||
PaymentMethods: hc.PaymentMethods,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue