feat: add ungrouped filter to account

This commit is contained in:
Hg
2026-03-19 15:42:21 +08:00
parent 9f6ab6b817
commit 8027531d07
9 changed files with 47 additions and 4 deletions

View File

@@ -473,7 +473,9 @@ func (r *accountRepository) ListWithFilters(ctx context.Context, params paginati
if search != "" {
q = q.Where(dbaccount.NameContainsFold(search))
}
if groupID > 0 {
if groupID == service.AccountListGroupUngrouped {
q = q.Where(dbaccount.Not(dbaccount.HasAccountGroups()))
} else if groupID > 0 {
q = q.Where(dbaccount.HasAccountGroupsWith(dbaccountgroup.GroupIDEQ(groupID)))
}