mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix involvedUserIds calculation
This commit is contained in:
parent
29b1d44cdd
commit
2ef0fd18fc
@ -91,16 +91,13 @@ export class TransactionResolver {
|
||||
onlyCreations,
|
||||
)
|
||||
|
||||
// find involved users
|
||||
let involvedUserIds: number[] = []
|
||||
// find involved users; I am involved
|
||||
const involvedUserIds: number[] = [user.id]
|
||||
userTransactions.forEach((transaction: dbTransaction) => {
|
||||
involvedUserIds.push(transaction.userId)
|
||||
if (transaction.linkedUserId) {
|
||||
if (transaction.linkedUserId && !involvedUserIds.includes(transaction.linkedUserId)) {
|
||||
involvedUserIds.push(transaction.linkedUserId)
|
||||
}
|
||||
})
|
||||
// remove duplicates
|
||||
involvedUserIds = involvedUserIds.filter((value, index, self) => self.indexOf(value) === index)
|
||||
// We need to show the name for deleted users for old transactions
|
||||
const involvedDbUsers = await dbUser
|
||||
.createQueryBuilder()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user