Skip to content

PM-1110 report for payment load #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor PR fixes
  • Loading branch information
vas3a committed Jun 4, 2025
commit e281c16ab6fce26cd69fbbc147e44ad9678c0595
5 changes: 2 additions & 3 deletions src/api/reports/reports.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export class ReportsService {
if (filters.minPaymentAmount || filters.maxPaymentAmount) {
Object.assign(queryFilters, {
total_amount: {
...(filters.startDate && { gte: filters.minPaymentAmount }),
...(filters.endDate && { lte: filters.maxPaymentAmount }),
...(filters.minPaymentAmount && { gte: filters.minPaymentAmount }),
...(filters.maxPaymentAmount && { lte: filters.maxPaymentAmount }),
},
});
}
Expand Down Expand Up @@ -103,7 +103,6 @@ export class ReportsService {
},
},
},
take: 10,
});

this.logger.debug(`Fetched ${payments.length} payments from the database`);
Expand Down
8 changes: 4 additions & 4 deletions src/dto/reports.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export class PaymentsReportQueryDto {
billingAccountIds?: string[];

@ApiProperty({
description: 'List of challenge IDs',
example: ['e74c3e37-73c9-474e-a838-a38dd4738906'],
description: 'Challenge name to search for',
example: ['Task Payment for member'],
})
@IsOptional()
@IsString()
Expand Down Expand Up @@ -74,7 +74,7 @@ export class PaymentsReportQueryDto {
})
@IsOptional()
@IsNumber()
@Transform(({ value }) => +value)
@Transform(({ value }) => parseFloat(value))
minPaymentAmount?: number;

@ApiProperty({
Expand All @@ -83,7 +83,7 @@ export class PaymentsReportQueryDto {
})
@IsOptional()
@IsNumber()
@Transform(({ value }) => +value)
@Transform(({ value }) => parseFloat(value))
maxPaymentAmount?: number;
}

Expand Down
2 changes: 1 addition & 1 deletion src/shared/topcoder/members.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TopcoderMembersService {
const uniqFilterValues = [...new Set(filterValue.filter(Boolean)).values()];

this.logger.debug(
`Fething members info with filters ${filter}=${JSON.stringify(uniqFilterValues)}, and fields ${fields.join(',')}`,
`Fetching members info with filters ${filter}=${JSON.stringify(uniqFilterValues)}, and fields ${fields.join(',')}`,
);

let m2mToken: string | undefined;
Expand Down