Merge remote-tracking branch 'composer/feature/senior-officer' into staging

This commit is contained in:
Daeng Deni Mardaeni
2024-12-23 10:37:52 +07:00
14 changed files with 1003 additions and 984 deletions

View File

@@ -1,11 +1,22 @@
<div class="card {{ isset($hidePermohonan) ? 'hidden' : '' }}">
<div class="card-header" id="advanced_settings_appearance">
@php
$title = $title ?? 'Data Permohonan';
@endphp
<h3 class="card-title">
Data Permohonan
{{ $title }}
</h3>
<div class="flex items-center gap-2">
<a href="{{ route($backLink) }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
@if (isset($id))
<a href="{{ route($backLink, ['id' => $id]) }}" class="btn btn-xs btn-info">
<i class="ki-filled ki-exit-left"></i> Back
</a>
@else
<a href="{{ route($backLink) }}" 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">
@@ -49,8 +60,9 @@
<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
class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
{{ str_replace('_', ' ', $permohonan->status_bayar) }}
</span>
</div>
@@ -81,7 +93,7 @@
Name
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->name ?? "" }}
{{ $permohonan->debiture->name ?? '' }}
</td>
</tr>
<tr>
@@ -89,7 +101,7 @@
Email
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->email ?? "" }}
{{ $permohonan->debiture->email ?? '' }}
</td>
</tr>
<tr>
@@ -97,7 +109,7 @@
Phone
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->phone ?? "" }}
{{ $permohonan->debiture->phone ?? '' }}
</td>
</tr>
@@ -106,7 +118,7 @@
Address
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->address ?? "" }}
{{ $permohonan->debiture->address ?? '' }}
</td>
</tr>
<tr>
@@ -114,7 +126,11 @@
&nbsp;
</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 ?? "" }}
{{ $permohonan->debiture->village->name ?? '' }},
{{ $permohonan->debiture->district->name ?? '' }},
{{ $permohonan->debiture->city->name ?? '' }},
{{ $permohonan->debiture->province->name ?? '' }} -
{{ $permohonan->debiture->village->postal_code ?? '' }}
</td>
</tr>
</table>
@@ -126,7 +142,7 @@
Cabang
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->branch->name ?? "" }}
{{ $permohonan->debiture->branch->name ?? '' }}
</td>
</tr>
<tr>
@@ -134,7 +150,7 @@
CIF
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ $permohonan->debiture->cif ?? "" }}
{{ $permohonan->debiture->cif ?? '' }}
</td>
</tr>
<tr>
@@ -142,7 +158,7 @@
Nomor Rekening
</td>
<td class="py-3 text-gray-700 text-sm font-normal">
{{ $permohonan->debiture->nomor_rekening ?? "" }}
{{ $permohonan->debiture->nomor_rekening ?? '' }}
</td>
</tr>
<tr>
@@ -150,7 +166,7 @@
NPWP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->debiture->npwp ?? "" }}
{{ $permohonan->debiture->npwp ?? '' }}
</td>
</tr>
</table>
@@ -166,11 +182,13 @@
</h3>
</div>
<div data-accordion="true">
@foreach($permohonan->debiture->documents as $dokumen)
<div class="accordion-item {{ count($permohonan->debiture->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" data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
@foreach ($permohonan->debiture->documents as $dokumen)
<div class="accordion-item {{ count($permohonan->debiture->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"
data-accordion-toggle="#accordion_detail_jaminan_{{ $loop->index }}">
<span class="text-base text-gray-900 font-medium">
@if(count($permohonan->debiture->documents) > 1)
@if (count($permohonan->debiture->documents) > 1)
Jaminan {{ $loop->index + 1 }}
@else
Jaminan
@@ -182,7 +200,8 @@
</i>
</button>
<div class="accordion-content {{ count($permohonan->debiture->documents) > 1 ? 'hidden' : '' }}" id="accordion_detail_jaminan_{{ $loop->index }}">
<div class="accordion-content {{ count($permohonan->debiture->documents) > 1 ? 'hidden' : '' }}"
id="accordion_detail_jaminan_{{ $loop->index }}">
<div class="card-body lg:py-7.5 grid grid-cols-2">
<div class="mb-5">
@@ -190,7 +209,7 @@
Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->name?? "" }}
{{ $dokumen->pemilik->name ?? '' }}
</span>
</div>
<div class="mb-5">
@@ -198,7 +217,7 @@
Jenis Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->jenisJaminan->name?? "" }}
{{ $dokumen->jenisJaminan->name ?? '' }}
</span>
</div>
<div class="mb-5">
@@ -206,7 +225,7 @@
Hubungan Pemilik Jaminan:
</h3>
<span class="text-2sm text-gray-700">
{{ $dokumen->pemilik->hubungan_pemilik->name?? "" }}
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
</span>
</div>
<div class="mb-5">
@@ -214,23 +233,28 @@
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 ?? "" }}
{{ $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>
<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">
<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)
@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-normaltext-sm">
{{ $detail->name ?? "" }}
{{ $detail->name ?? '' }}
</td>
</tr>
<tr>
@@ -239,24 +263,34 @@
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
@if(isset($detail->dokumen_jaminan))
@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] : []);
$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)
@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>
@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">
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>
<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
@@ -269,7 +303,7 @@
Keterangan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $detail->keterangan ?? "" }}
{{ $detail->keterangan ?? '' }}
</td>
</tr>
@endforeach