Order columns in people list
This commit is contained in:
parent
9dda517b03
commit
56a2d30189
4 changed files with 171 additions and 22 deletions
|
|
@ -83,6 +83,9 @@ func Members(c *fiber.Ctx) error {
|
|||
params.PageSize = 50
|
||||
params.PersonType = "members"
|
||||
|
||||
params.OrderColumn = c.Query("c")
|
||||
params.OrderDirection = c.Query("o")
|
||||
|
||||
var sections []models.Section
|
||||
db.Order("name asc").Find(§ions, "contains_members = ? AND id IN ?", true, allowedSections)
|
||||
params.AllowedSections = allowedSections
|
||||
|
|
@ -115,6 +118,8 @@ func Members(c *fiber.Ctx) error {
|
|||
"SearchJSON": searchJSON,
|
||||
"Sections": sections,
|
||||
"Fields": fields,
|
||||
"OrderCol": params.OrderColumn,
|
||||
"OrderDir": params.OrderDirection,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue