Field position management

This commit is contained in:
William Bouzourène 2025-02-11 13:44:53 +01:00
parent aaad6ae454
commit 03b1f92886
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
6 changed files with 138 additions and 12 deletions

View file

@ -278,7 +278,7 @@ func ContactsExport(c *fiber.Ctx) error {
}
var fields []models.Field
db.Order("name collate nocase asc").Preload(
db.Order("position asc").Preload(
"List",
).Find(
&fields, "person_type = ?", "contact",
@ -465,7 +465,7 @@ func ContactShow(c *fiber.Ctx) error {
)
var fields []models.Field
db.Order("name collate nocase asc").Preload(
db.Order("position asc").Preload(
"List",
).Find(
&fields, "person_type = ?", "contact",
@ -528,7 +528,7 @@ func ContactAdd(c *fiber.Ctx) error {
var fields []models.Field
db.Preload("List").Preload("List.ListItems").Order(
"name collate nocase asc",
"position asc",
).Find(
&fields, "person_type = ?", "contact",
)
@ -774,7 +774,7 @@ func ContactEdit(c *fiber.Ctx) error {
var fields []models.Field
db.Preload("List").Preload("List.ListItems").Order(
"name collate nocase asc",
"position asc",
).Find(
&fields, "person_type = ?", "contact",
)