File tree Expand file tree Collapse file tree 3 files changed +49
-3
lines changed
Expand file tree Collapse file tree 3 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 11import ApplicantRecordService from "../../services/implementations/applicantRecordService" ;
22import IApplicantRecordService from "../../services/interfaces/applicantRecordService" ;
3- import { ApplicantRecordDTO } from "../../types" ;
3+ import { ApplicantRecordDTO , ApplicationStatus } from "../../types" ;
44
55const applicantRecordService : IApplicantRecordService =
66 new ApplicantRecordService ( ) ;
77
88const applicantRecordResolvers = {
99 Mutation : {
10+ updateApplicantStatus : async (
11+ _parent : undefined ,
12+ {
13+ applicantRecordId,
14+ status,
15+ } : { applicantRecordId : string ; status : ApplicationStatus } ,
16+ ) : Promise < ApplicantRecordDTO > => {
17+ const applicantRecord =
18+ await applicantRecordService . updateApplicantStatus (
19+ applicantRecordId ,
20+ status ,
21+ ) ;
22+ return applicantRecord ;
23+ } ,
24+ bulkUpdateApplicantStatus : async (
25+ _parent : undefined ,
26+ {
27+ applicantRecordIds,
28+ status,
29+ } : { applicantRecordIds : string [ ] ; status : ApplicationStatus } ,
30+ ) : Promise < ApplicantRecordDTO [ ] > => {
31+ const applicantRecords =
32+ await applicantRecordService . bulkUpdateApplicantStatus (
33+ applicantRecordIds ,
34+ status ,
35+ ) ;
36+ return applicantRecords ;
37+ } ,
1038 setApplicantRecordFlag : async (
1139 _parent : undefined ,
1240 {
Original file line number Diff line number Diff line change 11import { gql } from "apollo-server-express" ;
22
33const applicantRecordType = gql `
4+ enum ApplicationStatus {
5+ Applied
6+ InReview
7+ Reviewed
8+ Selected
9+ Interviewed
10+ Offer
11+ Rejected
12+ }
13+
414 type ApplicantRecordDTO {
515 id: String!
616 applicantId: String!
717 position: String!
818 roleSpecificQuestions: [String!]!
919 choice: Int!
10- status: String !
20+ status: ApplicationStatus !
1121 skillCategory: String
1222 combined_score: Int
1323 isApplicantFlagged: Boolean!
1424 }
1525
1626 extend type Mutation {
27+ updateApplicantStatus(
28+ applicantRecordId: String!
29+ status: ApplicationStatus!
30+ ): ApplicantRecordDTO!
31+ bulkUpdateApplicantStatus(
32+ applicantRecordIds: [String!]!
33+ status: ApplicationStatus!
34+ ): [ApplicantRecordDTO!]!
1735 setApplicantRecordFlag(
1836 applicantRecordId: String!
1937 flagValue: Boolean!
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export type ApplicantRecordDTO = {
9191
9292export type ApplicationStatus =
9393 | "Applied"
94- | "In Review "
94+ | "InReview "
9595 | "Reviewed"
9696 | "Selected"
9797 | "Interviewed"
You can’t perform that action at this time.
0 commit comments