{% extends "base.html" %} {% load custom_tags %} {% load static %} {% get_media_prefix %}. {% block styling %} .statistic:not(.last-stat){ border-right: 1px solid #e0e1e2 ; } .statistics th:not(.last-th){ border-right: 1px solid #dddddd; } {% endblock %} {% block content %}
{{ current_round.roundNo }}

Current Round
{{ current_round.endDate }}

Last date
{{ allApplications|length }}

Total Applications
{{ ProjectWiseShortlistedApplications|get_count_multilist }}

Shortlisted applications
{{ allotedStudents|length }}

Alloted students

Time remaining for Round {{ current_round.roundNo }}
{% get_remaining_days current_round.endDate %}


{% if availablePositions|length == 0 %}
Information to Faculty
{% elif allApplications|length == 0 %}
Information to Faculty
{% else %}
Instructions to Faculty
{% for application in allApplications %} {% endfor %}
NAME POSITION CGPA DATE ACTIONS
{{ application.student.student.get_full_name }} {{ application.project.title }}
{% get_normalized_grades application.student.get_cgpa %}
{{ application.date }}
{% csrf_token %}
{% endif %}
Instructions to use the priority window
{% for shortlistedApplications in ProjectWiseShortlistedApplications %}
{% for application in shortlistedApplications %}
{{ application.student.student.get_full_name }}
{{ application.project.title }}
{{ application.date }}
{% csrf_token %}
{% endfor %}
{% endfor %}
Information to Faculty
PROJECT TITLE
DESCRIPTION
CONTACT DETAILS
REQUISITES
AVAILABLE POSITIONS
ACTIONS
{% for opening in availablePositions %}
{{ opening.title }}
{{ opening.description }}
{{ opening.contact_details }}
{% for requisite in opening.get_requisites %} {% endfor %}
Subject CGPA
{{ requisite.Subject }} {{ requisite.cgpa }}
{{ opening.total_positions }}
{% endfor %}
{% if allotedStudents|length == 0 %}
Information to Faculty
{% else %}
ROUND NUMBER
NAME
PROJECT
CGPA
ACTIONS
{% for student in allotedStudents %}
{{ student.roundNo }}
{{ student.student.student.get_full_name }}
{{ student.project.title }}
{% endfor %}
{% endif %}
{% if user_type == 'facad' %}

Round Details

{% for roundDetail in roundDetails %} {% if forloop.counter != roundDetails|length %} {% else %} {% csrf_token %} {% endif %} {% endfor %}
Actions Round Number Start Date End Date
Round {{ forloop.counter }} {{ roundDetail.startDate }} {{ roundDetail.startDate }}
{{ RoundUpdateform.roundNo }}
{{ forloop.counter }}
{{ roundDetail.startDate }}
{{ roundDetail.endDate }}
{% csrf_token %}
Alloted students vs Unalloted students
Allotments done so far
{% for allotment in AllotmentsSoFar %} {% endfor %}
ROUND NUMBER STUDENT FACULTY PROJECT
{{ allotment.roundNo }} {{ allotment.student.student.get_full_name }} {{ allotment.faculty.get_full_name }} {{ allotment.project.title }}
{% endif %} {% endblock %} {% block modals %} {% for application in allApplications %} {% endfor %} {% for shortlistedApplications in ProjectWiseShortlistedApplications %} {% for application in shortlistedApplications %} {% endfor %} {% endfor %} {% for application in allotedStudents %} {% endfor %}
{% for updateform in updateforms %} {% endfor %}
{% endblock %} {% block scripts %} $(document).ready(function() { window.requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val()); window.requisitesformInst = $('.requisites-form:first').clone(true).get(0); window.updaterequisitesformInst = $('.update-requisites-form:last').clone(true).get(0); window.requisitesPrefix = 'requisites-'; window.updaterequisitePrefix = 'update-requisites-' $('#time-progress').progress(); $(".rating").rating('disable'); $('.menu .item').tab(); $('.date_picker').calendar({ type: 'date', minDate: new Date(), formatter: { date: function (date, settings) { if (!date) return ''; var day = date.getDate(); var month = date.getMonth() + 1; var year = date.getFullYear(); return year + '-' + month + '-' + day; } } }); $( function() { {% for projects in ProjectWiseShortlistedApplications %} $( "#sortable-{{ forloop.counter0 }}" ).sortable(); $( "#sortable-{{ forloop.counter0 }}" ).disableSelection(); {% endfor %} }); $('#applications').DataTable({ columnDefs: [ { orderable: false, targets: [4] } ], }); {% if user_type == 'facad' %} $('#generatedAllotments').DataTable({ }); {% endif %} $('.ui.dropdown').dropdown(); sync_total_forms(); {% if messages %} {% for message in messages %} $('body') .toast({ class: "error", title: "Error logging in", displayTime: 3000, closeIcon: true, position: "top center", showIcon: "exclamation", message: '{{ message }}', }); {% endfor %} {% endif %} {% if user_type == 'facad' %} render_stats_tab(); {% endif %} } ); {% if user_type == 'facad' %} function render_stats_tab(){ var lineChartData = { labels: [ {% for round in roundDetails %}'Round {{ round.roundNo }}', {% endfor %}], datasets: [{ label: 'Allotted Students', borderColor: 'rgb(255, 99, 132)', backgroundColor: 'rgb(255, 99, 132)', fill: false, data: [{% for round in roundDetails %}{% if forloop.counter != roundDetails|length %}{{ round.allocated }}, {% endif %}{% endfor %}], }, { label: 'Unallotted Students', borderColor: 'rgb(132, 99, 255)', backgroundColor: 'rgb(132, 99, 255)', fill: false, data: [ {% for round in roundDetails %}{% if forloop.counter != roundDetails|length %}{{ round.unallocated }}, {% endif %}{% endfor %} ], }] }; var ctx = document.getElementById('alloted-unalloted').getContext('2d'); myLine = new Chart(ctx, { type: 'line', data: lineChartData, options: { responsive: true, interaction: { mode: 'index' }, stacked: false, title: { display: false, }, scales: { yAxes: [{ scaleLabel: { display: true, labelString: 'Cumulative number of Students' } }] }, } }); var facultyallocationData = { labels: ['Faculty 1', 'Faculty 2', 'Faculty 3', 'Faculty 4', 'Faculty 5'], datasets: [{ data: [10,15,20,22,23], backgroundColor:['red','orange','teal','green','blue'], }] }; var ctx = document.getElementById('faculty-allocation').getContext('2d'); myLine = new Chart(ctx, { type: 'doughnut', data: facultyallocationData, options: { responsive: true, interaction: { mode: 'index' }, title: { display: false, }, animation: { animateScale: true, animateRotate: true }, } }); var facultyunallocationData = { labels: ['Faculty 1', 'Faculty 2', 'Faculty 3', 'Faculty 4', 'Faculty 5'], datasets: [{ data: [10,15,20,22,23], backgroundColor:['red','orange','teal','green','blue'], }] }; var ctx = document.getElementById('faculty-unallocation').getContext('2d'); myLine = new Chart(ctx, { type: 'doughnut', data: facultyunallocationData, options: { responsive: true, interaction: { mode: 'index' }, title: { display: false, }, animation: { animateScale: true, animateRotate: true }, } }); } function show_round_detail_form(){ $('.latest-round-detail').hide(); $('.latest-round-form').show(); } {% endif %} function sync_total_forms(){ $('#updateforms .requisitesList').each(function(){ $(this).find('#id_requisites-TOTAL_FORMS').val($(this).find('.update-requisites-form').length); }); } function show_student_detail(id){ $(".modals #application-"+id).modal('show'); } function show_update_form(id){ $(".modals #update-position-"+id).modal('show'); } function show_new_position_form(){ $(".modals #new-position").modal('show'); } function updateElementIndex(row,index) { $(row).children().children().each(function(){ curr_id = $(this).attr('id'); if(curr_id==null){ curr_id = $(this).find('select').attr('id'); new_id = curr_id.replace(/[0-9]+/gi,index); $(this).find('select').attr('id',new_id); curr_name = $(this).find('select').attr('name'); new_name = curr_name.replace(/[0-9]+/gi,index); $(this).find('select').attr('name',new_name); } else{ new_id = curr_id.replace(/[0-9]+/gi,index); $(this).attr('id',new_id); curr_name = $(this).attr('name'); new_name = curr_name.replace(/[0-9]+/gi,index); $(this).attr('name',new_name); } }); } function addRequesiteForm(){ var row = $(window.requisitesformInst).clone(true); requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val()); $(row).find(".ui.dropdown").dropdown(); if(requisitesformCount == 0){ $('#new-position .requisites ').html(row); } else{ $(row).attr('id',window.requisitesPrefix+requisitesformCount+'-row').insertAfter($('#new-position .requisites-form:last')); var forms = $('#new-position .requisites-form'); $(forms).each(function(index){ updateElementIndex(this,index); }); } $(row).find('.delete-row').attr('onclick','deleterequisitesForm(this,"'+window.requisitesPrefix+requisitesformCount+'")'); $('#new-position #id_requisites-TOTAL_FORMS').val(requisitesformCount+1); return false; } function deleterequisitesForm(btn){ $(btn).parents('.requisites-form').remove(); var forms = $('#new-position .requisites-form'); requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val()); $('#new-position #id_requisites-TOTAL_FORMS').val(requisitesformCount-1); $(forms).each(function(index){ $(this).attr('id',window.requisitesPrefix+index+'-row'); updateElementIndex(this,index); }); return false; } function addUpdateRequesiteForm(id){ var row = $(window.updaterequisitesformInst).clone(true); requisitesformCount = parseInt($(id + ' #id_requisites-TOTAL_FORMS').val()); $(row).find(".ui.dropdown").dropdown(); if(requisitesformCount == 0){ $(id+' .update-requisites ').html(row); } else{ $(row).attr('id',window.updaterequisitePrefix+requisitesformCount+'-row').insertAfter($(id +' .update-requisites-form:last')); var forms = $(id + ' .update-requisites-form'); $(forms).each(function(index){ updateElementIndex(this,index); }); } $(row).find('.delete-row').attr('onclick','deleteupdaterequisitesForm(this,"'+String(id)+'")'); $(id + ' #id_requisites-TOTAL_FORMS').val(requisitesformCount+1); return false; } function deleteupdaterequisitesForm(btn,id,filled_row){ if(filled_row){ count = $(id + ' #id_requisites-INITIAL_FORMS').val(); $(id + ' #id_requisites-INITIAL_FORMS').val(parseInt(count)-1); } $(btn).parents('.update-requisites-form').remove(); var forms = $(id + ' .update-requisites-form'); requisitesformCount = parseInt($(id + ' #id_requisites-TOTAL_FORMS').val()); $(id + ' #id_requisites-TOTAL_FORMS').val(requisitesformCount-1); $(forms).each(function(index){ $(this).attr('id',window.updaterequisitePrefix+index+'-row'); updateElementIndex(this,index); }); return false; } function submit_priorities(index,projectId){ $.ajax({ type: 'POST', url: '{% url "gap:updatePriorities" %}', data: { user: 'faculty', projectId: String(projectId), priorities: JSON.stringify({'priority_list':$('#sortable-'+String(index)+' .applied-student-id').map(function(){return $(this).val()}).get()}), csrfmiddlewaretoken: '{{ csrf_token }}', }, success: function (json) { $('body') .toast({ class: "success", title: "Priority Updation for "+json["title"], displayTime: 3000, closeIcon: true, position: "top center", showIcon: "check", message: json["successMessage"], className: { toast: 'ui icon message' } }); }, error: function (error) { error_message = error["responseJSON"]["detail"]; $('body') .toast({ class: "red", title: "Error updating priorities for " + error["responseJSON"]["title"]+"", displayTime: 5000, closeIcon: true, position: "top center", showIcon: "exclamation", message: error_message, className: { toast: 'ui message' } }); } }); } {% endblock %}