Compare commits
3 Commits
efcc72c50e
...
b6643d012f
Author | SHA1 | Date |
---|---|---|
Jaya Surya P | b6643d012f | |
NitinVangipuram | 18c3d9b046 | |
NitinVangipuram | 32fb8c5d6a |
|
@ -84,11 +84,9 @@ def addPlacement(request):
|
|||
# Add a contact person details in the opening
|
||||
opening.contact_person_name = data[CONTACT_PERSON_NAME]
|
||||
# Check if Phone number is Integer
|
||||
if data[PHONE_NUMBER].isdigit():
|
||||
opening.phone_number = int(data[PHONE_NUMBER])
|
||||
else:
|
||||
raise ValueError('Phone number should be integer')
|
||||
|
||||
|
||||
opening.phone_number = data[PHONE_NUMBER]
|
||||
|
||||
opening.email = data[EMAIL]
|
||||
|
||||
# Add a company location in the opening
|
||||
|
|
|
@ -10,6 +10,7 @@ BRANCH_CHOICES = [
|
|||
['EP', 'EP'],
|
||||
['CIVIL', 'CIVIL'],
|
||||
['CHEMICAL', 'CHEMICAL'],
|
||||
['MNC','MNC']
|
||||
]
|
||||
ELIGIBLE_CHOICES = [
|
||||
["Btech", "Btech"],
|
||||
|
@ -41,6 +42,7 @@ BATCHES = [ #change it accordingly
|
|||
"2020",
|
||||
]
|
||||
BATCH_CHOICES = [
|
||||
["2023","2023"],
|
||||
["2022", "2022"],
|
||||
["2021", "2021"],
|
||||
["2020", "2020"],
|
||||
|
@ -65,7 +67,7 @@ TIERS = [
|
|||
['7', 'Tier 7'],
|
||||
['8', 'Open Tier'],
|
||||
]
|
||||
|
||||
bTech = 'Btech'
|
||||
# not being used anywhere
|
||||
DEGREE_CHOICES = [
|
||||
['bTech', 'B.Tech'],
|
||||
|
@ -84,7 +86,10 @@ CDC_REPS_EMAILS = [
|
|||
"satyapriya.gupta@iitdh.ac.in",
|
||||
"dhriti.ghosh@iitdh.ac.in",
|
||||
"suvamay.jana@iitdh.ac.in",
|
||||
"ramesh.nayaka@iitdh.ac.in"
|
||||
"ramesh.nayaka@iitdh.ac.in",
|
||||
"210010003@iitdh.ac.in",
|
||||
"210010046@iitdh.ac.in",
|
||||
"210030035@iitdh.ac.in",
|
||||
]
|
||||
CDC_REPS_EMAILS_FOR_ISSUE=[ #add reps emails
|
||||
"cdc.support@iitdh.ac.in",
|
||||
|
|
|
@ -92,7 +92,7 @@ class Placement(models.Model):
|
|||
default=list, blank=True)
|
||||
is_company_details_pdf = models.BooleanField(blank=False, default=False)
|
||||
contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT)
|
||||
phone_number = models.PositiveBigIntegerField(blank=False)
|
||||
phone_number = models.CharField(max_length=15, blank=False)
|
||||
email = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
|
||||
city = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
|
||||
state = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
|
||||
|
@ -383,7 +383,7 @@ class Internship(models.Model):
|
|||
is_selection_procedure_details_pdf = models.BooleanField(blank=False, default=False)
|
||||
#contact details of company person
|
||||
contact_person_name = models.CharField(blank=False, max_length=JNF_TEXT_MAX_CHARACTER_COUNT)
|
||||
phone_number = models.PositiveBigIntegerField(blank=False)
|
||||
phone_number = models.CharField(max_length=15, blank=False)
|
||||
email = models.EmailField(blank=False)
|
||||
# contact_person_designation = models.CharField(blank=False, max_length=JNF_SMALLTEXT_MAX_CHARACTER_COUNT, default="")
|
||||
# telephone_number = models.PositiveBigIntegerField(blank=True, default=None, null=True)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
from datetime import datetime as dt
|
||||
from rest_framework.decorators import api_view
|
||||
from django.db.models import Q
|
||||
|
||||
|
@ -104,7 +105,7 @@ def getDashboard(request, id, email, user_type):
|
|||
filters = Q(
|
||||
allowed_branch__contains=[studentDetails.branch],
|
||||
eligiblestudents__contains=[studentDetails.degree],
|
||||
deadline_datetime__gte=datetime.now(),
|
||||
deadline_datetime__gte=dt.now(),
|
||||
offer_accepted=True,
|
||||
email_verified=True
|
||||
)
|
||||
|
|
|
@ -238,38 +238,38 @@ def PlacementApplicationConditions(student, placement):
|
|||
PPO_PSU = [i for i in PPO if i.tier == 'psu']
|
||||
# find length of PPO
|
||||
if len(selected_companies) + len(PPO) >= MAX_OFFERS_PER_STUDENT:
|
||||
raise PermissionError("Max Applications Reached for the Season")
|
||||
raise PermissionError("Max Applications Reached for the Season1")
|
||||
|
||||
if len(selected_companies_PSU) > 0:
|
||||
raise PermissionError('Selected for PSU Can\'t apply anymore')
|
||||
raise PermissionError('Selected for PSU Can\'t apply anymore2')
|
||||
|
||||
if len(PPO_PSU) > 0:
|
||||
raise PermissionError('Selected for PSU Can\'t apply anymore')
|
||||
raise PermissionError('Selected for PSU Can\'t apply anymore3')
|
||||
|
||||
if placement.tier == 'psu':
|
||||
return True, "Conditions Satisfied"
|
||||
|
||||
for i in selected_companies:
|
||||
if 1.5 * i.compensation_CTC > placement.compensation_CTC:
|
||||
if 1.5 * i.placement.compensation_CTC > placement.compensation_CTC:
|
||||
return False, "Can't apply for this Placement, 1.5 times CTC condition not satisfied"
|
||||
|
||||
for i in PPO:
|
||||
if 1.5 * i.compensation_CTC > placement.compensation_CTC:
|
||||
if 1.5 * i.compensation > placement.compensation_CTC:
|
||||
return False, "Can't apply for this Placement, 1.5 times CTC condition not satisfied"
|
||||
if student.degree not in placement.eligiblestudents:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
if student.degree == 'bTech' and student.batch not in placement.allowed_batch:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement4")
|
||||
if student.degree == bTech and student.batch not in placement.allowed_batch:
|
||||
raise PermissionError("Can't apply for this placement5")
|
||||
if student.branch not in placement.allowed_branch:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement6")
|
||||
if student.can_apply == False:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement7")
|
||||
if student.isBacklog == True and placement.backlog_eligible == False:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement8")
|
||||
if student.isPwd == True and placement.pwd_eligible == False:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement9")
|
||||
if placement.cpi_eligible > student.cpi:
|
||||
raise PermissionError("Can't apply for this placement")
|
||||
raise PermissionError("Can't apply for this placement10")
|
||||
|
||||
return True, "Conditions Satisfied"
|
||||
|
||||
|
|
Loading…
Reference in New Issue