{#
    Report displaying the exam registrations and number of students registered
    currently used only by MICTVM
#}

<style>
	.primary-table {
		border-collapse: collapse !important;
		page-break-inside: auto;
		width: 100% !important;
        font-size: 12px !important;
	}

	.primary-table th {
		text-align: center;
		background: none !important;
		height: 5mm !important;
		border: 1px solid #000 !important;
		padding: 2mm !important;
	}

	.primary-table td {
		padding: 2mm;
		height: 4mm !important;
		border: 1px solid #000;
		text-align: center;
		vertical-align: middle !important;
	}

	.text-left {
		text-align: left !important;
	}

	.text-center {
		text-align: center !important;
	}

	.college-header {
		height: 35mm;
		width: 80%;
		margin: 0 10%;
	}

	.hidden {
		display: none;
	}

	.page-a4 {
		width: 90%;
		border: none;
		padding: 5mm;
		margin: auto;
		page-break-after: always;
	}
</style>

<div class="page-a4">
	<table class="primary-table table table-bordered page-break-inside:avoid;" id="central-exam-registration-report">
		<thead>
			{% if flags.isHeaderEnabled %}
				<tr data-exclude="true">
					<th colspan="6" style="border: none !important; padding: 5mm !important;">
						<img class="college-header" src="{{college.collegeHeader}}">
					</th>
				</tr>
				<tr data-exclude="true">
					<td class="text-center" colspan="8" style="border: 1px solid #000;">
						<h3>Summary of Registration</h3>
					</td>
				</tr>
			{% else %}
				<tr data-exclude="true">
					<td class="text-center" colspan="8" style="border: 1px solid #000;">
						<h3>Summary of Registration</h3>
					</td>
				</tr>
				<tr data-exclude="true">
					<td class="text-center" colspan="8" style="border: 1px solid #000;">
						<b style="font-size: 18px;">{{ college.collegeName ?? '' }}{% if college.universityName %} ({{ college.universityName }}){% endif %}</b>
					</td>
				</tr>
				<tr data-exclude="true">
					<td class="text-center" colspan="8" style="border: 1px solid #000;">
						<b style="font-size: 16px;">{{ college.collegeAddress ?? '' }}</b>
					</td>
				</tr>
			{% endif %}
			<tr>
				<th data-f-bold='true' data-a-h='center'>SL.NO</th>
				<th data-f-bold='true' data-a-h='center'>Registration Name</th>
                <th data-f-bold='true' data-a-h='center'>Student Registered Count</th>
			</tr>
		</thead>
	<tbody>
		{% if aggregation|length > 0 %}
			{% for examRegistrationName, studentCount in aggregation %}
				<tr>
                    <td> {{ loop.index }} </td>
                    <td> {{ examRegistrationName }} </td>
                    <td> {{ studentCount }} </td>
				</tr>
			{% endfor %}
		{% else %}
			<tr>
				<td colspan="6" data-a-h='center'>No students found</td>
			</tr>
		{% endif %}
	</tbody>
</table>

</div>