<!DOCTYPE html>
<html>
<head>
	<title>LAPORAN TUGAS</title>
</head>
<body>

	<style type="text/css">
		table {
			width: 100%;
		}
	</style>

	<style>
		/** Define the margins of your page **/
		@page {
			margin: 100px 25px;
		}

		header {
			position: fixed;
			top: -60px;
			left: 0px;
			right: 0px;
			height: 50px;

			/** Extra personal styles **/
			background-color: #03a9f4;
			color: white;
			text-align: center;
			line-height: 35px;

		}

		footer {
			position: fixed;
			bottom: -60px;
			left: 0px;
			right: 0px;
			height: 50px;

			/** Extra personal styles **/
			background-color: #03a9f4;
			color: white;
			text-align: center;
			line-height: 35px;
		}
	</style>

	<!-- Define header and footer blocks before your content -->
	<header>
		SENARAI TUGASAN SAMPINGAN
	</header>

	<footer>
		{{$institusi['nama']}} &copy; <?php echo date("Y");?>
	</footer>

	<center><table>
		<thead style="border-style: solid;">
			<tr>
				<th>BIL.</th>
				<th>NAMA</th>
				<th>JABATAN</th>
				<th>POLIMAS</th>
				<!--<th>Gred</th>
				<th>Peringkat</th>
				<th>Tarikh Lantikan</th>
				<th>Status</th>
				<th>Catatan</th>-->
			</tr>
		</thead>
		<tbody>

			<?php $i=0; ?>

			@foreach ($tugas as $nama_pengguna => $tugas_sampingan_staf)
			<tr>
				<td style="10px;padding-top: 10px;  padding-right: 10px;  padding-bottom: 10px;  padding-left: 10px;" align="center">{{++$i}}</td>
				<td style="10px;padding-top: 10px;  padding-right: 10px;  padding-bottom: 10px;  padding-left: 10px;">
					{{$nama_pengguna}}
				</td>
				<td style="10px;padding-top: 10px;  padding-right: 10px;  padding-bottom: 10px;  padding-left: 10px;">
					<ul>
						@foreach ($tugas_sampingan_staf as $tugas_sampingan_jabatan) 
						@if($tugas_sampingan_jabatan['tugas_peringkat'] == 1)
						<li>{{$tugas_sampingan_jabatan['nama_tugas_sampingan']}}</li>
						@endif
						@endforeach
					</ul>
				</td>
				<td style="10px;padding-top: 10px;  padding-right: 10px;  padding-bottom: 10px;  padding-left: 10px;">
					<ul>
						@foreach ($tugas_sampingan_staf as $tugas_sampingan_polimas) 
						@if($tugas_sampingan_polimas['tugas_peringkat'] == 2)
						<li>{{$tugas_sampingan_polimas['nama_tugas_sampingan']}}</li>
						@endif
						@endforeach
					</ul>
				</td>
				
			</tr>
			@endforeach


		</tbody>
	</table>
</center>

</body>
</html>
