mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #2268 from gradido/fix-linked-user-email
fix: Linked User Email in Transaction List
This commit is contained in:
commit
52d84dd43c
@ -6,7 +6,7 @@ import CONFIG from '@/config'
|
||||
|
||||
import { Context, getUser } from '@/server/context'
|
||||
import { Resolver, Query, Args, Authorized, Ctx, Mutation } from 'type-graphql'
|
||||
import { getCustomRepository, getConnection } from '@dbTools/typeorm'
|
||||
import { getCustomRepository, getConnection, In } from '@dbTools/typeorm'
|
||||
|
||||
import { sendTransactionReceivedEmail } from '@/mailer/sendTransactionReceivedEmail'
|
||||
|
||||
@ -224,11 +224,11 @@ export class TransactionResolver {
|
||||
logger.debug(`involvedUserIds=${involvedUserIds}`)
|
||||
|
||||
// We need to show the name for deleted users for old transactions
|
||||
const involvedDbUsers = await dbUser
|
||||
.createQueryBuilder()
|
||||
.withDeleted()
|
||||
.where('id IN (:...userIds)', { userIds: involvedUserIds })
|
||||
.getMany()
|
||||
const involvedDbUsers = await dbUser.find({
|
||||
where: { id: In(involvedUserIds) },
|
||||
withDeleted: true,
|
||||
relations: ['emailContact'],
|
||||
})
|
||||
const involvedUsers = involvedDbUsers.map((u) => new User(u))
|
||||
logger.debug(`involvedUsers=${involvedUsers}`)
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ export const transactionsQuery = gql`
|
||||
linkedUser {
|
||||
firstName
|
||||
lastName
|
||||
email
|
||||
}
|
||||
decay {
|
||||
decay
|
||||
@ -44,9 +45,6 @@ export const transactionsQuery = gql`
|
||||
end
|
||||
duration
|
||||
}
|
||||
linkedUser {
|
||||
email
|
||||
}
|
||||
transactionLinkId
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user