mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-03 16:20:27 +00:00
sort items
This commit is contained in:
parent
47f9724411
commit
0210bd3014
1 changed files with 3 additions and 1 deletions
|
@ -24,6 +24,7 @@ type (
|
|||
Search string `json:"search"`
|
||||
LocationIDs []uuid.UUID `json:"locationIds"`
|
||||
LabelIDs []uuid.UUID `json:"labelIds"`
|
||||
SortBy string `json:"sortBy"`
|
||||
}
|
||||
|
||||
ItemCreate struct {
|
||||
|
@ -252,7 +253,8 @@ func (e *ItemsRepository) QueryByGroup(ctx context.Context, gid uuid.UUID, q Ite
|
|||
}
|
||||
|
||||
items, err := mapItemsSummaryErr(
|
||||
qb.WithLabel().
|
||||
qb.Order(ent.Asc(item.FieldName)).
|
||||
WithLabel().
|
||||
WithLocation().
|
||||
All(ctx),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue