Order columns in people list
This commit is contained in:
parent
9dda517b03
commit
56a2d30189
4 changed files with 171 additions and 22 deletions
|
|
@ -68,6 +68,9 @@ func Contacts(c *fiber.Ctx) error {
|
|||
params.PageSize = 50
|
||||
params.PersonType = "contacts"
|
||||
|
||||
params.OrderColumn = c.Query("c")
|
||||
params.OrderDirection = c.Query("o")
|
||||
|
||||
var sections []models.Section
|
||||
db.Order("name asc").Find(§ions, "contains_contacts = ? AND id IN ?", true, allowedSections)
|
||||
params.AllowedSections = allowedSections
|
||||
|
|
@ -100,6 +103,8 @@ func Contacts(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