<link href='https://fonts.googleapis.com/css2?family=Times New Roman:ital,wght@0,400;0,700;1,400;1,700&display=swap' rel='stylesheet'>

<style>
    td, th { padding: 1px; }
    .page{
        font-family: "Times New Roman", Times, serif; 
    }
    .no-border {
        border-style: none !important;
        border-top:1px solid #fff !important;
        border-bottom:1px solid #fff !important;
        border-left:1px solid #fff !important;
        border-right:1px solid #fff !important;
    }
    .page {
        width: 100%;
        padding-left: 1cm;
        padding-right: 5mm;
        background: no-repeat;
        page-break-before: always;
    }  
    
    .border-f {
        border-style: solid; 
        border-width: 1px;
        border-top:1px solid #000 !important;
        border-bottom:1px solid #000 !important;
        border-left:1px solid #000 !important;
        border-right:1px solid #000 !important;
    }
    .subject-details tr th{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        text-align:center;
        background: none !important;
    
    }
    .subject-details tr td{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        text-align:center;
        
    }
    .collage-header tr{
        height:7mm !important;
    }
    .text-left{
        text-align:left;
    }
    .slant
    {
        white-space: nowrap;
        margin: 0px -25px;
        width: 70px;
        padding:5px;
        -webkit-transform: rotate(270deg) translateX(-60%);
        -moz-transform: rotate(270deg);
        -ms-transform: rotate(270deg);
        -o-transform: rotate(270deg);
        transform: rotate(270deg) translateX(-60%);
        display: inline-block;
    }
</style>
<div class="page">
    <table style = 'text-align:center;width: 100%;font-size:15px;' cellpadding='0' cellspacing='0' border='0' class='collage-header'>
        <thead>
            <tr>
                <div>{{ data.logoBannerImage | raw }}</div>
            </tr>
            
        </thead>
    </table>
    <table style = 'text-align:center;width: 100%;font-size:15px;' cellpadding='0' cellspacing='0' border='0' >
        <thead>
            <tr>
                <td colspan="7"><span style = "font-size:15px;"><b>NOMINAL ROLL</b></span> </td>
            </tr>
            <tr>
                <td colspan="7"><span style = "font-size:15px;"><b>{{data.examRegistrationData.examRegistrationName}}</b></span> </td>
            </tr>
             <tr>
                <td colspan="7"><span style = "font-size:15px;"></span> </td>
            </tr>
            <tr>
                <tr>
                    <td width="50%" style="text-align:left; white-space: nowrap;"><span style="font-size:15px;text-align:left;">Department : <b>{{data.examRegistrationData.deptName}}</b></span></td>
                    <td width="50%" style="text-align:right; white-space: nowrap;"><span style="font-size:15px;">Program : <b>{{data.examRegistrationData.programName}}</b></span></td>
                </tr>
                <tr>
                    <td width="50%" style="text-align:left; white-space: nowrap;"><span style="font-size:15px;"></b></span></td>
                    <td width="50%" style="text-align:right; white-space: nowrap;"><span style="font-size:15px;">Batch / Semester : <b>{{data.groupNames}} / {{data.examRegistrationData.academicTermName}}</b></span></td>
                </tr>
        </thead>
    </table>
    <table class='subject-details' cellspacing="0" style="page-break-after:always;text-align:left;width: 100%;font-size:15px;border:1px solid #000;">
        <thead>
            <tr style='height:30px;' class='border-f'>
                <th class="align-middle text-center" width="3%">SL NO</th>
                <th class="align-middle text-center" width="10%">COURSE CODE</th>
                <th class="align-middle text-left" style=" text-align:left;" width="25%">COURSE NAME</th>
                <th class="align-middle text-center" width="7%">COURSE TYPE</th>
                <th class="align-middle text-center" width="7%">CLASS TYPE</th>
                <th class="align-middle text-center" width="5%">CREDIT</th>
                <th class="align-middle text-center" width="20%">BATCH</th>
                <th class="align-middle text-center" width="8%">STUDENT COUNT</th>
            </tr>
        </thead>
        <tbody>
            {% set slNo = 0 %}
            {% for subject in data.subjectData %}
            {% set slno = slno + 1 %}
            <tr style='height:30px;' class='border-f'>
                <td class="align-middle text-center">{{slno}}</td>
                <td class="align-middle text-center">{{subject.subjectCode |raw}} </td>
                <td class="align-middle text-left" style=" text-align:left;" >{{subject.subjectName|raw}}</td>
                <td class="align-middle text-center">{{subject.courseType|raw}}</td>
                <td class="align-middle text-center">{{subject.subjectClassType|raw}}</td>
                <td class="align-middle text-center">{{subject.subjectCredit|raw}}</td>
                <td data-a-h='center' data-a-v='middle' class="align-middle text-left " style=" text-align:left; font-size:14px;" data-a-wrap='true'>
                    {% for group in subject.groups %}
                        &#x2022; {{group.name|raw}} ({{group.registeredStudents}} )
                        {% if not loop.last %}
                            <br>
                        {% endif %}
                    {% endfor %} 
                </td>
                <td class="align-middle text-center"> {{subject.noOfRegisteredStudents == ""  ? "0" : subject.noOfRegisteredStudents}}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
    {% for subjectChunk in data.subjectChunks %}
    <table id="nominalRollStudentTable" class='subject-details' cellspacing="0" style="margin:15px auto; text-align:center;width: 100%;font-size:15px;border:1px solid #000;">
            <tr style='height:150px;' class='border-f'>
                <th class='text-center bold' data-a-h='center' data-a-v='middle'>#</th>
                <th class='text-center bold' data-a-h='center' data-a-v='middle'>Reg No</th>
                <th class='text-center bold' data-a-h='center' data-a-v='middle'>Name</th>
                {# <th class='text-center bold' data-a-h='center' data-a-v='middle'>Second Lang /</br> Elective</th> #}
                {% if data.examRegistrationData.examRegistrationType == 'SUPPLEMENTARY' %}
                    <th class='text-center bold' data-a-h='center' data-a-v='middle'>Supply /</br> Improve</th>
                {% endif %}
                {% for subject in subjectChunk %}
                    <th class='text-center bold' data-a-h='center' data-a-v='middle'> 
                       <div class="slant" style="font-size:12px;">{{subject.subjectCode|raw}}</div>
                    </th>
                {% endfor %}
                {# <th class='text-center bold' data-a-h='center' data-a-v='middle'>Remarks</th> #}
            </tr>
        <tbody>
            {% set slNo = 0 %}
            {% for student in data.studentData %}
                {% set slno = slno + 1 %}
                <tr style='height:30px;' class='border-f'>
                    <td class="align-middle text-center">{{slno}}</td>
                    <td class="align-middle text-center">{{student.registerNo}}</td>
                    <td class="align-middle text-left">{{student.studentName}}</td>
                    {% if data.examRegistrationData.examRegistrationType == 'SUPPLEMENTARY' %}
                        {% if student.supplyImproveStatus == 'SUPPLY/IMPROVE' %}
                            <td class="align-middle text-center">S/I</td>
                        {% elseif student.supplyImproveStatus == 'SUPPLEMENTARY' %}
                            <td class="align-middle text-center">S</td>
                        {% elseif student.supplyImproveStatus == 'IMPROVEMENT' %}
                            <td class="align-middle text-center">I</td>
                        {% endif %}
                    {% endif %}
                    {% for subject in subjectChunk %}
                        {% set isEntered = false %}
                        {% for studentSubject in student.subjects %}
                            {% if studentSubject.id == subject.id %}
                                <td class="align-middle text-center" style="color:green" data-a-h='center'>
                                    <i class="fa fa-check" aria-hidden="true"></i>
                                     <span style="display:none;">&#x2705;</span>
                                    {% if studentSubject.isShowShortTermCourseMode %}
                                        <br>[{{studentSubject.studentCourseMode}}]
                                    {% endif %}
                                </td>
                                {% set isEntered = true %}
                            {% endif %}
                        {% endfor %}
                        {% if isEntered == false %}
                            <td class="align-middle text-center" style="color:red" data-a-h='center'>
                                <i class="fa fa-times"  aria-hidden="true"></i>
                                <span style="display:none;">&#x274C;</span>
                            </td>
                        {% endif %}
                    {% endfor %}
                </tr>
            {% endfor %}
            <tr style='height:30px;' class='border-f'>
                {% if data.examRegistrationData.examRegistrationType == 'SUPPLEMENTARY' %}
                    <th colspan = "4" class="align-middle text-center">No Of Students</th>
                {% else %}
                    <th colspan = "3" class="align-middle text-center">No Of Students</th>
                {% endif %}
                {% for subject in subjectChunk %}
                    <th>
                        {{subject.noOfRegisteredStudents == ""  ? "0" : subject.noOfRegisteredStudents}}
                    </th>
                {% endfor %}
            </tr>
        </tbody>
    </table>
    {% endfor %}
    <table style = 'margin-top:50px; text-align:center;width: 100%;font-size:16px;' cellpadding='0' cellspacing='0' border='0'>
        <thead>
            <tr class=''>
                <td class='' width="50%">Date : {{data.currentDate}}</td>
                <td class='' width="50%">Controller Of Examination</td>
            </tr>
        </thead>
    </table>
</div>

