feat: enable search by serial number or model number (#677)

Co-authored-by: zebrapurring <>
This commit is contained in:
zebrapurring 2024-01-18 20:46:40 +01:00 committed by GitHub
parent c4b923847a
commit f2f7809360
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -341,8 +341,10 @@ func (e *ItemsRepository) QueryByGroup(ctx context.Context, gid uuid.UUID, q Ite
item.Or( item.Or(
item.NameContainsFold(q.Search), item.NameContainsFold(q.Search),
item.DescriptionContainsFold(q.Search), item.DescriptionContainsFold(q.Search),
item.NotesContainsFold(q.Search), item.SerialNumberContainsFold(q.Search),
item.ModelNumberContainsFold(q.Search),
item.ManufacturerContainsFold(q.Search), item.ManufacturerContainsFold(q.Search),
item.NotesContainsFold(q.Search),
), ),
) )
} }