chore: simplify team search
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
2e345c7931
commit
304cd486ba
|
@ -346,16 +346,12 @@ export default {
|
|||
const {assignees} = this.parsedQuery
|
||||
|
||||
this.teamSearchTimeout = setTimeout(async () => {
|
||||
const foundTeams = await Promise.all(assignees.map(t => {
|
||||
return this.teamService.getAll({}, {s: t})
|
||||
.then(r => {
|
||||
return r.map(t => {
|
||||
t.title = t.name
|
||||
return t
|
||||
})
|
||||
})
|
||||
}))
|
||||
this.foundTeams = foundTeams.flat()
|
||||
const teamSearchPromises = assignees.map((t) => this.teamService.getAll({}, {s: t}))
|
||||
const teamsResult = await Promise.all(teamSearchPromises)
|
||||
this.foundTeams = teamsResult.flatMap(team => {
|
||||
team.title = team.name
|
||||
return team
|
||||
})
|
||||
}, 150)
|
||||
},
|
||||
closeQuickActions() {
|
||||
|
|
Reference in New Issue