338 lines
17 KiB
PHP
338 lines
17 KiB
PHP
@if (!isset($status))
|
|
<div class="card border border-agi-100 {{ isset($hidePermohonan) ? 'hidden' : '' }}">
|
|
<div class="card-header bg-agi-50" id="advanced_settings_appearance">
|
|
@php
|
|
$title = $title ?? 'Data Permohonan';
|
|
@endphp
|
|
<h3 class="card-title">
|
|
{{ $title }}
|
|
</h3>
|
|
|
|
<div class="flex items-center gap-2">
|
|
@if (isset($id))
|
|
@php
|
|
$parameters = isset($id) ? ['id' => $id] : [];
|
|
if (isset($type)) {
|
|
$parameters['type'] = $type;
|
|
}
|
|
if (isset($additionalParam)) {
|
|
$parameters['additional'] = $additionalParam;
|
|
}
|
|
@endphp
|
|
|
|
<a href="{{ route($backLink, $parameters) }}" class="btn btn-xs btn-info">
|
|
<i class="ki-filled ki-exit-left"></i> Back
|
|
</a>
|
|
@else
|
|
<a href="{{ route($backLink, $queryParams ?? []) }}" class="btn btn-xs btn-info">
|
|
<i class="ki-filled ki-exit-left"></i> Back
|
|
</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="card-body lg:py-7.5 grid grid-cols-3">
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Nomor Register Permohonan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->nomor_registrasi }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Pemohon:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Tujan Permohonan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->tujuanPenilaian->name }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Nilai Plafond:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->nilaiPlafond->name }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Status Bayar:
|
|
</h3>
|
|
<span
|
|
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
|
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card border border-agi-100 min-w-full">
|
|
<div class="card-header bg-agi-50">
|
|
<h3 class="card-title">
|
|
Detail Debitur
|
|
</h3>
|
|
</div>
|
|
<div class="card-table scrollable-x-auto pb-3">
|
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
<div class="col-span-1">
|
|
<table class="table align-middle text-sm text-gray-500">
|
|
<tr>
|
|
<td class="py-2 text-gray-600 font-normal">
|
|
Name
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->name ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
Email
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->email ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
Phone
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->phone ?? '' }}
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Address
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
{{ $permohonan->debiture->address ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
{{ $permohonan->debiture->village->name ?? '' }},
|
|
{{ $permohonan->debiture->district->name ?? '' }},
|
|
{{ $permohonan->debiture->city->name ?? '' }},
|
|
{{ $permohonan->debiture->province->name ?? '' }} -
|
|
{{ $permohonan->debiture->village->postal_code ?? '' }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-span-1">
|
|
<table class="table align-middle text-sm text-gray-500">
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Cabang
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->branch->name ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
CIF
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->cif ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Nomor Rekening
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
{{ $permohonan->debiture->nomor_rekening ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
NPWP
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->npwp ?? '' }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card border border-agi-100 min-w-full">
|
|
<div class="card-header bg-agi-50">
|
|
<h3 class="card-title">
|
|
Data Jaminan
|
|
</h3>
|
|
</div>
|
|
@endif
|
|
<div data-accordion="true">
|
|
@foreach ($permohonan->documents as $dokumen)
|
|
<div class="accordion-item {{ count($permohonan->documents) == 1 ? 'active' : '' }} [&:not(:last-child)]:border-b border-b-gray-200"
|
|
data-accordion-item="true" id="accordion_detail_jaminan">
|
|
<button @class(['accordion-toggle py-4 group', 'mx-8' => !isset($status)])"
|
|
data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
|
|
<span class="text-base text-gray-900 font-medium">
|
|
@if (count($permohonan->debiture->documents) > 1)
|
|
Jaminan {{ $loop->index + 1 }}
|
|
@else
|
|
Jaminan
|
|
@endif
|
|
</span>
|
|
<i class="ki-outline ki-plus text-gray-600 text-2sm accordion-active:hidden block">
|
|
</i>
|
|
<i class="ki-outline ki-minus text-gray-600 text-2sm accordion-active:block hidden">
|
|
</i>
|
|
</button>
|
|
<div class="accordion-content {{ count($permohonan->debiture->documents) > 1 ? 'hidden' : '' }}"
|
|
id="accordion_detail_jaminan_{{ $loop->index }}">
|
|
|
|
@if (!isset($status))
|
|
<div class="card-body lg:py-7.5 grid grid-cols-2">
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Pemilik Jaminan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $dokumen->pemilik->name ?? '' }}
|
|
</span>
|
|
</div>
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Jenis Jaminan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $dokumen->jenisJaminan->name ?? '' }}
|
|
</span>
|
|
</div>
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Hubungan Pemilik Jaminan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
|
|
</span>
|
|
</div>
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Alamat Pemilik Jaminan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $dokumen->pemilik->address ?? '' }},
|
|
<br> {{ $dokumen->pemilik->village->name ?? '' }},
|
|
{{ $dokumen->pemilik->district->name ?? '' }},
|
|
{{ $dokumen->pemilik->city->name ?? '' }},
|
|
{{ $dokumen->pemilik->province->name ?? '' }} -
|
|
{{ $dokumen->pemilik->village->postal_code ?? '' }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
<div class="card-table scrollable-x-auto pb-3">
|
|
<a href="{{ route('debitur.jaminan.bulk.download', ['id' => $permohonan->debiture->id, 'jaminan' => $dokumen->id]) }}"
|
|
class="ml-6 btn btn-dark dark:btn-light">
|
|
<i class="ki-outline ki-cloud-download"></i> Download Semua Dokumen
|
|
</a>
|
|
<table class="table align-middle text-sm text-gray-500">
|
|
@foreach ($dokumen->detail as $detail)
|
|
<tr>
|
|
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
|
|
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normal text-2sm">
|
|
{{ $detail->name ?? '' }}
|
|
</td>
|
|
</tr>
|
|
@if(isset($detail->details))
|
|
@if(json_decode($detail->details))
|
|
@foreach (json_decode($detail->details) as $key => $value)
|
|
<tr>
|
|
<td class="py-3 capitalize">
|
|
{{ str_replace("_"," ",$key) ?? "" }}
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normal text-2sm">
|
|
{{ $value ?? "" }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
@endif
|
|
<tr>
|
|
<td class="py-3 max-w-[100px] align-top">
|
|
Dokumen Jaminan
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
|
|
@if (isset($detail->dokumen_jaminan))
|
|
@php
|
|
$dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan))
|
|
? json_decode($detail->dokumen_jaminan)
|
|
: [$detail->dokumen_jaminan];
|
|
$dokumen_nomor = is_array(json_decode($detail->dokumen_nomor))
|
|
? json_decode($detail->dokumen_nomor)
|
|
: ($detail->dokumen_nomor
|
|
? [$detail->dokumen_nomor]
|
|
: []);
|
|
@endphp
|
|
@foreach ($dokumen_jaminan as $index => $dokumen)
|
|
<div class="flex w-full lg:w-[30%]">
|
|
@if (in_array(Auth::user()->roles[0]->name, ['administrator', 'pemohon-eo']))
|
|
@if (!empty($dokumen_nomor))
|
|
<span class="flex-1 mt-2 text-info">Nomor Dokumen :
|
|
{{ $dokumen_nomor[$index] }}</span>
|
|
@endif
|
|
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
|
|
class="flex-none badge badge-sm badge-outline mt-2 mr-2">
|
|
{{ basename($dokumen) }}
|
|
<i class="ki-filled ki-cloud-download"></i>
|
|
</a>
|
|
@endif
|
|
<span class="flex-none badge badge-sm badge-outline badge-warning mt-2"
|
|
onclick="viewPDF('{{ Storage::url($dokumen_jaminan[$index]) }}')"><i
|
|
class="ki-filled ki-eye mr-2"></i>Preview</span>
|
|
</div>
|
|
<br>
|
|
@endforeach
|
|
@endif
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 max-w-[100px]">
|
|
Keterangan
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $detail->keterangan ?? '' }}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@if (!isset($status))
|
|
</div>
|
|
@include('lpj::component.history-permohonan')
|
|
@endif
|
|
@include('lpj::component.pdfviewer')
|