<table style="width: 100%; border-collapse: collapse; text-align: center;" border="1">
            @php
                use Modules\Usermanagement\Models\User;

                $laporan = $laporan ?? '';
                $penilaiUser = isset($penilai->userPenilaiTeam) ? $penilai->userPenilaiTeam : null;
                $imagePathPenilai = $penilaiUser && $penilaiUser->sign
                    ? storage_path('app/public/signatures/' . $penilaiUser->id . '/' . $penilaiUser->sign)
                    : null;

                $soUser = $permohonan->approval_so ? User::find($permohonan->approval_so) : null;
                $imagePathSo = $soUser && $soUser->sign
                    ? storage_path('app/public/signatures/' . $soUser->id . '/' . $soUser->sign)
                    : null;

                $eoUser = $permohonan->approval_eo ? User::find($permohonan->approval_eo) : null;
                $imagePathEO = $eoUser && $eoUser->sign
                    ? storage_path('app/public/signatures/' . $eoUser->id . '/' . $eoUser->sign)
                    : null;

                $ddUser = $permohonan->approval_dd ? User::find($permohonan->approval_dd) : null;
                $imagePathDD = $ddUser && $ddUser->sign
                    ? storage_path('app/public/signatures/' . $ddUser->id . '/' . $ddUser->sign)
                    : null;



                $imagePathDD = storage_path(
                    'app/public/signatures/' .
                        User::role('DD Appraisal')->first()->id .
                        '/' .
                        User::role('DD Appraisal')->first()->sign,
                );
            @endphp
            <tr>
                <td style=" padding: 4px;height: 25px">
                    <b>Penilaian Dibuat</b>
                </td>
                @if($soUser?->name==$eoUser?->name)
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;height: 25px">
                            <b>Diperiksa dan Menyetujui</b>
                        </td>
                    @endif
                @else
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;height: 25px">
                            <b>Diperiksa</b>
                        </td>
                    @endif

                    @if ($permohonan->approval_eo != null)
                        <td style=" padding: 4px;height: 25px">
                            <b>Menyetujui</b>
                        </td>
                    @endif
                @endif

                @if($permohonan->approval_dd!==$permohonan->approval_eo)
                    @if ($permohonan->approval_dd != null)
                        <td style=" padding: 4px;height: 25px">
                            <b>Menyetujui</b>
                        </td>
                    @endif
                @endif
            </tr>

            <tr>
                <td style=" padding: 4px;height: 75px">
                    @if (file_exists($imagePathPenilai))
                        <img src="{{ $imagePathPenilai }}" alt="{{ $imagePathPenilai }}" width="80px">
                    @endif
                </td>
                @if($soUser?->name==$eoUser?->name)
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;height: 75px">
                            @if (file_exists($imagePathSo))
                                <img src="{{ $imagePathSo }}" alt="{{ $imagePathSo }}" width="80px">
                            @endif
                        </td>
                    @endif
                @else
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;height: 75px">
                            @if (file_exists($imagePathSo))
                                <img src="{{ $imagePathSo }}" alt="{{ $imagePathSo }}" width="80px">
                            @endif
                        </td>
                    @endif
                    @if ($permohonan->approval_eo != null)
                        <td style=" padding: 4px;height: 75px">
                            @if (file_exists($imagePathEO))
                                <img src="{{ $imagePathEO }}" alt="{{ $imagePathEO }}" width="80px">
                            @endif
                        </td>
                    @endif
                @endif
                @if($permohonan->approval_dd!==$permohonan->approval_eo)
                    @if ($permohonan->approval_dd != null)
                        <td style=" padding: 4px;height: 75px">
                            @if (file_exists($imagePathDD))
                                <img src="{{ $imagePathDD }}" alt="{{ $imagePathDD }}" width="80px">
                            @endif
                        </td>
                    @endif
                @endif
            </tr>
            <tr>
                <td style=" padding: 4px;">{{ $penilai->userPenilaiTeam->name ?? '' }}</br>
                    <span>
                        <b>{{ ucwords(strtolower('PENILAI')) }}</b>
                    </span>
                </br>
                    <span>
                        @php
    $tgl = $permohonan_migrasi->mig_mst_jaminan_tgl_laporan ?? null;
@endphp

			{{ $tgl ? formatTanggalIndonesia(parseTimestamp($tgl)) : '' }}

                    </span>
                </td>

                @if($soUser?->name==$eoUser?->name)
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;">
                            {{ $soUser->name ?? $senior_officer->name ?? '' }}</br>
                            <span>
                                @if($npw > 1000000000 && $npw < 5000000000)
                                    <b>{{ ucwords(strtolower('EXECUTIVE OFFICER')) }}</b>
                                @else
                                    <b>{{ ucwords(strtolower('SENIOR OFFICER')) }}</b>
                                @endif
                            </span>
                            </br>
                            <span>
                                {{ isset($permohonan->approval_so_at) ? formatTanggalIndonesia($permohonan->approval_so_at) : '' }}
                            </span>
                        </td>
                    @endif
                @else
                    @if ($permohonan->approval_so != null)
                        <td style=" padding: 4px;">
                            {{ $soUser->name ?? $senior_officer->name ?? '' }}</br>
                            <span>
                                <b>{{ ucwords(strtolower('SENIOR OFFICER')) }}</b>
                            </span>
                            </br>
                            <span>
                                {{ isset($permohonan->approval_so_at) ? formatTanggalIndonesia($permohonan->approval_so_at) : '' }}
                            </span>
                        </td>
                    @endif

                    @if ($permohonan->approval_eo != null)
                        <td style=" padding: 4px;">
                            {{ $eoUser->name ?? User::role('EO Appraisal')->first()->name ?? '' }}</br>
                            <span>
                                <b>{{ ucwords(strtolower('EXECUTIVE OFFICER')) }}</b>
                            </span>
                        </br>
                            <span>
                                {{ isset($permohonan->approval_eo_at) ? formatTanggalIndonesia($permohonan->approval_eo_at) : '' }}
                            </span>
                        </td>
                    @endif
                @endif
                @if($permohonan->approval_dd!==$permohonan->approval_eo)
                    @if ($permohonan->approval_dd != null)
                        <td style=" padding: 4px;">
                            {{ $ddUser->name ?? User::role('DD Appraisal')->first()->name ?? '' }}</br>
                            <span>
                                <b>{{ ucwords(strtolower('DEPUTY DIRECTOR')) }}</b>
                            </span>
                            </br>
                            <span>
                                {{
                                    isset($permohonan->approval_dd_at) ?
                                    formatTanggalIndonesia($permohonan->approval_dd_at) : '' }}
                            </span>
                        </td>
                    @endif
                @endif
            </tr>
        </table>
