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 { Context, getUser } from '@/server/context'
|
||||||
import { Resolver, Query, Args, Authorized, Ctx, Mutation } from 'type-graphql'
|
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'
|
import { sendTransactionReceivedEmail } from '@/mailer/sendTransactionReceivedEmail'
|
||||||
|
|
||||||
@ -224,11 +224,11 @@ export class TransactionResolver {
|
|||||||
logger.debug(`involvedUserIds=${involvedUserIds}`)
|
logger.debug(`involvedUserIds=${involvedUserIds}`)
|
||||||
|
|
||||||
// We need to show the name for deleted users for old transactions
|
// We need to show the name for deleted users for old transactions
|
||||||
const involvedDbUsers = await dbUser
|
const involvedDbUsers = await dbUser.find({
|
||||||
.createQueryBuilder()
|
where: { id: In(involvedUserIds) },
|
||||||
.withDeleted()
|
withDeleted: true,
|
||||||
.where('id IN (:...userIds)', { userIds: involvedUserIds })
|
relations: ['emailContact'],
|
||||||
.getMany()
|
})
|
||||||
const involvedUsers = involvedDbUsers.map((u) => new User(u))
|
const involvedUsers = involvedDbUsers.map((u) => new User(u))
|
||||||
logger.debug(`involvedUsers=${involvedUsers}`)
|
logger.debug(`involvedUsers=${involvedUsers}`)
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,7 @@ export const transactionsQuery = gql`
|
|||||||
linkedUser {
|
linkedUser {
|
||||||
firstName
|
firstName
|
||||||
lastName
|
lastName
|
||||||
|
email
|
||||||
}
|
}
|
||||||
decay {
|
decay {
|
||||||
decay
|
decay
|
||||||
@ -44,9 +45,6 @@ export const transactionsQuery = gql`
|
|||||||
end
|
end
|
||||||
duration
|
duration
|
||||||
}
|
}
|
||||||
linkedUser {
|
|
||||||
email
|
|
||||||
}
|
|
||||||
transactionLinkId
|
transactionLinkId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user