Skip to content

Commit

Permalink
feat: ✨ getEvalLogArgs 에 imperfectOnly 추가
Browse files Browse the repository at this point in the history
- close #379
  • Loading branch information
jpham005 committed Oct 31, 2023
1 parent 60c0af2 commit c5fdf09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/page/evalLog/dtos/evalLog.dto.getEvalLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export class GetEvalLogsArgs extends PaginationCursorArgs {
@Field({ defaultValue: false })
outstandingOnly: boolean;

@Field({ defaultValue: false })
imperfectOnly: boolean;

@Field((_type) => EvalLogSortOrder, {
defaultValue: EvalLogSortOrder.BEGIN_AT_DESC,
})
Expand Down
5 changes: 5 additions & 0 deletions app/src/page/evalLog/evalLog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export class EvalLogService {
corrected: correctedLogin,
projectName,
outstandingOnly,
imperfectOnly,
sortOrder,
after,
first,
Expand Down Expand Up @@ -63,6 +64,10 @@ export class EvalLogService {
filter['correcteds.id'] = corrected.id;
}

if (imperfectOnly) {
filter['finalMark'] = { $lt: 100 };
}

if (projectName) {
const projectList = await this.regexFindService.regexFindProjectPreview(
projectName,
Expand Down
2 changes: 1 addition & 1 deletion app/src/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ type Query {
getLeaderboardEvalCount: LeaderboardEval!
getLeaderboardScore: LeaderboardScore!
getLeaderboardComment: LeaderboardComment!
getEvalLogs(after: String, first: Int! = 20, corrector: String, corrected: String, projectName: String, outstandingOnly: Boolean! = false, sortOrder: EvalLogSortOrder! = BEGIN_AT_DESC): EvalLogsPaginated!
getEvalLogs(after: String, first: Int! = 20, corrector: String, corrected: String, projectName: String, outstandingOnly: Boolean! = false, imperfectOnly: Boolean! = false, sortOrder: EvalLogSortOrder! = BEGIN_AT_DESC): EvalLogsPaginated!
getSetting: Setting!
getExpTable: [ExpTable!]!
}
Expand Down

0 comments on commit c5fdf09

Please sign in to comment.