From cd1479cebbe283cd426f7ee39231699c4d932ff1 Mon Sep 17 00:00:00 2001 From: ankush_m Date: Fri, 30 Aug 2024 10:47:35 +0530 Subject: [PATCH] Revert the code changes to block the users from being promoted in the same year in which they were added to a given class --- src/adapters/hasura/altStudent.adapter.ts | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/adapters/hasura/altStudent.adapter.ts b/src/adapters/hasura/altStudent.adapter.ts index 5184debb..4b8d2448 100644 --- a/src/adapters/hasura/altStudent.adapter.ts +++ b/src/adapters/hasura/altStudent.adapter.ts @@ -174,22 +174,22 @@ export class ALTStudentService { }); } - if ( - currentClass?.Group?.academicYear?.toString() === - new Date().getFullYear().toString() - ) { - // current year matches current academic year - - return new ErrorResponse({ - errorCode: "400", - errorMessage: - "Current Academic year and grade already added (" + - currentClass.Group.academicYear + - "-" + - currentClass.Group.name + - ")", - }); - } + // current year matches current academic year + // if ( + // currentClass?.Group?.academicYear?.toString() === + // new Date().getFullYear().toString() + // ) { + + // return new ErrorResponse({ + // errorCode: "400", + // errorMessage: + // "Current Academic year and grade already added (" + + // currentClass.Group.academicYear + + // "-" + + // currentClass.Group.name + + // ")", + // }); + // } const newGrade = Number(currentClass?.Group?.grade) + 1;