diff --git a/src/models/technicalAssessmentStage.ts b/src/models/technicalAssessmentStage.ts index 1dc80f6..ee3f828 100644 --- a/src/models/technicalAssessmentStage.ts +++ b/src/models/technicalAssessmentStage.ts @@ -17,7 +17,7 @@ const technicalAssessmentSchema = new Schema({ }, status: { type: String, - enum: ["No action", "Invited", "Moved", "Rejected", "Admitted"], + enum: ["No action", "Invited", "Moved","Passed", "Rejected", "Admitted"], default: "No action", }, score: { diff --git a/src/resolvers/applicationStageResolver.ts b/src/resolvers/applicationStageResolver.ts index b3263df..029c4e1 100644 --- a/src/resolvers/applicationStageResolver.ts +++ b/src/resolvers/applicationStageResolver.ts @@ -287,11 +287,11 @@ export const applicationStageResolvers: any = { if (stageTracking) { await Shortlisted.updateOne( { applicantId, status: "No action" }, - { $set: { status: "Moved" } } + { $set: { status: "Passed" } } ); await TraineeApplicant.updateOne( { _id: applicantId }, - { $set: { applicationPhase: nextStage, status: "Moved" } } + { $set: { applicationPhase: nextStage, status: "Passed" } } ); } @@ -339,11 +339,11 @@ export const applicationStageResolvers: any = { if (stageTracking) { await TechnicalAssessment.updateOne( { applicantId, status: "No action" }, - { $set: { status: "Moved" } } + { $set: { status: "Passed" } } ); await TraineeApplicant.updateOne( { _id: applicantId }, - { $set: { applicationPhase: nextStage, status: "Moved" } } + { $set: { applicationPhase: nextStage, status: "Passed" } } ); } await InterviewAssessment.create({ @@ -389,7 +389,7 @@ export const applicationStageResolvers: any = { if (stageTracking) { await InterviewAssessment.updateOne( { applicantId, status: "No action" }, - { $set: { status: "Moved" } } + { $set: { status: "Passed" } } ); } diff --git a/src/seeders/DelTrainee.ts b/src/seeders/DelTrainee.ts index c06786f..243f68f 100755 --- a/src/seeders/DelTrainee.ts +++ b/src/seeders/DelTrainee.ts @@ -10,69 +10,7 @@ const seedDeleteTrainee = async () => { return; } - const deleteTrainee = [ - { - email: 'beniraa@gmail.com', - firstName: 'Ben', - lastName: 'iraa', - deleted_at: false, - cycle_id: cycle._id, - coverLetterUrl: "http://example.com/coverLetter.pdf", - idDocumentUrl: "http://example.com/idDocument.pdf", - resumeUrl: "http://example.com/resume.pdf" - - }, - { - email: 'testUser@gmail.com', - firstName: 'Test', - lastName: 'user', - deleted_at: false, - cycle_id: cycle._id, - coverLetterUrl: "http://example.com/coverLetter.pdf", - idDocumentUrl: "http://example.com/idDocument.pdf", - resumeUrl: "http://example.com/resume.pdf" - - - }, - { - email: 'ben@gmail.com', - firstName: 'iradukunda', - lastName: 'benjamin', - deleted_at: false, - cycle_id: cycle._id, - coverLetterUrl: "http://example.com/coverLetter.pdf", - idDocumentUrl: "http://example.com/idDocument.pdf", - resumeUrl: "http://example.com/resume.pdf" - - - }, - { - email: 'carlos@gmail.com', - firstName: 'carlos', - lastName: 'Bz', - deleted_at: false, - cycle_id: cycle._id, - coverLetterUrl: "http://example.com/coverLetter.pdf", - idDocumentUrl: "http://example.com/idDocument.pdf", - resumeUrl: "http://example.com/resume.pdf" - - - }, - { - email: 'nshuti@gmail.com', - firstName: 'blaise', - lastName: 'k', - deleted_at: false, - cycle_id: cycle._id, - coverLetterUrl: "http://example.com/coverLetter.pdf", - idDocumentUrl: "http://example.com/idDocument.pdf", - resumeUrl: "http://example.com/resume.pdf" - - - }, - ]; - await TraineeApplicant.deleteMany({ deleteTrainee }); - await TraineeApplicant.insertMany(deleteTrainee); + await TraineeApplicant.deleteMany({}); await traineEAttributes.deleteMany({}); return null; }