Browse Source

Add option to search for users is active join a team (#24093)

Adding a user in a team to enter a username gives a list of no active
users

---------

Co-authored-by: Jason Song <i@wolfogre.com>
tags/v1.20.0-rc0
Tyrone Yeh 1 year ago
parent
commit
ed81b608cb
No account linked to committer's email address
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      routers/web/user/search.go
  2. 1
    1
      web_src/js/features/comp/SearchUserBox.js

+ 1
- 0
routers/web/user/search.go View File

@@ -24,6 +24,7 @@ func Search(ctx *context.Context) {
Keyword: ctx.FormTrim("q"),
UID: ctx.FormInt64("uid"),
Type: user_model.UserTypeIndividual,
IsActive: ctx.FormOptionalBool("active"),
ListOptions: listOptions,
})
if err != nil {

+ 1
- 1
web_src/js/features/comp/SearchUserBox.js View File

@@ -11,7 +11,7 @@ export function initCompSearchUserBox() {
$searchUserBox.search({
minCharacters: 2,
apiSettings: {
url: `${appSubUrl}/user/search?q={query}`,
url: `${appSubUrl}/user/search?active=1&q={query}`,
onResponse(response) {
const items = [];
const searchQuery = $searchUserBox.find('input').val();

Loading…
Cancel
Save