<!DOCTYPE html>
<html>
    
@foreach ($tugas as $nama_pengguna => $tugas_sampingan_staf)
    <?php    $no_dokumen_rujukan = $dokumen_rujukan->no_dokumen++; ?>

    <head>
        <title>SURAT LANTIKAN</title>
    </head>

    <body style="font-size: 15px;">

        <style type="text/css">
            p.small {
                line-height: 0.1;
            }

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

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

            table,
            th {
                margin: 0;
            }

            td {
                margin: 0;
                vertical-align: top;
                text-align: left;
                word-wrap: break-word;
            }
        </style>

        <table>
            <tr>
                <td width="25%"><img src="{{public_path('storage/images/JPT_JPPKK.jpg')}}" alt="Logo" height="100px"
                        width="150px">
                    <p class="small" style="font-size: 8px;">
                        <strong>
                            KEMENTERIAN PENDIDIKAN TINGGI
                        </strong>
                    </p>
                    <p class="small" style="font-size: 5px;">
                        <strong>
                            JABATAN PENDIDIKAN POLITEKNIK DAN KOLEJ KOMUNITI
                        </strong>
                    </p>
                </td>
                <td width="45%" style="font-size:14px;">
                    <b>{{ucwords(strtolower($institusi->institusi->nama))}}</b>
                    <br>
                    <b>Kementerian Pendidikan Tinggi</b>
                    <br>
                    Bandar Darulaman
                    <br>
                    06000, JITRA
                    <br>
                    KEDAH, MALAYSIA
                </td>
                <td width="30%" style="font-size:10px;">
                    <img src="{{public_path('storage/img/logo/logo-polimas.jpg')}}" alt="Logo" height="60px" width="220px">
                    <br>
                    Telefon&nbsp;&nbsp;&nbsp;&nbsp;: 04-9146100
                    <br>
                    Faks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 04-9174232
                    <br>
                    Web&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: http://www.polimas.edu.my
                    <br>
                    <img src="{{public_path('storage/images/facebook.jpg')}}" alt="Logo" height="9px"
                        width="12px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Politeknik
                    Sultan Abdul Halim
                    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mu’adzam
                    Shah Official

                </td>
            </tr>
        </table>

        <hr>

        <center>
            <table>
                <tr>
                    <td width="20%"></td>
                    <td width="20%"></td>
                    <td width="20%"></td>
                    <td width="70%">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ruj:
                        {{$dokumen_rujukan->nama}} ({{$no_dokumen_rujukan}})

                        <br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tarikh:
                        {{date('d/m/Y', strtotime($tarikh_surat))}}
                    </td>
                </tr>
            </table>
        </center>

        &nbsp;&nbsp;&nbsp;&nbsp;{{$nama_pengguna}}
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;Tuan/Puan,
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;<b><u>PELANTIKAN TUGAS SAMPINGAN PERINGKAT POLITEKNIK DAN JABATAN</u></b>
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;Dengan hormatnya perkara di atas dirujuk.
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;&nbsp;Sukacita dimaklumkan bahawa tuan/puan telah dilantik dan diperakukan sebagai:
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;<b><u>PERINGKAT POLITEKNIK</u></b><br>
        @php

            $i = 1;
            $j = 1;

        @endphp

        <table cellpadding="0" cellspacing="0">
            @foreach ($tugas_sampingan_staf as $tugas_sampingan_polimas)
                @if($tugas_sampingan_polimas['tugas_peringkat'] == 2)
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;<?php            echo $i++; ?>.</td>
                        <td style="word-wrap: break-word; padding-left: 20px;">{{$tugas_sampingan_polimas['nama_tugas_sampingan']}}
                        </td>
                    </tr>
                @endif
            @endforeach
        </table>
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;<b><u>PERINGKAT JABATAN</u></b><br>
        <table cellpadding="0" cellspacing="0">
            @foreach ($tugas_sampingan_staf as $tugas_sampingan_jabatan)
                @if($tugas_sampingan_jabatan['tugas_peringkat'] == 1)
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;<?php            echo $j++; ?>.</td>
                        <td style="word-wrap: break-word; padding-left: 20px;">{{$tugas_sampingan_jabatan['nama_tugas_sampingan']}}
                        </td>
                    </tr>
                @endif
            @endforeach
        </table>
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;&nbsp;Perlantikan ini berkuat kuasa mulai sesi <b>{{$semester}}</b>.
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;4.&nbsp;&nbsp;Kerjasama, perhatian dan komitmen yang tuan/puan berikan adalah dihargai dan
        didahului dengan ucapan &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;terima kasih.
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;Sekian.
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;<b>"MALAYSIA MADANI"</b>
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;<b>“BERKHIDMAT UNTUK NEGARA”</b>
        <br><br>
        &nbsp;&nbsp;&nbsp;&nbsp;Saya yang menjalankan amanah,
        <br><br><br>

        &nbsp;&nbsp;&nbsp;&nbsp;(<b>{{$dokumen_rujukan->pengguna->nama}}</b>)<br>
        &nbsp;&nbsp;&nbsp;&nbsp;Ketua
        {{ucwords(strtolower($dokumen_rujukan->pengguna->institusiJabatan->jabatan->nama))}}<br>
        &nbsp;&nbsp;&nbsp;&nbsp;{{ucwords(strtolower($dokumen_rujukan->pengguna->institusiJabatan->institusi->nama))}}.<br>

        <br>

        <footer>
            <center>
                <hr style="color: #000000;">

                <img src="{{public_path('storage/images/MQA.jpg')}}" alt="Logo" height="30px" width="50px">
                <img src="{{public_path('storage/images/LEMBAGA_JURUTERA.jpg')}}" alt="Logo" height="30px" width="30px">
                <img src="{{public_path('storage/images/ROYAL_INSTITUTION.jpg')}}" alt="Logo" height="30px" width="30px">
                <img src="{{public_path('storage/images/ISO9001.jpg')}}" alt="Logo" height="30px" width="70px">
            </center>
        </footer>

    </body>

@endforeach

</html>