mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add optional arg user id to admin list contributions query
This commit is contained in:
parent
e48bbd7b47
commit
ecd9efac4f
@ -383,12 +383,15 @@ export class ContributionResolver {
|
||||
{ currentPage = 1, pageSize = 3, order = Order.DESC }: Paginated,
|
||||
@Arg('statusFilter', () => [ContributionStatus], { nullable: true })
|
||||
statusFilter?: ContributionStatus[],
|
||||
@Arg('userId', () => Int, { nullable: true })
|
||||
userId?: number,
|
||||
): Promise<ContributionListResult> {
|
||||
const [dbContributions, count] = await findContributions({
|
||||
order,
|
||||
currentPage,
|
||||
pageSize,
|
||||
withDeleted: true,
|
||||
userId,
|
||||
relations: ['user'],
|
||||
statusFilter,
|
||||
})
|
||||
|
||||
@ -210,12 +210,14 @@ export const adminListContributions = gql`
|
||||
$pageSize: Int = 25
|
||||
$order: Order = DESC
|
||||
$statusFilter: [ContributionStatus!]
|
||||
$userId: Int
|
||||
) {
|
||||
adminListContributions(
|
||||
currentPage: $currentPage
|
||||
pageSize: $pageSize
|
||||
order: $order
|
||||
statusFilter: $statusFilter
|
||||
userId: $userId
|
||||
) {
|
||||
contributionCount
|
||||
contributionList {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user