fix(penilai): perbaikkan dokumen jaminan tidak tampil jika kosong, footer nama cabang di hilangkan, dan perbaikkan tanggal permohonan, kunjungan
This commit is contained in:
@@ -1,16 +1,21 @@
|
|||||||
|
|
||||||
@if (@isset($dokumen))
|
@if (@isset($dokumen))
|
||||||
@foreach ($dokumen->detail as $detail)
|
@foreach ($dokumen->detail as $detail)
|
||||||
@if (isset($detail->dokumen_jaminan))
|
@if (!empty($detail->name) && !empty($detail->details) )
|
||||||
<tr>
|
<tr>
|
||||||
<td width="25%"><strong>{{ $detail->name ?? '' }}</strong></td>
|
<td width="25%"><strong>{{ $detail->name ?? '' }}</strong></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (isset($detail->details))
|
@if (isset($detail->details))
|
||||||
@if (json_decode($detail->details))
|
@php
|
||||||
@foreach (json_decode($detail->details) as $value)
|
$details = json_decode($detail->details, true);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if (is_array($details) && count($details) > 0)
|
||||||
|
@foreach ($details as $value)
|
||||||
|
@if (is_array($value))
|
||||||
@foreach ($value as $key => $item)
|
@foreach ($value as $key => $item)
|
||||||
|
@if (!empty($item))
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 2px;">
|
<td style="padding: 2px;">
|
||||||
{{ formatLabel($key) }}
|
{{ formatLabel($key) }}
|
||||||
@@ -23,10 +28,11 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
Cabang : {{ $permohonan->debiture->branch->name ?? '' }}
|
{{-- Cabang : {{ $permohonan->debiture->branch->name ?? '' }} --}}
|
||||||
</footer>
|
</footer>
|
||||||
<script type="text/php">
|
<script type="text/php">
|
||||||
if (isset($pdf)) {
|
if (isset($pdf)) {
|
||||||
|
|||||||
@@ -96,8 +96,40 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
@php
|
||||||
|
$data = '';
|
||||||
|
foreach ($permohonan->documents as $dokumen) {
|
||||||
|
$data .= $dokumen->jenisJaminan->name . ', ';
|
||||||
|
|
||||||
|
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
||||||
|
$surveyor = $permohonan->penilaian->userPenilai->where('role', 'surveyor')->first();
|
||||||
|
$teams = $permohonan->region->teams;
|
||||||
|
|
||||||
|
if ($teams) {
|
||||||
|
foreach ($teams as $team) {
|
||||||
|
$team_users = $team->teamsUsers;
|
||||||
|
// print_r($team_users);
|
||||||
|
if ($team_users) {
|
||||||
|
foreach ($team_users as $team_user) {
|
||||||
|
$user = $team_user->user;
|
||||||
|
|
||||||
|
if ($user && $user->hasRole('senior-officer')) {
|
||||||
|
$senior_officer = $user;
|
||||||
|
break 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
use Modules\Usermanagement\Models\User;
|
||||||
|
$surveyorUser = User::where('id', $surveyor->userPenilaiTeam->id)->first();
|
||||||
|
|
||||||
|
$data = rtrim($data, ', ');
|
||||||
|
@endphp
|
||||||
|
|
||||||
<body style="width: 90%; margin: auto;">
|
<body style="width: 90%; margin: auto;">
|
||||||
|
|
||||||
<header id="header">
|
<header id="header">
|
||||||
<table style="width: 100%; border: none;">
|
<table style="width: 100%; border: none;">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -105,11 +137,13 @@
|
|||||||
@include('lpj::component.logo-bag', ['width' => 150, 'height' => 40])
|
@include('lpj::component.logo-bag', ['width' => 150, 'height' => 40])
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: right;">
|
<td style="text-align: right;">
|
||||||
<div style="">
|
<p style="margin: 0; padding:0; font-size:10px;">
|
||||||
<p style="margin: 0; padding:0; font-size:10px;">Tanggal: {{ date('Y-m-d') }}</p>
|
Tanggal: {{ \Carbon\Carbon::parse($permohonan->penilaian->waktu_penilaian)->format('d-m-Y') }}
|
||||||
<p style="margin: 0; padding:0; font-size:10px;">Waktu: {{ date('H:i:s') }}</p>
|
</p>
|
||||||
<p style="margin: 0; padding:0; font-size:10px;">User: {{ Auth::user()->name }}</p>
|
<p style="margin: 0; padding:0; font-size:10px;">
|
||||||
</div>
|
Waktu: {{ \Carbon\Carbon::parse($permohonan->penilaian->waktu_penilaian)->format('H:i') }}
|
||||||
|
</p>
|
||||||
|
<p style="margin: 0; padding:0; font-size:10px;">User: {{ $surveyorUser->name }}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokument
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -211,7 +211,7 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-agi-50">
|
<div class="card-header bg-agi-50">
|
||||||
<h3 class="card-title uppercase">
|
<h3 class="card-title uppercase">
|
||||||
Dokument
|
Dokumen
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body grid gap-5">
|
<div class="card-body grid gap-5">
|
||||||
@@ -323,7 +323,7 @@
|
|||||||
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
@if (Auth::user()->hasAnyRole(['administrator', 'senior-officer', 'EO Appraisal', 'DD Appraisal']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokument
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
||||||
class="btn btn-light">
|
class="btn btn-light">
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<td style="padding: 2px; vertical-align: top;">Tanggal Order</td>
|
<td style="padding: 2px; vertical-align: top;">Tanggal Order</td>
|
||||||
<td style="padding: 2px; vertical-align: top;">:</td>
|
<td style="padding: 2px; vertical-align: top;">:</td>
|
||||||
<td style="padding: 2px; vertical-align: top;">
|
<td style="padding: 2px; vertical-align: top;">
|
||||||
{{ formatTanggalIndonesia($permohonan->created_at) }}</td>
|
{{ formatTanggalIndonesia($permohonan->tanggal_permohonan) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 2px; vertical-align: top;">Tanggal Survey</td>
|
<td style="padding: 2px; vertical-align: top;">Tanggal Survey</td>
|
||||||
|
|||||||
@@ -73,13 +73,13 @@
|
|||||||
<td style="width: 25%; padding: 2px;">Tanggal Order</td>
|
<td style="width: 25%; padding: 2px;">Tanggal Order</td>
|
||||||
<td style="width: 1%; padding: 2px;">:</td>
|
<td style="width: 1%; padding: 2px;">:</td>
|
||||||
<td style="vertical-align: top; padding: 2px;">
|
<td style="vertical-align: top; padding: 2px;">
|
||||||
{{ formatTanggalIndonesia($permohonan->create_at) }}</td>
|
{{ formatTanggalIndonesia($permohonan->tanggal_permohonan) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 25%; padding: 2px;">Tannggal Survey</td>
|
<td style="width: 25%; padding: 2px;">Tanggal Survey</td>
|
||||||
<td style="vertical-align: top; width: 1%; padding: 2px;">:</td>
|
<td style="vertical-align: top; width: 1%; padding: 2px;">:</td>
|
||||||
<td style="vertical-align: top; width: 79%;">
|
<td style="vertical-align: top; width: 79%;">
|
||||||
{{ formatTanggalIndonesia($permohonan->penilaian->tanggal_kunjungan) }}
|
{{ formatTanggalIndonesia($permohonan->penilaian->waktu_penilaian) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="no-break">
|
{{-- <div class="no-break"> --}}
|
||||||
<table style="width: 100%; ">
|
<table style="width: 100%; ">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 100%; border: 1px solid #000; text-align: center;">
|
<td style="width: 100%; border: 1px solid #000; text-align: center;">
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
<table style="width: 100%; ">
|
<table style="width: 100%; ">
|
||||||
@include('lpj::component.print-out-dokument')
|
@include('lpj::component.print-out-dokument')
|
||||||
</table>
|
</table>
|
||||||
</div>
|
{{-- </div> --}}
|
||||||
|
|
||||||
<div class="no-break">
|
<div class="no-break">
|
||||||
<table style="width: 100%; ">
|
<table style="width: 100%; ">
|
||||||
|
|||||||
@@ -1,32 +1,5 @@
|
|||||||
@include('lpj::penilai.components.header')
|
@include('lpj::penilai.components.header')
|
||||||
@php
|
|
||||||
$data = '';
|
|
||||||
foreach ($permohonan->documents as $dokumen) {
|
|
||||||
$data .= $dokumen->jenisJaminan->name . ', ';
|
|
||||||
|
|
||||||
$penilai = $permohonan->penilaian->userPenilai->where('role', 'penilai')->first();
|
|
||||||
$surveyor = $permohonan->penilaian->userPenilai->where('role', 'surveyor')->first();
|
|
||||||
$teams = $permohonan->region->teams;
|
|
||||||
|
|
||||||
if ($teams) {
|
|
||||||
foreach ($teams as $team) {
|
|
||||||
$team_users = $team->teamsUsers;
|
|
||||||
// print_r($team_users);
|
|
||||||
if ($team_users) {
|
|
||||||
foreach ($team_users as $team_user) {
|
|
||||||
$user = $team_user->user;
|
|
||||||
|
|
||||||
if ($user && $user->hasRole('senior-officer')) {
|
|
||||||
$senior_officer = $user;
|
|
||||||
break 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$data = rtrim($data, ', ');
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<table style="width: 100%">
|
<table style="width: 100%">
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokument
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}" class="btn btn-light"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -432,7 +432,7 @@
|
|||||||
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
@if (Auth::user()->hasAnyRole(['senior-officer', 'EO Appraisal', 'DD Appraisal', 'administrator']))
|
||||||
<a class="btn btn-info"
|
<a class="btn btn-info"
|
||||||
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
href="{{ route('penilai.lampiran') }}?permohonanId={{ request('permohonanId') }}&documentId={{ request('documentId') }}&inspeksiId={{ request('inspeksiId') }}&jaminanId={{ request('jaminanId') }}&statusLpj=1">
|
||||||
Lampiran Foto dan Dokument
|
Lampiran Foto dan Dokumen
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
<a href="{{ route('surveyor.print_out_inspeksi', ['permohonan_id' => $permohonan->id, 'dokument_id' => request('documentId'), 'jenis_jaminan_id' => request('jaminanId')]) }}"
|
||||||
class="btn btn-light">
|
class="btn btn-light">
|
||||||
|
|||||||
Reference in New Issue
Block a user