Skip to content

Commit

Permalink
add ai and milestone filters
Browse files Browse the repository at this point in the history
  • Loading branch information
rdonigian authored and CarsonF committed Feb 7, 2025
1 parent fbdb13e commit 954d69b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/components/engagement/dto/list-engagements.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import {
SecuredList,
SortablePaginationInput,
} from '~/common';
import { LanguageFilters } from '../../language/dto';
import {
AIAssistedTranslation,
LanguageFilters,
LanguageMilestone,
} from '../../language/dto';
import { ProjectFilters } from '../../project/dto';
import { UserFilters } from '../../user/dto';
import {
Expand Down Expand Up @@ -73,6 +77,14 @@ export abstract class EngagementFilters {
@Type(() => DateFilter)
@ValidateNested()
readonly endDate?: DateFilter;

@Field(() => [LanguageMilestone], {
nullable: true,
})
readonly milestoneReached?: readonly LanguageMilestone[];

@Field(() => [AIAssistedTranslation], { nullable: true })
readonly usingAIAssistedTranslation?: readonly AIAssistedTranslation[];
}

@InputType()
Expand Down
2 changes: 2 additions & 0 deletions src/components/engagement/engagement.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ export const engagementFilters = filter.define(() => EngagementFilters, {
node('node', 'User'),
]),
),
milestoneReached: filter.stringListProp(),
usingAIAssistedTranslation: filter.stringListProp(),
});

export const engagementSorters = defineSorters(IEngagement, {
Expand Down

0 comments on commit 954d69b

Please sign in to comment.