Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into tender

This commit is contained in:
2024-11-07 15:39:30 +07:00
17 changed files with 351 additions and 252 deletions

View File

@@ -69,7 +69,7 @@
</td>
</tr>
<tr>
<td class="py-3 max-w-[100px] align-top" >
<td class="py-3 max-w-[100px] align-top">
Dokumen Jaminan
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
@@ -77,16 +77,22 @@
@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)
@if(in_array(Auth::user()->roles[0]->name,['administrator','pemohon-eo']))
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
class="badge badge-sm badge-outline mt-2 mr-2">
{{ basename($dokumen) }}
<i class="ki-filled ki-cloud-download"></i>
</a>
@endif
<span class="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 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

View File

@@ -146,10 +146,10 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama Dokumen
Nomor
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input " type="text" id="name" name="name[]" value="{{ $detail->name ?? "" }}" placeholder="Nama Dokumen">
<input class="input " type="text" id="name" name="name[]" value="{{ $detail->name ?? "" }}" placeholder="Nomor">
</div>
</div>
@@ -158,25 +158,36 @@
Dokumen Jaminan
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
<div class="flex items-center gap-2">
<input class="file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]">
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
</div>
<div id="additional-files-{{ $n }}"></div>
</div>
@if(isset($detail->dokumen_jaminan))
@php
$dokumen_jaminan = is_array(json_decode($detail->dokumen_jaminan)) ? json_decode($detail->dokumen_jaminan) : [$detail->dokumen_jaminan];
@endphp
@foreach($dokumen_jaminan as $index => $dokumen)
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->id, 'dokumen' => $detail->id, 'index' => $index]) }}"
class="badge badge-sm badge-outline mt-2 mr-2">
{{ basename($dokumen) }}
<i class="ki-filled ki-cloud-download"></i>
</a>
@endforeach
@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
<div class="flex flex-col w-full gap-2">
@foreach($dokumen_jaminan as $index => $dokumen)
<div class="flex w-full lg:w-[30%]">
@if(!empty($dokumen_nomor))
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : {{ $dokumen_nomor[$index] }}</span>
@endif
<a href="{{ route('debitur.jaminan.download', ['id' => $debitur->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>
</div>
@endforeach
</div>
@endif
@endif
</div>
</div>
@@ -234,10 +245,10 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama Dokumen
Nomor
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input " type="text" id="name" name="name[]" value="" placeholder="Nama Dokumen">
<input class="input " type="text" id="name" name="name[]" value="" placeholder="Nomor">
</div>
</div>
@@ -246,10 +257,11 @@
Dokumen Jaminan
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
<div class="flex items-center gap-2">
<input class="file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
<input class="flex-1 input" type="text" name="dokumen_nomor[{{ $n }}][]" placeholder="Nomor Dokumen">
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
</div>
<div id="additional-files-{{ $n }}"></div>
</div>
@@ -287,8 +299,8 @@
</div>
@php $n++; @endphp
@endforeach
@endif
</div>
@endif
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
@@ -496,10 +508,10 @@
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama Dokumen
Nomor
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input" type="text" name="name[]" value="${item.name || ''}" placeholder="Nama Dokumen">
<input class="input" type="text" name="name[]" value="${item.name || ''}" placeholder="Nomor">
</div>
</div>
@@ -508,10 +520,13 @@
Dokumen Jaminan
</label>
<div class="flex flex-wrap items-baseline w-full" id="file-container-${index}">
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id) : ''}
<div class="flex flex-col w-full gap-2">
${item.dokumen_jaminan ? renderExistingFiles(item.dokumen_jaminan, debiturId, item.id, item.dokumen_nomor) : ''}
</div>
<div class="flex items-center gap-2 my-2 w-full">
<input class="file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput(${index})">Add File</button>
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
<button type="button" class="flex-none btn btn-primary w-[100px] text-center" onclick="addFileInput(${index})">Add File</button>
</div>
</div>
</div>
@@ -541,32 +556,14 @@
.catch(error => console.error('Error:', error));
}
function renderExistingFiles(dokumenJaminan, debiturId, itemId) {
if (typeof dokumenJaminan === 'string') {
return `
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="badge badge-sm badge-outline mt-2 mr-2">
${dokumenJaminan.split('/').pop()}
<i class="ki-filled ki-cloud-download"></i>
</a>
`;
} else if (Array.isArray(dokumenJaminan)) {
return dokumenJaminan.map(file => `
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${encodeURIComponent(file)}" class="badge badge-sm badge-outline mt-2 mr-2">
${file.split('/').pop()}
<i class="ki-filled ki-cloud-download"></i>
</a>
`).join('');
}
return '';
}
function addFileInput(index) {
const container = document.getElementById(`file-container-${index}`);
const newInput = document.createElement('div');
newInput.className = 'flex items-center gap-2 mb-2 w-full';
newInput.innerHTML = `
<input class="file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
<button type="button" class="btn btn-danger w-[100px] text-center" onclick="removeFileInput(this)">Remove</button>
<input class="flex-1 input" type="text" name="dokumen_nomor[${index}][]" placeholder="Nomor Dokumen">
<input class="flex-1 file-input" type="file" name="dokumen_jaminan[${index}][]" multiple>
<button type="button" class="flex-none btn btn-danger w-[100px] text-center" onclick="removeFileInput(this)">Remove</button>
`;
container.appendChild(newInput);
}
@@ -575,20 +572,24 @@
button.closest('.flex.items-center.gap-2.mb-2').remove();
}
function renderExistingFiles(dokumenJaminan, debiturId, itemId) {
if (typeof dokumenJaminan === 'string') {
function renderExistingFiles(dokumenJaminan, debiturId, itemId, dokumenNomor) {
if (typeof dokumenJaminan === 'string' && typeof dokumenNomor === 'string') {
return `
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="badge badge-sm badge-outline mt-2">
<div class="flex w-full lg:w-[30%]">
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor}</span>
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}" class="flex-none badge badge-sm badge-outline mt-2">
${dokumenJaminan.split('/').pop()}
<i class="ki-filled ki-cloud-download"></i>
</a>
</div>
`;
} else if (Array.isArray(dokumenJaminan)) {
return dokumenJaminan.map(file => `
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="badge badge-sm badge-outline mt-2 mr-2">
} else if (Array.isArray(dokumenJaminan) && Array.isArray(dokumenNomor)) {
return dokumenJaminan.map((file, index) => `<div class="flex w-full lg:w-[30%]">
<span class="flex-1 mt-2 text-info text-sm">Nomor Dokumen : ${dokumenNomor[index] || 'N/A'}</span>
<a href="/debitur/${debiturId}/jaminan/download?dokumen=${itemId}&file=${file}" class="flex-none badge badge-sm badge-outline mt-2 mr-2">
${file.split('/').pop()}
<i class="ki-filled ki-cloud-download"></i>
</a>
</a></div>
`).join('');
}
return '';

View File

@@ -149,10 +149,10 @@
return `${formatDate(new Date(data.start_date))} - ${formatDate(new Date(data.end_date))}`
}
},
tujuan_penilaian_k_j_p_p: {
tujuan_penilaian_kjpp: {
title: 'Tujuan Penilaian KJPP',
render: (item, data) => {
return data.tujuan_penilaian_k_j_p_p[0].name
return data.tujuan_penilaian_kjpp.name
}
},
penawarandetails_count: {

View File

@@ -147,6 +147,38 @@
@include('lpj::component.detail-jaminan')
<div class="card min-w-full">
<div class="card-header">
<h3 class="card-title">
Data Biaya
</h3>
</div>
<div class="card-table scrollable-x-auto pb-3">
<div class="grid grid-cols-1 xl:grid-cols-1 gap-5 lg:gap-7.5">
<div class="col-span-1">
<table class="table align-middle text-sm text-gray-500">
<tr>
<td width="10%" class="py-2 text-gray-600 font-normal">
Status Bayar
</td>
<td class="py-2 text-gray-800 font-normaltext-sm">
{{ strtoupper(str_replace('_',' ',$permohonan->status_bayar)) }}
</td>
</tr>
<tr>
<td class="py-3">
Nilai NJOP
</td>
<td class="py-3 text-gray-700 text-2sm font-normal">
{{ $permohonan->nilai_njop }}
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">

View File

@@ -13,7 +13,8 @@
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<form id="{{$route[0]}}_form" name="{{$route[0]}}_form" method="POST">
<input type="hidden" id="id" name="id" value="{{ $id }}">
<!-- $id => penawaran.id -->
<input type="hidden" id="{{$route[0]}}_id" name="id" value="{{ $id }}">
@method('PUT')
@csrf
<div class="card pb-2.5">

View File

@@ -114,6 +114,9 @@
},
tujuan_penilaian_kjpp_name: {
title: 'Tujuan Penilaian',
render: (item, data) => {
return `${data.tujuan_penilaian_kjpp.name || ''}`;
},
},
nama_kjpp_sebelumnya: {
title: 'Nama KJPP Terpilih',

View File

@@ -17,7 +17,8 @@
function setData()
{
let id = $("#id").val();
// id => penawaran.id
let id = $("#{{$route[0]}}_id").val();
let token = "{{ csrf_token() }}";
// alert('token = ' + token);
var useURL = "{{ route('registrasifinal.setData') }}";
@@ -81,6 +82,7 @@
let token = "{{ csrf_token() }}";
let _method = $('input[name=_method]').val();
// id => penawaran.id
let id = $('#{{$route[0]}}_id').val();
let region = $("#{{$route[0]}}_region").val();
let catatan = $("#{{$route[0]}}_catatan").val();

View File

@@ -1,5 +1,15 @@
<link rel="stylesheet" href="{{ public_path('build/assets/app-BEWyoHLE.css') }}" data-navigate-track="reload">
<link rel="stylesheet" href="{{ public_path('build/assets/app-DqiwbDNQ.css') }}" data-navigate-track="reload">
@php
$manifest = json_decode(file_get_contents(public_path('build/manifest.json')), true);
$cssFiles = array_filter($manifest, function($value) {
return strpos($value['file'], '.css') !== false;
});
@endphp
@foreach($cssFiles as $file)
<link rel="stylesheet" href="{{ public_path('build/'.$file['file']) }}" data-navigate-track="reload">
@endforeach
<div class="card-body">
<div class="scrollable-x-auto">
<div class="print-area">
@@ -79,7 +89,7 @@
<tr>
<td>Jangka Waktu</td>
<td>:</td>
<td></td>
<td><span style="color: red;"> {{ formatTanggalIndonesia($penawaran->start_date) }} - {{ formatTanggalIndonesia($penawaran->end_date) }}</span></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">i</td>
@@ -179,4 +189,4 @@
</table>
</div>
</div>
</div>
</div>

View File

@@ -104,7 +104,7 @@
<tr>
<td>Jangka Waktu</td>
<td>:</td>
<td></td>
<td><span style="color: red;"> {{ formatTanggalIndonesia($penawaran->start_date) }} - {{ formatTanggalIndonesia($penawaran->end_date) }}</span></td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">i</td>

View File

@@ -78,12 +78,6 @@
@push('scripts')
<script type="text/javascript">
function spkShow(regId)
{
var url = "{{ url('show') }}/"+regId;
$(location).attr('href',url);
}
function spkCreate(regId)
{
var url1 = "/spk/"+regId+"/edit";