From 84aee20208ed5d83e9da5fb3afe8afbc1c2190cd Mon Sep 17 00:00:00 2001 From: zebrapurring <103900164+zebrapurring@users.noreply.github.com> Date: Thu, 18 Jan 2024 20:46:40 +0100 Subject: [PATCH] feat: enable search by serial number or model number (#677) Co-authored-by: zebrapurring <> Former-commit-id: f2f780936066eb5bb3dbbdbe0d0f9ef319662e73 --- backend/internal/data/repo/repo_items.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/internal/data/repo/repo_items.go b/backend/internal/data/repo/repo_items.go index a454c1b1..53f21a4a 100644 --- a/backend/internal/data/repo/repo_items.go +++ b/backend/internal/data/repo/repo_items.go @@ -341,8 +341,10 @@ func (e *ItemsRepository) QueryByGroup(ctx context.Context, gid uuid.UUID, q Ite item.Or( item.NameContainsFold(q.Search), item.DescriptionContainsFold(q.Search), - item.NotesContainsFold(q.Search), + item.SerialNumberContainsFold(q.Search), + item.ModelNumberContainsFold(q.Search), item.ManufacturerContainsFold(q.Search), + item.NotesContainsFold(q.Search), ), ) }