Skip to content

Commit 09a2e78

Browse files
authored
PlacementModuleWeb (#1322)
* urls * added apply for jobs and upload documents * added options for TPO and Chairman * PLacement Schedule method * Added PLacement Statistics * Features added resume,update placement data ,notiication , add schedule * fixed ui issue placement.html * send invitation, check invitaion status ,resolved other minor bugs
1 parent a1b74ef commit 09a2e78

File tree

12 files changed

+1768
-78
lines changed

12 files changed

+1768
-78
lines changed

FusionIIIT/applications/placement_cell/forms.py

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,7 @@ def clean_company_name(self):
483483

484484
return company_name
485485

486+
486487
def current_year():
487488
return date.today().year
488489

@@ -545,6 +546,87 @@ class SearchPbiRecord(forms.Form):
545546
label="cname", required=False)
546547

547548

549+
550+
class SendInvitation(forms.Form):
551+
"""
552+
The form is used to send invite to students about upcoming placement or pbi events.
553+
@variables:
554+
company - name of company
555+
"""
556+
company = forms.ModelChoiceField(required=True, queryset=NotifyStudent.objects.all(), label="company")
557+
rollno = forms.IntegerField(label="rollno", widget=forms.NumberInput(attrs={'min': 0}), required=False)
558+
programme = forms.ChoiceField(choices = Con.PROGRAMME, required=False,
559+
label="programme", widget=forms.Select(attrs={'style': "height:45px",
560+
'onchange': "changeDeptForSend()",
561+
'id': "id_programme_send"}))
562+
563+
dep_btech = forms.MultipleChoiceField(choices = Constants.BTECH_DEP, required=False, label="department",
564+
widget=forms.CheckboxSelectMultiple)
565+
dep_bdes = forms.MultipleChoiceField(choices = Constants.BDES_DEP, required=False, label="department",
566+
widget=forms.CheckboxSelectMultiple)
567+
dep_mtech = forms.MultipleChoiceField(choices = Constants.MTECH_DEP, required=False, label="department",
568+
widget=forms.CheckboxSelectMultiple)
569+
dep_mdes = forms.MultipleChoiceField(choices = Constants.MDES_DEP, required=False, label="department",
570+
widget=forms.CheckboxSelectMultiple)
571+
dep_phd = forms.MultipleChoiceField(choices = Constants.PHD_DEP, required=False, label="department",
572+
widget=forms.CheckboxSelectMultiple)
573+
cpi = forms.DecimalField(label="cpi", required=False)
574+
no_of_days = forms.CharField(required=True, widget=forms.NumberInput(attrs={ 'min':0,
575+
'max':30,
576+
'max_length': 10,
577+
'class': 'form-control'}))
578+
579+
580+
class AddPlacementSchedule(forms.Form):
581+
"""
582+
The form is used to placement or pbi schedule.
583+
@variables:
584+
time - time of placement activity
585+
ctc - salary
586+
company_name - name of company
587+
placement_type - placement type (placement/pbi)
588+
location - location of company
589+
description - description of company
590+
placement_date - date of placement activity
591+
"""
592+
time = forms.TimeField(label='time', widget=forms.widgets.TimeInput(attrs={'type': "time",
593+
'value':"00:00",
594+
'min':"0:00",
595+
'max':"24:00"}))
596+
ctc = forms.DecimalField(label="ctc", widget=forms.NumberInput(attrs={ 'min':0, 'step': 0.25}) )
597+
company_name = forms.CharField(widget=forms.TextInput(attrs={'max_length': 100,
598+
'class': 'field',
599+
'list': 'company_dropdown1',
600+
'id': 'company_input'}),
601+
label="company_name")
602+
placement_type = forms.ChoiceField(widget=forms.Select(attrs={'style': "height:45px"}), label="placement_type",
603+
choices=Constants.PLACEMENT_TYPE)
604+
location = forms.CharField(widget=forms.TextInput(attrs={'max_length': 100,
605+
'class': 'field'}),
606+
label="location")
607+
description = forms.CharField(widget=forms.Textarea(attrs={'max_length': 1000,
608+
'class': 'form-control'}),
609+
label="description", required=False)
610+
attached_file = forms.FileField(required=False)
611+
placement_date = forms.DateField(label='placement_date', widget=forms.DateInput(attrs={'class':'datepicker'}))
612+
613+
def clean_ctc(self):
614+
ctc = self.cleaned_data['ctc']
615+
# print('form validation \n\n\n\n', ctc)
616+
if ctc <= 0:
617+
raise forms.ValidationError("CTC must be positive value")
618+
619+
return ctc
620+
621+
def clean_company_name(self):
622+
company_name = self.cleaned_data['company_name']
623+
# print('form validation \n\n\n\n', ctc)
624+
if NotifyStudent.objects.filter(company_name=company_name):
625+
raise forms.ValidationError("company_name must be unique")
626+
627+
return company_name
628+
629+
548630
class SearchHigherRecord(forms.Form):
549631
"""
550632
The form is used to search from higher study record based on various parameters .

FusionIIIT/applications/placement_cell/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Constants:
5454
('CSE', 'CSE'),
5555
('ME','ME'),
5656
('ECE','ECE'),
57+
('SM','SM'),
5758
)
5859

5960
BDES_DEP = (

FusionIIIT/applications/placement_cell/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
url(r'^student_records/$', views.student_records, name='student_records'),
1414
url(r'^manage_records/$', views.manage_records, name='manage_records'),
1515
url(r'^statistics/$', views.placement_statistics, name='placement_statistics'),
16+
1617
url(r'^delete_placement_statistics/$', views.delete_placement_statistics, name='delete_placement_statistics'),
1718
url(r'^cv/(?P<username>[a-zA-Z0-9\.]{1,20})/$', views.cv, name="cv"),
1819

0 commit comments

Comments
 (0)