Skip to content

Commit

Permalink
feat: Expose screening invitations to send (#962)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Wilms <[email protected]>
  • Loading branch information
Jonasdoubleyou and Jonas Wilms authored Feb 4, 2024
1 parent b4bbf15 commit fb8f8a1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions graphql/match_pool/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
getPupilsToContactNext,
getInterestConfirmationRate,
validatePoolToggles,
screeningInvitationsToSend,
} from '../../common/match/pool';
import { Role } from '../authorizations';
import { JSONResolver } from 'graphql-scalars';
Expand Down Expand Up @@ -138,6 +139,16 @@ export class FieldsMatchPoolResolver {
return await confirmationRequestsToSend(matchPool);
}

@FieldResolver((returns) => Int)
@Authorized(Role.ADMIN)
async screeningInvitationsToSend(@Root() matchPool: MatchPoolType) {
if (!matchPool.toggles.includes('pupil-screening-pending')) {
return 0;
}

return await screeningInvitationsToSend(matchPool);
}

@FieldResolver((returns) => [Pupil])
@Authorized(Role.ADMIN)
async pupilsToRequestInterest(@Root() matchPool: MatchPoolType) {
Expand Down

0 comments on commit fb8f8a1

Please sign in to comment.